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
PC6001A - make cartridge?
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.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?
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.
The set of targets supported by the classic and the new c libraries are independent.Also, I can't get the new library to work on the pc6001 at all, is it not supported/finished yet?
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.
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
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
Good news.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
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.
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.

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.
Wiki updated accordingly:
https://www.z88dk.org/wiki/doku.php?id=platform:pc6001
https://www.z88dk.org/wiki/doku.php?id=platform:pc6001