From 501699e401fe0559e9bb8a5d5f3e5991b24b3b4b Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Sat, 18 Sep 2021 08:04:38 -0400 Subject: [PATCH 1/3] oops --- events.asm | 13 +++++++++++-- hooks.asm | 13 ------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/events.asm b/events.asm index 535ff56..7999bee 100644 --- a/events.asm +++ b/events.asm @@ -190,8 +190,17 @@ RTL ;-------------------------------------------------------------------------------- OnLinkDamagedFromPit: JSL.l OHKOTimer - LDA.b #$14 : STA $11 ; thing we wrote over -RTL + + LDA.l AllowAccidentalMajorGlitch + BEQ ++ +-- LDA.b #$14 : STA $11 ; thing we wrote over + + RTL + +++ LDA.b $10 : CMP.b #$12 : BNE -- + + STZ.b $11 + RTL ;-------------------------------------------------------------------------------- OnLinkDamagedFromPitOutdoors: JML.l OHKOTimer ; make sure this is last diff --git a/hooks.asm b/hooks.asm index aed4914..af2bfcf 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2726,19 +2726,6 @@ org $0AEEF2 org $008BE5 ; hijack stripes for boss GFX transfer JSL DoDungeonMapBossIcon -;================================================================================ -; Fix quadrant glitch -org $07A879 - JSR SwordSpinQuadrantFix - -org $07F877 ; free rom -SwordSpinQuadrantFix: - LDA.l AllowAccidentalMajorGlitch - BEQ ++ - JMP.w $07E8D9 ; HandleIndoorCameraAndDoors - -++ RTS - ;================================================================================ org $01C4B8 : JSL FixJingleGlitch From 4ec6acfae7e830b6a2282b07f6ade8db682a1847 Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Tue, 5 Oct 2021 14:11:55 -0500 Subject: [PATCH 2/3] Remove ZSNES graphic This graphic takes up too much space. Instead if the check fails just do a STP and don't include any of the ZSNES graphics. If we want to add some other message here later we can, but it's more of a nice to have than a necessity. --- zsnes.asm | 98 ------------------------------------------------------- 1 file changed, 98 deletions(-) diff --git a/zsnes.asm b/zsnes.asm index e4cde9d..5c27ec6 100644 --- a/zsnes.asm +++ b/zsnes.asm @@ -11,104 +11,6 @@ CheckZSNES: LDA #$01FF : TCS ; thing we wrote over - initialize stack JML.l ReturnCheckZSNES .zsnes -; Set up video mode - SEP #$30 ; X,Y,A are 8 bit numbers - LDA #$80 ; screen off - STA $2100 ; brightness + screen enable register - LDA #$03 - STA $2105 ; video mode 3, 8x8 tiles, 256 color BG1, 16 color BG2 - STZ $2106 ; noplanes, no mosaic, = Mosaic register - LDA #$01 - STA $210B ; Set BG1 tile data offset to $2000 - STZ $210D ; Plane 0 scroll x (first 8 bits) - STZ $210D ; Plane 0 scroll x (last 3 bits) #$0 - #$07ff - LDA #$01 - STA $212C ; Enable BG1 - LDA #$FF - STA $210E ; Set BG1 scroll register - STA $210E - STZ $212E ; Window mask for Main Screen - STZ $212F ; Window mask for Sub Screen - LDA #$30 - STA $2130 ; Color addition & screen addition init setting - STZ $2131 ; Add/Sub sub designation for screen, sprite, color - LDA #$E0 - STA $2132 ; color data for addition/subtraction - STZ $2133 ; Screen setting (interlace x,y/enable SFX data) - STZ $4200 ; Disable V-blank, interrupt, Joypad register - - REP #$10 - - -; Load tilemap and tile data - STZ $2116 - LDA #$0C - STA $2107 ; Set BG1 tilemap offset to $1800 and size to 32x32 - STA $2117 ; VRAM write address $1800 - - LDA #$80 - STA $2115 ; VRAM single word transfer, word increment - LDX #$1801 - STX $4300 ; DMA destination: VMDATAL/VMDATAH, fixed source - LDX.w #ZSNES_TileMap - STX $4302 ; Low DMA source address - LDA.b #ZSNES_TileMap>>16 - STA $4304 ; High DMA source address - LDX.w #$800 - STX $4305 ; Transfer 2048 bytes - LDA #$01 - STA $420B ; Start DMA transfer - - LDX.w #ZSNES_Tiles - STX $4302 ; Low DMA source address - LDA.b #ZSNES_Tiles>>16 - STA $4304 ; High DMA source address - LDX.w #$8000 - STX $4305 ; Transfer 32768 bytes - LDA #$01 - STA $420B ; Start DMA transfer - - LDX.w #$8000 - STX $4302 ; Low DMA source address - LDA.b #$38 ; (ZSNES_Tiles>>16)+1 - STA $4304 ; High DMA source address - LDX.w #$6040 - STX $4305 ; Transfer 24640 bytes - LDA #$01 - STA $420B ; Start DMA transfer - -; Load CGRAM via DMA transfer - - STZ $2121 ; Start at color 0 - LDX #$2200 - STX $4300 ; DMA destination: CGDATA, byte increment - LDX.w #ZSNES_Palette - STX $4302 ; Low DMA source address - LDA.b #ZSNES_Palette>>16 - STA $4304 ; High DMA source address - LDX #$0200 - STX $4305 ; Transfer 512 bytes - LDA #$01 - STA $420B ; Start DMA transfer - - LDA #$0F ; screen on, full brightness - STA $2100 ; brightness + screen enable register STP ; ! ;-------------------------------------------------------------------------------- -;@ pushpc -;@ check bankcross off - -org $378000 - -ZSNES_Tiles: - incbin zsnes_tiles.bin - -ZSNES_TileMap: - incbin zsnes_tilemap.bin - -ZSNES_Palette: - incbin zsnes_pal.bin - -;@ check bankcross on -;@ pullpc \ No newline at end of file From 798af492154523a9927f52659616a97cddcddde1 Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Tue, 5 Oct 2021 17:02:24 -0500 Subject: [PATCH 3/3] Update LTTP_RND_GeneralBugfixes.asm --- LTTP_RND_GeneralBugfixes.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 83c20df..9960257 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -329,8 +329,7 @@ warnpc $B08000 ;$31 Graphics Bank ;$32 Text Bank ;$33 Graphics Bank -;$37 Don't Use ZSNES Graphics -;$38 Don't Use ZSNES Graphics (continued) +;$36 reserved for Enemizer ;$3A reserved for downstream use ;$3B reserved for downstream use ;$3F reserved for internal debugging