Page 1 of 1
PC6001A - make cartridge?
Posted: Wed Mar 01, 2017 7:27 pm
by alank2
Hi everyone,
I've been able to compile a C project into a .CAS file and load it on an emulator successfully. I figured out that cartridges begin at 0x4000 I believe, how can I tell z88 to compile it for a cartridge without any basic loader on it?
Also, I can't get the new library to work on the pc6001 at all, is it not supported/finished yet?
Thanks,
Alan
Posted: Wed Mar 01, 2017 8:06 pm
by alvin
alank2 wrote:I've been able to compile a C project into a .CAS file and load it on an emulator successfully. I figured out that cartridges begin at 0x4000 I believe, how can I tell z88 to compile it for a cartridge without any basic loader on it?
I can see something in there about "ROM" if you compile with "-startup=4" and '-Cz"-mode 4"' (this latter option is in conjunction with -create-app). However it doesn't look set up quite correctly to me since a rom target also has to define where the ram starts.
What is needed is an update to the pc6001's crt to make it aware of a rom option and an update to its config file to use "appmake +rom" to generate a rom file instead of "appmake +nec" that makes the .cas file.
I think stefano made that target so maybe he can comment.
Also, I can't get the new library to work on the pc6001 at all, is it not supported/finished yet?
The set of targets supported by the classic and the new c libraries are independent.
The new c library currently supports: +cpm (no disk), +rc2014, +sms, +z80 (aka embedded), +z180 and +zx. You can use the generic z80 target (+z80 -
https://www.z88dk.org/wiki/doku.php?id= ... t_embedded ) to compile for any z80 machine but of course that means no target-specific functionality built in like printf, scanf, disk, graphics etc.
Posted: Wed Mar 01, 2017 9:33 pm
by alank2
Thanks Alvin; that clears up some things about the new library for sure! The PC-6001A was my first computer (I think I was 12 at the time) way back when...
Posted: Thu Mar 02, 2017 10:00 pm
by stefano
At the time I worked on that port the ROMable libraries had to be specifically adapted. Now it is much easier and lots of work is already done. I will try something. What is the expected cartridge size and position?
Posted: Thu Mar 02, 2017 10:04 pm
by alank2
I think the cartridges can be up to 16K and from what I could find, it loads cartridges at 0x4000. Thanks!!!!
Posted: Sat Mar 04, 2017 10:09 pm
by stefano
Thanks to the big efforts by Alvin, Dominic and (especially) Paulo a good part of the classic library can be used in a ROM.
I bound the components rightly and now some of the text and graphics programs can be put in a ROM using the classic z88dk mode (new option is "-subtype=rom).
If everything goes well tonight, after getting the latest z88dk build you can test the programs on VirtualNECTrek, just remember to force a hard reset to start the ROM.
To create a real ROM, the following extra options can help:
(128kbit EPROM chip)
-Cz--romsize -Cz--ihex -Cz16384
(2 x 64kbit EPROMs, hex format is not supported)
-Cz--romsize -Cz16384 -Cz--chipsize -Cz8192
Posted: Sun Mar 05, 2017 1:58 am
by alvin
stefano wrote:To create a real ROM, the following extra options can help:
(128kbit EPROM chip)
-Cz--romsize -Cz--ihex -Cz16384
(2 x 64kbit EPROMs, hex format is not supported)
-Cz--romsize -Cz16384 -Cz--chipsize -Cz8192
Good news.
I'll just mention that you can now quote a long list of arguments to appmake like this:
-Cz"--romsize 16384 --ihex"
(notice in the first example above the 16384 argument is mistakenly out of sequence)
-Cz"--romsize 16384 --chipsize 8192"
It makes it a bit easier to read and type.
Posted: Sun Mar 05, 2017 12:37 pm
by stefano
oops.. I shouldn't revise my posts just before sending them, I always insert "bugs"
Thanks for the appmake hint, I missed that one ! Putsprite is not working in ROM mode, there is a generic variant failing too, I suspect it is connected to the way I'm passing the sprite graphics, perhaps I should experiment a bit more with the "const" directive.
Posted: Sun Mar 05, 2017 9:12 pm
by stefano
Posted: Mon Mar 06, 2017 1:20 am
by alank2
Thanks guys; this works perfectly!!!!
Posted: Mon Mar 06, 2017 10:39 am
by stefano
You're welcome, please keep posting and share your experiments/results in the forum