home *** CD-ROM | disk | FTP | other *** search
- How to use mapper...
-
- when the memorymapper system was first made you could read the mapper ports
- (&hFC-&hFF) again. But later the standard was changed, now you can't be
- certain about the data you read from the mapper registers. Its actually on a
- problem on the MSX Turbo R because the "S1990 'MSX engine'" only returns 5
- bits so if you have a mapper larger than 512KByte then there are not enough
- bits.
-
- In MSX DOS 2 you are definately not allowed to read the mapperregisters, you
- have to use "EXTENDED BIOS" which DOS2 installs. (&HFFCA, its installed if
- bit 0 of &hFB20 (HOKVLD) are set.)
-
- You have 2 extended bios functions:
-
- Get mapper vaiable table
-
- Parameter: A = 0
- D = 4 (Device number of mapper support)
- E = 1
- Result: A = Slot address of primary mapper
- DE= reserved
- HL= Start address of mapper variable table
-
- ---------------------------------------------------------
- Get mapper support routine address
-
- Parameter: A = 0
- D = 4
- E = 2
- Result: A = Total number of memory mapper segments
- B = slot number of primary mapper
- C = number of free segments of primary mapper
- DE= reserved
- HL= start addresss of jump table
- ---------------------------------------------------------
-
- The Jump table looks like this:
-
- +00H ALL_SEG Allocate a 16k segment
- +03H FRE_SEG Free a 16k segment.
- +06H RD_SEG Read byte from address A:HL to A
- +09H WR_SEG Write byte from E to address A:HL
- +0CH CAL_SEG Inter-segment call. Address in IYh:IX
- +0FH CALLS Inter-segment call. Address in line after
- the call instruction
- +12H PUT_PH Put segment into page (HL)
- +15H GET_PH Get current segment for page (HL)
- +18H PUT_P0 Put segment into page 0
- +1BH Get_P0 Get current segment for page 0
- +1EH PUT_P1 Put segment into page 1
- +21H GET_P1 Get current segment for page 1
- +24H PUT_P2 Put segment into page 2
- +27H GET_P2 Get current segment for page 2
- +2AH PUT_P3 not supported since page-3 must never be changed
- Acts like a "NOP" if called.
- +2DH GET_P3 Get current segment for page 3.
-
-
- The Mapper variable table looks like this: (for each mapper)
-
- +0 Slot address of the mapper slot
- +1 Total number of 16k RAM segments. 1...255 (8...255 for the primary)
- +2 Number of free 16k RAM segments
- +3 Number of 16k RAM segments allocated to the system (at least 6 for the
- primary)
- +4 Number of 16k RAM segments allocated to the user.
- +5..+7 Unused
- +8 Entries for other mapper slots. If there is none, +8 will be zero
-
-
-
- I won't go more into detail here. I got these informations from
- "MSX DOS 2.20 Programme Reference Manual 1, Transient Program Interface
- Specifications" (the HSH version, which are a reprint of an ASCII book I
- think)
-
-
- Greetings,
- Henrik. <msx@login.dknet.dk>
-
-