diff --git a/pixi/asm/ExtraDefines/dynamic_spritesets_defines.asm b/pixi/asm/ExtraDefines/dynamic_spritesets_defines.asm index ca8f0b6..91b0aac 100644 --- a/pixi/asm/ExtraDefines/dynamic_spritesets_defines.asm +++ b/pixi/asm/ExtraDefines/dynamic_spritesets_defines.asm @@ -5,13 +5,13 @@ !dss_exgfx = $0D00 ;# How many tiles from the queue will be uploaded per frame - !dss_queue_tiles = 6 + !dss_queue_tiles = 5 ;# How many frames are needed to mark a GFX as unused !dss_time_to_unmark_gfx = 16 ;# Main RAM defines -;# Requires at least 1541 (0x605) bytes of consecutive free RAM +;# Requires at least 1751 (0x6D7) bytes of consecutive free RAM ;# or you could edit the defines below to make some of them not consecutive !dss_ram = $40C000 @@ -174,7 +174,12 @@ ;# Copy of the bounce sprite table ($1699) ;# 4 bytes - !dss_bounce_sprite_copy = !dss_cluster_sprite_copy+4 + !dss_bounce_sprite_copy = !dss_cluster_sprite_copy+20 + +;# Page of ExGFX that will be used for decompressing graphics. +;# The default value is !dss_exgfx +;# 2 bytes + !dss_exgfx_page = !dss_bounce_sprite_copy+4 ;#################################################################### ;# Spriteset defines diff --git a/pixi/asm/dss/shared_routines.asm b/pixi/asm/dss/shared_routines.asm index ee7e05f..6f19e2b 100644 --- a/pixi/asm/dss/shared_routines.asm +++ b/pixi/asm/dss/shared_routines.asm @@ -143,7 +143,7 @@ find_and_queue_gfx: rep #$20 txa and #$00FF - ora #!dss_exgfx ; prepare for decompression on snes side + ora.l !dss_exgfx_page ; prepare for decompression on snes side sta $313E ; $313E = exgfx num lda.l !dss_ram_buffer_index and #$0007 diff --git a/uberasm/library/dynamic_spriteset.asm b/uberasm/library/dynamic_spriteset.asm index b3318fa..2ded1ef 100644 --- a/uberasm/library/dynamic_spriteset.asm +++ b/uberasm/library/dynamic_spriteset.asm @@ -115,6 +115,14 @@ ;# 20 bytes !dss_cluster_sprite_copy = !dss_extended_sprite_copy+10 +;# Copy of the bounce sprite table ($1699) +;# 4 bytes + !dss_bounce_sprite_copy = !dss_cluster_sprite_copy+20 + +;# Page of ExGFX that will be used for decompressing graphics. +;# The default value is !dss_exgfx +;# 2 bytes + !dss_exgfx_page = !dss_bounce_sprite_copy+4 ;#################################################################### ;# Macros @@ -197,6 +205,9 @@ init: plb rep #$30 + + lda.w #!dss_exgfx + sta.w !dss_exgfx_page stz.w !dss_gfx_queue_index_nmi stz.w !dss_gfx_queue_index_game stz.w !dss_ram_buffer_index @@ -250,6 +261,9 @@ init: dex #2 bpl - + stz.w !dss_bounce_sprite_copy,x + stz.w !dss_bounce_sprite_copy+2,x + plb sep #$30