Pas 6502
A downloadable tool for Windows
Welcome to Pas 6502, the home of my Pascal cross-compiler for 6502-based machines.
It currently supports these machines:
- C64
- C128
- Vic-20
- Commodore PET
- BBC Micro
- Atari 8-bit
- Apple II family
- NES (Very minimal support currently...)
PREREQUISITES!!: Needs a Java Runtime Environment at a minimum (see readme file).
Kick Assembler (the assembler) & exomizer (packing program)is already included in the download...
You can download the readme help file separately to peruse before using the tool, but it is included with Pas6502 too.
NOTE: make sure to save your projects before compiling them just in case the compiler locks up when processing the project (rare, but does happen...unsure why yet).
Press F1 in Pas6502 to open up the help file (or open it separately ). You can then navigate via the URLs to download the prerequisites.
There are multiple download files, one is the compiler itself (includes other files too though), and a separate help file (included in the compiler download too).
With it, you can create programs/games by compiling a subset of the Pascal language ready to be run in an emulator or on real hardware!
I will add new machine types as I get time/figure them out.
I believe it's pretty useful, but I will continually develop it. It's free, but if you want to donate to support my work, you can 😊 Donate when downloading, or send me a coffee.
The source code is available at the link below, but I've not finished updating it yet
https://bitbucket.org/paul_nicholls/pas6502/src/master/
Hope you find it useful!!
Status | In development |
Category | Tool |
Platforms | Windows |
Rating | Rated 5.0 out of 5 stars (2 total ratings) |
Author | syntaxerrorsoftware |
Tags | atari, bbc-micro, Commodore 64, compiler, cross-compiler, pascal, utility |
Download
Click download now to get access to the following files:
Development log
- Commodore PET support added!91 days ago
- Apple II support added!! (and some fixes)91 days ago
- Bug fixes, IDE updates, improvements...97 days ago
- Find/replace dialog, goto code definitions and other improvements.Aug 27, 2024
- Improvements and bug fixes madeJun 16, 2024
- New download file (fragments.zip) and include.zip updateJun 07, 2024
- Art change for NES example...May 11, 2024
- Small changes and NES support!May 09, 2024
Comments
Log in with itch.io to leave a comment.
The NES examples immediately crash with an illegal OP code.
How are you playing the .nes files? I'm only using legal op codes...none of the illegal dodgy ones...
Mesen
I just tried them again using my latest build with fceux and no issues
I usually don't comment on anything, this is my first comment.
Pas6502 is really great and it has so much potential. Tested the examples for C64-development and it gives you the possibility to escape micromanaging your code with keeping the transparency and control.
Something that is very much needed.
Also the GUI is much better than TRSE, because it doesn't get into your way.
It's so good. Please keep on developing it.
Also the integration of kickass and exomizer into the package is brilliant.
I need to test it a little bit more regarding the projects and units, but i do already love it.
Sidenote:
One error came up with the C64-Example "line drawing.dpr".
Here is the output:
Code parsing stage successful...
Assembly generation successfull...
Removing redundant routines stage starting...
Removing unused routine "vic_fillScreen" from the asm file...
Removing unused routine "vic_waitForRaster" from the asm file...
Removing unused routine "vic_set_scrolly" from the asm file...
Removing unused routine "vic_set_scrollx" from the asm file...
Removing unused routine "vic_set_scroll" from the asm file...
Removing unused routine "divmod_u16" from the asm file...
Removing unused routine "divmod_s16" from the asm file...
Removing unused routine "_mod8_8u" from the asm file...
Removing unused routine "_div8_8u" from the asm file...
Removing unused routine "_addDelta8ToWord" from the asm file...
Removing unused routine "_printSignedAX" from the asm file...
Removing unused routine "_printSignedA" from the asm file...
Removing unused routine "mul_8ux16s" from the asm file...
Removing unused routine "mul8x8s" from the asm file...
Removing unused routine "readb" from the asm file...
Removing unused routine "writeb" from the asm file...
C:\pas6502\pas6502>java.exe -jar "C:\pas6502\pas6502\utilities\KickAssembler\KickAss.jar" "C:\pas6502\pas6502\examples\c64\line drawing.asm"
//------------------------------------------------------
//------------------------------------------------------
// Kick Assembler v5.25 by Mads Nielsen
//------------------------------------------------------
//------------------------------------------------------
Output dir: C:\pas6502\pas6502\examples\c64
parsing
L18:
// e2 := 2 * error // (m1s16=c1u8_mul_m2s16.asm)
lda #2
sta mul_8ux16s.a
^
Error: Unknown symbol 'mul_8ux16s'
at line 652, column 7 in line drawing.asm
Command C:\pas6502\pas6502\compile.bat failed with exit code: 1
*******************************
WARNINGS:
fragment "C:\pas6502\pas6502\fragments\6502\m1s16=m2s16_add_m3u16.asm" doesn't exist, you need to define it...
fragment "C:\pas6502\pas6502\fragments\6502\m1s16_leq_m2u16.asm" doesn't exist, you need to define it...
fragment "C:\pas6502\pas6502\fragments\6502\m1s16_geq_m2u16.asm" doesn't exist, you need to define it...
Thanks so much for the kind words, and the bug report...I'll check it out :)
I've uploaded a fragments.zip file to my project page and updated the include.zip file too. Try downloading them to see if it helps. PS the line drawing code doesn't appear to work anyway lol (dang it).
https://syntaxerrorsoftware.itch.io/pas6502/devlog/745262/new-download-file-frag...
In a crunch with another project. But, I just donated. Hope you continue to update NES support :)
Thanks! 🙏 I will update NES as I figure more out. I'm currently trying to add stack support for recursion, but more importantly for routines in ROM that can't have their variables in ROM...
I am trying to compile one of the example programs but I always get this error: "Please use "Options" to configure where the emulators are found!" even after configuring all the paths to the emulators.
Could you send me a screenshot of your options dialog and your .ini file? Maybe I can see something.
I have the same problem. Do I need to have Kick Assembler and Exomizer installed?
Kick assembler and exomizer is already included. I'll check my code... Since I have the c128 emulator already and it's the default path, I'll check the code again.
Ok, I've checked my code and it looks good; it saves the text result from the dialog box to the variables, and writes the variables to the .ini file.
I had to copy the "pas6502" folder containing all the files to the main C:\ drive. Editted "pas6502.ini" to point to my emulators before it would compile. When I look in the Options>Paths window the directory paths do not show the values I manually edited but your app still compiles and runs.
What drive did you initially copy pas6502 to?
It is supposed to auto read from the pas6502 folder wherever it is.
I am sorry for the late answer. I have now it working; sort of. I can compile and run the c64 example arrayTest.dpr for example but when I try to compile and run circle charmodes.dpr I get an error: J:\progretro\pas6502\examples\c64\circle charmodes.asm 296:7) Error: Unknown symbol 'mul8x8s'
Thanks for the reply ☺️ I'll check it out...I may need to alter one of the fragments to match the routine it's calling...
thanks
I've uploaded a fragments.zip file to my project page and updated the include.zip file too. Try downloading them to see if it helps.
After updating my pas6502 with the new two folders(fragments and include) I just downloaded I am still geting the same error:
Error: Unknown symbol 'mul8x8s'
at line 794, column 7 in circle charmodes.asm
It was working on my local copy (unsure what I missed with the last upload), but I will upload a new whole version of the compiler soon which should help (touch wood)
Did you hit cancel instead of ok on the dialog box? That would not change the setting. In the meantime, I'll also look at my code to make sure I actually do save the new c128 path stuff when ok is pressed 😅
Ok, I've checked my code and it looks good; it saves the text result from the dialog box to the variables, and writes the variables to the .ini file. Apart from hitting cancel instead of ok, or getting the path incorrect, I'm not sure what is going it right now
Mention of the NES and Atari (2600?) is quite a tease. There are very few options for the NES in higher level languages.
Thanks for the comment, I AM going to add NES and Atari examples into the compiler as soon as I work them out lol