Skip to content

Commit

Permalink
fixed even more crap
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLX5 committed Feb 25, 2021
1 parent 9bc2c7f commit 6a26bff
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 28 deletions.
Binary file modified ExGraphics/ExGFXD61.bin
Binary file not shown.
3 changes: 2 additions & 1 deletion pixi/asm/ExtraHijacks/dynamic_spritesets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,5 @@
incsrc "../dss/original_sprites/floating_spike_ball.asm"
incsrc "../dss/original_sprites/blargg.asm"
incsrc "../dss/original_sprites/spotlight.asm"
incsrc "../dss/original_sprites/item_box.asm"
incsrc "../dss/original_sprites/item_box.asm"
incsrc "../dss/original_sprites/bowling_ball.asm"
2 changes: 1 addition & 1 deletion pixi/asm/dss/exgfx_lenght.asm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ exgfx_lenght:
db $05 ;# 5E - Dino torch
db $08 ;# 5F - Dino fire
db $09 ;# 60 - Mecha-koopa
db $05 ;# 61 - Bowling ball
db $06 ;# 61 - Bowling ball
db $03 ;# 62 - Brown platform
db $01 ;# 63 - Brown platform chain
db $01 ;# 64 - Smiling coin
Expand Down
29 changes: 10 additions & 19 deletions pixi/asm/dss/garbage_collector.asm
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,16 @@ garbage_collector:
ldy #$00
tyx
..loop
lda ($0D),y ; get tile num
tax
lda.l tile_lookup,x ; get tile offset for map
tax
lda ($0D),y
cmp #$FF
beq ..next
ldx #$00
...loop_vram
cmp.w !dss_vram_dest,x
beq ..found_offset
inx
bra ...loop_vram
..found_offset
lda.w !dss_map,x ; failsafe: check if gfx num is the same as the one in the map
cmp $0F
bne ..next
Expand All @@ -187,18 +193,3 @@ garbage_collector:

jmp .skip_list_slot


tile_lookup:
!i = 0
!j = 0
while !i < 64
while !j < 8
dw !i
!i #= !i+1
!j #= !j+1
endif
if !j == 8
!j #= 0
dw 0,0,0,0,0,0,0,0
endif
endif
8 changes: 7 additions & 1 deletion pixi/asm/dss/original_sprites/blurp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pushpc
blurp_write:
lda #!dss_id_blurp
jsl find_and_queue_gfx
bcs .loaded
bcc blurp_write_end
.loaded
jsr GetDrawInfoBnk3
lda $00
Expand Down Expand Up @@ -36,9 +36,15 @@ pullpc
lda.l !dss_tile_buffer+$01
.other
sta $0302|!addr,y
lda !157C,x
lsr
lda !15F6,x
bcs .flip
ora #$40
.flip
ora $64
sta $0303|!addr,y
ldx $15E9|!addr
lda #$00
ldy #$02
jml FinishOAMWrite
8 changes: 8 additions & 0 deletions pixi/asm/dss/original_sprites/boo_stream.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ pullpc

boo_stream_write:
tax
lda.b #!dss_id_boo
jsl find_and_queue_gfx
bcs .loaded
lda #$F0
sta $0301|!addr,y
bra .return
.loaded
lda !dss_tile_buffer,x
sta $0302|!addr,y
.return
plx
jml boo_stream_write_end

Expand Down
56 changes: 56 additions & 0 deletions pixi/asm/dss/original_sprites/bowling_ball.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
pushpc

org $03B221
bowling_ball_init_hijack:
jml bowling_ball_load
warnpc $03B226
org $03B226
bowling_ball_init_end:
org $03B2A6
bowling_ball_init_return:

org $03B23E
bowling_ball_write_hijack:
jml bowling_ball_write
warnpc $03B244
org $03B244
bowling_ball_write_end:

org $03B1ED
bowling_ball_tilemap:
db $00,$04,$00
db $08,$0C,$08
db $00,$04,$00
db $15,$14,$10

pullpc

bowling_ball_load:
lda.b #!dss_id_bowling_ball
jsl find_and_queue_gfx
bcs .loaded
jml bowling_ball_init_return
.loaded
lda #$70
sta !15EA,x
jml bowling_ball_init_end

bowling_ball_write:
phx
lda.w bowling_ball_tilemap,x
pha
and #$03
tax
lda.l .offset,x
sta $0F
pla
lsr #2
tax
lda.l !dss_tile_buffer,x
ora $0F
plx
sta $0302|!addr,y
jml bowling_ball_write_end

.offset
db $00,$01,$10,$11
2 changes: 1 addition & 1 deletion pixi/asm/dss/original_sprites/bubble.asm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pushpc

org $02D8A9
bubble_item_props:
db $85,$85,$05,$08
db $85,$85,$05,$09
pullpc

bubble_item:
Expand Down
4 changes: 2 additions & 2 deletions pixi/asm/dss/original_sprites/dry_bones_bony_beetle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ pullpc
rtl

dry_bones_init:
lda !1602,x
cmp #$02
lda !9E,x
cmp #$30
bne .two_tiles
lda.b #!dss_id_bone_projectile
jsl find_and_queue_gfx
Expand Down
2 changes: 1 addition & 1 deletion pixi/asm/dss/original_sprites/grinder.asm
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ pushpc
bcs .loaded
rts
.loaded
phx
jsr GetDrawInfoBnk1
phx
jsl ground_grinder_write
bra grinder_write_end
warnpc $01DBD0
Expand Down
2 changes: 1 addition & 1 deletion pixi/asm/dss/original_sprites/powerups.asm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pushpc
;# Signature
db "DSS"
;# Version number
dw 0003
dw 0006
warnpc $01DF91
org $01DF91
bonus_items_write_end:
Expand Down
4 changes: 4 additions & 0 deletions pixi/asm/dss/remaps.asm
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,9 @@ pushpc
org $02CD45
flat_switch_palace_tilemap:
db $60,$61,$61,$60,$70,$71,$71,$70

org $00AA76
disable_special_world_clear_skins:
db $80
pullpc

3 changes: 2 additions & 1 deletion uberasm/gamemode/prepare_title_screen.asm
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
init:
jml dynamic_spriteset_init
%invoke_sa1(dynamic_spriteset_init)
rtl
44 changes: 44 additions & 0 deletions uberasm/level/bowser_fight.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
;#########################################################################
;# Customization defines

;# Location of the configuration used in the main patch.
!dss_config = $02D60B

;# Main RAM define
;# Requires at least 1745 (0x6D1) bytes of consecutive free RAM
;# or you could edit the defines below to make some of them not consecutive
!dss_ram = read3(!dss_config)

;####################################################################
;# RAM defines

;# Holds the maximum amount of tiles used by DSS.
;# Can be modified. Can't be over 64 or bad things will happen.
;# 1 byte
!dss_maximum_tiles #= !dss_ram+64+32+32+32+32+32+1024+1

;# Map of possible VRAM destinations for sprite tiles
;# FF is treated as invalid.
;# 64 bytes
!dss_vram_dest #= !dss_ram+64+32+32+32+32+32+1024+1+1+1+256+2+2

init:
rep #$30
ldx.w #bowser_fight_vram_destinations_end-bowser_fight_vram_destinations-2
-
lda.l bowser_fight_vram_destinations,x
sta.l !dss_vram_dest,x
dex #2
bpl -
sep #$30

lda.b #bowser_fight_vram_destinations_end-bowser_fight_vram_destinations
sta.l !dss_maximum_tiles
rtl

bowser_fight_vram_destinations:
db $00,$0A,$0C,$0E,$40,$4A,$4C,$60
db $6A,$6C,$C0,$C2,$C4,$C8,$CA,$CC
db $CE,$E0,$E2,$E4,$E6,$E8,$EA,$EC
db $EE
.end
44 changes: 44 additions & 0 deletions uberasm/level/lemmy_wendy_fight.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
;#########################################################################
;# Customization defines

;# Location of the configuration used in the main patch.
!dss_config = $02D60B

;# Main RAM define
;# Requires at least 1745 (0x6D1) bytes of consecutive free RAM
;# or you could edit the defines below to make some of them not consecutive
!dss_ram = read3(!dss_config)

;####################################################################
;# RAM defines

;# Holds the maximum amount of tiles used by DSS.
;# Can be modified. Can't be over 64 or bad things will happen.
;# 1 byte
!dss_maximum_tiles #= !dss_ram+64+32+32+32+32+32+1024+1

;# Map of possible VRAM destinations for sprite tiles
;# FF is treated as invalid.
;# 64 bytes
!dss_vram_dest #= !dss_ram+64+32+32+32+32+32+1024+1+1+1+256+2+2

load:
rep #$30
ldx.w #lemmy_wendy_fight_vram_destinations_end-lemmy_wendy_fight_vram_destinations-2
-
lda.l lemmy_wendy_fight_vram_destinations,x
sta.l !dss_vram_dest,x
dex #2
bpl -
sep #$30

lda.b #lemmy_wendy_fight_vram_destinations_end-lemmy_wendy_fight_vram_destinations
sta.l !dss_maximum_tiles
rtl

lemmy_wendy_fight_vram_destinations:
db $C0,$C2,$C4,$C6,$C8,$CA,$CC,$CE
db $E0,$E2,$E4,$E6,$E8,$EA,$EC,$EE
db $80,$82,$84,$86,$88,$8A,$8C,$8E
db $A0,$A2,$A4,$A6,$A8,$AA
.end

0 comments on commit 6a26bff

Please sign in to comment.