ABSTRACT
This white paper steps through emulating a Commodore 64 video game on the Atari 2600 including work stages.
Ring Raiders is a 3D Commodore 64 game based on the mock-up on Star Raiders cover:
SIDE-BY-SIDE COMPARISON
C64 and Atari 2600


Ring Raiders is 100% machine language written in compiled SuperCharger BASIC for the C64.
SuperCharger BASIC adds commands for graphics and sound like Simon's BASIC including scroll commands for a soft blitter.
SuperCharger BASIC has a SID Player with Player commands and scripting to bind subtunes and Fx to in-game events.
RingRaiders can be downloaded from the Commodore Scene Database here.

Workstages for emulation:
To emulate the game on the Atari 2600 the source code was reassembled with the petscii texture mapping code commented.
The Atari had an occasional frameskip, but the game was playable (no work stages).
The colors were greyscale because the C64's 16 colors are grayscale on the Atari TIA.
I added the color back but left the first level greyscale (workstage).
Next I added some enhancements to the emulation. The full enhancement list is available from Atari with the download for the ROM.

Comparison
Play the video of the Commodore 64 original while playing the emulated version for the Atari side-by-side.

Enhanced C64 Graphics
The Atari 2600 adds additional Atari colors and shading to the graphics.

SID music and sound Fx
The Atari 2600 emulates the SID subtractive analog synth chip with a distinctly different Atari sound.

SID Tracker Studio
Ring Raiders features a built-in SID Studio with two AI algorithms for creating new variations of the songs and Fx in the game. The Atari 2600 emulates both AI algorithms.

Tracker Editor with Pattern Trace
Ring Raiders includes an Editor for stepping through the games music and sound effects in slow motion sounding out changes to compose new music.
The Editor was not emulated due to space limitations on the ROM but is possible to emulate as a multiload module for the SuperCharger.

Extra hardware required:
To emulate this Commodore 64 video game on the Atari 2600 either the StarPath SuperCharger cartridge or CBS RAM memory expansion is required.
CBS RAM adds an extra 256 bytes trippling the Atari 2600's onboard 128 bytes of RAM, this is not enough RAM to emulate the AI algorithms that create new variations of the SID songs and Fx.
The StarPath SuperCharger is a 6K RAM expansion board that has enough RAM to emulate both AI algorithms and can load additional modules.

Video game emulation vs whole system emulation
Emulation at the video game level is different than emulating the entire system.
Video games often use a Framework which is easier to emulate for providing a subset of system functionality.

Development kits:
C64 Atari SuperCharger BASIC (Commodore 64,BETA 20250208)
Atari Flashback BASIC (Atari 2600, CBS RAM)
SuperCharger BASIC (Atari 2600, StarPath SuperCharger)

Ring Raiders 3D graphics use all of these layers.
Ring Raiders More Rings won 1st Place with a Wild award as a Development Tool in the Fjälldata 2025 programming contest in Norway! Includes a new Rainbow Warp Title screen.
7 Layers of Graphics for 3D Animation

1. Sprites
Synthetic 160x100 graphics mode for sprites (x,y addressable).
player1x=80
player1y=50


2. Semigraphics
20x10 semigraphic tile pixel playfield (x,y addressable).
vwpixel(10,5,flip)

3. Sprite scalling and rotation animation
Sprites have three levels of scaling animation and can be rotated backwards and upsidedown.
REFP0=0:rem horizontal axis flip for sprite
loadsprite0upsidedown(8):rem vertical axis flip for sprite
NUSIZ0=255:rem scale sprite size


4. Animated texture mapping
Tiles can be texture mapped and animated with hi res petscii 2x2 per tile.
Background tiles can be texture mapped as well.
TileCharacters(3)=205:BackgroundTileCharacters(0)=49

5. palette switching animation
The playfield consists of 10 rows of color with palette switching commands.
rowcolors(0)=2:rowcolors(1)=7:rowcolors(2)=6:rowcolors(3)=12:rem Gray

6. Camera animation
The camera can scroll the screen while everything is moving for animation on animation.
Sprites may be bound to tiles or can be free floating.
The virtual world is 92x20 tile pixels or 5x2 Television screens.
BITIndex=71:rem set camera x coordinate
scrollvirtualworldtoggle=1: rem move camera to new position next frame

7. Motion Blur animation
MBR filter for a sharper image or motion blur animation.


ABSTRACT

This white paper discusses embedded Development Tools as plug-in's for Video Games.
Ring Raiders is used as a model to illustrate.


About
The musical development suite in Ring Raiders video game were written using a custom player that supports scripting.
These dev tools can be added to any game that uses the player.

Detailed Instructions
To bring up the pattern Editor in Ring Raiders press left-shift + Joystick right.

Patterns are 5 bytes each and can be modeled and heard directly on the SID in the Tracker Editor.

Control patterns are skipped because they map subtunes to events in the game (control patterns end with 0).
Watch the walk-through example in the demo video above.

Note the main tune is the first 8 patterns so makes it easy to learn about Trackers and hear changes as you model them.
And then exit the Editor to listen to your SID compositions in the game.

Fx Controls
Holding the button down for 20 seconds during the game will rebuild the SID algorithmically. You can use the Editor to see the changes to the patterns from the algorithm.

New:
left-shift + Joystick left will use a different algorithm to rebuild the SID
The rebuilding algorithms can also affect each other.

Left-shift + Joystick up/down during the game will similarly rebuild the SID Control and ADSR register arrays for the 38 instruments.
Creating a new set of SID instruments. The instrument set is indicated below the SID label, the SID rebuild revision to the right.

This Tracker is a lot of fun to play with and it's different, share your musical creations!

How to edit subtunes and sound effects:
---------------------------------------------------
The main riff is the first 8 patterns and starts at 000.
Subtune 1 starts at 045 and plays when you push the stick left in the game.
If the stick is held, pattern 045 repeats as a sound effect, when released the subtune plays.
Subtune 2 starts at 075 and plays when you push the stick right in the game.
Subtune 3 starts at 160 and plays when you push the stick up in the game.
Subtune 4 starts at 230 and plays when you push the stick down in the game.

Saving your new soundtrack:
If you have an Action Replay or other flashcart that can take a snapshot you can save the game with the new music and sound Fx you have written, or created alogorithmically.
Your new image will start up with the new music and Fx in place!
Another indirect method is to edit the chiptune patterns in the BASIC program listing to match the C64 Editor screens and reassemble it (see end of workstage).

This method allows the Commodore 64 to be used as a development tool to create new music for the Atari 2600 as well.

Playing Ring Raiders:
-------------------------
Ring Raiders is like Star Raiders except you can control your Phonton Torpedoes.
The game is also inspired by Star Ship on the VCS and Battle Sphere Gold on the Jaguar
Protect the Rings of Saturn! :)
How high can you score in 5 minutes? Hi score is captured with a green flash.