C4! (i.e. Catalina on the Credit Card Computer)

All,
The third update to Catalina 2.9 for the C3 is attached to this post. To install the update, just unzip it in the Catalina\target directory of your Catalina 2.9 installation (it will not work with earlier versions).
This latest update adds debugger support - both blackbox and blackcat now work with the C3, in all memory models (LMM, XMM SMALL, XMM LARGE). This update also includes the previous two updates:
You build and install Catalyst by going to the Catalina\Catalyst folder and typing:
Here are a few examples of using the test_suite.c demo program on the C3:

If you look carefully at this command (and if you uploaded the previous update for the C3) you'll note that I have updated all the C3 targets so that the mouse is now excluded by default. This saves a lot of typing! To include the mosue, instead exclude the keyboard (via the NO_KEYBOARD) option. Or exclude both by specifying both the NO_KEYBOARD and NO_MOUSE options.
So, now what about VGA?
Lets try using a PC terminal emulator instead of the local display and keyboard:
Now lets try executing a Catalina program from SPI RAM. Don't forget that first we have to compile the XMM loader for the C3 (it's located in the utilities folder):
Then again with XMM (LARGE) memory model:
Now, lets try out the latest features by trying a program that uses the SD Card. To try out the test_stdio_fs.c demo program:

To try out the debugger, use the example program in Catalina\demos\debug. Goto to this directory and type the follwing commands:
Note that the n specified in the -p option of the blackbox command must specify the port number your C3 is connected to - this will be printed out by the payload command.
Here's an updated summary of what's currently working and what's not:
===================================================
Working drivers : Keyboard, Mouse, TV (HiRes & LoRes), VGA (HiRes & LoRes), Clock, Float_A, Float_B, SD Card
Working HMI plugins: ALL (VGA, TV, PC, PROPTERMINAL)
Working Kernels: ALL (LMM - NORMAL, ALTERNATE & THREADED, XMM - SMALL & LARGE)
Working libraries: ALL (libc, libci, libgraphics, libthreads, libm, libma, libmb, libcx, libcix)
Not Working Yet: SPI Flash, A/D converter.
I'll update this thread as I fix some of the issues, and get all the C3 devices working. Then I'll update the full Catalina 2.9 release.
Ross.
The third update to Catalina 2.9 for the C3 is attached to this post. To install the update, just unzip it in the Catalina\target directory of your Catalina 2.9 installation (it will not work with earlier versions).
This latest update adds debugger support - both blackbox and blackcat now work with the C3, in all memory models (LMM, XMM SMALL, XMM LARGE). This update also includes the previous two updates:
- The second update added SD Card support - so not only Catalina, but also Catalyst can now run on the C3.
- The first updated added VGA support.
You build and install Catalyst by going to the Catalina\Catalyst folder and typing:
build_all C3 payload -e core/Catalyst.binaryThen copy all the other programs in the Catalina\Catalyst\bin file to your SD card.
Here are a few examples of using the test_suite.c demo program on the C3:
cd demos catalina -lci -test_suite.c -D C3 payload test_suiteIt works! TV output and keyboard input!

If you look carefully at this command (and if you uploaded the previous update for the C3) you'll note that I have updated all the C3 targets so that the mouse is now excluded by default. This saves a lot of typing! To include the mosue, instead exclude the keyboard (via the NO_KEYBOARD) option. Or exclude both by specifying both the NO_KEYBOARD and NO_MOUSE options.
So, now what about VGA?
catalina -lci test_suite.c -D C3 -D HIRES_VGA payload test_suiteIt works! VGA output and keyboard input!

Lets try using a PC terminal emulator instead of the local display and keyboard:
catalina -lci -test_suite.c -D C3 -D PC payload test_suiteIt works! Input & output using the Parallax Serial Terminal!

Now lets try executing a Catalina program from SPI RAM. Don't forget that first we have to compile the XMM loader for the C3 (it's located in the utilities folder):
cd ..\utilities build_all C3 cd ..\demosThen we can compile and load the program itself - first with the XMM (SMALL) memory model:
catalina -lci test_Suite.c -D C3 -D NO_MOUSE -x2 payload ..\utilities\XMM test_suiteIt works! Catalina executing code from SPI RAM with data in Hub RAM!

Then again with XMM (LARGE) memory model:
catalina -lci test_Suite.c -D C3 -D NO_MOUSE -x5 payload ..\utilities\XMM test_suiteIt works! Catalina executing code from SPI RAM with data in XMM RAM!

Now, lets try out the latest features by trying a program that uses the SD Card. To try out the test_stdio_fs.c demo program:
catalina test_stdio_fs.c -lcix -D C3 -M64k -x2 payload ..\utilities\XMM test_stdio_fsIt works! Catalina using the SD Card and the C stdio file system!

To try out the debugger, use the example program in Catalina\demos\debug. Goto to this directory and type the follwing commands:
build_all C3 payload ..\..\utilities\XMM example blackbox example -p[I][B]n[/B][/I]It works! Catalina using a source level debugger from the PC to the C3!

Note that the n specified in the -p option of the blackbox command must specify the port number your C3 is connected to - this will be printed out by the payload command.
Here's an updated summary of what's currently working and what's not:
===================================================
Working drivers : Keyboard, Mouse, TV (HiRes & LoRes), VGA (HiRes & LoRes), Clock, Float_A, Float_B, SD Card
Working HMI plugins: ALL (VGA, TV, PC, PROPTERMINAL)
Working Kernels: ALL (LMM - NORMAL, ALTERNATE & THREADED, XMM - SMALL & LARGE)
Working libraries: ALL (libc, libci, libgraphics, libthreads, libm, libma, libmb, libcx, libcix)
Not Working Yet: SPI Flash, A/D converter.
I'll update this thread as I fix some of the issues, and get all the C3 devices working. Then I'll update the full Catalina 2.9 release.
Ross.
Comments
/Ahle2
For my own purposes later I'm going to post the link back to the C3 manual http://forums.parallax.com/showthread.php?128711-Unleashing-the-C3-Book-Manual which among other things contains the schematic including the hardware enable circuit for VGA.
Keep those posts coming Ross!
Thanks for the info. For some reason it doesn't seem to work. Probably something stupid. I'll try again tomorrow.
Ross.
Maybe we should name the like C3.C for "C", C3.S for spin, C3.B for basic, etc. for applications and what their runtime is
Anyway, back to work on my NEXT propeller product -- muhhhahahahahaha
Andre'
Active Low
/Ahle2
I thought Andre must be doing something really clever with the basepin processing inside the VGA driver to enable his VGA display, and couldn't figure out why I couldn't reproduce it even when I copied his C3 code exactly. It seemed like he was just initializing the VGA display and then using it.
From his C3 test program ...
Simple, no? - No!. This morning it finally occurred to me to look a few lines further down in the same program - and there it is:
Simple - Yes!. I'll post updated Catalina VGA targets this evening.
Ross.
Attached to the top post of this thread is an interim update to Catalina 2.9 for the C3. To use this update, just unzip it into your Catalina\target directory. No need to rebuild Catalina - just recompile your C3 programs.
This file contains new target files that fix a couple of the issues with Catalina 2.9 on the C3:
- The VGA driver (and VGA HMI plugins) now work correctly (HiRes and LoRes)
- The XMM (LARGE) memory model now works correctly.
Next I'll tackle the SD Card. The SPI Flash RAM support will be last, as I'I need to find some extra space in the XMM Kernel to support that - but we'll get there!I'll keep the top post in this thread updated as I go.
Ross.
Andre'
I tend to do drivers as I need to use them myself - so now I'll have to think of a good application!
Ross.
You mean I just plug mains voltage into the A/D converter? Like this? .... PZZZT$#@%$#!%!!!
BTW, as a complete aside, lake Boga is full with the floods http://www.adelaidenow.com.au/news/breaking-news/swan-hill-prepares-for-flood-emergency/story-e6frea73-1225995079819 and I hope the Catalina museum is ok as it is right on the shore of the lake http://www.murrayriver.com.au/lake-boga-flying-boat-museum-980/
I just always think back to what started the entire computer revolution and it was BASIC running on the Apple, Atari, C64, and TRS-80. Everything was built in and we could write anything. Then as we got smarter, we could use ASM and write our own drivers and functions. But, a 10 year old could literally write a game on an Atari 800 in BASIC -- make that happen and people will really get into something.
Andre'
Such a driver would also work very well on the ASC!
A Catalina is a flying boat! It may be the safest place to be
The second update to Catalina 2.9 to add support for the C3 is attached to the first post of this thread. This update adds SD Card support - so not only Catalina, but also Catalyst can now run on the C3. It also removes the need to always specify the NO_MOUSE option when compiling programs for the C3.
More details, including examples, are given in the first post of this thread (and an example of using the SD card is given near the end of that post).
Ross.
Andre'
The third update to Catalina 2.9 for the C3 is attached to the first post of this thread. This update adds blackbox and blackcat debugger support.
More details, including examples, are given in the first post of this thread (and an example of using the debugger is given near the end of that post).
Ross
Just to tidy up this thread - Catalina 3.0 has now been released (see this thread) with full support for both the 64kb SPI RAM and the 1Mb SPI Flash available on the C3.
You can now execute code out of the SPI Flash, using the SPI RAM for data and the Hub RAM as stack space. You can automatically execute programs loaded into Flash at boot time.
You use the SPI Flash just like any other XMM RAM, with seamless integration into the Catalyst SD Card loader and the Payload serial loader.
There is also a caching XMM driver to speed up execution when using slow serial memory as XMM RAM.
Ross.