For those who download Catalina 3.0 specifically for playing around with the C3, here is a quick tutorial to get you up and running ...
First, I suggest you compile Catalyst, as this is the easiest way to try out a few things. Note that under Windows you need both MinGW and MSYS installed to build Catalyst and all the Catalyst demo programs. If you don't want to do this yet, skip straight to building the utilities folder and you can instead load a program serially (using Payload).
To build Catalyst, open a command shell, go to the Catalina main directory (e.g. C:\Program Files\Catalina) and enter the commands:
This will build all the Catalyst binaries (to use the C3's TV display and keyboard by default) and put them all in catalyst\bin.
build_all C3 CACHED_4K FLASH
Note the parameters - C3 (obviously) then CACHED_4K to enable the cache and set its size to 4K, and FLASH to enable use of the SPI Flash chip as XMM RAM. All these parameters are required to run large XMM programs. You could run small ones without either cache or Flash support - but they would be slower, and also only use the 64kb SPI RAM, not the 1Mb SPI FLASH.
Then do two things:
1. Program Catalyst into the EEPROM of the C3. You can do this using Payload:
2. Copy all the files in the catalyst\bin directory to a mini SD card, insert the card it into the C3 and then reset the C3.
payload -e bin\catalyst.bin
You should be presented with the Catalyst 3.0 prompt on the C3. Lets try a command that uses SPI Flash - what about the vi text editor?
Enter the following command on the C3:
The screen will go blank for a few seconds while Catalyst programs the FLASH. Then vi should start and display the file CATALYST.TXT (the -s fmt=msdos parameter just tells vi the file uses MSDOS line termination).
vi -s fmt=msdos catalyst.txt
Next, you should compile the utilities folder specifically for the C3 (we will need these utilities to load XMM programs with Payload). For simplicity, we will use the same options we used when compiling Catalyst - that way, we will end up with binaries that can either be loaded serially, or copied to the SD Card and loaded with Catalyst).
Enter the following commands (on your PC, not on the C3!):
Next, you can go to the demos folder and compile a program. Let's try startrek.c. Again, we will (for convenience) use the same parameters (but note with catalina itself, you must specify -D before each one):
build_all C3 CACHED_4K FLASH
Then you can load the result using Payload (for Catalina 3.0):
catalina startrek.c -lc -lm -D LARGE -D C3 -D CACHED_4K -D FLASH
Or (for Catalina 3.0.1):
payload XMM startrek -t 4000
On the C3 you should see the opening screen of Super Star Trek. Note the first parameter must be XMM to first load the XMM program loader (i.e. XMM.binary, which we just built in the utilities folder). The -t 4000 parameter is required only if the 3.0.1 patch has not been applied - this tells payload to wait a bit longer than usual when loading, as the xmm loader needs to first erase the SPI Flash (which can take up to 14 seconds!). Catalina 3.0.1 does not erase the whole flash, it instead erases each 4k block just prior to programming it, so the longer timeout is not required.
payload XMM startrek
P.S. Wanna see something really clever? Straight after loading startrek, go back to the utilities folder and recompile it using the following commands:
Now you can load the Flash_Boot utility program.
build_all C3 CACHED_4K FLASH HIRES_VGA
Now you can play the same game - but this time using the VGA display on the C3! You don't need to recompile or even reload startrek because it is already stored in the Flash. We can do this because of Catalina's Hardware Abstraction Layer. All the drivers (like the TV or VGA driver) are loaded separately to the program. If you wanted to, you can now program the flash_boot utility into EEPROM, and execute startrek from FLASH automatically each time you boot the C3.