Add ApplyKydreeokGraphics

This commit is contained in:
scawful
2024-06-06 22:03:03 -04:00
parent d1af80fb52
commit af7bd19c79

View File

@@ -642,3 +642,25 @@ Sprite_Kydreeok_Draw:
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
}
ApplyKydreeokGraphics:
{
PHX
REP #$20 ; A = 16, XY = 8
LDX #$80 : STX $2100 ; turn the screen off (required)
LDX #$80 : STX $2115 ; Set the video port register every time we write it increase by 1
LDA #$5000 : STA $2116 ; Destination of the DMA $5800 in vram <- this need to be divided by 2
LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register
; "001 => 2 registers write once (2 bytes: p, p+1)"
LDA.w #KydreeokGraphics : STA $4302 ; Source address where you want gfx from ROM
LDX.b #KydreeokGraphics>>16 : STX $4304
LDA #$2000 : STA $4305 ; Size of the transfer 4 sheets of $800 each
LDX #$01 : STX $420B ; Do the DMA
LDX #$0F : STX $2100 ; Turn the screen back on
SEP #$30
PLX
RTS
KydreeokGraphics:
incbin kydreeok.bin
}