From 2b1a3566d8d5d7b20eec7cc661ebe136ccff418f Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Sun, 31 Oct 2021 10:38:38 -0400 Subject: [PATCH 01/14] flibber --- events.asm | 2 +- flipperkill.asm | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ hooks.asm | 18 +++++++++++--- tables.asm | 1 + 4 files changed, 82 insertions(+), 5 deletions(-) diff --git a/events.asm b/events.asm index 7999bee..d8ff634 100644 --- a/events.asm +++ b/events.asm @@ -177,7 +177,7 @@ RTL ;-------------------------------------------------------------------------------- OnLinkDamaged: JSL.l IncrementDamageTakenCounter_Arb - JSL.l FlipperKill + ;JSL.l FlipperKill JML.l OHKOTimer ;-------------------------------------------------------------------------------- diff --git a/flipperkill.asm b/flipperkill.asm index ac782c2..1f8d04d 100644 --- a/flipperkill.asm +++ b/flipperkill.asm @@ -68,3 +68,69 @@ MysteryWaterFunction: ; *$3AE54 ALTERNATE ENTRY POINT STZ $0360 RTL ;-------------------------------------------------------------------------------- + + +;=================================================================================================== +; More elegant solution +;=================================================================================================== + +protectff: + LDA.l AllowAccidentalMajorGlitch + BEQ .yes_protect + + RTL + +.yes_protect + REP #$30 + + LDA.b $20 + AND.w #$1E00 + ASL + ASL + ASL + STA.b $06 + + LDA.b $22 + AND.w #$1E00 + ORA.b $06 + + XBA + LSR + TAX + + SEP #$30 + + ; Remove dark world bit + ; in game table that converts coordinates to actual screen ID + ; special case for other areas + LDA.b $8A + BMI .special_overworld + + AND.b #$3F + CMP.l $02A4E3,X + BEQ ++ + +.protect + LDA.b #$15 + STA.b $5D + + STZ.b $2E + + LDA.b #$02 + STA.b $2F + + STZ.w $0112 + STZ.w $02E4 + STZ.w $0FFC + +++ RTL + +.special_overworld + CMP.l .spow,X + BNE .protect + + RTL + +.spow + db $80, $81, $81, $FF, $FF, $FF, $FF, $FF + db $FF, $81, $81, $FF, $FF, $FF, $FF, $FF \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index af2bfcf..f0534dd 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2259,8 +2259,18 @@ JSL.l OnLinkDamagedFromPitOutdoors org $078F27 ; <- 38F27 JSL.l FlipperReset ;-------------------------------------------------------------------------------- -org $09F40B ; <- 4F40B - module_death.asm:222 (LDX.b #$00) -JSL.l IgnoreFairyCheck +org $02B468 + dw FakeFlipperProtection + +org $02FFC7 +FakeFlipperProtection: + JSR.w $029485 + JSL protectff + RTS + +;-------------------------------------------------------------------------------- +;org $09F40B ; <- 4F40B - module_death.asm:222 (LDX.b #$00) +;JSL.l IgnoreFairyCheck ;-------------------------------------------------------------------------------- org $078F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM) JSL.l OnEnterWater : NOP @@ -2526,13 +2536,13 @@ org $0DA9C8 ; <- 06A9C8 - player_oam.asm: 1663 (AND.w #$00FF : CMP.w #$00F8 : BC LDA $02 ; always zero! (this replaces the BCC) ADC.w #0000 ; put the carry bit into the accumulator instead of a hardcoded 1. ;------------------------------------------------------------------------------- -org $02fd6f ; <- 017d6f - bank0E.asm: 3694 (LoadActualGearPalettes:) Note: Overflow of bank02 moved to 0e in US Rom +org $02FD6F ; <- 017d6f - bank0E.asm: 3694 (LoadActualGearPalettes:) Note: Overflow of bank02 moved to 0e in US Rom JSL LoadActualGearPalettesWithGloves RTL ;-------------------------------------------------------------------------------- ; Bunny Palette/Overworld Map Bugfix ;-------------------------------------------------------------------------------- -org $02fdf0 ; <- 017df0 - bank0E (LDA [$00] : STA $7EC300, X : STA $7EC500, X) +org $02FDF0 ; <- 017df0 - bank0E (LDA [$00] : STA $7EC300, X : STA $7EC500, X) JSL LoadGearPalette_safe_for_bunny RTS ;================================================================================ diff --git a/tables.asm b/tables.asm index d1eb4ec..75efb96 100644 --- a/tables.asm +++ b/tables.asm @@ -1746,6 +1746,7 @@ dw $0000 ; STAIRS3 ; STAIRS4 ;-------------------------------------------------------------------------------- +RoomHeaders: org $30DA00 : RoomHeader_0000: ; pc 0x185A00 db $41, $21, $13, $22, $07, $3D, $00, $00, $00, $10, $C0, $00, $00, $04 From 553821885f81d175b0bf5dbb5fd71b220f03f6de Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Mon, 1 Nov 2021 06:58:30 -0400 Subject: [PATCH 02/14] prevent transition --- flipperkill.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/flipperkill.asm b/flipperkill.asm index 1f8d04d..6f8c420 100644 --- a/flipperkill.asm +++ b/flipperkill.asm @@ -115,6 +115,7 @@ protectff: STA.b $5D STZ.b $2E + STZ.b $67 LDA.b #$02 STA.b $2F From 24f6a4d8a8878a754f9ecb6cca02ea1e90d58c0d Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Fri, 12 Nov 2021 09:25:43 -0500 Subject: [PATCH 03/14] abcd --- flipperkill.asm | 2 +- spc.asm | 159 +++++++++++++++++++----------------------------- 2 files changed, 64 insertions(+), 97 deletions(-) diff --git a/flipperkill.asm b/flipperkill.asm index 6f8c420..418a6e7 100644 --- a/flipperkill.asm +++ b/flipperkill.asm @@ -134,4 +134,4 @@ protectff: .spow db $80, $81, $81, $FF, $FF, $FF, $FF, $FF - db $FF, $81, $81, $FF, $FF, $FF, $FF, $FF \ No newline at end of file + db $FF, $81, $81, $FF, $FF, $FF, $FF, $FF diff --git a/spc.asm b/spc.asm index e1c564b..8946463 100644 --- a/spc.asm +++ b/spc.asm @@ -1,107 +1,74 @@ -; WARNING: THIS CODE IS EXTREMELY FRAGILE - -macro copybin(source, length) - !copycount #= 0 - while !copycount+3 < - dd read4(pctosnes(+!copycount)) - !copycount #= !copycount+4 - endif - - while !copycount < - db read1(pctosnes(+!copycount)) - !copycount #= !copycount+1 - endif -endmacro +MSUCode = $00277E ;@ pushpc -org $008901 -LDA.b #SPCData : STA $00 -LDA.b #SPCData>>8 : STA $01 -LDA.b #SPCData>>16 : STA $02 -;@ pullpc -SPCData: -;@ check bankcross off -%copybin($0C8000, $7BCA) - -!SPCEngineStart = $0800 -!SPCCodeStart = $07A7 - -dw ($0F9E+(!SPCEngineStart-!SPCCodeStart)) -dw !SPCCodeStart - -;@ pushpc -;@ pushbase - -arch spc700 -base !SPCCodeStart -org $34FBCE;-(!SPCEngineStart-!SPCCodeStart) -NewSPCCode: - -SpecialCommand_Mute: -CMP A,#$F0 ; The thing we overwrote -BNE + - JMP $0A81 ; SilenceSong -+ -CMP A,#$FA ; New mute command $FA -BNE + - MOV $F4,A - MOV A,#$00 - MOV $0A4A,A ; $0A49: MOV A,#$70 -> MOV A,#$00 - MOV $0AF3,A ; $0AF2: MOV $059,#$C0 -> MOV $059,#$00 - MOV $0C32,A ; $0C32: MOVW $058,YA -> NOP #2 - MOV $0C33,A - MOV A,#$C4 ; $0D19: MOVW $058,YA -> MOV A,$058 - MOV $0D19,A - MOV A,#$58 - MOV $0D1A,A - BRA +++ -+ -CMP A,#$FB ; New unmute command $FB -BEQ + - JMP $0A9D ; NewSongInput -+ -MOV $F4,A -MOV A,#$70 -MOV $0A4A,A ; $0A49: MOV A,#$70 -MOV A,#$C0 -MOV $0AF3,A ; $0AF2: MOV $059,#$C0 -MOV A,#$DA -MOV $0C32,A ; $0C32: MOVW $058,YA -MOV $0D19,A ; $0D19: MOVW $058,YA -MOV A,#$58 -MOV $0C33,A -MOV $0D1A,A -+++ -CALL $0A81 ; SilenceSong -- : MOV A,$F4 - BNE - - CMP A,$F4 - BNE - -MOV $F4,$00 -RET - -org !SPCEngineStart - -arch 65816 -SPCEngineStart: -;@ pullbase -;@ pullpc -skip !SPCEngineStart-!SPCCodeStart -%copybin($0CFBCE, $57B2) -SPCEngineEnd: -;@ check bankcross on ; Change track 15 (unused) to point to 13 (Death Mountain) so dark woods can be track 15 ; Bank 1 org $1A9F15 ; PC 0x0D1F15 ; SPC $D01C - dw #$2B00 ; Set track 15 pointer to track 13's data + dw $2B00 ; Set track 15 pointer to track 13's data -; Bank 2 -org $359F6E ; PC 0x1A9F6E ; SPC $D01C - dw #$2B00 ; Set track 15 pointer to track 13's data +pullpc + +;--------------------------------------------------------------------------------------------------- arch spc700 -org $34FE9A ; PC 0x1A7E9A ; SPC $0A73 - JMP !SPCCodeStart : NOP + +;@ pushpc +;@ pushbase +org $19FE41 ; SPC 0A73 + JMP MSUCode + +; Hijack unreachable SFX data for globally available code +org $1A9B2E +base MSUCode + +SpecialCommand_Mute: + CMP A,#$F0 ; The thing we overwrote + BNE + + JMP $0A81 ; SilenceSong + + + CMP A,#$FA ; New mute command $FA + BNE + + MOV $F4,A + MOV A,#$00 + MOV $0A4A,A ; $0A49: MOV A,#$70 -> MOV A,#$00 + MOV $0AF3,A ; $0AF2: MOV $059,#$C0 -> MOV $059,#$00 + MOV $0C32,A ; $0C32: MOVW $058,YA -> NOP #2 + MOV $0C33,A + MOV A,#$C4 ; $0D19: MOVW $058,YA -> MOV A,$058 + MOV $0D19,A + MOV A,#$58 + MOV $0D1A,A + BRA +++ + + + CMP A,#$FB ; New unmute command $FB + BEQ + + JMP $0A9D ; NewSongInput + + + MOV $F4,A + MOV A,#$70 + MOV $0A4A,A ; $0A49: MOV A,#$70 + MOV A,#$C0 + MOV $0AF3,A ; $0AF2: MOV $059,#$C0 + MOV A,#$DA + MOV $0C32,A ; $0C32: MOVW $058,YA + MOV $0D19,A ; $0D19: MOVW $058,YA + MOV A,#$58 + MOV $0C33,A + MOV $0D1A,A + +++ + CALL $0A81 ; SilenceSong +- MOV A,$F4 + BNE - + CMP A,$F4 + BNE - + MOV $F4,$00 + RET + +warnpc $1A9B91 + +;@ pullbase +;@ pullpc + arch 65816 From 5fc5dc13b255e10139a600956eb46c4dc28bd04a Mon Sep 17 00:00:00 2001 From: cassidy Date: Tue, 7 Dec 2021 15:29:30 -0500 Subject: [PATCH 04/14] Add ROM version to unused hw vector and before filename in SRAM Two 16 bit ints located at $FFE0 (0x7FE0 PC) in ROM and burned into SRAM starting at $701FFC, just before the ROM name --- LTTP_RND_GeneralBugfixes.asm | 9 +++++++++ init.asm | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 9960257..a9c3585 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -27,6 +27,15 @@ db #$00 ; expand file to 2mb org $1FFFF8 ; <- FFFF8 timestamp rom db #$20, #$19, #$08, #$31 ; year/month/day +;================================================================================ +!ROM_VERSION_LOW = 1 ; ROM version (two 16-bit integers) +!ROM_VERSION_HIGH = 1 ; + +org $00FFE0 ; Unused hardware vector +RomVersion: +dw !ROM_VERSION_LOW +dw !ROM_VERSION_HIGH + ;================================================================================ !ADD = "CLC : ADC" diff --git a/init.asm b/init.asm index 340c4a9..8fc9a65 100644 --- a/init.asm +++ b/init.asm @@ -1,3 +1,5 @@ +RomVersionSRAM = $701FFC + ;-------------------------------------------------------------------------------- ; Init_Primary ;-------------------------------------------------------------------------------- @@ -39,6 +41,11 @@ Init_Primary: LDA $00FFC0, X : STA $702000, X INX CPX #$15 : !BLT - + LDX #$00 + - + LDA RomVersion, X : STA RomVersionSRAM, X + INX + CPX #$04 : !BLT - .done REP #$20 @@ -63,4 +70,4 @@ Init_PostRAMClear: JSL MSUInit JSL InitRNGPointerTable -JML $00D463 ; The original target of the jump table that we hijacked \ No newline at end of file +JML $00D463 ; The original target of the jump table that we hijacked From c82edadadde0bd7fe8b04962773f834eaafd577b Mon Sep 17 00:00:00 2001 From: cassidy Date: Tue, 7 Dec 2021 15:45:22 -0500 Subject: [PATCH 05/14] Change version defines to use ?= operator Now these defines can be set via CLI, otherwise will be what they are in the file --- LTTP_RND_GeneralBugfixes.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index a9c3585..20030f6 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -28,8 +28,8 @@ org $1FFFF8 ; <- FFFF8 timestamp rom db #$20, #$19, #$08, #$31 ; year/month/day ;================================================================================ -!ROM_VERSION_LOW = 1 ; ROM version (two 16-bit integers) -!ROM_VERSION_HIGH = 1 ; +!ROM_VERSION_LOW ?= 1 ; ROM version (two 16-bit integers) +!ROM_VERSION_HIGH ?= 1 ; org $00FFE0 ; Unused hardware vector RomVersion: From aa6aaffd2f7dfe30d725e395360534f07207b378 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 15 Dec 2021 01:11:26 -0500 Subject: [PATCH 06/14] prevent crashes --- compasses.asm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compasses.asm b/compasses.asm index 37295c2..4308465 100644 --- a/compasses.asm +++ b/compasses.asm @@ -14,7 +14,13 @@ endmacro DrawDungeonCompassCounts: LDX $1B : BNE + : RTL : + ; Skip if outdoors - LDX $040C : CPX.b #$FF : BEQ .done ; Skip if not in a dungeon + + ; extra hard safeties for getting dungeon ID to prevent crashes + PHA + LDA.w $040C : AND.w #$00FE : TAX ; force dungeon ID to be multiple of 2 + PLA + + CPX.b #$1B : BCS .done ; Skip if not in a valid dungeon ID CMP.w #$0002 : BEQ ++ ; if CompassMode==2, we don't check for the compass LDA $7EF364 : AND.l DungeonItemMasks, X ; Load compass values to A, mask with dungeon item masks From 04fa0fc1a19339a42c92ef232a8c37fd7d9ae23b Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Mon, 20 Dec 2021 16:42:56 -0500 Subject: [PATCH 07/14] match expected usage --- bugfixes.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bugfixes.asm b/bugfixes.asm index b5ee34b..0b50407 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -127,12 +127,12 @@ RTS ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- -;Fix for SQ jumping causing accidental Exploration Glitch +; Fix for SQ jumping causing accidental Exploration Glitch SQEGFix: - LDA Bugfix_PodEG : BNE .done - STZ $047A ;disarm exploration glitch - .done -RTL + LDA.l Bugfix_PodEG : BEQ ++ + STZ.w $047A ; disarm exploration glitch +++ RTL + ;-------------------------------------------------------------------------------- ; Fix crystal not spawning when using somaria vs boss TryToSpawnCrystalUntilSuccess: From 2a3d6fae5824f4a3bdcc7c23ff8a3a123686ce08 Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Mon, 3 Jan 2022 13:55:03 -0600 Subject: [PATCH 08/14] update credits --- stats/creditsnew.asm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stats/creditsnew.asm b/stats/creditsnew.asm index 923c687..d57270b 100644 --- a/stats/creditsnew.asm +++ b/stats/creditsnew.asm @@ -522,6 +522,10 @@ CreditsLineBlank: %blankline() +%bigcredits("PINKUS YUZUHARA") + +%blankline() + %bigcredits("SAKURATSUBASA") %blankline() @@ -562,9 +566,6 @@ CreditsLineBlank: %emptyline() %emptyline() %emptyline() -%emptyline() -%emptyline() -%emptyline() ;=================================================================================================== From 6d72a1a9c2ca02033247b52b222813fe0b00c087 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Wed, 12 Jan 2022 20:31:27 -0500 Subject: [PATCH 09/14] Fix reading starting area offset to prevent indexing out of bounds --- entrances.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrances.asm b/entrances.asm index 35db47e..9d6f59b 100644 --- a/entrances.asm +++ b/entrances.asm @@ -80,8 +80,8 @@ AllowStartFromSingleEntranceCave: LDA $7EF3C8 : AND.w #$00FF ; What we wrote over PHA TAX - LDA.l StartingAreaExitOffset, X + AND.w #$00FF BNE + JMP .done From 1d378211ba67b7f2fe30c9abd07901ba27370b2f Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Thu, 13 Jan 2022 15:51:50 -0500 Subject: [PATCH 10/14] Initialize overworld door frame data when starting in single-exit cave --- entrances.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrances.asm b/entrances.asm index 9d6f59b..7f993dc 100644 --- a/entrances.asm +++ b/entrances.asm @@ -124,10 +124,10 @@ AllowStartFromSingleEntranceCave: STZ $0699 ;zero out door overlays in case starting overworld door is not set SEP #$20 ; set 8-bit accumulator - LDX $00 + LDA $7EF3C8 : TAX LDA.l StartingAreaOverworldDoor, X : STA.l $7F5099 ;Load overworld door - REP #$20 ; reset 16-bit accumulator + JSL.l CacheDoorFrameData .done PLA From b392eb7554a5128d97b4020731ee5cebc11f9771 Mon Sep 17 00:00:00 2001 From: Thomas Backmark Date: Tue, 18 Jan 2022 11:10:14 +0100 Subject: [PATCH 11/14] Improved text renderer with lowercase letters --- LTTP_RND_GeneralBugfixes.asm | 7 + hooks.asm | 31 +++ newfont.bin | Bin 0 -> 4096 bytes newfont_inverted.bin | Bin 0 -> 4096 bytes textrenderer.asm | 433 +++++++++++++++++++++++++++++++++++ 5 files changed, 471 insertions(+) create mode 100644 newfont.bin create mode 100644 newfont_inverted.bin create mode 100644 textrenderer.asm diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 20030f6..5ec7c31 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -218,6 +218,7 @@ incsrc darkroomitems.asm incsrc fastcredits.asm incsrc msu.asm incsrc dungeonmap.asm +incsrc textrenderer.asm warnpc $A58000 ;org $228000 ; contrib area @@ -305,6 +306,12 @@ org $339600 BossMapIconGFX: incbin bossicons.4bpp +org $339C00 +NewFont: +incbin newfont.bin +NewFontInverted: +incbin newfont_inverted.bin + org $328000 Extra_Text_Table: incsrc itemtext.asm diff --git a/hooks.asm b/hooks.asm index f0534dd..e2af74e 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2742,3 +2742,34 @@ org $01C4B8 : JSL FixJingleGlitch org $01C536 : JSL FixJingleGlitch org $01C592 : JSL FixJingleGlitch org $01C65F : JSL FixJingleGlitch + +;================================================================================ +; Text Renderer +;-------------------------------------------------------------------------------- +org $0EF51B + JML RenderCharExtended +org $0EF520 + RenderCharExtended_returnOriginal: +org $0EF567 + RenderCharExtended_returnUncompressed: + +org $0EF356 + JSL RenderCharLookupWidth +org $0EF3BA + JSL RenderCharLookupWidth +org $0EF48E + JML RenderCharLookupWidthDraw +org $0EF499 + RenderCharLookupWidthDraw_return: + +org $0EF6AA + JML RenderCharToMapExtended +org $0EF6C2 + RenderCharToMapExtended_return: + +org $0EFA50 + JSL RenderCharSetColorExtended +org $0EEE5D + JSL RenderCharSetColorExtended_init +org $0EF285 + JSL RenderCharSetColorExtended_close : NOP diff --git a/newfont.bin b/newfont.bin new file mode 100644 index 0000000000000000000000000000000000000000..ee9a4526b77b0afe5f89f15c2b0331d6649bf6c9 GIT binary patch literal 4096 zcmeHKU1$_n6u!yoZjDP;Y^4*}?ugwgNGQ`Jn3asXMnZ@Znm$wzpT=$2ln`~*B5S*y zag(qp2*#v=1Wne5LMf&6p?#d1k8CyUXSbTtAbabP2qaF z*rTSTs523V#5zAu#H2qpGC7jZAg&19ized7VlH|1WKN$Ro*qWb>z_S&_9S9=f7;LM zUru+=QUzVt^RcWA_>xx8NTa0cfL(2pk7nnclN7X^j`oc4bQQn_?ZOeVS%@2e>-QtC zqf$!RMA@Q#Sx^V0dpR?o}l z1C@V`k5^vsPO#?g{NodOS0VA@K~%$bTQEIG@Hd&m}Jo&LwZ`!u+`Tr+AmtQ&01OyK%no zw+gsEzUTu^tY?&y*EzkU4!;t2>{HV1)}LCh^j_(`518wo*V_tqgHpe8OW}GN&5mcz zq$jk?yNjStRRVw1jEv}0`V^-*;5(uBHyqfUUez+h{_Xp>qkpN{2hDPgEd%NjMATpN z8peX9TqTI9KTr7=;?I{S#G%LloTpD&Qe1mOuzvmesuR_$=!p$F^$-yoA@^~yB~1C} ze#cJ4^+=O4;jWKeP5n>bsLNfs>z`M?;&_2sr2cgCN&P*WDy%X;mujh@qd7|drZ(4PX9&wWOf0Y|X6eVqyUoSAnIy`9V4H1L+Wpc=eG55C=qyf6Hq< zU45NbdJ&sqJkw~!i&bD298^DUJ=F3&NjqL@-4JuM`3HUH_+W?)K`Z3v0&PoULGs zi*@a1JB&BdvqKh2Xh<4R`rG&JK&d7C=5lbw-*VT>_gF>uJbZm3xI1ye$tUskC2fs) zNyGTB@dbVB{5$=d<(<&aSH-8&pAgX{rO`tEkj18^O-)!6Pa4-Y;(k~U{7xc#FnTb0 zCz{jmM164kL>fBQYx1$?-y#d~BHUIp+PQQd7{O;zy`haeLP8F7g|^8F<`iCDn$=+JJL9zI-rqG&TmwZ{%#u z|Aa<V}8@Sm@1tyzZsv!lEYn2VL8Hx zI39fa>DvZhH*YJ)omjK2E+{sH@w{G)(v&A-hWN4V>we574(>(d+!@V#ACmk_{kncp vf2`kEb!Uy)6jvtQub3(P4}kfa*JJ*u@Bey?|F`gq9qaGKcoBjBGXj4DxZLNW literal 0 HcmV?d00001 diff --git a/newfont_inverted.bin b/newfont_inverted.bin new file mode 100644 index 0000000000000000000000000000000000000000..13323eecf17ef1a9fb66dbf4e6badf25573c098c GIT binary patch literal 4096 zcmeHKU1$_n6u#Nj-5Q6C*h(j`-4SamNGQ`Jn3b#P!JMc3db)o9s(X5Rj>_xF zJyKfQij&e}WSu+Nc_=@2X>2-MptMPKp}r|fKS>o&ozwH9Gov%Ue0uKGxl`vT?dj+G z0`}?oz+F}e@h#6y5Qh-$idJG0$wi_Q;!87rZd{wEw<+m)g8N+>?`FdO($R}-PtOfv zfUE2DF{|O5PVT|;sohoF0s3-;WDD8C*!0*XT*31_%elVMnN-o8$k+2nFS;6$_V3H? zpPS(K<@ftH{{;CEV=una{Xo3xo);)u&%CtiIE8ko6P+>g(T?N9@C0yuQYj zWokK(hkG_=5uWIu&+>~|0pI&9-e@_Wj{xm##63U&um0=h-MYfx+InZ_`}%6{&u{<{ z${T)s*wX6QC61qr_WeimOIgl=t=?`zC<+8AMYBZ5d|n6jkLbD zrMs_d0BQz@m7TOh%a3BRD7D&|L0i$Oh465^FwF{1Q=G9G>-2F zzIf-WL!TX)J~BNr+q*z|H$3=cbn4hbuPIt41_%<|ua!6re6$-dz9Y!TwFWvG zj)|(Qsr~8?#u?)bsgx6@U`6Z??f0A}rwLHPcw2w#xU6;et^c6Qg8h|pa&|cJeYWtp zc?sW-DBzt+)QAz)<$K5{7O{z~IThU+VgAQ2i?3H-?t9!SbVzAG9u$EpL-YR6~UqkeC(A zT(Tyug1u}zo)qXuG}*Ct$KH-XWk?zk6?`W#68BmmHjW*_eo)V2=i^rvU^TTHF&pC# zxIyi9@q=?aq;1k0WEb!`x2%*mLne~YT0WmL{n)*YO+)33CvRdu=-Q1QKsxbb)RHw> z6P2h$L=ukuxzzEv*=#WdL<8&)YDbr`9jum(s7fHJM9w+a9ow-S(#tD-#{f?ot9jOsGd}I>16) + sta $02 + pla : sta $03 + lda #(NewFont>>16) + sta $05 + jml RenderCharToMapExtended_return + +RenderCharLookupWidthDraw: + rep #$30 + phx : lda $09 : and #$fffe : tax + lda.l FontProperties, x + bmi .thin +.wide + plx : sep #$30 + lda $09 : and #$03 : tay + lda $fd7c, y : tay + jml RenderCharLookupWidthDraw_return +.thin + xba : and #$004f : bne .vwf + plx : sep #$30 + lda $09 : and #$03 : phx : tax + lda.l RenderCharThinTable, x : tay : plx + jml RenderCharLookupWidthDraw_return +.vwf + and #$000f : tay + plx : sep #$30 + lda $09 : and #$03 : phx : tax + cpx #$00 : bne + + tya : bra ++ ++ lda.l RenderCharThinTable, x +++ tay : plx : jml RenderCharLookupWidthDraw_return + + +RenderCharLookupWidth: + phx : lda $09 : and #$fffe : tax + lda.l FontProperties, x + bmi .thin +.wide + plx : lda $fd7c, x : clc + rtl +.thin + xba : and #$004f : bne .vwf + plx : lda.l RenderCharThinTable, x : clc + rtl +.vwf + and #$000f + plx : cpx #$0000 : beq + : lda.l RenderCharThinTable, x ++ clc : rtl + +RenderCharThinTable: + db $08, $00, $ff + +RenderCharExtended: + pha + asl : asl : tax + lda.l FontProperties, x + and #$00ff + bne .renderUncompressed + +.renderOriginal + pla : asl : tax : asl : adc $0e + jml RenderCharExtended_returnOriginal + +.renderUncompressed + pla : phb : pea.w NewFont>>8 : plb : plb + lda.l FontProperties+$2, x + tay + + lda !INVERTED_TEMP + bne .inverted + + ldx #$00000 +- + lda.w NewFont, y + sta.l $7EBFC0, x + lda.w NewFont+$100, y + sta.l $7EBFC0+$16, x + inx #2 + iny #2 + cpx #$0010 + bne - + bra .end + +.inverted + ldx #$00000 +- + lda.w NewFontInverted, y + sta.l $7EBFC0, x + lda.w NewFontInverted+$100, y + sta.l $7EBFC0+$16, x + inx #2 + iny #2 + cpx #$0010 + bne - + +.end + plb + jml RenderCharExtended_returnUncompressed + +; Table of font properties and tilemap offset +; Properties are these for now: +; tv--wwww -------u +; t = thin spacing (0 px instead of 3 px) +; u = uncompressed character loaded from offset +; v = use variable width rendering for this character (thin spacing must be set as well) +; w = character width for VWF rendering + +FontProperties: +; props, offset + dw $0000, $0000 ; 00 + dw $0000, $0000 ; 01 + dw $0000, $0000 ; 02 + dw $0000, $0000 ; 03 + dw $0000, $0000 ; 04 + dw $0000, $0000 ; 05 + dw $0000, $0000 ; 06 + dw $0000, $0000 ; 07 + dw $0000, $0000 ; 08 + dw $0000, $0000 ; 09 + dw $0000, $0000 ; 0A + dw $0000, $0000 ; 0B + dw $0000, $0000 ; 0C + dw $0000, $0000 ; 0D + dw $0000, $0000 ; 0E + dw $0000, $0000 ; 0F + + dw $0000, $0000 ; 10 + dw $0000, $0000 ; 11 + dw $0000, $0000 ; 12 + dw $0000, $0000 ; 13 + dw $0000, $0000 ; 14 + dw $0000, $0000 ; 15 + dw $0000, $0000 ; 16 + dw $0000, $0000 ; 17 + dw $0000, $0000 ; 18 + dw $0000, $0000 ; 19 + dw $0000, $0000 ; 1A + dw $0000, $0000 ; 1B + dw $0000, $0000 ; 1C + dw $0000, $0000 ; 1D + dw $0000, $0000 ; 1E + dw $0000, $0000 ; 1F + + dw $0000, $0000 ; 20 + dw $0000, $0000 ; 21 + dw $0000, $0000 ; 22 + dw $0000, $0000 ; 23 + dw $0000, $0000 ; 24 + dw $0000, $0000 ; 25 + dw $0000, $0000 ; 26 + dw $0000, $0000 ; 27 + dw $0000, $0000 ; 28 + dw $0000, $0000 ; 29 + dw $0000, $0000 ; 2A + dw $0000, $0000 ; 2B + dw $0000, $0000 ; 2C + dw $0000, $0000 ; 2D + dw $0000, $0000 ; 2E + dw $0000, $0000 ; 2F + + dw $8001, $0400 ; 30 ; a + dw $8001, $0410 ; 31 + dw $8001, $0420 ; 32 + dw $8001, $0430 ; 33 + dw $8001, $0440 ; 34 + dw $8001, $0450 ; 35 + dw $8001, $0460 ; 36 + dw $8001, $0470 ; 37 + dw $8001, $0480 ; 38 + dw $8001, $0490 ; 39 + dw $8001, $04A0 ; 3A + dw $8001, $04B0 ; 3B + dw $8001, $04C0 ; 3C + dw $8001, $04D0 ; 3D + dw $8001, $04E0 ; 3E + dw $8001, $04F0 ; 3F + + dw $8001, $0600 ; 40 + dw $8001, $0610 ; 41 + dw $8001, $0620 ; 42 + dw $8001, $0630 ; 43 + dw $8001, $0640 ; 44 + dw $8001, $0650 ; 45 + dw $8001, $0660 ; 46 + dw $8001, $0670 ; 47 + dw $8001, $0680 ; 48 + dw $8001, $0690 ; 49 ; z + dw $8001, $06F0 ; 4A ; : + dw $8001, $0A90 ; 4B ; @ (thin) + dw $8001, $0AA0 ; 4C ; # (thin) + dw $0000, $0000 ; 4D + dw $0000, $0000 ; 4E + dw $8001, $0EF0 ; 4F ; + + dw $0000, $0000 ; 50 + dw $0000, $0000 ; 51 + dw $0000, $0000 ; 52 + dw $0000, $0000 ; 53 + dw $0000, $0000 ; 54 + dw $0000, $0000 ; 55 + dw $0000, $0000 ; 56 + dw $0000, $0000 ; 57 + dw $0000, $0000 ; 58 + dw $0000, $0000 ; 59 + dw $0000, $0000 ; 5A + dw $0000, $0000 ; 5B + dw $0000, $0000 ; 5C + dw $0000, $0000 ; 5D + dw $0000, $0000 ; 5E + dw $0000, $0000 ; 5F + + dw $0000, $0000 ; 60 + dw $0000, $0000 ; 61 + dw $0000, $0000 ; 62 + dw $0000, $0000 ; 63 + dw $0000, $0000 ; 64 + dw $0000, $0000 ; 65 + dw $0000, $0000 ; 66 + dw $0000, $0000 ; 67 + dw $0000, $0000 ; 68 + dw $0000, $0000 ; 69 + dw $0000, $0000 ; 6A + dw $0000, $0000 ; 6B + dw $0000, $0000 ; 6C + dw $0000, $0000 ; 6D + dw $0000, $0000 ; 6E + dw $0000, $0000 ; 6F + + dw $0000, $0000 ; 70 + dw $0000, $0000 ; 71 + dw $0000, $0000 ; 72 + dw $0000, $0000 ; 73 + dw $0000, $0000 ; 74 + dw $0000, $0000 ; 75 + dw $0000, $0000 ; 76 + dw $0000, $0000 ; 77 + dw $0000, $0000 ; 78 + dw $0000, $0000 ; 79 + dw $0000, $0000 ; 7A + dw $0000, $0000 ; 7B + dw $0000, $0000 ; 7C + dw $0000, $0000 ; 7D + dw $0000, $0000 ; 7E + dw $0000, $0000 ; 7F + + dw $0000, $0000 ; 80 + dw $0000, $0000 ; 81 + dw $0000, $0000 ; 82 + dw $0000, $0000 ; 83 + dw $0000, $0000 ; 84 + dw $0000, $0000 ; 85 + dw $0000, $0000 ; 86 + dw $0000, $0000 ; 87 + dw $0000, $0000 ; 88 + dw $0000, $0000 ; 89 + dw $0000, $0000 ; 8A + dw $0000, $0000 ; 8B + dw $0000, $0000 ; 8C + dw $0000, $0000 ; 8D + dw $0000, $0000 ; 8E + dw $0000, $0000 ; 8F + + dw $0000, $0000 ; 90 + dw $0000, $0000 ; 91 + dw $0000, $0000 ; 92 + dw $0000, $0000 ; 93 + dw $0000, $0000 ; 94 + dw $0000, $0000 ; 95 + dw $0000, $0000 ; 96 + dw $0000, $0000 ; 97 + dw $0000, $0000 ; 98 + dw $0000, $0000 ; 99 + dw $0000, $0000 ; 9A + dw $0000, $0000 ; 9B + dw $0000, $0000 ; 9C + dw $0000, $0000 ; 9D + dw $0000, $0000 ; 9E + dw $0000, $0000 ; 9F + + dw $8001, $0800 ; A0 ; 0 + dw $8001, $0810 ; A1 + dw $8001, $0820 ; A2 + dw $8001, $0830 ; A3 + dw $8001, $0840 ; A4 + dw $8001, $0850 ; A5 + dw $8001, $0860 ; A6 + dw $8001, $0870 ; A7 + dw $8001, $0880 ; A8 + dw $8001, $0890 ; A9 ; 9 + dw $8001, $0000 ; AA ; A + dw $8001, $0010 ; AB + dw $8001, $0020 ; AC + dw $8001, $0030 ; AD + dw $8001, $0040 ; AE + dw $8001, $0050 ; AF + + dw $8001, $0060 ; B0 + dw $8001, $0070 ; B1 + dw $8001, $0080 ; B2 + dw $8001, $0090 ; B3 + dw $8001, $00A0 ; B4 + dw $8001, $00B0 ; B5 + dw $8001, $00C0 ; B6 + dw $8001, $00D0 ; B7 + dw $8001, $00E0 ; B8 + dw $8001, $00F0 ; B9 + dw $8001, $0200 ; BA + dw $8001, $0210 ; BB + dw $8001, $0220 ; BC + dw $8001, $0230 ; BD + dw $8001, $0240 ; BE + dw $8001, $0250 ; BF + + dw $8001, $0260 ; C0 + dw $8001, $0270 ; C1 + dw $8001, $0280 ; C2 + dw $8001, $0290 ; C3 ; Z + dw $8000, $0000 ; C4 + dw $8000, $0000 ; C5 + dw $8001, $06D0 ; C6 ; ? + dw $8001, $06C0 ; C7 ; ! + dw $8001, $02D0 ; C8 ; , + dw $8001, $02B0 ; C9 ; - + dw $8000, $0000 ; CA + dw $8000, $0000 ; CB + dw $8000, $02E0 ; CC ; ... + dw $8001, $02C0 ; CD ; . + dw $8001, $02F0 ; CE ; ~ + dw $8000, $0000 ; CF + + dw $0000, $0000 ; D0 + dw $0000, $0000 ; D1 + dw $8001, $06a0 ; D2 ; Link face left + dw $8001, $06b0 ; D3 ; Link face right + dw $0000, $0000 ; D4 + dw $0000, $0000 ; D5 + dw $0000, $0000 ; D6 + dw $0000, $0000 ; D7 + dw $8001, $06E0 ; D8 ; ' + dw $0000, $0000 ; D9 + dw $0000, $0000 ; DA + dw $0000, $0000 ; DB + dw $0000, $0000 ; DC + dw $0000, $0000 ; DD + dw $0000, $0000 ; DE + dw $0000, $0000 ; DF + + dw $0000, $0000 ; E0 + dw $0000, $0000 ; E1 + dw $0000, $0000 ; E2 + dw $0000, $0000 ; E3 + dw $8001, $02A0 ; E4 ; Cursor |> + dw $0000, $0000 ; E5 + dw $0000, $0000 ; E6 + dw $0000, $0000 ; E7 + dw $0000, $0000 ; E8 + dw $0000, $0000 ; E9 + dw $0000, $0000 ; EA + dw $0000, $0000 ; EB + dw $0000, $0000 ; EC + dw $0000, $0000 ; ED + dw $0000, $0000 ; EE + dw $0000, $0000 ; EF + + dw $0000, $0000 ; F0 + dw $0000, $0000 ; F1 + dw $0000, $0000 ; F2 + dw $0000, $0000 ; F3 + dw $0000, $0000 ; F4 + dw $0000, $0000 ; F5 + dw $0000, $0000 ; F6 + dw $0000, $0000 ; F7 + dw $0000, $0000 ; F8 + dw $0000, $0000 ; F9 + dw $0000, $0000 ; FA + dw $0000, $0000 ; FB + dw $0000, $0000 ; FC + dw $0000, $0000 ; FD + dw $0000, $0000 ; FE + dw $8001, $0EF0 ; FF ; \ No newline at end of file From f3d1e99421fd1a96b7f872f6e28e976af4c57dcc Mon Sep 17 00:00:00 2001 From: Catobat <69204835+Catobat@users.noreply.github.com> Date: Wed, 19 Jan 2022 19:52:01 +0100 Subject: [PATCH 12/14] Fix Tower of Hera boss music bug --- hooks.asm | 4 ++-- music.asm | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hooks.asm b/hooks.asm index f0534dd..f0fa654 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1858,12 +1858,12 @@ NOP #8 ;JSL.l OnLoadMap ;================================================================================ org $028B8F ; <- 10B8F - Bank02.asm:2236 (LDA $7EF374 : LSR A : BCS BRANCH_BETA) -LDA $7EF00F : BNE + : NOP +JSL CheckHeraBossDefeated : BNE + : NOP LDX.b #$F1 : STX $012C + ;================================================================================ org $029090 ; <- 11090 - Bank02.asm:3099 (LDA $7EF374 : LSR A : BCS BRANCH_GAMMA) -LDA $7EF00F : BNE + : NOP +JSL CheckHeraBossDefeated : BNE + : NOP STX $012C ; DON'T MOVE THIS FORWARD OR MADNESS AWAITS + ;================================================================================ diff --git a/music.asm b/music.asm index 7973a49..f418dde 100644 --- a/music.asm +++ b/music.asm @@ -283,3 +283,10 @@ Overworld_MosaicDarkWorldChecks: .done RTL ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; Check if the boss in ToH has been defeated (16-bit accumulator) +CheckHeraBossDefeated: + LDA $7EF00F : AND #$00FF + RTL +;-------------------------------------------------------------------------------- From 78148fb4f3cdbc8df8d0c00b2de71f4ac69dcbbb Mon Sep 17 00:00:00 2001 From: Catobat <69204835+Catobat@users.noreply.github.com> Date: Thu, 20 Jan 2022 01:30:21 +0100 Subject: [PATCH 13/14] Fix witch item bug --- LTTP_RND_GeneralBugfixes.asm | 3 ++- bugfixes.asm | 7 +++++++ hooks.asm | 16 ++++++++++++++++ stats.asm | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 20030f6..1b5b6ea 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -343,7 +343,8 @@ warnpc $B08000 ;$3B reserved for downstream use ;$3F reserved for internal debugging ;================================================================================ -;RAM +;RAM +;$7E021B[0x1]: Used by race game instead of $0ABF to avoid witch item conflict ;$7EC900[0x1F00]: BIGRAM buffer ;$7EF000[0x500]: SRAM mirror First 0x500 bytes of SRAM ;$7F5000[0x800]: Rando's main free ram region diff --git a/bugfixes.asm b/bugfixes.asm index 0b50407..d438755 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -214,3 +214,10 @@ FixJingleGlitch: .exit RTL + +;-------------------------------------------------------------------------------- +SetOverworldTransitionFlags: + LDA #$01 + STA $0ABF ; used by witch + STA $021B ; used by race game + RTL diff --git a/hooks.asm b/hooks.asm index f0fa654..a04d542 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2525,6 +2525,22 @@ JSL ParadoxCaveGfxFix NOP ;================================================================================ +;================================================================================ +; Resolve conflict between race game and witch item +;-------------------------------------------------------------------------------- +; Change race game to use $021B instead of $0ABF for detecting cheating +org $0DCB9D ; STZ.w $0ABF +STZ $021B + +org $0DCBFE ; LDA.w $0ABF +LDA $021B + +org $02BFE0 ; LDA.b #$01 : STA.w $0ABF +JSL SetOverworldTransitionFlags +NOP +; For mirroring, the new flag is set in IncrementOWMirror in stats.asm +;================================================================================ + ;================================================================================ ; Player Sprite Fixes ;-------------------------------------------------------------------------------- diff --git a/stats.asm b/stats.asm index 40df03a..f8fc983 100644 --- a/stats.asm +++ b/stats.asm @@ -428,6 +428,7 @@ IncrementMagicUseCounterOne: !OW_MIRROR_COUNTER = "$7EF43A" IncrementOWMirror: PHA + LDA #$08 : STA $021B ; fail race game LDA !LOCK_STATS : BNE + LDA $7EF3CA : BEQ + ; only do this for DW->LW LDA !OW_MIRROR_COUNTER : INC : STA !OW_MIRROR_COUNTER From b46269b66254d7230a23e91dfd0b7add5f40ef57 Mon Sep 17 00:00:00 2001 From: Thomas Backmark Date: Thu, 20 Jan 2022 22:24:52 +0100 Subject: [PATCH 14/14] Moved the new text renderer behind a feature flag --- LTTP_RND_GeneralBugfixes.asm | 19 +++++++++----- hooks.asm | 50 +++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 5ec7c31..d7f0a14 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -105,6 +105,9 @@ dw !ROM_VERSION_HIGH function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0)) +; Feature flags, run asar with -DFEATURE_X=1 to enable +!FEATURE_NEW_TEXT ?= 0 + ;================================================================================ incsrc hooks.asm @@ -218,7 +221,9 @@ incsrc darkroomitems.asm incsrc fastcredits.asm incsrc msu.asm incsrc dungeonmap.asm -incsrc textrenderer.asm +if !FEATURE_NEW_TEXT + incsrc textrenderer.asm +endif warnpc $A58000 ;org $228000 ; contrib area @@ -306,11 +311,13 @@ org $339600 BossMapIconGFX: incbin bossicons.4bpp -org $339C00 -NewFont: -incbin newfont.bin -NewFontInverted: -incbin newfont_inverted.bin +if !FEATURE_NEW_TEXT + org $339C00 + NewFont: + incbin newfont.bin + NewFontInverted: + incbin newfont_inverted.bin +endif org $328000 Extra_Text_Table: diff --git a/hooks.asm b/hooks.asm index e2af74e..11e0f75 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2746,30 +2746,32 @@ org $01C65F : JSL FixJingleGlitch ;================================================================================ ; Text Renderer ;-------------------------------------------------------------------------------- -org $0EF51B - JML RenderCharExtended -org $0EF520 - RenderCharExtended_returnOriginal: -org $0EF567 - RenderCharExtended_returnUncompressed: +if !FEATURE_NEW_TEXT + org $0EF51B + JML RenderCharExtended + org $0EF520 + RenderCharExtended_returnOriginal: + org $0EF567 + RenderCharExtended_returnUncompressed: -org $0EF356 - JSL RenderCharLookupWidth -org $0EF3BA - JSL RenderCharLookupWidth -org $0EF48E - JML RenderCharLookupWidthDraw -org $0EF499 - RenderCharLookupWidthDraw_return: + org $0EF356 + JSL RenderCharLookupWidth + org $0EF3BA + JSL RenderCharLookupWidth + org $0EF48E + JML RenderCharLookupWidthDraw + org $0EF499 + RenderCharLookupWidthDraw_return: -org $0EF6AA - JML RenderCharToMapExtended -org $0EF6C2 - RenderCharToMapExtended_return: + org $0EF6AA + JML RenderCharToMapExtended + org $0EF6C2 + RenderCharToMapExtended_return: -org $0EFA50 - JSL RenderCharSetColorExtended -org $0EEE5D - JSL RenderCharSetColorExtended_init -org $0EF285 - JSL RenderCharSetColorExtended_close : NOP + org $0EFA50 + JSL RenderCharSetColorExtended + org $0EEE5D + JSL RenderCharSetColorExtended_init + org $0EF285 + JSL RenderCharSetColorExtended_close : NOP +endif \ No newline at end of file