You've just been told by me and Ultima about an hour ago how to do it. You need to decompress it to a buffer (and you claim to know what one is) and then from there you send it to VDP by programming the registers as you've been told by both of us, and by sending information to the control and data ports.
Changing Sonic 2's level format
#48
Posted 21 January 2006 - 08:25 PM
Or just use the dynamic load cues. IIRC, LOst told you how they work.
#49
Posted 22 January 2006 - 08:51 AM
Stolen from Sonic 3: (yeah, my disassembly)
; ----------------------------------------------------- ; This subroutine sets the DMA (Direct Memory Access) to 68k to VRAM ; ; d1.l - DMA source address (in 68k memory) ; d2.w - DMA destination address (in VRAM) ; d3.w - DMA length ; ----------------------------------------------------- SetupDMA_68kToVRam: ; CODE XREF: KosinskiModDec_Decompress+72p ; ROM:00003676p ... movea.l ($FFFFFBFC).w,a1 cmpa.w #$FBFC,a1 beq.s SetupDMA_NoDMA move.w #$9300,d0 move.b d3,d0 move.w d0,(a1)+; setup VDP register $13 - DMA length bits 7-0 move.w #$9400,d0 lsr.w #8,d3 move.b d3,d0 move.w d0,(a1)+; setup VDP register $14 - DMA length bits 15-8 move.w #$9500,d0 lsr.l #1,d1 move.b d1,d0 move.w d0,(a1)+; setup VDP register $15 - 68k addr bits 8-1 (remember, the bit 0 is always %0!) move.w #$9600,d0 lsr.l #8,d1 move.b d1,d0 move.w d0,(a1)+; setup VDP register $16 - 68k addr bits 16-9 move.w #$9700,d0 lsr.l #8,d1 andi.b #$7F,d1; '' move.b d1,d0 move.w d0,(a1)+; setup VDP register $17 - 68k addr bits 23-17 andi.l #$FFFF,d2; VRAM destination address lsl.l #2,d2 lsr.w #2,d2 swap d2 ; VRAM destination address, edited to suit VDP =P ori.l #$40000080,d2; set up the 68k to VRAM DMA, start it move.l d2,(a1)+ move.l a1,($FFFFFBFC).w loc_1806: cmpa.w #$FBFC,a1 beq.s SetupDMA_NoDMA move.w #0,(a1) SetupDMA_NoDMA: ; CODE XREF: SetupDMA_68kToVRam+8j ; SetupDMA_68kToVRam+5Aj rts ; End of function SetupDMA_68kToVRam


03