[Color Computer] [Coco] new CoCo games
James Diffendaffer
jdiffendaffer at yahoo.com
Sun May 14 04:36:38 EDT 2006
New games are always welcome.
Anyone looking for assembly source code...
You can find some sample code for using the CoCoDOS calls on a Dragon
page. They also have some cassette I/O source. Just check the ROM
I/O vectors to make sure the calls are at the proper address if you
use any Dragon code.
The source code for a few CoCo adventures (names escape me... Calixto
Island???) have code for setting up the old CoCo screen, printing text
on the graphics screen... stuff like that.
I downloaded a line drawing routine from somewhere but haven't done
anything with it yet.
I have several random number generators. One was already 6809 code
and the other two are ports I made from the Z80 and 6502. I need to
run a test to see which offeres the best random numbers without being
too slow. The shortest one from the 6502 is fast but I doubt it's
very random do to it's simplicity. The 6809 version required little
change. The one from the Z80 also had a 6502 version but the port
wasn't very fast... it used several registers and a slow loop. On my
port I unrolled the loop and optimized the logic to where it's still
very fast and should be pretty random. I haven't really looked at the
one I downloaded yet. I'll come back to this and test them later.
I grabbed all that assembly code so I could build a library of
routines to use from C. Most just need the C stack handling to be
able to call them. I also wanted to port the libs to other machines
so the games could be portable from one 6847 based machine to another.
Just recompile on another machine. I thought releasing those libs
would also cause some people on other machines to use them and
possibly have their code portable to the coco. That's the theory
anyway. It should also help out beginners.
Any contributions to this effort would be welcomed.
Since GCC 3 is supposedly working now I plan on finishing the Scott
Adams and Infocom interpreters I had been working on. They are just
ports of existing code but would add several games while letting me
get a C development environment set up. One of the formats (can't
remember which... Infocom probably) also has a lot of new adventures
too. I'd have to see if the blorb(?something like that?) graphics on
later versions will work on any of the CoCo display modes.
Right now I'm working on an assembly test program that opens a text
file, reads it in and prints the contents to a graphics screen. I
wanted to test the DOS routines which will be part of the C I/O lib
eventually.
I was trying to use the Rainbow IDE to build it but I need to get the
build to work properly.
If GCC 3 *doesn't* work properly I'll have to spend some time on a C
compiler while I can. I have 3 partially completed 6809 compilers.
1. There's a SmallCP (Small C Plus) compiler that could actually run
on the coco. It is SmallC with support for floats, multi-dimmensioned
arrays, unions and structures so it's at least usable, but it's so
tied to the Z80 I'd have to rework a bunch of odd logic and the code
is poorly commented. It is an old style compiler, very dumb, has no
optimizer and uses K&R code format. I think the Z88dk compiler grew
out of this as well as A65 at one point.
2. GCC 4. I'd have to dig out the code but it was actually pretty
close. I had to verify the stack usage tracing was working properly
and then I could test it. I'm sure there was some stuff I missed
too... it's huge. It is a state of the art compiler but doesn't
target small CPUs well (uses software registers) and it is pretty
complex to modify. But it would also let us compile Fortran, Java,
C++, Ada, etc.
3. SDCC. I passed on this one before because it crashed while
compiling some of my code durring my testing but it's had some fixes
since and I've spent a little time on it recently. The register to
register, register to stack, stack to register, load and store
register sections are complete. I think test/branch section is
complete and some other stuff. It still has a way to go though. I've
also done some 6309 support though it's currently commented out. SDCC
is a decent modern design, it targets small CPUs well, allocates
registers, optimizes, is pretty well laid out and doesn't need the
nasty GCC environment in order to work. It's way easier to figure out
than GCC. It has been the easiest to work on by far and if I can
focus on it for a day or two it should be generating 6809 code. I'll
need to double check the stack useage tracing, it will need testing
and would still need peephole optimizations added but that can happen
once I see some code out of it. Even if GCC works I'll continue to
spend time on this one later.
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~->
Brought to you by the 6809, the 6803 and their cousins!
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ColorComputer/
<*> To unsubscribe from this group, send an email to:
ColorComputer-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the Coco
mailing list