I'm sorry ot resurrect - again - such an old topic, but I've been toying with this mode, and I have problem putting it in use.
Let the code :
Code: Select all
ROM_SIZE equ $10000
GFX_CTRL equ $C00004
GFX_DATA equ $C00000
_dmaSrcDestLen: macro
move.w #$9300+((\3)&$FF),GFX_CTRL
move.w #$9400+((\3>>8)&$FF),GFX_CTRL
move.w #$9500+((\1>>1)&$FF),GFX_CTRL
move.w #$9600+(((\1>>1)&$FF00)>>8),GFX_CTRL
move.w #$9700+((((\1>>1)&$FF0000)>>16)&$7F),GFX_CTRL
move.l #$40000080|((\2&$3FFF)<<16)|((\2&$C000)>>14),-(a7)
move.w (a7)+,GFX_CTRL
move.w (a7)+,GFX_CTRL
endm
DC.L $FFFFF0
DC.L $200
DC.L INT, INT, INT, INT, INT, INT
dc.l INT, INT, INT, INT, INT, INT, INT, INT
dc.l INT, INT, INT, INT, INT, INT, INT, INT
dc.l INT, INT, INT, INT, INT, INT, V_INT, INT
dc.l INT, INT, INT, INT, INT, INT, INT, INT
dc.l INT, INT, INT, INT, INT, INT, INT, INT
dc.l 0,0,0,0,0,0,0,0
dc.l 0,0,0,0,0,0,0,0
DC.B 'SEGA MEGA DRIVE ' ; Console name (16B)
DC.B '(C)OB1 2021.MAR' ; Copyright notice (16B)
DC.B 'DMA 128K '
DC.B ' '
DC.B ' ' ; Domestic game name (48B)
DC.B 'DMA 128K '
DC.B ' '
DC.B ' ' ; Overseas game name (48B)
DC.B 'GM' ; Type of product (2B)
DC.B ' 00000000-00' ; Product code, version nbr (12B)
DC.W 0 ; Checksum (2B)
DC.B 'J ' ; I/O support (16B)
DC.L 0, ROM_SIZE-1 ; ROM start/end (4B each)
DC.L $FF0000,$FFFFFF ; RAM start/end (4B each)
DC.B ' ' ; Padder (12B)
DC.B ' ' ; Modem (12B)
DC.B ' '
DC.B ' '
DC.B ' ' ; Memo (40B)
DC.B 'JUE ' ; Country game (16B)
move.b $a10000,d0 ; Read Version Number
andi.b #$f,d0
beq.s japan
move.l #'SEGA',$a14000
japan:
move.w #$8104,GFX_CTRL ; Set M5
move.w #$8F02,GFX_CTRL ; Auto Increment 2
move.w #$8114,GFX_CTRL ; Set DMA
_dmaSrcDestLen $100,0,$80
move.w #$8194,GFX_CTRL ; Set 128k | DMA
_dmaSrcDestLen $100,$80,$80
move.w #$8124,GFX_CTRL ; Clear DMA, issue V INT
movea.l #$FFFF00,a0
move.l a0,usp
move.w #$0500,SR ; Acknowledge V INT
main:
bra main
INT:
rte
V_INT:
addq.w #1,$FF0000
rte
DS.B ROM_SIZE-*
This code is simple :
- first, it clears 128k, and writes the CART header in VRAM[0000]
- then, it sets 128k, and writes the CART header in VRAM[0080]
In its Overdrive notes (mirrored on the excellent @Sik site), Kabuto notes :
then just the lower byte of each word written to VRAM will get stored
So, I would assume that at VRAM[0000], I would read :
"SEGA MEGADRIVE ..."
and at VRAM[0080], I would read :
"S_G_ _E_A_R_V_ ..." (of course, "_" isn't "_" but points to the lack of character).
The lower bytes would be written to the actual VRAM chips, and the upper bytes would be written to the non-existent chips (ie, dismissed).
But, running this code in Exodus 2.1, GensKMod 212a - 073, and Regen 097D, I got the same text at VRAM[0000] and VRAM[0080].
So, I think there must be something I'm doing wrong, but I can't find what.
Could you guys please give me the hand on this stuff ?
Edit: typo