From 31b49a71fba8f3cc05931570001779184c200dab Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Tue, 28 Oct 2025 22:24:59 -0700 Subject: [PATCH] add fast tekker patch --- notes/ar-codes.txt | 62 +++++++++++++++++++ src/Map.cc | 4 +- .../FastTekker/FastTekker.1___.patch.s | 24 +++++++ .../FastTekker/FastTekker.3___.patch.s | 21 +++++++ .../FastTekker/FastTekker.4___.patch.s | 34 ++++++++++ .../FastTekker/FastTekker.59NL.patch.s | 33 ++++++++++ 6 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 system/client-functions/FastTekker/FastTekker.1___.patch.s create mode 100644 system/client-functions/FastTekker/FastTekker.3___.patch.s create mode 100644 system/client-functions/FastTekker/FastTekker.4___.patch.s create mode 100644 system/client-functions/FastTekker/FastTekker.59NL.patch.s diff --git a/notes/ar-codes.txt b/notes/ar-codes.txt index 7b13e69b..a2b6e865 100644 --- a/notes/ar-codes.txt +++ b/notes/ar-codes.txt @@ -554,6 +554,68 @@ Heaven Punisher's special always works 3OE2 => 0412AD84 38800001 3OP0 => 0412AF5C 38800001 +Fast tekker (skips wind-up jingle) +1OJ1 => 8C15B0CA mov r1, 1 + 8C15B0E6 nop +1OJ2 => 8C162302 mov r1, 1 + 8C16231E nop +1OJ3 => 8C175E66 mov r1, 1 + 8C175E82 nop +1OJ4 => 8C1780AE mov r1, 1 + 8C1780CA nop +1OJF => 8C17600E mov r1, 1 + 8C17602A nop +1OEF => 8C17863E mov r1, 1 + 8C17865A nop +1OPF => 8C1783FA mov r1, 1 + 8C178416 nop +2OJ5 => 8C19BD4A mov r1, 1 + 8C19BD66 nop +2OJF => 8C19ADB6 mov r1, 1 + 8C19ADD2 nop +2OEF => 8C19BD4A mov r1, 1 + 8C19BD66 nop +2OPF => 8C19B7E2 mov r1, 1 + 8C19B7FE nop +2OJW => 005B14A3 mov dword [ebx + 0x150], 1 + 005B14BF jmp +0x0D +2OJZ => 005B0193 mov dword [ebx + 0x150], 1 + 005B01AF jmp +0x0D +3OJT => 0426FAE8 38000001 + 0426FB10 60000000 +3OJ2 => 0421F8CC 38000001 + 0421F8F4 60000000 +3OJ3 => 04220250 38000001 + 04220278 60000000 +3OJ4 => 04221154 38000001 + 0422117C 60000000 +3OJ5 => 04220EF0 38000001 + 04220F18 60000000 +3OE0 => 04220170 38000001 + 04220198 60000000 +3OE1 => 04220170 38000001 + 04220198 60000000 +3OE2 => 04221224 38000001 + 0422124C 60000000 +3OP0 => 04220ABC 38000001 + 04220AE4 60000000 +4OED => 0023EF3C mov dword [ebp + 0x14C], 1 + 0023EF57 jmp +0x0A +4OEU => 0023F0BC mov dword [ebp + 0x14C], 1 + 0023F0D7 jmp +0x0A +4OJB => 0023EC5C mov dword [ebp + 0x14C], 1 + 0023EC77 jmp +0x0A +4OJD => 0023EEAC mov dword [ebp + 0x14C], 1 + 0023EEC7 jmp +0x0A +4OJU => 0023F21C mov dword [ebp + 0x14C], 1 + 0023F237 jmp +0x0A +4OPD => 0023EF5C mov dword [ebp + 0x14C], 1 + 0023EF77 jmp +0x0A +4OPU => 0023F14C mov dword [ebp + 0x14C], 1 + 0023F167 jmp +0x0A +59NL => 006DA113 mov dword [edi + 0x14C], 1 + 006DA130 jmp +0x0B + Allow loading corrupted save files 3OJ2 => 041FC784 38600007 041FC788 4E800020 diff --git a/src/Map.cc b/src/Map.cc index b41973bb..3e80f145 100644 --- a/src/Map.cc +++ b/src/Map.cc @@ -2178,9 +2178,9 @@ static const vector dat_object_definitions({ {0x020F, F_V3_V4, 0x0000400C3F800000, "TOTrapChainSawDamage"}, // Laser detector trap. Params: - // param3 = model number (<= for small laser, > 0 for large laser) + // param3 = model number (<= 0 for small laser, > 0 for large laser) // param4 = switch flag number (enables this flag when triggered) - // param5-6: same as 0x020F (TOTrapChainSawDamage) + // param5-6 = same as 0x020F (TOTrapChainSawDamage) {0x0210, F_V3_V4, 0x0000400C3F800000, "TOTrapChainSawKey"}, // TODO: Describe this object. It's a subclass of TODragonfly and has the diff --git a/system/client-functions/FastTekker/FastTekker.1___.patch.s b/system/client-functions/FastTekker/FastTekker.1___.patch.s new file mode 100644 index 00000000..5cf7fe1b --- /dev/null +++ b/system/client-functions/FastTekker/FastTekker.1___.patch.s @@ -0,0 +1,24 @@ +.meta name="Fast tekker" +.meta description="Skips wind-up sound\nat tekker window" + +.versions 1OJ1 1OJ2 1OJ3 1OJ4 1OJF 1OEF 1OPF 2OJ5 2OJF 2OEF 2OPF + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksDC + + .align 4 + .data + .data 0x00000002 + mov r1, 1 + + .align 4 + .data + .data 0x00000002 + nop + + .align 4 + .data 0x00000000 + .data 0x00000000 diff --git a/system/client-functions/FastTekker/FastTekker.3___.patch.s b/system/client-functions/FastTekker/FastTekker.3___.patch.s new file mode 100644 index 00000000..579606b7 --- /dev/null +++ b/system/client-functions/FastTekker/FastTekker.3___.patch.s @@ -0,0 +1,21 @@ +.meta name="Fast tekker" +.meta description="Skips wind-up sound\nat tekker window" + +.versions 3OJT 3OJ2 3OJ3 3OJ4 3OJ5 3OE0 3OE1 3OE2 3OP0 + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksGC + + .data + .data 4 + li r0, 1 + + .data + .data 4 + nop + + .data 0x00000000 + .data 0x00000000 diff --git a/system/client-functions/FastTekker/FastTekker.4___.patch.s b/system/client-functions/FastTekker/FastTekker.4___.patch.s new file mode 100644 index 00000000..3896b214 --- /dev/null +++ b/system/client-functions/FastTekker/FastTekker.4___.patch.s @@ -0,0 +1,34 @@ +.meta name="Fast tekker" +.meta description="Skips wind-up sound\nat tekker window" + +.versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksXB + + .data + .deltaof patch1_start, patch1_end +patch1_start: + mov dword [ebp + 0x14C], 1 +patch1_end: + + .data + .deltaof patch2_start, patch2_end +patch2_start: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop +patch2_end: + + .data 0x00000000 + .data 0x00000000 diff --git a/system/client-functions/FastTekker/FastTekker.59NL.patch.s b/system/client-functions/FastTekker/FastTekker.59NL.patch.s new file mode 100644 index 00000000..df7ca989 --- /dev/null +++ b/system/client-functions/FastTekker/FastTekker.59NL.patch.s @@ -0,0 +1,33 @@ +.meta name="Fast tekker" +.meta description="Skips wind-up sound\nat tekker window" + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksBB + + .data 0x006DA113 + .deltaof patch1_start, patch1_end +patch1_start: + mov dword [edi + 0x14C], 1 +patch1_end: + + .data 0x006DA130 + .deltaof patch2_start, patch2_end +patch2_start: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop +patch2_end: + + .data 0x00000000 + .data 0x00000000