Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save richardgill/b8d717cb8e854aff9d2dcf68995595cc to your computer and use it in GitHub Desktop.

Select an option

Save richardgill/b8d717cb8e854aff9d2dcf68995595cc to your computer and use it in GitHub Desktop.
Mario Golf: Toadstool Tour (GFTE01) Dolphin Gecko codes: putting camera angles, airborne speedup, and widescreen instructions

Mario Golf: Toadstool Tour GFTE01 - airborne A speed-up Gecko

Target: US GameCube GFTE01 in Dolphin.

While A is held during confirmed ball flight (object + 0x4C == 2 and object + 0x98 > 2), the wrapper runs up to three extra stock ball updates. This gives roughly 4x flight simulation speed without directly scaling velocity.

Files

  • GFTE01-airborne-speedup-hold-a.gecko - standalone Gecko code
  • GFTE01-airborne-speedup-hold-a.ini - minimal Dolphin configuration
  • src/ball-update-wrapper-x4.s - PowerPC source
  • src/build-gecko.py - assembler and Gecko generator

Architecture

The permanent hook is at the stable ball_update entry 0x80417B00. It branches to a wrapper in the verified zero-filled code cave at 0x80157BD8.

The wrapper:

  1. Calls the original function body at 0x80417B04, including the displaced stwu r1,-0x2B8(r1) instruction.
  2. Preserves the caller-visible register state produced by that stock update.
  3. Checks A at 0x8026BB60, flight state at +0x4C, and the existing +0x98 > 2 gate.
  4. Calls the original function body up to three more times, rechecking flight state between calls.
  5. Restores the first update's register state and returns to the original caller.

Gecko 06 block writes install the hook and wrapper synchronously. The wrapper does not use the Gecko handler/codelist allocation below 0x80003000.

Ring Attack crash and fix

The previous implementation permanently hooked 0x80421494 and stored code and globals at 0x80002A60-0x80002D20. Ring Attack reproducibly failed at DTM frame 861 with execution escaping through 0x812FFFC8 into invalid instructions.

Isolation established:

  • Stock replay completed all 1,081 frames.
  • The old flag-setter hook alone completed the narrowed replay.
  • The old dispatcher hook failed even when extra updates were forcibly disabled.
  • An exact pass-through branch at 0x80421494 also failed.

0x80421494 is therefore not a safe permanent branch-hook site for Ring Attack. The old low-memory stubs also overlapped Gecko's reserved 0x80001800-0x80003000 handler/codelist area.

Moving the behavior to the ball_update entry wrapper removed both hazards. The fixed code completed the full 1,081-frame Ring Attack replay with dolphinCode = 0, no signal, and all requested frames observed.

A synthesized Ring Attack shot replay also verified the behavior. At frame 1,150 the patched ball had landed while the baseline ball was still airborne; both runs finished at 160.2 yards. The patched and baseline runs both completed all 1,500 frames without a crash.

Test artifacts:

/tmp/dolphin-testing/2026-07-27T18-37-07-481Z-ring-launch-2-final-config/summary.json
/tmp/dolphin-testing/2026-07-27T18-46-28-155Z-ring-airborne-hold-a-baseline/summary.json
/tmp/dolphin-testing/2026-07-27T18-47-34-459Z-ring-airborne-hold-a-patched/summary.json

Build

cd src
./build-gecko.sh

The generated Gecko code is canonical in GFTE01-airborne-speedup-hold-a.gecko.

$Airborne Speedup While Holding A
04417B48 4BBEAF18
04002A60 3D808000
04002A64 39200000
04002A68 912C2BC0
04002A6C 8123004C
04002A70 912C2BD4
04002A74 2C090002
04002A78 4082003C
04002A7C 81230098
04002A80 2C090002
04002A84 40810030
04002A88 3D808027
04002A8C A12CBB60
04002A90 3D808000
04002A94 912C2BD8
04002A98 71290100
04002A9C 41820018
04002AA0 39200001
04002AA4 912C2BC0
04002AA8 812C2BC4
04002AAC 39290001
04002AB0 912C2BC4
04002AB4 81230098
04002AB8 48415094
04421494 4BBE176C
04002C00 3D808000
04002C04 800C2BE0
04002C08 38000001
04002C0C 900C2BE0
04002C10 912C2BF8
04002C14 800C2BC0
04002C18 2C000001
04002C1C 40820100
04002C20 800C2BE4
04002C24 38000001
04002C28 900C2BE4
04002C2C 9421FF70
04002C30 7C0802A6
04002C34 90010094
04002C38 90610060
04002C3C 91410068
04002C40 9161006C
04002C44 91810070
04002C48 93E10074
04002C4C 3D808000
04002C50 93EC2BBC
04002C54 48000079
04002C58 40820044
04002C5C 3D808000
04002C60 906C2BF0
04002C64 900C2BF4
04002C68 800C2BE8
04002C6C 38000001
04002C70 900C2BE8
04002C74 48000099
04002C78 48000081
04002C7C 48000051
04002C80 4082001C
04002C84 48000089
04002C88 48000071
04002C8C 48000041
04002C90 4082000C
04002C94 48000079
04002C98 48000061
04002C9C 3D808000
04002CA0 83EC2BBC
04002CA4 813F001C
04002CA8 912C2BFC
04002CAC 81810070
04002CB0 8161006C
04002CB4 81410068
04002CB8 80610060
04002CBC 80010094
04002CC0 7C0803A6
04002CC4 38210090
04002CC8 48000054
04002CCC 3D808000
04002CD0 83EC2BBC
04002CD4 807F0008
04002CD8 2C030000
04002CDC 41820014
04002CE0 386300E8
04002CE4 8003004C
04002CE8 2C000002
04002CEC 4E800020
04002CF0 2C030001
04002CF4 4E800020
04002CF8 3D808000
04002CFC 816C2BEC
04002D00 396B0001
04002D04 916C2BEC
04002D08 4E800020
04002D0C 3D808041
04002D10 618C7B00
04002D14 7D8903A6
04002D18 4E800420
04002D1C 8009004C
04002D20 4841E778

Mario Golf: Toadstool Tour (USA) — GFTE01 Dolphin Gecko codes

Search terms: Mario Golf: Toadstool Tour, GFTE01, Dolphin, Gecko, putting camera angle, widescreen, Airborne Speedup While Holding A.

Target game:

Mario Golf: Toadstool Tour (USA)
Game ID: GFTE01
Platform: GameCube
Emulator tested: Dolphin

Included files

GFTE01-putting-camera-angle.gecko
GFTE01-putting-camera-angle-commented.md
GFTE01-airborne-speedup-hold-a.gecko
GFTE01-airborne-speedup-hold-a-commented.md
GFTE01-widescreen-16x9-gamemasterplc.s

Putting Camera Angle

This Gecko code lets you select the camera while the current club is the putter:

  • D-pad Left selects the preferred overhead rolling view.
  • D-pad Right selects the close tracking view.
  • D-pad Down selects a stock view mostly positioned behind the hole.
  • D-pad Up remains unchanged.

Each new directional press makes one selection. The natural putting-camera setup defaults back to the overhead view, and all views use the game's stock camera geometry so they adapt to the shot.

See GFTE01-putting-camera-angle-commented.md for architecture, proven game state, verification evidence, and build details.

Install in Dolphin:

  1. Open or create:

    ~/.local/share/dolphin-emu/GameSettings/GFTE01.ini
  2. Paste the contents of GFTE01-putting-camera-angle.gecko under [Gecko].

  3. Enable this exact code name under [Gecko_Enabled]:

    [Gecko_Enabled]
    $Putting Camera Angle

Airborne Speedup While Holding A

This Gecko code speeds up ball flight while holding A.

Behavior: while holding A during confirmed ball-flight state, the code runs up to three extra real ball updates per rendered frame. This gives roughly 4x flight simulation speed while preserving distance better than raw velocity scaling.

See GFTE01-airborne-speedup-hold-a-commented.md for architecture, crash-analysis evidence, verification, and build details.

Install in Dolphin:

  1. Open or create:

    ~/.local/share/dolphin-emu/GameSettings/GFTE01.ini
  2. Paste the contents of GFTE01-airborne-speedup-hold-a.gecko under [Gecko].

  3. Enable this exact code name under [Gecko_Enabled]:

    [Gecko_Enabled]
    $Airborne Speedup While Holding A

Widescreen instructions for GFTE01

The included GFTE01-widescreen-16x9-gamemasterplc.s is the PowerPC assembly source for the original 16:9 widescreen Gecko. When using the compiled widescreen Gecko in Dolphin, also add this per-game setting:

[Video_Settings]
SuggestedAspectRatio = 1

That setting is important in Dolphin. It tells Dolphin to treat GFTE01 as widescreen when using the Gecko code. Without it, Dolphin's automatic aspect-ratio heuristic can intermittently treat the output as 4:3 during transitions, causing frame dumps or display sizing like 640x492 instead of the expected widescreen-ish 780x448.

Install the widescreen setup by compiling/using the Gecko generated from GFTE01-widescreen-16x9-gamemasterplc.s, then merge this shape into GFTE01.ini:

[Video_Settings]
SuggestedAspectRatio = 1

[Gecko]
$widescreen
...

[Gecko_Enabled]
$widescreen

If you use all three codes, enable all three:

[Gecko_Enabled]
$widescreen
$Airborne Speedup While Holding A
$Putting Camera Angle

Notes

  • SuggestedAspectRatio = 1 is Dolphin GameINI metadata, not a Gecko code.
  • Dolphin's enum value 1 means ForceWide.
  • These are for GFTE01 / USA. Other regions need separate testing/porting.
  • The putting camera code was tested together with the included widescreen and airborne speedup codes.
  • Keep backups of your GFTE01.ini before editing.

Mario Golf: Toadstool Tour GFTE01 - putting camera angle Gecko

Target: US GameCube GFTE01 in Dolphin.

While the current club is the putter, D-pad Left selects the preferred overhead rolling view, Right selects the close tracking view, and Down selects a configurable stock view. Their canonical private requested indices are 5, 6, and 2; the default is 5, each held input produces one selection, and every natural putting-camera setup resets to 5. The views still use stock camera geometry and adapt to the current shot.

Files

  • GFTE01-putting-camera-angle.gecko - standalone Gecko code
  • GFTE01-putting-camera-angle.ini - minimal Dolphin configuration
  • src/putting-camera-angle.s - PowerPC source
  • src/build-gecko.py - assembler and Gecko generator
  • variants/ - separately named Down View 0 through 4 Gecko and INI files for manual comparison

Proven game state

  • 0x8026BB60 is player one's held-button halfword. Left is bit 0x0001, Right is 0x0002, and Down is 0x0004.
  • 0x804F1FD8 points to the current ball/shot object. Its club field is at +0x1D4; putter is 13 and the tested Ring Attack club is 0.
  • 0x8041E818 stores a caller-provided club index to the current ball object's +0x1D4 field.
  • 0x8050F128 is the stock camera-mode dispatcher state.
  • 0x8050F14C is a randomized putting-camera fallback flag.
  • 0x8050F18C is the stock 0-7 putting camera-angle selector.
  • putting_camera_select at 0x804550D4 evaluates the eight stock angle generators.
  • 0x804551B4 stores the randomized fallback flag, 0x80455218 stores the selector, and 0x80455294 chooses the winning generated angle.
  • 0x80455358 compares the winning score before choosing between a generic mode-4 result and the selected candidate's vectors and mode. The final patch does not hook this instruction.
  • 0x80456E90 reads the current camera mode before the stock update dispatch. Mode 13 dispatches to 0x80456EC0, and 0x80457028 stores its selected camera X coordinate.
  • 0x804589D0 begins the post-dispatch fallback check. Its call at 0x80458BA8 invokes camera_copy_fallback_vectors at 0x8040CCD0; the first live-camera overwrite is the stfs at 0x8040CCE4.
  • The patch replaces the base load at 0x804589D0 and returns to the stock flag load at 0x804589D4 or the stock fallback exit at 0x80458C18.

The code cave at 0x80127F60-0x8012835F is zero-filled in the stock DOL and in the validated putting and Ring Attack memory captures. Mutable edge/selection state occupies the final 16 bytes and is not continuously rewritten by the Gecko codelist.

Architecture

The camera-update hook preserves caller-visible volatile state and updates a private directional edge latch. It returns without camera changes unless the current club is 13. A new Left, Right, or Down edge stores its configured index and calls putting_camera_select; repeated frames from one held direction do nothing. After a Right-triggered call returns, it reasserts stock camera mode 9 because the selector's later generic mode-4 decision is not a reliable representation of the requested user-facing view.

A fourth hook guards the exact post-dispatch fallback check at 0x804589D0. It branches to 0x80458C18 only when the current club is putter 13 and the active camera mode is the natural putting mode 13; otherwise it replays the displaced base load and returns to the stock flag load. This leaves the flag's randomized value intact while suppressing only its fallback block during the mode-13 putting camera. It does not pin vectors, skip the stock rolling updater, or bypass collision behavior.

Two hooks inside the selector retain the requested stock index and control candidate evaluation. A natural selector call resets the private requested index to 5; a call made by the camera-update hook retains the direction-selected value. Left/default and Down use their corresponding stock candidate geometry. Right uses the stable default candidate-5 vectors with requested index 6 and mode 9; candidate 6 itself produced invalid camera coordinates in the fresh DTM6 setup. Rejected candidates retain the current best score so the search reaches the intended geometry. Both hooks independently verify club 13, so later non-putting camera selection remains stock.

The generated code uses ordered 04 writes: the body is installed before the four hooks, and the test runner can reapply every word after a DTM savestate restores MEM1. The body is 728 bytes and the 186 direct lines consume approximately 1,488 codelist bytes, fitting the tested combined configuration with approximately 8 bytes remaining. The patch does not use Gecko's 0x80001800-0x80003000 allocation or the airborne wrapper's 0x80157BD8-0x80157D50 cave.

Random fallback evidence

The stock setup calls the random routine at 0x80455194, tests the low two result bits, and stores the derived bit at 0x804551B4. In the five-putt reproduction, attempts 1-4 stored zero while attempt 5 stored one. The correct angle-5 vectors and mode-13 output still reached 0x80457028 on attempt 5, where camera XYZ was (-10.1152086, 27.3626347, -573.1365967).

With the fallback flag set, the post-dispatch tests passed and the call at 0x80458BA8 copied the fallback vectors. camera_copy_fallback_vectors is the 0x44-byte function at 0x8040CCD0-0x8040CD13. Its instruction at 0x8040CCE4 changed live camera X from -10.1152086 to -5.0133805. The copied vectors were:

Target xyz: (-5.0230355, 15.6809082, -558.1743164)
Camera xyz: (-5.0133805, 15.7364731, -557.8593139)

A later three-putt JIT64 replay proved that clearing the flag only in the selector hook was not sufficient. The third natural setup reached mode 13 with requested index 5, stock selector 5, and fallback flag 1, then showed the same close hole-facing fallback view. An interpreter write trace from the earlier build captured the stock random store writing 1 at 0x804551B4, followed by the selector hook clearing it; no later interpreted writer appeared. This difference is consistent with a DTM savestate retaining already-compiled selector code while direct MEM1 writes are reapplied. The final patch retains the early clear for fresh execution but does not depend on it; the exact fallback use is independently guarded.

Primary traces:

/tmp/dolphin-testing/2026-07-28T15-12-31-903Z-putting-camera-4-fallback-lifecycle/trace/hits.json
/tmp/dolphin-testing/putting-camera-reverse-angle/2026-07-28T07-39-49-941Z-writer-probe-mode13/trace/hits.json
/tmp/dolphin-testing/putting-camera-reverse-angle/2026-07-28T08-04-13-465Z-exact-overwrite-writer-probe/trace/hits.json
/tmp/dolphin-testing/putting-camera-reverse-angle/2026-07-28T08-05-42-050Z-fallback-branch-state-probe/trace/hits.json

Chip-to-green activation evidence

The 1,868-frame putting-camera-7.dtm replay starts with a 5-iron chip, then takes two natural putts. The chip stops by approximately frame 630, its result/menu camera runs through frame 879, and the game writes the next-club sequence 0 through 13 at frame 880. Breakpoint captures at 0x8041E818 show the final putter write from caller 0x804AC2DC while the visible camera still shows the completed-shot result and camera mode remains 7.

The old club-only selector, score, and fallback paths do not activate at that transition. Their first captures are all at frame 1038, when putt 1 is struck and the camera changes to mode 13; the second natural selector capture is frame 1546, when putt 2 is struck. The narrowed fallback hook additionally verifies mode 13 before skipping the fallback block. Candidate frames 1-1037 are byte-identical to the stock control, proving that the chip flight, landing, roll, result, and putting setup camera are untouched.

The stock control terminates the putting block retained in the savestate codelist at 0x800025D0 and continuously restores the four displaced stock instructions. This avoids the invalid control where merely disabling the code name leaves savestate-restored hooks active.

Primary artifacts:

/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-00-50-832Z-stock-control
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-03-05-149Z-club-writer-break-2/trace/hits.json
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-04-13-141Z-selector-natural-two/trace/hits.json
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-20-47-065Z-candidate-final
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-21-28-722Z-candidate-final-paths/trace/hits.json

Verification

The 1,868-frame chip-to-green candidate replay completed with both natural setups selecting requested index 5, stock selector 5, and camera mode 13. It reached the final Next Hole menu without guest fault, hang, black world, or premature termination.

A 1,597-frame interpreter probe forced fallback flag 1 only while camera mode 13 was active and cleared it in other modes. All representative rolling frames, including 180, 800, and 1320, were byte-identical to the unforced candidate while retaining requested index 5, selector 5, mode 13, and flag 1. This directly verifies that the narrowed mode-and-club guard still suppresses the randomized fallback overwrite.

/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-23-33-505Z-fallback-candidate-final
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-22-25-142Z-fallback-forced-final

Fresh stock and candidate Ring Attack replays completed all 1,081 frames with widescreen and airborne speedup enabled. Every dumped frame was byte-identical, including canonical frames 300, 500, 619, 700, 839, 900, 1000, and 1081; neither run emitted a codelist-capacity warning.

/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-12-25-518Z-ring-stock
/tmp/dolphin-testing/putting-camera-chip/2026-08-04T23-22-58-392Z-ring-candidate-final

The 1,597-frame three-putt JIT64 replay completed with the fallback-use hook installed. Putt 3 retained fallback flag 1, requested index 5, and stock selector 5, but canonical rolling frame 1320 now matches the overhead behavior of putts 1 and 2 instead of the close hole-facing fallback view. Keeping the flag set while suppressing the visible overwrite directly verifies the hook is guarding its use rather than depending on another early clear.

The 3,159-frame five-putt replay also completed. Its fifth putt retained fallback flag 1 at frames 2665 and 2765, while canonical frame 2765 kept the same successful overhead rolling orientation as the prior zero-flag fix.

The fresh 2,348-frame putting-camera-6.dtm replay completed under the interpreter with the changed codelist refreshed after its sidecar restored the prior build. Natural setup remained requested/selector 5 in mode 13; Right selected 6 and mode 9; Up remained ignored at 5; the then-configured Down index 7 selected mode 4; a later Left edge restored 5 and mode 13. Canonical frame 250 shows the overhead rolling view, frame 795 shows the visibly distinct close tracking Right view, and frame 1848 shows the rejected character-obstructed Down-7 view. All camera and target vectors remained finite. After that replay, the user rejected Down 7; the generator now emits separately named Down View 0 through 4 variants for manual comparison. Manual review found view 0 is a reverse angle that does not track the ball, view 1 sits in the ball's path to the hole and spins the camera around, view 2 shows the putt mostly from behind the hole, and views 3 and 4 are very poor. The final Down mapping uses view 2; Up remains intentionally unimplemented.

The preceding fresh replay of the score-zero candidate-6 design reached mode 9 with camera coordinates (6.0235, 53253.6562, 6.9266e19) and rendered the world black. Selecting stable candidate-5 geometry before applying mode 9 removed that failure.

Primary artifacts:

/tmp/dolphin-testing/2026-07-28T17-33-26-959Z-putting-camera-6-final-interpreter/summary.json
/tmp/dolphin-testing/2026-07-28T17-33-26-959Z-putting-camera-6-final-interpreter/frames/framedump_250.png
/tmp/dolphin-testing/2026-07-28T17-33-26-959Z-putting-camera-6-final-interpreter/frames/framedump_795.png
/tmp/dolphin-testing/2026-07-28T17-33-26-959Z-putting-camera-6-final-interpreter/frames/framedump_1848.png

Fresh native-resolution interpreter baseline and patched Ring Attack replays completed all 1,081 frames. Canonical frames were byte-identical at 300, 500, 619, 700, 839, 900, 1000, and 1081; no hang or invalid instruction occurred. A separate full replay with the installed combined configuration proved that earlier 1,488-byte build fit alongside the enabled widescreen and airborne codes without a codelist warning.

/tmp/dolphin-testing/2026-07-28T17-35-35-155Z-ring-launch-native-baseline
/tmp/dolphin-testing/2026-07-28T17-37-13-834Z-ring-launch-native-patched
/tmp/dolphin-testing/2026-07-28T17-39-30-516Z-ring-launch-combined-capacity

Build

cd src
./build-gecko.sh

The generated Gecko code is canonical in GFTE01-putting-camera-angle.gecko.

$Putting Camera Angle
04127F60 9421FEE0
04127F64 7C0802A6
04127F68 90010124
04127F6C 7C000026
04127F70 90010008
04127F74 7C0902A6
04127F78 9001000C
04127F7C 7C0102A6
04127F80 90010010
04127F84 BC610014
04127F88 D8010090
04127F8C D8210098
04127F90 D84100A0
04127F94 D86100A8
04127F98 D88100B0
04127F9C D8A100B8
04127FA0 D8C100C0
04127FA4 D8E100C8
04127FA8 D90100D0
04127FAC D92100D8
04127FB0 D94100E0
04127FB4 D96100E8
04127FB8 D98100F0
04127FBC D9A100F8
04127FC0 3D608013
04127FC4 814B8350
04127FC8 2C0A0000
04127FCC 40820020
04127FD0 3940FFFF
04127FD4 914B8354
04127FD8 39400000
04127FDC 914B8358
04127FE0 914B835C
04127FE4 39400001
04127FE8 914B8350
04127FEC 3D808027
04127FF0 A00CBB60
04127FF4 700C0007
04127FF8 814B8358
04127FFC 918B8358
04128000 7D8C5079
04128004 41820070
04128008 3D40804F
0412800C 814A1FD8
04128010 2C0A0000
04128014 41820060
04128018 814A01D4
0412801C 2C0A000D
04128020 40820054
04128024 39400005
04128028 2C0C0001
0412802C 4182001C
04128030 39400006
04128034 2C0C0002
04128038 41820010
0412803C 39400002
04128040 2C0C0004
04128044 40820030
04128048 914B8354
0412804C 39400001
04128050 914B835C
04128054 38600000
04128058 3D808045
0412805C 618C50D4
04128060 7D8903A6
04128064 4E800421
04128068 480001A9
0412806C 48000008
04128070 00000000
04128074 C8010090
04128078 C8210098
0412807C C84100A0
04128080 C86100A8
04128084 C88100B0
04128088 C8A100B8
0412808C C8C100C0
04128090 C8E100C8
04128094 C90100D0
04128098 C92100D8
0412809C C94100E0
041280A0 C96100E8
041280A4 C98100F0
041280A8 C9A100F8
041280AC B8610014
041280B0 80010010
041280B4 7C0103A6
041280B8 8001000C
041280BC 7C0903A6
041280C0 80010008
041280C4 7C0FF120
041280C8 80010124
041280CC 7C0803A6
041280D0 38210120
041280D4 3D208051
041280D8 8129F128
041280DC 4832EDB8
041280E0 91810044
041280E4 3D80804F
041280E8 818C1FD8
041280EC 2C0C0000
041280F0 41820064
041280F4 800C01D4
041280F8 2C00000D
041280FC 40820058
04128100 3D808051
04128104 38000000
04128108 900CF14C
0412810C 3D808013
04128110 800C8350
04128114 2C000000
04128118 40820020
0412811C 3800FFFF
04128120 900C8354
04128124 38000000
04128128 900C8358
0412812C 900C835C
04128130 38000001
04128134 900C8350
04128138 800C835C
0412813C 2C000000
04128140 4082000C
04128144 38000005
04128148 900C8354
0412814C 800C8354
04128150 7C090378
04128154 913DF18C
04128158 81810044
0412815C 4832D0C0
04128160 91810044
04128164 3D80804F
04128168 818C1FD8
0412816C 2C0C0000
04128170 41820050
04128174 800C01D4
04128178 2C00000D
0412817C 40820044
04128180 3D808013
04128184 800C8354
04128188 2C000006
0412818C 41820010
04128190 7C1C0000
04128194 41820014
04128198 4800001C
0412819C 2C1C0005
041281A0 40820014
041281A4 3B800006
041281A8 EC210828
041281AC 2C1C0008
041281B0 48000014
041281B4 FC20F890
041281B8 FC01F800
041281BC 48000008
041281C0 FC01F800
041281C4 81810044
041281C8 4832D0D0
041281CC 00000000
041281D0 00000000
041281D4 00000000
041281D8 3D20804F
041281DC 81291FD8
041281E0 2C090000
041281E4 41820024
041281E8 812901D4
041281EC 2C09000D
041281F0 40820018
041281F4 3D208051
041281F8 8129F128
041281FC 2C09000D
04128200 40820008
04128204 48330A14
04128208 3D208051
0412820C 483307C8
04128210 3D608013
04128214 814B8354
04128218 2C0A0006
0412821C 39400000
04128220 914B835C
04128224 40820010
04128228 3D808051
0412822C 39400009
04128230 914CF128
04128234 4E800020
04456E90 4BCD10D0
04455218 4BCD2EC8
04455294 4BCD2ECC
044589D0 4BCCF808
.section .text
.global aspect_patch_start
.global aspect_patch_end
.global scale_xz_start
.global scale_xz_end
aspect_patch_start:
lis r4, 0x3FAA
ori r4, r4, 0xAAAB
stw r4, 0(r2)
lfs f17, 0(r2)
fmuls f8, f17, f8
fdivs f10, f9, f8
nop
.long 0
aspect_patch_end:
scale_xz_start:
lfs f17, 0(r2)
lfs f1, 0(r3)
fmuls f1, f17, f1
stfs f1, 0(r3)
lfs f1, 12(r3)
fmuls f1, f17, f1
stfs f1, 12(r3)
li r4, 1
nop
.long 0
scale_xz_end:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment