Compile and Run 2600 assembly code from jEdit
In this blog entry we'll be making the changes to compile and run your 2600 program from jEdit. You must have already followed the steps in Add a console to jEdit for this to work.
You must also have already installed the 6502 mode file and updated the catalog file. The current 6502 mode file can be found in this blog entry.
For this we'll be doing 3 things:
- Figure out your Compile Command
- Figure out your Interpreter Command
- Configure jEdit
Figure out your Compile Command
First thing we need is the current command you use when compiling 2600 programs on your computer. I use this command when I'm working on Draconian
dasm draconian.asm -f3 -v0 -sdraconian.sym -ldraconian.lst -odraconian.bin
Then we use $n to replace instances of the source code filename with extension
dasm $n -f3 -v0 -sdraconian.sym -ldraconian.lst -odraconian.bin
Finally we use $c to replace instances of the source code filename without extension
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
Some examples of what you might end up with:
./dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
~/dasm/dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
/usr/local/bin/dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
"c:\Program Files\Dasm\dasm.exe" $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
Figure out your Interpreter Command
The Interpreter Command is how you launch a ROM image in Stella. On the Mac I use:
/Applications/Stella.app/Contents/MacOS/Stella draconian.bin
Like above, I'll use $c to replace the filename without extension
/Applications/Stella.app/Contents/MacOS/Stella $c.bin
Some examples of what you might end up with:
stella $c.bin
~/Stella/stella $c.bin
"c:\Program Files\Stella\Stella.exe" $c.bin
Configure jEdit
If you have a 2600 assembly file handy, go ahead and open it in jEdit. It'll make the following steps a little easier.
- Select the Plugins menu
- Select the Plugins Options... menu option
- In the Console group select Compile & Run (click the small triangle to the left of Console if you don't see Compile & Run)
- If it's not already, change Set compiler/interpreter for edit mode: to assembly-6502 (if you opened a 2600 assembly file, this should already be selected)
- For Compile select Use custom command
-
fill in the custom command with your Compile Command, I used:
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin - For Interpreter select Use custom command
-
fill in the custom command with your Interpreter Command, I used:
/Applications/Stella.app/Contents/MacOS/Stella $c.bin - Click OK
You should now be able to use the Toolbar buttons we added before to Compile and Run your program.
JEDIT NAVIGATION
<PREVIOUS> <INDEX> <NEXT>
7 Comments
Recommended Comments