Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,607 changes: 1,306 additions & 1,301 deletions ASM/build/asm_symbols.txt

Large diffs are not rendered by default.

Binary file modified ASM/build/bundle.o
Binary file not shown.
1,451 changes: 728 additions & 723 deletions ASM/build/c_symbols.txt

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions ASM/c/kaleido_setup.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "kaleido_setup.h"

static bool sHoldingStart = false;

bool KaleidoSetup_Update_HasPressedStart(z64_game_t* play) {
pad_t pressed_input = play->common.input[0].pad_pressed;
pad_t held_input = play->common.input[0].raw.pad;

if (pressed_input.s) {
return true;
}

if (EASY_FRAME_BY_FRAME) {
if (held_input.s) {
if (sHoldingStart) {
sHoldingStart = false;
return true;
}
sHoldingStart = true;
} else {
sHoldingStart = false;
}
}

return false;
}
8 changes: 8 additions & 0 deletions ASM/c/kaleido_setup.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef KALEIDO_SETUP_H
#define KALEIDO_SETUP_H

#include "z64.h"

extern uint8_t EASY_FRAME_BY_FRAME;

#endif
1 change: 1 addition & 0 deletions ASM/src/build.asm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ RANDO_CONTEXT:
.include "en_dns.asm"
.include "bg_gate_shutter.asm"
.include "big_poe.asm"
.include "kaleido_scope.asm"

.align 0x10
.importobj "../build/bundle.o"
Expand Down
10 changes: 9 additions & 1 deletion ASM/src/config.asm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
COSMETIC_CONTEXT:

COSMETIC_FORMAT_VERSION:
.word 0x1F073FE2
.word 0x1F073FE3
CFG_MAGIC_COLOR:
.halfword 0x0000, 0x00C8, 0x0000
CFG_HEART_COLOR:
Expand Down Expand Up @@ -102,6 +102,14 @@ CFG_SONG_NAME_STATE:
.area 0xA5A, 0
CFG_SONG_NAMES:
.endarea

EASY_FRAME_BY_FRAME:
.byte 0x00

;==================================================================================================
; End of Cosmetics Context
;==================================================================================================

CFG_SHOW_SETTING_INFO:
.byte 0x00

Expand Down
1 change: 1 addition & 0 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4160,3 +4160,4 @@ DemoEffect_DrawJewel_AfterHook:
.include "hacks/ovl_en_ssh.asm"
.include "hacks/ovl_en_okarina_tag.asm"
.include "hacks/sound.asm"
.include "hacks/z_kaleido_setup.asm"
18 changes: 18 additions & 0 deletions ASM/src/hacks/z_kaleido_setup.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.headersize (0x8005B860 - 0xAD17C0)

; Check for held start button after unpausing to frame advance
; z_kaleido_setup.c, KaleidoSetup_Update, replaces the existing start button branch
; Replaces
; addiu $at, $zero, 0x1000
; lui a0, 0x8012
; andi t0, t9, 0x1000
; bne t0, $at, lbl_8005BA74
.org 0x8005B994
jal KaleidoSetup_Update_HasPressedStart_Hook
nop
nop
beqzl v0, DoNotOpenPauseMenu
.org 0x8005BA74
DoNotOpenPauseMenu:

.headersize 0
15 changes: 15 additions & 0 deletions ASM/src/kaleido_scope.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
KaleidoSetup_Update_HasPressedStart_Hook:
addiu sp, sp, -0x20
sw ra, 0x0014 (sp)
sw a2, 0x0018 (sp)

jal KaleidoSetup_Update_HasPressedStart
sw a3, 0x001C (sp)

lui a0, 0x8012

lw a3, 0x001C (sp)
lw a2, 0x0018 (sp)
lw ra, 0x0014 (sp)
jr ra
addiu sp, sp, 0x20
18 changes: 18 additions & 0 deletions Cosmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,13 @@ def patch_song_names(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: d
rom.write_bytes(symbols['CFG_SONG_NAMES'], bytes_to_write)
log.display_custom_song_names = settings.display_custom_song_names

def patch_pause_buffer(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: dict[str, int]) -> None:
if settings.easy_frame_advance:
rom.write_byte(symbols['EASY_FRAME_BY_FRAME'], 0x01)
else:
rom.write_byte(symbols['EASY_FRAME_BY_FRAME'], 0x00)
log.easy_frame_advance = settings.easy_frame_advance

legacy_cosmetic_data_headers: list[int] = [
0x03481000,
0x03480810,
Expand Down Expand Up @@ -1218,6 +1225,17 @@ def patch_song_names(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: d
}
}

# 9.1.29
patch_sets[0x1F073FE3] = {
"patches": patch_sets[0x1F073FE2]["patches"] + [
patch_pause_buffer,
],
"symbols": {
**patch_sets[0x1F073FE2]["symbols"],
"EASY_FRAME_BY_FRAME": 0x0AC7,
}
}

def patch_cosmetics(settings: Settings, rom: Rom) -> CosmeticsLog:
# re-seed for aesthetic effects. They shouldn't be affected by the generation seed
random.seed()
Expand Down
11 changes: 11 additions & 0 deletions SettingsList.py
Original file line number Diff line number Diff line change
Expand Up @@ -4208,6 +4208,17 @@ class SettingInfos:
shared = True,
)

easy_frame_advance = Checkbutton(
gui_text = 'Easy Frame Advance',
gui_tooltip = '''\
Continue holding the Start button when
unpausing to advance gameplay by one frame,
then pause again ("pause buffer")
''',
default = False,
shared = True,
)

item_pool_value = Combobox(
gui_text = 'Item Pool',
default = 'balanced',
Expand Down
2 changes: 1 addition & 1 deletion data/generated/patch_symbols.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading