Schrijver
| Game ROMs that runs at 0000h
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 02 September 2006, 14:24   |
Does anyone have an example of code from a ROM that runs at 0000h
(i.e. with the AB signature at 0000h) ?
From my direct inspection results that no 32K or 48K games run at 0000h, in particular:
the Cure has the AB signature at 4000h
UU Final has the AB signature at 4000h
Griel's Quest for the Sangraal has the AB signature at 4000h
Parachuteless Joe has the AB signature at 4000h
....
I am having some problems on pages slots and subslot
(http://www.msx.org/forumtopic6353p30.html) and I need a "template" to look at.
Any proposal ?
|
|
Huey msx professional Berichten: 582 | Geplaatst: 02 September 2006, 15:49   |
I saw Bifi mentioning 'Sparkie' and 'Crazy Train' in another thread......
|
|
Huey msx professional Berichten: 582 | Geplaatst: 02 September 2006, 16:05   |
I checked sparkie. the AB init is mirrored at 4000h, 6000h etc.
I also found this conversation which also adresses the 'trick':
long link
To be quite honest I don't really fully understand but does this mean that the AB signature at 0000h is useless?
{mod: changed the link} |
|
Huey msx professional Berichten: 582 | Geplaatst: 02 September 2006, 16:42   |
Quote:
| I checked sparkie. the AB init is mirrored at 4000h, 6000h etc.
|
But also present at 0000h ofcourse  |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 02 September 2006, 17:32   |
it is... the system only checks for the AB signature @ $4000 and $8000 and because of the mirroring a game in page 0 is booted perfectly. For that mirroring thing to work correctly the AB signature should be on $0000 as well even though the system doesn't read that particular address.
just try putting something like this at $4000:
"AB" followed by an address in page 0 ($0000-$3FFF) and it works.
of course the BIOS isn't available anymore...
(and please reduce the size of that insane long URL to the stack.nl mailing list archive, thanks)
|
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 02 September 2006, 18:58   |
Naturally I want to exclude the BIOS and any previous ROM.
What is the mirroring thing ?
Currently I have a 48K ROM, that should I expect to find ?
When mirroring occurs ? And what implies ?
Should I put the AB signature a boot code at 0000h and expect
that it is executed at 4000h ?
Is this the arcane secret?
But I have a 48K rom, i.e. 3 pages, which page is mirrored ?
All of them ?
What happens with a 128K rom?
|
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 02 September 2006, 19:02   |
Moreover, about pages slots and subslot,
should I try to rewrite the boot code like it where in page 1 ?
|
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 02 September 2006, 19:19   |
I have found that crazy train (sony 32K) has AB at 0000h (at least when I disassemble it in blue)
but I cannot find WHEN of IF it interacts with slots and subslots...
It seems like the two rom pages are set in active slots BEFORE the boot code is execuded ...
What sort of miracle is this ?
|
|
NYYRIKKI online msx master Berichten: 1507 | Geplaatst: 02 September 2006, 21:43   |
The start address defines, how slots are selected.
|
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 02 September 2006, 23:43   |
Do you mean that if I set a start address OUTSIDE the page where AB is
the bios will activate both pages ??
|
|
Huey msx professional Berichten: 582 | Geplaatst: 03 September 2006, 11:18   |
@ARTRAG: Can't you just put the same AB <init address> also at 4000h but with the init address in the 0000h region (00CFh ??). I Thought just was just missing the starting of the initialisation routine.
And for the sparky rom. From what I thought to see was that the entire rom was mirrored completely several times (0000h-1fffh copied to 2000h, 4000h and 6000h) Not what you need I think.
|
|
NYYRIKKI online msx master Berichten: 1507 | Geplaatst: 03 September 2006, 15:25   |
Quote:
| Do you mean that if I set a start address OUTSIDE the page where AB is
the bios will activate both pages ??
|
Yes, that is how I understand it works.
|
|
NYYRIKKI online msx master Berichten: 1507 | Geplaatst: 03 September 2006, 15:52   |
I suggest, that you take a look at the boot process. Try reading from 7D75#0-0 (At least that is the address in my tR)
For this purpose I suggest using Super-X so that you can follow the calls by using cursor keys. (To get it, telnet to HispaBBS)
|
|
ARTRAG msx master Berichten: 1594 | Geplaatst: 03 September 2006, 18:03   |
I give up. Now I have the singature at 8000h and it seems to work.
The code I have at 8000h is:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
psect boot,class=CODE
; MSX ROM Header
global _start,testend,pagestart
defb 'A','B'
defw pagestart
pagestart:
di
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; set pages and subslot
in a,(0xA8)
ld l,a
and 0xC0
ld b,a ; which slot is for ram (page 3)?
ld a,l
and 0x30 ; which slot are we in (for page 2)?
ld c,a
rrca
rrca
or c
rrca
rrca
or c
or b
ld e,a ; page 0,1 & 2 are at the same primary slot of page 2
; page 3 stay unchanged
rlc c
rlc c
ld a,l
and 0x3F
or c
out (0xA8),a ; page 3 is set to the same primary slot that was of page 2
ld a,(-1)
cpl
and 0x30 ; which sub slot are we in (for page 2)?
ld c,a
rrca
rrca
or c
rrca
rrca
or c
ld (-1),a ; page 0,1 & 2 are at the same sub slot of page 2
; page 3 has subslot 0, but who cares ?
ld a,e
out (0xA8),a ; page 0,1 & 2 are at the same primary slot of page 2
; page 3 is unchanged
testend:
jp _start
;;;;;;;;;;;;;
It selects at page 0 & 1 the same slot and subslot found for page 2,
while leaving the page 3 with the same configuration found at the startup.
Does anyone have a shorter code that does the same thing ? |
|
|
|
|