Upload dragon ship custom spritesheets dynamically
This commit is contained in:
@@ -12,6 +12,7 @@ CheckForChangeGraphicsNormalLoadBoat:
|
|||||||
LDA $8A : CMP.b #$30 : BNE .boat_area
|
LDA $8A : CMP.b #$30 : BNE .boat_area
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
JSR ApplyGraphics1
|
JSR ApplyGraphics1
|
||||||
|
JSR ApplyGraphics2
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
.boat_area
|
.boat_area
|
||||||
@@ -56,6 +57,26 @@ ApplyGraphics1:
|
|||||||
incbin gfx/boat.bin
|
incbin gfx/boat.bin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ApplyGraphics2:
|
||||||
|
{
|
||||||
|
REP #$20 ; A = 16, XY = 8
|
||||||
|
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 $7800 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 #AdditionalBitmap : STA $4302 ; Source address where you want gfx from ROM
|
||||||
|
LDX.b #AdditionalBitmap>>16 : STX $4304
|
||||||
|
LDA #$2000 : STA $4305 ; size of the transfer 4 sheets of $800 each
|
||||||
|
LDX #$01 : STX $420B ; Do the DMA
|
||||||
|
|
||||||
|
SEP #$30
|
||||||
|
|
||||||
|
RTS
|
||||||
|
|
||||||
|
AdditionalBitmap:
|
||||||
|
incbin gfx/boat2.bin
|
||||||
|
}
|
||||||
|
|
||||||
; ==============================================================================
|
; ==============================================================================
|
||||||
|
|
||||||
ApplyKorokSpriteSheets:
|
ApplyKorokSpriteSheets:
|
||||||
|
|||||||
BIN
Overworld/gfx/boat2.bin
Normal file
BIN
Overworld/gfx/boat2.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user