When entering at boot a homebrewed ROM. Does C register contains the Primairy and Secundairy slot?

By Wlcracks

Champion (421)

Wlcracks's picture

25-02-2020, 14:45

I noticed #ffff does not (always) contains the subslot of the homebrew rom in a slotexpander when entering from the bios at startup.
Looks like the C register contains the rdslt and wrslt notation of the rom though?
I tried a lot of different systems in openMSX but they all had C register containing the location.
Looks a RST#30 is beeing performed by the bios. But due to the lot of stack and exx commands i could not find any proof of this.
Can anyone comment this?

Login or register to post comments

By spacemoai1973

Master (165)

spacemoai1973's picture

25-02-2020, 19:48

You can't trust any values in registers when your ROM starts. If you want to know what (sub)slot you are in, you should use the WHEREAMI routine that's in the MSX Technical Databook appendices.

By sd_snatcher

Prophet (3270)

sd_snatcher's picture

25-02-2020, 19:49

The correct procedure is to analyse EXPTBL to check if the slot is expanded, and only then get the respective subslot register value from SLTTBL.

By Wlcracks

Champion (421)

Wlcracks's picture

25-02-2020, 21:57

ok thanks

By gdx

Prophet (3508)

gdx's picture

26-02-2020, 02:18

By Wlcracks

Champion (421)

Wlcracks's picture

26-02-2020, 16:11

Thanks all.