Added leftovers of maplib poc test
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -1s

This commit is contained in:
Willem Cazander 2025-04-27 17:15:35 +02:00
parent 5b809ee5bd
commit 78b2f24aed
4 changed files with 136 additions and 0 deletions

View file

@ -8,6 +8,7 @@ $(call mb-make-call,mb-doc-variable-deep,MB_SDCC_FLAG_CPU,The SDCC cpu target op
MB_SDCC_FLAG_LD ?= --nostdinc MB_SDCC_FLAG_LD ?= --nostdinc
$(call mb-make-call,mb-doc-variable-deep,MB_SDCC_FLAG_LD,The SDCC linker option.) $(call mb-make-call,mb-doc-variable-deep,MB_SDCC_FLAG_LD,The SDCC linker option.)
# TODO: add maplib (auto?) support; -I$(MB_@BASEPATH)maplib/sdcc/
MB_SDCC_ASZ80_FLAGS ?= -g -l -c -o MB_SDCC_ASZ80_FLAGS ?= -g -l -c -o
$(call mb-make-call,mb-doc-variable-deep,MB_SDCC_ASZ80_FLAGS,The SDCC z80 asm compiler flags.) $(call mb-make-call,mb-doc-variable-deep,MB_SDCC_ASZ80_FLAGS,The SDCC z80 asm compiler flags.)

12
src/maplib/0module.mk Normal file
View file

@ -0,0 +1,12 @@
MAPLIB_SRC := $(call mb-make-call,mb-make-module-path-src,$(PATH_SRC))
MAPLIB_BIN := $(call mb-make-call,mb-make-module-path-bin,$(PATH_SRC),$(PATH_BIN))
# TODO:
# finish XML data
# write XSLT per compiler and/or language supported
# add xsltproc tooling functions
# add generator output flow
# add release-local to copy to lib/maplib/sdcc/mainrom.asm
# etc

51
src/maplib/mapbios.xml Normal file
View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<root:maplib>
<group name="msxbios1">
<const name="STARTUP" address="0000">
<function>Tests RAM and sets RAM slot for the system</function>
<registers>ALL</registers>
<remark>After this, a jump must be made to INIT, for further initialisation.</remark>
</const>
<const name="SYNCHR" address="0008">
<function>Tests whether the character of (HL) is the specified character if not, it generates SYNTAX ERROR, otherwise it goes to CHRGTR (#0010)</function>
<input>Set the character to be tested in (HL) and the character to be compared next to RST instruction which calls this routine (inline parameter)</input>
<output>HL is increased by one and A receives (HL), When the tested character is numerical, the carry flag is set the end of the statement (00h or 3Ah) causes</output>
<registers>AF, HL</registers>
</const>
<const name="RDSLT" address="000C">
<function>Reads the value of an address in another slot</function>
<input>
A - ExxxSSPP Slot-ID
│ ││└┴─ Primary slot number (00-11)
│ └┴─── Secondary slot number (00-11)
└───────────── Expanded slot (0 = no, 1 = yes)
HL - Address to read</input>
<output>A - Contains the value of the read address</output>
<registers>AF, C, DE</registers>
<remark>This routine turns off the interupt, but won't turn it on again</remark>
</const>
<const name="" address="">
<function></function>
<input></input>
<output></output>
<registers></registers>
<remark></remark>
</const>
<const name="" address="">
<function></function>
<input></input>
<output></output>
<registers></registers>
<remark></remark>
</const>
</group>
<group name="msxbios2">
<const name="" address="">
<function></function>
<input></input>
<output></output>
<registers></registers>
<remark></remark>
</const>
</group>
</root:maplib>

72
src/maplib/mapvars.xml Normal file
View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<root:maplib>
<group name="mainrom">
<const name="CGTABL" address="0004">
<length>2</length>
<remark>Base address of the MSX character set in ROM.</remark>
</const>
<const name="VDP.DR" address="0006">
<length>1</length>
<remark>Base port address for VDP data read.</remark>
</const>
<const name="VDP.DW" address="0007">
<length>1</length>
<remark>Base port address for VDP data write.</remark>
</const>
<const name="ISCSDFIF" address="002B">
<length>1</length>
<remark>0-3 = Character set, 4-6 = Date format, 7 = 60/50hz</remark>
</const>
<const name="IBASKEYB" address="002B">
<length>1</length>
<remark>0-3 = Keyboard type, 4-7 = Basic version</remark>
</const>
<const name="IMSXVERN" address="002D">
<length>1</length>
<remark>MSX version number</remark>
</const>
<const name="IMSXMIDI" address="002E">
<length>1</length>
<remark>MSX-MIDI is present internally (MSX turbo R only)</remark>
</const>
<const name="CHAR_16" address="0034">
<length>4</length>
<remark>Default KANJI range. Copied to KANJTABLE by the DiskBIOS on boot.</remark>
</const>
</group>
<group name="diskrom">
<const name="KANJTABLE" address="F30F">
<length>4</length>
<remark>Two pairs of limits for the first bytes of Shift-JIS characters.</remark>
</const>
<const name="RAMAD0" address="F341">
<length>1</length>
<remark>Slot address of RAM in page 0 (DOS)</remark>
</const>
<const name="RAMAD1" address="F342">
<length>1</length>
<remark>Slot address of RAM in page 1 (DOS)</remark>
</const>
<const name="RAMAD2" address="F343">
<length>1</length>
<remark>Slot address of RAM in page 2 (DOS/BASIC)</remark>
</const>
<const name="RAMAD3" address="F344">
<length>1</length>
<remark>Slot address of RAM in page 3 (DOS/BASIC)</remark>
</const>
<const name="MASTER" address="F348">
<length>1</length>
<remark>Main DiskROM slot address</remark>
</const>
</group>
<group name="msxbios2">
<const name="" address="">
<function></function>
<input></input>
<output></output>
<registers></registers>
<remark></remark>
</const>
</group>
</root:maplib>