I have never used Catalina or heard of it before. I have always used SimpleIDE.
How compatible is Catalina to SimpleIDE? Is all the Andy code in it?
Mike
I don't know what the "Andy code" is, but Catalina was originally a C compiler for the P1 - the first! - which came with an extensive library of "plugins" to support various external peripherals, and was the first to support many of the various memory models we had to use on the P1 to support programs of any significant size (CMM, LMM, XMM etc).
It hadn't occurred to me that Catalina has been around for 10 years, but looking at some of the early dates, I realize I started work on it 12 years ago!
You are correct. I was already working on Catalina (I started in 2006) when I found out about the ImageCraft compiler. I did have some correspondence with the ImageCraft people - I can't remember all the details, but I believe it was about them claiming to be ANSI compliant when they were not. In any case, the end result was that I decided to carry on with Catalina.
So, you can amend my previous post to "the first ANSI-compliant C compiler"
FWIW I used Catalina in a commercial P1 product. While I didn’t actually write the C part, i wrote the interfaces and spin & pasm code. There were 3 x P1’s used in the product. The Catalina handled huge databases of stars, nebulae etc on an SD card, and would point a telescope at the selected object. The interface to Catalina was a pleasure to program. The C was loded and executed from external 512KB SRAM using my RamBlade design.
Ross was extremely helpful so thanks Ross
And, nice to see you’re back
Catalina now generates native code for the P2, and now also has its first supported plugin for the P2_EVAL board - a serial interface, based on msrobots "cogserial". No more simply blinking LEDS!
To celebrate, attached is a blast from the past ...
... Super Star Trek, running natively on the P2!
You can play the game using the Parallax Serial Terminal. Set your baud rate to 230400, and your terminal preferences to ignore linefeeds (ascii 10). The game will wait for you to press a key before starting.
The code generator is still a long way from optimal, but it is now using many of the new P2 instructions.
"SUPER STARTREK - MAY 16, 1978 - REQUIRES 24K MEMORY"
It looks like this was originally written in BASIC(?) for a DEC machine?
That's right. I have fond memories of the original BASIC game. Someone (not me!) converted it to C in 1996. I always thought that with just a tiny bit more effort I could get it running on the P1, but I never quite made it (it ran, but it required a P1 with some form of external RAM).
But now on the P2, we can all boldly go where no man (or woman) has gone before!
Catalina now generates native code for the P2, and now also has its first supported plugin for the P2_EVAL board - a serial interface, based on msrobots "cogserial". No more simply blinking LEDS!
To celebrate, attached is a blast from the past ...
... Super Star Trek, running natively on the P2!
Cool . Looks like you're making great progress, Ross!
"SUPER STARTREK - MAY 16, 1978 - REQUIRES 24K MEMORY"
It looks like this was originally written in BASIC(?) for a DEC machine?
That's right. I have fond memories of the original BASIC game. Someone (not me!) converted it to C in 1996. I always thought that with just a tiny bit more effort I could get it running on the P1, but I never quite made it (it ran, but it required a P1 with some form of external RAM).
But now on the P2, we can all boldly go where no man (or woman) has gone before!
That reminds me that I need to restore the Catalina support in spin2cpp (it's still there, but likely bit-rotted while Catalina was on hiatus). fastspin/spin2cpp can compile BASIC, including old style Microsoft BASIC. With a bit of work I should be able to make spin2cpp into a basic2cpp, since the BASIC parser and C output code is all present, just not really tested.
fastspin/spin2cpp can compile BASIC, including old style Microsoft BASIC. With a bit of work I should be able to make spin2cpp into a basic2cpp, since the BASIC parser and C output code is all present, just not really tested.
Blast from the past!
I recall spending hours(days?) on a DEC PDP/11 playing this game.
Me too! I wasted boxes of green-bar paper using a DEC LA36 terminal What else was I to do on graveyard shift, while the PDP 11/04s we used were idle? And then, I got a copy of David Ahl's "BASIC Computer Games" text and that started my career in software!
There are a bunch of classic BASIC computer games from Ahl's book at classicbasicgames.org/. Many of these can be compiled with fastspin to be played on P1 or P2, although sometimes a little tweaking is required. Often just adding
#include "classic.bi"
to the start of the file is enough to get it going, with some clean-up on the PRINT statements to make it prettier.
Getting back to Catalina, I certainly could support making spin2cpp (fastspin's big brother) output Catalina compatible C code for these kinds of BASIC programs. The question is, would anyone use it?
There are a bunch of classic BASIC computer games from Ahl's book at classicbasicgames.org/. Many of these can be compiled with fastspin to be played on P1 or P2, although sometimes a little tweaking is required. Often just adding
#include "classic.bi"
to the start of the file is enough to get it going, with some clean-up on the PRINT statements to make it prettier.
Getting back to Catalina, I certainly could support making spin2cpp (fastspin's big brother) output Catalina compatible C code for these kinds of BASIC programs. The question is, would anyone use it?
There are a bunch of classic BASIC computer games from Ahl's book at classicbasicgames.org/. Many of these can be compiled with fastspin to be played on P1 or P2, although sometimes a little tweaking is required. Often just adding
#include "classic.bi"
to the start of the file is enough to get it going, with some clean-up on the PRINT statements to make it prettier.
Getting back to Catalina, I certainly could support making spin2cpp (fastspin's big brother) output Catalina compatible C code for these kinds of BASIC programs. The question is, would anyone use it?
Does "Hunt the Wumpus" work?
classicbasicgames.org doesn't seem to have that. I found a version elsewhere online, but fastspin doesn't handle
DEF FNA(X)=INT(X+N)
for function definitions yet. There are several alternatives of course (fastspin already has multiple ways to define functions), so with a bit of work I think it'd be easy to port. Care to give it a try?
Getting back to Catalina, I certainly could support making spin2cpp (fastspin's big brother) output Catalina compatible C code for these kinds of BASIC programs. The question is, would anyone use it?
I don't think anyone would object
I personally don't write new code in BASIC, but being able to use existing BASIC code could generate interest in running retro games (retro gaming appears to have a following... i.e. HackaDay articles on retro gaming & CPUs show up quite often).
I may have missed it somewhere - but does the P2 Boot ROM have the sine, log and anti-log tables that used to be in the P1 ROM? I used them in Catalina's floating point support libraries.
Failing that, does anyone have a dump of these tables as they existed on the P1? I can simply load them into Hub RAM on the P2.
Rather than use a lookup table you can use cordic instructions directly; you'll get more accuracy that way. Use qrotate for sin/cos, qexp for exp, qlog for log, and qsqrt for sqrt.
Comments
How compatible is Catalina to SimpleIDE? Is all the Andy code in it?
Mike
Catalina has been around for over 10 years. It's been a while as Ross has taken some time off to pursue another endeavour, but it seems with the impending P2, he is back with his software magic. Here is a thread from 10 years ago:
http://forums.parallax.com/discussion/116370/catalina-2-6-a-free-c-compiler-for-the-propeller-the-final-frontier/p1
I don't know what the "Andy code" is, but Catalina was originally a C compiler for the P1 - the first! - which came with an extensive library of "plugins" to support various external peripherals, and was the first to support many of the various memory models we had to use on the P1 to support programs of any significant size (CMM, LMM, XMM etc).
It hadn't occurred to me that Catalina has been around for 10 years, but looking at some of the early dates, I realize I started work on it 12 years ago!
Makes me feel old
P.S. Here is the link to the last P1 release - https://forums.parallax.com/discussion/153750/catalina-3-13-2-smaller-and-faster-better-ide
This is it: https://imagecraft.com/blog/2008/08/parallax-propeller-and-the-propeller-c-compiler/
You are correct. I was already working on Catalina (I started in 2006) when I found out about the ImageCraft compiler. I did have some correspondence with the ImageCraft people - I can't remember all the details, but I believe it was about them claiming to be ANSI compliant when they were not. In any case, the end result was that I decided to carry on with Catalina.
So, you can amend my previous post to "the first ANSI-compliant C compiler"
Prop II really needs good C/C++ compilers. Wasn't really necessary for P1. Glad you're back on this!
Ross was extremely helpful so thanks Ross
And, nice to see you’re back
Mike
I don't remember that one. But ok - amend my post above to "the first native ANSI-compliant C compiler"
To celebrate, attached is a blast from the past ...
... Super Star Trek, running natively on the P2!
You can play the game using the Parallax Serial Terminal. Set your baud rate to 230400, and your terminal preferences to ignore linefeeds (ascii 10). The game will wait for you to press a key before starting.
The code generator is still a long way from optimal, but it is now using many of the new P2 instructions.
"SUPER STARTREK - MAY 16, 1978 - REQUIRES 24K MEMORY"
It looks like this was originally written in BASIC(?) for a DEC machine?
That's right. I have fond memories of the original BASIC game. Someone (not me!) converted it to C in 1996. I always thought that with just a tiny bit more effort I could get it running on the P1, but I never quite made it (it ran, but it required a P1 with some form of external RAM).
But now on the P2, we can all boldly go where no man (or woman) has gone before!
Cool . Looks like you're making great progress, Ross!
I remember playing that game in junior high on TRS-80...
That reminds me that I need to restore the Catalina support in spin2cpp (it's still there, but likely bit-rotted while Catalina was on hiatus). fastspin/spin2cpp can compile BASIC, including old style Microsoft BASIC. With a bit of work I should be able to make spin2cpp into a basic2cpp, since the BASIC parser and C output code is all present, just not really tested.
Now who's showing their age!
I recall spending hours(days?) on a DEC PDP/11 playing this game.
Me too! I wasted boxes of green-bar paper using a DEC LA36 terminal What else was I to do on graveyard shift, while the PDP 11/04s we used were idle? And then, I got a copy of David Ahl's "BASIC Computer Games" text and that started my career in software!
dgately
Getting back to Catalina, I certainly could support making spin2cpp (fastspin's big brother) output Catalina compatible C code for these kinds of BASIC programs. The question is, would anyone use it?
classicbasicgames.org doesn't seem to have that. I found a version elsewhere online, but fastspin doesn't handle for function definitions yet. There are several alternatives of course (fastspin already has multiple ways to define functions), so with a bit of work I think it'd be easy to port. Care to give it a try?
Mike
I personally don't write new code in BASIC, but being able to use existing BASIC code could generate interest in running retro games (retro gaming appears to have a following... i.e. HackaDay articles on retro gaming & CPUs show up quite often).
dgately
Failing that, does anyone have a dump of these tables as they existed on the P1? I can simply load them into Hub RAM on the P2.
Ok - found a copy. Thanks.
I think you can also calculate the Sine table using Cordic, if you want to save loading them ? (not sure about log / anti-log ?)
https://forums.parallax.com/discussion/169097/overlapping-cordic-commands-to-maximize-throughput