Rominit loader code for cartridges

by Daemos on 01-06-2014, 14:24

This simple romloader supports findram and virtually all MSX machines
It supports detection of subslots and switches accordingly, enables page 1 and 2 as ROM on default

Key features:

  • Possibility to switch page0 to RAM
  • Can call bios back
  • Can switch any of page 1 and 2 to RAM or ROM
  • Works in slotexpanders
  • Can be adapted easily to do what is required

This romloader does not work according to the MSX standard by default! Use this loader however you like but BEWARE!! your project may or may not explode as you have been warned: it does NOT follow the MSX standard by default. Want to use it according to the standard. Read the instructions below.

Tested on virtually all machines in emulator. Also tested on real hardware:

  • Panasonic FSA1-ST with upgraded RAM (512Kb)
  • Panasonic FSA1-WX with upgraded RAM (256Kb)
  • Panasonic FSA1-WX vanilla
  • Phillips NMS8255 Vanilla
  • Phillips NMS8245
  • Phillips VG8235-00

The MSX standard can be followed by not executing the killbios code in the end and move:

;if bios is preserved
romslot:      db 0 ;location of the cartridge ROM
page0ram:     db 0 ;location of RAM in page 0
page1ram:     db 0 ;location of RAM in page 1
page2ram:     db 0 ;location of RAM in page 2
;/these variables need to be moved to page3

These variables to your variable area of your program. You can then switch slots accordingly by using the system BIOS.

A semi MSX standard approach can be applied if only the variables are being moved.

From page 1 or 2 doing the following:

ld a,(slot.bios)
out ($A8),a

This will call the bios back in page 0.

You can now use enaslt to switch slots using the above variables:

ld a,(slot.page12rom)
out ($A8),a

This will call the RAM back on page 0

Written by Daemos. Use it however you like.

AttachmentSizeDownloadsLast download
rominit.zip3.93 KB1474 weeks 2 days ago