Hi!
I am developing in ANSI C the "universal" multi-system 8-bit game CROSS CHASE for (nearly) all 8 computers including the CPC series.
I am NOT using BASIC. I may use some Assembly but I would prefer to do everything in C.
I am using Z88DK and CC65. Z88DK is my choice for Z80 because it supports all other Z80 targets.
I need to understand how to redefine characters in 320x200 mode (which is the mode I am using for the game).
You find binaries and source code at
https://github.com/Fabrizio-Caruso/CROSS-CHASE/releases
Fabrizio
(https://github.com/Fabrizio-Caruso/CROSS-CHASE/releases)
Fabrizio,
You cannot use C on its own.
You would need to write a wrapper in C which calls the required OS routine to re-define characters.
rpalmer
The firmware routines you want are below (the table is sized to fit all the chars from the provided start char through to 255, and it copies over the ROM definitions, so don't just call it on a predefined table):
&BBA8 TXT SET MATRIX
Action: Installs a matrix for a user-defined character
Entry: A contains the character which is being defined and HL
contains the address of the matrix to be used
Exit: If the character is user-definable then Carry is true;
otherwise Carry is false, and no action is taken; in
both cases AF, BC, DE and HL are corrupt, and all other
registers are preserved
&BBAB TXT SET M TABLE
Action: Sets the address of a user-defined matrix table
Entry: DE is the first character in the table and HL is the
table's address (in the central 32K of RAM)
Exit: If there are no existing tables then Carry is false,
and A and HL are both corrupt; otherwise Carry is true,
A is the first character and HL is the table's address;
in both cases BC, DE and the other flags are corrupt