Here is another release that should be close enough that programmers can get started on some games.
This release requires a test version of Stella, posted in the previous blog entry.
Included in this release:
- Support for 10 sprites (player0-player9)
- pfcolors: now works
- Background colors per line supported (uses new bkcolors: command)
- scorecolor: command to define score colors per line
- Comments with semicolon now supported
- C-style multiline comments with /* and */
- Use of extra RAM in DPC+ (described below)
A demo is included that shows some of the above features, except the extra RAM.
Sprite 0 is flicker-free and uses player0, while sprite 1 is flickered as needed for player1-player9. Use the left joystick in the demo to move the sprites and the button to change the sprite to move to see the flicker engine in action.
pfcolors: can specify from 1 to 255 colors for the playfield. Use DF4FRACINC to determine when the colors will update (the number of lines is determined by 256/x). For example: to update every 8 lines, use DF4FRACINC=16.) DF4FRACINC=0 will show the whole playfield in a single color, while DF4FRACINC=255 will update every line (but needs a "priming read" - more about that another time.) In the demo, use RESET to change DF4FRACINC.
In a similar fashion, DF0FRACINC-DF3FRACINC control how often each 8-pixel swath of playfield columns gets updated. In the demo, use the right joystick can independently control these.
bkcolors: works like any other color command. It uses DF6FRACINC to determine how often to update. In the demo, use SELECT to change DF6FRACINC.
Some other things that RevEng pointed out have been fixed (though I'm not sure if all have.)
Lastly, use of the extra RAM is via a stack as that's how the RAM is structured. You have a 256-byte stack. You can push and pull variables from the stack to effectively increase your available RAM, as follows:
push a monsterX t
will push variables a, monsterX and t to the stack, and you can use them for other purposes. To get them back, use pull:
pull a monsterX t
You can also push or pull a range:
will push variables a-f. To get them back, use pull a-f.
When you push variables, the pointer is decremented and pulling will increment. A third command to handle the stack pointer is also available. The default value for the stack pointer is 256. For example:
will set the stack pointer to 200. You can also use a variable here.