Since I own a few cartridges that only run on a msx1 (due to invalid bios calls) I patched the msx.rom (msx1 bios) file so that it can run in a cartridge and burned this in an eprom which I mounted in an old cartridge. Basic idea is, put this bios-cartridge in slot 1, the game in slot 2, and let's go!
The project seems succesfull; in emulators the rom works perfectly, but in the real thing it only works when I put the bios-cartridge in a slotexpander. I am not sure why exactly, maybe somebody else could have a look at it. Here is the patch code:
<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="mrc-small">Code:</font><HR></TD></TR><TR><TD><FONT class="mrc-small"><PRE>
ORG &H00
DB "CD"
DW &H02D7
ORG &H02D7
DI
IN A,(&HA8)
AND &B00000011
LD L,A
ADD A,A
ADD A,A
LD C,A
IN A,(&HA8)
AND &B11110011
OR C
OUT (&HA8),A
LD A,(&HFFFF)
CPL
AND &B00000011
ADD A,A
ADD A,A
LD B,A
LD A,(&HFFFF)
CPL
AND &B11110011
OR B
LD (&HFFFF),A
; The diskrom uses the value of FCC1 to
; determine the slot where the BIOS is
; located. The slot this BIOS is in,
; is hacked into that location.
LD A,&H80 ; is this the problem?
OR L
OR B
LD (&HFCC1),A
JP &H2680
HACK:
DI
LD C,0
LD DE,&HFCC1
LD HL,&HFCC9
JP &H7D81
ORG &H7D75
JP HACK
</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>
|
Quote:
|
LD A,&H80 ; is this the problem?
OR L
OR B
LD (&HFCC1),A
|
You did localise the problem correctly and here's how it should be solved. You need to check whether the slot this rom is located is actually expanded:
<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="mrc-small">Code:</font><HR></TD></TR><TR><TD><FONT class="mrc-small"><PRE>
LD C,L
IN A,(&HA8)
AND 3
LD E,A
LD D,0
LD HL,&HFCC1
ADD HL,DE
LD A,(HL)
OR C ; here's the original part again (C has old contents of L)
OR B
LD (&HFCC1),A
</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>
should do the trick... |