New Catalina External Memory Model - a TriBladeProp demo
RossH
Posts: 5,513
Enclosed is "Super Star Trek" for the Propeller - a classic Retro computer game in it's own right - but also a demo of the new Catalina External Memory Model.
To run this particular demo you need to have a TriBladeProp - but the full release of Catalina supporting TriBladeProp, Hydra and Hybrid is not far off.
The new Catalina memory model allows for programs with code, data and heap sizes up to 16Mb, and stack size up to 32k. On the Prop II the stack size will be expanded to 256kb, but even 32kb of stack space is enough to run quite large real-world programs.
The previous memory model (i.e. code size of up to 16Mb, but a combined data, heap and stack size of only 32kb) will remain supported - and is faster for smaller programs. And of course the orignal memory model (32kb combined code, data, heap and stack size) is still supported for those Propeller platforms with no XMM hardware (and is faster still!).
I was worried that the Catalina code generator would be embarrasingly inefficient, but compared to gcc I believe it actually stands up reasonably well. When Super Star Trek is compiled using gcc for X86 (and then stripped, to remove symbolic information), the program size is 130kb. When the same program is compiled using Catalina for the Propeller the program size is 310kb (the actual file size is 375kb, but 32kb of that is just empty space which I will eliminate before I release the 'official' version, and another 32kb is the XMM loader). Considering the inherent inefficiencies in running a compiled stack-based language on the Propeller at all, I'm quite happy that the Catalina/Propeller version comes in only around twice as large as the gcc/X86 version. Optimization is expected to improve this further over time.
All the game source code is provided. No changes to the original game are needed to compile the program under Catalina, but there are about 20 lines of platform specific code provided in the file 'catalina.c'.
The Propeller binary version of the game provided ('sst.bin') can only be run on a TriBladeProp (on blade #2), which must have 1Mb of XMM RAM and an SD card installed. To run the program, the files 'sst.bin' and 'sst.doc' should be copied to a micro SD card, and then the binary needs to be loaded using the Catalina Generic SD Card Loader (binary for this also provided).
If you would like to compare the catalina version with the gcc version, I have provided a simple batch file (' build_sst.bat') that will build the program using gcc - but a compiled version for Windows is also provided ('sst.exe')
Since the game expects a full size (i.e. 80 character) terminal, the Propeller version uses the PC as the screen and keyboard - you can use either the Parallax Serial Terminal, or PropTerminal running in normal terminal mode and set for 80 characters - or in fact any standard PC terminal emulator package.
The game also uses the SD Card during game play as a file system - this is used to hold the game on-line help file, and also to store and load saved games. Be aware that the file system access is quite slow, and it can take 10-15 seconds to display help information.
For more information about the game, see the file 'sst.doc'.
Happy Retro-Trekking!
Ross
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
To run this particular demo you need to have a TriBladeProp - but the full release of Catalina supporting TriBladeProp, Hydra and Hybrid is not far off.
The new Catalina memory model allows for programs with code, data and heap sizes up to 16Mb, and stack size up to 32k. On the Prop II the stack size will be expanded to 256kb, but even 32kb of stack space is enough to run quite large real-world programs.
The previous memory model (i.e. code size of up to 16Mb, but a combined data, heap and stack size of only 32kb) will remain supported - and is faster for smaller programs. And of course the orignal memory model (32kb combined code, data, heap and stack size) is still supported for those Propeller platforms with no XMM hardware (and is faster still!).
I was worried that the Catalina code generator would be embarrasingly inefficient, but compared to gcc I believe it actually stands up reasonably well. When Super Star Trek is compiled using gcc for X86 (and then stripped, to remove symbolic information), the program size is 130kb. When the same program is compiled using Catalina for the Propeller the program size is 310kb (the actual file size is 375kb, but 32kb of that is just empty space which I will eliminate before I release the 'official' version, and another 32kb is the XMM loader). Considering the inherent inefficiencies in running a compiled stack-based language on the Propeller at all, I'm quite happy that the Catalina/Propeller version comes in only around twice as large as the gcc/X86 version. Optimization is expected to improve this further over time.
All the game source code is provided. No changes to the original game are needed to compile the program under Catalina, but there are about 20 lines of platform specific code provided in the file 'catalina.c'.
The Propeller binary version of the game provided ('sst.bin') can only be run on a TriBladeProp (on blade #2), which must have 1Mb of XMM RAM and an SD card installed. To run the program, the files 'sst.bin' and 'sst.doc' should be copied to a micro SD card, and then the binary needs to be loaded using the Catalina Generic SD Card Loader (binary for this also provided).
If you would like to compare the catalina version with the gcc version, I have provided a simple batch file (' build_sst.bat') that will build the program using gcc - but a compiled version for Windows is also provided ('sst.exe')
Since the game expects a full size (i.e. 80 character) terminal, the Propeller version uses the PC as the screen and keyboard - you can use either the Parallax Serial Terminal, or PropTerminal running in normal terminal mode and set for 80 characters - or in fact any standard PC terminal emulator package.
The game also uses the SD Card during game play as a file system - this is used to hold the game on-line help file, and also to store and load saved games. Be aware that the file system access is quite slow, and it can take 10-15 seconds to display help information.
For more information about the game, see the file 'sst.doc'.
Happy Retro-Trekking!
Ross
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
Forgot to mention - Catalina can now compile itself, which means it can now run be run natively on the Propeller.
Unfortunately, the compiler requires 1.5Mb of XMM RAM. This is larger than any XMM hardware I currently have, so I cannot test it.
Also, given how slow the SD Card file system is, it may take a week to compile even a trivial "hello, world" type program. Does anyone have a hard disk drive hooked up to a Prop yet?
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
I remember when compiles of programs (not sytems) took 4 hours on average :-(
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Only 4 hours? - Boy, you had it easy!
I remember the days of overnight batch compiles using punch cards.
I wonder if we could connect a punch card reader to the Prop? Now THAT would be cool!
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Cluso, sounds like we need a TriBladeProp++ with let's say 8Mb RAM for self hosting development in C.
Personally I'd love to have a paper tape punch/reader hooked up to the Prop or an old ASR-33 Teletype.
Those card punch stations were huge, I don't think her indoors would tolerate it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Don't get too excited - there's still the small matter of a native PASM compiler. Catalina currently uses mpark's brilliant Homespun compiler - this does sterling service compiling PASM source files that are now exceeding 5Mb per file, and it quite happily generates executables now approaching 500kb. I haven't really experimented with Sphinx, but I don't think it is quite up to this level yet!
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
One customer had resident routines which took 3 days to compile, so they could only be run over long weekends.
Fortunately the minis I worked on rarely had card punches or readers so my exposure to them was minimal
I interfaced a cheap paper tape punch to the mini in 1979 for automatically punching telex purchase orders. The chad used to make great confetti - LOL
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 9/9/2009 11:09:14 AM GMT
Still I've always maintained that there must be a point beyond which pushing the limits of our beloved micro-controller makes no practical, economic, technical or any other kind of sense. The Prop is designed to sequence Christmas tree lamps not run Google search. If you see what I mean.
It is possible we passed that point some time ago [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
EXTREMELY COOL!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
One Morpheus and four Mem+'s can do that.
Actually, if you don't need the memory mapped I/O capability, 8MB is possible.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Using just one Mem+ I have 2.5MB of memory available, should be enough to run Catalina from what you posted... and I can shave LAS down to run in that. Given that I have quite a few Mem+'s I could assemble a 7.5MB stack which certainly should do it!
Drooling already....
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller