Catalina Large Guide

Home Up 

"Large" Example for SuperQuad or Rampage with CodeBlocks in 6 Steps:

Open the CodeBlocks Project
Set the Build Options
Replace and/or edit the target files
Build the Project
Build the XMM Tools
Download the program and run it
bullet

Guide to running a "LARGE" example programs using RamPage and CodeBlocks with output to High Resolution VGA and SD and keyboard support

bullet

In the Install Guide, we didn't actually use SuperQuad or RamPage because we ran a "tiny" example program. 

bullet

In the FlashPoint Catalina Guide, we ran the "small" version of Super Star Trek with PC serial terminal output.

bullet

In this example, we're going to build and run the "LARGE" version of Super Star Trek (much better :) with VGA output and keyboard and SD card support. 

bullet
Note that Catalina can automatically include support for keyboard, mouse, SD card and other systems through the "Build Options".
bullet

Requirements:  This guide requires a RamPage memory module (SuperQuad does not support "large" mode).  Also, this guide assumes you have VGA and SD card on your system.  However, it is easy to remove VGA and SD card requirements through the "Build Options" described later.

bullet

There are just six things we need to do (just as with the "small" example):

bullet
Open the workspace containing the "LARGE" Super Star Trek example.
bullet
Set the "Build Options" to select our FlashPoint module.
bullet
Edit the FlashPoint target files "FlashPoint_DEF.inc" and "FlashPoint_CFG.inc" so Catalina knows things such as which pins we are using for FlashPoint, TV, VGA, SD and other devices that may be on your particular Propeller board.
bullet
Build Super Star Trek.
bullet
"Build XMM Tools".
bullet
Download and run the program.
bullet

Open the workspace file with the "LARGE" Super Star Trek example project.

bullet

As in the install guide, do "File->Open" and scroll to the bottom to find "catalyst_demos.workspace" in e.g., the "C:\Program Files (x86)\Catalina\codeblocks" folder and open it. 

bullet

Double-click on "sst" and to activate it and expand the tree to reveal the C program.  You should see this on the left side:

bullet
  
bullet

Set the "Build Options" to select our FlashPoint module.

bullet

As in the install guide, right-click on "sst" project in the left panel and select "Build Options..." from the pop-up menu (or use the menu and select "Project->Build Options..." making sure the "sst" project in this workspace is activated and shows in bold font in the left panel).

bullet

For this example, we'll set all our build options in the "target" ("Release") branch of the tree control in the left pane of the Build Options menu, instead of the project "sst", the root of the tree control. 

bullet

But first, select the project build options by selecting "sst", the root of the tree control in the left pane.  Unselect everything there:  "libcx", "libma", "LARGE", "Set memory size", "Disable mouse driver" and "Clock driver".

bullet

Now, go back to the "Release" branch and select these options:

bullet
RAMPAGE
bullet
libcx
bullet
libma
bullet
LARGE
bullet
1K cache
bullet
FLASH loader
bullet
VGA (High Resolution)       
bullet
Disable mouse driver
bullet
Clock driver

  bullet

Note:  In some cases you might want to use the "Set Memory Size" build option to warn you if you've exceeded available memory.  If you go over to the "Custom Variables" tab, you'll see the MEM_SIZE variable is 512k, which is enough for these build options.

  bullet

Also, go up to the "Policy:" drop list and select "Use target options only".  That may help us from making a mistake by ignoring any build options we may left selected for the project. It should now look like this:

bullet

bullet

Edit the FlashPoint target files "FlashPoint_DEF.inc" and "FlashPoint_CFG.inc"

bullet

We need to tell Catalina which pins we are using for RamPage before we build anything.

bullet

Also, we need to define our pins for VGA, keyboard, and SD card if we want to use them.

bullet

Unfortunately, the files that come with Catalina are specifically for the C3 board, which needs a lot of special settings.

bullet

So, we'll provide some more streamlined examples here for you to replace these files with:

bullet
These files should be in one of these two places, depending on your Windows version:
bullet
C:\Program Files (x86)\Catalina\target
bullet
C:\Program Files\Catalina\target 
bullet

Download replacement "FlashPoint_DEF.inc" and "FlashPoint_CFG.inc" files here

bullet
These settings are those typically used by the Parallax Demo board with added SD card and other boards like the Propeller Platform with SD board.  However, I'm going to use a PropBox board because it has VGA, keyboard, and SD connectors all included.  But, the SD card is one pins 4..7 instead of 0..3 as listed in the FlashPoint_DEF.inc file above (and also different pin order).  So, I've made this simple change in FlashPoint_DEF.inc:
bullet

SD_DO_PIN = 4'0 ' PIN (FLASHPOINT)

SD_CLK_PIN = 5'1 ' PIN (FLASHPOINT)

SD_DI_PIN = 7'2 ' PIN (FLASHPOINT)

SD_CS_PIN = 6'3

  bullet

Also, we're using P8..P15 and not using Prop pins to provide power so I've changed these lines:

 

' RAMPAGE QUAD SPI RAM Definitions (NOTE you also need to set the symbols

' defined below these pin definitions to appropriate values):

'

QSPI_VDD = -1'6 ' PIN (RAMPAGE) - see below to enable

QSPI_CEN = 8'7 ' PIN (RAMPAGE)

QSPI_SCK = 9'8 ' PIN (RAMPAGE)

QSPI_SIO3 = 13'12 ' PIN (RAMPAGE) \

QSPI_SIO2 = 12'11 ' PIN (RAMPAGE) | MUST BE CONTIGUOUS

QSPI_SIO1 = 11'10 ' PIN (RAMPAGE) | (and see below)

QSPI_SIO0 = 10'9 ' PIN (RAMPAGE) /

QSPI_RSCK = 14'13 ' PIN (RAMPAGE)

QSPI_RCEN = 15'14 ' PIN (RAMPAGE)

QSPI_VSS = -1'15 ' PIN (RAMPAGE) - see below to enable

SSPI_SI = QSPI_SIO0 ' PIN (RAMPAGE)

SSPI_SO = QSPI_SIO1 ' PIN (RAMPAGE)

'

'

' Define this to enable applying power to the QSPI_VDD & QSPI_VSS Pins

' (i.e. if they are connected to Propeller pins, and not directly to the

' appropriate power rails):

'

'#define QUAD_POWER_PINS  (this line commented out because not using pins for power)

 

  bullet

Build Super Star Trek

bullet

Now that we've set our build options, we're ready to compile the code that will get sent to the Propeller to run.

bullet

Simply select "Build->Build" from the menu or right-click on the project and "Build".   Look down at the "Build Log" window at the bottom of CodeBlocks and you should see this when it's done:

bullet

bullet

Note:  The file is big, but consider that it basically includes the whole underlying OS with the program... 

bullet

Build the XMM Tools

bullet

This step is a little tricky, but if you make a mistake the first time, no harm done, just do it again...

bullet

Here we basically describe the underlying OS that our program will run under.

bullet

From the CodeBlocks menu, select "Tools->Build XMM Utilities"

bullet

A DOS windows should show up like this:

bullet

   

bullet
Type in "RAMPAGE" as shown above.
bullet
Note this program is CASE SENSITIVE, so be sure to type everything in UPPER CASE.
bullet

Hit your Enter key to be asked about using Flash:

bullet

bullet
Enter "Y" here because SRAM is not large enough for this program and we need to use both Flash and SRAM. 
bullet

Hit your Enter key to see our cache size options:

bullet

bullet
Enter in "1" as shown above.
bullet

Hit Enter again to see the final options:

bullet

 

bullet
For this example, we are using High Resolution VGA, SD and the synthetic real-time clock, so enter them in as shown above.
bullet

Hit Enter again to see the result:

bullet

bullet

Hit enter one last time to close this window. 

bullet

Download and run the program.

bullet

Now we're all set to download to the Propeller and run the code from our FlashPoint memory module.

bullet

From the CodeBlocks menu, select "Tools->Download to XMM RAM"

bullet

Now, you have to be a bit patient because it takes about 90 seconds to download over the serial connection.  If you have a PropPlug, you'll see the lights flashing during the download.   

bullet

Note:  This download can seem painfully slow.  There is another way to load, the "SD loader" which is much faster.

bullet

When finished, you should see this at the bottom of CodeBlocks:

bullet

bullet
bullet

Now, look at your VGA monitor and you should see this (with questionable color scheme):

bullet

bullet

If the download fails, check these 3 things and try again:

bullet

Your build options

bullet

Your pin settings in the Flashpoint_DEF.inc file in the target folder

bullet

You selections when you "Build XMM Tools". 

bullet

If you have the SD installed, you should be able to save and load game states. 

bullet

Also, copy of the sst.doc file (from the project folder) to the SD card access in-game help. 

bullet

Congratulations!  You've completed this guide.