Jump to content





Updated batari BASIC mode file

Posted by SpiceWare, in batari BASIC, jEdit 27 September 2014 · 1,399 views

I like to use jEdit when I'm coding my 2600 games.  Back in June I revised my mode file, the syntax coloration rules, to make it easier to see graphic images that are represented by binary numbers.  I finally got around to implementing this change for my batari BASIC mode file. This is what it looks like:
Attached Image
Note: Color choices are under your control, so you'll probably see different colors than I do.
 
 
To use the mode file you'll need to do 2 things:
  • install the file
  • add an entry to the catalog
To install the file do this:
  • select the Utilities menu
  • select the Settings Directory sub-menu
  • select the modes folder
Attached Image
 
Depending upon your version of jEdit the file browser will show up in either a window or an embedded side panel:
Attached Image  Attached Image
 
On the Mac it's not a normal Finder window, don't know about other platforms, so you won't be able to drag & drop batari BASIC.xml into it.  What you can do from here is:
  • highlight the path (mine is /Users/darrell/Library/jEdit/modes in the window screenshot and /Users/darrellspice/Library/jEdit/modes in the embedded screenshot)
  • Command-C to copy the path
  • switch to Finder (so you see Finder next to the Apple in the top-left corner of your screen)
  • select the Go menu
  • select the Go to Folder... option
  • Command-V to paste the path
  • hit return
Now you can drop batari BASIC.xml into this folder. Don't close it yet though as you're not done. You need to edit the catalog to add the following. I've attached my catalog file so you can see it in context.
<MODE NAME="batari BASIC"       FILE="batari BASIC.xml"
				FILE_NAME_GLOB="*.bas" />
 
Once the catalog and mode file are in place, quit and relaunch jEdit. From then on any file with the extension of .bas will automatically be colorized based on these rules.
 
Since I don't usually delve into batari BASIC, I may have missed adding some words to the coloration rules.  If I have, please reply to this blog entry with the word(s) and which of the two groups the word(s) should be in.  The group are Special Variables and Keywords. They're currently set up as follows:
 
Special Variables
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • K
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • X
  • Y
  • Z
  • BALLHEIGHT
  • BALLX
  • BALLY
  • COLLISION
  • JOY0DOWN
  • JOY0FIRE
  • JOY0LEFT
  • JOY0RIGHT
  • JOY0UP
  • JOY1DOWN
  • JOY1FIRE
  • JOY1LEFT
  • JOY1RIGHT
  • JOY1UP
  • MISSILE0HEIGHT
  • MISSILE0X
  • MISSILE0Y
  • MISSILE1HEIGHT
  • MISSILE1X
  • MISSILE1Y
  • PLAYER0X
  • PLAYER0Y
  • PLAYER1X
  • PLAYER1Y
  • PLAYER2X
  • PLAYER2Y
  • PLAYER3X
  • PLAYER3Y
  • PLAYER4X
  • PLAYER4Y
  • PLAYER5X
  • PLAYER5Y
  • PLAYFIELD
  • PFREAD
  • SCORE
  • SCORECOLOR
  • SWITCHBW
  • SWITCHLEFTB
  • SWITCHRESET
  • SWITCHRIGHTB
  • SWITCHSELECT
  • RAND
keywords
  • &&
  • ||
  • ASM
  • BANK
  • CONST
  • DATA
  • DIM
  • DRAWSCREEN
  • ELSE
  • END
  • FLIP
  • FOR
  • FUNCTION
  • GOSUB
  • GOTO
  • IF
  • INCLUDE
  • INCLUDESFILE
  • LET
  • NEXT
  • NONE
  • OFF
  • ON
  • OPTIMIZATION
  • PFCLEAR
  • PFHLINE
  • PFPIXEL
  • PFSCROLL
  • PFVLINE
  • PLAYER0
  • PLAYER1
  • PLAYER2
  • PLAYER3
  • PLAYER4
  • PLAYER5
  • PLAYER6
  • PLAYER7
  • PLAYER8
  • PLAYER9
  • PLAYFIELD
  • RETURN
  • ROMSIZE
  • SET
  • SIZE
  • SMARTBRANCHING
  • SPEED
  • THEN
batari BASIC mode file:
Attached File  batari BASIC.xml.20140927.zip (2.7KB)
downloads: 50

my catalog file for reference:
Attached File  catalog.zip (801bytes)
downloads: 50




NOW it works, with your files, of course!

Only change so far I have made is Keyword 3 to bright pink, to match "Visual bB" more closely.

 

I don't really care if the extra player7, player8, player9 are colored or not. They are, all of them, black in VbB.

Screen Shot 2014 09 27 At 9.37.22 PM
Screen Shot 2014 09 27 At 9.41.36 PM
Screen Shot 2014 09 27 At 9.44.53 PM
  • Report

The second picture above shows inline assembly. (Don't laugh, it saves bytes setting that many zeros with assembly rather than having the compiler create two routines.)

 

Compare the third picture above with this "Visual bB"

Screen Shot 2014 09 27 At 9.58.52 PM

  • Report

Hmm, the hex values aren't coloring correctly, neither is 0. I'll take a look at that tomorrow.

 

I should probably add the DPC registers to the colorization rules as well, to both assembly and bB.

  • Report

Search My Blog

Recent Entries

Recent Comments

Latest Visitors

0 user(s) viewing

0 members, 0 guests, 0 anonymous users