Jump to content
IGNORED

Using jEdit for 2600 development


SpiceWare

Recommended Posts

I've been using jEdit for 2600 development since 2006. jEdit is a programmer's editor that is written in Java so it will run on just about any system out there.

 

What I like about jEdit is the ability to use custom "mode" files to control the Syntax Highlighting. Syntax highlighting means different parts of your code will be displayed with a unique style - typically different foreground colors, though the style also includes options for background color, bold and italic.

 

You might wonder how syntax highlighting would help you out - here's an example:

post-3056-0-67020300-1412127452_thumb.png

 

TIA register RESP0 was accidentally typed with the letter O instead of the number 0. When typed correctly, the syntax highlighting of RESP0 will change:

post-3056-0-15079800-1412127465_thumb.png

 

 

I've been maintaining mode files for 2600 assembly, batari BASIC, and ColecoVision programming. Back in June I figured out how to change the mode file so that graphics represented by binary numbers is very easy to see in the program:

post-3056-0-76817900-1412127683_thumb.png

 

 

This weekend iesposta prodded me into figuring out how to use jEdit to compile with dasm:

post-3056-0-80741200-1412127948_thumb.png

 

and launch Stella:

post-3056-0-18861800-1412127960_thumb.png

 

 

If you're interested in using jEdit for 2600 coding, you may like to look over the series of blog entries I've been posting about it.

  • See this entry for the current mode files for 2600 and batari BASIC coding
  • See this entry for adding console support, a prerequisite for the next blog entry
  • See this entry for configuring jEdit to compile with dasm and launch Stella
  • See this entry for how to set the Syntax Highlighting (colors) to your liking
Edited by SpiceWare
  • Like 5
Link to comment
Share on other sites

I wish to voice some highlights.

"In Java" so we are talking about Mac, Linux, and Windows.

Should be great for development in assembly or basic for 2600, 7800, Colecovision, Intellivision, and more!

Can't find what is now causing your program to not compile? Diff with an earlier saved version and jump to all the different spots side-by-side! (I'm thinking of using auto-save and auto-backups because at least in batari Basic which I use, a missing indent, an indent where there shouldn't be, a key bump puts a character in the code and now it fails to compile, it sounds great to be able to go to an earlier auto-back up where things did compile properly.)

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

In Mac OSX it seems apple has stopped updating Java.

You must install newer versions from the Java website downloads.

Even though I was at the latest OSX 10.9.5, the newest Java I had was 1.6.

 

The jEdit 5.2 pre-release requires Java version 1.7.

jEdit 5.2 is nicer for a number of reasons. It acts more like an Application as it doesn't spawn a java program.

The errors (reported as warnings at the bottom right) in running the 5.1 in Java 1.6 are gone.

It has a "jE" icon now.

 

I don't think it is coming across the fact that this is less like a text editor and more like an IDE environment.

Granted it doesn't have the Utility Program Editors that Visual bB has for sprites, playfields, music and sound, color value chooser, and exhaustive syntax checking (i.e. If a goto label has a label to go to or not).

I will still start my Basic projects in Visual bB because it has helped a great deal pointing out errors, but when projects get large near the end, the Visual bB editor becomes unable to handle things and I find it best to switch to jEdit which can parallel the way I work in Visual bB. I have it set so I can make changes, save, compile, and run Stella just like I use Visual bB.

Link to comment
Share on other sites

. . . but when projects get large near the end, the Visual bB editor becomes unable to handle things and I find it best to switch to jEdit which can parallel the way I work in Visual bB. I have it set so I can make changes, save, compile, and run Stella just like I use Visual bB.

 

When a program becomes too large, I turn off syntax checking and everything is fine.

Link to comment
Share on other sites

  • 9 years later...

Hi everyone,

 

My name is Gilles (a guy's name here, in France).

 

I was trying to set up a 2600 programming environnement on my Mac Mini (M2) and followed the explanations of SpiceWare to install and set Jedit, Dasm...

 

Here are the versions I installed:

 

- OpenJdk 11 (tried also with openjdk64-21.0.1 and temurin64-21.0.1 but same result)

- Jedit 5.6

- Dasm 2.20.14.1-osx-x64

- the latest mode file for the 6502 given by SpiceWare

 

My problem is that any attempt to compile an *.asm program fails with the following error message:

 

"Process /../dasm exited with code 134"

 

I didn't find any information on what is the code 134 but the visual symptom I see is that tehre is a object code generated but it doesn't contain anything (size = 0 KB).

 

Any help will be greatly appreciated ! 😅🙏

Link to comment
Share on other sites

Hi Darrell,

 

Thanks for your reply !

 

I did set up the compile command with the -l$c.lst option but the resulting .lst file was empty just like the bin file.

 

I've been able to go further and finaly found some .asm files I could compile without error.

By the way, at that point, I only tried to load .asm files I found on the internet.

I didn't do anything except loading them in Jedit (unmodified).

 

So, I guess it might be some encoding problem.

 

Anyway, with files that would compile, Stella refuses to execute the resulting .bin files.

 

When I click on the "run" button in Jedit, I have the following message in the console:

Stella[16313:5071356] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

 

Stella is launched but displays the message "Fatal error, invalid instruction" in the foreground and I can see the following in the background:

 

Stel1a 6.7
> autoExec():
script file -~/Library/Application Support/Ste11a/autoexec.sc
ript' not found
script file ・~/Desktop/Monitor.script" not found
config file ~/Library/Application Support/Stella/cfg/Monitor
.cfg' not found
1ist file Monitor.1st' loaded OK
symbol file Monitor.sym' 1oaded OK

 

 

In Jedit, I have the following command in the interpreter section:

/Applications/Stella.app/Contents/MacOS/Stella $c.bin

 

I guess I need to let Stella knows where my files are but where and how shall I do that in Jedit ?

Link to comment
Share on other sites

My Compile & Run settings are:

 

image.thumb.png.b5b6c266dbafdf5afbec242f378bde91.png

 

I do notice something odd in this bit that you posted - there's quite a few mixups between number 1 and lowercase L, such as ste11a instead of stella, which might explain why things are not found:

 

Quote
Stel1a 6.7
> autoExec():
script file -~/Library/Application Support/Ste11a/autoexec.sc
ript' not found
script file ・~/Desktop/Monitor.script" not found
config file ~/Library/Application Support/Stella/cfg/Monitor
.cfg' not found
1ist file Monitor.1st' loaded OK
symbol file Monitor.sym' 1oaded OK

 

 

I just tried download the source archive from step 14 of Collect and opened the source in jEdit, this happened:

 

 

image.thumb.png.35051c4792054b7ddcddc4959a19ac5b.png

 

Was surprised about that because I made the archive, though that was created on my old Intel based Mac Pro and I'm now using a Mac Studio, the stock M2 Ultra version. So perhaps something's up with Intel vs ARM.

 

I went ahead and clicked OK then the compile, which did work:

image.thumb.png.16e05b6431d997b18ed67289be22aab7.png

Though the filenames aren't quit right, collect.* became limits.collect.*:

 

image.thumb.png.0e8e8219cd7d4673e37b39a379d5840b.png

 

Launching Stella from jEdit also worked, with it loading the limits.collect.bin that was just created:

 

image.thumb.png.cf6153413667ab3b8176941440106ff9.png

 

 there is a warning in the console though, don't know what that means:

 

image.thumb.png.9d087c34875c1a96c8b0a96f02ba6453.png

 

When I quit Stella the console shows an exit code 0 from Stella:

 

image.thumb.png.112d8987ff4e20cd1d45e4a261b8d84f.png

 

I searched on limits and found 1 instance in my source's comments:

 

    ; put into a "reduced package".  This package limits the 6507 to an 8K

 

If I change it to this the files are correctly created without the limit. prefix.

 

    ; put into a "reduced package".  This limits the 6507 to an 8K

 

So jEdit is now using whatever follows package as part of the filename.

  • Like 1
Link to comment
Share on other sites

Thanks for your reply Darrell !

 

About the "Ste11a" showing in my previous post, I don't know what happened but last time I checked, it was correctly displayed on my Stella install.

Anyway, to be sure, I uninstall and reinstall Stella.

 

Also, I found what went wrong and threw the Dasm error code 134. It was the contents of my "vcs.h".

It didn't look like a "*.txt" file and started with something like "payload..." and as a matter of fact some other "*.asm" files too.

Maybe it's the way I saved them.

 

Anyway, with the correct "vcs.h" file, I can now compile and launch Stella with the resulting ".bin" file.

 

Regarding the I/O message you had, I too had it and indeed that did not prevent compiling.

 

Thanks again for your detailed reply and for your time Darrell !

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...