From 992b513de9ea3811948182c90eb1664233c06738 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Sun, 12 Apr 2026 23:55:52 +0000 Subject: [PATCH 1/9] Add splat config for PW64 jp (kernel, libultra, RSP) - Add jp kernel asm names and add recommended rodata - Add RSP boot, f3d, and asp textbin and databins - Map kernel, libultra, libc, libaudio functions - Map jp kernel/libultra .rodata, .data, .bss - Add font macros and correct font .bss - Add fake app and app_entrypoint - Match jp osViInit - Match osViModeTable --- Makefile | 7 +- config/jp/pilotwings64.jp.sha1 | 1 + config/jp/pilotwings64.jp.yaml | 412 ++++++++++++ config/jp/sym/hardware_regs.ld | 113 ++++ config/jp/sym/libultra_undefined_syms.txt | 2 + config/jp/sym/pif_syms.ld | 11 + config/jp/sym/reloc_addrs.txt | 12 + config/jp/sym/symbol_addrs.txt | 755 ++++++++++++++++++++++ config/us/pilotwings64.us.yaml | 2 +- decomp.yaml | 13 +- include/kernel/uv_graphics.h | 12 +- src/kernel/font.c | 39 +- src/kernel/fx_seq.c | 2 +- src/kernel/graphics.c | 4 + src/kernel/system.c | 5 + src/libultra/io/vi.c | 12 + src/libultra/io/vitbl.c | 565 ++++++++++++++++ 17 files changed, 1949 insertions(+), 18 deletions(-) create mode 100644 config/jp/pilotwings64.jp.sha1 create mode 100644 config/jp/pilotwings64.jp.yaml create mode 100644 config/jp/sym/hardware_regs.ld create mode 100644 config/jp/sym/libultra_undefined_syms.txt create mode 100644 config/jp/sym/pif_syms.ld create mode 100644 config/jp/sym/reloc_addrs.txt create mode 100644 config/jp/sym/symbol_addrs.txt diff --git a/Makefile b/Makefile index 2040b822..394f4b56 100644 --- a/Makefile +++ b/Makefile @@ -128,7 +128,12 @@ GLOBAL_ASM_C_FILES := $(shell $(GREP) GLOBAL_ASM $(SRC_DIR) /dev/nu GLOBAL_ASM_O_FILES := $(foreach file,$(GLOBAL_ASM_C_FILES:.c=.o),$(BUILD_DIR)/$(file)) DEFINES := -D_LANGUAGE_C -D_FINALROM -DWIN32 -DNDEBUG -DTARGET_N64 -DCOMPILING_LIBULTRA -DEFINES += -DVERSION_US +ifeq ($(VERSION),us) + DEFINES += -DVERSION_US +else ifeq ($(VERSION),jp) + DEFINES += -DVERSION_JP +endif + DEFINES += -DBUILD_VERSION=VERSION_D ifneq ($(RECOMP_BUILD),0) diff --git a/config/jp/pilotwings64.jp.sha1 b/config/jp/pilotwings64.jp.sha1 new file mode 100644 index 00000000..40f73f0c --- /dev/null +++ b/config/jp/pilotwings64.jp.sha1 @@ -0,0 +1 @@ +892a5472d9a6811b881d093020de81f72baeeec9 build/pilotwings64.jp.z64 diff --git a/config/jp/pilotwings64.jp.yaml b/config/jp/pilotwings64.jp.yaml new file mode 100644 index 00000000..3f7b564c --- /dev/null +++ b/config/jp/pilotwings64.jp.yaml @@ -0,0 +1,412 @@ +name: Pilot Wings64 (Japanese) +sha1: 892a5472d9a6811b881d093020de81f72baeeec9 +options: + basename: pilotwings64 + target_path: baserom.jp.z64 + elf_path: build/pilotwings64.jp.elf + base_path: ../.. + platform: n64 + compiler: IDO + + asm_path: asm + src_path: src + asset_path: bin + build_path: build + create_asm_dependencies: True + + ld_script_path: build/pilotwings64.jp.ld + ld_dependencies: True + ld_sections_allowlist: + - .shstrtab + - .mdebug + - .mdebug.abi32 + + find_file_boundaries: True + header_encoding: ASCII + + o_as_suffix: True + use_legacy_include_asm: False + mips_abi_float_regs: o32 + + # section_order: [".text", ".data", ".rodata", ".bss"] + # auto_link_sections: [".data", ".rodata", ".bss"] + + symbol_addrs_path: + - config/jp/sym/symbol_addrs.txt + reloc_addrs_path: + - config/jp/sym/reloc_addrs.txt + + undefined_funcs_auto_path: build/splat_out/jp/undefined_funcs_auto.txt + undefined_syms_auto_path: build/splat_out/jp/undefined_syms_auto.txt + + extensions_path: tools/splat_ext + + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + libultra_symbols: True + # hardware_regs: True + gfx_ucode: f3d + migrate_rodata_to_functions: True + +segments: + - name: header + type: header + start: 0x0 + + - name: ipl3 + type: bin + start: 0x40 + + - name: entry + type: code + start: 0x1000 + vram: 0x80200050 + subsegments: + - [0x1000, hasm, entrypoint] + + - name: kernel + type: code + start: 0x1050 + vram: 0x802000A0 + follows_vram: entry + bss_size: 0x6BF60 + subsegments: + - [0x01050, c, kernel/code_1050] + - [0x01300, c, kernel/anim] + - [0x02130, c, kernel/audio_emitter] + - [0x03D50, c, kernel/audio_event] + - [0x04850, c, kernel/audio_manager] + - [0x05690, c, kernel/audio_seq] + - [0x058E0, c, kernel/chan] + - [0x06F80, c, kernel/clocks] + - [0x07150, c, kernel/code_7150] + - [0x08170, c, kernel/code_8170] + - [0x177A0, c, kernel/dobj] + - [0x19170, c, kernel/env] + - [0x19B50, c, kernel/fx_seq] + - [0x1A220, c, kernel/font] + - [0x1AF00, c, kernel/fx] + - [0x20030, c, kernel/geometry] + - [0x21890, c, kernel/graphics] + - [0x24D60, c, kernel/filesystem] + - [0x25180, c, kernel/controller] + - [0x25580, c, kernel/texture] + - [0x28E10, c, kernel/matrix] + - [0x2AD80, c, kernel/math] + - [0x2B2A0, c, kernel/memory] + - [0x2BF80, c, kernel/sched] + - [0x2D3C0, c, kernel/sobj] + - [0x2E190, c, kernel/string] + - [0x2EDD0, c, kernel/system] + - [0x2FD10, c, kernel/terrain] + - [0x30CC0, c, kernel/code_30DF0] + - [0x30D70, c, kernel/code_30EA0] + - [0x30FB0, c, kernel/sprite] + - [0x32350, c, kernel/user_file] + - [0x32460, c, kernel/utils] + - [0x32630, c, kernel/vector] + - [0x32890, hasm, kernel/decompress_mio0] + - [0x32940, c, kernel/debug] + - [0x35320, c, libultra/audio/sndpsetsound] + - [0x35340, c, libultra/audio/sndpgetstate] + - [0x35360, c, libultra/audio/sndpstop] + - [0x353B0, c, libultra/audio/sndpdeallocate] + - [0x35400, c, libultra/audio/sndpallocate] + - [0x354A0, c, libultra/audio/sndpplay] + - [0x35510, c, libultra/audio/sndpsetvol] + - [0x35570, c, libultra/audio/sndpsetpitch] + - [0x355D0, c, libultra/audio/sndpsetfxmix] + - [0x35630, c, libultra/audio/sndpsetpan] + - [0x35690, c, libultra/audio/heapinit] + - [0x356D0, c, libultra/audio/sndplayer] + - [0x35DE0, c, libultra/audio/csplayer] + - [0x37010, c, libultra/os/sendmesg] + - [0x37160, c, libultra/audio/heapalloc] + - [0x371C0, c, libultra/audio/bnkf] + - [0x37410, c, libultra/io/aisetfreq] + - [0x37570, c, libultra/audio/sl] + - [0x37630, c, libultra/os/createmesgqueue] + - [0x37660, c, libultra/os/createthread] + - [0x377B0, c, libultra/os/startthread] + - [0x37900, c, libultra/os/recvmesg] + - [0x37A40, c, libultra/os/virtualtophysical] + - [0x37AC0, c, libultra/io/aisetnextbuf] + - [0x37B70, c, libultra/io/aigetlen] + - [0x37B80, c, libultra/audio/synthesizer] + - [0x38250, c, libultra/io/pidma] + - [0x38360, c, libultra/audio/seqpsetbank] + - [0x383A0, c, libultra/audio/seqpgetstate] + - [0x383B0, c, libultra/audio/cseq] + - [0x38E70, c, libultra/audio/seqpsetseq] + - [0x38EB0, c, libultra/audio/seqpplay] + - [0x38EE0, c, libultra/audio/seqpsettempo] + - [0x38F50, c, libultra/audio/seqpsetvol] + - [0x38F90, c, libultra/audio/seqpstop] + - [0x38FC0, hasm, libultra/os/getcount] + - [0x38FD0, c, libultra/sp/sprite] + - [0x3B600, c, libultra/sp/color] + - [0x3B630, c, libultra/sp/spscale] + - [0x3B6A0, hasm, libultra/gu/sqrtf] + - [0x3B6B0, c, libultra/io/viblack] + - [0x3B720, hasm, libultra/os/writebackdcache] + - [0x3B7A0, c, libultra/io/visetspecial] + - [0x3B960, c, libultra/libc/ll] + - [0x3BC20, c, libultra/io/piread] + - [0x3BC60, pad] + - [0x3BCA0, c, libultra/io/viswapbuf] + - [0x3BCF0, hasm, libultra/os/writebackdcacheall] + - [0x3BD20, c, libultra/io/sptask] + - [0x3BFE0, c, libultra/io/vigetcurrframebuf] + - [0x3C020, c, libultra/io/vigetnextframebuf] + - [0x3C060, c, libultra/io/vimgr] + - [0x3C3C0, c, libultra/io/visetmode] + - [0x3C430, c, libultra/os/seteventmesg] + - [0x3C4A0, c, libultra/io/visetevent] + - [0x3C510, c, libultra/io/sptaskyield] + - [0x3C530, c, libultra/io/sptaskyielded] + - [0x3C5B0, c, libultra/io/conteeplongwrite] + - [0x3C6F0, c, libultra/io/conteeplongread] + - [0x3C830, c, libultra/io/conteepprobe] + - [0x3C8A0, c, libultra/os/initialize] + - [0x3CAD0, c, libultra/io/pirawread] + - [0x3CB30, c, libultra/os/getcurrfaultthread] + - [0x3CB40, c, libultra/io/pimgr] + - [0x3CCC0, c, libultra/os/setthreadpri] + - [0x3CDA0, c, libultra/os/settimer] + - [0x3CE80, c, libultra/io/controller] + - [0x3D240, c, libultra/io/contreaddata] + - [0x3D4A0, hasm, libultra/os/invaldcache] + - [0x3D550, c, libultra/libc/ldiv] + - [0x3D6E0, c, libultra/audio/event] + - [0x3DA20, c, libultra/audio/synaddplayer] + - [0x3DA70, c, libultra/audio/synallocvoice] + - [0x3DCA0, c, libultra/audio/synstartvoice] + - [0x3DD30, c, libultra/audio/synsetpan] + - [0x3DDC0, c, libultra/audio/synsetvol] + - [0x3DE60, c, libultra/audio/synsetpitch] + - [0x3DEF0, c, libultra/audio/synsetfxmix] + - [0x3DF90, c, libultra/audio/synstopvoice] + - [0x3E010, c, libultra/audio/synfreevoice] + - [0x3E0C0, hasm, libultra/os/setintmask] + - [0x3E120, c, libultra/audio/seqplayer] + - [0x3FA60, c, libultra/audio/cents2ratio] + - [0x3FAB0, c, libultra/audio/synstartvoiceparam] + - [0x3FBA0, hasm, libultra/os/interrupt] + - [0x3FBE0, c, libultra/os/thread] + - [0x3FC20, hasm, libultra/os/exceptasm] + - [0x40490, c, libultra/io/vi] + - [0x405A0, c, libultra/audio/syndelete] + - [0x405B0, hasm, libultra/os/probetlb] + - [0x40670, c, libultra/io/ai] + - [0x406A0, c, libultra/audio/drvrnew] + - [0x40E20, c, libultra/audio/synallocfx] + - [0x40EC0, c, libultra/audio/mainbus] + - [0x41010, c, libultra/audio/load] + - [0x41B60, c, libultra/audio/resample] + - [0x41E60, c, libultra/audio/env] + - [0x42AC0, c, libultra/audio/auxbus] + - [0x42BD0, c, libultra/audio/save] + - [0x42C90, c, libultra/os/jammesg] + - [0x42DE0, c, libultra/io/pigetcmdq] + - [0x42E10, c, libultra/sp/clearattribute] + - [0x42E30, c, libultra/sp/setattribute] + - [0x42E40, c, libultra/io/piacs] + - [0x42F00, hasm, libultra/libc/bcopy] + - [0x43210, c, libultra/io/spsetstat] + - [0x43220, c, libultra/io/spsetpc] + - [0x43260, c, libultra/io/sprawdma] + - [0x432F0, c, libultra/io/sp] + - [0x43320, c, libultra/os/timerintr] + - [0x43720, c, libultra/os/getthreadpri] + - [0x43740, c, libultra/io/vigetcurrcontext] + - [0x43750, c, libultra/io/viswapcontext] + - [0x43AB0, c, libultra/io/spgetstat] + - [0x43AC0, c, libultra/io/conteepwrite] + - [0x43FA0, c, libultra/io/conteepread] + - [0x442A0, c, libultra/io/siacs] + - [0x44360, hasm, libultra/os/setsr] + - [0x44370, hasm, libultra/os/getsr] + - [0x44380, hasm, libultra/os/setfpccsr] + - [0x44390, c, libultra/io/sirawread] + - [0x443E0, c, libultra/io/sirawwrite] + - [0x44430, hasm, libultra/os/invalicache] + - [0x444B0, hasm, libultra/os/maptlbrdb] + - [0x44510, hasm, libultra/libc/bzero] + - [0x445B0, c, libultra/io/pirawdma] + - [0x44690, c, libultra/io/devmgr] + - [0x44810, c, libultra/os/gettime] + - [0x448A0, c, libultra/io/sirawdma] + - [0x44950, c, libultra/audio/copy] + - [0x449D0, c, libultra/audio/seq] + - [0x44FF0, c, libultra/audio/synsetpriority] + - [0x45000, c, libultra/debug/kdebugserver] + - [0x45480, c, libultra/os/syncputchars] + - [0x455B0, c, libultra/os/destroythread] + - [0x456B0, c, libultra/audio/filter] + - [0x456D0, c, libultra/audio/reverb] + - [0x462E0, hasm, libultra/os/setcompare] + - [0x462F0, c, libultra/io/si] + - [0x46320, hasm, libultra/os/getcause] + - [0x46330, c, libultra/os/atomic] + + - { start: 0x46390, type: textbin, use_src_path: True, name: rsp/rspboot } + - { start: 0x46460, type: textbin, use_src_path: True, name: rsp/f3dex } + - { start: 0x47890, type: textbin, use_src_path: True, name: rsp/fast3d } + - { start: 0x48CC0, type: textbin, use_src_path: True, name: rsp/aspMain } + + - [0x49AE0, .data, kernel/audio_manager] + - [0x49C10, .data, kernel/code_7150] + - [0x49C30, .data, kernel/code_8170] + - [0x49C40, .data, kernel/env] + - [0x49C80, .data, kernel/font] + - [0x49D00, .data, kernel/fx] + - [0x49FA0, .data, kernel/graphics] + - [0x4A0B0, .data, kernel/terrain] + - [0x4C0B0, .data, kernel/matrix] + - [0x4C0C0, .data, kernel/sched] + - [0x4C0D0, .data, kernel/sprite] + - [0x4C120, .data, kernel/utils] + - [0x4C130, .data, kernel/debug] + - [0x4C5E0, .data, libultra/audio/sl] + - [0x4C5F0, .data, libultra/io/aisetnextbuf] + - [0x4C600, .data, libultra/sp/sprite] + - [0x4C610, .data, libultra/io/vimgr] + - [0x4C630, .data, libultra/io/vitbl] + - [0x4CEF0, .data, libultra/os/initialize] + - [0x4CF00, .data, libultra/io/pimgr] + - [0x4CF20, .data, libultra/io/controller] + - [0x4CF30, .data, libultra/os/thread] + - [0x4CF50, data, libultra/os/exceptasm] + - [0x4CF70, .data, libultra/io/vi] + - [0x4CFE0, .data, libultra/audio/drvrnew] + - [0x4D170, .data, libultra/audio/env] + - [0x4D2B0, .data, libultra/io/piacs] + - [0x4D2C0, .data, libultra/os/timerintr] + - [0x4D2D0, .data, libultra/io/siacs] + - [0x4D2E0, .data, libultra/debug/kdebugserver] + - [0x4D2F0, .data, libultra/os/syncputchars] + - [0x4D300, .data, libultra/vimodes/vimodentsclan1] + - [0x4D350, data, libultra/vimodes/vimodepallan1] # TODO: doesn't match any PAL vimode + - [0x4D3A0, data] # TODO: what are these 0x10 bytes? + + - [0x4D3B0, .rodata, kernel/code_1050] + - [0x4D3F0, .rodata, kernel/anim] + - [0x4D490, .rodata, kernel/audio_emitter] + - [0x4DAA0, .rodata, kernel/audio_event] + - [0x4DB40, .rodata, kernel/audio_manager] + - [0x4DB90, .rodata, kernel/audio_seq] + - [0x4DBC0, .rodata, kernel/chan] + - [0x4DC70, .rodata, kernel/clocks] + - [0x4DCA0, .rodata, kernel/code_7150] + - [0x4DCC0, .rodata, kernel/code_8170] + - [0x4E220, .rodata, kernel/dobj] + - [0x4E4D0, .rodata, kernel/env] + - [0x4E630, .rodata, kernel/fx_seq] + - [0x4E6E0, .rodata, kernel/font] + - [0x4E720, .rodata, kernel/fx] + - [0x4E9E0, .rodata, kernel/geometry] + - [0x4EA80, .rodata, kernel/graphics] + - [0x4EDA0, .rodata, kernel/filesystem] + - [0x4EDD0, .rodata, kernel/controller] + - [0x4EE20, .rodata, kernel/texture] + - [0x4F130, .rodata, kernel/matrix] + - [0x4F200, .rodata, kernel/math] + - [0x4F260, .rodata, kernel/memory] + - [0x4F4E0, .rodata, kernel/sched] + - [0x4F980, .rodata, kernel/sobj] + - [0x4FB00, .rodata, kernel/system] + - [0x4FF20, .rodata, kernel/terrain] + - [0x4FF50, .rodata, kernel/code_30EA0] + - [0x4FF60, .rodata, kernel/sprite] + - [0x50140, .rodata, kernel/user_file] + - [0x50160, .rodata, kernel/utils] + - [0x50170, .rodata, kernel/debug] + - [0x50300, .rodata, libultra/audio/sndplayer] + - [0x50340, .rodata, libultra/audio/csplayer] + - [0x50580, .rodata, libultra/audio/synthesizer] + - [0x50590, .rodata, libultra/audio/cseq] + - [0x505A0, .rodata, libultra/sp/sprite] + - [0x505B0, rodata, libultra/os/setintmask] + - [0x50630, .rodata, libultra/audio/seqplayer] + - [0x50870, .rodata, libultra/audio/cents2ratio] + - [0x50880, rodata, libultra/os/exceptasm] + - [0x508D0, .rodata, libultra/audio/drvrnew] + - [0x50900, .rodata, libultra/audio/resample] + - [0x50940, .rodata, libultra/audio/env] + - [0x509A0, .rodata, libultra/audio/seq] + - [0x509B0, .rodata, libultra/audio/reverb] + - { start: 0x509E0, type: databin, use_src_path: True, name: rsp/f3dex } + - { start: 0x511E0, type: databin, use_src_path: True, name: rsp/fast3d } + - { start: 0x519E0, type: databin, use_src_path: True, name: rsp/aspMain } + + - { type: .bss, vram: 0x80250CF0, name: kernel/code_1050 } + - { type: .bss, vram: 0x80250D40, name: kernel/audio_emitter } + - { type: .bss, vram: 0x8025BD70, name: kernel/audio_event } + - { type: .bss, vram: 0x8025C420, name: kernel/audio_manager } + - { type: .bss, vram: 0x802610A0, name: kernel/audio_seq } + - { type: .bss, vram: 0x802615A0, name: kernel/chan } + - { type: .bss, vram: 0x802632E0, name: kernel/clocks } + - { type: .bss, vram: 0x80263330, name: kernel/code_8170 } + - { type: .bss, vram: 0x802635F0, name: kernel/dobj } + - { type: .bss, vram: 0x80269D80, name: kernel/env } + - { type: .bss, vram: 0x80269DC0, name: kernel/fx_seq } + - { type: .bss, vram: 0x80269EB0, name: kernel/font } + - { type: .bss, vram: 0x8027C3F0, name: kernel/fx } + - { type: .bss, vram: 0x802829D0, name: kernel/geometry } + - { type: .bss, vram: 0x80288DF0, name: kernel/graphics } + - { type: .bss, vram: 0x802A7650, name: kernel/filesystem } + - { type: .bss, vram: 0x802A7660, name: kernel/controller } + - { type: .bss, vram: 0x802A7710, name: kernel/texture } + - { type: .bss, vram: 0x802AA130, name: kernel/matrix } + - { type: .bss, vram: 0x802AAB70, name: kernel/memory } + - { type: .bss, vram: 0x802AAC90, name: kernel/sched } + - { type: .bss, vram: 0x802ABFE0, name: kernel/system } + - { type: .bss, vram: 0x802B7F10, name: kernel/terrain } + - { type: .bss, vram: 0x802B8320, name: kernel/sprite } + - { type: .bss, vram: 0x802BA370, name: kernel/debug } + - { type: .bss, vram: 0x802BA390, name: libultra/sp/sprite } + - { type: .bss, vram: 0x802BA3A0, name: libultra/io/sptask } + - { type: .bss, vram: 0x802BA3E0, name: libultra/io/vimgr } + - { type: .bss, vram: 0x802BB5F0, name: libultra/os/seteventmesg } + - { type: .bss, vram: 0x802BB670, name: libultra/os/initialize } + - { type: .bss, vram: 0x802BB680, name: libultra/io/pimgr } + - { type: .bss, vram: 0x802BC850, name: libultra/io/controller } + - { type: .bss, vram: 0x802BC8E0, name: libultra/io/piacs } + - { type: .bss, vram: 0x802BC900, name: libultra/os/timerintr } + - { type: .bss, vram: 0x802BC940, name: libultra/io/conteepread } + - { type: .bss, vram: 0x802BC980, name: libultra/io/siacs } + - { type: .bss, vram: 0x802BC9A0, name: libultra/debug/kdebugserver } + + - name: app + type: code + start: 0x51CA0 + vram: 0x802BCC50 + bss_size: 0x293E0 + subsegments: + - { start: 0x51CA0, type: textbin, use_src_path: True, name: app_text } + - { start: 0xD6030, type: databin, use_src_path: True, name: app_data } + - { type: bss, vram: 0x80349BE0 } + + - name: filetable + type: bin + start: 0xDEC30 + + - name: filesys + type: bin + start: 0xDFAC0 + + - name: audio_seq + type: bin + start: 0x612BB0 + + - name: audio_ctl + type: bin + start: 0x6274A0 + + - name: audio_tbl + type: bin + start: 0x62B510 + + - [0x800000] diff --git a/config/jp/sym/hardware_regs.ld b/config/jp/sym/hardware_regs.ld new file mode 100644 index 00000000..cab71a65 --- /dev/null +++ b/config/jp/sym/hardware_regs.ld @@ -0,0 +1,113 @@ + +SP_MEM_ADDR_REG = 0xA4040000; +SP_DRAM_ADDR_REG = 0xA4040004; +SP_RD_LEN_REG = 0xA4040008; +SP_WR_LEN_REG = 0xA404000C; +SP_STATUS_REG = 0xA4040010; +SP_DMA_FULL_REG = 0xA4040014; +SP_DMA_BUSY_REG = 0xA4040018; +SP_SEMAPHORE_REG = 0xA404001C; + +SP_PC = 0xA4080000; + +DPC_START_REG = 0xA4100000; +DPC_END_REG = 0xA4100004; +DPC_CURRENT_REG = 0xA4100008; +DPC_STATUS_REG = 0xA410000C; +DPC_CLOCK_REG = 0xA4100010; +DPC_BUFBUSY_REG = 0xA4100014; +DPC_PIPEBUSY_REG = 0xA4100018; +DPC_TMEM_REG = 0xA410001C; + +DPS_TBIST_REG = 0xA4200000; +DPS_TEST_MODE_REG = 0xA4200004; +DPS_BUFTEST_ADDR_REG = 0xA4200008; +DPS_BUFTEST_DATA_REG = 0xA420000C; + +MI_MODE_REG = 0xA4300000; +MI_VERSION_REG = 0xA4300004; +MI_INTR_REG = 0xA4300008; +MI_INTR_MASK_REG = 0xA430000C; + +VI_STATUS_REG = 0xA4400000; +VI_DRAM_ADDR_REG = 0xA4400004; +VI_WIDTH_REG = 0xA4400008; +VI_INTR_REG = 0xA440000C; +VI_CURRENT_REG = 0xA4400010; +VI_BURST_REG = 0xA4400014; +VI_V_SYNC_REG = 0xA4400018; +VI_H_SYNC_REG = 0xA440001C; +VI_LEAP_REG = 0xA4400020; +VI_H_START_REG = 0xA4400024; +VI_V_START_REG = 0xA4400028; +VI_V_BURST_REG = 0xA440002C; +VI_X_SCALE_REG = 0xA4400030; +VI_Y_SCALE_REG = 0xA4400034; + +AI_DRAM_ADDR_REG = 0xA4500000; +AI_LEN_REG = 0xA4500004; +AI_CONTROL_REG = 0xA4500008; +AI_STATUS_REG = 0xA450000C; +AI_DACRATE_REG = 0xA4500010; +AI_BITRATE_REG = 0xA4500014; + +PI_DRAM_ADDR_REG = 0xA4600000; +PI_CART_ADDR_REG = 0xA4600004; +D_A4600005 = 0xA4600005; +D_A4600006 = 0xA4600006; +D_A4600007 = 0xA4600007; +PI_RD_LEN_REG = 0xA4600008; +PI_WR_LEN_REG = 0xA460000C; +PI_STATUS_REG = 0xA4600010; +PI_BSD_DOM1_LAT_REG = 0xA4600014; +PI_BSD_DOM1_PWD_REG = 0xA4600018; +PI_BSD_DOM1_PGS_REG = 0xA460001C; +PI_BSD_DOM1_RLS_REG = 0xA4600020; +PI_BSD_DOM2_LAT_REG = 0xA4600024; +PI_BSD_DOM2_LWD_REG = 0xA4600028; +PI_BSD_DOM2_PGS_REG = 0xA460002C; +PI_BSD_DOM2_RLS_REG = 0xA4600030; + +RI_MODE_REG = 0xA4700000; +RI_CONFIG_REG = 0xA4700004; +RI_CURRENT_LOAD_REG = 0xA4700008; +RI_SELECT_REG = 0xA470000C; +RI_REFRESH_REG = 0xA4700010; +RI_LATENCY_REG = 0xA4700014; +RI_RERROR_REG = 0xA4700018; +RI_WERROR_REG = 0xA470001C; + +SI_DRAM_ADDR_REG = 0xA4800000; +SI_PIF_ADDR_RD64B_REG = 0xA4800004; +D_A4800008 = 0xA4800008; +D_A480000C = 0xA480000C; +SI_PIF_ADDR_WR64B_REG = 0xA4800010; +D_A4800014 = 0xA4800014; +SI_STATUS_REG = 0xA4800018; + +LEO_CMD = 0xA5000508; +LEO_STATUS = 0xA5000508; +LEO_BM_CTL = 0xA5000510; +LEO_BM_STATUS = 0xA5000510; +LEO_SEQ_CTL = 0xA5000518; +LEO_SEQ_STATUS = 0xA5000518; +LEO_C2_BUFF = 0xA5000000; +LEO_SECTOR_BUFF = 0xA5000400; +LEO_DATA = 0xA5000500; +LEO_MISC_REG = 0xA5000504; +LEO_CUR_TK = 0xA500050C; +LEO_ERR_SECTOR = 0xA5000514; +LEO_CUR_SECTOR = 0xA500051C; +LEO_HARD_RESET = 0xA5000520; +LEO_C1_S0 = 0xA5000524; +LEO_HOST_SECBYTE = 0xA5000528; +LEO_C1_S2 = 0xA500052C; +LEO_SEC_BYTE = 0xA5000530; +LEO_C1_S4 = 0xA5000534; +LEO_C1_S6 = 0xA5000538; +LEO_CUR_ADDR = 0xA500053C; +LEO_ID_REG = 0xA5000540; +LEO_TEST_REG = 0xA5000544; +LEO_TEST_PIN_SEL = 0xA5000548; +LEO_RAM_ADDR = 0xA5000580; + diff --git a/config/jp/sym/libultra_undefined_syms.txt b/config/jp/sym/libultra_undefined_syms.txt new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/config/jp/sym/libultra_undefined_syms.txt @@ -0,0 +1,2 @@ + + diff --git a/config/jp/sym/pif_syms.ld b/config/jp/sym/pif_syms.ld new file mode 100644 index 00000000..3a4b363e --- /dev/null +++ b/config/jp/sym/pif_syms.ld @@ -0,0 +1,11 @@ + +leoBootID = 0x800001a0; +osTvType = 0x80000300; +osRomType = 0x80000304; +osRomBase = 0x80000308; +osResetType = 0x8000030c; +osCicId = 0x80000310; +osVersion = 0x80000314; +osMemSize = 0x80000318; +osAppNMIBuffer = 0x8000031c; + diff --git a/config/jp/sym/reloc_addrs.txt b/config/jp/sym/reloc_addrs.txt new file mode 100644 index 00000000..960ef7d3 --- /dev/null +++ b/config/jp/sym/reloc_addrs.txt @@ -0,0 +1,12 @@ +// Visit https://github.com/ethteck/splat/wiki/Advanced-Reloc for documentation about this file +// entrypoint relocs +rom:0x001000 reloc:MIPS_HI16 symbol:kernel_BSS_START +rom:0x001008 reloc:MIPS_LO16 symbol:kernel_BSS_START + +// This entry corresponds to the "stack top", which is the end of the array used as the stack for the main segment. +// It is commented out because it was not possible to infer what the start of the stack symbol is, so you'll have to figure it out by yourself. +// Once you have found it you can properly name it and specify the length of this stack as the addend value here. +// The address of the end of the stack is 0x802B5FE0. +// A common size for this stack is 0x2000, so try checking for the address 0x802B3FE0. Note the stack may have a different size. +// rom:0x001028 reloc:MIPS_HI16 symbol:main_stack addend:0xXXXX +// rom:0x001034 reloc:MIPS_LO16 symbol:main_stack addend:0xXXXX diff --git a/config/jp/sym/symbol_addrs.txt b/config/jp/sym/symbol_addrs.txt new file mode 100644 index 00000000..a455ec29 --- /dev/null +++ b/config/jp/sym/symbol_addrs.txt @@ -0,0 +1,755 @@ +// Visit https://github.com/ethteck/splat/wiki/Adding-Symbols for documentation about this file +entrypoint = 0x80200050; // type:func +bootproc = 0x8022E30C; // type:func + +// functions + +uvJanimLoad = 0x80200350; // type:func +uvJanimPoseLine = 0x80200B38; // type:func +uvJanimPoseGrid = 0x80200F00; // type:func +uvEmitterPrintf = 0x80201180; // type:func +uvEmitterInitTable = 0x8020119C; // type:func +uvEmitterInit = 0x802011F0; // type:func +uvEmitterLookup = 0x802012B8; // type:func +uvEmitterFromModel = 0x80201348; // type:func +uvEmitterSetMatrix = 0x802013F8; // type:func +uvEmitterGetMatrix = 0x80201444; // type:func +uvEmitter_80201494 = 0x80201494; // type:func +uvEmitterSetPri = 0x802016D4; // type:func +uvEmitterProp = 0x8020170C; // type:func +uvEmitterTrigger = 0x80201904; // type:func +uvEmitterRelease = 0x80201968; // type:func +uvEmitterStatus = 0x80201A0C; // type:func +_uvaSoundBegin = 0x80201B0C; // type:func +_uvaSoundEnd = 0x80201B7C; // type:func +uvEmitterFlush = 0x80201BA8; // type:func +uvEmitter_80201D08 = 0x80201D08; // type:func +_uvaUpdatePlayList = 0x802021D4; // type:func +_uvaPlaylistRemove = 0x80202678; // type:func +_uvaPlay = 0x80202728; // type:func +_uvaStartVoice = 0x80202998; // type:func +_uvaUpdateVoice = 0x80202AFC; // type:func +_uvaStopVoice = 0x80202BB8; // type:func +_uvaStatus = 0x80202C5C; // type:func +uvEventMaxCb = 0x80202F18; // type:func +uvEventPost = 0x80203088; // type:func +uvEventRemoveCb = 0x80203210; // type:func +uvSysInitAudio = 0x802038A0; // type:func +amCreateAudioMgr = 0x80203B08; // type:func +uvaSeqNew = 0x802046E0; // type:func +uvaSeqPlay = 0x802047A8; // type:func +uvaSeqSetTempo = 0x802047E8; // type:func +uvaSeqSetVol = 0x80204840; // type:func +uvaSeqStop = 0x8020489C; // type:func +uvChanEnv = 0x80204DEC; // type:func +uvChanTerra = 0x80204E5C; // type:func +_uvSortAdd = 0x80205814; // type:func +uvClkInit = 0x80205FD0; // type:func +uvClkUpdate = 0x80205FFC; // type:func +uvClkGetSec = 0x80206058; // type:func +uvClkReset = 0x80206150; // type:func +_uvDbSortHits = 0x802071CC; // type:func +uvTerraGetBox = 0x8020FA08; // type:func +uvModelGetPosm = 0x8020FA54; // type:func +uvModelGetProps = 0x8020FB2C; // type:func +uvTerraGetPt = 0x8020FCEC; // type:func +uvTerraGetSeg = 0x8020FF68; // type:func +uvTerraGetColor = 0x80210B70; // type:func +uvTerraGetState = 0x80210E04; // type:func +uvTerraGetPlane = 0x80210F18; // type:func +_uvSurfGetNorm = 0x8021119C; // type:func +uvSobjGetPt = 0x8021133C; // type:func +uvSobjGetSeg = 0x80211544; // type:func +_uvSegInMboxs = 0x80214F54; // type:func +uvDbColorModel = 0x80216750; // type:func +uvDobjModel = 0x802167F0; // type:func +uvDobjProps = 0x80216C1C; // type:func +uvDobjPosm = 0x80216E08; // type:func +uvDobjGetPosm = 0x80216FD8; // type:func +uvDobjState = 0x8021711C; // type:func +uvDobjSetState = 0x80217268; // type:func +uvDobjClearState = 0x802172C0; // type:func +uvDobjAllocIdx = 0x8021731C; // type:func +uvDobjInit = 0x80217398; // type:func +_uvDobjsDraw = 0x8021744C; // type:func +uvDobj_8021771C = 0x8021771C; // type:func +uvDobjGetLODIndex = 0x80217AB4; // type:func +uvDobj_80217B34 = 0x80217B34; // type:func +uvDobj_80217B4C = 0x80217B4C; // type:func +uvDobj_80217E24 = 0x80217E24; // type:func +uvDobj_802180DC = 0x802180DC; // type:func +uvEnvProps = 0x802181C0; // type:func +uvEnvProps2 = 0x80218470; // type:func +uvEnvFunc = 0x80218688; // type:func +_uvEnvDraw = 0x8021872C; // type:func +uvSeqModel = 0x80218D00; // type:func +uvSeqProps = 0x80218DB8; // type:func +uvParseTopUVFT = 0x80219270; // type:func +uvFontSet = 0x802194D8; // type:func +uvFontScale = 0x80219550; // type:func +uvFontColor = 0x8021956C; // type:func +uvFontStrLen = 0x802195A0; // type:func +uvFontStr16WidthFont = 0x802195DC; // type:func +uvFontStr16Width = 0x802196B0; // type:func +uvFontStrWidth = 0x802196EC; // type:func +uvFontWidth = 0x802197EC; // type:func +uvFontHeight = 0x80219828; // type:func +// first diff function: 0x80219874 - likely different uvFontPrintStr16 +uvFontPrintStr16 = 0x80219874; // type:func +// likely different uvFontPrintStr +uvFontPrintStr = 0x80219A1C; // type:func +uvFontSpriteWidth = 0x80219C30; // type:func +uvFontMsgGenDlist = 0x80219D14; // type:func +uvFontGenDlist = 0x80219E18; // type:func + +uvFxProps = 0x8021A4C0; // type:func +uvFxGetProps = 0x8021B4AC; // type:func +uvModelGet = 0x8021B950; // type:func +_uvFxDraw = 0x8021EC98; // type:func + +uvVtxInit = 0x8021F080; // type:func +uvVtx = 0x8021F1E4; // type:func +uvVtxReset = 0x8021F28C; // type:func +uvVtxBeginPoly = 0x8021F2E8; // type:func +uvBeginGrid = 0x8021F2FC; // type:func +uvBeginTmesh = 0x8021F310; // type:func +uvEndTmesh = 0x8021F324; // type:func +uvEndGridWide = 0x8021F4EC; // type:func +uvEndGrid = 0x8021F8EC; // type:func +uvVtxRect = 0x802204AC; // type:func +uvVtxEndPoly = 0x80220640; // type:func + +uvGfxInit = 0x802208E0; // type:func +uvGfxBegin = 0x80220B08; // type:func +uvGfxSetFogFactor = 0x80220C20; // type:func +uvGfxResetState = 0x80220D8C; // type:func +uvGfxMtxView = 0x80220EAC; // type:func +uvGfxMtxProj = 0x80220F78; // type:func +uvGfxDisplayList = 0x80221044; // type:func +uvGfxStateDrawDL = 0x80221068; // type:func +uvGfxStateDraw = 0x80221318; // type:func +uvGfxPushMtxUnk = 0x802219A4; // type:func +uvGfxClampLook = 0x80221A60; // type:func +uvGfxLookAt = 0x80221EB8; // type:func +uvGfxMtxProjPushF = 0x8022202C; // type:func +uvGfxSetCallback = 0x8022209C; // type:func +uvGfxEnd = 0x802220A8; // type:func +uvGfxClearScreen = 0x8022281C; // type:func +uvGfx_80222A98 = 0x802229C4; // type:func +uvGfxEnableZBuffer = 0x80222BC0; // type:func +uvGfxEnableCull = 0x80222CA4; // type:func +uvGfxEnableLighting = 0x80222DBC; // type:func +uvGfxClipRect = 0x80222E14; // type:func +uvGfxClipViewport = 0x80222FC0; // type:func +uvGfxSetViewport = 0x80222FF8; // type:func +uvGfxViewport = 0x80223040; // type:func +uvGfxMstackPushF = 0x80223168; // type:func +uvGfxMstackPushL = 0x80223208; // type:func +uvGfxMstackTop = 0x802232F0; // type:func +uvGfxSetUnkStateF = 0x80223334; // type:func +uvGfxGetUnkStateF = 0x80223340; // type:func +uvGfxMtxViewLoad = 0x80223388; // type:func +uvGfxMtxViewMul = 0x80223420; // type:func +uvGfx_802235A4 = 0x802234D0; // type:func +uvGfxMtxViewPop = 0x802235D4; // type:func +uvGfx_802236CC = 0x802235F8; // type:func +uvGfxGetCnt = 0x8022372C; // type:func +uvGfxStatePush = 0x80223818; // type:func +uvGfxStatePop = 0x80223878; // type:func +uvGfxSetFlags = 0x802238E0; // type:func +uvGfxClearFlags = 0x80223918; // type:func +uvGfxBindTexture = 0x80223954; // type:func +uvGfxTextureDL = 0x80223990; // type:func +uvGfxWaitForMesg = 0x80223AAC; // type:func +uvGfxEnableGamma = 0x80223AE4; // type:func +uvGfxSetUnkState0 = 0x80223B20; // type:func +uvGfx_80223C00 = 0x80223B2C; // type:func +uvCopyFrameBuf = 0x80223D18; // type:func + +uvFileReadHeader = 0x80223DB0; // type:func +uvFile_80223F30 = 0x80223E60; // type:func +uvFileGetCurLength = 0x80223E84; // type:func +uvFileGetCurTag = 0x80223E98; // type:func +uvFileReadBlock = 0x80223EAC; // type:func +uvFile_80224170 = 0x802240A0; // type:func +uvFile_8022427C = 0x802241AC; // type:func + +uvControllerInit = 0x802241D0; // type:func +uvControllerCheckInserted = 0x8022438C; // type:func +uvIOUpdate = 0x802243B8; // type:func +uvControllerUpdate = 0x80224478; // type:func +uvControllerGetStick = 0x802244BC; // type:func +uvControllerButtonCheck = 0x802244E0; // type:func +uvControllerGetButton = 0x80224518; // type:func +uvControllerButtonPress = 0x80224534; // type:func +uvControllerButtonRelease = 0x80224580; // type:func + +uvMemInitBlockHdr = 0x802245D0; // type:func +uvMemLoadDS = 0x802249C0; // type:func +uvMemLoadPal = 0x80224BAC; // type:func +uvLevelAppend = 0x80224C10; // type:func +uvConsumeBytes = 0x802252C4; // type:func +_uvParseUVLT = 0x802253A0; // type:func +_uvParseUVEN = 0x802253E0; // type:func +_uvParseUVSQ = 0x802254D0; // type:func +_uvParseUVMD = 0x802255E8; // type:func +_uvParseUVCT = 0x80225EEC; // type:func +_uvExpandTexture = 0x802264E8; // type:func +_uvExpandTextureImg = 0x80226984; // type:func +_uvExpandTextureCpy = 0x80226A50; // type:func +_uvParseUVTP = 0x80226F00; // type:func +_uvParseUVTR = 0x80226FEC; // type:func +_uvParseUVBT = 0x80227190; // type:func +uvParseTopUVCT = 0x80227734; // type:func +uvParseTopUVEN = 0x802277F0; // type:func +uvParseTopUVLV = 0x80227868; // type:func +uvParseTopUVTP = 0x802278E0; // type:func +uvParseTopUVLT = 0x80227958; // type:func +uvParseTopUVMD = 0x802279D0; // type:func +uvParseTopUVTR = 0x80227A8C; // type:func +uvParseTopUVTX = 0x80227B04; // type:func +uvParseTopUVTI = 0x80227BB4; // type:func +uvParseTopUVBT = 0x80227C64; // type:func +uvParseTopUVSQ = 0x80227D14; // type:func +func_80227E5C = 0x80227D8C; // type:func + +_uvDbMstackReset = 0x80227E60; // type:func +_uvDbMstackTop = 0x80227E70; // type:func +_uvDbMstackPush = 0x80227E8C; // type:func +_uvDbMstackPop = 0x80227F14; // type:func +uvMat4Copy = 0x80227F58; // type:func +uvMat4CopyXYZ = 0x80227FDC; // type:func +uvMat4CopyL = 0x80228028; // type:func +uvMat4CopyL2F = 0x802280B0; // type:func +uvMat4CopyF2L = 0x80228370; // type:func +uvMat4SetIdentity = 0x80228884; // type:func +uvMat4SetIdentityL = 0x802288D4; // type:func +uvMat4Mul = 0x80228920; // type:func +uvMat4MulBA = 0x80228D60; // type:func +uvMat4RotateAxis = 0x802291A0; // type:func +uvMat4LocalTranslate = 0x80229588; // type:func +uvMat4Scale = 0x802296C8; // type:func +uvMat4InvertTranslationRotation = 0x802297A8; // type:func +uvMat4LocalToWorld = 0x80229934; // type:func +uvMat4UnkOp6 = 0x802299D0; // type:func +uvMat4SetFrustrum = 0x80229B40; // type:func +uvMat4SetOrtho = 0x80229C04; // type:func +uvMat4SetQuaternionRotation = 0x80229CA8; // type:func + +uvSqrtF = 0x80229DD0; // type:func +uvSinF = 0x80229DF0; // type:func +uvCosF = 0x80229FB0; // type:func +uvLength2D = 0x8022A138; // type:func +uvLength3D = 0x8022A16C; // type:func +uvAtan2F = 0x8022A1AC; // type:func + +uvMemInitBlocks = 0x8022A2F0; // type:func +uvMemScanBlocks = 0x8022A424; // type:func +_uvJumpHeap = 0x8022A5A4; // type:func +_uvMediaCopy = 0x8022A690; // type:func +uvMemRead = 0x8022A810; // type:func +uvMemSet = 0x8022A9B0; // type:func +uvMemCmp = 0x8022A9E4; // type:func +_uvMemOverAlloc = 0x8022AA3C; // type:func +_uvMemAlloc = 0x8022AB78; // type:func +_uvMemFreeScratch = 0x8022AC88; // type:func +_uvMemGetScratch = 0x8022ACF4; // type:func +_uvMemGetBlocks = 0x8022ADA0; // type:func +uvLevelInit = 0x8022AE34; // type:func +_uvMemAllocAlign8 = 0x8022AFA8; // type:func + +_uvScDoneGfx = 0x8022B250; // type:func +_uvScDoneAud = 0x8022B348; // type:func +_uvScRunAud = 0x8022B3E4; // type:func +_uvScRunGfx = 0x8022B468; // type:func +_uvScDlistRecover = 0x8022B58C; // type:func +_uvScCreateScheduler = 0x8022B5FC; // type:func +_uvScAddClient = 0x8022B7D8; // type:func +_uvScGetCmdQ = 0x8022B7EC; // type:func +_uvScMain = 0x8022B7F4; // type:func +_uvScHandleRetrace = 0x8022B8F8; // type:func +_uvScHandleRSP = 0x8022BC18; // type:func +_uvScHandleRDP = 0x8022BD5C; // type:func +_uvScHandleNMI = 0x8022BDBC; // type:func +_uvScLogCpuEvent = 0x8022BDF4; // type:func +_uvScLogIntoRing = 0x8022C198; // type:func + +uvSobjsDraw = 0x8022C410; // type:func +uvSobjGetLODIndex = 0x8022C6E8; // type:func +uvSobj_8022C8D0 = 0x8022C800; // type:func +uvSobj_8022CC28 = 0x8022CB58; // type:func +uvSobjLoadTerra = 0x8022CE28; // type:func +uvSobjPosm = 0x8022CEF4; // type:func +uvSobj_8022D168 = 0x8022D098; // type:func +uvSobj_8022D1E4 = 0x8022D114; // type:func +uvSobjModel = 0x8022D148; // type:func + +uvStrchr = 0x8022D1E0; // type:func +uvStrlen = 0x8022D230; // type:func +uvStrcmp = 0x8022D268; // type:func +strFormatInt = 0x8022D404; // type:func +strFormatFloat = 0x8022D740; // type:func +strDigitToChar = 0x8022D970; // type:func +strCharToDigit = 0x8022D99C; // type:func +uvSprintf = 0x8022D9CC; // type:func +uvAtoi = 0x8022DD94; // type:func + +uvFileWrite = 0x8022DE20; // type:func +uvFileRead = 0x8022DF18; // type:func +uvSysInit = 0x8022E010; // type:func +uvWaitForMesg = 0x8022E20C; // type:func +uvSetVideoMode = 0x8022E29C; // type:func +Thread_Render = 0x8022E740; // type:func +Thread_App = 0x8022E7F0; // type:func +Thread_Kernel = 0x8022E850; // type:func +uvContMesgInit = 0x8022E950; // type:func +uvReadController = 0x8022EA08; // type:func +_uvDebugPrintf = 0x8022EBE4; // type:func +_uvDMA = 0x8022EC00; // type:func +_uvAssertMsg = 0x8022ED2C; // type:func + +_uvTerraDraw = 0x8022EF34; // type:func +uvComputeLineEndP = 0x8022F6B8; // type:func + +uvSprt_80230130 = 0x80230000; // type:func +uvSprt_802301A4 = 0x80230074; // type:func +_uvTxtDraw = 0x802301EC; // type:func +uvSprtFromBitmap = 0x80230538; // type:func +uvSprt_80230750 = 0x80230620; // type:func +uvSprtFindFree = 0x80230768; // type:func +uvSprtInit = 0x80230824; // type:func +uvSprtDisplayList = 0x80230A68; // type:func +uvSprtDrawAll = 0x80230C00; // type:func +uvSprtDraw = 0x80230CA4; // type:func +uvSprtSetBlit = 0x80230D38; // type:func +uvSprtGetWidth = 0x80230FF0; // type:func +uvSprtGetHeight = 0x8023100C; // type:func +uvSprtProps = 0x80231028; // type:func +uvSprtUpdateUnk = 0x80231320; // type:func +uvSprtResetUnk = 0x80231388; // type:func + +uvUserFileRead = 0x802313A0; // type:func + +uvRandSeed = 0x802314B0; // type:func +uvRandF_RANLUX = 0x802314BC; // type:func +uvRandF_LCG = 0x80231610; // type:func +uvAbs = 0x80231668; // type:func + +uvVec3Len = 0x80231680; // type:func +uvVec2Dot = 0x802316C0; // type:func +uvVec3Dot = 0x802316E4; // type:func +uvVec3Copy = 0x80231714; // type:func +uvVec3ScalarProj = 0x80231730; // type:func +uvVec3Cross = 0x80231778; // type:func +uvVec3Add = 0x802317D0; // type:func +uvVec3Mul = 0x80231804; // type:func +uvVec3Normal = 0x80231830; // type:func + +mio0_decompress = 0x802318F0; // type:func + +uvDbg_80231AC0 = 0x80231990; // type:func +uvDbg_80231C10 = 0x80231AE0; // type:func +uvDbg_80231C9C = 0x80231B6C; // type:func +uvDbg_80231F04 = 0x80231DD4; // type:func +uvDbg_8023217C = 0x8023204C; // type:func +uvDbg_802323A8 = 0x80232278; // type:func +uvDbg_80232554 = 0x80232424; // type:func +uvDbg_80232738 = 0x80232608; // type:func +uvDbg_8023286C = 0x8023273C; // type:func +uvDbg_80232EBC = 0x80232D8C; // type:func +uvDbg_80232ECC = 0x80232D9C; // type:func +uvDbg_80233310 = 0x802331E0; // type:func +uvDbg_802333AC = 0x8023327C; // type:func +uvDbg_8023345C = 0x8023332C; // type:func +uvDbgCnt = 0x802333B4; // type:func +uvDbg_80233590 = 0x80233460; // type:func +uvDbg_80233810 = 0x802336E0; // type:func +uvDbg_80233878 = 0x80233748; // type:func +uvDbg_802338A8 = 0x80233778; // type:func +uvDbg_802339B0 = 0x80233880; // type:func +uvDbg_80233A40 = 0x80233910; // type:func +uvDbg_80233D04 = 0x80233BD4; // type:func +uvDbg_80233DB8 = 0x80233C88; // type:func +uvDbg_80233FC8 = 0x80233E98; // type:func + +alSndpSetSound = 0x80234370; // type:func +alSndpGetState = 0x80234390; // type:func +alSndpStop = 0x802343B0; // type:func +alSndpDeallocate = 0x80234400; // type:func +alSndpAllocate = 0x80234450; // type:func +alSndpPlay = 0x802344F0; // type:func +alSndpSetVol = 0x80234560; // type:func +alSndpSetPitch = 0x802345C0; // type:func +alSndpSetFXMix = 0x80234620; // type:func +alSndpSetPan = 0x80234680; // type:func +alHeapInit = 0x802346E0; // type:func +alSndpNew = 0x80234CF4; // type:func +__CSPPostNextSeqEvent = 0x80234E30; // type:func +alCSPNew = 0x80235EF0; // type:func +osSendMesg = 0x80236060; // type:func +alHeapDBAlloc = 0x802361B0; // type:func +alBnkfNew = 0x80236314; // type:func +alSeqFileNew = 0x80236418; // type:func +osAiSetFrequency = 0x80236460; // type:func +alUnlink = 0x802365C0; // type:func +alLink = 0x802365F0; // type:func +alClose = 0x80236614; // type:func +alInit = 0x8023664C; // type:func +osCreateMesgQueue = 0x80236680; // type:func +osCreateThread = 0x802366B0; // type:func +osStartThread = 0x80236800; // type:func +osRecvMesg = 0x80236950; // type:func +osVirtualToPhysical = 0x80236A90; // type:func +osAiSetNextBuffer = 0x80236B10; // type:func +osAiGetLength = 0x80236BC0; // type:func +_timeToSamples = 0x80236BD8; // type:func +_freePVoice = 0x80236C30; // type:func +_collectPVoices = 0x80236C68; // type:func +__freeParam = 0x80236CC8; // type:func +__allocParam = 0x80236CE0; // type:func +alAudioFrame = 0x80236D18; // type:func +alSynNew = 0x80236FA0; // type:func +osPiStartDma = 0x802372A0; // type:func +alSeqpSetBank = 0x802373B0; // type:func +alSeqpGetState = 0x802373F0; // type:func +alCSeqGetLoc = 0x80237400; // type:func +alCSeqSetLoc = 0x802374A0; // type:func +alCSeqNextEvent = 0x80237664; // type:func +alCSeqNew = 0x8023795C; // type:func +alCSeqNewMarker = 0x80237A70; // type:func +alCSeqGetTicks = 0x80237BDC; // type:func +alCSeqSecToTicks = 0x80237BE4; // type:func +alCSeqTicksToSec = 0x80237CE0; // type:func +__alCSeqNextDelta = 0x80237D4C; // type:func +alSeqpSetSeq = 0x80237EC0; // type:func +alSeqpPlay = 0x80237F00; // type:func +alSeqpSetTempo = 0x80237F30; // type:func +alSeqpSetVol = 0x80237FA0; // type:func +alSeqpStop = 0x80237FE0; // type:func +osGetCount = 0x80238010; // type:func +spFinish = 0x80238020; // type:func +spDraw = 0x80239784; // type:func +spInit = 0x8023A4F0; // type:func +spScissor = 0x8023A61C; // type:func +spMove = 0x8023A640; // type:func +spColor = 0x8023A650; // type:func +spScale = 0x8023A680; // type:func +sqrtf = 0x8023A6F0; // type:func +osViBlack = 0x8023A700; // type:func +osWritebackDCache = 0x8023A770; // type:func +osViSetSpecialFeatures = 0x8023A7F0; // type:func + +__ull_rshift = 0x8023A9B0; // type:func +__ull_rem = 0x8023A9DC; // type:func +__ull_div = 0x8023AA18; // type:func +__ll_lshift = 0x8023AA54; // type:func +__ll_rem = 0x8023AA80; // type:func +__ll_div = 0x8023AABC; // type:func +__ll_mul = 0x8023AB18; // type:func +__ull_divremi = 0x8023AB48; // type:func +__ll_mod = 0x8023ABA8; // type:func +__ll_rshift = 0x8023AC44; // type:func + +osPiReadIo = 0x8023AC70; // type:func +osViSwapBuffer = 0x8023ACF0; // type:func +osWritebackDCacheAll = 0x8023AD40; // type:func +osSpTaskLoad = 0x8023AE8C; // type:func +osSpTaskStartGo = 0x8023AFEC; // type:func +osViGetCurrentFramebuffer = 0x8023B030; // type:func +osViGetNextFramebuffer = 0x8023B070; // type:func +osCreateViManager = 0x8023B0B0; // type:func +viMgrMain = 0x8023B234; // type:func +osViSetMode = 0x8023B410; // type:func +osSetEventMesg = 0x8023B480; // type:func +osViSetEvent = 0x8023B4F0; // type:func +osSpTaskYield = 0x8023B560; // type:func +osSpTaskYielded = 0x8023B580; // type:func +osEepromLongWrite = 0x8023B600; // type:func +osEepromLongRead = 0x8023B740; // type:func +osEepromProbe = 0x8023B880; // type:func +osInitialize = 0x8023B8F0; // type:func +osPiRawReadIo = 0x8023BB20; // type:func +__osGetCurrFaultedThread = 0x8023BB80; // type:func +osCreatePiManager = 0x8023BB90; // type:func +osSetThreadPri = 0x8023BD10; // type:func +osSetTimer = 0x8023BDF0; // type:func +osContInit = 0x8023BED0; // type:func +__osContGetInitData = 0x8023C0CC; // type:func +__osPackRequestData = 0x8023C19C; // type:func +osContStartReadData = 0x8023C290; // type:func +osContGetReadData = 0x8023C354; // type:func +osInvalDCache = 0x8023C4F0; // type:func +lldiv = 0x8023C5A0; // type:func +ldiv = 0x8023C6A0; // type:func +alEvtqFlushType = 0x8023C730; // type:func +alEvtqFlush = 0x8023C7DC; // type:func +alEvtqPostEvent = 0x8023C84C; // type:func +alEvtqNextEvent = 0x8023C970; // type:func +alEvtqNew = 0x8023C9FC; // type:func +alSynAddPlayer = 0x8023CA70; // type:func +_allocatePVoice = 0x8023CAC0; // type:func +alSynAllocVoice = 0x8023CBA8; // type:func +alSynStartVoice = 0x8023CCF0; // type:func +alSynSetPan = 0x8023CD80; // type:func +alSynSetVol = 0x8023CE10; // type:func +alSynSetPitch = 0x8023CEB0; // type:func +alSynSetFXMix = 0x8023CF40; // type:func +alSynStopVoice = 0x8023CFE0; // type:func +alSynFreeVoice = 0x8023D060; // type:func +osSetIntMask = 0x8023D110; // type:func +__setInstChanState = 0x8023D170; // type:func +__resetPerfChanState = 0x8023D1C4; // type:func +__initFromBank = 0x8023D244; // type:func +__vsDelta = 0x8023D300; // type:func +__vsVol = 0x8023D324; // type:func +__seqpReleaseVoice = 0x8023D3AC; // type:func +__voiceNeedsNoteKill = 0x8023D4D8; // type:func +__unmapVoice = 0x8023D580; // type:func +__postNextSeqEvent = 0x8023D5F0; // type:func +__vsPan = 0x8023D744; // type:func +__lookupVoice = 0x8023D78C; // type:func +__mapVoice = 0x8023D800; // type:func +__lookupSoundQuick = 0x8023D870; // type:func +__seqpStopOsc = 0x8023E7B0; // type:func +__initChanState = 0x8023E8B4; // type:func +alSeqpNew = 0x8023E924; // type:func +alCents2Ratio = 0x8023EAB0; // type:func +alSynStartVoiceParams = 0x8023EB00; // type:func +__osDisableInt = 0x8023EBF0; // type:func +__osRestoreInt = 0x8023EC10; // type:func +__osDequeueThread = 0x8023EC30; // type:func +__osExceptionPreamble = 0x8023EC70; // type:func +__osException = 0x8023EC80; // type:func +send_mesg = 0x8023F1C8; // type:func +handle_CpU = 0x8023F27C; // type:func +__osEnqueueAndYield = 0x8023F2B0; // type:func +__osEnqueueThread = 0x8023F340; // type:func +__osPopThread = 0x8023F388; // type:func +__osDispatchThread = 0x8023F398; // type:func +__osCleanupThread = 0x8023F4D8; // use_non_matching_label:False +__osViInit = 0x8023F4E0; // type:func +alSynDelete = 0x8023F5F0; // type:func +__osProbeTLB = 0x8023F600; // type:func +__osAiDeviceBusy = 0x8023F6C0; // type:func +alSaveNew = 0x8023F6F0; // type:func +alResampleNew = 0x8023F7DC; // type:func +alLoadNew = 0x8023F864; // type:func +alEnvmixerNew = 0x8023F90C; // type:func +init_lpfilter = 0x8023F9B0; // type:func +alFxNew = 0x8023FA50; // type:func +alSynAllocFX = 0x8023FE70; // type:func +alMainBusParam = 0x8023FF10; // type:func +alMainBusPull = 0x8023FF40; // type:func +alLoadParam = 0x80240060; // type:func +alRaw16Pull = 0x80240234; // type:func +alAdpcmPull = 0x8024070C; // type:func +alResampleParam = 0x80240BB0; // type:func +alResamplePull = 0x80240C9C; // type:func +_ldexpf = 0x80240EB0; // type:func +_frexpf = 0x80240ED8; // type:func +alEnvmixerParam = 0x80240FC4; // type:func +alEnvmixerPull = 0x802415BC; // type:func +alAuxBusParam = 0x80241B10; // type:func +alAuxBusPull = 0x80241B40; // type:func +alSaveParam = 0x80241C20; // type:func +alSavePull = 0x80241C54; // type:func +osJamMesg = 0x80241CE0; // type:func +osPiGetCmdQueue = 0x80241E30; // type:func +spClearAttribute = 0x80241E60; // type:func +spSetAttribute = 0x80241E80; // type:func +__osPiCreateAccessQueue = 0x80241E90; // type:func +__osPiGetAccess = 0x80241EE0; // type:func +__osPiRelAccess = 0x80241F24; // type:func +bcopy = 0x80241F50; // type:func +__osSpSetStatus = 0x80242260; // type:func +__osSpSetPc = 0x80242270; // type:func +__osSpRawStartDma = 0x802422B0; // type:func +__osSpDeviceBusy = 0x80242340; // type:func +__osTimerServicesInit = 0x80242370; // type:func +__osTimerInterrupt = 0x802423FC; // type:func +__osSetTimerIntr = 0x80242574; // type:func +__osInsertTimer = 0x802425E8; // type:func +osGetThreadPri = 0x80242770; // type:func +__osViGetCurrentContext = 0x80242790; // type:func +__osViSwapContext = 0x802427A0; // type:func +__osSpGetStatus = 0x80242B00; // type:func +osEepromWrite = 0x80242B10; // type:func +__osPackEepWriteData = 0x80242CC0; // type:func +__osEepStatus = 0x80242DCC; // type:func +osEepromRead = 0x80242FF0; // type:func +__osPackEepReadData = 0x802431E0; // type:func +__osSiCreateAccessQueue = 0x802432F0; // type:func +__osSiGetAccess = 0x80243340; // type:func +__osSiRelAccess = 0x80243384; // type:func +__osSetSR = 0x802433B0; // type:func +__osGetSR = 0x802433C0; // type:func +__osSetFpcCsr = 0x802433D0; // type:func +__osSiRawReadIo = 0x802433E0; // type:func +__osSiRawWriteIo = 0x80243430; // type:func +osInvalICache = 0x80243480; // type:func +osMapTLBRdb = 0x80243500; // type:func +bzero = 0x80243560; // type:func +osPiRawStartDma = 0x80243600; // type:func +__osDevMgrMain = 0x802436E0; // type:func +osGetTime = 0x80243860; // type:func +__osSiRawStartDma = 0x802438F0; // type:func +alCopy = 0x802439A0; // type:func +alSeqGetLoc = 0x80243A20; // type:func +alSeqSetLoc = 0x80243A3C; // type:func +alSeqGetTicks = 0x80243A58; // type:func +alSeqNextEvent = 0x80243AB4; // type:func +alSeqNewMarker = 0x80243C38; // type:func +alSeqSecToTicks = 0x80243D58; // type:func +alSeqTicksToSec = 0x80243E3C; // type:func +__alSeqNextDelta = 0x80243E90; // type:func +alSeqNew = 0x80243F68; // type:func +alSynSetPriority = 0x80244040; // type:func +kdebug_u32_to_string = 0x80244050; // type:func +kdebug_string_to_u32 = 0x80244080; // type:func +kdebug_send_packet = 0x802440D8; // type:func +kdebug_send = 0x80244198; // type:func +kdebug_send_buffer = 0x80244270; // type:func +kdebug_send_thread = 0x802442BC; // type:func +kdebugserver = 0x802442E8; // type:func +__osSyncPutChars = 0x802444D0; // type:func +osDestroyThread = 0x80244600; // type:func +alFilterNew = 0x80244700; // type:func +_doModFunc = 0x80244720; // type:func +_filterBuffer = 0x802447C8; // type:func +_saveBuffer = 0x80244880; // type:func +_loadBuffer = 0x80244A08; // type:func +_loadOutputBuffer = 0x80244B94; // type:func +alFxParamHdl = 0x80244DB8; // type:func +alFxParam = 0x80244FD0; // type:func +alFxPull = 0x80244FE8; // type:func +__osSetCompare = 0x80245330; // type:func +__osSiDeviceBusy = 0x80245340; // type:func +__osGetCause = 0x80245370; // type:func +__osAtomicDec = 0x80245380; // type:func + +// data + +nextDMA = 0x80248B30; +curAcmdList = 0x80248B34; +gAudioHeapStart = 0x80248B3C; +gSeqPlayer = 0x80248B40; +gSndPlayer = 0x80248B44; + +gGfxUnkPtrs = 0x80248C80; +D_80248DD8 = 0x80248C88; + +sFontScaleX = 0x80248D2C; +sFontScaleY = 0x80248D30; +sFontCurId = 0x80248D34; +sFontMsgCount = 0x80248D3C; +sFontSprite = 0x80248CD0; // size:0x44 +sFontColorR = 0x80248D14; +sFontColorG = 0x80248D18; +sFontColorB = 0x80248D1C; +sFontColorA = 0x80248D20; + +gGfxDList1 = 0x80248FF0; +gGfxDList2 = 0x80249060; +gGfxFrameTime = 0x80249088; +D_802491E0 = 0x80249090; +D_802491E4 = 0x80249094; +D_802491E8 = 0x80249098; +gGfxGammaEnabled = 0x8024909C; +gGfxFbCurrPtr = 0x802490A0; +gGfxZBufferEnabled = 0x802490A4; +gGfxCullFrontEnabled = 0x802490A8; +gGfxCullBackEnabled = 0x802490AC; +gGfxSyncNeeded = 0x802490B0; +gGfxBeginFlag = 0x802490B4; +gGfxFogFactor = 0x802490B8; +gGfxFbIndex = 0x802490BC; +gGfxElementCount = 0x802490C0; +gGfxFrameCount = 0x802490C4; +gGfxMstackIdx = 0x802490C8; +gGfxFrameTimeFixed = 0x802490CC; + +gMatrixStackIdx = 0x8024B100; + +gRandLcgState = 0x8024B170; +gRanluxState1 = 0x8024B174; +gRanluxState2 = 0x8024B178; + +D_8024B260 = 0x8024B110; + +D_803805E0 = 0x80372FC0; + +alGlobals = 0x8024B630; + +__osViDevMgr = 0x8024B660; // size:0x18 + +osViModeTable = 0x8024B680; // size:0x8c0 + +osClockRate = 0x8024BF40; // size:0x8 +__osShutdown = 0x8024BF48; + +__osPiDevMgr = 0x8024BF50; // size:0x18 + +__osContinitialized = 0x8024BF70; + +__osThreadTail = 0x8024BF80; +__osRunQueue = 0x8024BF88; +__osActiveQueue = 0x8024BF8C; +__osRunningThread = 0x8024BF90; +__osFaultedThread = 0x8024BF94; + +__osPiAccessQueueEnabled = 0x8024C300; + +__osTimerList = 0x8024C310; + +__osRdbSendMessage = 0x8024C340; +__osRdbWriteOK = 0x8024C344; + +osViModeNtscLan1 = 0x8024C350; +osViModePalLan1 = 0x8024C3A0; + +// .bss + +D_80269F50 = 0x80269DC0; // size:0xF0 + +sFontBitmaps = 0x80269EB0; // size:0x190 +sFontDList = 0x8026A040; // size:0x11AC0 +sFontMessages = 0x8027BB00; // size:0x8F0 + +D_8028A0A0 = 0x8027C3F0; + +gGfxTaskOutputBuffer = 0x80288DF0; // size:0x2008 +gGfxTaskOutputBufferStart = 0x8028ADF8; +gGfxTaskOutputBufferEnd = 0x8028ADFC; +gGfxDisplayListHead = 0x8028AE00; +gGfxNumVtxTransforms = 0x8028AE08; +gGfxNumTriangles = 0x8028AE10; +gGfxNumTxtLoads = 0x8028AE18; +gGfxNumMtxLoads = 0x8028AE20; +gGfxNumMtxLoadMults = 0x8028AE28; +gGfxNumLooks = 0x8028AE30; +gGfxLooks = 0x8028AE38; // size:0x780 +gGfxStateStackData = 0x8028B5B8; +gGfxBoundTexture = 0x8028B5BC; +gGfxFbPtrs = 0x8028B5C0; +D_80299278 = 0x8028B5C8; +gGfxDisplayListBase = 0x8028B5D0; // size:0x10680 +gGfxViewports = 0x8029BC50; +gGfxViewX0 = 0x8029BCD0; +gGfxViewX1 = 0x8029BCD2; +gGfxViewY0 = 0x8029BCD4; +gGfxViewY1 = 0x8029BCD6; + +gUVBlockOffsets = 0x802A7740; // size:0x1A40 + +gSchedInst = 0x802B5BF8; +D_802C3B50 = 0x802B5EA0; +D_802C3B68 = 0x802B5EB8; +D_802C3B90 = 0x802B5EE0; +gSchedClient = 0x802B7EF8; + +__osThreadSave = 0x802BCAA0; +__osEventStateTab = 0x802BB5F0; + +// app functions + +app_entrypoint = 0x80302690; // type:func diff --git a/config/us/pilotwings64.us.yaml b/config/us/pilotwings64.us.yaml index e74ae279..3088cf7d 100644 --- a/config/us/pilotwings64.us.yaml +++ b/config/us/pilotwings64.us.yaml @@ -3,7 +3,7 @@ sha1: ec771aedf54ee1b214c25404fb4ec51cfd43191a options: basename: pilotwings64 target_path: baserom.us.z64 - elf_path: build/pilotwings64.elf + elf_path: build/pilotwings64.us.elf base_path: ../.. platform: n64 compiler: IDO diff --git a/decomp.yaml b/decomp.yaml index 27e6b8e8..fd61a65a 100644 --- a/decomp.yaml +++ b/decomp.yaml @@ -14,6 +14,18 @@ versions: expected_dir: "expected" asm: "asm" nonmatchings: "asm/nonmatchings" +- name: jp + fullname: JP + sha1: 892a5472d9a6811b881d093020de81f72baeeec9 + paths: + target: "baserom.jp.z64" + build_dir: "build" + map: "build/pilotwings64.jp.map" + compiled_target: "build/pilotwings64.jp.z64" + elf: "build/pilotwings64.jp.elf" + expected_dir: "expected" + asm: "asm" + nonmatchings: "asm/nonmatchings" tools: decompme: @@ -48,4 +60,3 @@ tools: name: libultra paths: - ultralib - diff --git a/include/kernel/uv_graphics.h b/include/kernel/uv_graphics.h index 402f1159..1af49517 100644 --- a/include/kernel/uv_graphics.h +++ b/include/kernel/uv_graphics.h @@ -277,7 +277,7 @@ typedef struct ParsedUVSQ { u8 mode; u8 reverse; f32 framerate; -} ParsedUVSQ; +} ParsedUVSQ; // size = 0x10 typedef struct { Vec4F unk0; @@ -302,14 +302,20 @@ typedef struct { u8 unk9; } ParsedUVAN; + +#if defined(VERSION_JP) + #define UVFT_IMAG_SIZE 0x28 +#elif defined(VERSION_US) + #define UVFT_IMAG_SIZE 0x2C +#endif typedef struct ParsedUVFT { char* str; u8 pad4[0x4]; u8 bmfmt; u8 bmsiz; Bitmap* bitmap; - void* imag[0x2C]; -} ParsedUVFT; // size = 0x80 + void* imag[UVFT_IMAG_SIZE]; +} ParsedUVFT; // size = JP:0xB0, US:0xC0 typedef struct uvGfxUnkStructFont { char* unk0; diff --git a/src/kernel/font.c b/src/kernel/font.c index 58b36b23..ea237fed 100644 --- a/src/kernel/font.c +++ b/src/kernel/font.c @@ -5,7 +5,16 @@ #include #include -#define FONT_MAX_MSG_LEN 44 +#if defined(VERSION_JP) + #define FONT_MAX_MSG_LEN 25 + #define FONT_DL_COUNT 4524 +#elif defined(VERSION_US) + #define FONT_MAX_MSG_LEN 44 + #define FONT_DL_COUNT 7944 +#else + #error Unknown build VERSION +#endif +#define FONT_MSG_COUNT 30 // struct containing a printed string's font data // contains position, scale, color, string, pointer to font @@ -20,11 +29,11 @@ typedef struct Unk80289380 { u8 a; s16 str16[FONT_MAX_MSG_LEN]; ParsedUVFT* font; -} FontMessage; // size = 0x70 +} FontMessage; // size = JP:0x4C US:0x70 STATIC_DATA Bitmap sFontBitmaps[FONT_MAX_MSG_LEN]; -STATIC_DATA Gfx sFontDList[7944 * 2]; -STATIC_DATA FontMessage sFontMessages[30]; +STATIC_DATA Gfx sFontDList[FONT_DL_COUNT * 2]; +STATIC_DATA FontMessage sFontMessages[FONT_MSG_COUNT]; STATIC_DATA Sprite sFontSprite = { 0, // x @@ -46,8 +55,8 @@ STATIC_DATA Sprite sFontSprite = { NULL, // LUT 0, // istart 1, // istep - 660, // nbitmaps - 7944, // ndisplist + 15 * FONT_MAX_MSG_LEN, // nbitmaps + FONT_DL_COUNT,// ndisplist 15, // bmheight 128, // bmHreal G_IM_FMT_IA, // bmfmt @@ -66,11 +75,11 @@ STATIC_DATA u8 sFontColorA = 0xFF; STATIC_DATA UNUSED s32 D_80248E74 = 0; STATIC_DATA UNUSED s32 D_80248E78 = 0; -STATIC_DATA f32 sFontScaleX = 1.0f; -STATIC_DATA f32 sFontScaleY = 1.0f; -STATIC_DATA u32 sFontCurId = 0; +f32 sFontScaleX = 1.0f; +f32 sFontScaleY = 1.0f; +u32 sFontCurId = 0; STATIC_DATA u32 sFontCurWidth = 8; -STATIC_DATA s32 sFontMsgCount = 0; +s32 sFontMsgCount = 0; ParsedUVFT* uvParseTopUVFT(s32 arg0) { ParsedUVFT* ret; @@ -218,6 +227,9 @@ s32 uvFontHeight(void) { return font->bitmap[1].actualHeight * sFontScaleY; } +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/kernel/font/uvFontPrintStr16.s") +#else // adds str16 to messages using current font settings s32 uvFontPrintStr16(s32 x, s32 y, s16* str16, s32 strLen, s32 end) { s32 i16; @@ -296,7 +308,11 @@ s32 uvFontPrintStr16(s32 x, s32 y, s16* str16, s32 strLen, s32 end) { } return ret; } +#endif +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/kernel/font/uvFontPrintStr.s") +#else void uvFontPrintStr(s32 x, s32 y, const char* str) { char* chrPos; s32 strLen; @@ -334,6 +350,7 @@ void uvFontPrintStr(s32 x, s32 y, const char* str) { sFontMessages[sFontMsgCount].font = gGfxUnkPtrs->fonts[sFontCurId]; sFontMsgCount++; } +#endif STATIC_FUNC s32 uvFontSpriteWidth(Sprite* sprite, s16* str16, ParsedUVFT* font) { s32 width; @@ -389,7 +406,7 @@ void uvFontGenDlist(void) { D_80248E94 = gGfxFbIndex; } spInit(&gGfxDisplayListHead); - sFontSprite.rsp_dl_next = &sFontSprite.rsp_dl[(gGfxFbIndex * 7944) + D_80248E90]; + sFontSprite.rsp_dl_next = &sFontSprite.rsp_dl[(gGfxFbIndex * FONT_DL_COUNT) + D_80248E90]; for (i = 0; i < sFontMsgCount; i++) { uvFontMsgGenDlist(&sFontMessages[i]); diff --git a/src/kernel/fx_seq.c b/src/kernel/fx_seq.c index 85750f4f..5369a01e 100644 --- a/src/kernel/fx_seq.c +++ b/src/kernel/fx_seq.c @@ -10,7 +10,7 @@ typedef struct uvSeqState { u8 currFrame; f32 frameTime; ParsedUVSQ uvsq; -} uvSeqState; +} uvSeqState; // size = 0x18 uvSeqState gSeqStateTable[10]; diff --git a/src/kernel/graphics.c b/src/kernel/graphics.c index c546940a..58468abf 100644 --- a/src/kernel/graphics.c +++ b/src/kernel/graphics.c @@ -228,6 +228,9 @@ void uvGfxStateDrawDL(uvGfxState_t* arg0) { gGfxNumTriangles[gGfxFbIndex] += arg0->triCount * 2; } +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/kernel/graphics/uvGfxStateDraw.s") +#else void uvGfxStateDraw(uvGfxState_t* arg0) { u32 clearMode; u32 setMode; @@ -423,6 +426,7 @@ void uvGfxStateDraw(uvGfxState_t* arg0) { gGfxNumTriangles[gGfxFbIndex] += arg0->triCount; } } +#endif void uvGfxPushMtxUnk(Mtx4F* arg0) { Mtx spC8; diff --git a/src/kernel/system.c b/src/kernel/system.c index 042cf8f4..658a75f4 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -186,6 +186,10 @@ void uvWaitForMesg(char msg_type) { } } +#if defined(VERSION_JP) +// JP does not have switch block, hardcodes viMode to OS_VI_NTSC_LAN1 +#pragma GLOBAL_ASM("asm/nonmatchings/kernel/system/uvSetVideoMode.s") +#else void uvSetVideoMode(void) { s32 viMode; @@ -206,6 +210,7 @@ void uvSetVideoMode(void) { _uvScCreateScheduler(&gSchedInst, gSchedStack + sizeof(gSchedStack), OS_PRIORITY_APPMAX, viMode, 1); _uvScAddClient(&gSchedInst, &gSchedClient, &D_802C3B50); } +#endif void bootproc(void* arg0) { u32 devAddr; // var_s1 diff --git a/src/libultra/io/vi.c b/src/libultra/io/vi.c index 0050fbee..709929b1 100644 --- a/src/libultra/io/vi.c +++ b/src/libultra/io/vi.c @@ -12,7 +12,9 @@ extern OSViMode osViModePalLan1; extern OSViMode osViModeNtscLan1; void __osViInit(void) { +#if !defined(VERSION_JP) sTvType = osTvType; +#endif bzero(sViContexts, sizeof(sViContexts)); __osViCurr = &sViContexts[0]; @@ -20,6 +22,15 @@ void __osViInit(void) { __osViNext->retraceCount = 1; __osViCurr->retraceCount = 1; +#if defined(VERSION_JP) + if (sTvType != 0) { + __osViNext->modep = &osViModeNtscLan1; + osViClock = VI_NTSC_CLOCK; + } else { + __osViNext->modep = &osViModePalLan1; + osViClock = VI_PAL_CLOCK; + } +#else if (sTvType == OS_TV_TYPE_NTSC) { __osViNext->modep = &osViModeNtscLan1; osViClock = VI_NTSC_CLOCK; @@ -27,6 +38,7 @@ void __osViInit(void) { __osViNext->modep = &osViModePalLan1; osViClock = VI_MPAL_CLOCK; } +#endif __osViNext->state = VI_STATE_BLACK; __osViNext->control = __osViNext->modep->comRegs.ctrl; diff --git a/src/libultra/io/vitbl.c b/src/libultra/io/vitbl.c index 91f97421..90deb5f3 100644 --- a/src/libultra/io/vitbl.c +++ b/src/libultra/io/vitbl.c @@ -1,5 +1,569 @@ #include "PR/ultratypes.h" +#if defined(VERSION_JP) +u32 osViModeTable[] = { + 0x00000000, + 0x0000320E, + 0x00000140, + 0x03E52239, + 0x0000020D, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000280, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x00000280, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x01000000, + 0x0000324E, + 0x00000140, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000280, + 0x01000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000280, + 0x03000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x02000000, + 0x0000311E, + 0x00000140, + 0x03E52239, + 0x0000020D, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000280, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x00000280, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x03000000, + 0x0000305E, + 0x00000140, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000280, + 0x01000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000280, + 0x03000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x04000000, + 0x0000330F, + 0x00000140, + 0x03E52239, + 0x0000020D, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000500, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x00000500, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x05000000, + 0x0000324F, + 0x00000140, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000500, + 0x01000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000500, + 0x03000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x06000000, + 0x0000301F, + 0x00000140, + 0x03E52239, + 0x0000020D, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000500, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x00000500, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x07000000, + 0x0000305F, + 0x00000140, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000200, + 0x00000000, + 0x00000500, + 0x01000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000500, + 0x03000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x08000000, + 0x0000324E, + 0x00000500, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000500, + 0x00000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000A00, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x09000000, + 0x0000324E, + 0x00000280, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000500, + 0x02000800, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000A00, + 0x02000800, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x0A000000, + 0x0000305E, + 0x00000500, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000500, + 0x00000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000A00, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x0B000000, + 0x0000305E, + 0x00000280, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000500, + 0x02000800, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00000A00, + 0x02000800, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x0C000000, + 0x0000334F, + 0x00000500, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000A00, + 0x00000400, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00001400, + 0x00000400, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x0D000000, + 0x0000324F, + 0x00000280, + 0x03E52239, + 0x0000020C, + 0x00000C15, + 0x0C150C15, + 0x006C02EC, + 0x00000400, + 0x00000000, + 0x00000A00, + 0x02000800, + 0x002301FD, + 0x000E0204, + 0x00000002, + 0x00001400, + 0x02000800, + 0x002501FF, + 0x000E0204, + 0x00000002, + 0x0E000000, + 0x0000320E, + 0x00000140, + 0x0404233A, + 0x00000271, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000280, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x00000280, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x0F000000, + 0x0000324E, + 0x00000140, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000280, + 0x01000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000280, + 0x03000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x10000000, + 0x0000311E, + 0x00000140, + 0x0404233A, + 0x00000271, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000280, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x00000280, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x11000000, + 0x0000305E, + 0x00000140, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000280, + 0x01000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000280, + 0x03000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x12000000, + 0x0000330F, + 0x00000140, + 0x0404233A, + 0x00000271, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000500, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x00000500, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x13000000, + 0x0000324F, + 0x00000140, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000500, + 0x01000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000500, + 0x03000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x14000000, + 0x0000301F, + 0x00000140, + 0x0404233A, + 0x00000271, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000500, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x00000500, + 0x00000400, + 0x005F0239, + 0x0009026B, + 0x00000002, + 0x15000000, + 0x0000305F, + 0x00000140, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000200, + 0x00000000, + 0x00000500, + 0x01000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000500, + 0x03000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x16000000, + 0x0000324E, + 0x00000500, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000500, + 0x00000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000A00, + 0x00000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x17000000, + 0x0000324E, + 0x00000280, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000500, + 0x02000800, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000A00, + 0x02000800, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x18000000, + 0x0000305E, + 0x00000500, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000500, + 0x00000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000A00, + 0x00000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x19000000, + 0x0000305E, + 0x00000280, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000500, + 0x02000800, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00000A00, + 0x02000800, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x1A000000, + 0x0000334F, + 0x00000500, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000A00, + 0x00000400, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00001400, + 0x00000400, + 0x005F0239, + 0x000D0269, + 0x00000002, + 0x1B000000, + 0x0000324F, + 0x00000280, + 0x0404233A, + 0x00000270, + 0x00150C69, + 0x0C6F0C6E, + 0x00800300, + 0x00000400, + 0x00000000, + 0x00000A00, + 0x02000800, + 0x005D0237, + 0x0009026B, + 0x00000002, + 0x00001400, + 0x02000800, + 0x005F0239, + 0x000D0269, + 0x00000002, +}; +#else u32 osViModeTable[] = { 0x00000000, 0x0000320E, @@ -562,6 +1126,7 @@ u32 osViModeTable[] = { 0x000E0204, 0x00000002, }; +#endif #if 0 #include "PR/os.h" From ffd31d6532960afcfcbcb1d5f49e4ba9753c0836 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Tue, 5 May 2026 04:42:26 +0000 Subject: [PATCH 2/9] Match (J) uvFontPrintStr and uvSetVideoMode - (J) uvFontPrintStr matches with the updated macros - (J) uvSetVideoMode is trivial match --- src/kernel/font.c | 74 +++++++++++++++++++++------------------------ src/kernel/system.c | 9 +++--- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/kernel/font.c b/src/kernel/font.c index ea237fed..5aa9f7c5 100644 --- a/src/kernel/font.c +++ b/src/kernel/font.c @@ -6,15 +6,15 @@ #include #if defined(VERSION_JP) - #define FONT_MAX_MSG_LEN 25 - #define FONT_DL_COUNT 4524 +#define FONT_MAX_MSG_LEN 25 +#define FONT_DL_COUNT 4524 #elif defined(VERSION_US) - #define FONT_MAX_MSG_LEN 44 - #define FONT_DL_COUNT 7944 +#define FONT_MAX_MSG_LEN 44 +#define FONT_DL_COUNT 7944 #else - #error Unknown build VERSION +#error Unknown build VERSION #endif -#define FONT_MSG_COUNT 30 +#define FONT_MSG_COUNT 30 // struct containing a printed string's font data // contains position, scale, color, string, pointer to font @@ -36,36 +36,36 @@ STATIC_DATA Gfx sFontDList[FONT_DL_COUNT * 2]; STATIC_DATA FontMessage sFontMessages[FONT_MSG_COUNT]; STATIC_DATA Sprite sFontSprite = { - 0, // x - 0, // y - 0, // width - 0, // height - 1.0f, // scalex - 1.0f, // scaley - 0, // expx - 0, // expy - 1, // attr - 0x1234, // zdepth - 255, // red - 255, // green - 255, // blue - 255, // alpha - 0, // startTLUT - 0, // nTLUT - NULL, // LUT - 0, // istart - 1, // istep + 0, // x + 0, // y + 0, // width + 0, // height + 1.0f, // scalex + 1.0f, // scaley + 0, // expx + 0, // expy + 1, // attr + 0x1234, // zdepth + 255, // red + 255, // green + 255, // blue + 255, // alpha + 0, // startTLUT + 0, // nTLUT + NULL, // LUT + 0, // istart + 1, // istep 15 * FONT_MAX_MSG_LEN, // nbitmaps - FONT_DL_COUNT,// ndisplist - 15, // bmheight - 128, // bmHreal - G_IM_FMT_IA, // bmfmt - G_IM_SIZ_4b, // bmsiz - sFontBitmaps, // bitmap - sFontDList, // rsp_dl - NULL, // rsp_dl_next - 0, // frac_s - 0 // frac_t + FONT_DL_COUNT, // ndisplist + 15, // bmheight + 128, // bmHreal + G_IM_FMT_IA, // bmfmt + G_IM_SIZ_4b, // bmsiz + sFontBitmaps, // bitmap + sFontDList, // rsp_dl + NULL, // rsp_dl_next + 0, // frac_s + 0 // frac_t }; STATIC_DATA u8 sFontColorR = 0xFF; @@ -310,9 +310,6 @@ s32 uvFontPrintStr16(s32 x, s32 y, s16* str16, s32 strLen, s32 end) { } #endif -#if defined(VERSION_JP) -#pragma GLOBAL_ASM("asm/nonmatchings/kernel/font/uvFontPrintStr.s") -#else void uvFontPrintStr(s32 x, s32 y, const char* str) { char* chrPos; s32 strLen; @@ -350,7 +347,6 @@ void uvFontPrintStr(s32 x, s32 y, const char* str) { sFontMessages[sFontMsgCount].font = gGfxUnkPtrs->fonts[sFontCurId]; sFontMsgCount++; } -#endif STATIC_FUNC s32 uvFontSpriteWidth(Sprite* sprite, s16* str16, ParsedUVFT* font) { s32 width; diff --git a/src/kernel/system.c b/src/kernel/system.c index 658a75f4..d2d020af 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -186,11 +186,12 @@ void uvWaitForMesg(char msg_type) { } } +void uvSetVideoMode(void) { #if defined(VERSION_JP) -// JP does not have switch block, hardcodes viMode to OS_VI_NTSC_LAN1 -#pragma GLOBAL_ASM("asm/nonmatchings/kernel/system/uvSetVideoMode.s") + osCreateMesgQueue(&D_802C3B90, D_802C3B68, ARRAY_COUNT(D_802C3B68)); + _uvScCreateScheduler(&gSchedInst, gSchedStack + sizeof(gSchedStack), OS_PRIORITY_APPMAX, OS_VI_NTSC_LAN1, 1); + _uvScAddClient(&gSchedInst, &gSchedClient, &D_802C3B50); #else -void uvSetVideoMode(void) { s32 viMode; osCreateMesgQueue(&D_802C3B90, D_802C3B68, ARRAY_COUNT(D_802C3B68)); @@ -209,8 +210,8 @@ void uvSetVideoMode(void) { // clang-format on _uvScCreateScheduler(&gSchedInst, gSchedStack + sizeof(gSchedStack), OS_PRIORITY_APPMAX, viMode, 1); _uvScAddClient(&gSchedInst, &gSchedClient, &D_802C3B50); -} #endif +} void bootproc(void* arg0) { u32 devAddr; // var_s1 From 5b55de9b62b06b0d2ab62d6704f32c84675aa5b9 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Thu, 24 Sep 2026 21:21:59 +0000 Subject: [PATCH 3/9] Add splits for (J) app segment and partial matches - Split (J) app segment .text, .data, .rodata, .bss - Produces matching build with some GLOBAL_ASM - Add scratch URIs for unmatched functions --- config/jp/pilotwings64.jp.yaml | 368 +++++- config/jp/sym/symbol_addrs.txt | 755 ------------ config/jp/sym/symbol_addrs_app.txt | 1507 +++++++++++++++++++++++ config/jp/sym/symbol_addrs_kernel.txt | 565 +++++++++ config/jp/sym/symbol_addrs_libultra.txt | 334 +++++ config/us/pilotwings64.us.yaml | 1 - config/us/sym/symbol_addrs_kernel.txt | 2 +- include/kernel/uv_sprite.h | 113 +- src/app/birdman2.c | 7 + src/app/code_66F70.c | 10 + src/app/code_7CF30.c | 4 + src/app/code_A8C30.c | 46 +- src/app/code_AC1A0.c | 8 +- src/app/code_AE460.c | 34 +- src/app/code_BA190.c | 5 + src/app/control_info.c | 309 ++++- src/app/credits.c | 3 +- src/app/env_sound.c | 14 +- src/app/falco.c | 7 +- src/app/file_menu.c | 30 +- src/app/fountain.c | 11 + src/app/game.c | 4 +- src/app/gyrocopter.c | 2 + src/app/gyrocopter_sound.c | 20 +- src/app/hang_glider_sound.c | 10 +- src/app/hud.c | 16 + src/app/level_select.c | 11 +- src/app/map3d.c | 5 + src/app/menu_utils.c | 11 + src/app/options.c | 8 + src/app/pilot_select.c | 12 +- src/app/replay_screen.c | 18 +- src/app/results.c | 17 +- src/app/rings.c | 21 +- src/app/rocket_belt.c | 11 + src/app/rocket_belt.h | 10 +- src/app/rocket_belt_sound.c | 22 +- src/app/save.c | 14 + src/app/snap.c | 99 +- src/app/targets.c | 4 + src/app/test_menu.c | 32 + src/app/test_summary.c | 7 +- src/app/text_data.c | 15 + src/app/text_data.h | 446 +++++++ src/app/title_screen.c | 25 + src/app/total_results.c | 37 +- src/kernel/font.c | 2 +- src/kernel/graphics.c | 3 +- src/kernel/system.c | 3 +- src/libultra/io/vi.c | 3 +- src/libultra/io/vitbl.c | 2 +- 51 files changed, 4089 insertions(+), 934 deletions(-) delete mode 100644 config/jp/sym/symbol_addrs.txt create mode 100644 config/jp/sym/symbol_addrs_app.txt create mode 100644 config/jp/sym/symbol_addrs_kernel.txt create mode 100644 config/jp/sym/symbol_addrs_libultra.txt diff --git a/config/jp/pilotwings64.jp.yaml b/config/jp/pilotwings64.jp.yaml index 3f7b564c..3df1982c 100644 --- a/config/jp/pilotwings64.jp.yaml +++ b/config/jp/pilotwings64.jp.yaml @@ -32,7 +32,9 @@ options: # auto_link_sections: [".data", ".rodata", ".bss"] symbol_addrs_path: - - config/jp/sym/symbol_addrs.txt + - config/jp/sym/symbol_addrs_app.txt + - config/jp/sym/symbol_addrs_kernel.txt + - config/jp/sym/symbol_addrs_libultra.txt reloc_addrs_path: - config/jp/sym/reloc_addrs.txt @@ -385,9 +387,367 @@ segments: vram: 0x802BCC50 bss_size: 0x293E0 subsegments: - - { start: 0x51CA0, type: textbin, use_src_path: True, name: app_text } - - { start: 0xD6030, type: databin, use_src_path: True, name: app_data } - - { type: bss, vram: 0x80349BE0 } + - [0x51CA0, c, app/code_51E30] + - [0x520A0, c, app/balls] + - [0x53550, c, app/birdman0] + - [0x55530, c, app/birdman1] + - [0x55F40, c, app/birdman2] + - [0x57E60, c, app/bmsound] + - [0x58840, c, app/boats] + - [0x59520, c, app/bonus] + - [0x59AC0, c, app/ball_target] + - [0x5A3E0, c, app/camera] + - [0x5CD00, c, app/cannonball] + - [0x5FD60, c, app/code_60020] + - [0x60F20, c, app/cbsound] + - [0x617A0, c, app/code_61A60] + - [0x63DB0, c, app/control_info] + - [0x64DB0, c, app/pilot_select] + - [0x667E0, c, app/code_66160] + - [0x675F0, c, app/code_66F70] + - [0x68870, c, app/environment] + - [0x6A240, c, app/env_sound] + - [0x6B350, c, app/falco] + - [0x6E110, c, app/fdr] + - [0x6F340, c, app/ferry] + - [0x6F920, c, app/save] + - [0x70460, c, app/file_menu] + - [0x719C0, c, app/fire_effects] + - [0x724D0, c, app/code_72010] + - [0x72790, c, app/fountain] + - [0x72D80, c, app/code_72910] + - [0x73360, c, app/game] + - [0x75ED0, c, app/hang_glider0] + - [0x76AE0, c, app/hang_glider1] + - [0x78A90, c, app/glider_toys] + - [0x79B30, c, app/hang_glider2] + - [0x7BE10, c, app/hang_glider_sound] + - [0x7C930, c, app/code_7C4C0] + - [0x7D3A0, c, app/code_7CF30] + - [0x80270, c, app/code_7FE00] + - [0x81900, c, app/jumble_hopper] + - [0x82920, c, app/code_82520] + - [0x83000, c, app/code_82B90] + - [0x8ABD0, c, app/gyrocopter] + - [0x91170, c, app/hover_pads] + - [0x91AD0, c, app/gyrocopter_sound] + - [0x92C60, c, app/menu] + - [0x93040, c, app/level] + - [0x93B40, c, app/test_summary] + - [0x944D0, c, app/credits] + - [0x952A0, c, app/level_select] + - [0x976E0, c, app/map3d] + - [0x99FE0, c, app/mem] + - [0x9A0B0, c, app/menu_utils] + - [0x9AC70, c, app/code_9A960] + - [0x9BC70, c, app/mist] + - [0x9C390, c, app/missi] + - [0x9CD90, c, app/oil_plant] + - [0x9D260, c, app/oil] + - [0x9D6D0, c, app/options] + - [0x9E600, c, app/pads] + - [0x9F5E0, c, app/hud] + - [0xA6310, c, app/code_A6000] + - [0xA67D0, c, app/code_A64C0] + - [0xA7770, c, app/planes] + - [0xA8230, c, app/demo_attitude] + - [0xA8940, c, app/proxanim] + - [0xA8F40, c, app/code_A8C30] + - [0xAA010, c, app/demo] + - [0xAAB30, c, app/rings] + - [0xAC4B0, c, app/code_AC1A0] # rocket_belt0 + - [0xAE770, c, app/code_AE460] # rocket_belt1 + - [0xAFC60, c, app/rocket_belt] + - [0xB1E40, c, app/rocket_belt_sound] + - [0xB2BF0, c, app/code_B2900] + - [0xB3D60, c, app/replay_screen] + - [0xB5570, c, app/results] + - [0xB6810, c, app/code_B6580] + - [0xB7270, c, app/skydiving] + - [0xBA420, c, app/code_BA190] + - [0xBB060, c, app/sdsound] + - [0xBBAA0, c, app/shadow] + - [0xBC470, c, app/shuttle] + - [0xBD8F0, c, app/ski_lift] + - [0xBDD50, c, app/smoke] + - [0xBF500, c, app/snap] + - [0xC70D0, c, app/snd] + - [0xC78D0, c, app/snow] + - [0xC80A0, c, app/spath] + - [0xC8EF0, c, app/splash] + - [0xC99A0, c, app/text_data] + - [0xCA090, c, app/title_screen] + - [0xCBC60, c, app/targets] + - [0xCC380, c, app/task] + - [0xCDE70, c, app/code_CD9D0] + - [0xCDFC0, c, app/thermals] + - [0xCE990, c, app/total_results] + - [0xCF4E0, c, app/toys] + - [0xCFF00, c, app/test_menu] + - [0xD1D70, c, app/user_paths] + - [0xD22C0, c, app/code_D1ED0] + - [0xD2F00, c, app/code_D2B10] + - [0xD3140, c, app/whale] + - [0xD3C00, c, app/whale_pod] + - [0xD4680, c, app/wind] + - [0xD59A0, c, app/wind_objects] + + - [0xD6030, .data, app/code_51E30] + - [0xD6130, .data, app/balls] + - [0xD6140, .data, app/birdman2] + - [0xD6300, .data, app/camera] + - [0xD6310, .data, app/cannonball] + - [0xD6330, .data, app/code_60020] + - [0xD6360, .data, app/code_61A60] + - [0xD6420, .data, app/control_info] + - [0xD6830, .data, app/pilot_select] + - [0xD6970, .data, app/environment] + - [0xD69B0, .data, app/env_sound] + - [0xD6A30, .data, app/falco] + - [0xD6B30, .data, app/fdr] + - [0xD6B50, .data, app/ferry] + - [0xD6B70, .data, app/file_menu] + - [0xD6BB0, .data, app/fire_effects] + - [0xD6BC0, .data, app/fountain] + - [0xD6BE0, .data, app/code_72910] + - [0xD6BF0, .data, app/game] + - [0xD6C40, .data, app/hang_glider0] + - [0xD6C50, .data, app/hang_glider2] + - [0xD6E00, .data, app/code_7C4C0] + - [0xD6E10, .data, app/code_7CF30] + - [0xD6E20, .data, app/code_7FE00] + - [0xD6E30, .data, app/code_82520] + - [0xD6E40, .data, app/code_82B90] + - [0xD6E70, .data, app/gyrocopter] + - [0xD6E80, .data, app/hover_pads] + - [0xD6E90, .data, app/level] + - [0xD6EB0, .data, app/test_summary] + - [0xD6F70, .data, app/credits] + - [0xD7220, .data, app/level_select] + - [0xD7270, .data, app/map3d] + - [0xD72C0, .data, app/mem] + - [0xD72D0, .data, app/code_9A960] + - [0xD72E0, .data, app/missi] + - [0xD7310, .data, app/oil_plant] + - [0xD7330, .data, app/oil] + - [0xD7350, .data, app/options] + - [0xD7380, .data, app/pads] + - [0xD7390, .data, app/hud] + - [0xD73F0, .data, app/demo_attitude] + - [0xD7400, .data, app/code_A8C30] + - [0xD7550, .data, app/demo] + - [0xD7560, .data, app/rings] + - [0xD7620, .data, app/code_AE460] + - [0xD7630, .data, app/rocket_belt] + - [0xD7650, .data, app/code_B2900] + - [0xD7690, .data, app/replay_screen] + - [0xD76C0, .data, app/results] + - [0xD7A50, .data, app/skydiving] + - [0xD7ED0, .data, app/code_BA190] + - [0xD7EE0, .data, app/shadow] + - [0xD7F00, .data, app/shuttle] + - [0xD7F80, .data, app/ski_lift] + - [0xD7F90, .data, app/snap] + - [0xD8030, .data, app/snd] + - [0xD8090, .data, app/snow] + - [0xD80D0, .data, app/spath] + - [0xD8110, .data, app/title_screen] + - [0xD8120, .data, app/targets] + - [0xD8210, .data, app/task] + - [0xD8270, .data, app/thermals] + - [0xD8360, .data, app/total_results] + - [0xD83F0, .data, app/test_menu] + - [0xD8440, .data, app/whale] + - [0xD8470, .data, app/whale_pod] + - [0xD8490, .rodata, app/code_51E30] + - [0xD84B0, .rodata, app/balls] + - [0xD8510, .rodata, app/birdman0] + - [0xD8890, .rodata, app/birdman1] + - [0xD8900, .rodata, app/birdman2] + - [0xD89F0, .rodata, app/bmsound] + - [0xD8AE0, .rodata, app/boats] + - [0xD8B20, .rodata, app/bonus] + - [0xD8B60, .rodata, app/ball_target] + - [0xD8BC0, .rodata, app/camera] + - [0xD8C80, .rodata, app/cannonball] + - [0xD8ED0, .rodata, app/code_60020] + - [0xD8F50, .rodata, app/cbsound] + - [0xD9050, .rodata, app/code_61A60] + - [0xD90E0, .rodata, app/control_info] + - [0xD9190, .rodata, app/pilot_select] + - [0xD9280, .rodata, app/code_66F70] + - [0xD9370, .rodata, app/environment] + - [0xD9620, .rodata, app/env_sound] + - [0xD9780, .rodata, app/falco] + - [0xD9900, .rodata, app/fdr] + - [0xD9A90, .rodata, app/ferry] + - [0xD9AB0, .rodata, app/save] + - [0xD9AF0, .rodata, app/file_menu] + - [0xD9B20, .rodata, app/fire_effects] + - [0xD9D40, .rodata, app/fountain] + - [0xD9D60, .rodata, app/code_72910] + - [0xD9D70, .rodata, app/game] + - [0xD9EF0, .rodata, app/hang_glider0] + - [0xD9F40, .rodata, app/hang_glider1] + - [0xDA220, .rodata, app/glider_toys] + - [0xDA320, .rodata, app/hang_glider2] + - [0xDA450, .rodata, app/hang_glider_sound] + - [0xDA530, .rodata, app/code_7C4C0] + - [0xDA550, .rodata, app/code_7CF30] + - [0xDAA20, .rodata, app/code_7FE00] + - [0xDAB70, .rodata, app/jumble_hopper] + - [0xDACF0, .rodata, app/code_82520] + - [0xDAD20, .rodata, app/code_82B90] + - [0xDB0E0, .rodata, app/gyrocopter] + - [0xDB2E0, .rodata, app/hover_pads] + - [0xDB330, .rodata, app/gyrocopter_sound] + - [0xDB430, .rodata, app/menu] + - [0xDB460, .rodata, app/level] + - [0xDB700, .rodata, app/credits] + - [0xDBC70, .rodata, app/level_select] + - [0xDBC90, .rodata, app/map3d] + - [0xDBED0, .rodata, app/mem] + - [0xDBF10, .rodata, app/menu_utils] + - [0xDBF20, .rodata, app/code_9A960] + - [0xDBF50, .rodata, app/mist] + - [0xDBF80, .rodata, app/missi] + - [0xDBFA0, .rodata, app/oil_plant] + - [0xDBFB0, .rodata, app/options] + - [0xDC020, .rodata, app/pads] + - [0xDC180, .rodata, app/hud] + - [0xDC350, .rodata, app/code_A6000] + - [0xDC380, .rodata, app/code_A64C0] + - [0xDC4F0, .rodata, app/planes] + - [0xDC520, .rodata, app/demo_attitude] + - [0xDC580, .rodata, app/proxanim] + - [0xDC770, .rodata, app/code_A8C30] + - [0xDC810, .rodata, app/demo] + - [0xDC8E0, .rodata, app/rings] + - [0xDC9F0, .rodata, app/code_AC1A0] + - [0xDCD20, .rodata, app/code_AE460] + - [0xDCDE0, .rodata, app/rocket_belt] + - [0xDCF10, .rodata, app/rocket_belt_sound] + - [0xDD010, .rodata, app/code_B2900] + - [0xDD040, .rodata, app/replay_screen] + - [0xDD100, .rodata, app/results] + - [0xDD760, .rodata, app/code_B6580] + - [0xDD780, .rodata, app/skydiving] + - [0xDDA70, .rodata, app/code_BA190] + - [0xDDAD0, .rodata, app/sdsound] + - [0xDDBA0, .rodata, app/shadow] + - [0xDDBF0, .rodata, app/shuttle] + - [0xDDC50, .rodata, app/ski_lift] + - [0xDDC60, .rodata, app/smoke] + - [0xDDFB0, .rodata, app/snap] + - [0xDE1A0, .rodata, app/snd] + - [0xDE2C0, .rodata, app/spath] + - [0xDE3C0, .rodata, app/splash] + - [0xDE460, .rodata, app/title_screen] + - [0xDE4C0, .rodata, app/targets] + - [0xDE530, .rodata, app/task] + - [0xDE720, .rodata, app/thermals] + - [0xDE760, .rodata, app/total_results] + - [0xDE8F0, .rodata, app/toys] + - [0xDE9B0, .rodata, app/test_menu] + - [0xDEA60, .rodata, app/user_paths] + - [0xDEAB0, .rodata, app/code_D1ED0] + - [0xDEAE0, .rodata, app/code_D2B10] + - [0xDEB00, .rodata, app/whale] + - [0xDEB10, .rodata, app/whale_pod] + - [0xDEB50, .rodata, app/wind] + - [0xDEBC0, .rodata, app/wind_objects] + + - { type: .bss, vram: 0x80349BE0, name: app/code_51E30 } + - { type: .bss, vram: 0x80349C00, name: app/balls } + - { type: .bss, vram: 0x8034BD80, name: app/birdman0 } + - { type: .bss, vram: 0x8034BDE0, name: app/birdman2 } + - { type: .bss, vram: 0x8034C030, name: app/bmsound } + - { type: .bss, vram: 0x8034C090, name: app/boats } + - { type: .bss, vram: 0x8034C120, name: app/bonus } + - { type: .bss, vram: 0x8034C1D0, name: app/ball_target } + - { type: .bss, vram: 0x8034C3C0, name: app/camera } + - { type: .bss, vram: 0x8034C420, name: app/cannonball } + - { type: .bss, vram: 0x8034C4C0, name: app/code_60020 } + - { type: .bss, vram: 0x8034C5D0, name: app/cbsound } + - { type: .bss, vram: 0x8034C630, name: app/code_61A60 } + - { type: .bss, vram: 0x8034C680, name: app/control_info } + - { type: .bss, vram: 0x8034C690, name: app/pilot_select } + - { type: .bss, vram: 0x8034C760, name: app/code_66F70 } + - { type: .bss, vram: 0x8034C770, name: app/environment } + - { type: .bss, vram: 0x8034C7B0, name: app/env_sound } + - { type: .bss, vram: 0x8034CFE0, name: app/falco_data } + - { type: .bss, vram: 0x8034D920, name: app/falco } + - { type: .bss, vram: 0x8034D950, name: app/fdr } + - { type: .bss, vram: 0x80354A00, name: app/ferry } + - { type: .bss, vram: 0x80354AD0, name: app/save } + - { type: .bss, vram: 0x80354ED0, name: app/file_menu } + - { type: .bss, vram: 0x80354EF0, name: app/fire_effects } + - { type: .bss, vram: 0x80355020, name: app/fountain } + - { type: .bss, vram: 0x80355080, name: app/game } + - { type: .bss, vram: 0x8035A430, name: app/hang_glider0 } + - { type: .bss, vram: 0x8035A950, name: app/hang_glider1 } + - { type: .bss, vram: 0x8035AA00, name: app/glider_toys } + - { type: .bss, vram: 0x8035AA90, name: app/hang_glider2 } + - { type: .bss, vram: 0x8035AD00, name: app/hang_glider_sound } + - { type: .bss, vram: 0x8035AD60, name: app/code_7C4C0 } + - { type: .bss, vram: 0x8035B270, name: app/code_7CF30 } + - { type: .bss, vram: 0x8035B2D0, name: app/code_7FE00 } + - { type: .bss, vram: 0x8035B510, name: app/jumble_hopper } + - { type: .bss, vram: 0x8035B570, name: app/code_82520 } + - { type: .bss, vram: 0x8035B5F0, name: app/code_82B90 } + - { type: .bss, vram: 0x8035BA60, name: app/gyrocopter } + - { type: .bss, vram: 0x8035BF70, name: app/hover_pads } + - { type: .bss, vram: 0x8035C840, name: app/gyrocopter_sound } + - { type: .bss, vram: 0x8035C900, name: app/menu } + - { type: .bss, vram: 0x8035C920, name: app/level } + - { type: .bss, vram: 0x8035D290, name: app/test_summary } + - { type: .bss, vram: 0x8035D2A0, name: app/credits } + - { type: .bss, vram: 0x8035D2B0, name: app/level_select } + - { type: .bss, vram: 0x8035D2D0, name: app/map3d } + - { type: .bss, vram: 0x8035D450, name: app/mem } + - { type: .bss, vram: 0x8035E7E0, name: app/menu_utils } + - { type: .bss, vram: 0x8035E820, name: app/mist } + - { type: .bss, vram: 0x8035E9E0, name: app/missi } + - { type: .bss, vram: 0x8035EAC0, name: app/oil } + - { type: .bss, vram: 0x8035EB10, name: app/options } + - { type: .bss, vram: 0x8035EB40, name: app/pads } + - { type: .bss, vram: 0x8035EF10, name: app/hud } + - { type: .bss, vram: 0x8035FC20, name: app/code_A64C0 } + - { type: .bss, vram: 0x8035FCA0, name: app/planes } + - { type: .bss, vram: 0x8035FD10, name: app/demo_attitude } + - { type: .bss, vram: 0x8035FD30, name: app/proxanim } + - { type: .bss, vram: 0x803602D0, name: app/code_A8C30 } + - { type: .bss, vram: 0x80360420, name: app/demo } + - { type: .bss, vram: 0x80360460, name: app/rings } + - { type: .bss, vram: 0x80363A60, name: app/code_AC1A0 } + - { type: .bss, vram: 0x80363B10, name: app/code_AE460 } + - { type: .bss, vram: 0x80364020, name: app/rocket_belt } + - { type: .bss, vram: 0x80364280, name: app/rocket_belt_sound } + - { type: .bss, vram: 0x803642E0, name: app/results } + - { type: .bss, vram: 0x80364350, name: app/skydiving } + - { type: .bss, vram: 0x80364540, name: app/code_BA190 } + - { type: .bss, vram: 0x803646A0, name: app/sdsound } + - { type: .bss, vram: 0x80364700, name: app/shuttle } + - { type: .bss, vram: 0x803647A0, name: app/ski_lift } + - { type: .bss, vram: 0x80364850, name: app/smoke } + - { type: .bss, vram: 0x80365A50, name: app/snap } + - { type: .bss, vram: 0x80366810, name: app/snd } + - { type: .bss, vram: 0x803668E0, name: app/snow } + - { type: .bss, vram: 0x80366900, name: app/spath } + - { type: .bss, vram: 0x803696B0, name: app/splash } + - { type: .bss, vram: 0x8036A900, name: app/text_data } + - { type: .bss, vram: 0x8036B6D0, name: app/title_screen } + - { type: .bss, vram: 0x8036B6E0, name: app/targets } + - { type: .bss, vram: 0x8036C2D0, name: app/task } + - { type: .bss, vram: 0x8036D540, name: app/thermals } + - { type: .bss, vram: 0x8036D6D0, name: app/total_results } + - { type: .bss, vram: 0x8036D750, name: app/toys } + - { type: .bss, vram: 0x80370640, name: app/test_menu } + - { type: .bss, vram: 0x80370680, name: app/user_paths } + - { type: .bss, vram: 0x80371D60, name: app/whale } + - { type: .bss, vram: 0x80371E30, name: app/whale_pod } + - { type: .bss, vram: 0x80371EF0, name: app/wind } + - { type: .bss, vram: 0x803722F0, name: app/wind_objects } - name: filetable type: bin diff --git a/config/jp/sym/symbol_addrs.txt b/config/jp/sym/symbol_addrs.txt deleted file mode 100644 index a455ec29..00000000 --- a/config/jp/sym/symbol_addrs.txt +++ /dev/null @@ -1,755 +0,0 @@ -// Visit https://github.com/ethteck/splat/wiki/Adding-Symbols for documentation about this file -entrypoint = 0x80200050; // type:func -bootproc = 0x8022E30C; // type:func - -// functions - -uvJanimLoad = 0x80200350; // type:func -uvJanimPoseLine = 0x80200B38; // type:func -uvJanimPoseGrid = 0x80200F00; // type:func -uvEmitterPrintf = 0x80201180; // type:func -uvEmitterInitTable = 0x8020119C; // type:func -uvEmitterInit = 0x802011F0; // type:func -uvEmitterLookup = 0x802012B8; // type:func -uvEmitterFromModel = 0x80201348; // type:func -uvEmitterSetMatrix = 0x802013F8; // type:func -uvEmitterGetMatrix = 0x80201444; // type:func -uvEmitter_80201494 = 0x80201494; // type:func -uvEmitterSetPri = 0x802016D4; // type:func -uvEmitterProp = 0x8020170C; // type:func -uvEmitterTrigger = 0x80201904; // type:func -uvEmitterRelease = 0x80201968; // type:func -uvEmitterStatus = 0x80201A0C; // type:func -_uvaSoundBegin = 0x80201B0C; // type:func -_uvaSoundEnd = 0x80201B7C; // type:func -uvEmitterFlush = 0x80201BA8; // type:func -uvEmitter_80201D08 = 0x80201D08; // type:func -_uvaUpdatePlayList = 0x802021D4; // type:func -_uvaPlaylistRemove = 0x80202678; // type:func -_uvaPlay = 0x80202728; // type:func -_uvaStartVoice = 0x80202998; // type:func -_uvaUpdateVoice = 0x80202AFC; // type:func -_uvaStopVoice = 0x80202BB8; // type:func -_uvaStatus = 0x80202C5C; // type:func -uvEventMaxCb = 0x80202F18; // type:func -uvEventPost = 0x80203088; // type:func -uvEventRemoveCb = 0x80203210; // type:func -uvSysInitAudio = 0x802038A0; // type:func -amCreateAudioMgr = 0x80203B08; // type:func -uvaSeqNew = 0x802046E0; // type:func -uvaSeqPlay = 0x802047A8; // type:func -uvaSeqSetTempo = 0x802047E8; // type:func -uvaSeqSetVol = 0x80204840; // type:func -uvaSeqStop = 0x8020489C; // type:func -uvChanEnv = 0x80204DEC; // type:func -uvChanTerra = 0x80204E5C; // type:func -_uvSortAdd = 0x80205814; // type:func -uvClkInit = 0x80205FD0; // type:func -uvClkUpdate = 0x80205FFC; // type:func -uvClkGetSec = 0x80206058; // type:func -uvClkReset = 0x80206150; // type:func -_uvDbSortHits = 0x802071CC; // type:func -uvTerraGetBox = 0x8020FA08; // type:func -uvModelGetPosm = 0x8020FA54; // type:func -uvModelGetProps = 0x8020FB2C; // type:func -uvTerraGetPt = 0x8020FCEC; // type:func -uvTerraGetSeg = 0x8020FF68; // type:func -uvTerraGetColor = 0x80210B70; // type:func -uvTerraGetState = 0x80210E04; // type:func -uvTerraGetPlane = 0x80210F18; // type:func -_uvSurfGetNorm = 0x8021119C; // type:func -uvSobjGetPt = 0x8021133C; // type:func -uvSobjGetSeg = 0x80211544; // type:func -_uvSegInMboxs = 0x80214F54; // type:func -uvDbColorModel = 0x80216750; // type:func -uvDobjModel = 0x802167F0; // type:func -uvDobjProps = 0x80216C1C; // type:func -uvDobjPosm = 0x80216E08; // type:func -uvDobjGetPosm = 0x80216FD8; // type:func -uvDobjState = 0x8021711C; // type:func -uvDobjSetState = 0x80217268; // type:func -uvDobjClearState = 0x802172C0; // type:func -uvDobjAllocIdx = 0x8021731C; // type:func -uvDobjInit = 0x80217398; // type:func -_uvDobjsDraw = 0x8021744C; // type:func -uvDobj_8021771C = 0x8021771C; // type:func -uvDobjGetLODIndex = 0x80217AB4; // type:func -uvDobj_80217B34 = 0x80217B34; // type:func -uvDobj_80217B4C = 0x80217B4C; // type:func -uvDobj_80217E24 = 0x80217E24; // type:func -uvDobj_802180DC = 0x802180DC; // type:func -uvEnvProps = 0x802181C0; // type:func -uvEnvProps2 = 0x80218470; // type:func -uvEnvFunc = 0x80218688; // type:func -_uvEnvDraw = 0x8021872C; // type:func -uvSeqModel = 0x80218D00; // type:func -uvSeqProps = 0x80218DB8; // type:func -uvParseTopUVFT = 0x80219270; // type:func -uvFontSet = 0x802194D8; // type:func -uvFontScale = 0x80219550; // type:func -uvFontColor = 0x8021956C; // type:func -uvFontStrLen = 0x802195A0; // type:func -uvFontStr16WidthFont = 0x802195DC; // type:func -uvFontStr16Width = 0x802196B0; // type:func -uvFontStrWidth = 0x802196EC; // type:func -uvFontWidth = 0x802197EC; // type:func -uvFontHeight = 0x80219828; // type:func -// first diff function: 0x80219874 - likely different uvFontPrintStr16 -uvFontPrintStr16 = 0x80219874; // type:func -// likely different uvFontPrintStr -uvFontPrintStr = 0x80219A1C; // type:func -uvFontSpriteWidth = 0x80219C30; // type:func -uvFontMsgGenDlist = 0x80219D14; // type:func -uvFontGenDlist = 0x80219E18; // type:func - -uvFxProps = 0x8021A4C0; // type:func -uvFxGetProps = 0x8021B4AC; // type:func -uvModelGet = 0x8021B950; // type:func -_uvFxDraw = 0x8021EC98; // type:func - -uvVtxInit = 0x8021F080; // type:func -uvVtx = 0x8021F1E4; // type:func -uvVtxReset = 0x8021F28C; // type:func -uvVtxBeginPoly = 0x8021F2E8; // type:func -uvBeginGrid = 0x8021F2FC; // type:func -uvBeginTmesh = 0x8021F310; // type:func -uvEndTmesh = 0x8021F324; // type:func -uvEndGridWide = 0x8021F4EC; // type:func -uvEndGrid = 0x8021F8EC; // type:func -uvVtxRect = 0x802204AC; // type:func -uvVtxEndPoly = 0x80220640; // type:func - -uvGfxInit = 0x802208E0; // type:func -uvGfxBegin = 0x80220B08; // type:func -uvGfxSetFogFactor = 0x80220C20; // type:func -uvGfxResetState = 0x80220D8C; // type:func -uvGfxMtxView = 0x80220EAC; // type:func -uvGfxMtxProj = 0x80220F78; // type:func -uvGfxDisplayList = 0x80221044; // type:func -uvGfxStateDrawDL = 0x80221068; // type:func -uvGfxStateDraw = 0x80221318; // type:func -uvGfxPushMtxUnk = 0x802219A4; // type:func -uvGfxClampLook = 0x80221A60; // type:func -uvGfxLookAt = 0x80221EB8; // type:func -uvGfxMtxProjPushF = 0x8022202C; // type:func -uvGfxSetCallback = 0x8022209C; // type:func -uvGfxEnd = 0x802220A8; // type:func -uvGfxClearScreen = 0x8022281C; // type:func -uvGfx_80222A98 = 0x802229C4; // type:func -uvGfxEnableZBuffer = 0x80222BC0; // type:func -uvGfxEnableCull = 0x80222CA4; // type:func -uvGfxEnableLighting = 0x80222DBC; // type:func -uvGfxClipRect = 0x80222E14; // type:func -uvGfxClipViewport = 0x80222FC0; // type:func -uvGfxSetViewport = 0x80222FF8; // type:func -uvGfxViewport = 0x80223040; // type:func -uvGfxMstackPushF = 0x80223168; // type:func -uvGfxMstackPushL = 0x80223208; // type:func -uvGfxMstackTop = 0x802232F0; // type:func -uvGfxSetUnkStateF = 0x80223334; // type:func -uvGfxGetUnkStateF = 0x80223340; // type:func -uvGfxMtxViewLoad = 0x80223388; // type:func -uvGfxMtxViewMul = 0x80223420; // type:func -uvGfx_802235A4 = 0x802234D0; // type:func -uvGfxMtxViewPop = 0x802235D4; // type:func -uvGfx_802236CC = 0x802235F8; // type:func -uvGfxGetCnt = 0x8022372C; // type:func -uvGfxStatePush = 0x80223818; // type:func -uvGfxStatePop = 0x80223878; // type:func -uvGfxSetFlags = 0x802238E0; // type:func -uvGfxClearFlags = 0x80223918; // type:func -uvGfxBindTexture = 0x80223954; // type:func -uvGfxTextureDL = 0x80223990; // type:func -uvGfxWaitForMesg = 0x80223AAC; // type:func -uvGfxEnableGamma = 0x80223AE4; // type:func -uvGfxSetUnkState0 = 0x80223B20; // type:func -uvGfx_80223C00 = 0x80223B2C; // type:func -uvCopyFrameBuf = 0x80223D18; // type:func - -uvFileReadHeader = 0x80223DB0; // type:func -uvFile_80223F30 = 0x80223E60; // type:func -uvFileGetCurLength = 0x80223E84; // type:func -uvFileGetCurTag = 0x80223E98; // type:func -uvFileReadBlock = 0x80223EAC; // type:func -uvFile_80224170 = 0x802240A0; // type:func -uvFile_8022427C = 0x802241AC; // type:func - -uvControllerInit = 0x802241D0; // type:func -uvControllerCheckInserted = 0x8022438C; // type:func -uvIOUpdate = 0x802243B8; // type:func -uvControllerUpdate = 0x80224478; // type:func -uvControllerGetStick = 0x802244BC; // type:func -uvControllerButtonCheck = 0x802244E0; // type:func -uvControllerGetButton = 0x80224518; // type:func -uvControllerButtonPress = 0x80224534; // type:func -uvControllerButtonRelease = 0x80224580; // type:func - -uvMemInitBlockHdr = 0x802245D0; // type:func -uvMemLoadDS = 0x802249C0; // type:func -uvMemLoadPal = 0x80224BAC; // type:func -uvLevelAppend = 0x80224C10; // type:func -uvConsumeBytes = 0x802252C4; // type:func -_uvParseUVLT = 0x802253A0; // type:func -_uvParseUVEN = 0x802253E0; // type:func -_uvParseUVSQ = 0x802254D0; // type:func -_uvParseUVMD = 0x802255E8; // type:func -_uvParseUVCT = 0x80225EEC; // type:func -_uvExpandTexture = 0x802264E8; // type:func -_uvExpandTextureImg = 0x80226984; // type:func -_uvExpandTextureCpy = 0x80226A50; // type:func -_uvParseUVTP = 0x80226F00; // type:func -_uvParseUVTR = 0x80226FEC; // type:func -_uvParseUVBT = 0x80227190; // type:func -uvParseTopUVCT = 0x80227734; // type:func -uvParseTopUVEN = 0x802277F0; // type:func -uvParseTopUVLV = 0x80227868; // type:func -uvParseTopUVTP = 0x802278E0; // type:func -uvParseTopUVLT = 0x80227958; // type:func -uvParseTopUVMD = 0x802279D0; // type:func -uvParseTopUVTR = 0x80227A8C; // type:func -uvParseTopUVTX = 0x80227B04; // type:func -uvParseTopUVTI = 0x80227BB4; // type:func -uvParseTopUVBT = 0x80227C64; // type:func -uvParseTopUVSQ = 0x80227D14; // type:func -func_80227E5C = 0x80227D8C; // type:func - -_uvDbMstackReset = 0x80227E60; // type:func -_uvDbMstackTop = 0x80227E70; // type:func -_uvDbMstackPush = 0x80227E8C; // type:func -_uvDbMstackPop = 0x80227F14; // type:func -uvMat4Copy = 0x80227F58; // type:func -uvMat4CopyXYZ = 0x80227FDC; // type:func -uvMat4CopyL = 0x80228028; // type:func -uvMat4CopyL2F = 0x802280B0; // type:func -uvMat4CopyF2L = 0x80228370; // type:func -uvMat4SetIdentity = 0x80228884; // type:func -uvMat4SetIdentityL = 0x802288D4; // type:func -uvMat4Mul = 0x80228920; // type:func -uvMat4MulBA = 0x80228D60; // type:func -uvMat4RotateAxis = 0x802291A0; // type:func -uvMat4LocalTranslate = 0x80229588; // type:func -uvMat4Scale = 0x802296C8; // type:func -uvMat4InvertTranslationRotation = 0x802297A8; // type:func -uvMat4LocalToWorld = 0x80229934; // type:func -uvMat4UnkOp6 = 0x802299D0; // type:func -uvMat4SetFrustrum = 0x80229B40; // type:func -uvMat4SetOrtho = 0x80229C04; // type:func -uvMat4SetQuaternionRotation = 0x80229CA8; // type:func - -uvSqrtF = 0x80229DD0; // type:func -uvSinF = 0x80229DF0; // type:func -uvCosF = 0x80229FB0; // type:func -uvLength2D = 0x8022A138; // type:func -uvLength3D = 0x8022A16C; // type:func -uvAtan2F = 0x8022A1AC; // type:func - -uvMemInitBlocks = 0x8022A2F0; // type:func -uvMemScanBlocks = 0x8022A424; // type:func -_uvJumpHeap = 0x8022A5A4; // type:func -_uvMediaCopy = 0x8022A690; // type:func -uvMemRead = 0x8022A810; // type:func -uvMemSet = 0x8022A9B0; // type:func -uvMemCmp = 0x8022A9E4; // type:func -_uvMemOverAlloc = 0x8022AA3C; // type:func -_uvMemAlloc = 0x8022AB78; // type:func -_uvMemFreeScratch = 0x8022AC88; // type:func -_uvMemGetScratch = 0x8022ACF4; // type:func -_uvMemGetBlocks = 0x8022ADA0; // type:func -uvLevelInit = 0x8022AE34; // type:func -_uvMemAllocAlign8 = 0x8022AFA8; // type:func - -_uvScDoneGfx = 0x8022B250; // type:func -_uvScDoneAud = 0x8022B348; // type:func -_uvScRunAud = 0x8022B3E4; // type:func -_uvScRunGfx = 0x8022B468; // type:func -_uvScDlistRecover = 0x8022B58C; // type:func -_uvScCreateScheduler = 0x8022B5FC; // type:func -_uvScAddClient = 0x8022B7D8; // type:func -_uvScGetCmdQ = 0x8022B7EC; // type:func -_uvScMain = 0x8022B7F4; // type:func -_uvScHandleRetrace = 0x8022B8F8; // type:func -_uvScHandleRSP = 0x8022BC18; // type:func -_uvScHandleRDP = 0x8022BD5C; // type:func -_uvScHandleNMI = 0x8022BDBC; // type:func -_uvScLogCpuEvent = 0x8022BDF4; // type:func -_uvScLogIntoRing = 0x8022C198; // type:func - -uvSobjsDraw = 0x8022C410; // type:func -uvSobjGetLODIndex = 0x8022C6E8; // type:func -uvSobj_8022C8D0 = 0x8022C800; // type:func -uvSobj_8022CC28 = 0x8022CB58; // type:func -uvSobjLoadTerra = 0x8022CE28; // type:func -uvSobjPosm = 0x8022CEF4; // type:func -uvSobj_8022D168 = 0x8022D098; // type:func -uvSobj_8022D1E4 = 0x8022D114; // type:func -uvSobjModel = 0x8022D148; // type:func - -uvStrchr = 0x8022D1E0; // type:func -uvStrlen = 0x8022D230; // type:func -uvStrcmp = 0x8022D268; // type:func -strFormatInt = 0x8022D404; // type:func -strFormatFloat = 0x8022D740; // type:func -strDigitToChar = 0x8022D970; // type:func -strCharToDigit = 0x8022D99C; // type:func -uvSprintf = 0x8022D9CC; // type:func -uvAtoi = 0x8022DD94; // type:func - -uvFileWrite = 0x8022DE20; // type:func -uvFileRead = 0x8022DF18; // type:func -uvSysInit = 0x8022E010; // type:func -uvWaitForMesg = 0x8022E20C; // type:func -uvSetVideoMode = 0x8022E29C; // type:func -Thread_Render = 0x8022E740; // type:func -Thread_App = 0x8022E7F0; // type:func -Thread_Kernel = 0x8022E850; // type:func -uvContMesgInit = 0x8022E950; // type:func -uvReadController = 0x8022EA08; // type:func -_uvDebugPrintf = 0x8022EBE4; // type:func -_uvDMA = 0x8022EC00; // type:func -_uvAssertMsg = 0x8022ED2C; // type:func - -_uvTerraDraw = 0x8022EF34; // type:func -uvComputeLineEndP = 0x8022F6B8; // type:func - -uvSprt_80230130 = 0x80230000; // type:func -uvSprt_802301A4 = 0x80230074; // type:func -_uvTxtDraw = 0x802301EC; // type:func -uvSprtFromBitmap = 0x80230538; // type:func -uvSprt_80230750 = 0x80230620; // type:func -uvSprtFindFree = 0x80230768; // type:func -uvSprtInit = 0x80230824; // type:func -uvSprtDisplayList = 0x80230A68; // type:func -uvSprtDrawAll = 0x80230C00; // type:func -uvSprtDraw = 0x80230CA4; // type:func -uvSprtSetBlit = 0x80230D38; // type:func -uvSprtGetWidth = 0x80230FF0; // type:func -uvSprtGetHeight = 0x8023100C; // type:func -uvSprtProps = 0x80231028; // type:func -uvSprtUpdateUnk = 0x80231320; // type:func -uvSprtResetUnk = 0x80231388; // type:func - -uvUserFileRead = 0x802313A0; // type:func - -uvRandSeed = 0x802314B0; // type:func -uvRandF_RANLUX = 0x802314BC; // type:func -uvRandF_LCG = 0x80231610; // type:func -uvAbs = 0x80231668; // type:func - -uvVec3Len = 0x80231680; // type:func -uvVec2Dot = 0x802316C0; // type:func -uvVec3Dot = 0x802316E4; // type:func -uvVec3Copy = 0x80231714; // type:func -uvVec3ScalarProj = 0x80231730; // type:func -uvVec3Cross = 0x80231778; // type:func -uvVec3Add = 0x802317D0; // type:func -uvVec3Mul = 0x80231804; // type:func -uvVec3Normal = 0x80231830; // type:func - -mio0_decompress = 0x802318F0; // type:func - -uvDbg_80231AC0 = 0x80231990; // type:func -uvDbg_80231C10 = 0x80231AE0; // type:func -uvDbg_80231C9C = 0x80231B6C; // type:func -uvDbg_80231F04 = 0x80231DD4; // type:func -uvDbg_8023217C = 0x8023204C; // type:func -uvDbg_802323A8 = 0x80232278; // type:func -uvDbg_80232554 = 0x80232424; // type:func -uvDbg_80232738 = 0x80232608; // type:func -uvDbg_8023286C = 0x8023273C; // type:func -uvDbg_80232EBC = 0x80232D8C; // type:func -uvDbg_80232ECC = 0x80232D9C; // type:func -uvDbg_80233310 = 0x802331E0; // type:func -uvDbg_802333AC = 0x8023327C; // type:func -uvDbg_8023345C = 0x8023332C; // type:func -uvDbgCnt = 0x802333B4; // type:func -uvDbg_80233590 = 0x80233460; // type:func -uvDbg_80233810 = 0x802336E0; // type:func -uvDbg_80233878 = 0x80233748; // type:func -uvDbg_802338A8 = 0x80233778; // type:func -uvDbg_802339B0 = 0x80233880; // type:func -uvDbg_80233A40 = 0x80233910; // type:func -uvDbg_80233D04 = 0x80233BD4; // type:func -uvDbg_80233DB8 = 0x80233C88; // type:func -uvDbg_80233FC8 = 0x80233E98; // type:func - -alSndpSetSound = 0x80234370; // type:func -alSndpGetState = 0x80234390; // type:func -alSndpStop = 0x802343B0; // type:func -alSndpDeallocate = 0x80234400; // type:func -alSndpAllocate = 0x80234450; // type:func -alSndpPlay = 0x802344F0; // type:func -alSndpSetVol = 0x80234560; // type:func -alSndpSetPitch = 0x802345C0; // type:func -alSndpSetFXMix = 0x80234620; // type:func -alSndpSetPan = 0x80234680; // type:func -alHeapInit = 0x802346E0; // type:func -alSndpNew = 0x80234CF4; // type:func -__CSPPostNextSeqEvent = 0x80234E30; // type:func -alCSPNew = 0x80235EF0; // type:func -osSendMesg = 0x80236060; // type:func -alHeapDBAlloc = 0x802361B0; // type:func -alBnkfNew = 0x80236314; // type:func -alSeqFileNew = 0x80236418; // type:func -osAiSetFrequency = 0x80236460; // type:func -alUnlink = 0x802365C0; // type:func -alLink = 0x802365F0; // type:func -alClose = 0x80236614; // type:func -alInit = 0x8023664C; // type:func -osCreateMesgQueue = 0x80236680; // type:func -osCreateThread = 0x802366B0; // type:func -osStartThread = 0x80236800; // type:func -osRecvMesg = 0x80236950; // type:func -osVirtualToPhysical = 0x80236A90; // type:func -osAiSetNextBuffer = 0x80236B10; // type:func -osAiGetLength = 0x80236BC0; // type:func -_timeToSamples = 0x80236BD8; // type:func -_freePVoice = 0x80236C30; // type:func -_collectPVoices = 0x80236C68; // type:func -__freeParam = 0x80236CC8; // type:func -__allocParam = 0x80236CE0; // type:func -alAudioFrame = 0x80236D18; // type:func -alSynNew = 0x80236FA0; // type:func -osPiStartDma = 0x802372A0; // type:func -alSeqpSetBank = 0x802373B0; // type:func -alSeqpGetState = 0x802373F0; // type:func -alCSeqGetLoc = 0x80237400; // type:func -alCSeqSetLoc = 0x802374A0; // type:func -alCSeqNextEvent = 0x80237664; // type:func -alCSeqNew = 0x8023795C; // type:func -alCSeqNewMarker = 0x80237A70; // type:func -alCSeqGetTicks = 0x80237BDC; // type:func -alCSeqSecToTicks = 0x80237BE4; // type:func -alCSeqTicksToSec = 0x80237CE0; // type:func -__alCSeqNextDelta = 0x80237D4C; // type:func -alSeqpSetSeq = 0x80237EC0; // type:func -alSeqpPlay = 0x80237F00; // type:func -alSeqpSetTempo = 0x80237F30; // type:func -alSeqpSetVol = 0x80237FA0; // type:func -alSeqpStop = 0x80237FE0; // type:func -osGetCount = 0x80238010; // type:func -spFinish = 0x80238020; // type:func -spDraw = 0x80239784; // type:func -spInit = 0x8023A4F0; // type:func -spScissor = 0x8023A61C; // type:func -spMove = 0x8023A640; // type:func -spColor = 0x8023A650; // type:func -spScale = 0x8023A680; // type:func -sqrtf = 0x8023A6F0; // type:func -osViBlack = 0x8023A700; // type:func -osWritebackDCache = 0x8023A770; // type:func -osViSetSpecialFeatures = 0x8023A7F0; // type:func - -__ull_rshift = 0x8023A9B0; // type:func -__ull_rem = 0x8023A9DC; // type:func -__ull_div = 0x8023AA18; // type:func -__ll_lshift = 0x8023AA54; // type:func -__ll_rem = 0x8023AA80; // type:func -__ll_div = 0x8023AABC; // type:func -__ll_mul = 0x8023AB18; // type:func -__ull_divremi = 0x8023AB48; // type:func -__ll_mod = 0x8023ABA8; // type:func -__ll_rshift = 0x8023AC44; // type:func - -osPiReadIo = 0x8023AC70; // type:func -osViSwapBuffer = 0x8023ACF0; // type:func -osWritebackDCacheAll = 0x8023AD40; // type:func -osSpTaskLoad = 0x8023AE8C; // type:func -osSpTaskStartGo = 0x8023AFEC; // type:func -osViGetCurrentFramebuffer = 0x8023B030; // type:func -osViGetNextFramebuffer = 0x8023B070; // type:func -osCreateViManager = 0x8023B0B0; // type:func -viMgrMain = 0x8023B234; // type:func -osViSetMode = 0x8023B410; // type:func -osSetEventMesg = 0x8023B480; // type:func -osViSetEvent = 0x8023B4F0; // type:func -osSpTaskYield = 0x8023B560; // type:func -osSpTaskYielded = 0x8023B580; // type:func -osEepromLongWrite = 0x8023B600; // type:func -osEepromLongRead = 0x8023B740; // type:func -osEepromProbe = 0x8023B880; // type:func -osInitialize = 0x8023B8F0; // type:func -osPiRawReadIo = 0x8023BB20; // type:func -__osGetCurrFaultedThread = 0x8023BB80; // type:func -osCreatePiManager = 0x8023BB90; // type:func -osSetThreadPri = 0x8023BD10; // type:func -osSetTimer = 0x8023BDF0; // type:func -osContInit = 0x8023BED0; // type:func -__osContGetInitData = 0x8023C0CC; // type:func -__osPackRequestData = 0x8023C19C; // type:func -osContStartReadData = 0x8023C290; // type:func -osContGetReadData = 0x8023C354; // type:func -osInvalDCache = 0x8023C4F0; // type:func -lldiv = 0x8023C5A0; // type:func -ldiv = 0x8023C6A0; // type:func -alEvtqFlushType = 0x8023C730; // type:func -alEvtqFlush = 0x8023C7DC; // type:func -alEvtqPostEvent = 0x8023C84C; // type:func -alEvtqNextEvent = 0x8023C970; // type:func -alEvtqNew = 0x8023C9FC; // type:func -alSynAddPlayer = 0x8023CA70; // type:func -_allocatePVoice = 0x8023CAC0; // type:func -alSynAllocVoice = 0x8023CBA8; // type:func -alSynStartVoice = 0x8023CCF0; // type:func -alSynSetPan = 0x8023CD80; // type:func -alSynSetVol = 0x8023CE10; // type:func -alSynSetPitch = 0x8023CEB0; // type:func -alSynSetFXMix = 0x8023CF40; // type:func -alSynStopVoice = 0x8023CFE0; // type:func -alSynFreeVoice = 0x8023D060; // type:func -osSetIntMask = 0x8023D110; // type:func -__setInstChanState = 0x8023D170; // type:func -__resetPerfChanState = 0x8023D1C4; // type:func -__initFromBank = 0x8023D244; // type:func -__vsDelta = 0x8023D300; // type:func -__vsVol = 0x8023D324; // type:func -__seqpReleaseVoice = 0x8023D3AC; // type:func -__voiceNeedsNoteKill = 0x8023D4D8; // type:func -__unmapVoice = 0x8023D580; // type:func -__postNextSeqEvent = 0x8023D5F0; // type:func -__vsPan = 0x8023D744; // type:func -__lookupVoice = 0x8023D78C; // type:func -__mapVoice = 0x8023D800; // type:func -__lookupSoundQuick = 0x8023D870; // type:func -__seqpStopOsc = 0x8023E7B0; // type:func -__initChanState = 0x8023E8B4; // type:func -alSeqpNew = 0x8023E924; // type:func -alCents2Ratio = 0x8023EAB0; // type:func -alSynStartVoiceParams = 0x8023EB00; // type:func -__osDisableInt = 0x8023EBF0; // type:func -__osRestoreInt = 0x8023EC10; // type:func -__osDequeueThread = 0x8023EC30; // type:func -__osExceptionPreamble = 0x8023EC70; // type:func -__osException = 0x8023EC80; // type:func -send_mesg = 0x8023F1C8; // type:func -handle_CpU = 0x8023F27C; // type:func -__osEnqueueAndYield = 0x8023F2B0; // type:func -__osEnqueueThread = 0x8023F340; // type:func -__osPopThread = 0x8023F388; // type:func -__osDispatchThread = 0x8023F398; // type:func -__osCleanupThread = 0x8023F4D8; // use_non_matching_label:False -__osViInit = 0x8023F4E0; // type:func -alSynDelete = 0x8023F5F0; // type:func -__osProbeTLB = 0x8023F600; // type:func -__osAiDeviceBusy = 0x8023F6C0; // type:func -alSaveNew = 0x8023F6F0; // type:func -alResampleNew = 0x8023F7DC; // type:func -alLoadNew = 0x8023F864; // type:func -alEnvmixerNew = 0x8023F90C; // type:func -init_lpfilter = 0x8023F9B0; // type:func -alFxNew = 0x8023FA50; // type:func -alSynAllocFX = 0x8023FE70; // type:func -alMainBusParam = 0x8023FF10; // type:func -alMainBusPull = 0x8023FF40; // type:func -alLoadParam = 0x80240060; // type:func -alRaw16Pull = 0x80240234; // type:func -alAdpcmPull = 0x8024070C; // type:func -alResampleParam = 0x80240BB0; // type:func -alResamplePull = 0x80240C9C; // type:func -_ldexpf = 0x80240EB0; // type:func -_frexpf = 0x80240ED8; // type:func -alEnvmixerParam = 0x80240FC4; // type:func -alEnvmixerPull = 0x802415BC; // type:func -alAuxBusParam = 0x80241B10; // type:func -alAuxBusPull = 0x80241B40; // type:func -alSaveParam = 0x80241C20; // type:func -alSavePull = 0x80241C54; // type:func -osJamMesg = 0x80241CE0; // type:func -osPiGetCmdQueue = 0x80241E30; // type:func -spClearAttribute = 0x80241E60; // type:func -spSetAttribute = 0x80241E80; // type:func -__osPiCreateAccessQueue = 0x80241E90; // type:func -__osPiGetAccess = 0x80241EE0; // type:func -__osPiRelAccess = 0x80241F24; // type:func -bcopy = 0x80241F50; // type:func -__osSpSetStatus = 0x80242260; // type:func -__osSpSetPc = 0x80242270; // type:func -__osSpRawStartDma = 0x802422B0; // type:func -__osSpDeviceBusy = 0x80242340; // type:func -__osTimerServicesInit = 0x80242370; // type:func -__osTimerInterrupt = 0x802423FC; // type:func -__osSetTimerIntr = 0x80242574; // type:func -__osInsertTimer = 0x802425E8; // type:func -osGetThreadPri = 0x80242770; // type:func -__osViGetCurrentContext = 0x80242790; // type:func -__osViSwapContext = 0x802427A0; // type:func -__osSpGetStatus = 0x80242B00; // type:func -osEepromWrite = 0x80242B10; // type:func -__osPackEepWriteData = 0x80242CC0; // type:func -__osEepStatus = 0x80242DCC; // type:func -osEepromRead = 0x80242FF0; // type:func -__osPackEepReadData = 0x802431E0; // type:func -__osSiCreateAccessQueue = 0x802432F0; // type:func -__osSiGetAccess = 0x80243340; // type:func -__osSiRelAccess = 0x80243384; // type:func -__osSetSR = 0x802433B0; // type:func -__osGetSR = 0x802433C0; // type:func -__osSetFpcCsr = 0x802433D0; // type:func -__osSiRawReadIo = 0x802433E0; // type:func -__osSiRawWriteIo = 0x80243430; // type:func -osInvalICache = 0x80243480; // type:func -osMapTLBRdb = 0x80243500; // type:func -bzero = 0x80243560; // type:func -osPiRawStartDma = 0x80243600; // type:func -__osDevMgrMain = 0x802436E0; // type:func -osGetTime = 0x80243860; // type:func -__osSiRawStartDma = 0x802438F0; // type:func -alCopy = 0x802439A0; // type:func -alSeqGetLoc = 0x80243A20; // type:func -alSeqSetLoc = 0x80243A3C; // type:func -alSeqGetTicks = 0x80243A58; // type:func -alSeqNextEvent = 0x80243AB4; // type:func -alSeqNewMarker = 0x80243C38; // type:func -alSeqSecToTicks = 0x80243D58; // type:func -alSeqTicksToSec = 0x80243E3C; // type:func -__alSeqNextDelta = 0x80243E90; // type:func -alSeqNew = 0x80243F68; // type:func -alSynSetPriority = 0x80244040; // type:func -kdebug_u32_to_string = 0x80244050; // type:func -kdebug_string_to_u32 = 0x80244080; // type:func -kdebug_send_packet = 0x802440D8; // type:func -kdebug_send = 0x80244198; // type:func -kdebug_send_buffer = 0x80244270; // type:func -kdebug_send_thread = 0x802442BC; // type:func -kdebugserver = 0x802442E8; // type:func -__osSyncPutChars = 0x802444D0; // type:func -osDestroyThread = 0x80244600; // type:func -alFilterNew = 0x80244700; // type:func -_doModFunc = 0x80244720; // type:func -_filterBuffer = 0x802447C8; // type:func -_saveBuffer = 0x80244880; // type:func -_loadBuffer = 0x80244A08; // type:func -_loadOutputBuffer = 0x80244B94; // type:func -alFxParamHdl = 0x80244DB8; // type:func -alFxParam = 0x80244FD0; // type:func -alFxPull = 0x80244FE8; // type:func -__osSetCompare = 0x80245330; // type:func -__osSiDeviceBusy = 0x80245340; // type:func -__osGetCause = 0x80245370; // type:func -__osAtomicDec = 0x80245380; // type:func - -// data - -nextDMA = 0x80248B30; -curAcmdList = 0x80248B34; -gAudioHeapStart = 0x80248B3C; -gSeqPlayer = 0x80248B40; -gSndPlayer = 0x80248B44; - -gGfxUnkPtrs = 0x80248C80; -D_80248DD8 = 0x80248C88; - -sFontScaleX = 0x80248D2C; -sFontScaleY = 0x80248D30; -sFontCurId = 0x80248D34; -sFontMsgCount = 0x80248D3C; -sFontSprite = 0x80248CD0; // size:0x44 -sFontColorR = 0x80248D14; -sFontColorG = 0x80248D18; -sFontColorB = 0x80248D1C; -sFontColorA = 0x80248D20; - -gGfxDList1 = 0x80248FF0; -gGfxDList2 = 0x80249060; -gGfxFrameTime = 0x80249088; -D_802491E0 = 0x80249090; -D_802491E4 = 0x80249094; -D_802491E8 = 0x80249098; -gGfxGammaEnabled = 0x8024909C; -gGfxFbCurrPtr = 0x802490A0; -gGfxZBufferEnabled = 0x802490A4; -gGfxCullFrontEnabled = 0x802490A8; -gGfxCullBackEnabled = 0x802490AC; -gGfxSyncNeeded = 0x802490B0; -gGfxBeginFlag = 0x802490B4; -gGfxFogFactor = 0x802490B8; -gGfxFbIndex = 0x802490BC; -gGfxElementCount = 0x802490C0; -gGfxFrameCount = 0x802490C4; -gGfxMstackIdx = 0x802490C8; -gGfxFrameTimeFixed = 0x802490CC; - -gMatrixStackIdx = 0x8024B100; - -gRandLcgState = 0x8024B170; -gRanluxState1 = 0x8024B174; -gRanluxState2 = 0x8024B178; - -D_8024B260 = 0x8024B110; - -D_803805E0 = 0x80372FC0; - -alGlobals = 0x8024B630; - -__osViDevMgr = 0x8024B660; // size:0x18 - -osViModeTable = 0x8024B680; // size:0x8c0 - -osClockRate = 0x8024BF40; // size:0x8 -__osShutdown = 0x8024BF48; - -__osPiDevMgr = 0x8024BF50; // size:0x18 - -__osContinitialized = 0x8024BF70; - -__osThreadTail = 0x8024BF80; -__osRunQueue = 0x8024BF88; -__osActiveQueue = 0x8024BF8C; -__osRunningThread = 0x8024BF90; -__osFaultedThread = 0x8024BF94; - -__osPiAccessQueueEnabled = 0x8024C300; - -__osTimerList = 0x8024C310; - -__osRdbSendMessage = 0x8024C340; -__osRdbWriteOK = 0x8024C344; - -osViModeNtscLan1 = 0x8024C350; -osViModePalLan1 = 0x8024C3A0; - -// .bss - -D_80269F50 = 0x80269DC0; // size:0xF0 - -sFontBitmaps = 0x80269EB0; // size:0x190 -sFontDList = 0x8026A040; // size:0x11AC0 -sFontMessages = 0x8027BB00; // size:0x8F0 - -D_8028A0A0 = 0x8027C3F0; - -gGfxTaskOutputBuffer = 0x80288DF0; // size:0x2008 -gGfxTaskOutputBufferStart = 0x8028ADF8; -gGfxTaskOutputBufferEnd = 0x8028ADFC; -gGfxDisplayListHead = 0x8028AE00; -gGfxNumVtxTransforms = 0x8028AE08; -gGfxNumTriangles = 0x8028AE10; -gGfxNumTxtLoads = 0x8028AE18; -gGfxNumMtxLoads = 0x8028AE20; -gGfxNumMtxLoadMults = 0x8028AE28; -gGfxNumLooks = 0x8028AE30; -gGfxLooks = 0x8028AE38; // size:0x780 -gGfxStateStackData = 0x8028B5B8; -gGfxBoundTexture = 0x8028B5BC; -gGfxFbPtrs = 0x8028B5C0; -D_80299278 = 0x8028B5C8; -gGfxDisplayListBase = 0x8028B5D0; // size:0x10680 -gGfxViewports = 0x8029BC50; -gGfxViewX0 = 0x8029BCD0; -gGfxViewX1 = 0x8029BCD2; -gGfxViewY0 = 0x8029BCD4; -gGfxViewY1 = 0x8029BCD6; - -gUVBlockOffsets = 0x802A7740; // size:0x1A40 - -gSchedInst = 0x802B5BF8; -D_802C3B50 = 0x802B5EA0; -D_802C3B68 = 0x802B5EB8; -D_802C3B90 = 0x802B5EE0; -gSchedClient = 0x802B7EF8; - -__osThreadSave = 0x802BCAA0; -__osEventStateTab = 0x802BB5F0; - -// app functions - -app_entrypoint = 0x80302690; // type:func diff --git a/config/jp/sym/symbol_addrs_app.txt b/config/jp/sym/symbol_addrs_app.txt new file mode 100644 index 00000000..61e5abf3 --- /dev/null +++ b/config/jp/sym/symbol_addrs_app.txt @@ -0,0 +1,1507 @@ +// Visit https://github.com/ethteck/splat/wiki/Adding-Symbols for documentation about this file + +// ----------------------------------------------------------------------------- +// Function Symbols +// ----------------------------------------------------------------------------- + +app_firstfunc = 0x802BCC50; // type:func +func_802CAA00 = 0x802BCD50; // type:func +func_802CAA90 = 0x802BCDE0; // type:func +func_802CAAC8 = 0x802BCE18; // type:func + +ballsInit = 0x802bd050; // type:func +ballsInitBall = 0x802BD138; // type:func +balls_802CAF50 = 0x802BD2A0; // type:func +ballsLoad = 0x802BD3E4; // type:func +ballsMotionUpdate = 0x802BD64C; // type:func +ballsDeinit = 0x802BD6AC; // type:func +ballsFrameUpdate = 0x802BD748; // type:func +ballsFrameUpdateOne = 0x802BD8BC; // type:func +balls_802CB6D4 = 0x802BDA24; // type:func +balls_802CB9B4 = 0x802BDD04; // type:func +ballsCollision = 0x802BDFEC; // type:func +ballsPopped = 0x802BE1E4; // type:func +ballsGetPoints = 0x802BE3B4; // type:func +ballsObjIdExists = 0x802BE424; // type:func +ballsGetCount = 0x802BE48C; // type:func +ballsGetAllPopped = 0x802BE4AC; // type:func + +birdInit = 0x802BE500; // type:func +birdLoadLevel = 0x802BE5C0; // type:func +birdEnterLeave = 0x802BE6EC; // type:func +bird_802CC51C = 0x802BE86C; // type:func +birdMovementFrame = 0x802BE8AC; // type:func +bird_802CD0F8 = 0x802BF448; // type:func +birdLoadPilot = 0x802BF638; // type:func +bird_802CE0A4 = 0x802C03F4; // type:func + +bird_802CE190 = 0x802C04E0; // type:func +bird_802CEA60 = 0x802C0DB0; // type:func +bird_802CEB68 = 0x802C0EB8; // type:func + +bird_802CEBA0 = 0x802C0EF0; // type:func +bird_802CECB8 = 0x802C1008; // type:func +bird_802CEDF8 = 0x802C1148; // type:func +bird_802CF24C = 0x802C159C; // type:func +bird_802CF5B4 = 0x802C1904; // type:func +bird_802CF640 = 0x802C1990; // type:func +bird_802CF76C = 0x802C1ABC; // type:func +bird_802CF8A4 = 0x802C1BF4; // type:func +bird_802CFAC8 = 0x802C1E18; // type:func +bird_802CFEA8 = 0x802C21F8; // type:func +bird_802CFF74 = 0x802C22C4; // type:func +bird_802D0080 = 0x802C23D0; // type:func +bird_802D08F8 = 0x802C2B18; // type:func +bird_802D0A28 = 0x802C2C48; // type:func +bird_802D0ABC = 0x802C2CDC; // type:func + +bmSoundInit = 0x802C2E10; // type:func +bmSoundCallback = 0x802C2F24; // type:func +bmSound_802D112C = 0x802C334C; // type:func +bmSound_802D12C4 = 0x802C34E4; // type:func +bmSound_802D1320 = 0x802C3540; // type:func +bmSound_802D1334 = 0x802C3554; // type:func +bmSound_802D1534 = 0x802C3754; // type:func + +boatsLoadCrescent = 0x802C3C94; // type:func +boatsLoadHoliday = 0x802C3F08; // type:func +boatsGetPose = 0x802C4238; // type:func +boatsDeinit = 0x802C428C; // type:func +boatsInit = 0x802C4310; // type:func +boatsGetObjData = 0x802C4344; // type:func +boatsUpdateInterval = 0x802C43F8; // type:func + +bonusInit = 0x802C44D0; // type:func +bonusUpdateState = 0x802C44F8; // type:func +bonusLoad = 0x802C460C; // type:func +bonusFrameUpdate = 0x802C47CC; // type:func +bonusDeinit = 0x802C49EC; // type:func + +ballTgtInit = 0x802C4A70; // type:func +ballTgtUpdateState = 0x802C4AF8; // type:func +ballTgtInitDobj = 0x802C4C1C; // type:func +ballTgtLoad = 0x802C4CEC; // type:func +ballTgt_802D2C20 = 0x802C4E40; // type:func +ballTgtInGoal = 0x802C5068; // type:func +ballTgtDeinit = 0x802C5250; // type:func +ballTgtCount_5B = 0x802C52D4; // type:func +ballTgtCount_59 = 0x802C5330; // type:func + +cameraInit = 0x802C5390; // type:func +camera_802D3444 = 0x802C5664; // type:func +camera_802D4514 = 0x802C6734; // type:func +camera_802D45C4 = 0x802C67E4; // type:func +camera_802D472C = 0x802C694C; // type:func +camera_802D4A30 = 0x802C6C50; // type:func +camera_802D4DE8 = 0x802C7008; // type:func +camera_802D4ECC = 0x802C70EC; // type:func +camera_802D50D0 = 0x802C72F0; // type:func +camera_802D5884 = 0x802C7AA4; // type:func + +cannonInit = 0x802C7CB0; // type:func +cannonLoadLevel = 0x802C7D70; // type:func +cannonLevelEnterLeave = 0x802C7E7C; // type:func +cannonEndTarget = 0x802C80B8; // type:func +cannonMovementFrame = 0x802C8120; // type:func +cannonAimingFrame = 0x802C88E4; // type:func +cannonShoot = 0x802C8D9C; // type:func +cannonPilotLand = 0x802C8EE4; // type:func +cannonLoadPilot = 0x802C9158; // type:func +cannonLoad802D77D8 = 0x802C99F8; // type:func +cannonFrame802D7B7C = 0x802C9D9C; // type:func +cannonLandedFrame = 0x802CA2B8; // type:func +cannonEndShot = 0x802CA6B4; // type:func +cannonEndAllTgts = 0x802CA950; // type:func +cannon_802D8A40 = 0x802CAC60; // type:func + +func_802D8AF0 = 0x802CAD10; // type:func +func_802D9220 = 0x802CB440; // type:func +func_802D9430 = 0x802CB650; // type:func +func_802D94EC = 0x802CB70C; // type:func +func_802D95D8 = 0x802CB7F8; // type:func +func_802D9818 = 0x802CBA38; // type:func +func_802D9900 = 0x802CBB20; // type:func +func_802D9AB8 = 0x802CBCD8; // type:func +func_802D9B40 = 0x802CBD60; // type:func +func_802D9BBC = 0x802CBDDC; // type:func + +cbSoundInit = 0x802CBED0; // type:func +func_802D9E68 = 0x802CC088; // type:func +func_802DA1A8 = 0x802CC3C8; // type:func +func_802DA228 = 0x802CC448; // type:func +func_802DA23C = 0x802CC45C; // type:func +func_802DA354 = 0x802CC574; // type:func +func_802DA474 = 0x802CC694; // type:func + +func_802DA530 = 0x802CC750; // type:func +func_802DA54C = 0x802CC76C; // type:func +func_802DA574 = 0x802CC794; // type:func +func_802DA628 = 0x802CC848; // type:func +func_802DA684 = 0x802CC8A4; // type:func +func_802DA6E0 = 0x802CC900; // type:func +func_802DA9E0 = 0x802CCC00; // type:func +func_802DAA34 = 0x802CCC54; // type:func +func_802DAB18 = 0x802CCD38; // type:func +func_802DB050 = 0x802CD270; // type:func +func_802DB224 = 0x802CD444; // type:func +func_802DB38C = 0x802CD5AC; // type:func +func_802DB6D4 = 0x802CD8F4; // type:func +func_802DB9B8 = 0x802CDBD8; // type:func +func_802DBCB0 = 0x802CDED0; // type:func +func_802DBE10 = 0x802CE030; // type:func +func_802DBE64 = 0x802CE084; // type:func +func_802DBF10 = 0x802CE130; // type:func +func_802DC074 = 0x802CE294; // type:func +func_802DC1DC = 0x802CE3FC; // type:func +func_802DC380 = 0x802CE5A0; // type:func +func_802DC784 = 0x802CE9A4; // type:func +func_802DC814 = 0x802CEA34; // type:func +func_802DC8E4 = 0x802CEB04; // type:func +func_802DC930 = 0x802CEB50; // type:func +func_802DC97C = 0x802CEB9C; // type:func +func_802DCA00 = 0x802CEC20; // type:func +func_802DCA5C = 0x802CEC7C; // type:func + +contInfoMainRender = 0x802CED60; // type:func +contInfoInit = 0x802CEDC0; // type:func +contInfoUpdate = 0x802CEF10; // type:func +contInfo_802CEFA8 = 0x802CEFA8; // type:func +contInfo_802CF0CC = 0x802CF0CC; // type:func +contInfo_802CF758 = 0x802CF758; // type:func +contInfoDrawLineSeg = 0x802CF7C4; // type:func +contInfoDrawLineStrip = 0x802CFB28; // type:func +contInfoDraw = 0x802CFBF0; // type:func +contInfoDeinit = 0x802CFD28; // type:func + +func_802DD200 = 0x802CFD60; // type:func +func_802DEC30 = 0x802D1790; // type:func +screenDrawBox = 0x802D18A4; // type:func +func_802DEE44 = 0x802D19A4; // type:func +screenDrawBox2 = 0x802D1B9C; // type:func +screenDrawBoxSetup = 0x802D24E8; // type:func +func_802DFA18 = 0x802D2578; // type:func + +func_802DFA40 = 0x802D25A0; // type:func +func_802DFB48 = 0x802D26A8; // type:func +db_getgnd = 0x802D29A0; // type:func +func_802E02EC = 0x802D2E1C; // type:func +func_802E02F8 = 0x802D2E28; // type:func +db_getstart = 0x802D2E34; // type:func +func_802E0484 = 0x802D2FB4; // type:func +func_802E05CC = 0x802D30FC; // type:func +func_802E06AC = 0x802D31DC; // type:func +func_802E07D8 = 0x802D3308; // type:func +func_802E08F4 = 0x802D3424; // type:func +func_802E0C30 = 0x802D3760; // type:func + +env_802E0CF0 = 0x802D3820; // type:func +envInit = 0x802D3D68; // type:func +envLoad = 0x802D3DA8; // type:func +envGetCurrentId = 0x802D3DE4; // type:func +env_802E1444 = 0x802D3F74; // type:func +env_802E14E8 = 0x802D4018; // type:func +env_802E15F0 = 0x802D4120; // type:func +env_802E1754 = 0x802D4284; // type:func +envLoadTerrainPal = 0x802D44C0; // type:func +env_802E1A80 = 0x802D45B0; // type:func +env_802E1C1C = 0x802D474C; // type:func +env_802E2060 = 0x802D4B90; // type:func +env_802E23E0 = 0x802D4F10; // type:func +env_802E2504 = 0x802D5034; // type:func + +envSoundInit = 0x802D51F0; // type:func +envSoundLoad = 0x802D52D8; // type:func +envSound_802E2904 = 0x802D5434; // type:func +envSound_802E2A00 = 0x802D5530; // type:func +envSound_802E3250 = 0x802D5D70; // type:func +envSound_802E3310 = 0x802D5E30; // type:func +envSound_802E3398 = 0x802D5EE4; // type:func +envSoundFrameUpdate = 0x802D5F98; // type:func + +falcoInit = 0x802D6300; // type:func +falco_802E38F0 = 0x802D6440; // type:func +falcoLoad = 0x802D65AC; // type:func +falcoDeinit = 0x802D69BC; // type:func +falcoFrameUpdate = 0x802D6ACC; // type:func +falco_802E43C4 = 0x802D6F14; // type:func +falco_802E45B0 = 0x802D7100; // type:func +falco_802E4794 = 0x802D72E4; // type:func +falco_802E49B0 = 0x802D7500; // type:func +falco_802E4AA8 = 0x802D75F8; // type:func +falco_802E4E70 = 0x802D79C0; // type:func +falco_802E51E8 = 0x802D7D38; // type:func +falco_802E55A0 = 0x802D80F0; // type:func +falco_802E57C4 = 0x802D8314; // type:func +falco_802E5818 = 0x802D8368; // type:func +falco_802E587C = 0x802D83CC; // type:func +falco_802E5AFC = 0x802D864C; // type:func +falco_802E5BF8 = 0x802D8748; // type:func +falco_802E5D78 = 0x802D88C8; // type:func +falco_802E5F44 = 0x802D8A94; // type:func +falco_802E5F90 = 0x802D8AE0; // type:func +falco_802E60A4 = 0x802D8BF4; // type:func +falco_802E60E8 = 0x802D8C38; // type:func +falco_802E6128 = 0x802D8C78; // type:func +falco_802E6184 = 0x802D8CD4; // type:func +falco_802E61E4 = 0x802D8D34; // type:func +falco_802D8D74 = 0x802D8D74; // type:func +falco_802E6284 = 0x802D8DD4; // type:func +falco_802E62E4 = 0x802D8E34; // type:func +falco_802E6344 = 0x802D8E94; // type:func +falco_802E6380 = 0x802D8ED0; // type:func +falco_802E63BC = 0x802D8F0C; // type:func +falco_802E64E0 = 0x802D9030; // type:func + +fdrInit = 0x802D90C0; // type:func +fdr_802E65AC = 0x802D90FC; // type:func +fdr_802E66DC = 0x802D922C; // type:func +fdrSetBlen = 0x802D9244; // type:func +fdr_802E682C = 0x802D937C; // type:func +fdr_802E6870 = 0x802D93C0; // type:func +fdr_802E68B0 = 0x802D9400; // type:func +fdr_802E6B5C = 0x802D96AC; // type:func +fdr_802E6B68 = 0x802D96B8; // type:func +fdr_802E7278 = 0x802D9DC8; // type:func +fdr_802E73BC = 0x802D9F0C; // type:func +fdr_802E7424 = 0x802D9F74; // type:func +fdr_802E7550 = 0x802DA0A0; // type:func +fdr_802E75C0 = 0x802DA110; // type:func +fdrInterp = 0x802DA23C; // type:func + +ferryIsActive = 0x802DA2F0; // type:func +ferryUpdatePos = 0x802DA2FC; // type:func +ferryInit = 0x802DA528; // type:func +ferryLoad = 0x802DA540; // type:func +ferryDeinit = 0x802DA778; // type:func +ferryGetInterval = 0x802DA7F0; // type:func +ferryGetPos = 0x802DA808; // type:func +ferrySetInterval = 0x802DA868; // type:func +ferryStateSave = 0x802DA8A8; // type:func +ferryStateRestore = 0x802DA8BC; // type:func + +// saveFilePack = 0x802DA8D0; // type:func +// saveBitScramble = 0x802DAAF0; // type:func +// saveFatalError = 0x802DAD0C; // type:func +saveModuleInit = 0x802DAD0C; // type:func +saveFileWrite = 0x802DAD68; // type:func +saveFileLoad = 0x802DB004; // type:func +saveFileHasData = 0x802DB2E0; // type:func +saveFileInit = 0x802DB318; // type:func +saveFile_802E89D4 = 0x802DB36C; // type:func + +fileMenuTopRender = 0x802DB410; // type:func +fileMenu_802E8AF0 = 0x802DB480; // type:func +fileMenu_802E8FF4 = 0x802DB984; // type:func +fileMenuSetup = 0x802DBA28; // type:func +fileMenuDeinit = 0x802DBC84; // type:func +fileMenuPrintText = 0x802DBCD8; // type:func +fileMenuSetText = 0x802DBD84; // type:func +fileMenuEraseFile = 0x802DBE50; // type:func +fileMenu_802E94E0 = 0x802DBE80; // type:func +fileMenuChoose = 0x802DC140; // type:func +fileMenu_802E9890 = 0x802DC230; // type:func +fileMenu_802E9980 = 0x802DC320; // type:func +fileMenuSubRender = 0x802DC3B0; // type:func +fileMenuColorLerp = 0x802DC424; // type:func +fileMenu_802E9AE0 = 0x802DC480; // type:func + +fireFxInit = 0x802DC970; // type:func +fireFxUpdate = 0x802DC984; // type:func +fireFxCreateAll = 0x802DC9DC; // type:func +fireFxDeinit = 0x802DD1C4; // type:func +fireFxCreate = 0x802DD280; // type:func + +func_802EAAE0 = 0x802DD480; // type:func +func_802EABAC = 0x802DD54C; // type:func +func_802EAC18 = 0x802DD5B8; // type:func +func_802EAC9C = 0x802DD63C; // type:func + +fountainIsActive = 0x802DD740; // type:func +fountainUpdatePose = 0x802DD74C; // type:func +fountainUpdate = 0x802DD7DC; // type:func +fountainProxEventCb = 0x802DD8B4; // type:func +fountainProxAnimCb = 0x802DD954; // type:func +fountainInit = 0x802DDA44; // type:func +fountainLoad = 0x802DDA5C; // type:func +fountainDeinit = 0x802DDBF8; // type:func +fountainGetInterval = 0x802DDC70; // type:func +fountainGetPos = 0x802DDC88; // type:func +fountainSetInterval = 0x802DDCB0; // type:func +fountainStateSave = 0x802DDCE4; // type:func +fountainStateRestore = 0x802DDD08; // type:func +// fountainInitUpdate + +func_802EB3E0 = 0x802DDD30; // type:func +func_802EB424 = 0x802DDD74; // type:func +func_802EB598 = 0x802DDEE8; // type:func +func_802EB5E4 = 0x802DDF34; // type:func +func_802EB640 = 0x802DDF90; // type:func + +gameInit = 0x802DE310; // type:func +func_802EBBB8 = 0x802DE508; // type:func +func_802EBBC8 = 0x802DE518; // type:func +gameUpdate = 0x802DE580; // type:func +gameUpdateStateTitle = 0x802DE5E4; // type:func +gameUpdateStateOptions = 0x802DE67C; // type:func +func_802EBD88 = 0x802DE6D8; // type:func +gameUpdateStateDemoPilot = 0x802DE760; // type:func +gameUpdateStateDemoTestSetup = 0x802DE7F8; // type:func +gameUpdateStateVehicleClassSelect = 0x802DE82C; // type:func +gameUpdateStateFileMenu = 0x802DE888; // type:func +gameUpdateStateTestOverview = 0x802DE944; // type:func +gameUpdateStateResultsCB = 0x802DE9AC; // type:func +gameUpdateStateCongratulations = 0x802DE9F8; // type:func +gameUpdateStateCredits = 0x802DEA18; // type:func +gameUpdateState1 = 0x802DEA44; // type:func +gameUpdateStateTestDetails = 0x802DEA98; // type:func +gameUpdateStatePilotSelect = 0x802DEC88; // type:func +gameUpdateStateTestSetup = 0x802DEE5C; // type:func +gameUpdateStateResults = 0x802DF37C; // type:func +func_802ECE94 = 0x802DF7E4; // type:func +gameUpdateStateTestUpdate = 0x802DF998; // type:func +func_802EDAF0 = 0x802E0440; // type:func +func_802EDD9C = 0x802E06EC; // type:func +func_802EDDEC = 0x802E073C; // type:func +func_802EE14C = 0x802E0A9C; // type:func + +func_802EE530 = 0x802E0E80; // type:func +func_802EE640 = 0x802E0F90; // type:func +func_802EEB00 = 0x802E1450; // type:func +func_802EEF0C = 0x802E185C; // type:func +func_802EF058 = 0x802E19A8; // type:func + +hangGliderInit = 0x802E1A90; // type:func +hangGliderLoadLevel = 0x802E1B88; // type:func +func_802EF328 = 0x802E1C78; // type:func +hangGliderEnterLeave = 0x802E1CB8; // type:func +hangGliderMovementFrame = 0x802E1F00; // type:func +func_802F03C4 = 0x802E2D14; // type:func +func_802F041C = 0x802E2D6C; // type:func +hangGliderLoadPilot = 0x802E2FA0; // type:func + +gliderToyLoadCrescent = 0x802E3F18; // type:func +gliderToyLoadLStates = 0x802E417C; // type:func +gliderToyLoadHoliday = 0x802E4438; // type:func +gliderToyLoadEFrost = 0x802E468C; // type:func +gliderToyInit = 0x802E48F0; // type:func +gliderToyDeinit = 0x802E4940; // type:func +gliderToyGetObjData = 0x802E49AC; // type:func +gliderToySetInterval = 0x802E4A60; // type:func + +hangGlider_802F2190 = 0x802E4AE0; // type:func +hangGlider_802F2370 = 0x802E4CC0; // type:func +hangGlider_802F24BC = 0x802E4E0C; // type:func + +hgSoundInit = 0x802E6DC0; // type:func + +func_802F4F90 = 0x802E78E0; // type:func +func_802F4F98 = 0x802E78E8; // type:func +func_802F50CC = 0x802E7A1C; // type:func +func_802F5304 = 0x802E7C54; // type:func +func_802F5358 = 0x802E7CA8; // type:func +func_802F56B4 = 0x802E8004; // type:func +func_802F5910 = 0x802E8260; // type:func + +gyrocopterInit = 0x802E8350; // type:func +gyrocopterLoadLevel = 0x802E8430; // type:func +gyrocopterEnterLeave = 0x802E8540; // type:func +func_802F5F80 = 0x802E88D0; // type:func +gyrocopterMovementFrame = 0x802E899C; // type:func +func_802F6DC8 = 0x802E9718; // type:func +func_802F6E74 = 0x802E97C4; // type:func +func_802F6EE0 = 0x802E9830; // type:func +func_802F7178 = 0x802E9AC8; // type:func +func_802F7224 = 0x802E9B74; // type:func +func_802F764C = 0x802E9F9C; // type:func +gyrocopterLoadPilot = 0x802EA1A4; // type:func + +func_802F88D0 = 0x802EB220; // type:func +func_802F89A0 = 0x802EB2F0; // type:func +func_802F8AB8 = 0x802EB408; // type:func +func_802F8B0C = 0x802EB45C; // type:func +func_802F8BF8 = 0x802EB548; // type:func +func_802F8C40 = 0x802EB590; // type:func +func_802F9104 = 0x802EBA54; // type:func +func_802F9150 = 0x802EBAA0; // type:func +func_802F9364 = 0x802EBCB4; // type:func +func_802F9540 = 0x802EBE90; // type:func +func_802F9638 = 0x802EBF88; // type:func +func_802F996C = 0x802EC2BC; // type:func +func_802F9BF8 = 0x802EC548; // type:func +func_802F9D28 = 0x802EC678; // type:func + +jumbleHopperInit = 0x802EC8B0; // type:func +jumbleHopperLoadLevel = 0x802EC970; // type:func +jumbleHopperEnterLeave = 0x802ECA58; // type:func +func_802FA290 = 0x802ECBE0; // type:func +jumbleHopperMovementFrame = 0x802ECC20; // type:func +jumbleHopperLoadPilot = 0x802ED0F0; // type:func + +func_802FAF80 = 0x802ED8D0; // type:func +func_802FAFF0 = 0x802ED940; // type:func +func_802FB0DC = 0x802EDA2C; // type:func +func_802FB1D8 = 0x802EDB28; // type:func +func_802FB22C = 0x802EDB7C; // type:func +func_802FB308 = 0x802EDC58; // type:func +func_802FB518 = 0x802EDE68; // type:func +func_802FB5A0 = 0x802EDEF0; // type:func +func_802FB5FC = 0x802EDF4C; // type:func + +func_802FB660 = 0x802EDFB0; // type:func +func_802FB784 = 0x802EE0D4; // type:func +func_802FB82C = 0x802EE17C; // type:func +func_802FB84C = 0x802EE19C; // type:func +func_802FB8CC = 0x802EE21C; // type:func +func_802FB988 = 0x802EE2D8; // type:func +func_802FBA44 = 0x802EE394; // type:func +func_802FBB58 = 0x802EE4A8; // type:func +func_802FBC6C = 0x802EE5BC; // type:func +func_802FBCA8 = 0x802EE5F8; // type:func +func_802FBD1C = 0x802EE66C; // type:func +func_802FBD90 = 0x802EE6E0; // type:func +func_802FBEFC = 0x802EE84C; // type:func +func_802FC018 = 0x802EE968; // type:func +func_802FC184 = 0x802EEAD4; // type:func +func_802FC3B4 = 0x802EED04; // type:func +func_802FC694 = 0x802EEFE4; // type:func +func_802FC8B0 = 0x802EF200; // type:func +func_802FCA8C = 0x802EF3DC; // type:func +func_802FCB3C = 0x802EF48C; // type:func +func_802FCC0C = 0x802EF55C; // type:func +func_802FCE38 = 0x802EF788; // type:func +func_802FD010 = 0x802EF960; // type:func +func_802FD038 = 0x802EF988; // type:func +func_802FD114 = 0x802EFA64; // type:func +func_802FD388 = 0x802EFCD8; // type:func +func_802FD3E0 = 0x802EFD30; // type:func +func_802FD55C = 0x802EFEAC; // type:func +func_802FD794 = 0x802F00E4; // type:func +func_802FD8C0 = 0x802F0210; // type:func +func_802FDF8C = 0x802F08DC; // type:func +func_802FE054 = 0x802F09A4; // type:func +func_802FE1A8 = 0x802F0AF8; // type:func +func_802FE2FC = 0x802F0C4C; // type:func +func_802FE564 = 0x802F0EB4; // type:func +func_802FE7A0 = 0x802F10F0; // type:func +func_802FE9DC = 0x802F132C; // type:func +func_802FEAD0 = 0x802F1420; // type:func +func_802FEBC4 = 0x802F1514; // type:func +func_802FEEC0 = 0x802F1810; // type:func +func_802FF1BC = 0x802F1B0C; // type:func +func_802FF5B4 = 0x802F1F04; // type:func +func_802FF654 = 0x802F1FA4; // type:func +func_802FFB3C = 0x802F248C; // type:func +func_80300018 = 0x802F2968; // type:func +func_80300448 = 0x802F2D98; // type:func +func_8030055C = 0x802F2EAC; // type:func +func_80300624 = 0x802F2F74; // type:func +func_803006E8 = 0x802F3038; // type:func +func_8030089C = 0x802F31EC; // type:func +func_80300B04 = 0x802F3454; // type:func +func_80300E78 = 0x802F37C8; // type:func +func_80301090 = 0x802F39E0; // type:func +func_803014A8 = 0x802F3DF8; // type:func +func_80301AF8 = 0x802F4448; // type:func +func_80301C58 = 0x802F45A8; // type:func +func_80301D28 = 0x802F4678; // type:func +func_80301F70 = 0x802F48C0; // type:func +func_80302484 = 0x802F4DD4; // type:func +func_803029CC = 0x802F531C; // type:func +func_80302BA0 = 0x802F54F0; // type:func +func_80303028 = 0x802F5978; // type:func + +func_80303230 = 0x802F5B80; // type:func +func_80303714 = 0x802F6064; // type:func +func_8030399C = 0x802F62EC; // type:func +func_80304738 = 0x802F7088; // type:func +func_80304B98 = 0x802F74E8; // type:func +func_80305BE8 = 0x802F8538; // type:func +func_80305DC0 = 0x802F8710; // type:func +func_80307A9C = 0x802FA3EC; // type:func +func_80307BAC = 0x802FA4FC; // type:func +func_80307E2C = 0x802FA77C; // type:func +func_80307EA8 = 0x802FA7F8; // type:func +func_80308478 = 0x802FADB4; // type:func +func_8030877C = 0x802FB0B8; // type:func +func_80308F1C = 0x802FB858; // type:func +func_80309090 = 0x802FB9CC; // type:func + +hoverPadInit = 0x802FC120; // type:func +hoverPad_80309868 = 0x802FC1A8; // type:func +hoverPadObjSetup = 0x802FC2E8; // type:func +hoverPadLoad = 0x802FC3A4; // type:func +hoverPadActivateNext = 0x802FC588; // type:func +hoverPadFrameUpdate = 0x802FC6A4; // type:func +hoverPadLanded = 0x802FC6AC; // type:func +hoverPadGetAltitude = 0x802FC7A8; // type:func +hoverPadGetFuel = 0x802FC7E8; // type:func +hoverPadGetLandedIdx = 0x802FC844; // type:func +hoverPadDeinit = 0x802FC93C; // type:func +hoverPadGetCount = 0x802FC9C0; // type:func +hoverPadGetPoints = 0x802FCA1C; // type:func + +func_8030A140 = 0x802FCA80; // type:func +hsound_callback = 0x802FCCD0; // type:func +func_8030ABF8 = 0x802FD538; // type:func +func_8030ADCC = 0x802FD6FC; // type:func +func_8030AEB0 = 0x802FD7E0; // type:func +func_8030B168 = 0x802FDA98; // type:func +func_8030B240 = 0x802FDB70; // type:func + +menuCreate = 0x802FDC10; // type:func +menuCreateVarHeight = 0x802FDCBC; // type:func +menuCreateItems = 0x802FDDBC; // type:func +menuCheckInputs = 0x802FDE3C; // type:func +menuRender = 0x802FDE5C; // type:func +menuDeinit = 0x802FDE7C; // type:func +menuDrawItem = 0x802FDEF4; // type:func +menu_8030B668 = 0x802FDF98; // type:func +menuSetItem = 0x802FDFB8; // type:func +menu_8030B69C = 0x802FDFCC; // type:func + +levelLoad = 0x802FDFF0; // type:func +level_8030B868 = 0x802FE198; // type:func +level_8030B964 = 0x802FE294; // type:func +level_8030BA60 = 0x802FE390; // type:func +levelComputeAppend = 0x802FE3C8; // type:func +level_8030BD20 = 0x802FE650; // type:func +levelGetWOBJ = 0x802FE658; // type:func +levelGetTPTS = 0x802FE678; // type:func +levelGetAPTS = 0x802FE698; // type:func +levelGetLPAD = 0x802FE6B8; // type:func +levelGetBNUS = 0x802FE6D8; // type:func +levelLoadMapObjects = 0x802FE6F8; // type:func + +func_8030C1C0 = 0x802FEAF0; // type:func +func_8030C22C = 0x802FEB5C; // type:func +func_8030C54C = 0x802FEE7C; // type:func +func_8030C61C = 0x802FEF4C; // type:func +func_8030C6A0 = 0x802FEFD0; // type:func +func_8030CB10 = 0x802FF430; // type:func + +credits_8030CB60 = 0x802FF480; // type:func +credits_8030CC48 = 0x802FF568; // type:func +creditsMainRender = 0x802FF61C; // type:func +credits_8030CDA0 = 0x802FF6C0; // type:func +credits_8030D1D4 = 0x802FFAF4; // type:func +credits_8030D208 = 0x802FFB28; // type:func +creditsScene = 0x802FFC10; // type:func + +func_8030D930 = 0x80300250; // type:func +func_8030D9C8 = 0x803002E8; // type:func +func_8030DED0 = 0x803007F0; // type:func +func_8030E3EC = 0x80300C80; // type:func +func_8030E7F4 = 0x80301088; // type:func +func_8030E860 = 0x803010F4; // type:func +func_8030E9AC = 0x80301240; // type:func +func_8030EA54 = 0x803012E8; // type:func +func_8030F448 = 0x80301CDC; // type:func +func_8030F818 = 0x80302084; // type:func + +app_entrypoint = 0x80302690; // type:func +map3dMain = 0x803026F0; // type:func +map3dLoad = 0x80302770; // type:func +map3dHandler = 0x80303EAC; // type:func +map3dRender = 0x803044B4; // type:func +map3dDeinit = 0x80304B00; // type:func +map3d_803123C4 = 0x80304C10; // type:func +map3d_80312514 = 0x80304D60; // type:func +map3dAddItem = 0x80304ED0; // type:func + +mem_get = 0x80304F90; // type:func +mem_init = 0x8030500C; // type:func +mem_remaining = 0x80305040; // type:func + +menuUtilCreate = 0x80305060; // type:func +menuUtilCheckInputs = 0x80305158; // type:func +menuUtilDeinit = 0x80305394; // type:func +menuUtilRender = 0x803053A0; // type:func +menuUtilGetCurItem = 0x80305720; // type:func +menuUtilSetCurItem = 0x8030572C; // type:func +menuUtilSetColors = 0x80305744; // type:func +menuUtilSetSoundFlags = 0x803057E0; // type:func +menuUtilSetButtonMode = 0x803057EC; // type:func +menuUtil_80313010 = 0x803057F8; // type:func + +func_80313430 = 0x80305C20; // type:func +func_803134D0 = 0x80305CC0; // type:func +func_80313570 = 0x80305D60; // type:func +func_80313640 = 0x80305E30; // type:func +func_803136C4 = 0x80305EB4; // type:func +func_8031385C = 0x8030604C; // type:func +func_803138A0 = 0x80306090; // type:func +func_80313AF4 = 0x803062E4; // type:func +func_80313BAC = 0x8030639C; // type:func +func_80313C94 = 0x80306484; // type:func +func_80313D74 = 0x80306564; // type:func +func_80313E0C = 0x803065FC; // type:func +func_80313E18 = 0x80306608; // type:func +func_80313F08 = 0x803066F8; // type:func +func_80313FD0 = 0x803067C0; // type:func +func_80314114 = 0x80306904; // type:func +func_80314154 = 0x80306944; // type:func +func_803141E4 = 0x803069D4; // type:func +func_8031420C = 0x803069FC; // type:func + +mistInit = 0x80306C20; // type:func +mist_803144D0 = 0x80306CC0; // type:func +mistUpdate = 0x80306FA8; // type:func +mistDeinit = 0x803072D0; // type:func + +missiIsActive = 0x80307340; // type:func +missiUpdatePos = 0x8030734C; // type:func +missiUpdate = 0x803074D8; // type:func +missiEventCbLStates = 0x803076D8; // type:func +missiAnimCbLStates = 0x80307818; // type:func +missiLoadLStates = 0x8030799C; // type:func +missiDeinitLStates = 0x80307B0C; // type:func +missiGetInterval = 0x80307B84; // type:func +missiGetPos = 0x80307B9C; // type:func +missiSetInterval = 0x80307C08; // type:func +missiInit = 0x80307C64; // type:func +missiStateSave = 0x80307CB0; // type:func +missiStateRestore = 0x80307CF8; // type:func + +oilPlantInit = 0x80307D40; // type:func +oilPlantInProximity = 0x80307D4C; // type:func +oilPlantEventCb = 0x80307D58; // type:func +oilPlantAnimCb = 0x80307E4C; // type:func +oilPlantLoad = 0x80307F24; // type:func +oilPlantDeinit = 0x8030815C; // type:func +oilPlantGetPos = 0x803081E4; // type:func + +oilUpdatePosa = 0x80308210; // type:func +oilUpdate = 0x803082A0; // type:func +oilProxEventCb = 0x803083A8; // type:func +oilProxAnimCb = 0x80308474; // type:func +oilInit = 0x80308558; // type:func +oilDeinit = 0x8030862C; // type:func + +optionsTopRender = 0x80308680; // type:func +optionsInit = 0x803086FC; // type:func +optionsInitMain = 0x803088A0; // type:func +optionsInitAlbum = 0x80308998; // type:func +optionsInitSound = 0x80308A28; // type:func +optionsMenuHandler = 0x80308B2C; // type:func +optionsHandlerMain = 0x80308BA8; // type:func +optionsHandlerAlbum = 0x80308D18; // type:func +optionsHandlerSound = 0x80308E24; // type:func +optionsDrawPanel = 0x80309218; // type:func +optionsPanel0 = 0x80309280; // type:func +optionsPanel1 = 0x803092A8; // type:func +optionsPanel2 = 0x803092D0; // type:func +optionsDrawBorder = 0x803092F8; // type:func +options_80316B80 = 0x80309370; // type:func +optionsSetSetting = 0x803093DC; // type:func +optionsSetTrack = 0x80309524; // type:func +optionsItemWrap = 0x80309578; // type:func + +padsInit = 0x803095B0; // type:func +padsLoad = 0x80309630; // type:func +padsFrameUpdate = 0x80309E24; // type:func +padsUnused = 0x80309F54; // type:func +padsDeinit = 0x80309F5C; // type:func +padsInitLandingPads = 0x8030A044; // type:func +padsLandedPadStrip = 0x8030A168; // type:func +padsCannonTgtDist = 0x8030A340; // type:func +padsStripAlignment = 0x8030A41C; // type:func + +hudInit = 0x8030A590; // type:func +hudGetState = 0x8030AA84; // type:func +hudMainRender = 0x8030AA90; // type:func +hudDrawHangGlider = 0x8030AEF0; // type:func +hudDrawRocketPack = 0x8030AFB4; // type:func +hudDrawCannonball = 0x8030B07C; // type:func +hudDrawSkyDiving = 0x8030C47C; // type:func +hudDrawJumbleHopper = 0x8030C634; // type:func +hudDrawBirdman = 0x8030C6EC; // type:func +hudDrawCamera = 0x8030C7DC; // type:func +hudDrawGyrocopter = 0x8030C908; // type:func +hudGenThermCircle = 0x8030CA14; // type:func +hud_8031A2CC = 0x8030CABC; // type:func +hud_8031A378 = 0x8030CB68; // type:func +hud_8031A66C = 0x8030CE5C; // type:func +hudAddWaypoint = 0x8030CEB8; // type:func +hudMoveWaypoint = 0x8030CF84; // type:func +hud_8031A810 = 0x8030D000; // type:func +hud_8031A874 = 0x8030D064; // type:func +hud_8031A8E0 = 0x8030D0D0; // type:func +hudDrawThrottle = 0x8030D144; // type:func +hudDrawRadar = 0x8030D558; // type:func +hudDemoContButton = 0x8030E674; // type:func +hudDemoController = 0x8030E6C0; // type:func +hudDrawSpeed = 0x8030E8A0; // type:func +hudDrawFuel = 0x8030E9D4; // type:func +hudDrawAltimeter = 0x8030F0EC; // type:func +hudSeaLevel = 0x8030F948; // type:func +hudDrawTimer = 0x8030FA50; // type:func +hudDrawAimReticle = 0x8030FC80; // type:func +hudDrawBox = 0x8030FD3C; // type:func +hudText_8031D8E0 = 0x803100CC; // type:func +hudWarningText = 0x803101A4; // type:func +hudGet_8031DA90 = 0x8031027C; // type:func +hudGet_8031DA9C = 0x80310288; // type:func +hud_8031DAA8 = 0x80310294; // type:func +hudDrawLowFuel = 0x803102E0; // type:func +hudDrawStartText = 0x803103EC; // type:func +hudRadarThermal = 0x803104F8; // type:func +hudSetCameraState = 0x80310754; // type:func +hudRadarWaypoint = 0x80310760; // type:func +hud_8031E628 = 0x80310E14; // type:func +hudDrawRect = 0x80310E88; // type:func +hudDrawPhotoCount = 0x803111E4; // type:func +hudDemoControllerEn = 0x803112A8; // type:func + +uvPathPoseLine = 0x803112C0; // type:func +func_8031EE48 = 0x80311638; // type:func +func_8031EF60 = 0x80311750; // type:func +func_8031EF68 = 0x80311758; // type:func + +func_8031EF90 = 0x80311780; // type:func +func_8031FA0C = 0x803121FC; // type:func +func_8031FD70 = 0x80312560; // type:func +func_8031FE18 = 0x80312608; // type:func + +planesUpdate = 0x80312720; // type:func +planesGetPos = 0x80312BC0; // type:func +planesProxEventCb = 0x80312BFC; // type:func +planesProxAnimCb = 0x80312CA0; // type:func +planesLoad = 0x80312D24; // type:func +planesDeinit = 0x80312F8C; // type:func +planesInit = 0x80313000; // type:func +planesGetObjData = 0x80313038; // type:func +planesUpdateInterval = 0x803130F0; // type:func + +demoAttInit = 0x803131E0; // type:func +demoAttLoadPos = 0x80313204; // type:func +demoAttGetMtxRT = 0x803133E4; // type:func +demoAttPrintRecord = 0x80313428; // type:func +demoPositionLerp = 0x80313470; // type:func +demoAngleLerp = 0x80313488; // type:func +demoAttUpdate = 0x80313500; // type:func +demoAtt_80320FBC = 0x803137AC; // type:func +demoAttPrintRT = 0x80313844; // type:func + +proxAnimInit = 0x803138F0; // type:func +proxAnimAddCallback = 0x80313A00; // type:func +proxAnimDeleteCallback = 0x80313ACC; // type:func +proxAnimDispatchEvent2 = 0x80313BD0; // type:func +proxAnimDispatchEvent3 = 0x80313BF0; // type:func +proxAnimGetRange = 0x80313C10; // type:func +proxAnimDispatchInit = 0x80313CD4; // type:func +proxAnimUpdate = 0x80313CFC; // type:func +proxAnimGetHandle = 0x80313E94; // type:func + +func_80321700 = 0x80313EF0; // type:func +func_80321760 = 0x80313F50; // type:func +func_8032232C = 0x80314B1C; // type:func +func_80322464 = 0x80314C54; // type:func +func_803226DC = 0x80314ECC; // type:func + +demoRecGetStickX = 0x80314FC0; // type:func +demoRecGetStickY = 0x80315018; // type:func +demoRecGetButtons = 0x80315070; // type:func +demoPackInputs = 0x80315080; // type:func +demoGetUserFileIdx = 0x803151DC; // type:func +demoGetClassId = 0x80315350; // type:func +demoGetVehicleId = 0x8031535C; // type:func +demoGet_80322B78 = 0x80315368; // type:func +demoGetTestId = 0x80315374; // type:func +demoAllocate = 0x80315380; // type:func +demoInit = 0x803153D0; // type:func +demoLoad = 0x80315550; // type:func +demoSetRecMode = 0x80315598; // type:func +demoGetRecMode = 0x803156A0; // type:func +demoLogInput = 0x803156AC; // type:func +demoGetEntryIndex = 0x8031576C; // type:func +demo_80323020 = 0x80315810; // type:func +demoGetInputs = 0x803158A0; // type:func +demoGetButtons = 0x80315954; // type:func +demoButtonCheck = 0x80315990; // type:func +demoButtonPress = 0x803159D0; // type:func +demoButtonRelease = 0x80315A30; // type:func +demoRandF = 0x80315A90; // type:func + +ringsInit = 0x80315AE0; // type:func +rings_80323364 = 0x80315B54; // type:func +rings_803234A4 = 0x80315C94; // type:func +rings_80323720 = 0x80315F10; // type:func +rings_80323864 = 0x80316054; // type:func +rings_8032390C = 0x803160FC; // type:func +ringsLoad = 0x803161A4; // type:func +rings_80323DCC = 0x803165BC; // type:func +rings_80323FFC = 0x803167EC; // type:func +rings_803243D8 = 0x80316BC8; // type:func +ringsDeinit = 0x80317224; // type:func +ringsGetCleared = 0x803172E4; // type:func +ringsGetPoints = 0x80317350; // type:func + +rocketBeltInit = 0x80317460; // type:func +rocketBeltLoadLevel = 0x803175A4; // type:func +rocketBeltEnterLeave = 0x803176B4; // type:func +func_80325100 = 0x803178F0; // type:func +rocketBeltMovementFrame = 0x80317950; // type:func +func_80325E1C = 0x8031860C; // type:func +rocketBeltLoadPilot = 0x8031876C; // type:func +func_80326E40 = 0x80319630; // type:func + +rocketBelt_80326F30 = 0x80319720; // type:func +rocketBelt_80327040 = 0x80319830; // type:func +rocketBelt_80327380 = 0x80319B70; // type:func +rocketBelt_803273C8 = 0x80319BB8; // type:func +rocketBelt_80327614 = 0x80319E04; // type:func +rocketBelt_803277E0 = 0x80319FD0; // type:func +rocketBelt_803279F0 = 0x8031A1E0; // type:func +rocketBelt_80327F30 = 0x8031A720; // type:func + +func_80328420 = 0x8031AC10; // type:func +func_80328538 = 0x8031AD28; // type:func +func_8032867C = 0x8031AE6C; // type:func +func_80328A14 = 0x8031B204; // type:func +func_80328CA0 = 0x8031B490; // type:func +func_80328D74 = 0x8031B564; // type:func +func_80328F44 = 0x8031B734; // type:func +func_80329120 = 0x8031B908; // type:func +func_803291A8 = 0x8031B990; // type:func +func_8032923C = 0x8031BA24; // type:func +func_80329628 = 0x8031BE10; // type:func +func_8032975C = 0x8031BF44; // type:func +func_8032A4A8 = 0x8031CC94; // type:func + +rbSoundInit = 0x8031CDF0; // type:func +rbSoundEventHandler = 0x8031CF50; // type:func +rbSoundEvent12_22 = 0x8031D65C; // type:func +rbSoundEvent12_18 = 0x8031D810; // type:func +rbSoundEvent19 = 0x8031D8AC; // type:func +rbSoundSubEvent = 0x8031D8C0; // type:func +rbSoundEvent13 = 0x8031DAC8; // type:func +func_8032B3D0 = 0x8031DBA0; // type:func +func_8032B508 = 0x8031DCD8; // type:func +func_8032B560 = 0x8031DD30; // type:func +levelGetTotalPoints = 0x8031E4F0; // type:func +testGetPointCount = 0x8031E5EC; // type:func +func_8032BE10 = 0x8031E5E0; // type:func +func_8032BE8C = 0x8031E65C; // type:func +func_8032C080 = 0x8031E850; // type:func +levelSetPointsToNextMedal = 0x8031E944; // type:func +func_8032C27C = 0x8031EA4C; // type:func +func_8032C3C4 = 0x8031EB94; // type:func + +func_8032C540 = 0x8031ED10; // type:func +func_8032CC44 = 0x8031F414; // type:func +func_8032CF28 = 0x8031F6E8; // type:func +func_8032D51C = 0x8031FCDC; // type:func +func_8032D90C = 0x803200CC; // type:func + +resultHandler = 0x80320520; // type:func +resultListPhoto = 0x803205E4; // type:func +resultListReplay = 0x80320644; // type:func +resultGenMenu = 0x803206D8; // type:func +resultMenuItemLookup = 0x803207D0; // type:func +resultInit = 0x80320830; // type:func +resultDeinit = 0x80320E44; // type:func +resultMenuChoose = 0x80320E64; // type:func +resultDrawTally = 0x803210EC; // type:func +resultGenTipText = 0x8032167C; // type:func + +func_8032F050 = 0x803217C0; // type:func +func_8032F188 = 0x803218F8; // type:func +func_8032F3DC = 0x80321B4C; // type:func +func_8032F47C = 0x80321BEC; // type:func + +skydivingInit = 0x80322220; // type:func +skydivingLoadLevel = 0x8032223C; // type:func +skydivingEnterLeave = 0x80322378; // type:func +func_8032FE4C = 0x803225BC; // type:func +func_8032FEAC = 0x8032261C; // type:func +func_803305D4 = 0x80322D44; // type:func +skydivingMovementFrame = 0x80323034; // type:func +skydivingLoadPilot = 0x80323334; // type:func +func_803316B0 = 0x80323E20; // type:func +skydivingLand = 0x80323F04; // type:func +func_803318D4 = 0x80324044; // type:func +skydivingGetPoints = 0x803241E8; // type:func +func_80331AE4 = 0x80324254; // type:func +skydivingBelow = 0x803242F8; // type:func +func_80331D58 = 0x803244C8; // type:func +func_80331EB8 = 0x80324628; // type:func +func_80331FE4 = 0x80324754; // type:func +func_803322CC = 0x80324A3C; // type:func +func_80332950 = 0x803250C0; // type:func +func_803329C0 = 0x80325130; // type:func + +func_80332C60 = 0x803253D0; // type:func +func_80332D94 = 0x80325504; // type:func +func_80332E90 = 0x80325600; // type:func +func_80332FCC = 0x8032573C; // type:func +func_80333384 = 0x80325AF4; // type:func +func_803335D0 = 0x80325D40; // type:func + +sdSoundInit = 0x80326010; // type:func +sdSoundCallback = 0x80326124; // type:func +sdsound_80333D80 = 0x803264E0; // type:func +sdsound_80333DDC = 0x8032653C; // type:func +sdsound_80333DF0 = 0x80326550; // type:func +sdsound_80333F68 = 0x803266C8; // type:func +sdsound_80334258 = 0x803269B8; // type:func + +shadow_803342F0 = 0x80326A50; // type:func +shadow_803342FC = 0x80326A5C; // type:func +shadowModels = 0x80326A68; // type:func +shadow_803343D8 = 0x80326B38; // type:func +shadow_80334454 = 0x80326BB4; // type:func +shadow_803344BC = 0x80326C1C; // type:func +shadow_80334578 = 0x80326CD8; // type:func +shadow_80334C70 = 0x803273D0; // type:func + +shuttle_80334CC0 = 0x80327420; // type:func +shuttle_80334CCC = 0x8032742C; // type:func +shuttle_80335130 = 0x80327890; // type:func +shuttle_80335700 = 0x80327E60; // type:func +shuttle_803358D4 = 0x80328034; // type:func +shuttleProxEventCb = 0x80328240; // type:func +shuttleProxAnimCb = 0x80328254; // type:func +shuttleInit = 0x803282F4; // type:func +shuttleLoad = 0x80328344; // type:func +shuttleDeinit = 0x803285A4; // type:func +shuttle_80335EE4 = 0x80328644; // type:func +shuttle_80335F24 = 0x80328684; // type:func +shuttleGetState = 0x803286E4; // type:func +shuttle_80335FD8 = 0x80328738; // type:func +shuttle_80336064 = 0x803287C4; // type:func +shuttleStateSave = 0x803287F4; // type:func +shuttleStateRestore = 0x80328848; // type:func + +skiLiftUpdate = 0x803288A0; // type:func +skiLiftProxEventCb = 0x803289A8; // type:func +skiLiftProxAnimCb = 0x80328A4C; // type:func +skiLiftLoad = 0x80328B40; // type:func +skiLiftDeinit = 0x80328C7C; // type:func + +smokeInit = 0x80328D00; // type:func +func_80336600 = 0x80328D60; // type:func +smokeCreate = 0x80329094; // type:func +smokeProps = 0x80329164; // type:func +smokeGetProps = 0x80329620; // type:func +smokeDeleteAll = 0x80329874; // type:func +smokeDelete = 0x803298B4; // type:func +smokePuffAdd = 0x8032996C; // type:func +smokeCreateTerra = 0x80329C88; // type:func + +func_80337D50 = 0x8032A4B0; // type:func +snapInit = 0x8032A518; // type:func +snapDeinit = 0x8032AB5C; // type:func +func_80338404 = 0x8032AB64; // type:func +func_80338614 = 0x8032AD74; // type:func +func_803386A4 = 0x8032AE04; // type:func +func_80338964 = 0x8032B0C4; // type:func +func_80338A14 = 0x8032B174; // type:func +func_80339C8C = 0x8032C3EC; // type:func +func_80339E1C = 0x8032C57C; // type:func +func_80339F9C = 0x8032C6FC; // type:func +func_8033A020 = 0x8032C780; // type:func +func_8033A078 = 0x8032C7D8; // type:func +func_8033A128 = 0x8032C848; // type:func +func_8033A244 = 0x8032C964; // type:func +func_8033A610 = 0x8032CD30; // type:func +func_8033A664 = 0x8032CD84; // type:func +func_8033A6B8 = 0x8032CDD8; // type:func +func_8033A72C = 0x8032CE4C; // type:func +func_8033ADD4 = 0x8032D4F4; // type:func +func_8033BF00 = 0x8032E954; // type:func +func_8033CBD0 = 0x8032F624; // type:func +func_8033D3EC = 0x8032FE40; // type:func +func_8033DCD0 = 0x80330724; // type:func +func_8033DDD8 = 0x8033082C; // type:func +func_8033DFD0 = 0x80330A24; // type:func +func_8033E3A8 = 0x80330DFC; // type:func +func_8033E784 = 0x803311C0; // type:func +func_8033E810 = 0x8033124C; // type:func +func_8033E860 = 0x8033129C; // type:func +func_8033F050 = 0x80331A8C; // type:func +snapGetPhotoCount = 0x80332054; // type:func +func_8033F62C = 0x80332068; // type:func + +sndInit = 0x80332080; // type:func +func_8033F6F8 = 0x80332138; // type:func +sndSetMusic = 0x80332188; // type:func +sndPlaySfxVolPitchPan = 0x80332198; // type:func +sndPlaySfx = 0x80332238; // type:func +sndMakeDev = 0x803322A0; // type:func +func_8033F8CC = 0x8033230C; // type:func +func_8033F904 = 0x80332344; // type:func +sndSetMusicState = 0x803323A4; // type:func +func_8033FA88 = 0x803324C8; // type:func +func_8033FAD4 = 0x80332514; // type:func +func_8033FB14 = 0x80332554; // type:func +sndEvent = 0x80332584; // type:func +sndGetPilotScream = 0x8033260C; // type:func +func_8033FCD0 = 0x80332710; // type:func +func_8033FD94 = 0x803327D4; // type:func + +snowCreate = 0x80332880; // type:func +snowDraw = 0x80332970; // type:func +snowUpdate = 0x803329F4; // type:func +snowEnable = 0x80333000; // type:func +snowDisable = 0x80333024; // type:func + +spathCreate = 0x80333050; // type:func +spathLoadFile = 0x803330A8; // type:func +spathFree = 0x80333240; // type:func +spathScaleUpdate = 0x803332A8; // type:func +spathUpdate = 0x803335B4; // type:func +spath_80340CB8 = 0x803336F8; // type:func +spath_80340E7C = 0x803338BC; // type:func +spathInterpolate = 0x80333A2C; // type:func + +splashDrawRipple = 0x80333EA0; // type:func +splashDraw = 0x80334008; // type:func +splashAddRipple = 0x8033414C; // type:func +splashAdd = 0x8033420C; // type:func +splashUpdate = 0x803343B4; // type:func +splashInit = 0x803346F0; // type:func +splashClear = 0x80334870; // type:func + +textLoadBlock = 0x80334950; // type:func +textGetDataByName = 0x80334B2C; // type:func +textGetDataByIdx = 0x80334BD0; // type:func +textFmtInt = 0x80334C04; // type:func +textFmtIntAt = 0x80334E28; // type:func + +// title_screen +func_80342630 = 0x80335040; // type:func +func_803427FC = 0x8033520C; // type:func +func_80342D2C = 0x80335774; // type:func +func_80343294 = 0x80335CDC; // type:func +func_803433A4 = 0x80335DEC; // type:func +func_80343550 = 0x80335F30; // type:func +introSceneRunner = 0x80336338; // type:func +func_80343B5C = 0x803364E8; // type:func +func_80343C44 = 0x803365D0; // type:func +func_80343E84 = 0x80336810; // type:func +func_8034411C = 0x80336AA8; // type:func +func_80344258 = 0x80336BE4; // type:func + +targetsInit = 0x80336C10; // type:func +targetsLoad = 0x80336C78; // type:func +targetsFrameUpdate = 0x80336E8C; // type:func +targetsDeinit = 0x80336FFC; // type:func +targets_8034473C = 0x803370BC; // type:func +targets_803448F4 = 0x80337274; // type:func +targets_80344948 = 0x803372C8; // type:func + +taskInit = 0x80337330; // type:func +taskIsValidIndex = 0x80337650; // type:func +strToUpper = 0x803376C0; // type:func +taskLoadNames = 0x8033778C; // type:func +taskGetTestCount = 0x80337870; // type:func +taskInitTest = 0x80337948; // type:func +taskLoad = 0x80337C0C; // type:func +taskDeinitLevel = 0x80337CEC; // type:func +taskDeinit = 0x80337D2C; // type:func +taskFrameUpdate = 0x80337DE4; // type:func +task_803456D8 = 0x80338058; // type:func +taskUpdateState = 0x803383A4; // type:func +taskGetTHER = 0x8033842C; // type:func +taskGetLWIN = 0x8033844C; // type:func +taskGet_80345AEC = 0x8033846C; // type:func +taskGetTPAD = 0x8033847C; // type:func +taskGetCNTG = 0x8033849C; // type:func +taskGetOBSV = 0x803384BC; // type:func +taskGetLPAD = 0x803384DC; // type:func +taskGetLSTP = 0x803384FC; // type:func +taskGetRNGS = 0x8033851C; // type:func +taskGetBALS = 0x8033853C; // type:func +taskGetTARG = 0x8033855C; // type:func +taskGetHPAD = 0x8033857C; // type:func +taskGetBTGT = 0x8033859C; // type:func +taskGetPHTS = 0x803385BC; // type:func +taskGetFALC = 0x803385DC; // type:func +taskGet_80345C80 = 0x80338600; // type:func +taskGet_80345C90 = 0x80338610; // type:func +taskGet_80345CA0 = 0x80338620; // type:func +taskGet_80345CB0 = 0x80338630; // type:func +taskGet_80345CC0 = 0x80338640; // type:func +taskLoadCommObj = 0x80338664; // type:func +taskBirdmanPad = 0x80338C54; // type:func +taskGetClsVehTest = 0x80338CBC; // type:func +taskGet_80346364 = 0x80338CE4; // type:func +task_80346370 = 0x80338CF0; // type:func +taskGet_80346468 = 0x80338DE8; // type:func +taskGetHOPD = 0x80338DF4; // type:func + +func_803464A0 = 0x80338E20; // type:func + +thermInit = 0x80338F70; // type:func +thermLoad = 0x80338FAC; // type:func +therm_8034695C = 0x803392DC; // type:func +thermDeinit = 0x80339504; // type:func +therm_80346C08 = 0x80339588; // type:func +therm_80346E04 = 0x80339784; // type:func + +totResult_80346FC0 = 0x80339940; // type:func +totResultHandler = 0x80339A6C; // type:func +totResult_80347150 = 0x80339AD0; // type:func +totResultInit = 0x80339BF0; // type:func +totResultCreateMenu = 0x80339E6C; // type:func +totResultMenuChoose = 0x80339FBC; // type:func +totResultDrawTally = 0x8033A0A0; // type:func + +toyInit = 0x8033A490; // type:func +toy_80347C2C = 0x8033A4EC; // type:func +toyAnimate = 0x8033A75C; // type:func +toyProxEventCb = 0x8033AA5C; // type:func +toyProxAnimCb = 0x8033AAD4; // type:func +toyLoad = 0x8033AB40; // type:func +toyDeinit = 0x8033AC6C; // type:func +toy_80348418 = 0x8033ACD8; // type:func + +testMenuMainRender = 0x8033AEB0; // type:func +testMenuShutterBug = 0x8033AFD0; // type:func +testMenuInitText = 0x8033B064; // type:func +testMenuInit = 0x8033B444; // type:func +testMenuHandler = 0x8033BB30; // type:func +testMenuDraw = 0x8033C4FC; // type:func +testMenu_8034A428 = 0x8033CCEC; // type:func + +userPathInit = 0x8033CD20; // type:func +userPath_8034A4F8 = 0x8033CDC8; // type:func +userPathFree = 0x8033D110; // type:func +userPath_8034A8B0 = 0x8033D180; // type:func +userPath_8034A950 = 0x8033D220; // type:func + +func_8034A9A0 = 0x8033D270; // type:func +func_8034A9E8 = 0x8033D2B8; // type:func +func_8034AA80 = 0x8033D350; // type:func +func_8034AACC = 0x8033D39C; // type:func +func_8034ABB0 = 0x8033D480; // type:func +func_8034AC34 = 0x8033D504; // type:func +func_8034AD14 = 0x8033D5E4; // type:func +func_8034AD6C = 0x8033D63C; // type:func +func_8034AF48 = 0x8033D818; // type:func +func_8034AF94 = 0x8033D864; // type:func +func_8034B210 = 0x8033DAE0; // type:func +func_8034B268 = 0x8033DB38; // type:func +func_8034B2B0 = 0x8033DB80; // type:func +func_8034B354 = 0x8033DC24; // type:func +func_8034B464 = 0x8033DD34; // type:func +func_8034B4DC = 0x8033DDAC; // type:func + +func_8034B5E0 = 0x8033DEB0; // type:func +func_8034B624 = 0x8033DEF4; // type:func +drawScreenBorder = 0x8033DF58; // type:func +func_8034B6F8 = 0x8033DFC8; // type:func + +whaleIsActive = 0x8033E0F0; // type:func +whaleUpdate = 0x8033E0FC; // type:func +whaleStateMachine = 0x8033E338; // type:func +whaleProxEventCb = 0x8033E538; // type:func +whaleProxAnimCb = 0x8033E69C; // type:func +whaleLoad = 0x8033E7AC; // type:func +whaleDeinit = 0x8033E98C; // type:func +whaleGetInterval = 0x8033EA24; // type:func +whaleGetPos = 0x8033EA3C; // type:func +whaleSetInterval = 0x8033EA9C; // type:func +whaleInit = 0x8033EAF4; // type:func +whaleStateSave = 0x8033EB2C; // type:func +whaleStateRestore = 0x8033EB68; // type:func + +whalePodUpdateWhale = 0x8033EBB0; // type:func +whalePodUpdate = 0x8033EDF0; // type:func +whalePodProxEventCb = 0x8033EF9C; // type:func +whalePodProxAnimCb = 0x8033F0C0; // type:func +whalePodInit = 0x8033F118; // type:func +whalePodLoad = 0x8033F234; // type:func +whalePodDeinit = 0x8033F450; // type:func +whalePodGetObjState = 0x8033F4E0; // type:func +whalePodSetInterval = 0x8033F594; // type:func + +windInit = 0x8033F630; // type:func +windLoad = 0x8033F638; // type:func +windDeinit = 0x8033FD7C; // type:func +wind_8034D548 = 0x8033FE18; // type:func +wind_8034D550 = 0x8033FE20; // type:func + +windObjInit = 0x80340950; // type:func +windObjLoad = 0x80340984; // type:func +windObjFrameUpdate = 0x80340B44; // type:func +windObjDeinit = 0x80340EF8; // type:func +windObjIsLoadedId = 0x80340F7C; // type:func + +// ----------------------------------------------------------------------------- +// Data Symbols +// ----------------------------------------------------------------------------- + +D_802491E0 = 0x80249090; +D_802491E4 = 0x80249094; +D_802491E8 = 0x80249098; +D_803805E0 = 0x80372FC0; + +gBallCount = 0x80349C00; +gBallSplitCount = 0x80349C01; +gBalls = 0x80349C08; // size:0x2170 + +sControlInfoVeh = 0x803414EC; // size:0x38 +D_80341584 = 0x80341584; // size:0x38 +D_8034EC10 = 0x803415BC; +D_803417C0 = 0x803417C0; +D_8034ED78 = 0x8034174C; // size:0x1C + +D_8034EE84 = 0x803418C4; // size:0x8 +D_8034EE30 = 0x80341870; // size:0x54 + +D_8034EF20 = 0x80341960; +D_8034EF24 = 0x80341964; +D_8034EF28 = 0x80341968; + +sFileMenuTextIds = 0x80341B20; +sFileMenuConfirm = 0x80341B2C; +sFileMenuCurMenu = 0x80341B34; + +sFountainObjId = 0x80341B70; +sFountainRadarId = 0x80341B74; +sFountainActive = 0x80341B78; + +D_8034F420 = 0x80341E60; // size:0x1C +D_8034F43C = 0x80341E7C; // size:0x4 +D_8034F4BC = 0x80341EFC; // size:0xA +D_8034F4C8 = 0x80341F08; // size:0x10 +D_8034F4D8 = 0x80341F18; // size:0x8 + +D_8034F7A0 = 0x803421D0; +D_8034F7A4 = 0x803421D4; +D_8034F7B0 = 0x803421E0; +D_8034F7B8 = 0x803421E8; +D_8034F7BC = 0x803421EC; +D_8034F7C0 = 0x803421F0; +D_8034F850 = 0x80342280; +D_8034F854 = 0x80342284; + +gMedalPointRequirements = 0x80342604; // size:0x30 + +gCurrentMusicId = 0x80342FE0; + +D_803507A0 = 0x803431D0; + +D_803593F0 = 0x8034BDE0; // size:0x108 +D_803594F8 = 0x8034BEE8; // size:0x144 +D_8035963C = 0x8034C02C; + +D_80359AA8 = 0x8034C498; // size:4 +D_80359AAC = 0x8034C49C; // size:4 + +sControlInfoCount = 0x8034C680; + +D_80359DB4 = 0x8034C7A4; + +D_8035A5F0 = 0x8034CFE0; + +sSaveFiles = 0x80354AD0; // size:0x200 +sSaveFilesMirror = 0x80354CD0; // size:0x200 + +sFileMenu_803624E0 = 0x80354ED0; +sFileMenu_803624E3 = 0x80354ED3; +sFileColorR1 = 0x80354ED4; +sFileColorR2 = 0x80354ED8; +sFileColorG1 = 0x80354EDC; +sFileColorG2 = 0x80354EE0; +sFileColorB1 = 0x80354EE4; +sFileColorB2 = 0x80354EE8; + +sFountainPose = 0x80355020; +sFountainProxId = 0x80355060; +sFountainState = 0x80355064; +sFountainScale = 0x80355068; +sFountainScaleCopy = 0x8035506C; +sFountainStateCopy = 0x80355070; + +D_80362690 = 0x80355080; + +D_80364210 = 0x80356C00; // size:0x34E0 + +D_803692C0 = 0x8035BCB0; // size:0x54 +D_803694D0 = 0x8035BEC0; // size:0x54 +D_8036957E = 0x8035BF6E; + +gHoverPads = 0x8035BF78; // size:0x8C + +gFcnDrawMenuItem = 0x8035E7F8; + +gRings = 0x80360468; // size:0x35E8 + +sMissileTargets = 0x8036B6E8; // size:0xBE0 + +gThermReady = 0x8036D6C8; + +sMapDobjId = 0x80342220; +sMapObjectCount = 0x80342224; +sMapMessageCount = 0x80342228; +D_8034F7FC = 0x8034222C; +D_8034F800 = 0x80342230; +D_8034F804 = 0x80342234; +D_8034F808 = 0x80342238; +D_8034F80C = 0x8034223C; +D_8034F810 = 0x80342240; +D_8034F814 = 0x80342244; +D_8034F818 = 0x80342248; +D_8034F81C = 0x8034224C; +D_8034F820 = 0x80342250; +D_8034F824 = 0x80342254; +D_8034F828 = 0x80342258; +D_8034F82C = 0x8034225C; +D_8034F830 = 0x80342260; +D_8034F834 = 0x80342264; +D_8034F838 = 0x80342268; +sMapHudFlagsSave = 0x8034226C; + +D_8036A8C0 = 0x8035D2B0; +D_8036A8C4 = 0x8035D2B4; +D_8036A8C8 = 0x8035D2B8; +D_8036A8C9 = 0x8035D2B9; +D_8036A8CA = 0x8035D2BA; +D_8036A8CC = 0x8035D2BC; // size:3 +D_8036A8D0 = 0x8035D2C0; // size:4 +D_8036A8D4 = 0x8035D2C4; // size:4 +D_8036A8D8 = 0x8035D2C8; // size:4 + +sMapEmitterDev0 = 0x8035D2D0; +sMapEmitterDev1 = 0x8035D2D1; +sMapObjects = 0x8035D2D8; +sMapMessages = 0x8035D350; +sMapGlobalScale = 0x8035D440; + +sMenuItemCount = 0x8035E7E0; +sMenuFont = 0x8035E7E4; +sMenuScaleX = 0x8035E7E8; +sMenuScaleY = 0x8035E7EC; +sMenuPosX = 0x8035E7F0; +sMenuPosY = 0x8035E7F4; +sMenuUtilItems = 0x8035E7FC; +sMenuCurSelect = 0x8035E800; +sMenuPrevSelect = 0x8035E804; +sMenuAdj = 0x8035E808; +sMenuStickCenter = 0x8035E80C; +sMenuButtonMode = 0x8035E810; +sMenuFontSelR = 0x8035E811; +sMenuFontSelG = 0x8035E812; +sMenuFontSelB = 0x8035E813; +sMenuFontR = 0x8035E814; +sMenuFontG = 0x8035E815; +sMenuFontB = 0x8035E816; +sMenuGfxR = 0x8035E817; +sMenuGfxG = 0x8035E818; +sMenuGfxB = 0x8035E819; +sMenuSoundFlags = 0x8035E81A; + +gLandingPadCount = 0x8035ECA9; +gLandingStripCount = 0x8035ECAA; +gLandingPads = 0x8035ECD8; // size:0x150 +gLandingStrips = 0x8035EE28; // size:0x78 + +D_8034F910 = 0x80342340; +D_8034F914 = 0x80342344; + +sPtsTallyStr = 0x803429DC; +sReplayTipSet = 0x803429EC; +sVehTipIsInit = 0x803429F0; + +D_80350510 = 0x80342F40; // size:0x18 +D_80350528 = 0x80342F58; +D_8035052C = 0x80342F5C; +D_80350534 = 0x80342F64; +D_80350538 = 0x80342F68; +D_8035053C = 0x80342F6C; +D_80350540 = 0x80342F70; +D_80350544 = 0x80342F74; +D_80350548 = 0x80342F78; +D_8035054C = 0x80342F7C; +D_80350550 = 0x80342F80; +D_80350594 = 0x80342FC4; + +D_80350690 = 0x803430C0; +D_80350694 = 0x803430C4; +sMainMenuItems = 0x803430C8; + +D_8035078C = 0x803431BC; + +sStageMedalName = 0x80343310; // size:0x50 +sBonusMedalName = 0x80343360; // size:0x14 +sTestPtsStr = 0x80343388; // size:0x10 +D_80343398 = 0x80343398; + +D_80350970 = 0x803433A0; +sTestMenuState = 0x803433A4; +sMenuCurX = 0x803433A8; +sMenuCurY = 0x803433AC; +D_80350980 = 0x803433B0; +D_80350984 = 0x803433B4; +sClassShortNames = 0x803433B8; // size:0x10 +gVehShortNames = 0x803433C8; // size:0x1C +sCurTestIdx = 0x803433E4; +D_803509B8 = 0x803433E8; + +sRadarThermCirc = 0x8035EF10; // size:0x88 +sHudState = 0x8035EF98; // size:0xC7C +D_8036D224 = 0x8035FC14; + +D_80371630 = 0x80364020; // size:0x108 +D_80371738 = 0x80364128; // size:0x144 +D_8037187C = 0x8036426C; +D_80371880 = 0x80364270; + +sRbSound_80371898 = 0x80364288; // size:0x54 + +sScreenFadeDuration = 0x8036431C; +sReplayTipText = 0x80364320; +sTipTextMissing = 0x80364324; +sTipTextId = 0x80364328; +sPtsDeductedStr = 0x80364330; +sTotalPointsStr = 0x80364340; + +D_80373060 = 0x80365A50; // size:0x2A0 +D_80373300 = 0x80365CF0; // size:0x90 +D_80373390 = 0x80365D80; // size:0x2A0 +D_80373630 = 0x80366020; // size:0x2A0 +D_803738D0 = 0x803662C0; // size:0x2A0 +D_80373B70 = 0x80366560; // size:0x2A0 +D_80373E10 = 0x80366800; +D_80373E14 = 0x80366804; +D_80373E18 = 0x80366808; +D_80373E1C = 0x8036680C; + +sTextName = 0x8036A900; // size:0x6E0 +sTextData = 0x8036AFE0; // size:0x6DC +sTextDataCount = 0x8036B6BC; +sTextNameCount = 0x8036B6C0; + +D_80378CE0 = 0x8036B6D0; +D_80378CE4 = 0x8036B6D4; + +gThermalCount = 0x8036D544; +gThermals = 0x8036D548; // size:0x180 + +sTestPtsStr0 = 0x8036D6D0; +sTestPtsStr1 = 0x8036D6E0; +sTestPtsStr2 = 0x8036D6F0; +sTestPtsStr3 = 0x8036D700; +sMedalName = 0x8036D70C; +sUnused_8037AD20 = 0x8036D710; +sTotalPtsStr = 0x8036D718; +D_8037AD38 = 0x8036D728; +D_8037AD42 = 0x8036D732; +sMedalNameCopy = 0x8036D738; + +sToyCount = 0x8036D750; +sToys = 0x8036D758; // size:0x2EE0 + +sSelMenuScreenX = 0x80370640; +sSelMenuScreenY = 0x80370644; +sStickDirX = 0x80370648; +sStickDirY = 0x8037064C; +sStickIsHeld = 0x80370650; +sMenuMinY = 0x80370654; +sMenuMinX = 0x80370658; +sMenuMaxY = 0x8037065C; +sMenuMaxX = 0x80370660; +D_8037DC84 = 0x80370664; +sDrawTestPts = 0x8037067B; diff --git a/config/jp/sym/symbol_addrs_kernel.txt b/config/jp/sym/symbol_addrs_kernel.txt new file mode 100644 index 00000000..8317510a --- /dev/null +++ b/config/jp/sym/symbol_addrs_kernel.txt @@ -0,0 +1,565 @@ +// Visit https://github.com/ethteck/splat/wiki/Adding-Symbols for documentation about this file + +// ----------------------------------------------------------------------------- +// Function Symbols +// ----------------------------------------------------------------------------- + +entrypoint = 0x80200050; // type:func use_non_matching_label:False +bootproc = 0x8022E30C; // type:func + +// Thread_Audio = 0x80203DD0; // type:func +Thread_Render = 0x8022E740; // type:func +Thread_App = 0x8022E7F0; // type:func +Thread_Kernel = 0x8022E850; // type:func + +uvWaitForMesg = 0x8022E20C; // type:func + +func_80200308 = 0x80200308; // type:func +uvJanimLoad = 0x80200350; // type:func +uvJanim_80200638 = 0x80200638; // type:func +uvJanim_802006FC = 0x802006FC; // type:func +uvJanim_80200B00 = 0x80200B00; // type:func +uvJanim_80200EC0 = 0x80200EC0; // type:func +uvJanimPoseLine = 0x80200B38; // type:func +uvJanimPoseGrid = 0x80200F00; // type:func + +uvEmitterPrintf = 0x80201180; // type:func +uvEmitterInitTable = 0x8020119C; // type:func +uvEmitterInit = 0x802011F0; // type:func +uvEmitterLookup = 0x802012B8; // type:func +uvEmitterFromModel = 0x80201348; // type:func +uvEmitterSetMatrix = 0x802013F8; // type:func +uvEmitterGetMatrix = 0x80201444; // type:func +uvEmitter_80201494 = 0x80201494; // type:func +uvEmitterSetVol = 0x802015D8; // type:func +uvEmitterGetVol = 0x80201614; // type:func +uvEmitterSetPan = 0x8020165C; // type:func +uvEmitterSetPitch = 0x80201698; // type:func +uvEmitterSetPri = 0x802016D4; // type:func +uvEmitterProps = 0x8020170C; // type:func +uvEmitterTrigger = 0x80201904; // type:func +uvEmitterRelease = 0x80201968; // type:func +uvEmitterStatus = 0x80201A0C; // type:func +_uvaSoundBegin = 0x80201B0C; // type:func +_uvaSoundEnd = 0x80201B7C; // type:func +uvEmitterFlush = 0x80201BA8; // type:func +uvEmitter_80201D08 = 0x80201D08; // type:func +_uvaUpdatePlayList = 0x802021D4; // type:func +_uvaPlaylistRemove = 0x80202678; // type:func +_uvaPlay = 0x80202728; // type:func +_uvaStartVoice = 0x80202998; // type:func +_uvaUpdateVoice = 0x80202AFC; // type:func +_uvaStopVoice = 0x80202BB8; // type:func +_uvaStatus = 0x80202C5C; // type:func + +uvaManager_80204518 = 0x80204518; // type:func + +uvChan_80204A8C = 0x80204A8C; // type:func +uvChan_80204AB0 = 0x80204AB0; // type:func +uvChan_80204B34 = 0x80204B34; // type:func +uvChan_80204BD4 = 0x80204BD4; // type:func +uvChan_80204C94 = 0x80204C94; // type:func +uvChan_80204D94 = 0x80204D94; // type:func +uvChan_80204EC0 = 0x80204EC0; // type:func +uvChan_80204FC4 = 0x80204FC4; // type:func +uvChan_80205724 = 0x80205724; // type:func + +uvaSeqNew = 0x802046E0; // type:func +uvaSeqPlay = 0x802047A8; // type:func +uvaSeqSetTempo = 0x802047E8; // type:func +uvaSeqSetVol = 0x80204840; // type:func +uvaSeqStop = 0x8020489C; // type:func +uvChanEnv = 0x80204DEC; // type:func +uvChanTerra = 0x80204E5C; // type:func +_uvSortAdd = 0x80205814; // type:func + +uvClkInit = 0x80205FD0; // type:func +uvClkUpdate = 0x80205FFC; // type:func +uvClkGetSec = 0x80206058; // type:func +uvClkReset = 0x80206150; // type:func + +_uvDbSortHits = 0x802071CC; // type:func +uvTerraGetBox = 0x8020FA08; // type:func +uvModelGetPosm = 0x8020FA54; // type:func +uvModelGetProps = 0x8020FB2C; // type:func +uvTerraGetPt = 0x8020FCEC; // type:func +uvTerraGetSeg = 0x8020FF68; // type:func +uvTerraGetColor = 0x80210B70; // type:func +uvTerraGetState = 0x80210E04; // type:func +uvTerraGetPlane = 0x80210F18; // type:func +_uvSurfGetNorm = 0x8021119C; // type:func +uvSobjGetPt = 0x8021133C; // type:func +uvSobjGetSeg = 0x80211544; // type:func +_uvSegInMboxs = 0x80214F54; // type:func +uvDbColorModel = 0x80216750; // type:func + +uvDobjModel = 0x802167F0; // type:func +uvDobjProps = 0x80216C1C; // type:func +uvDobjPosm = 0x80216E08; // type:func +uvDobjGetPosm = 0x80216FD8; // type:func +uvDobjState = 0x8021711C; // type:func +uvDobjSetState = 0x80217268; // type:func +uvDobjClearState = 0x802172C0; // type:func +uvDobjAllocIdx = 0x8021731C; // type:func +uvDobjInit = 0x80217398; // type:func +_uvDobjsDraw = 0x8021744C; // type:func +uvDobj_8021771C = 0x8021771C; // type:func +// uvDobj_80217AB4 = 0x80217AB4; // type:func +uvDobj_80217B34 = 0x80217B34; // type:func +uvDobj_80217B4C = 0x80217B4C; // type:func +uvDobj_80217E24 = 0x80217E24; // type:func +uvDobj_802180DC = 0x802180DC; // type:func + +uvEnvProps = 0x802181C0; // type:func +uvEnvGetProps = 0x80218470; // type:func +uvEnvFunc = 0x80218688; // type:func +_uvEnvDraw = 0x8021872C; // type:func + +uvSeqModel = 0x80218D00; // type:func +uvSeqProps = 0x80218DB8; // type:func +uvSeqFindFree = 0x80218F88; // type:func + +uvParseTopUVFT = 0x80219270; // type:func +uvFontSet = 0x802194D8; // type:func +uvFontScale = 0x80219550; // type:func +uvFontColor = 0x8021956C; // type:func +// uvFontStrLen = 0x802195A0; // type:func +// uvFontStr16WidthFont = 0x802195DC; // type:func +uvFontStr16Width = 0x802196B0; // type:func +// uvFontStrWidth = 0x802196EC; // type:func +uvFontWidth = 0x802197EC; // type:func +uvFontHeight = 0x80219828; // type:func +uvFontPrintStr16 = 0x80219874; // type:func +uvFontPrintStr = 0x80219A1C; // type:func +// uvFontSpriteWidth = 0x80219CC0; // type:func +// uvFontMsgGenDlist = 0x80219DA4; // type:func +uvFontGenDlist = 0x80219E18; // type:func + +uvFxProps = 0x8021A4C0; // type:func +uvFxGetProps = 0x8021B4AC; // type:func +uvModelGet = 0x8021B950; // type:func +_uvFxDraw = 0x8021EC98; // type:func +uvFx_8021EFF0 = 0x8021EF70; // type:func +uvFx_8021A4D8 = 0x8021A458; // type:func +uvFx_8021A304 = 0x8021A284; // type:func + +uvVtxInit = 0x8021F080; // type:func +uvVtx = 0x8021F1E4; // type:func +uvVtxReset = 0x8021F28C; // type:func +uvVtxBeginPoly = 0x8021F2E8; // type:func +uvBeginGrid = 0x8021F2FC; // type:func +uvBeginTmesh = 0x8021F310; // type:func +uvEndTmesh = 0x8021F324; // type:func +uvEndGridWide = 0x8021F4EC; // type:func +uvEndGrid = 0x8021F8EC; // type:func +uvVtxRect = 0x802204AC; // type:func +uvVtxEndPoly = 0x80220640; // type:func + +uvGfxInit = 0x802208E0; // type:func +uvGfxBegin = 0x80220B08; // type:func +uvGfxSetFogFactor = 0x80220C20; // type:func +uvGfxResetState = 0x80220D8C; // type:func +uvGfxMtxView = 0x80220EAC; // type:func +uvGfxMtxProj = 0x80220F78; // type:func +uvGfxDisplayList = 0x80221044; // type:func +uvGfxStateDrawDL = 0x80221068; // type:func +uvGfxStateDraw = 0x80221318; // type:func +uvGfxPushMtxUnk = 0x802219A4; // type:func +uvGfxClampLook = 0x80221A60; // type:func +uvGfxLookAt = 0x80221EB8; // type:func +uvGfxMtxProjPushF = 0x8022202C; // type:func +uvGfxSetCallback = 0x8022209C; // type:func +uvGfxEnd = 0x802220A8; // type:func +uvGfxClearScreen = 0x8022281C; // type:func +uvGfx_80222A98 = 0x802229C4; // type:func +uvGfxEnableZBuffer = 0x80222BC0; // type:func +uvGfxEnableCull = 0x80222CA4; // type:func +uvGfxEnableLighting = 0x80222DBC; // type:func +uvGfxClipRect = 0x80222E14; // type:func +uvGfxClipViewport = 0x80222FC0; // type:func +uvGfxSetViewport = 0x80222FF8; // type:func +uvGfxViewport = 0x80223040; // type:func +uvGfxMstackPushF = 0x80223168; // type:func +uvGfxMstackPushL = 0x80223208; // type:func +uvGfxMstackTop = 0x802232F0; // type:func +uvGfxSetFrameTime = 0x80223334; // type:func +uvGfxGetFrameTime = 0x80223340; // type:func +uvGfxMtxViewLoad = 0x80223388; // type:func +uvGfxMtxViewMul = 0x80223420; // type:func +uvGfx_802235A4 = 0x802234D0; // type:func +uvGfxMtxViewPop = 0x802235D4; // type:func +uvGfx_802236CC = 0x802235F8; // type:func +uvGfxGetCnt = 0x8022372C; // type:func +uvGfxStatePush = 0x80223818; // type:func +uvGfxStatePop = 0x80223878; // type:func +uvGfxSetFlags = 0x802238E0; // type:func +uvGfxClearFlags = 0x80223918; // type:func +uvGfxBindTexture = 0x80223954; // type:func +uvGfxTextureDL = 0x80223990; // type:func +uvGfxWaitForMesg = 0x80223AAC; // type:func +uvGfxEnableGamma = 0x80223AE4; // type:func +uvGfxSetUnkState0 = 0x80223B20; // type:func +uvGfx_80223C00 = 0x80223B2C; // type:func +uvCopyFrameBuf = 0x80223D18; // type:func + +uvFileReadHeader = 0x80223DB0; // type:func +uvFile_80223F30 = 0x80223E60; // type:func +uvFileGetCurLength = 0x80223E84; // type:func +uvFileGetCurTag = 0x80223E98; // type:func +uvFileReadBlock = 0x80223EAC; // type:func +uvFile_80224170 = 0x802240A0; // type:func +uvFile_8022427C = 0x802241AC; // type:func + +uvEventPost = 0x80203088; // type:func +uvEventRemoveCb = 0x80203210; // type:func +uvEventMaxCb = 0x80202F18; // type:func + +_uvScDoneGfx = 0x8022B250; // type:func +_uvScDoneAud = 0x8022B348; // type:func +_uvScRunAud = 0x8022B3E4; // type:func +_uvScRunGfx = 0x8022B468; // type:func +_uvScDlistRecover = 0x8022B58C; // type:func +_uvScCreateScheduler= 0x8022B6CC; // type:func +_uvScAddClient = 0x8022B7D8; // type:func +_uvScGetCmdQ = 0x8022B7EC; // type:func +_uvScMain = 0x8022B7F4; // type:func +_uvScHandleRetrace = 0x8022B8F8; // type:func +_uvScHandleRSP = 0x8022BC18; // type:func +_uvScHandleRDP = 0x8022BD5C; // type:func +_uvScHandleNMI = 0x8022BDBC; // type:func +_uvScLogCpuEvent = 0x8022BDF4; // type:func +_uvScLogIntoRing = 0x8022C198; // type:func + +uvSobjsDraw = 0x8022C410; // type:func +// uvSobj_8022C7B8 = 0x8022C7B8; // type:func +uvSobj_8022C8D0 = 0x8022C800; // type:func +uvSobj_8022CC28 = 0x8022CB58; // type:func +uvSobjLoadTerra = 0x8022CE28; // type:func +uvSobjPosm = 0x8022CEF4; // type:func +uvSobj_8022D168 = 0x8022D098; // type:func +uvSobj_8022D1E4 = 0x8022D114; // type:func +uvSobjModel = 0x8022D148; // type:func + +uvStrchr = 0x8022D1E0; // type:func +uvStrlen = 0x8022D230; // type:func +uvStrcmp = 0x8022D268; // type:func +strFormatInt = 0x8022D404; // type:func +strFormatFloat = 0x8022D740; // type:func +strDigitToChar = 0x8022D970; // type:func +strCharToDigit = 0x8022D99C; // type:func +uvSprintf = 0x8022D9CC; // type:func +uvAtoi = 0x8022DD94; // type:func + +uvMemInitBlocks = 0x8022A2F0; // type:func +uvMemScanBlocks = 0x8022A424; // type:func +_uvJumpHeap = 0x8022A5A4; // type:func +_uvMediaCopy = 0x8022A690; // type:func +uvMemRead = 0x8022A810; // type:func +uvMemSet = 0x8022A9B0; // type:func +uvMemCmp = 0x8022A9E4; // type:func +_uvMemOverAlloc = 0x8022AA3C; // type:func +_uvMemAlloc = 0x8022AB78; // type:func +_uvMemFreeScratch = 0x8022AC88; // type:func +_uvMemGetScratch = 0x8022ACF4; // type:func +_uvMemGetBlocks = 0x8022ADA0; // type:func +uvLevelInit = 0x8022AE34; // type:func +_uvMemAllocAlign8 = 0x8022AFA8; // type:func + +uvContMesgInit = 0x8022E950; // type:func +uvControllerInit = 0x802241D0; // type:func +uvControllerCheckInserted = 0x8022438C; // type:func +uvIOUpdate = 0x802243B8; // type:func +uvControllerGetStick = 0x802244BC; // type:func +uvControllerButtonCheck = 0x802244E0; // type:func +uvControllerGetButton = 0x80224518; // type:func +uvControllerButtonPress = 0x80224534; // type:func +uvControllerButtonRelease = 0x80224580; // type:func + +uvMemInitBlockHdr = 0x802245D0; // type:func +uvConsumeBytes = 0x802252C4; // type:func +uvMemLoadDS = 0x802249C0; // type:func +uvMemLoadPal = 0x80224BAC; // type:func +uvLevelAppend = 0x80224C10; // type:func +_uvExpandTexture = 0x802264E8; // type:func +_uvExpandTextureImg = 0x80226984; // type:func +_uvExpandTextureCpy = 0x80226A50; // type:func +_uvParseUVMD = 0x802255E8; // type:func +_uvParseUVLT = 0x802253A0; // type:func +_uvParseUVEN = 0x802253E0; // type:func +_uvParseUVSQ = 0x802254D0; // type:func +_uvParseUVCT = 0x80225EEC; // type:func +_uvParseUVTP = 0x80226F00; // type:func +_uvParseUVTR = 0x80226FEC; // type:func +_uvParseUVBT = 0x80227190; // type:func +uvParseTopUVCT = 0x80227734; // type:func +uvParseTopUVEN = 0x802277F0; // type:func +uvParseTopUVLV = 0x80227868; // type:func +uvParseTopUVTP = 0x802278E0; // type:func +uvParseTopUVLT = 0x80227958; // type:func +uvParseTopUVMD = 0x802279D0; // type:func +uvParseTopUVTR = 0x80227A8C; // type:func +uvParseTopUVTX = 0x80227B04; // type:func +uvParseTopUVTI = 0x80227BB4; // type:func +uvParseTopUVBT = 0x80227C64; // type:func +uvParseTopUVSQ = 0x80227D14; // type:func + +_uvDbMstackReset = 0x80227E60; // type:func +_uvDbMstackTop = 0x80227E70; // type:func +_uvDbMstackPush = 0x80227E8C; // type:func +_uvDbMstackPop = 0x80227F14; // type:func + +uvFileWrite = 0x8022DE20; // type:func +uvFileRead = 0x8022DF18; // type:func +uvSysInit = 0x8022E010; // type:func +uvSysUnknownStub = 0x8022E204; // type:func +uvSetVideoMode = 0x8022E29C; // type:func +uvReadController = 0x8022EA08; // type:func +_uvDMA = 0x8022EC00; // type:func +_uvDebugPrintf = 0x8022EBE4; // type:func +_uvAssertMsg = 0x8022ED2C; // type:func + +_uvTerraDraw = 0x8022EF34; // type:func +uvComputeLineEndP = 0x8022F6B8; // type:func + +func_802300F0 = 0x8022FFC0; // type:func + +uvSprt_80230130 = 0x80230000; // type:func +uvSprt_802301A4 = 0x80230074; // type:func +_uvTxtDraw = 0x802301EC; // type:func +uvSprtFromBitmap = 0x80230538; // type:func +uvSprt_80230750 = 0x80230620; // type:func +uvSprtFindFree = 0x80230768; // type:func +uvSprtInit = 0x80230824; // type:func +uvSprtDisplayList = 0x80230A68; // type:func +uvSprtDrawAll = 0x80230C00; // type:func +uvSprtDraw = 0x80230CA4; // type:func +uvSprtSetBlit = 0x80230D38; // type:func +uvSprtGetWidth = 0x80230FF0; // type:func +uvSprtGetHeight = 0x8023100C; // type:func +uvSprtProps = 0x80231028; // type:func +uvSprtUpdateUnk = 0x80231320; // type:func +uvSprtResetUnk = 0x80231388; // type:func + +uvUserFileRead = 0x802313A0; // type:func + +uvRandSeed = 0x802314B0; // type:func +uvRandF_RANLUX = 0x802314BC; // type:func +uvRandF_LCG = 0x80231610; // type:func +uvAbs = 0x80231668; // type:func +uvVec3Len = 0x80231680; // type:func +uvVec2Dot = 0x802316C0; // type:func +uvVec3Dot = 0x802316E4; // type:func +uvVec3Copy = 0x80231714; // type:func +uvVec3ScalarProj = 0x80231730; // type:func +uvVec3Cross = 0x80231778; // type:func +uvVec3Add = 0x802317D0; // type:func +uvVec3Mul = 0x80231804; // type:func +uvVec3Normal = 0x80231830; // type:func + +// func_80231A10 = 0x80231A10; // type:func use_non_matching_label:False +// func_80231A1C = 0x80231A1C; // type:func use_non_matching_label:False +mio0_decompress = 0x802318F0; // type:func use_non_matching_label:False + +uvDbg_80231AC0 = 0x80231990; // type:func +uvDbg_80231C10 = 0x80231AE0; // type:func +uvDbg_80231C9C = 0x80231B6C; // type:func +uvDbg_80231F04 = 0x80231DD4; // type:func +uvDbg_8023217C = 0x8023204C; // type:func +uvDbg_802323A8 = 0x80232278; // type:func +uvDbg_80232554 = 0x80232424; // type:func +uvDbg_80232738 = 0x80232608; // type:func +uvDbg_8023286C = 0x8023273C; // type:func +uvDbg_80232EBC = 0x80232D8C; // type:func +uvDbg_80232ECC = 0x80232D9C; // type:func +uvDbg_80233310 = 0x802331E0; // type:func +uvDbg_802333AC = 0x8023327C; // type:func +uvDbg_8023345C = 0x8023332C; // type:func +uvDbgCnt = 0x802333B4; // type:func +uvDbg_80233590 = 0x80233460; // type:func +uvDbg_80233810 = 0x802336E0; // type:func +uvDbg_80233878 = 0x80233748; // type:func +uvDbg_802338A8 = 0x80233778; // type:func +uvDbg_802339B0 = 0x80233880; // type:func +uvDbg_80233A40 = 0x80233910; // type:func +uvDbg_80233D04 = 0x80233BD4; // type:func +uvDbg_80233DB8 = 0x80233C88; // type:func +uvDbg_80233FC8 = 0x80233E98; // type:func + +// uvPathPoseLine = 0x8031EAD0; // type:func + +uvMat4Copy = 0x80227F58; // type:func +uvMat4CopyXYZ = 0x80227FDC; // type:func +uvMat4CopyL = 0x80228028; // type:func +uvMat4CopyL2F = 0x802280B0; // type:func +uvMat4CopyF2L = 0x80228370; // type:func +uvMat4SetIdentity = 0x80228884; // type:func +uvMat4SetIdentityL = 0x802288D4; // type:func +uvMat4Mul = 0x80228920; // type:func +uvMat4MulBA = 0x80228D60; // type:func +uvMat4RotateAxis = 0x802291A0; // type:func +uvMat4LocalTranslate = 0x80229588; // type:func +uvMat4Scale = 0x802296C8; // type:func +uvMat4InvertTranslationRotation = 0x802297A8; // type:func +uvMat4LocalToWorld = 0x80229934; // type:func +uvMat4UnkOp6 = 0x802299D0; // type:func +uvMat4SetFrustrum = 0x80229B40; // type:func +uvMat4SetOrtho = 0x80229C04; // type:func +uvMat4SetQuaternionRotation = 0x80229CA8; // type:func + +uvSqrtF = 0x80229DD0; // type:func +uvSinF = 0x80229DF0; // type:func +uvCosF = 0x80229FB0; // type:func +uvLength2D = 0x8022A138; // type:func +uvLength3D = 0x8022A16C; // type:func +uvAtan2F = 0x8022A1AC; // type:func + +// ----------------------------------------------------------------------------- +// uCode Symbols +// ----------------------------------------------------------------------------- + +rspbootTextStart = 0x802453E0; // name_end:rspbootTextEnd +gspF3DEX_fifoTextStart = 0x802454B0; // name_end:gspF3DEX_fifoTextEnd +gspFast3DTextStart = 0x802468E0; // name_end:gspFast3DTextEnd +aspMainTextStart = 0x80247D10; // name_end:aspMainTextEnd + +gspF3DEX_fifoDataStart = 0x8024FA30; // name_end:gspF3DEX_fifoDataEnd +gspFast3DDataStart = 0x80250230; // name_end:gspFast3DDataEnd +aspMainDataStart = 0x80250A30; // name_end:aspMainDataEnd + +// ----------------------------------------------------------------------------- +// Data Symbols +// ----------------------------------------------------------------------------- + +gMatrixStackIdx = 0x8024B100; +gMatrixStack = 0x802AA530; + +gRandLcgState = 0x8024B170; +gRanluxState1 = 0x8024B174; +gRanluxState2 = 0x8024B178; + +gKernelThread = 0x802B5A48; +gKernelThreadStack = 0x802ADFE0; + +gRenderThread = 0x802B5898; +gRenderThreadStack = 0x802ABFE0; + +gAppThread = 0x802B56E8; +gAppThreadStack = 0x802AFFE0; + +gNmiAsserted = 0x802ABFD0; + +gPiMgrCmdQ = 0x802B5690; +gPiMgrCmdBuf = 0x802B5670; + +gPiDmaQ = 0x802B5610; +gPiDmaBuf = 0x802B560C; +gPiDmaBlockReq = 0x802B55F8; + +gSiContQ = 0x802B5638; +gSiContBuf = 0x802B5628; +gSiContStatus = 0x802B56A8; +gSiContPattern = 0x802B56E4; + +gSchedInst = 0x802B5BF8; +gSchedStack = 0x802B5EF8; +gSchedRspStatus = 0x802ABFB9; +gSchedRdpStatus = 0x802ABFBA; +gSchedRingIdx = 0x802ABFC8; +// gSchedMsgQ = 0x802C38E8; + +D_8028B400 = 0x8027D750; // size:0x5280 +gGeomVertexData = 0x802829D0; +gGeomVertexToggle = 0x80288DD4; +gGeomVertexCount = 0x80288DD6; +gGeomVertexPtrs = 0x80288DD0; +gGeomFirstTmesh = 0x80288DD8; +gGeomFirstPoly = 0x80288DDA; +gGeomFirstGrid = 0x80288DDC; + +gGfxUnkPtrs = 0x80248C80; +sFontColorR = 0x80248D14; +sFontColorG = 0x80248D18; +sFontColorB = 0x80248D1C; +sFontColorA = 0x80248D20; +sFontScaleX = 0x80248D2C; +sFontScaleY = 0x80248D30; +sFontSprite = 0x80248CD0; // size:0x44 +sFontCurId = 0x80248D34; +// sFontCurWidth = 0x80248E88; +sFontMsgCount = 0x80248D3C; + +gGfxDList1 = 0x80248FF0; +gGfxDList2 = 0x80249060; +gGfxGammaEnabled = 0x8024909C; +gGfxFbCurrPtr = 0x802490A0; +gGfxZBufferEnabled = 0x802490A4; +gGfxCullFrontEnabled = 0x802490A8; +gGfxCullBackEnabled = 0x802490AC; +gGfxSyncNeeded = 0x802490B0; +gGfxBeginFlag = 0x802490B4; +gGfxFogFactor = 0x802490B8; +gGfxFbIndex = 0x802490BC; +gGfxFrameCount = 0x802490C4; +gGfxMstackIdx = 0x802490C8; +gGfxFrameTimeFixed = 0x802490CC; +// gGfxCallback = 0x80249230; +gGfxTaskOutputBufferStart = 0x8028ADF8; +gGfxTaskOutputBufferEnd = 0x8028ADFC; +gGfxDisplayListHead = 0x8028AE00; +gGfxNumVtxTransforms = 0x8028AE08; +gGfxNumTriangles = 0x8028AE10; +gGfxNumTxtLoads = 0x8028AE18; +gGfxNumMtxLoads = 0x8028AE20; +gGfxNumMtxLoadMults = 0x8028AE28; +gGfxNumLooks = 0x8028AE30; +gGfxLooks = 0x8028AE38; +gGfxStateStackData = 0x8028B5B8; +gGfxBoundTexture = 0x8028B5BC; +gGfxFbPtrs = 0x8028B5C0; +gGfxDisplayListBase = 0x8028B5D0; +gGfxViewports = 0x8029BC50; +gGfxViewX0 = 0x8029BCD0; +gGfxViewX1 = 0x8029BCD2; +gGfxViewY0 = 0x8029BCD4; +gGfxViewY1 = 0x8029BCD6; +gGfxMstack = 0x8029BCD8; +gGfxLookTransform = 0x802A6BD8; +gGfxStateStack = 0x802A6C18; +gGfxStateStackIdx = 0x802A6C98; +gGfxTaskPtr = 0x802A6C9C; +gGfxTasks = 0x802A6CA0; +gGfxYieldData = 0x802A6D50; +gGfxDramStack = 0x802AA130; + +gSeqPlayer = 0x80248B40; +gSndPlayer = 0x80248B44; +gSndEmitterTable = 0x80250D68; // size:0xB000 +gSndVoiceTable = 0x80261088; + +D_80263780 = 0x802635F0; // size:0x1900 +D_80269B80 = 0x802699F0; // size:0x12C + +gSeqStateTable = 0x80269DC0; // size:0xF0 + +sFontBitmaps = 0x80269EB0; // size:0x190 +sFontDList = 0x8026A040; // size:0x11AC0 +sFontMessages = 0x8027BB00; // size:0x8F0 + +osViModeTable = 0x8024B680; +osViModeNtscLan1 = 0x8024C350; +osViModePalLan1 = 0x8024C3A0; + +gUVBlockCounts = 0x802A7718; +gUVBlockOffsets = 0x802A7740; // size:0x1a40 + +gControllerPattern = 0x802B7F04; +gControllerInfo = 0x802A7660; + +gEepromFound = 0x802B7F00; +gControllerPads = 0x802B56C0; + +gSprtUnkIndex = 0x802B8820; +gSprtUnkTable = 0x802B8828; +gSprtTable1 = 0x802B97C8; // size:0xBA0 + +gLevelData = 0x802B3FE8; diff --git a/config/jp/sym/symbol_addrs_libultra.txt b/config/jp/sym/symbol_addrs_libultra.txt new file mode 100644 index 00000000..5b770b94 --- /dev/null +++ b/config/jp/sym/symbol_addrs_libultra.txt @@ -0,0 +1,334 @@ +// Visit https://github.com/ethteck/splat/wiki/Adding-Symbols for documentation about this file + +// ----------------------------------------------------------------------------- +// Function Symbols +// ----------------------------------------------------------------------------- + +alSndpSetSound = 0x80234370; +alSndpGetState = 0x80234390; +alSndpStop = 0x802343B0; +alSndpDeallocate = 0x80234400; +alSndpAllocate = 0x80234450; +alSndpPlay = 0x802344F0; +alSndpSetVol = 0x80234560; +alSndpSetPitch = 0x802345C0; +alSndpSetFXMix = 0x80234620; +alSndpSetPan = 0x80234680; +alHeapInit = 0x802346E0; +// _sndpVoiceHandler = 0x802348DC; +// _removeEvents = 0x80234850; +alSndpNew = 0x80234CF4; +__CSPPostNextSeqEvent = 0x80234E30; +// __setUsptFromTempo = 0x80234FD0; +// __CSPHandleMetaMsg = 0x8023500C; +// __CSPHandleMIDIMsg = 0x802351DC; +// __CSPVoiceHandler = 0x80235A0C; +alCSPNew = 0x80235EF0; +osSendMesg = 0x80236060; +alHeapDBAlloc = 0x802361B0; +// _bnkfPatchBank = 0x80236350; +alBnkfNew = 0x80236314; +alSeqFileNew = 0x80236418; +osAiSetFrequency = 0x80236460; +alUnlink = 0x802365C0; +alLink = 0x802365F0; +alClose = 0x80236614; +alInit = 0x8023664C; +osCreateMesgQueue = 0x80236680; +osCreateThread = 0x802366B0; +osStartThread = 0x80236800; +osRecvMesg = 0x80236950; +osVirtualToPhysical = 0x80236A90; +osAiSetNextBuffer = 0x80236B10; +osAiGetLength = 0x80236BC0; +_timeToSamples = 0x80236BD8; +_freePVoice = 0x80236C30; +_collectPVoices = 0x80236C68; +__freeParam = 0x80236CC8; +__allocParam = 0x80236CE0; +alAudioFrame = 0x80236D18; +alSynNew = 0x80236FA0; +osPiStartDma = 0x802372A0; +alSeqpSetBank = 0x802373B0; +alSeqpGetState = 0x802373F0; +alCSeqGetLoc = 0x80237400; +alCSeqSetLoc = 0x802374A0; +// cseq_text_0140 = 0x80237670; +// cseq_text_0204 = 0x80237734; +alCSeqNextEvent = 0x80237664; +alCSeqNew = 0x8023795C; +alCSeqNewMarker = 0x80237A70; +alCSeqGetTicks = 0x80237BDC; +alCSeqSecToTicks = 0x80237BE4; +alCSeqTicksToSec = 0x80237CE0; +__alCSeqNextDelta = 0x80237D4C; +alSeqpSetSeq = 0x80237EC0; +alSeqpPlay = 0x80237F00; +alSeqpSetTempo = 0x80237F30; +alSeqpSetVol = 0x80237FA0; +alSeqpStop = 0x80237FE0; +osGetCount = 0x80238010; // use_non_matching_label:False +spFinish = 0x80238020; +// drawbitmap = 0x80238204; +spDraw = 0x80239784; +spInit = 0x8023A4F0; +spScissor = 0x8023A61C; +spMove = 0x8023A640; +spColor = 0x8023A650; +spScale = 0x8023A680; +sqrtf = 0x8023A6F0; // use_non_matching_label:False +osViBlack = 0x8023A700; +osWritebackDCache = 0x8023A770; // use_non_matching_label:False +osViSetSpecialFeatures = 0x8023A7F0; +__ull_rshift = 0x8023A9B0; +__ull_rem = 0x8023A9DC; +__ull_div = 0x8023AA18; +__ll_lshift = 0x8023AA54; +__ll_rem = 0x8023AA80; +__ll_div = 0x8023AABC; +__ll_mul = 0x8023AB18; +__ull_divremi = 0x8023AB48; +__ll_mod = 0x8023ABA8; +__ll_rshift = 0x8023AC44; +osPiReadIo = 0x8023AC70; +osViSwapBuffer = 0x8023ACF0; +osWritebackDCacheAll = 0x8023AD40; // use_non_matching_label:False +// _VirtualToPhysicalTask = 0x8023AEA0; +osSpTaskLoad = 0x8023AE8C; +osSpTaskStartGo = 0x8023AFEC; +osViGetCurrentFramebuffer = 0x8023B030; +osViGetNextFramebuffer = 0x8023B070; +osCreateViManager = 0x8023B0B0; +osViSetMode = 0x8023B410; +osSetEventMesg = 0x8023B480; +osViSetEvent = 0x8023B4F0; +osSpTaskYield = 0x8023B560; +osSpTaskYielded = 0x8023B580; +osEepromLongWrite = 0x8023B600; +osEepromLongRead = 0x8023B740; +osEepromProbe = 0x8023B880; +osInitialize = 0x8023B8F0; +osPiRawReadIo = 0x8023BB20; +__osGetCurrFaultedThread = 0x8023BB80; +osCreatePiManager = 0x8023BB90; +osSetThreadPri = 0x8023BD10; +osSetTimer = 0x8023BDF0; +__osContGetInitData = 0x8023C0CC; +__osPackRequestData = 0x8023C19C; +osContInit = 0x8023BED0; +osContStartReadData = 0x8023C290; +osContGetReadData = 0x8023C354; +// __osPackReadData = 0x8023C52C; +osInvalDCache = 0x8023C4F0; // use_non_matching_label:False +lldiv = 0x8023C5A0; +ldiv = 0x8023C6A0; +alEvtqFlushType = 0x8023C730; +alEvtqFlush = 0x8023C7DC; +alEvtqPostEvent = 0x8023C84C; +alEvtqNextEvent = 0x8023C970; +alEvtqNew = 0x8023C9FC; +alSynAddPlayer = 0x8023CA70; +_allocatePVoice = 0x8023CAC0; +alSynAllocVoice = 0x8023CBA8; +alSynStartVoice = 0x8023CCF0; +alSynSetPan = 0x8023CD80; +alSynSetVol = 0x8023CE10; +alSynSetPitch = 0x8023CEB0; +alSynSetFXMix = 0x8023CF40; +alSynStopVoice = 0x8023CFE0; +alSynFreeVoice = 0x8023D060; +osSetIntMask = 0x8023D110; // use_non_matching_label:False +__setInstChanState = 0x8023D170; +__resetPerfChanState = 0x8023D1C4; +__initFromBank = 0x8023D244; +__vsDelta = 0x8023D300; +__vsVol = 0x8023D324; +__seqpReleaseVoice = 0x8023D3AC; +__voiceNeedsNoteKill = 0x8023D4D8; +__unmapVoice = 0x8023D580; +__postNextSeqEvent = 0x8023D5F0; +__vsPan = 0x8023D744; +__lookupVoice = 0x8023D78C; +__mapVoice = 0x8023D800; +__lookupSoundQuick = 0x8023D870; +// seqplayer_text_101C = 0x8023E2BC; +__seqpStopOsc = 0x8023E7B0; +__initChanState = 0x8023E8B4; +alSeqpNew = 0x8023E924; +alCents2Ratio = 0x8023EAB0; +alSynStartVoiceParams = 0x8023EB00; +__osDisableInt = 0x8023EBF0; // use_non_matching_label:False +__osRestoreInt = 0x8023EC10; // use_non_matching_label:False +__osDequeueThread = 0x8023EC30; +__osExceptionPreamble = 0x8023EC70; // use_non_matching_label:False +__osException = 0x8023EC80; // use_non_matching_label:False +send_mesg = 0x8023F1C8; // use_non_matching_label:False +handle_CpU = 0x8023F27C; // use_non_matching_label:False +__osEnqueueAndYield = 0x8023F2B0; // use_non_matching_label:False +__osEnqueueThread = 0x8023F340; // use_non_matching_label:False +__osPopThread = 0x8023F388; // use_non_matching_label:False +__osDispatchThread = 0x8023F398; // use_non_matching_label:False +__osCleanupThread = 0x8023F4D8; // use_non_matching_label:False +__osViInit = 0x8023F4E0; +alSynDelete = 0x8023F5F0; +__osProbeTLB = 0x8023F600; // use_non_matching_label:False +__osAiDeviceBusy = 0x8023F6C0; +alSaveNew = 0x8023F6F0; +alMainBusNew = 0x8023F734; +alAuxBusNew = 0x8023F788; +alResampleNew = 0x8023F7DC; +alLoadNew = 0x8023F864; +alEnvmixerNew = 0x8023F90C; +init_lpfilter = 0x8023F9B0; +alFxNew = 0x8023FA50; +alSynAllocFX = 0x8023FE70; +alMainBusParam = 0x8023FF10; +alMainBusPull = 0x8023FF40; +alLoadParam = 0x80240060; +alRaw16Pull = 0x80240234; +// load_text_0580 = 0x80240730; +alAdpcmPull = 0x8024070C; +alResampleParam = 0x80240BB0; +alResamplePull = 0x80240C9C; +_ldexpf = 0x80240EB0; +_frexpf = 0x80240ED8; +alEnvmixerParam = 0x80240FC4; +// env_text_03C4 = 0x802413C4; +// env_text_065C = 0x8024165C; +alEnvmixerPull = 0x802415BC; +alAuxBusParam = 0x80241B10; +alAuxBusPull = 0x80241B40; +alSaveParam = 0x80241C20; +alSavePull = 0x80241C54; +osJamMesg = 0x80241CE0; +osPiGetCmdQueue = 0x80241E30; +spClearAttribute = 0x80241E60; +spSetAttribute = 0x80241E80; +__osPiCreateAccessQueue = 0x80241E90; +__osPiGetAccess = 0x80241EE0; +__osPiRelAccess = 0x80241F24; +bcopy = 0x80241F50; // use_non_matching_label:False +__osSpSetStatus = 0x80242260; +__osSpSetPc = 0x80242270; +__osSpRawStartDma = 0x802422B0; +__osSpDeviceBusy = 0x80242340; +__osTimerServicesInit = 0x80242370; +__osTimerInterrupt = 0x802423FC; +__osSetTimerIntr = 0x80242574; +__osInsertTimer = 0x802425E8; +osGetThreadPri = 0x80242770; +__osViSwapContext = 0x802427A0; +__osViGetCurrentContext = 0x80242790; +__osSpGetStatus = 0x80242B00; +osEepromWrite = 0x80242B10; +__osPackEepWriteData = 0x80242CC0; +__osEepStatus = 0x80242DCC; +osEepromRead = 0x80242FF0; +__osPackEepReadData = 0x802431E0; +__osSiCreateAccessQueue = 0x802432F0; +__osSiGetAccess = 0x80243340; +__osSiRelAccess = 0x80243384; +__osSetSR = 0x802433B0; // use_non_matching_label:False +__osGetSR = 0x802433C0; // use_non_matching_label:False +__osSetFpcCsr = 0x802433D0; // use_non_matching_label:False +__osSiRawReadIo = 0x802433E0; +__osSiRawWriteIo = 0x80243430; +osInvalICache = 0x80243480; // use_non_matching_label:False +osMapTLBRdb = 0x80243500; // use_non_matching_label:False +bzero = 0x80243560; // use_non_matching_label:False +osPiRawStartDma = 0x80243600; +__osDevMgrMain = 0x802436E0; +osGetTime = 0x80243860; +__osSiRawStartDma = 0x802438F0; +alCopy = 0x802439A0; +alSeqGetLoc = 0x80243A20; +alSeqSetLoc = 0x80243A3C; +alSeqGetTicks = 0x80243A58; +// seq_text_0048 = 0x80243BB8; +alSeqNextEvent = 0x80243AB4; +alSeqNewMarker = 0x80243C38; +alSeqSecToTicks = 0x80243D58; +alSeqTicksToSec = 0x80243E3C; +__alSeqNextDelta = 0x80243E90; +// seq_text_04AC = 0x80244038; +// seq_text_04FC = 0x80244088; +alSeqNew = 0x80243F68; +alSynSetPriority = 0x80244040; +kdebugserver = 0x802442E8; +__osSyncPutChars = 0x802444D0; +osDestroyThread = 0x80244600; +alFilterNew = 0x80244700; +_doModFunc = 0x80244720; +_filterBuffer = 0x802447C8; +_saveBuffer = 0x80244880; +_loadBuffer = 0x80244A08; +_loadOutputBuffer = 0x80244B94; +alFxParam = 0x80244FD0; +alFxPull = 0x80244FE8; +alFxParamHdl = 0x80244DB8; +__osSetCompare = 0x80245330; // use_non_matching_label:False +__osSiDeviceBusy = 0x80245340; +__osGetCause = 0x80245370; // use_non_matching_label:False +__osAtomicDec = 0x80245380; +alGlobals = 0x8024B630; +// aisetnextbuf_data_0000 = 0x8024B790; +// prev_bmbuf = 0x8024B7A0; +// sp_attr = 0x8024B7A4; +viMgrMain = 0x8023B234; +__osViDevMgr = 0x8024B660; +osClockRate = 0x8024BF40; // type:u64 +__osShutdown = 0x8024BF48; // type:u32 +__osPiDevMgr = 0x8024BF50; +// player_bss_003C = 0x8024C0A8; +// __osPiDevMgr_2 = 0x8024C0B0; +__osThreadTail = 0x8024BF80; +__osRunQueue = 0x8024BF88; +__osActiveQueue = 0x8024BF8C; +__osRunningThread = 0x8024BF90; +__osFaultedThread = 0x8024BF94; +__osViCurr = 0x8024C020; +__osViNext = 0x8024C024; +osViClock = 0x8024C02C; +// env_data_0000 = 0x8024C310; +// env_data_00FE = 0x8024C40E; +__osPiAccessQueueEnabled = 0x8024C300; +__osTimerList = 0x8024C310; +__osRdbSendMessage = 0x8024C340; +__osRdbWriteOK = 0x8024C344; +// synthesizer_rodata_0000 = 0x8024F760; +// cseq_rodata_0000 = 0x8024F770; +// cseq_rodata_0008 = 0x8024F778; +// sprite_rodata_0000 = 0x8024F780; +// sprite_rodata_0004 = 0x8024F784; +// sprite_rodata_0008 = 0x8024F788; +// __osRcpImTable = 0x8024F790; +// cents2ratio_rodata_0000 = 0x8024FA50; +// resample_rodata_0000 = 0x8024FAE0; +// resample_rodata_0028 = 0x8024FB08; +// resample_rodata_0030 = 0x8024FB10; +// env_rodata_0010 = 0x8024FB30; +// seq_rodata_0000 = 0x8024FB80; +// seq_rodata_0008 = 0x8024FB88; +// scissor_xmax = 0x802C8040; +// scissor_ymax = 0x802C8044; +// scissor_xmin = 0x802C8048; +// scissor_ymin = 0x802C804C; +__osEventStateTab = 0x802BB5F0; +// pimgr_bss_11B0 = 0x802CA4E0; +// pimgr_bss_11C8 = 0x802CA4F8; +__osContPifRam = 0x802BC850; // size:0x40 +__osContLastCmd = 0x802BC890; +__osMaxControllers = 0x802BC891; +__osEepromTimer = 0x802BC898; +__osEepromTimerQ = 0x802BC8B8; +__osEepromTimerMsg = 0x802BC8D0; +__osContinitialized = 0x8024BF70; +// piAccessBuf = 0x802CA590; +__osPiAccessQueue = 0x802BC8E8; +__osBaseTimer = 0x802BC900; +__osCurrentTime = 0x802BC920; // type:u64 +__osBaseCounter = 0x802BC928; // type:u32 +__osViIntrCount = 0x802BC92C; // type:u32 +__osTimerCounter = 0x802BC930; // type:u32 +__osEepPifRam = 0x802BC940; +__osThreadSave = 0x802BCAA0; diff --git a/config/us/pilotwings64.us.yaml b/config/us/pilotwings64.us.yaml index 3088cf7d..6b0bf8e2 100644 --- a/config/us/pilotwings64.us.yaml +++ b/config/us/pilotwings64.us.yaml @@ -34,7 +34,6 @@ options: # auto_link_sections: [".data", ".rodata", ".bss"] symbol_addrs_path: - - config/us/sym/symbol_addrs.txt - config/us/sym/symbol_addrs_app.txt - config/us/sym/symbol_addrs_kernel.txt - config/us/sym/symbol_addrs_libultra.txt diff --git a/config/us/sym/symbol_addrs_kernel.txt b/config/us/sym/symbol_addrs_kernel.txt index 10282cc9..b30b3be1 100644 --- a/config/us/sym/symbol_addrs_kernel.txt +++ b/config/us/sym/symbol_addrs_kernel.txt @@ -32,7 +32,7 @@ uvEmitterGetVol = 0x80201614; // type:func uvEmitterSetPan = 0x8020165C; // type:func uvEmitterSetPitch = 0x80201698; // type:func uvEmitterSetPri = 0x802016D4; // type:func -uvEmitterProp = 0x8020170C; // type:func +uvEmitterProps = 0x8020170C; // type:func uvEmitterTrigger = 0x80201904; // type:func uvEmitterRelease = 0x80201968; // type:func uvEmitterStatus = 0x80201A0C; // type:func diff --git a/include/kernel/uv_sprite.h b/include/kernel/uv_sprite.h index e0ee9060..730a0d95 100644 --- a/include/kernel/uv_sprite.h +++ b/include/kernel/uv_sprite.h @@ -6,6 +6,105 @@ #include enum SpriteBlitId { +#if defined(VERSION_JP) // TODO: JP blit IDs + BLIT_ID_04 = 0x09, + BLIT_ID_05 = 0x0A, + BLIT_ID_06 = 0x0B, + BLIT_ID_07 = 0x0C, + BLIT_ID_08 = 0x0D, + BLIT_ID_0B = 0x10, + BLIT_ID_0C = 0x11, + BLIT_ID_16 = 0x1B, + BLIT_ID_17 = 0x1C, + BLIT_ID_18 = 0x1D, + BLIT_ID_19 = 0x1E, + BLIT_ID_1A = 0x1F, + BLIT_ID_1B = 0x20, + BLIT_ID_1F = 0x25, + BLIT_ID_20 = 0x26, + BLIT_ID_21 = 0x27, + BLIT_ID_22 = 0x28, + BLIT_ID_23 = 0x29, + BLIT_ID_24 = 0x2A, + BLIT_ID_25 = 0x2B, + BLIT_ID_26 = 0x2C, + BLIT_ID_27 = 0x2D, + BLIT_ID_28 = 0x2E, + BLIT_ID_29 = 0x2F, + BLIT_ID_2A = 0x30, + BLIT_ID_2B = 0x31, + BLIT_ID_2C = 0x32, + BLIT_ID_2D = 0x33, + BLIT_N64_CONTROLLER_INFOGRAPHIC = 0x5D, // N64 controller infographic + BLIT_ID_3D = 0x5F, + BLIT_ID_3E = 0x60, + BLIT_ID_3F = 0x61, + BLIT_ID_40 = 0x62, + BLIT_ID_41 = 0x63, + BLIT_ID_42 = 0x64, + BLIT_ID_43 = 0x65, + BLIT_ID_44 = 0x66, + BLIT_ID_45 = 0x67, + BLIT_ID_46 = 0x68, + BLIT_ID_47 = 0x69, + BLIT_ID_48 = 0x6A, + BLIT_ID_49 = 0x6B, + BLIT_ID_4A = 0x6C, + BLIT_ID_4B = 0x6D, + + BLIT_ID_09 = 0x09, + BLIT_ID_0A = 0x0A, + BLIT_TEST_MENU_TOP_SCORE = 0x0D, // "Top Score" box title + BLIT_TEST_MENU_BUTTON_START = 0x0E, // "Start" button + BLIT_TEST_MENU_BUTTON_SCORING = 0x0F, // "Scoring" button + BLIT_TEST_MENU_BUTTON_VIEW_MAP = 0x10, // "View map" button + BLIT_TEST_MENU_BUTTON_CONTROL = 0x11, // "Control" button + BLIT_TEST_MENU_BUTTON_HINT = 0x12, // "Hint" button + BLIT_TEST_MENU_BUTTON_SAMPLE_PHOTO = 0x13, // "Sample photo" button + BLIT_TEST_MENU_BUTTON_RETURN = 0x14, // "Return" button + BLIT_TEST_MENU_TEST_TITLE = 0x15, // "TEST" box title + BLIT_ID_1E = 0x1E, + BLIT_WAYPOINT_CURRENT_POSITION = 0x2E, // "Current position" + BLIT_WAYPOINT_LANDING_POINT = 0x2F, // "Landing point" + BLIT_WAYPOINT_RUNWAY = 0x30, // "Runway" + BLIT_WAYPOINT_TARGET = 0x31, // "Target" + BLIT_WAYPOINT_MECHA_HAWK = 0x32, // "Mecha Hawk" + BLIT_WAYPOINT_GOAL = 0x33, // "Goal" + BLIT_WAYPOINT_WHALE = 0x34, // "Whale" + BLIT_WAYPOINT_SPACE_SHUTTLE = 0x35, // "Space shuttle" + BLIT_WAYPOINT_PASSENGER_BOAT = 0x36, // "Passenger boat" + BLIT_WAYPOINT_FOUNTAIN = 0x37, // "Fountain" + BLIT_WAYPOINT_FLAME = 0x38, // "Flame" + BLIT_WAYPOINT_MISSI_THE_MONSTER = 0x39, // "Missi the Monster" + BLIT_WAYPOINT_NEXT_JP = 0x3A, // Japanese "next goal" + BLIT_TEST_MENU_BUTTON_VIEW_DEMO = 0x3C, // "View demo" button + BLIT_WAYPOINT_NEXT = 0x4C, // "Next" waypoint for next ring / hover pad + BLIT_CONT_INFO_FLARE_LANDING = 0x4D, // "Flare (use for air brake or landing)" + BLIT_CONT_INFO_Z_BUTTON = 0x4E, // "( [Z] )" button callout + BLIT_CONT_INFO_SNAP_PHOTO = 0x4F, // "Snap photo" + BLIT_CONT_INFO_CONTROL_VEHICLE = 0x50, // "Control the vehicle" + BLIT_CONT_INFO_DEC_THROTTLE = 0x51, // "Decrease throttle setting" + BLIT_CONT_INFO_INC_THROTTLE = 0x52, // "Increase throttle setting" + BLIT_CONT_INFO_FIRE_MISSILES = 0x53, // "Fire missiles" + BLIT_CONT_INFO_WEAK_JET = 0x54, // "Weak jet" + BLIT_CONT_INFO_STRONG_JET = 0x55, // "Strong jet" + BLIT_CONT_INFO_AIR_BRAKE = 0x56, // "Air brake / Hover" + BLIT_CONT_INFO_FIRE = 0x57, // "Fire" + BLIT_CONT_INFO_ADJUST_FIRE = 0x58, // "Adjust fire angle & Move cannon left / right" + BLIT_CONT_INFO_FLARE = 0x59, // "Flare (Use for air brake)" + BLIT_CONT_INFO_OPEN_CHUTE = 0x5A, // "Open chute" + BLIT_CONT_INFO_TILT_BACKWARD = 0x5B, // "Tilt backward" + BLIT_CONT_INFO_TILT_FORWARD = 0x5C, // "Tilt forward" + BLIT_CONT_INFO_TURN_LEFT_RIGHT = 0x5D, // "Turn left / right" + BLIT_CONT_INFO_LEFT_RIGHT_ARROWS = 0x5E, // "<- ->" + BLIT_CONT_INFO_UP_ARROW = 0x5F, // "↑" + BLIT_CONT_INFO_DOWN_ARROW = 0x60, // "↓" + BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE = 0x61, // "Change the altitude of jump" + BLIT_CONT_INFO_ADJUST_LEFT_RIGHT = 0x62, // "Adjust left and right directions" + BLIT_CONT_INFO_ADJUST_JUMP_ANGLES = 0x63, // "Adjust angles for jumping + BLIT_CONT_INFO_FLAP_WINGS = 0x64, // "Flap the wings" + BLIT_CONT_INFO_BRAKE_HOVER = 0x65, // "Brake / Hover" +#else BLIT_ID_04 = 0x04, BLIT_ID_05 = 0x05, BLIT_ID_06 = 0x06, @@ -65,8 +164,13 @@ enum SpriteBlitId { BLIT_ID_3E = 0x3E, BLIT_ID_3F = 0x3F, BLIT_ID_40 = 0x40, + BLIT_ID_41 = 0x41, BLIT_ID_42 = 0x42, BLIT_ID_43 = 0x43, + BLIT_ID_44 = 0x44, + BLIT_ID_45 = 0x45, + BLIT_ID_46 = 0x46, + BLIT_ID_47 = 0x47, BLIT_ID_48 = 0x48, BLIT_ID_49 = 0x49, BLIT_ID_4A = 0x4A, @@ -97,6 +201,14 @@ enum SpriteBlitId { BLIT_CONT_INFO_ADJUST_JUMP_ANGLES = 0x63, // "Adjust angles for jumping BLIT_CONT_INFO_FLAP_WINGS = 0x64, // "Flap the wings" BLIT_CONT_INFO_BRAKE_HOVER = 0x65, // "Brake / Hover" +#endif +}; + +enum TextureId { + TEXTURE_NO_MEDAL = 0x148, + TEXTURE_BRONZE_MEDAL = 0x149, + TEXTURE_SILVER_MEDAL = 0x14A, + TEXTURE_GOLD_MEDAL = 0x14B, }; #define SPRT_PROPID_END 0 @@ -156,4 +268,3 @@ void uvSprtUpdateUnk(ParsedUVTX* uvtx); void uvSprtResetUnk(void); #endif // PILOTWINGS64_UV_SPRITE_H - diff --git a/src/app/birdman2.c b/src/app/birdman2.c index d06330d0..dba89b22 100644 --- a/src/app/birdman2.c +++ b/src/app/birdman2.c @@ -550,6 +550,10 @@ void bird_802CFF74(BirdmanData* bmData) { } } +#if defined(VERSION_JP) +// https://decomp.me/scratch/G8dzk +#pragma GLOBAL_ASM("asm/nonmatchings/app/birdman2/bird_802D0080.s") +#else // VERSION_US void bird_802D0080(BirdmanData* bmData) { Vec3F sp27C; f32 var_fs2; @@ -613,6 +617,7 @@ void bird_802D0080(BirdmanData* bmData) { return; } if ((bmData->unk105 != 0) && (bmData->unk104 != 1)) { +#if !defined(VERSION_JP) uvVec3Copy(&sp24C, &bmData->unk200); func_802DC074(&bmData->unk1C0, &bmData->unk200, &bmData->unk218, &temp_s1->unk34, 0.5f); temp_fv0 = ABS_NOEQ(sp24C.x - bmData->unk200.x); @@ -629,6 +634,7 @@ void bird_802D0080(BirdmanData* bmData) { } } } +#endif bmData->unk10.m[3][0] += 0.01f * bmData->unk174.x; bmData->unk10.m[3][1] += 0.01f * bmData->unk174.y; bmData->unk10.m[3][2] += 0.01f * bmData->unk174.z; @@ -729,6 +735,7 @@ void bird_802D0080(BirdmanData* bmData) { _uvDebugPrintf("birdman: you got stuck - forcing an instant crash\n"); } } +#endif f32 bird_802D08F8(Unk8034E824* unkState, f32 arg1, f32 arg2) { s32 i; diff --git a/src/app/code_66F70.c b/src/app/code_66F70.c index 9229755b..095f685a 100644 --- a/src/app/code_66F70.c +++ b/src/app/code_66F70.c @@ -56,17 +56,27 @@ s32 func_802DFB48(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32* arg4, f32* arg5, var_fs2 = 1000000.0f; var_fs3 = -1000000.0f; +#if !defined(VERSION_JP) spAC = -1500000.0f; +#endif for (i = 0; i < temp_v0; i++) { uvTerraGetPlane(D_80362690->terraId, spB4[i], arg1, arg2, &spAC, &sp98); +#if defined(VERSION_JP) + if ((spAC <= arg3) && (var_fs3 < spAC)) { +#else // VERSION_US if ((spAC <= arg3) && (var_fs3 < spAC) && (spAC != -1500000.0f)) { +#endif var_fs3 = spAC; sp7C = spB4[i]; sp8C = sp98.x; sp90 = sp98.y; sp94 = sp98.z; } +#if defined(VERSION_JP) + if ((arg3 <= spAC) && (spAC < var_fs2)) { +#else // VERSION_US if ((arg3 <= spAC) && (spAC < var_fs2) && (spAC != -1500000.0f)) { +#endif var_fs2 = spAC; sp78 = spB4[i]; sp80 = sp98.x; diff --git a/src/app/code_7CF30.c b/src/app/code_7CF30.c index 9e7cd758..4a2c71c1 100644 --- a/src/app/code_7CF30.c +++ b/src/app/code_7CF30.c @@ -484,7 +484,11 @@ void gyrocopterMovementFrame(GyrocopterData* gcData, u8 gameState) { hud->power = 0.0f; } if (gcData->unkC1 != 0) { +#if defined(VERSION_JP) + hudText_8031D8E0(TEXT_OFF_5, 1.5f, 8.0f); +#else // VERSION_US hudWarningText(TEXT_OFF_5, 1.5f, 8.0f); +#endif sndPlaySfx(SFX_UI_POINT_PENALTY); } else { if ((gcData->fuel <= 0.0f) && !gcData->fuelEmpty) { diff --git a/src/app/code_A8C30.c b/src/app/code_A8C30.c index ab818d37..5e476e2b 100644 --- a/src/app/code_A8C30.c +++ b/src/app/code_A8C30.c @@ -131,99 +131,99 @@ void func_80321760(void) { switch (sp3D4->cls) { case CLASS_BEGINNER: uvLevelAppend(0x61); - sp3C4 = 0x23; + sp3C4 = BLIT_ID_23; break; case CLASS_A: uvLevelAppend(0x62); - sp3C4 = 0x24; + sp3C4 = BLIT_ID_24; break; default: case CLASS_B: uvLevelAppend(0x63); - sp3C4 = 0x25; + sp3C4 = BLIT_ID_25; break; } } else { switch (sp3D4->cls) { case CLASS_BEGINNER: uvLevelAppend(0x5F); - sp3C4 = 0x21; + sp3C4 = BLIT_ID_21; break; case CLASS_A: uvLevelAppend(0x5D); - sp3C4 = 0x1F; + sp3C4 = BLIT_ID_1F; break; case CLASS_B: uvLevelAppend(0x5E); - sp3C4 = 0x20; + sp3C4 = BLIT_ID_20; break; case CLASS_PILOT: uvLevelAppend(0x60); - sp3C4 = 0x22; + sp3C4 = BLIT_ID_22; break; default: uvLevelAppend(0x5F); - sp3C4 = 0x21; + sp3C4 = BLIT_ID_21; break; } } switch (sp3D4->veh) { case VEHICLE_HANG_GLIDER: uvLevelAppend(0x65); - sp3C6 = 0x27; + sp3C6 = BLIT_ID_27; break; case VEHICLE_ROCKET_BELT: uvLevelAppend(0x66); - sp3C6 = 0x28; + sp3C6 = BLIT_ID_28; break; case VEHICLE_GYROCOPTER: uvLevelAppend(0x64); - sp3C6 = 0x26; + sp3C6 = BLIT_ID_26; break; case VEHICLE_CANNONBALL: uvLevelAppend(0x67); - sp3C6 = 0x2A; + sp3C6 = BLIT_ID_2A; break; case VEHICLE_SKY_DIVING: uvLevelAppend(0x69); - sp3C6 = 0x2B; + sp3C6 = BLIT_ID_2B; break; case VEHICLE_JUMBLE_HOPPER: uvLevelAppend(0x6A); - sp3C6 = 0x2C; + sp3C6 = BLIT_ID_2C; break; case VEHICLE_BIRDMAN: uvLevelAppend(0x68); - sp3C6 = 0x29; + sp3C6 = BLIT_ID_29; break; default: uvLevelAppend(0x65); - sp3C6 = 0x27; + sp3C6 = BLIT_ID_27; break; } temp2 = levelGetTotalPoints(&D_80364210[D_80362690->unk9C], sp3D4->cls, sp3D4->veh); temp2 = levelSetPointsToNextMedal(&sp3BC, temp2, IS_MAIN_VEHICLE(sp3D4->veh) ? sp3D4->cls : VEHICLE_SKY_DIVING); switch ((s16)temp2) { case 1: - sp3C8 = 0x44; + sp3C8 = BLIT_ID_44; uvLevelAppend(0x6B); break; case 2: - sp3C8 = 0x45; + sp3C8 = BLIT_ID_45; uvLevelAppend(0x6C); break; case 3: if (sp3BC > 0) { - sp3C8 = 0x46; + sp3C8 = BLIT_ID_46; uvLevelAppend(0x6D); } else { // perfect score? sp3BC is points to next medal, if it's 0 we got a perfect score - sp3C8 = 0x47; + sp3C8 = BLIT_ID_47; uvLevelAppend(0x6E); } break; default: - sp3C8 = 0x44; + sp3C8 = BLIT_ID_44; uvLevelAppend(0x6B); _uvDebugPrintf("fell through to default case\n"); break; @@ -330,7 +330,11 @@ void func_80321760(void) { SPRT_PROP_END ); temp2 = 0xA0 - (uvSprtGetWidth(2) / 2); +#if defined(VERSION_JP) + uvSprtProps(2, SPRT_PROP_POS(temp2, 75), SPRT_PROP_END); +#else // VERSION_US uvSprtProps(2, SPRT_PROP_POS(temp2, 98), SPRT_PROP_END); +#endif uvSprtProps(3, SPRT_PROP_ENABLED(TRUE), SPRT_PROP_BLIT(BLIT_ID_48), diff --git a/src/app/code_AC1A0.c b/src/app/code_AC1A0.c index 1d3d7f38..a3f33edd 100644 --- a/src/app/code_AC1A0.c +++ b/src/app/code_AC1A0.c @@ -57,7 +57,7 @@ void rocketBeltLoadLevel(u8 contIdx, u8 pilot, RocketBeltData* rbData, Camera* c rbData->contIdx = contIdx; rbData->camera = camera; rbData->unk4 = 0xFFFF; - func_80326F30(rbData); + rocketBelt_80326F30(rbData); func_80328420(rbData); rbSoundInit(rbData); } @@ -141,7 +141,7 @@ void func_80325100(RocketBeltData* rbData) { rbData->objId = 0xFFFF; uvDobjModel(rbData->unk6, MODEL_WORLD); rbData->unk6 = 0xFFFF; - func_80327380(rbData); + rocketBelt_80327380(rbData); shadow_80334C70(); } @@ -328,7 +328,7 @@ void rocketBeltMovementFrame(RocketBeltData* rbData, u8 gameState) { rbData->unkF8 = 0.0f; } } - func_80327040(rbData, gameState); + rocketBelt_80327040(rbData, gameState); uvDobjPosm(rbData->objId, 0, &rbData->unk10); shadow_803344BC(&rbData->unk10, rbData->unkFC); uvMat4SetIdentity(&sp6C); @@ -469,7 +469,7 @@ void func_80325E1C(RocketBeltData* rbData) { uvMat4Copy(&rbData->camera->unk80, &rbData->unk10); } shadow_803343D8(0); - func_80327614(rbData); + rocketBelt_80327614(rbData); } void rocketBeltLoadPilot(u8 pilot, RocketBeltData* rbData) { diff --git a/src/app/code_AE460.c b/src/app/code_AE460.c index 050f0983..cdfbd6a8 100644 --- a/src/app/code_AE460.c +++ b/src/app/code_AE460.c @@ -16,11 +16,11 @@ Unk80371120 D_80371120; Unk80371120 D_803712D0; Unk80371120 D_80371480; -void func_803277E0(RocketBeltData*); -void func_803279F0(RocketBeltData*); -void func_80327F30(RocketBeltData*, u8 gameState); +void rocketBelt_803277E0(RocketBeltData*); +void rocketBelt_803279F0(RocketBeltData*); +void rocketBelt_80327F30(RocketBeltData*, u8 gameState); -void func_80326F30(RocketBeltData* rbData) { +void rocketBelt_80326F30(RocketBeltData* rbData) { rbData->unk338 = uvFx_8021EFF0(2); uvModelGet(rbData->unk338, MODEL_BLUE_CUBOID); rbData->unk339 = uvFx_8021EFF0(2); @@ -30,16 +30,16 @@ void func_80326F30(RocketBeltData* rbData) { rbData->unk33A = 0; } -void func_80327040(RocketBeltData* rbData, u8 gameState) { +void rocketBelt_80327040(RocketBeltData* rbData, u8 gameState) { Mtx4F sp40; f32 var_ft4; f32 var_fv1; - func_803279F0(rbData); + rocketBelt_803279F0(rbData); if ((rbData->unkF8 > 0.0f) && (rbData->unk90 != 4)) { - func_80327F30(rbData, gameState); + rocketBelt_80327F30(rbData, gameState); } else { - func_803277E0(rbData); + rocketBelt_803277E0(rbData); } rbData->unk35C = func_80313AF4((rbData->unk68 * -1.2f) + rbData->unk88, rbData->unk35C, 5.0f); var_ft4 = rbData->unk1DC.z / 20.0f; @@ -87,21 +87,21 @@ void func_80327040(RocketBeltData* rbData, u8 gameState) { } } -void func_80327380(RocketBeltData* rbData) { +void rocketBelt_80327380(RocketBeltData* rbData) { uvModelGet(rbData->unk338, MODEL_BIG_ROCK_BOULDER); uvModelGet(rbData->unk339, MODEL_BIG_ROCK_BOULDER); rbData->unk338 = 0xFF; rbData->unk339 = 0xFF; } -void func_803273C8(RocketBeltData* rbData, u8 arg1) { +void rocketBelt_803273C8(RocketBeltData* rbData, u8 arg1) { static f32 D_8034FBA0 = 0.0f; static f32 D_8034FBA4 = 0.5f; f32 var_fa1; u8 sp23; if (rbData->unk90 == 3) { - func_80327614(rbData); + rocketBelt_80327614(rbData); return; } if ((fdr_802E6B5C() != 3) && (fdr_802E6B5C() != 4)) { @@ -118,7 +118,7 @@ void func_803273C8(RocketBeltData* rbData, u8 arg1) { uvDobj_802180DC(rbData->objId, &D_80371120); rbData->unk80 = 0; rbData->unk78 = 0.0f; - func_80327040(rbData, GAME_STATE_TEST_UPDATE); + rocketBelt_80327040(rbData, GAME_STATE_TEST_UPDATE); } var_fa1 = rbData->unk33C / 3.0f; @@ -155,7 +155,7 @@ void func_803273C8(RocketBeltData* rbData, u8 arg1) { } } -void func_80327614(RocketBeltData* rbData) { +void rocketBelt_80327614(RocketBeltData* rbData) { Mtx4F spD0; Mtx4F sp90; Mtx4F sp50; @@ -187,13 +187,13 @@ void func_80327614(RocketBeltData* rbData) { uvDobjPosm(rbData->objId, rbData->unk2E1, &sp90); shadow_803343D8(0); } - func_803277E0(rbData); + rocketBelt_803277E0(rbData); uvModelGetPosm(rbData->modelId, rbData->unk2DE, &sp50); uvMat4RotateAxis(&sp50, uvCosF(8.0f * D_8034F850), 'z'); uvDobjPosm(rbData->objId, rbData->unk2DE, &sp50); } -void func_803277E0(RocketBeltData* rbData) { +void rocketBelt_803277E0(RocketBeltData* rbData) { Mtx4F sp38; f32 var_fs0; @@ -222,7 +222,7 @@ void func_803277E0(RocketBeltData* rbData) { uvDobjPosm(rbData->objId, rbData->unk2D8, &sp38); } -void func_803279F0(RocketBeltData* rbData) { +void rocketBelt_803279F0(RocketBeltData* rbData) { static f32 D_8034FBA8 = 0.0f; Mtx4F sp178; Mtx4F sp138; @@ -289,7 +289,7 @@ void func_803279F0(RocketBeltData* rbData) { } } -void func_80327F30(RocketBeltData* rbData, u8 gameState) { +void rocketBelt_80327F30(RocketBeltData* rbData, u8 gameState) { f32 var_fa0; f32 sp70; f32 sp6C; diff --git a/src/app/code_BA190.c b/src/app/code_BA190.c index 0e25b752..5e2764fe 100644 --- a/src/app/code_BA190.c +++ b/src/app/code_BA190.c @@ -216,6 +216,10 @@ void func_80333384(SkyDivingData* sdData) { sdData->unk160.z = func_80313AF4(var_fs0, sdData->unk160.z, 3.0f); } +#if defined(VERSION_JP) +// https://decomp.me/scratch/f2pMX +#pragma GLOBAL_ASM("asm/nonmatchings/app/code_BA190/func_803335D0.s") +#else // VERSION_US s32 func_803335D0(SkyDivingData* sdData) { f32 sp6C; f32 temp_fv0; @@ -291,3 +295,4 @@ s32 func_803335D0(SkyDivingData* sdData) { } return 1; } +#endif diff --git a/src/app/control_info.c b/src/app/control_info.c index 017b7ee7..66602548 100644 --- a/src/app/control_info.c +++ b/src/app/control_info.c @@ -23,59 +23,109 @@ typedef struct { STATIC_DATA s32 sControlInfoCount; STATIC_DATA ControlInfoLabel sControlInfoHangGlider[] = { - { 223, 108, BLIT_CONT_INFO_FLARE_LANDING }, - { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, - { 221, 196, BLIT_CONT_INFO_SNAP_PHOTO }, - { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#if defined(VERSION_JP) + // TODO: (J) blit IDs + { 222, 123, 0x41 }, + { 224, 137, 0x42 }, + { 243, 153, 0x43 }, + { 229, 196, 0x44 }, + { 220, 212, 0x45 }, + { 63, 194, 0x46 }, + { 46, 180, 0x47 }, +#else // VERSION_US + { 223, 108, BLIT_CONT_INFO_FLARE_LANDING }, + { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, + { 221, 196, BLIT_CONT_INFO_SNAP_PHOTO }, + { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoGyrocopter[] = { - { 227, 98, BLIT_CONT_INFO_INC_THROTTLE }, - { 227, 146, BLIT_CONT_INFO_DEC_THROTTLE }, - { 193, 179, BLIT_CONT_INFO_Z_BUTTON }, - { 193, 198, BLIT_CONT_INFO_FIRE_MISSILES }, - { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#if defined(VERSION_JP) + { 0xED, 0x6B, 0x48 }, + { 0xEC, 0x7B, 0x4A }, + { 0xED, 0x93, 0x48 }, + { 0xED, 0xA3, 0x49 }, + { 0xC6, 0xC4, 0x44 }, + { 0xBE, 0xD3, 0x4B }, + { 0x3F, 0xC2, 0x46 }, + { 0x2E, 0xB4, 0x47 }, +#else // VERSION_US + { 227, 98, BLIT_CONT_INFO_INC_THROTTLE }, { 227, 146, BLIT_CONT_INFO_DEC_THROTTLE }, { 193, 179, BLIT_CONT_INFO_Z_BUTTON }, + { 193, 198, BLIT_CONT_INFO_FIRE_MISSILES }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoRocketBelt[] = { - { 230, 126, BLIT_CONT_INFO_WEAK_JET }, - { 230, 104, BLIT_CONT_INFO_STRONG_JET }, - { 216, 167, BLIT_CONT_INFO_Z_BUTTON }, - { 216, 185, BLIT_CONT_INFO_AIR_BRAKE }, - { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#if defined(VERSION_JP) + { 0xEC, 0x7C, 0x4E }, + { 0xFC, 0x7C, 0x4D }, + { 0xFC, 0x9C, 0x4D }, + { 0xEC, 0x9C, 0x4C }, + { 0xE5, 0xC4, 0x44 }, + { 0xDC, 0xD4, 0x4F }, + { 0x3F, 0xC2, 0x46 }, + { 0x2E, 0xB4, 0x47 }, +#else // VERSION_US + { 230, 126, BLIT_CONT_INFO_WEAK_JET }, { 230, 104, BLIT_CONT_INFO_STRONG_JET }, { 216, 167, BLIT_CONT_INFO_Z_BUTTON }, + { 216, 185, BLIT_CONT_INFO_AIR_BRAKE }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoCannonball[] = { - { 251, 104, BLIT_CONT_INFO_FIRE }, - { 38, 179, BLIT_CONT_INFO_ADJUST_FIRE }, +#if defined(VERSION_JP) + { 0xEB, 0x86, 0x50 }, + { 0x3D, 0xC4, 0x52 }, + { 0x1C, 0xB4, 0x51 }, +#else // VERSION_US + { 251, 104, BLIT_CONT_INFO_FIRE }, + { 38, 179, BLIT_CONT_INFO_ADJUST_FIRE }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoSkydiving[] = { - { 223, 106, BLIT_CONT_INFO_FLARE }, - { 218, 161, BLIT_CONT_INFO_OPEN_CHUTE }, - { 59, 200, BLIT_CONT_INFO_TILT_BACKWARD }, - { 59, 180, BLIT_CONT_INFO_TILT_FORWARD }, - { 59, 159, BLIT_CONT_INFO_TURN_LEFT_RIGHT }, - { 30, 159, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, - { 38, 180, BLIT_CONT_INFO_UP_ARROW }, - { 38, 201, BLIT_CONT_INFO_DOWN_ARROW }, +#if defined(VERSION_JP) + { 0xDE, 0x7B, 0x41 }, + { 0xE0, 0x89, 0x42 }, + { 0xF3, 0x99, 0x43 }, + { 0xDC, 0xC3, 0x53 }, + { 0xDD, 0xD3, 0x54 }, + { 0x3C, 0xD4, 0x55 }, + { 0x3C, 0xC0, 0x56 }, + { 0x4C, 0xAC, 0x57 }, +#else // VERSION_US + { 223, 106, BLIT_CONT_INFO_FLARE }, { 218, 161, BLIT_CONT_INFO_OPEN_CHUTE }, { 59, 200, BLIT_CONT_INFO_TILT_BACKWARD }, + { 59, 180, BLIT_CONT_INFO_TILT_FORWARD }, { 59, 159, BLIT_CONT_INFO_TURN_LEFT_RIGHT }, { 30, 159, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, + { 38, 180, BLIT_CONT_INFO_UP_ARROW }, { 38, 201, BLIT_CONT_INFO_DOWN_ARROW }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoJumbleHopper[] = { - { 222, 104, BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE }, - { 59, 179, BLIT_CONT_INFO_ADJUST_LEFT_RIGHT }, - { 59, 198, BLIT_CONT_INFO_ADJUST_JUMP_ANGLES }, - { 27, 179, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, - { 35, 195, BLIT_CONT_INFO_UP_ARROW }, - { 35, 208, BLIT_CONT_INFO_DOWN_ARROW }, +#if defined(VERSION_JP) + { 0x3D, 0xD3, 0x58 }, + { 0xDD, 0x93, 0x58 }, + { 0x4D, 0xAB, 0x58 }, + { 0x4D, 0xBE, 0x59 }, + { 0x7D, 0xD4, 0x5A }, +#else // VERSION_US + { 222, 104, BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE }, { 59, 179, BLIT_CONT_INFO_ADJUST_LEFT_RIGHT }, { 59, 198, BLIT_CONT_INFO_ADJUST_JUMP_ANGLES }, + { 27, 179, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, { 35, 195, BLIT_CONT_INFO_UP_ARROW }, { 35, 208, BLIT_CONT_INFO_DOWN_ARROW }, +#endif }; STATIC_DATA ControlInfoLabel sControlInfoBirdman[] = { - { 228, 99, BLIT_CONT_INFO_FLAP_WINGS }, - { 228, 131, BLIT_CONT_INFO_BRAKE_HOVER }, - { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, - { 220, 196, BLIT_CONT_INFO_SNAP_PHOTO }, - { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#if defined(VERSION_JP) + { 0xDE, 0x74, 0x5B }, + { 0xDC, 0x8B, 0x4F }, + { 0xE0, 0x99, 0x5C }, + { 0xE5, 0xC4, 0x44 }, + { 0xDC, 0xD4, 0x45 }, + { 0x3F, 0xC2, 0x46 }, + { 0x2E, 0xB4, 0x47 }, +#else // VERSION_US + { 228, 99, BLIT_CONT_INFO_FLAP_WINGS }, { 228, 131, BLIT_CONT_INFO_BRAKE_HOVER }, { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, + { 220, 196, BLIT_CONT_INFO_SNAP_PHOTO }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, +#endif }; STATIC_DATA ControlInfoLabelGroup sControlInfoVeh[] = { @@ -88,78 +138,183 @@ STATIC_DATA ControlInfoLabelGroup sControlInfoVeh[] = { { ARRAY_COUNT(sControlInfoBirdman), sControlInfoBirdman }, }; +#if defined(VERSION_JP) +typedef struct { + u8 unk0; + // pad1 + s16 unk2; + u8 unk4; + // pad5 + u16 unk6; + u16 unk8; + u16 unkA; +} Unk80341584_unk4; + +typedef struct { + u8 unk0; + // pad3 + Unk80341584_unk4* unk4; +} Unk80341584; + +Unk80341584_unk4 D_80341524[] = { 0x01, 0x001E, 0xAA, 0x0151, 0x000B, 0x000B, 0x03, 0x002B, 0xAA, 0x0151, 0x000B, 0x000B, + 0x00, 0x001E, 0xBE, 0x0151, 0x000B, 0x000B, 0x02, 0x001E, 0xD2, 0x0151, 0x000B, 0x000B }; + +Unk80341584_unk4 D_80341554[] = { 0x01, 0x001E, 0xAA, 0x0151, 0x000B, 0x000B, 0x03, 0x002E, 0xAA, 0x0151, 0x000B, 0x000B, + 0x00, 0x001E, 0xCC, 0x0151, 0x000B, 0x000B, 0x02, 0x001E, 0xD9, 0x0151, 0x000B, 0x000B }; + +Unk80341584 D_80341584[] = { + { 0x00, NULL }, + { 0x00, NULL }, + { 0x00, NULL }, + { 0x00, NULL }, + { 0x04, D_80341524 }, + { 0x04, D_80341554 }, + { 0x00, NULL } +}; +#endif + // clang-format off: disable formatter to show -1 terminator STATIC_DATA s16 D_8034EC10[] = { +#if defined(VERSION_JP) + 0x72, 0x2D, 0x9C, 0x2D, 0x9C, 0x65, -1, + 0xBC, 0x28, 0xBC, 0x49, -1, + 0xC4, 0x5F, 0xDE, 0x5F, 0xDE, 0x3D, -1, + -1 +#else // VERSION_US 0x7A, 0x35, 0x9E, 0x35, -1, 0x9D, 0x35, 0x9D, 0x64, -1, 0xBE, 0x24, 0xBE, 0x46, -1, 0xF4, 0x48, 0xF4, 0x5D, -1, 0xF4, 0x5C, 0xC6, 0x5C, -1, -1 +#endif }; // hang glider STATIC_DATA s16 D_8034EC44[] = { +#if defined(VERSION_JP) + 0xD9, 0xCD, 0xC3, 0xCD, 0xB0, 0x93, -1, + 0x64, 0xAC, 0x88, 0xAC, 0x88, 0x7F, 0x9B, 0x7F, -1, + 0xDB, 0x7D, 0xBC, 0x7D, 0xBC, 0x6F, -1, + 0xBB, 0x7D, 0xB3, 0x7D, 0xB3, 0x67, -1, + -1 +#else // VERSION_US 0xD5, 0xC3, 0xB0, 0x93, -1, 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0x9F, -1, 0xDC, 0x7C, 0xB2, 0x7C, -1, 0xB3, 0x7C, 0xB3, 0x67, -1, 0xBD, 0x7C, 0xBD, 0x70, -1, -1 +#endif }; // gyrocopter STATIC_DATA s16 D_8034EC7C[] = { +#if defined(VERSION_JP) + 0xB2, 0x68, 0xB2, 0x8D, 0xE9, 0x8D, -1, + 0xBC, 0x6F, 0xE7, 0x6F, -1, + 0xBD, 0xC1, 0xAF, 0x98, -1, + 0x64, 0xAC, 0x87, 0xAC, 0x87, 0x7F, 0x9B, 0x7F, -1, + -1 +#else // VERSION_US 0xB2, 0x67, 0xB2, 0x99, 0xDF, 0x99, -1, 0xBC, 0x6E, 0xDF, 0x6E, -1, 0xBB, 0xCB, 0xAF, 0x98, -1, 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0x9F, -1, -1 +#endif }; // rocket belt STATIC_DATA s16 D_8034ECB0[] = { +#if defined(VERSION_JP) + 0xBC, 0x6F, 0xDC, 0x6F, 0xDC, 0x75, 0xE9, 0x75, -1, + 0xD9, 0xCD, 0xC3, 0xCD, 0xB0, 0x93, -1, + 0x64, 0xAC, 0x87, 0xAC, 0x87, 0x7F, 0x9B, 0x7F, -1, + 0xB2, 0x67, 0xB2, 0x95, 0xE9, 0x95, -1, + -1 +#else // VERSION_US 0xB2, 0x67, 0xB2, 0x84, 0xE1, 0x84, -1, 0xBC, 0x6E, 0xE1, 0x6E, -1, 0xAF, 0x98, 0xD0, 0xBD, -1, 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0x9F, -1, -1 +#endif }; // cannonball STATIC_DATA s16 D_8034ECE4[] = { +#if defined(VERSION_JP) + 0x74, 0xAC, 0x86, 0xAC, 0x86, 0x7F, 0x9A, 0x7F, -1, + 0xE6, 0x7D, 0xBC, 0x7D, 0xBC, 0x6F, -1, + -1 +#else // VERSION_US 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0xAD, -1, 0xBC, 0x6E, 0xF5, 0x6E, -1, -1 +#endif }; // skydiving STATIC_DATA s16 D_8034ED00[] = { +#if defined(VERSION_JP) + 0xD7, 0xC1, 0xB1, 0xC1, 0xB1, 0x67, -1, + 0xDB, 0x7D, 0xBB, 0x7D, 0xBB, 0x6F, -1, + 0x49, 0x97, 0x49, 0x80, 0x9B, 0x80, -1, + -1, +#else // VERSION_US 0xB2, 0x67, 0xB2, 0xA7, 0xD2, 0xA7, -1, 0xBC, 0x6F, 0xDA, 0x6F, -1, 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0x99, -1, -1 +#endif }; // jumble hopper STATIC_DATA s16 D_8034ED28[] = { +#if defined(VERSION_JP) + 0x49, 0x99, 0x49, 0x80, 0x9B, 0x80, -1, + 0xBA, 0x71, 0xBA, 0x8D, 0xD8, 0x8D, -1, + -1 +#else // VERSION_US 0x4B, 0xAB, 0x4B, 0x80, 0x9B, 0x80, -1, 0xBC, 0x6E, 0xDA, 0x6E, -1, -1 +#endif }; // birdman STATIC_DATA s16 D_8034ED44[] = { +#if defined(VERSION_JP) + 0xBB, 0x6E, 0xD9, 0x6E, -1, + 0xD9, 0xCD, 0xC3, 0xCD, 0xB0, 0x93, -1, + 0x64, 0xAC, 0x87, 0xAC, 0x87, 0x7F, 0x9B, 0x7F, -1, + 0xB1, 0x67, 0xB1, 0x85, 0xD9, 0x85, -1, + -1 +#else // VERSION_US 0xB2, 0x67, 0xB2, 0x89, 0xDF, 0x89, -1, 0xBC, 0x6E, 0xDF, 0x6E, -1, 0xAF, 0x98, 0xD5, 0xC3, -1, 0x9C, 0x7C, 0x4B, 0x7C, 0x4B, 0x9F, -1, -1 +#endif }; // clang-format on STATIC_DATA s16* D_8034ED78[] = { D_8034EC44, D_8034ECB0, D_8034EC7C, D_8034ECE4, D_8034ED00, D_8034ED28, D_8034ED44 }; +#if defined(VERSION_JP) +s16 D_80341768[] = { 0xED, 0x95, -1 }; + +s16 D_80341770[] = { 0x33, 0xBD, -1 }; + +s16 D_80341778[] = { 0x3A, 0xA6, 0x3F, 0xA6, 0x44, 0xA6, 0x2D, 0xBA, 0x32, 0xBA, 0x37, 0xBA, 0x2D, 0xCE, 0x32, 0xCE, 0x37, 0xCE, 0xED, 0x95, -1 }; + +s16 D_803417A4[] = { 0x3D, 0xA6, 0x42, 0xA6, 0x47, 0xA6, 0x2D, 0xCE, 0x32, 0xCE, 0x37, 0xCE, -1 }; + +void* D_803417C0[] = { D_80341768, NULL, NULL, D_80341770, D_80341778, D_803417A4, NULL, NULL }; +#endif + // forward declarations void contInfoInit(void); s32 contInfoUpdate(void); @@ -178,7 +333,6 @@ void contInfoMainRender(void) { void contInfoInit(void) { Unk80362690_Unk0* temp_s7; - s32 temp_s3; s32 i; s32 var_s2; ControlInfoLabel* temp_s1; @@ -195,18 +349,24 @@ void contInfoInit(void) { i = 0; sControlInfoCount = sControlInfoVeh[temp_s7->veh].count; for (i = 0; i < sControlInfoCount; i++) { - temp_s3 = i + 0x15; temp_s1 = &sControlInfoVeh[temp_s7->veh].labels[i]; // clang-format off - uvSprtProps(temp_s3, + uvSprtProps(i + 0x15, SPRT_PROP_ENABLED(TRUE), SPRT_PROP_BLIT(temp_s1->blitId), SPRT_PROP_END ); - uvSprtProps(temp_s3, +#if defined(VERSION_JP) + uvSprtProps(i + 0x15, + SPRT_PROP_POS(temp_s1->x, (uvSprtGetHeight(i + 0x15) - temp_s1->y) + SCREEN_HEIGHT), + SPRT_PROP_END + ); +#else // VERSION_US + uvSprtProps(i + 0x15, SPRT_PROP_POS(temp_s1->x, SCREEN_HEIGHT - temp_s1->y), SPRT_PROP_END ); +#endif // clang-format on } } @@ -228,6 +388,59 @@ s32 contInfoUpdate(void) { return 0; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/HJdgY +#pragma GLOBAL_ASM("asm/nonmatchings/app/control_info/contInfo_802CEFA8.s") + +void contInfo_802CF0CC(s32 arg0) { + Unk80341584_unk4* temp_s1; + f32 temp_fs0; + s32 var_s3; + + for (var_s3 = 0; var_s3 < D_80341584[arg0].unk0; var_s3++) { + temp_s1 = &D_80341584[arg0].unk4[var_s3]; + uvGfxStatePush(); + uvGfxSetFlags(GFX_STATE_XLU); + uvGfxClearFlags(GFX_STATE_AA | GFX_STATE_ZBUFFER); + uvGfxBindTexture(temp_s1->unk6); + uvVtxBeginPoly(); + temp_fs0 = (SCREEN_HEIGHT - temp_s1->unk4); + switch (temp_s1->unk0) { + case 0: + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unkA + temp_fs0), 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, (temp_s1->unkA + temp_fs0), 0, 0, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); + break; + case 1: + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); + break; + case 2: + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unk8 << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + break; + case 3: + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); + break; + } + uvVtxEndPoly(); + uvGfxStatePop(); + } +} + +// https://decomp.me/scratch/99x3U +#pragma GLOBAL_ASM("asm/nonmatchings/app/control_info/contInfo_802CF758.s") +void contInfo_802CF758(void*); +#endif + void contInfoDrawLineSeg(s32 x0, s32 y0, s32 x1, s32 y1) { f32 x_off, ux, uy, angle, length, y_off; s32 x2, y2, x3, y3; @@ -265,6 +478,15 @@ void contInfoDrawLineSeg(s32 x0, s32 y0, s32 x1, s32 y1) { uvVtx(x3, y3, 0, 0, 0, 200, 200, 200, 255); uvVtx(x1, y1, 0, 0, 0, 200, 200, 200, 255); uvVtxEndPoly(); + +#if defined(VERSION_JP) + uvVtxBeginPoly(); + uvVtx(x0 + 1, y0 + 1, 0, 0, 0, 0, 0, 0, 255); + uvVtx(x2 + 1, y2 + 1, 0, 0, 0, 0, 0, 0, 255); + uvVtx(x3 + 1, y3 + 1, 0, 0, 0, 0, 0, 0, 255); + uvVtx(x1 + 1, y1 + 1, 0, 0, 0, 0, 0, 0, 255); + uvVtxEndPoly(); +#endif } void contInfoDrawLineStrip(s16* coords) { @@ -311,6 +533,14 @@ void contInfoDraw(void) { if (D_8034ED78[sp20->veh] != NULL) { contInfoDrawLineStrip(D_8034ED78[sp20->veh]); } +#if defined(VERSION_JP) + if (D_803417C0[sp20->veh] != NULL) { + contInfo_802CF758(D_803417C0[sp20->veh]); + } + if (D_80341584[sp20->veh].unk0 != 0) { + contInfo_802CF0CC(sp20->veh); + } +#endif uvGfxEnableCull(0, 1); func_803141E4(); } @@ -318,4 +548,3 @@ void contInfoDraw(void) { void contInfoDeinit(void) { uvSprtProps(0x1E, SPRT_PROP_ENABLED(FALSE), SPRT_PROP_END); } - diff --git a/src/app/credits.c b/src/app/credits.c index 7e292d1f..05fd8160 100644 --- a/src/app/credits.c +++ b/src/app/credits.c @@ -41,7 +41,9 @@ CreditLines D_8034F4E0[] = { { "SHIGEKI YAMASHIRO", 3, 0 }, { "HIRO NAKAMURA", 3, 0 }, { "DARREN SMITH", 3, 0 }, +#if !defined(VERSION_JP) { "JIM WORNELL", 3, 0 }, +#endif { "PARADIGM STAFF", 1, 0 }, { "PROJECT MANAGER", 2, 0 }, { "DAVE GATCHEL", 3, 0 }, @@ -397,4 +399,3 @@ void creditsScene(void) { D_8034F784 = 0; } } - diff --git a/src/app/env_sound.c b/src/app/env_sound.c index 6cf05cfc..fecc7889 100644 --- a/src/app/env_sound.c +++ b/src/app/env_sound.c @@ -52,8 +52,13 @@ STATIC_DATA s32 D_8034EF20 = 0; STATIC_DATA s32 D_8034EF24 = 0; STATIC_DATA s32 D_8034EF28 = 0; STATIC_DATA s32 sEnvSoundIsInit = FALSE; +#if defined(VERSION_JP) +STATIC_DATA s32 sEnvSoundModelIdLookup[28] = { 0x0D, 0x0E, 0x2A, 0x25, 0x29, 0x0D, 0x40, 0x41, 0x14, 0x47, 0x21, 0x07, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x2F, 0x2F, 0x2F, 0x2F, 0x6B, 0x6B, 0x6B, 0x51, 0x6B, 0x00 }; +#else // VERSION_US STATIC_DATA s32 sEnvSoundModelIdLookup[28] = { 0x0D, 0x0E, 0x2A, 0x25, 0x29, 0x0D, 0x40, 0x41, 0x14, 0x47, 0x21, 0x07, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x2F, 0x2F, 0x2F, 0x6B, 0x6B, 0x6B, 0x6B, 0x51, 0x6B, 0x00 }; +#endif STATIC_DATA EventCallbackInfo sEnvSoundEventCb; STATIC_DATA EnvSoundState sEnvSoundState; @@ -135,6 +140,10 @@ void envSound_802E2904(EnvSoundState* arg0) { arg0->flags = 0xFFFFFFC0; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/V1ugW +#pragma GLOBAL_ASM("asm/nonmatchings/app/env_sound/envSound_802E2A00.s") +#else // VERSION_US void envSound_802E2A00(s32 eventType, void* arg1, s32 eventData) { s32 i; EnvSoundState* esState; @@ -387,6 +396,7 @@ void envSound_802E2A00(s32 eventType, void* arg1, s32 eventData) { break; } } +#endif void envSound_802E3250(EnvSoundState* arg0) { EnvSoundEmitter* var_s0; @@ -417,6 +427,9 @@ void envSound_802E3310(EnvSoundState* arg0) { uvEmitterSetVol(var_s0->emitterId, var_s0->unk0); uvEmitterTrigger(var_s0->emitterId); } +#if defined(VERSION_JP) + arg0->unk7F8 = (s32)D_80362690->unkC[D_80362690->unk9C].unk8; +#endif } void envSound_802E3398(EnvSoundState* arg0) { @@ -498,4 +511,3 @@ void envSoundFrameUpdate(Mtx4F* arg0) { } } } - diff --git a/src/app/falco.c b/src/app/falco.c index 3a00aba3..73ece66f 100644 --- a/src/app/falco.c +++ b/src/app/falco.c @@ -724,7 +724,11 @@ s32 falco_802E51E8(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { str16 = textGetDataByIdx(TEXT_LEFT_SHT); sndPlaySfxVolPitchPan(SFX_UNK_059, 1.0f, (uvRandF_LCG() * 0.2) + 0.800000011920929, 0.0f); hudText_8031D8E0(TEXT_F_HIT_M, 1.5f, 8.0f); - textFmtIntAt(str16, ((1.0f - curFalco->unkC4) / curFalco->unk250) + 0.5, 1, 0xE); +#if defined(VERSION_JP) + textFmtIntAt(str16, ((1.0f - curFalco->unkC4) / curFalco->unk250) + 0.5, 2, 2); +#else // VERSION_US + textFmtIntAt(str16, ((1.0f - curFalco->unkC4) / curFalco->unk250) + 0.5, 1, 14); +#endif hudWarningText(TEXT_LEFT_SHT, 1.5f, 8.0f); curFalco->unk23C = 7; temp_fv0 = uvRandF_LCG(); @@ -1152,4 +1156,3 @@ void falco_802E64E0(s32 arg0, Mtx4F* arg1) { uvMat4RotateAxis(arg1, sp18->unk80, 'x'); } } - diff --git a/src/app/file_menu.c b/src/app/file_menu.c index ba3036c6..0b525589 100644 --- a/src/app/file_menu.c +++ b/src/app/file_menu.c @@ -75,7 +75,7 @@ void fileMenu_802E8AF0(void) { SPRT_PROP_DIM(38, 22), SPRT_PROP_POS(((i % 3) * 40) + 93, 123 - ((i / 3) * 25)), SPRT_PROP_COLOR(0xFF, 0xFF, 0xFF, 0xFF), - SPRT_PROP_TEX_ID(0x148), + SPRT_PROP_TEX_ID(TEXTURE_NO_MEDAL), SPRT_PROP_END ); } @@ -85,7 +85,7 @@ void fileMenu_802E8AF0(void) { SPRT_PROP_DIM(38, 22), SPRT_PROP_POS(229, 98 - (25 * i)), SPRT_PROP_COLOR(0xFF, 0xFF, 0xFF, 0xFF), - SPRT_PROP_TEX_ID(0x148), + SPRT_PROP_TEX_ID(TEXTURE_NO_MEDAL), SPRT_PROP_END ); } @@ -97,13 +97,13 @@ void fileMenu_802E8AF0(void) { temp_s2 = levelGetTotalPoints(temp_s6, k, j); temp_v0 = func_8032BE8C(temp_s6, k, j); if ((temp_s2 >= gMedalPointRequirements[k].gold) && (temp_v0 != 0)) { - texId = 0x14B; // gold medal sprite + texId = TEXTURE_GOLD_MEDAL; // gold medal sprite } else if ((temp_s2 >= gMedalPointRequirements[k].silver) && (temp_v0 != 0)) { - texId = 0x14A; // silver medal sprite + texId = TEXTURE_SILVER_MEDAL; // silver medal sprite } else if ((temp_s2 >= gMedalPointRequirements[k].bronze) && (temp_v0 != 0)) { - texId = 0x149; // bronze medal sprite + texId = TEXTURE_BRONZE_MEDAL; // bronze medal sprite } else { - texId = 0x148; // no medal sprite + texId = TEXTURE_NO_MEDAL; // no medal sprite } uvSprtProps(k * 3 + j, SPRT_PROP_TEX_ID(texId), SPRT_PROP_END); } @@ -116,7 +116,7 @@ void fileMenu_802E8AF0(void) { // clang-format off uvSprtProps(i + 0xC, SPRT_PROP_ENABLED(TRUE), - SPRT_PROP_TEX_ID(0x148), + SPRT_PROP_TEX_ID(TEXTURE_NO_MEDAL), SPRT_PROP_END ); // clang-format on @@ -167,7 +167,11 @@ void fileMenuSetup(s32 menu) { } switch (menu) { case 0: +#if defined(VERSION_JP) + menuCreateItems(fileMenuSetText(), 143, 6, 1.0f, 0.8f, sFileMenuTextIds, 3); +#else // VERSION_US menuCreateItems(fileMenuSetText(), 135, 6, 1.0f, 1.0f, sFileMenuTextIds, 3); +#endif sFileColorR1 = 44.0f; sFileColorG1 = 214.0f; sFileColorB1 = 44.0f; @@ -176,7 +180,11 @@ void fileMenuSetup(s32 menu) { sFileColorB2 = 255.0f; break; case 1: +#if defined(VERSION_JP) + menuCreateItems(fileMenuEraseFile(), 150, 6, 1.0f, 0.8f, sFileMenuTextIds, 2); +#else // VERSION_US menuCreateItems(fileMenuEraseFile(), 142, 6, 1.0f, 1.0f, sFileMenuTextIds, 2); +#endif sFileColorR1 = 255.0f; sFileColorG1 = 10.0f; sFileColorB1 = 10.0f; @@ -185,7 +193,11 @@ void fileMenuSetup(s32 menu) { sFileColorB2 = 10.0f; break; case 2: +#if defined(VERSION_JP) + menuCreateItems(fileMenuPrintText(sFileMenuConfirm, 2), 145, 6, 1.0f, 1.0f, sFileMenuConfirm, 2); +#else // VERSION_US menuCreateItems(fileMenuPrintText(sFileMenuConfirm, 2), 140, 6, 1.0f, 1.0f, sFileMenuConfirm, 2); +#endif sFileColorR1 = 255.0f; sFileColorG1 = 10.0f; sFileColorB1 = 10.0f; @@ -484,7 +496,11 @@ void fileMenu_802E9AE0(void) { titleStr = textGetDataByIdx(TEXT_ERASE_SEL2); break; } +#if defined(VERSION_JP) + uvFontPrintStr16((SCREEN_WIDTH / 2) - (uvFontStr16Width(titleStr) / 2), 208, titleStr, 0x14, 0xFFE); +#else // VERSION_US uvFontPrintStr16((SCREEN_WIDTH / 2) - (uvFontStr16Width(titleStr) / 2), 206, titleStr, 0x3C, 0xFFE); +#endif uvFontGenDlist(); func_8034B6F8(); } diff --git a/src/app/fountain.c b/src/app/fountain.c index cdb09e31..46c3879b 100644 --- a/src/app/fountain.c +++ b/src/app/fountain.c @@ -54,9 +54,11 @@ STATIC_FUNC void fountainUpdate(void) { STATIC_FUNC s32 fountainProxEventCb(UNUSED s32 proxId, s32 eventType, UNUSED s32 clientData) { switch (eventType) { case 0: +#if !defined(VERSION_JP) if (sFountainObjId != 0xFFFF) { uvDobjState(sFountainObjId, 2); } +#endif break; case 2: if (sFountainRadarId != 0xFF) { @@ -94,6 +96,9 @@ STATIC_FUNC s32 fountainProxAnimCb(s32 proxId, UNUSED f32 timeout, UNUSED s32 cl } else { if ((sFountainState == 1) || !sFountainActive) { sFountainActive = TRUE; +#if defined(VERSION_JP) + sFountainScale = 0.0f; +#endif sFountainState = 0; uvDobjState(sFountainObjId, 2); } @@ -161,7 +166,11 @@ void fountainGetPos(Vec3F* pos) { void fountainSetInterval(f32 interval) { if (sFountainObjId != 0xFFFF) { +#if defined(VERSION_JP) + sFountainScale = interval; +#else sFountainScale = interval * 0.7f; +#endif fountainUpdatePose(); } } @@ -176,7 +185,9 @@ void fountainStateRestore(void) { sFountainState = sFountainStateCopy; } +#if !defined(VERSION_JP) void fountainInitUpdate(void) { fountainStateRestore(); fountainUpdate(); } +#endif diff --git a/src/app/game.c b/src/app/game.c index 54aa3a82..373e4b23 100644 --- a/src/app/game.c +++ b/src/app/game.c @@ -604,7 +604,7 @@ s32 gameUpdateStateResults(Unk80362690* arg0) { func_802F56B4(temp_s0->vehicleData, temp_s0->unk78); break; case VEHICLE_ROCKET_BELT: - func_803273C8(temp_s0->vehicleData, temp_s0->unk78); + rocketBelt_803273C8(temp_s0->vehicleData, temp_s0->unk78); break; case VEHICLE_CANNONBALL: cannonMovementFrame(temp_s0->vehicleData, arg0->state); @@ -638,7 +638,7 @@ s32 gameUpdateStateResults(Unk80362690* arg0) { func_802F56B4(temp_s0->vehicleData, temp_s0->unk78); break; case VEHICLE_ROCKET_BELT: - func_803273C8(temp_s0->vehicleData, temp_s0->unk78); + rocketBelt_803273C8(temp_s0->vehicleData, temp_s0->unk78); break; case VEHICLE_CANNONBALL: cannonMovementFrame(temp_s0->vehicleData, arg0->state); diff --git a/src/app/gyrocopter.c b/src/app/gyrocopter.c index 11c38972..534932ff 100644 --- a/src/app/gyrocopter.c +++ b/src/app/gyrocopter.c @@ -1489,9 +1489,11 @@ void func_80307EA8(GyrocopterData* gcData) { if (gcData->unk10.m[3][2] > 700.0f) { spD8 = 1.0f - ((gcData->unk10.m[3][2] - 700.0f) / 100.0f); +#if !defined(VERSION_JP) if (spD8 < 0.0f) { spD8 = 0.0f; } +#endif } else { spD8 = 1.0f; } diff --git a/src/app/gyrocopter_sound.c b/src/app/gyrocopter_sound.c index fc2f6958..bf8cf787 100644 --- a/src/app/gyrocopter_sound.c +++ b/src/app/gyrocopter_sound.c @@ -2,11 +2,12 @@ #include #include #include "kernel/code_8170.h" -#include "app/demo.h" -#include "app/gyrocopter.h" -#include "app/hud.h" -#include "app/snd.h" -#include "app/code_9A960.h" +#include "code_9A960.h" +#include "demo.h" +#include "gyrocopter.h" +#include "hud.h" +#include "snd.h" +#include "text_data.h" EventCallbackInfo D_80369E50; Unk803599D0 D_80369E58; @@ -107,11 +108,11 @@ void hsound_callback(s32 eventType, void* arg1, s32 eventData) { if (gyrocopterData->unk678 & 1) { break; } - if (gyrocopterData->hasLowFuel && (hudGet_8031DA9C() == 0x17B) && (gyrocopterData->unk684 < D_8034F850)) { + if (gyrocopterData->hasLowFuel && (hudGet_8031DA9C() == TEXT_FUEL_WAR) && (gyrocopterData->unk684 < D_8034F850)) { gyrocopterData->unk684 = D_8034F850 + 0.2f; sndPlaySfxVolPitchPan(0x6C, 0.8f, 0.707f, 0.0f); } - if (gyrocopterData->hasLowFuel && (hudGet_8031DA9C() == 0x4A) && (gyrocopterData->unk688 < D_8034F850)) { + if (gyrocopterData->hasLowFuel && (hudGet_8031DA9C() == TEXT_FUEL_OUT) && (gyrocopterData->unk688 < D_8034F850)) { gyrocopterData->unk688 = D_8034F850 + 0.2f; sndPlaySfxVolPitchPan(0x6C, 0.8f, 0.707f, 0.0f); } @@ -243,7 +244,11 @@ void func_8030ABF8(GyrocopterData* gcData) { if ((gcData->unkC0 == 4) && (gcData->unk50 != -1)) { if (!(gcData->unk678 & 0x20)) { gcData->unk678 |= 0x20; +#if defined(VERSION_JP) + if (gcData->unk6C != 0) { +#else // VERSION_US if ((gcData->unk6C != 0) && (gcData->unk4 == 0xFFFF)) { +#endif sndSetMusic(BGM_GYROCOPTER_LAND_OK); } else { sndSetMusic(BGM_GYROCOPTER_LAND_MISS); @@ -358,4 +363,3 @@ void func_8030B240(Mtx4F* mat) { uvEmitterSetPitch(emitterId, 1.0f); uvEmitterSetMatrix(emitterId, mat); } - diff --git a/src/app/hang_glider_sound.c b/src/app/hang_glider_sound.c index 2518ba0a..9e69c929 100644 --- a/src/app/hang_glider_sound.c +++ b/src/app/hang_glider_sound.c @@ -8,6 +8,7 @@ #include "hang_glider.h" #include "hud.h" #include "snd.h" +#include "text_data.h" STATIC_DATA EventCallbackInfo sHgSoundEventCbInfo; STATIC_DATA Unk803599D0 sHgSound_80368318; @@ -80,7 +81,7 @@ STATIC_FUNC void hgSoundEventHandler(s32 event, void* userData, s32 eventData) { if (hg->unk324 < D_8034F850) { temp_v0 = hudGet_8031DA9C(); - if ((temp_v0 == 0x157) || (temp_v0 == 0x15C)) { + if ((temp_v0 == TEXT_STALL_WA) || (temp_v0 == TEXT_STALL_AT)) { hg->unk324 = D_8034F850 + 1.0f; sndPlaySfx(SFX_UI_WARNING); } @@ -157,9 +158,14 @@ STATIC_FUNC void hgSoundEvent22(HangGliderData* hg) { if (hg->unk8C == 3) { if (!(hg->unk318 & 0x2)) { hg->unk318 |= 0x2; - sndPlaySfx(0x36); + sndPlaySfx(SFX_CRASH_LANDING_REVEAL); if (!(hg->unk318 & 0x10)) { +#if defined(VERSION_JP) + // TODO: is this enum reuse or reorder? + sndSetMusic(BGM_ROCKET_BELT_CRASH); +#else // VERSION_US sndSetMusic(BGM_HANG_GLIDER_CRASH); +#endif sndSetMusicState(MUS_STATE_PLAY_SEQ); func_8033FCD0(sp34->veh); } diff --git a/src/app/hud.c b/src/app/hud.c index 6df741cd..6bf4561c 100644 --- a/src/app/hud.c +++ b/src/app/hud.c @@ -83,7 +83,11 @@ void hudDemoContButton(s32 spriteId, s32 x, s32 y); void hudInit(void) { D_8034F914 = 0; +#if defined(VERSION_JP) + D_8036D224 = 0; +#else // VERSION_US D_8036D224 = 1; +#endif D_8034F910 = 0.0f; sHudState.renderFlags = 0; sHudState.unkC = 0; @@ -974,6 +978,9 @@ void hudDrawThrottle(s32 x, s32 y, f32 power) { uvGfxMtxViewPop(); } +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/app/hud/hudDrawRadar.s") +#else // VERSION_US void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDRadar* radar) { Mtx4F sp108; Mtx4F spC8; @@ -1228,6 +1235,7 @@ void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDR uvSprtDraw(0); uvGfxMtxViewPop(); } +#endif void hudDemoContButton(s32 spriteId, s32 x, s32 y) { uvSprtProps(spriteId, SPRT_PROP_POS(x + 20, 200 - y), SPRT_PROP_END); @@ -1785,7 +1793,11 @@ void hudDrawLowFuel(HUDState* hud) { } else { uvFontColor(0xFF, 0x00, 0x00, 0xFF); // red } +#if defined(VERSION_JP) + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(&hud->unkB40[0]) - 16) / 2), 125, &hud->unkB40[0], 0x14, 0xFFE); +#else // VERSION_US uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(&hud->unkB40[0]) - 16) / 2), 125, &hud->unkB40[0], 0x28, 0xFFE); +#endif } } @@ -1803,7 +1815,11 @@ void hudDrawStartText(HUDState* hud) { } else { uvFontColor(0x00, 0x28, 0xFF, 0xFF); // blue } +#if defined(VERSION_JP) + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(&hud->unkBD0[0]) - 16) / 2), 140, &hud->unkBD0[0], 0x14, 0xFFE); +#else // VERSION_US uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(&hud->unkBD0[0]) - 16) / 2), 140, &hud->unkBD0[0], 0x28, 0xFFE); +#endif } } diff --git a/src/app/level_select.c b/src/app/level_select.c index 56f62a8c..e45220de 100644 --- a/src/app/level_select.c +++ b/src/app/level_select.c @@ -17,7 +17,7 @@ #include #include -f32 D_8036A8C0; +f32 D_8036A8C0; // 0x8035D2B0 f32 D_8036A8C4; s8 D_8036A8C8; s8 D_8036A8C9; @@ -210,6 +210,7 @@ void func_8030DED0(void) { SPRT_PROP_END ); } +#if !defined(VERSION_JP) for (i = 0; i < 3; i++) { uvSprtProps(i + 13, SPRT_PROP_ENABLED(TRUE), @@ -220,6 +221,7 @@ void func_8030DED0(void) { SPRT_PROP_END ); } +#endif // clang-format on temp_s4 = &D_80364210[D_80362690->unk9C]; for (i = CLASS_BEGINNER; i < CLASS_COUNT; i++) { @@ -652,6 +654,7 @@ s32 func_8030EA54(void) { } return -1; } + void func_8030F448(void) { s32 i; @@ -694,11 +697,13 @@ void func_8030F448(void) { uvSprtDraw(i + 9); } } +#if !defined(VERSION_JP) for (i = 1; i < 4; i++) { if (D_8036A8D8[i] == FALSE) { uvSprtDraw(i + 12); } } +#endif } func_80314154(); @@ -752,7 +757,11 @@ void func_8030F818(void) { fileMenuColorLerp(D_8034F7DC, 44.0f, 214.0f, 44.0f, 145.0f, 183.0f, 255.0f, &r, &g, &b); uvFontColor(r, g, b, 0xFF); str16 = textGetDataByIdx(TEXT_LEVEL_SEL); +#if defined(VERSION_JP) + uvFontPrintStr16((SCREEN_WIDTH / 2) - (uvFontStr16Width(str16) / 2), 208, str16, 20, 0xFFE); +#else // VERSION_US uvFontPrintStr16((SCREEN_WIDTH / 2) - (uvFontStr16Width(str16) / 2), 206, str16, 40, 0xFFE); +#endif uvFontSet(3); uvFontScale(1.0, 1.0); fontWidth = uvFontWidth("A"); diff --git a/src/app/map3d.c b/src/app/map3d.c index 4684d873..8798d467 100644 --- a/src/app/map3d.c +++ b/src/app/map3d.c @@ -80,6 +80,10 @@ void map3dMain(Unk80362690* arg0, s32 arg1) { map3dDeinit(arg0, arg1); } +#if defined(VERSION_JP) +// https://decomp.me/scratch/0sYkN +#pragma GLOBAL_ASM("asm/nonmatchings/app/map3d/map3dLoad.s") +#else // VERSION_US void map3dLoad(Unk80362690* arg0, s32 arg1) { Mtx4F sp148; Camera* camera; @@ -562,6 +566,7 @@ void map3dLoad(Unk80362690* arg0, s32 arg1) { sMapEmitterDev0 = sndMakeDev(SFX_UI_MAP_MOVE); sMapEmitterDev1 = sndMakeDev(0x03); } +#endif s32 map3dHandler(u8 arg0, s32 arg1) { f32 sp3C; diff --git a/src/app/menu_utils.c b/src/app/menu_utils.c index 5eddb2c1..b7f2a734 100644 --- a/src/app/menu_utils.c +++ b/src/app/menu_utils.c @@ -59,6 +59,11 @@ void menuUtilCreate(s32 x, s32 y, s32 font, f32 xScale, f32 yScale, char** menuI sMenuSoundFlags = MENU_SOUND_CHANGE | MENU_SOUND_BACK | MENU_SOUND_SELECT; } +#if defined(VERSION_JP) +// US reordered this function +// https://decomp.me/scratch/CqJps +#pragma GLOBAL_ASM("asm/nonmatchings/app/menu_utils/menuUtilCheckInputs.s") +#else // VERSION_US s32 menuUtilCheckInputs(void) { f32 stickY; s32 menuItemChanged; @@ -117,11 +122,16 @@ s32 menuUtilCheckInputs(void) { return -2; } } +#endif void menuUtilDeinit(void) { sMenuUtilItems = NULL; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/haaSh +#pragma GLOBAL_ASM("asm/nonmatchings/app/menu_utils/menuUtilRender.s") +#else // VERSION_US void menuUtilRender(void) { s32 temp_a3; s32 var_s1; @@ -164,6 +174,7 @@ void menuUtilRender(void) { var_s1 -= fontHeight + 1; } } +#endif s32 menuUtilGetCurItem(void) { return sMenuCurSelect; diff --git a/src/app/options.c b/src/app/options.c index 67a41c69..ed670b83 100644 --- a/src/app/options.c +++ b/src/app/options.c @@ -137,7 +137,11 @@ void optionsInitSound(void) { sOptionMenuItems[2] = TEXT_BGM_V1; sOptionMenuItems[3] = TEXT_SFX_V1; sOptionMenuItems[4] = TEXT_QUIT; +#if defined(VERSION_JP) + menuCreateItems(60, 70, 6, 1.0f, 1.0f, sOptionMenuItems, 5); +#else // VERSION_US menuCreateItems(40, 70, 6, 1.0f, 1.0f, sOptionMenuItems, 5); +#endif menuUtilSetColors(MENU_COLOR_ITEM, 0xFF, 0xFF, 0xFF); menuUtilSetColors(MENU_COLOR_SELECTED, 0xFF, 0xFF, 0); optionsSetSetting(0, sStereoMono); @@ -470,7 +474,11 @@ void optionsSetTrack(s32 menuItem, s32 trackIdx) { if (menuItem == 1) { trackStr = textGetDataByIdx(TEXT_STRACK); +#if defined(VERSION_JP) + textFmtIntAt(trackStr, trackIdx + 1, 2, 4); +#else // VERSION_US textFmtIntAt(trackStr, trackIdx + 1, 2, 13); +#endif menuSetItem(1, trackStr); } } diff --git a/src/app/pilot_select.c b/src/app/pilot_select.c index 694a0d14..72bef9e8 100644 --- a/src/app/pilot_select.c +++ b/src/app/pilot_select.c @@ -182,7 +182,7 @@ STATIC_FUNC void func_802DD57C(Camera* camera) { uvSprtProps(4, SPRT_PROP_ENABLED(TRUE), SPRT_PROP_POS(82, 140), - SPRT_PROP_BLIT(0x41), + SPRT_PROP_BLIT(BLIT_ID_41), SPRT_PROP_END ); uvSprtProps(5, @@ -441,7 +441,7 @@ STATIC_FUNC void func_802DE5B0(Camera* camera, Unk80367868* arg1) { static f32 D_8034EED8 = 1.6f; s16* pilotName; s16* selectPilotText; - s16 temp; + s16 x; f32 r; f32 g; f32 b; @@ -462,8 +462,12 @@ STATIC_FUNC void func_802DE5B0(Camera* camera, Unk80367868* arg1) { uvFontColor(r, g, b, 0xFF); selectPilotText = textGetDataByIdx(TEXT_PILOT_SEL); if (selectPilotText != NULL) { - temp = ((SCREEN_WIDTH / 2) - (uvFontStr16Width(selectPilotText) / 2)); - uvFontPrintStr16(temp, 0xCE, selectPilotText, 0x14, 0xFFE); + x = ((SCREEN_WIDTH / 2) - (uvFontStr16Width(selectPilotText) / 2)); +#if defined(VERSION_JP) + uvFontPrintStr16(x, 208, selectPilotText, 0x14, 0xFFE); +#else // VERSION_US + uvFontPrintStr16(x, 206, selectPilotText, 0x14, 0xFFE); +#endif } pilotName = textGetDataByIdx(arg1->unk4[D_8034EDC0].textId); uvFontSet(6); diff --git a/src/app/replay_screen.c b/src/app/replay_screen.c index 5735b2af..c7aaeff4 100644 --- a/src/app/replay_screen.c +++ b/src/app/replay_screen.c @@ -34,6 +34,12 @@ #include "whale.h" #include "wind_objects.h" +#if defined(VERSION_JP) +#define CONTROLLER_MSG_LEN 0x14 +#else // VERSION_US +#define CONTROLLER_MSG_LEN 0x3C +#endif + s32 sShutterBugTestItems[] = { TEXT_CONTINUE_SGI, TEXT_CHECKMAP_SGI, TEXT_CHECK_PHOTOS_SGI, TEXT_QUIT_SGI }; s32 sSkyDivingItems[] = { TEXT_CONTINUE_SGI, TEXT_QUIT_SGI }; s32 sOtherItems[] = { TEXT_CONTINUE_SGI, TEXT_CHECKMAP_SGI, TEXT_QUIT_SGI }; @@ -251,7 +257,9 @@ void func_8032CC44(Unk80362690* arg0) { sp2C = &arg0->unkC[arg0->unk9C]; sp1B = 1; func_8032D51C(0); +#if !defined(VERSION_JP) whaleStateSave(); +#endif level_8030BA60(); if (arg0->unkA0 == 0) { sp1B = 0; @@ -339,7 +347,9 @@ void func_8032CC44(Unk80362690* arg0) { taskLoad(); cannon_802D8A40(0, (CannonballData*)sp2C->vehicleData); hudInit(); +#if !defined(VERSION_JP) whaleStateRestore(); +#endif } s32 func_8032CF28(Unk80362690* arg0) { @@ -551,10 +561,10 @@ void func_8032D90C(void) { uvFontSet(6); uvFontScale(1.0, 1.0); uvFontColor(r2, g2, b2, 0xFF); - uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg1) - 16) / 2), 155, msg1, 0x3C, 0xFFE); - uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg2) - 16) / 2), 135, msg2, 0x3C, 0xFFE); - uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg3) - 16) / 2), 115, msg3, 0x3C, 0xFFE); - uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg4) - 16) / 2), 95, msg4, 0x3C, 0xFFE); + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg1) - 16) / 2), 155, msg1, CONTROLLER_MSG_LEN, 0xFFE); + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg2) - 16) / 2), 135, msg2, CONTROLLER_MSG_LEN, 0xFFE); + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg3) - 16) / 2), 115, msg3, CONTROLLER_MSG_LEN, 0xFFE); + uvFontPrintStr16((SCREEN_WIDTH / 2) - ((uvFontStr16Width(msg4) - 16) / 2), 95, msg4, CONTROLLER_MSG_LEN, 0xFFE); uvFontGenDlist(); func_803141E4(); uvGfxEnd(); diff --git a/src/app/results.c b/src/app/results.c index d6ce79ae..37b3f65c 100644 --- a/src/app/results.c +++ b/src/app/results.c @@ -143,11 +143,7 @@ STATIC_DATA u8 sResultPtTypes[6][4][3][4] = { { { 0x03, 0x00, 0x00, 0x00 }, { 0x03, 0x00, 0x00, 0x00 }, { 0x03, 0x00, 0x00, 0x00 } } } }; -STATIC_DATA s32 sResultMenu[] = { - 0x0E, // "Check photo" - 0x60, // "Replay" - 0x5B // "Next" -}; +STATIC_DATA s32 sResultMenu[] = { TEXT_PHOTO_SGI, TEXT_REPLAY_SGI, TEXT_NEXT_SGI }; STATIC_DATA s16* sPtsTallyStr[] = { sPtsTally0, @@ -226,7 +222,11 @@ void resultGenMenu(void) { sResultMenu[idx++] = TEXT_REPLAY_SGI; } sResultMenu[idx++] = TEXT_NEXT_SGI; +#if defined(VERSION_JP) + menuCreateItems(204, 2, 6, 1.0f, 1.0f, sResultMenu, idx); +#else // VERSION_US menuCreateItems(170, 2, 6, 1.0f, 1.0f, sResultMenu, idx); +#endif if (resultListPhoto() && !func_8033F62C()) { menu_8030B69C(1); } @@ -360,8 +360,10 @@ void resultInit(s32 arg0) { ptsTotal = 0; } textFmtInt(sTotalPointsStr, ptsTotal, 3); +#if !defined(VERSION_JP) textId = (ptsTotal == 1) ? TEXT_PT : TEXT_PTS; sPtsLabelStr = textGetDataByIdx(textId); +#endif } sReplayTipSet = FALSE; } @@ -442,6 +444,10 @@ s32 resultMenuChoose(s32 arg0) { return ret; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/0qA3N +#pragma GLOBAL_ASM("asm/nonmatchings/app/results/resultDrawTally.s") +#else // VERSION_US void resultDrawTally(s32 arg0) { Unk80362690_Unk0* unkC; s32 alpha; @@ -528,6 +534,7 @@ void resultDrawTally(s32 arg0) { } uvFontGenDlist(); } +#endif void resultGenTipText(s32 veh) { s16* text; diff --git a/src/app/rings.c b/src/app/rings.c index 29f10e3f..06b51a92 100644 --- a/src/app/rings.c +++ b/src/app/rings.c @@ -36,11 +36,6 @@ STATIC_DATA s32 sRingModelIdLookup[2][4][5] = { { 0x00, 0x00, 0x00, 0x00, 0x00 } } }; -// forward declarations -void rings_803234A4(Ring* ring); -void rings_80323720(Ring* ring); -s32 rings_80323FFC(s32 ringIdx); - void ringsInit(void) { Ring* var_v1; s32 i; @@ -367,7 +362,11 @@ s32 rings_80323FFC(s32 ringIdx) { } if (sp54 > 1) { textStr = textGetDataByIdx(TEXT_LEFT_CNT); +#if defined(VERSION_JP) + textFmtIntAt(textStr, sp54 - 1, 2, 2); +#else // VERSION_US textFmtIntAt(textStr, sp54 - 1, 2, 0); +#endif hudWarningText(TEXT_LEFT_CNT, 3.0f, 8.0f); } } @@ -397,7 +396,11 @@ s32 rings_80323FFC(s32 ringIdx) { hudText_8031D8E0(TEXT_R_PASS_C, 3.0f, 8.0f); if (sp54 > 1) { textStr = textGetDataByIdx(TEXT_LEFT_CNT); +#if defined(VERSION_JP) + textFmtIntAt(textStr, sp54 - 1, 2, 2); +#else // VERSION_US textFmtIntAt(textStr, sp54 - 1, 2, 0); +#endif hudWarningText(TEXT_LEFT_CNT, 3.0f, 8.0f); } } else { @@ -406,7 +409,11 @@ s32 rings_80323FFC(s32 ringIdx) { hudText_8031D8E0(TEXT_R_PASS_N, 3.0f, 8.0f); if (sp54 > 1) { textStr = textGetDataByIdx(TEXT_LEFT_CNT); +#if defined(VERSION_JP) + textFmtIntAt(textStr, sp54 - 1, 2, 2); +#else // VERSION_US textFmtIntAt(textStr, sp54 - 1, 2, 0); +#endif hudWarningText(TEXT_LEFT_CNT, 3.0f, 8.0f); } break; @@ -414,7 +421,11 @@ s32 rings_80323FFC(s32 ringIdx) { hudText_8031D8E0(TEXT_R_PASS_B, 3.0f, 8.0f); if (sp54 > 0) { textStr = textGetDataByIdx(TEXT_LEFT_CNT); +#if defined(VERSION_JP) + textFmtIntAt(textStr, sp54 - 1, 2, 2); +#else // VERSION_US textFmtIntAt(textStr, sp54 - 1, 2, 0); +#endif hudWarningText(TEXT_LEFT_CNT, 3.0f, 8.0f); } break; diff --git a/src/app/rocket_belt.c b/src/app/rocket_belt.c index b7b11eba..664e89cb 100644 --- a/src/app/rocket_belt.c +++ b/src/app/rocket_belt.c @@ -291,7 +291,11 @@ void func_80328D74(RocketBeltData* rbData) { rbData->unk214.x = func_80313AF4(0.0f, rbData->unk214.x, rbData->unk310); rbData->unk214.y = func_80313AF4(0.0f, rbData->unk214.y, rbData->unk310); rbData->unk214.z = func_80313AF4(0.0f, rbData->unk214.z, rbData->unk310); +#if defined(VERSION_JP) + if ((D_8034F850 - rbData->unkF4) > 3.75f) { +#else // VERSION_US if ((D_8034F850 - rbData->unkF4) >= 3.75f) { +#endif rbData->unk90 = 3; } } @@ -308,7 +312,9 @@ void func_80328F44(RocketBeltData* rbData) { s32 sp34; rbData->unkFC = 1000000.0f; +#if !defined(VERSION_JP) sp5C = 0.0f; +#endif sp34 = rbData->unk380; sp2C = (Vec3F*)rbData->unk10.m[3]; sp3B = db_getgnd(&rbData->unk374, sp2C, &sp34, &sp48, &sp5C, &sp4C); @@ -515,6 +521,10 @@ void func_80329628(RocketBeltData* rbData) { rbData->unk204.z += rbData->unk314 * sp28.z; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/AsbPb +#pragma GLOBAL_ASM("asm/nonmatchings/app/rocket_belt/func_8032975C.s") +#else // VERSION_US void func_8032975C(RocketBeltData* rbData) { Vec3F sp2AC; Vec3F sp2A0; @@ -832,6 +842,7 @@ void func_8032975C(RocketBeltData* rbData) { rbData->unk90 = 0; } } +#endif void func_8032A4A8(RocketBeltData* rbData) { f32 var_fs0; diff --git a/src/app/rocket_belt.h b/src/app/rocket_belt.h index 29842459..6c4d3d0b 100644 --- a/src/app/rocket_belt.h +++ b/src/app/rocket_belt.h @@ -161,11 +161,11 @@ void func_80325100(RocketBeltData*); void rocketBeltMovementFrame(RocketBeltData*, u8); void func_80325E1C(RocketBeltData*); -void func_80326F30(RocketBeltData*); -void func_80327040(RocketBeltData*, u8); -void func_80327380(RocketBeltData*); -void func_803273C8(RocketBeltData*, u8); -void func_80327614(RocketBeltData*); +void rocketBelt_80326F30(RocketBeltData*); +void rocketBelt_80327040(RocketBeltData*, u8); +void rocketBelt_80327380(RocketBeltData*); +void rocketBelt_803273C8(RocketBeltData*, u8); +void rocketBelt_80327614(RocketBeltData*); void func_80328420(RocketBeltData*); void func_80328538(RocketBeltData*); diff --git a/src/app/rocket_belt_sound.c b/src/app/rocket_belt_sound.c index df477e98..6d6c9437 100644 --- a/src/app/rocket_belt_sound.c +++ b/src/app/rocket_belt_sound.c @@ -5,15 +5,22 @@ #include "hud.h" #include "rocket_belt.h" #include "snd.h" +#include "text_data.h" STATIC_DATA EventCallbackInfo sRbSoundEventCbInfo; STATIC_DATA Unk803599D0 sRbSound_80371898; STATIC_FUNC void rbSoundEventHandler(s32, void*, s32); +#if defined(VERSION_JP) +// TODO: make STATIC_FUNC once functions are matched +void rbSoundEvent12_22(RocketBeltData* rbData); +void rbSoundSubEvent(RocketBeltData* rbData); +#else // VERSION_US STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData); +STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData); +#endif STATIC_FUNC void rbSoundEvent12_18(RocketBeltData* rbData); STATIC_FUNC void rbSoundEvent19(RocketBeltData* rbData); -STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData); STATIC_FUNC void rbSoundEvent13(RocketBeltData* rbData); void rbSoundInit(RocketBeltData* rbData) { @@ -73,11 +80,11 @@ STATIC_FUNC void rbSoundEventHandler(s32 event, void* userData, s32 eventData) { break; } sp48 = 0.0f; - if ((rbData->unkEB != 0) && (hudGet_8031DA9C() == 0x17B) && (rbData->unk394 < D_8034F850)) { + if ((rbData->unkEB != 0) && (hudGet_8031DA9C() == TEXT_FUEL_WAR) && (rbData->unk394 < D_8034F850)) { rbData->unk394 = D_8034F850 + 0.2f; sndPlaySfxVolPitchPan(0x6C, 0.8f, 0.707f, sp48); } - if ((rbData->unkEC != 0) && (hudGet_8031DA9C() == 0x4A) && (rbData->unk398 < D_8034F850)) { + if ((rbData->unkEC != 0) && (hudGet_8031DA9C() == TEXT_FUEL_OUT) && (rbData->unk398 < D_8034F850)) { rbData->unk398 = D_8034F850 + 0.2f; sndPlaySfxVolPitchPan(0x6C, 0.8f, 0.707f, sp48); } @@ -173,6 +180,9 @@ STATIC_FUNC void rbSoundEventHandler(s32 event, void* userData, s32 eventData) { } } +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/app/rocket_belt_sound/rbSoundEvent12_22.s") +#else // VERSION_US STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData) { Unk80362690_Unk0* sp34; s32 sfxId; @@ -221,6 +231,7 @@ STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData) { } } } +#endif STATIC_FUNC void rbSoundEvent12_18(RocketBeltData* rbData) { rbData->unk384 |= 1; @@ -235,6 +246,9 @@ STATIC_FUNC void rbSoundEvent19(RocketBeltData* rbData) { rbData->unk384 &= ~1; } +#if defined(VERSION_JP) +#pragma GLOBAL_ASM("asm/nonmatchings/app/rocket_belt_sound/rbSoundSubEvent.s") +#else // VERSION_US STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData) { f32 temp_fs0; f32 var_fv1; @@ -274,6 +288,7 @@ STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData) { } } } +#endif STATIC_FUNC void rbSoundEvent13(RocketBeltData* rbData) { rbData->unk388 = func_8033F8CC(rbData->unk388); @@ -284,4 +299,3 @@ STATIC_FUNC void rbSoundEvent13(RocketBeltData* rbData) { func_80200180(0, 4, 0.0f, 0); uvEventRemoveCb(sRbSoundEventCbInfo, 1, 0xD, 0x12, 0x13, 0x10, 0xC, 0x16, 0x24); } - diff --git a/src/app/save.c b/src/app/save.c index 46bfd27c..bac3fb0c 100644 --- a/src/app/save.c +++ b/src/app/save.c @@ -52,6 +52,7 @@ STATIC_FUNC void saveBitScramble(u8* data, s32* bitOffset, s32 bits, s32 bitCoun } } +#if !defined(VERSION_JP) // fatal error handler: attempts to render message and infinite loops STATIC_FUNC void saveFatalError(char* msg) { s32 xScreen; @@ -79,8 +80,14 @@ s32 saveFileInit(s32 fileIdx) { // cast sizeof to int/u16 to match? return uvFileWrite(sSaveFiles[fileIdx].raw, fileIdx * (int)sizeof(PilotwingsSaveFile), sizeof(PilotwingsSaveFile)) != sizeof(PilotwingsSaveFile); } +#endif void saveModuleInit(void) { +#if defined(VERSION_JP) + if (uvFileRead(&sSaveFiles, 0, sizeof(sSaveFiles)) == 0) { + uvMemSet(&sSaveFiles, 0, sizeof(sSaveFiles)); + } +#else // VERSION_US if (uvFileRead(sSaveFiles, 0, sizeof(sSaveFiles)) != sizeof(sSaveFiles)) { saveFatalError("EEPROM CHECK FAILED"); } else { @@ -97,6 +104,7 @@ void saveModuleInit(void) { } } } +#endif _uvMediaCopy(sSaveFilesMirror, &sSaveFiles, sizeof(sSaveFiles)); } @@ -215,6 +223,12 @@ int saveFileHasData(s32 fileIdx) { return (sSaveFiles[fileIdx].magic[0] == 'P') && (sSaveFiles[fileIdx].magic[1] == 'W'); } +#if defined(VERSION_JP) +// https://decomp.me/scratch/nTviI +// similar to US version of saveFileInit above +#pragma GLOBAL_ASM("asm/nonmatchings/app/save/saveFileInit.s") +#endif + s32 saveFile_802E89D4(s32 fileIdx) { s32 sp1C; diff --git a/src/app/snap.c b/src/app/snap.c index 65802188..76e011b0 100644 --- a/src/app/snap.c +++ b/src/app/snap.c @@ -777,12 +777,14 @@ void func_8033A020(s32 arg0) { } void func_8033A078(s32 arg0) { +#if !defined(VERSION_JP) u8* ptr; ptr = taskGet_80345CB0(); if ((D_80362690->state != GAME_STATE_OPTIONS) && (ptr[1] == 1)) { snowEnable(); } +#endif if (D_80350590 != 0) { D_80350590 = 0; if ((arg0 == 0) || (D_80350594 != 0)) { @@ -905,7 +907,11 @@ void func_8033A244(s32 arg0, Unk80373060* arg1) { fountainStateRestore(); break; case 4: +#if defined(VERSION_JP) + missiStateRestore(); +#else // VERSION_US whaleStateRestore(); +#endif break; case 3: missiStateRestore(); @@ -1015,6 +1021,11 @@ void func_8033A72C(void) { uvGfxEnd(); } +#if defined(VERSION_JP) +// https://decomp.me/scratch/J88ei +#pragma GLOBAL_ASM("asm/nonmatchings/app/snap/func_8033ADD4.s") +void func_8033ADD4(s32 arg0, Unk80373060* arg1, s32 arg2, s32 arg3); +#else // VERSION_US void func_8033ADD4(s32 arg0, Unk80373060* arg1, s32 arg2, s32 arg3) { Mtx4F spA0; Mtx4F sp60; @@ -1204,6 +1215,29 @@ void func_8033ADD4(s32 arg0, Unk80373060* arg1, s32 arg2, s32 arg3) { uvGfxMtxViewPop(); uvGfxEnd(); } +#endif + +#if defined(VERSION_JP) +#define POLY_VTX_X_OFF_0 25.0f +#define POLY_VTX_X_OFF_1 25.0f +#define POLY_VTX_X_OFF_2 57.0f +#define POLY_VTX_Y_0 30 +#define POLY_VTX_Y_1 43 +#define POLY_VTX_S_0 0x180 +#define POLY_VTX_S_1 0x320 +#define POLY_VTX_S_2 0x320 +#define POLY_VTX_S_3 0x720 +#else // VERSION_US +#define POLY_VTX_X_OFF_0 13.0f +#define POLY_VTX_X_OFF_1 30.0f +#define POLY_VTX_X_OFF_2 77.0f +#define POLY_VTX_Y_0 28 +#define POLY_VTX_Y_1 44 +#define POLY_VTX_S_0 0x1C0 +#define POLY_VTX_S_1 0x1A0 +#define POLY_VTX_S_2 0x3C0 +#define POLY_VTX_S_3 0x9A0 +#endif void func_8033BF00(s32 arg0, s32 arg1, s32 arg2) { Mtx4F sp88; @@ -1241,19 +1275,19 @@ void func_8033BF00(s32 arg0, s32 arg1, s32 arg2) { sp3C = D_80373E10; uvGfxBindTexture(0x142); uvVtxBeginPoly(); - uvVtx(sp3C, 28, 0, 0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 17.0f, 28, 0, 0x220, 0, 255, 255, 255, 255); - uvVtx(sp3C + 17.0f, 42, 0, 0x220, 0x1C0, 255, 255, 255, 255); - uvVtx(sp3C, 42, 0, 0, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_0, 0, 0, 0, 255, 255, 255, 255); + uvVtx(sp3C + 17.0f, POLY_VTX_Y_0, 0, 0x220, 0, 255, 255, 255, 255); + uvVtx(sp3C + 17.0f, 42, 0, 0x220, POLY_VTX_S_0, 255, 255, 255, 255); + uvVtx(sp3C, 42, 0, 0, POLY_VTX_S_0, 255, 255, 255, 255); uvVtxEndPoly(); } else { sp3C = D_80373E14; uvGfxBindTexture(0x143); uvVtxBeginPoly(); - uvVtx(sp3C, 28, 0, 0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 13.0f, 28, 0, 0x1A0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 13.0f, 42, 0, 0x1A0, 0x1C0, 255, 255, 255, 255); - uvVtx(sp3C, 42, 0, 0, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_0, 0, 0, 0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_0, POLY_VTX_Y_0, 0, POLY_VTX_S_1, 0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_0, 42, 0, POLY_VTX_S_1, POLY_VTX_S_0, 255, 255, 255, 255); + uvVtx(sp3C, 42, 0, 0, POLY_VTX_S_0, 255, 255, 255, 255); uvVtxEndPoly(); } } else if (arg1 != 0) { @@ -1261,18 +1295,18 @@ void func_8033BF00(s32 arg0, s32 arg1, s32 arg2) { uvGfxBindTexture(0x13E); uvVtxBeginPoly(); uvVtx(sp3C, 30, 0, 0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 30.0f, 30, 0, 0x3C0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 30.0f, 44, 0, 0x3C0, 0x1C0, 0, 255, 255, 255); - uvVtx(sp3C, 44, 0, 0, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_1, 30, 0, POLY_VTX_S_2, 0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_1, POLY_VTX_Y_1, 0, POLY_VTX_S_2, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_1, 0, 0, 0x1C0, 0, 255, 255, 255); uvVtxEndPoly(); } else { sp3C = D_80373E14; uvGfxBindTexture(0x13F); uvVtxBeginPoly(); uvVtx(sp3C, 30, 0, 0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 77.0f, 30, 0, 0x9A0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 77.0f, 44, 0, 0x9A0, 0x1C0, 0, 255, 255, 255); - uvVtx(sp3C, 44, 0, 0, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_2, 30, 0, POLY_VTX_S_3, 0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_2, POLY_VTX_Y_1, 0, POLY_VTX_S_3, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_1, 0, 0, 0x1C0, 0, 255, 255, 255); uvVtxEndPoly(); } uvGfxStatePop(); @@ -1287,19 +1321,19 @@ void func_8033BF00(s32 arg0, s32 arg1, s32 arg2) { sp3C = D_80373E10; uvGfxBindTexture(0x142); uvVtxBeginPoly(); - uvVtx(sp3C, 28, 0, 0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 17.0f, 28, 0, 0x220, 0, 0, 255, 255, 255); - uvVtx(sp3C + 17.0f, 42, 0, 0x220, 0x1C0, 0, 255, 255, 255); - uvVtx(sp3C, 42, 0, 0, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_0, 0, 0, 0, 0, 255, 255, 255); + uvVtx(sp3C + 17.0f, POLY_VTX_Y_0, 0, 0x220, 0, 0, 255, 255, 255); + uvVtx(sp3C + 17.0f, 42, 0, 0x220, POLY_VTX_S_0, 0, 255, 255, 255); + uvVtx(sp3C, 42, 0, 0, POLY_VTX_S_0, 0, 255, 255, 255); uvVtxEndPoly(); } else { sp3C = D_80373E10; uvGfxBindTexture(0x13E); uvVtxBeginPoly(); uvVtx(sp3C, 30, 0, 0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 30.0f, 30, 0, 0x3C0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 30.0f, 44, 0, 0x3C0, 0x1C0, 255, 255, 255, 255); - uvVtx(sp3C, 44, 0, 0, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_1, 30, 0, POLY_VTX_S_2, 0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_1, POLY_VTX_Y_1, 0, POLY_VTX_S_2, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_1, 0, 0, 0x1C0, 255, 255, 255, 255); uvVtxEndPoly(); } } else { @@ -1309,19 +1343,19 @@ void func_8033BF00(s32 arg0, s32 arg1, s32 arg2) { sp3C = D_80373E14; uvGfxBindTexture(0x143); uvVtxBeginPoly(); - uvVtx(sp3C, 28, 0, 0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 13.0f, 28, 0, 0x1A0, 0, 0, 255, 255, 255); - uvVtx(sp3C + 13.0f, 42, 0, 0x1A0, 0x1C0, 0, 255, 255, 255); - uvVtx(sp3C, 42, 0, 0, 0x1C0, 0, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_0, 0, 0, 0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_0, POLY_VTX_Y_0, 0, POLY_VTX_S_1, 0, 0, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_0, 42, 0, POLY_VTX_S_1, POLY_VTX_S_0, 0, 255, 255, 255); + uvVtx(sp3C, 42, 0, 0, POLY_VTX_S_0, 0, 255, 255, 255); uvVtxEndPoly(); } else { sp3C = D_80373E14; uvGfxBindTexture(0x13F); uvVtxBeginPoly(); uvVtx(sp3C, 30, 0, 0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 77.0f, 30, 0, 0x9A0, 0, 255, 255, 255, 255); - uvVtx(sp3C + 77.0f, 44, 0, 0x9A0, 0x1C0, 255, 255, 255, 255); - uvVtx(sp3C, 44, 0, 0, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_2, 30, 0, POLY_VTX_S_3, 0, 255, 255, 255, 255); + uvVtx(sp3C + POLY_VTX_X_OFF_2, POLY_VTX_Y_1, 0, POLY_VTX_S_3, 0x1C0, 255, 255, 255, 255); + uvVtx(sp3C, POLY_VTX_Y_1, 0, 0, 0x1C0, 255, 255, 255, 255); uvVtxEndPoly(); } } @@ -1475,7 +1509,11 @@ s32 func_8033D3EC(s32 arg0, s32 arg1, Unk80373060* arg2, s32* arg3, s32* arg4) { uvFontSet(6); uvFontColor((s32)r, (s32)g, (s32)b, 0xFF); uvFontScale(1.0, 1.0); +#if defined(VERSION_JP) + uvFontPrintStr16(70, 194, textGetDataByIdx(TEXT_VIEW_PHOTO1), 100, 0xFFE); +#else // VERSION_US uvFontPrintStr16(70, 190, textGetDataByIdx(TEXT_VIEW_PHOTO1), 100, 0xFFE); +#endif uvFontGenDlist(); uvGfxEnd(); if ((demoButtonPress(0, B_BUTTON) != 0) || ((arg1 == 0) && (demoButtonPress(0, START_BUTTON) != 0))) { @@ -1748,6 +1786,10 @@ void func_8033DFD0(s32 arg0, Unk80373060* arg1, s32 arg2) { func_8033A6B8(); } +#if defined(VERSION_JP) +// https://decomp.me/scratch/igj04 +#pragma GLOBAL_ASM("asm/nonmatchings/app/snap/func_8033E3A8.s") +#else // VERSION_US s32 func_8033E3A8(s32 arg0) { s32 spC4; s32 var_s0; @@ -1856,6 +1898,7 @@ s32 func_8033E3A8(s32 arg0) { func_8033FCD0(vehIdx); return D_80350550; } +#endif void func_8033E784(Unk8033F050* arg0, s32 arg1, s32 arg2) { if (arg2 != 0) { diff --git a/src/app/targets.c b/src/app/targets.c index 983cc95e..980f7b24 100644 --- a/src/app/targets.c +++ b/src/app/targets.c @@ -159,7 +159,11 @@ f32 targets_8034473C(s32 arg0, s32 arg1) { func_8032C080(&remaining); if (remaining >= 2) { +#if defined(VERSION_JP) + textFmtIntAt(textGetDataByIdx(TEXT_LEFT_CNT), remaining - 1, 2, 2); +#else // VERSION_US textFmtIntAt(textGetDataByIdx(TEXT_LEFT_CNT), remaining - 1, 2, 0); +#endif hudWarningText(TEXT_LEFT_CNT, 1.5f, 8.0f); } diff --git a/src/app/test_menu.c b/src/app/test_menu.c index b76173f9..db293518 100644 --- a/src/app/test_menu.c +++ b/src/app/test_menu.c @@ -173,6 +173,10 @@ void testMenuInitText(s32 testIdx) { } } +#if defined(VERSION_JP) +// https://decomp.me/scratch/2H6Fi +#pragma GLOBAL_ASM("asm/nonmatchings/app/test_menu/testMenuInit.s") +#else // VERSION_US void testMenuInit(Unk80367710* arg0, s32 arg1) { Unk80362690_Unk0* temp_v1; @@ -304,7 +308,12 @@ void testMenuInit(Unk80367710* arg0, s32 arg1) { sDrawTestPts = FALSE; testMenuInitText(sCurTestIdx); } +#endif +#if defined(VERSION_JP) +// https://decomp.me/scratch/O3gns +#pragma GLOBAL_ASM("asm/nonmatchings/app/test_menu/testMenuHandler.s") +#else // VERSION_US u8 testMenuHandler(Unk80367710* arg0) { Unk80362690_Unk0* sp6C; s32 testIdxAdj; @@ -537,6 +546,7 @@ u8 testMenuHandler(Unk80367710* arg0) { } return 6; } +#endif void testMenuDraw(Camera* camera, u8 classIdx, u8 vehIdx) { s32 pad1; @@ -578,10 +588,19 @@ void testMenuDraw(Camera* camera, u8 classIdx, u8 vehIdx) { } else { sp54 = sTestHintText; } +#if defined(VERSION_JP) + screenDrawBox2(38, 80, 244, 110, 2, 0, 100, 0); + screenDrawBox2(38, 195, 191, 25, 2, 0, 100, 0); +#else // VERSION_US screenDrawBox2(38, 80, 244, 110, 2, 0, 0xA0, 0); screenDrawBox2(38, 195, 191, 25, 2, 0, 0xA0, 0); +#endif if (sp48->veh != VEHICLE_BIRDMAN) { +#if defined(VERSION_JP) + screenDrawBox2(235, 195, 48, 25, 2, 0, 100, 0); +#else // VERSION_US screenDrawBox2(235, 195, 48, 25, 2, 0, 0xA0, 0); +#endif } func_80314154(); @@ -625,7 +644,11 @@ void testMenuDraw(Camera* camera, u8 classIdx, u8 vehIdx) { uvGfxStatePop(); } } +#if defined(VERSION_JP) + func_802DEE44(sSelMenuScreenX + 0.5, sSelMenuScreenY + 0.5, 0x42, 0x18, 3, 0xC8, 0xC8, 0, 0x64, 0x64, 0); +#else // VERSION_US func_802DEE44(sSelMenuScreenX + 0.5, sSelMenuScreenY + 0.5, 0x46, 0x18, 3, 0xC8, 0xC8, 0, 0x64, 0x64, 0); +#endif func_803141E4(); uvFontSet(0); uvFontScale(1.0, 0.800000011920929); @@ -635,7 +658,11 @@ void testMenuDraw(Camera* camera, u8 classIdx, u8 vehIdx) { uvFontSet(6); uvFontColor(0xBE, 0xBE, 0xBE, 0xFF); uvFontScale(1.0, 1.0); +#if defined(VERSION_JP) + uvFontPrintStr16(79, 198, sTestNameText, 10, 0xFFE); +#else // VERSION_US uvFontPrintStr16(79, 196, sTestNameText, 0xFF, 0xFFE); +#endif } if (sDrawTestPts && (sp48->veh != VEHICLE_BIRDMAN)) { uvFontSet(3); @@ -651,8 +678,13 @@ void testMenuDraw(Camera* camera, u8 classIdx, u8 vehIdx) { uvFontColor(0xD2, 0xD2, 0xD2, 0xFF); uvFontScale(1.0, 1.0); idx = 0; +#if defined(VERSION_JP) + for (var_a1 = 168; var_a1 > -232; var_a1 -= 20) { + temp_v0_3 = uvFontPrintStr16(46, var_a1, &sp54[idx], 0x10, 0xFFE); +#else // VERSION_US for (var_a1 = 166; var_a1 > -114; var_a1 -= 14) { temp_v0_3 = uvFontPrintStr16(46, var_a1, &sp54[idx], 0xFF, 0xFFE); +#endif if (temp_v0_3 == -1) { break; } diff --git a/src/app/test_summary.c b/src/app/test_summary.c index e8425b77..3d32c90b 100644 --- a/src/app/test_summary.c +++ b/src/app/test_summary.c @@ -47,7 +47,7 @@ u16 D_8034F480[][2] = { { BLIT_ID_23, 220 }, { BLIT_ID_24, 220 }, { BLIT_ID_25, 220 }, - { BLIT_ID_2D, 220 }, + { BLIT_ID_2D, 220 } }; // blitId, x offset @@ -194,6 +194,10 @@ s32 func_8030C61C(void) { return ret; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/JzhI1 +#pragma GLOBAL_ASM("asm/nonmatchings/app/test_summary/func_8030C6A0.s") +#else // VERSION_US void func_8030C6A0(void) { Unk80362690_Unk0* sp74; s16* sp70; @@ -259,6 +263,7 @@ void func_8030C6A0(void) { } uvFontGenDlist(); } +#endif void func_8030CB10(void) { Camera* camera = D_80362690->unkC[D_80362690->unk9C].unk70; diff --git a/src/app/text_data.c b/src/app/text_data.c index c610e17d..a511f975 100644 --- a/src/app/text_data.c +++ b/src/app/text_data.c @@ -16,6 +16,10 @@ STATIC_DATA s16* sTextData[439]; STATIC_DATA s32 sTextDataCount; STATIC_DATA s32 sTextNameCount; +#if defined(VERSION_JP) +// https://decomp.me/scratch/BWIqE +#pragma GLOBAL_ASM("asm/nonmatchings/app/text_data/textLoadBlock.s") +#else // VERSION_US void textLoadBlock(s32 userFileIdx) { s32 block; u32 tag; @@ -57,6 +61,7 @@ void textLoadBlock(s32 userFileIdx) { } uvFile_80223F30(block); } +#endif s16* textGetDataByName(const char* needle) { s16* dataStr; @@ -79,6 +84,10 @@ s16* textGetDataByIdx(s32 idx) { return NULL; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/AhsTF +#pragma GLOBAL_ASM("asm/nonmatchings/app/text_data/textFmtInt.s") +#else // VERSION_US s32 textFmtInt(s16* dst, s32 val, s32 length) { s32 digits; s32 fill; @@ -106,7 +115,12 @@ s32 textFmtInt(s16* dst, s32 val, s32 length) { return digits * 0x10; } +#endif +#if defined(VERSION_JP) +// https://decomp.me/scratch/XVRFS +#pragma GLOBAL_ASM("asm/nonmatchings/app/text_data/textFmtIntAt.s") +#else // VERSION_US s32 textFmtIntAt(s16* dst, s32 val, s32 length, s32 dstOffset) { s32 digits; s32 fill; @@ -133,3 +147,4 @@ s32 textFmtIntAt(s16* dst, s32 val, s32 length, s32 dstOffset) { return digits * 0x10; } +#endif diff --git a/src/app/text_data.h b/src/app/text_data.h index 29b97a52..80e0155a 100644 --- a/src/app/text_data.h +++ b/src/app/text_data.h @@ -4,6 +4,451 @@ #include enum TextId { +#if defined(VERSION_JP) + // TODO: does JP have notion of PT or PTS strings? + TEXT_PT = 0x08A, + TEXT_PTS = 0x131, + + TEXT_P_BD_4_M = 0x000, + TEXT_B_BD_3_N = 0x001, + TEXT_HG_P1_S2 = 0x002, + TEXT_B_BD_4_N = 0x003, + TEXT_B_CLR_N = 0x004, + TEXT_COUNT_3 = 0x005, + TEXT_WINDOW2 = 0x006, + TEXT_THERM_OFF = 0x007, + TEXT_C_TERGET_2 = 0x008, + TEXT_HG_A1_S2 = 0x009, + TEXT_GC_B2_S1 = 0x00A, + TEXT_A_HG_1_H = 0x00B, + TEXT_HANG = 0x00C, + TEXT_SFX_V2 = 0x00D, + TEXT_CONTINUE = 0x00E, + TEXT_QUIT_SGI = 0x00F, + TEXT_A_HG_2_H = 0x010, + TEXT_P_EX_1_H = 0x011, + TEXT_FILE_SEL = 0x012, + TEXT_P_EX_2_H = 0x013, + TEXT_LEFT_CNT = 0x014, + TEXT_P_EX_3_H = 0x015, + TEXT_RP_E_S2 = 0x016, + TEXT_HG_B2_S1 = 0x017, + TEXT_E_BD_1_H = 0x018, + TEXT_LARK = 0x019, + TEXT_E_HG_1_N = 0x01A, + TEXT_E_BD_2_H = 0x01B, + TEXT_HP_L123_S2 = 0x01C, + TEXT_E_BD_3_H = 0x01D, + TEXT_FOUNTAIN = 0x01E, + TEXT_RP_B3_S2 = 0x01F, + TEXT_E_BD_4_H = 0x020, + TEXT_OPTION = 0x021, + TEXT_OFF_2 = 0x022, + TEXT_FILE_2 = 0x023, + TEXT_CANON_2 = 0x024, + TEXT_FILE_ERASE = 0x025, + TEXT_GC_8_A = 0x026, + TEXT_HG_8_A = 0x027, + TEXT_RP_B1_S2 = 0x028, + TEXT_E_S3_PERFECT = 0x029, + TEXT_RP_15_A = 0x02A, + TEXT_RP_13_A = 0x02B, + TEXT_A_RP_1_H = 0x02C, + TEXT_GC_P2_S1 = 0x02D, + TEXT_RP_11_A = 0x02E, + TEXT_R_PASS_B = 0x02F, + TEXT_A_GC_1_H = 0x030, + TEXT_BGM_V3 = 0x031, + TEXT_P_HG_1_M = 0x032, + TEXT_A_RP_2_H = 0x033, + TEXT_SHIP = 0x034, + TEXT_A_GC_2_H = 0x035, + TEXT_LAND_GAI = 0x036, + TEXT_B_BD_1_H = 0x037, + TEXT_P_HG_2_M = 0x038, + TEXT_B_HG_1_N = 0x039, + TEXT_BD_ALL_S1 = 0x03A, + TEXT_GC_A2_S1 = 0x03B, + TEXT_HAWK = 0x03C, + TEXT_YES = 0x03D, + TEXT_B_BD_2_H = 0x03E, + TEXT_P_HG_3_M = 0x03F, + TEXT_B_HG_2_N = 0x040, + TEXT_GC_6_A = 0x041, + TEXT_HG_6_A = 0x042, + TEXT_B_BD_3_H = 0x043, + TEXT_B_HG_3_N = 0x044, + TEXT_GC_14_A = 0x045, + TEXT_C_ISLANBD = 0x046, + TEXT_TRANING_ISLAND = 0x047, + TEXT_B_S3_PERFECT = 0x048, + TEXT_E_RP_1_N = 0x049, + TEXT_GC_12_A = 0x04A, + TEXT_B_BD_4_H = 0x04B, + TEXT_E_GC_1_N = 0x04C, + TEXT_GC_10_A = 0x04D, + TEXT_E_S3_SILVER = 0x04E, + TEXT_HG_14_A = 0x04F, + TEXT_HG_P2_S1 = 0x050, + TEXT_HG_12_A = 0x051, + TEXT_LEVEL2 = 0x052, + TEXT_HG_10_A = 0x053, + TEXT_B_S3_SILVER = 0x054, + TEXT_END_MES_P = 0x055, + TEXT_HG_A2_S1 = 0x056, + TEXT_SKYDIVER = 0x057, + TEXT_ROCKET = 0x058, + TEXT_PHOTO_ALBUM = 0x059, + TEXT_RP_P3_S2 = 0x05A, + TEXT_GC_4_A = 0x05B, + TEXT_HG_4_A = 0x05C, + TEXT_LAND_OK = 0x05D, + TEXT_OVER_400 = 0x05E, + TEXT_NO_CNT3 = 0x05F, + TEXT_STRACK = 0x060, + TEXT_RP_P1_S2 = 0x061, + TEXT_SFX_V5 = 0x062, + TEXT_C_TERGET_3 = 0x063, + TEXT_CONTINUE_SGI = 0x064, + TEXT_GC_E_S1 = 0x065, + TEXT_P_RP_1_M = 0x066, + TEXT_P_GC_1_M = 0x067, + TEXT_RP_A1_S2 = 0x068, + TEXT_HG_E_S1 = 0x069, + TEXT_E_HG_1_H = 0x06A, + TEXT_B_RP_1_N = 0x06B, + TEXT_P_RP_2_M = 0x06C, + TEXT_P_BD_1_N = 0x06D, + TEXT_A_EX_1_N = 0x06E, + TEXT_B_GC_1_N = 0x06F, + TEXT_P_GC_2_M = 0x070, + TEXT_B_EX_1_M = 0x071, + TEXT_B_RP_2_N = 0x072, + TEXT_P_RP_3_M = 0x073, + TEXT_GC_2_A = 0x074, + TEXT_P_BD_2_N = 0x075, + TEXT_A_EX_2_N = 0x076, + TEXT_B_GC_2_N = 0x077, + TEXT_P_GC_3_M = 0x078, + TEXT_HG_2_A = 0x079, + TEXT_B_EX_2_M = 0x07A, + TEXT_B_RP_3_N = 0x07B, + TEXT_P_BD_3_N = 0x07C, + TEXT_A_EX_3_N = 0x07D, + TEXT_B_GC_3_N = 0x07E, + TEXT_P_S3_PERFECT = 0x07F, + TEXT_RP_9_A = 0x080, + TEXT_R_PASS_S = 0x081, + TEXT_B_EX_3_M = 0x082, + TEXT_COUNT_1 = 0x083, + TEXT_P_S3_GOLD = 0x084, + TEXT_TRY2 = 0x085, + TEXT_P_BD_4_N = 0x086, + TEXT_A_S3_GOLD = 0x087, + TEXT_GYRO = 0x088, + TEXT_FILE_11 = 0x089, + TEXT_FILE_21 = 0x08A, + TEXT_END_MES_P2 = 0x08B, + TEXT_RP_B2_S1 = 0x08C, + TEXT_QUIT = 0x08D, + TEXT_E_S3_GREAT = 0x08E, + TEXT_B_S3_GREAT = 0x08F, + TEXT_GOLD_QFY = 0x090, + TEXT_GC_B2_S2 = 0x091, + TEXT_HOOTER = 0x092, + TEXT_LAND_OK2 = 0x093, + TEXT_RP_7_A = 0x094, + TEXT_B_HG_1_H = 0x095, + TEXT_CHECK_PHOTOS_SGI = 0x096, + TEXT_WHALE = 0x097, + TEXT_BGM_V1 = 0x098, + TEXT_B_HG_2_H = 0x099, + TEXT_VIEW_PHOTO1 = 0x09A, + TEXT_SILVER_QFY = 0x09B, + TEXT_FIRST = 0x09C, + TEXT_B_HG_3_H = 0x09D, + TEXT_A_BD_1_M = 0x09E, + TEXT_E_RP_1_H = 0x09F, + TEXT_OFF_5 = 0x0A0, + TEXT_E_GC_1_H = 0x0A1, + TEXT_C_MISS = 0x0A2, + TEXT_A_BD_2_M = 0x0A3, + TEXT_HG_B2_S2 = 0x0A4, + TEXT_FLAME = 0x0A5, + TEXT_LEFT_SHT = 0x0A6, + TEXT_A_BD_3_M = 0x0A7, + TEXT_HP_L3_S1 = 0x0A8, + TEXT_RP_5_A = 0x0A9, + TEXT_A_BD_4_M = 0x0AA, + TEXT_F_HIT_M = 0x0AB, + TEXT_ANOTHER_TASK_SGI = 0x0AC, + TEXT_HP_L1_S1 = 0x0AD, + TEXT_START = 0x0AE, + TEXT_B_SPLIT = 0x0AF, + TEXT_C_PERFECT = 0x0B0, + TEXT_GREAT_QFY = 0x0B1, + TEXT_RP_P2_S1 = 0x0B2, + TEXT_F_DIE = 0x0B3, + TEXT_E_S3_GOLD = 0x0B4, + TEXT_STRIKE = 0x0B5, + TEXT_SFX_V3 = 0x0B6, + TEXT_RP_3_A = 0x0B7, + TEXT_GC_P2_S2 = 0x0B8, + TEXT_R_PASS_C = 0x0B9, + TEXT_BD_ALL_S2 = 0x0BA, + TEXT_B_RP_1_H = 0x0BB, + TEXT_RP_A2_S1 = 0x0BC, + TEXT_P_BD_1_H = 0x0BD, + TEXT_A_EX_1_H = 0x0BE, + TEXT_B_GC_1_H = 0x0BF, + TEXT_P_HG_1_N = 0x0C0, + TEXT_B_RP_2_H = 0x0C1, + TEXT_P_BD_2_H = 0x0C2, + TEXT_A_EX_2_H = 0x0C3, + TEXT_B_GC_2_H = 0x0C4, + TEXT_P_HG_2_N = 0x0C5, + TEXT_GC_A2_S2 = 0x0C6, + TEXT_B_RP_3_H = 0x0C7, + TEXT_P_BD_3_H = 0x0C8, + TEXT_A_EX_3_H = 0x0C9, + TEXT_B_GC_3_H = 0x0CA, + TEXT_P_HG_3_N = 0x0CB, + TEXT_C_TERGET_4 = 0x0CC, + TEXT_IBIS = 0x0CD, + TEXT_CANON_3 = 0x0CE, + TEXT_P_BD_4_H = 0x0CF, + TEXT_P_S3_BLONDS = 0x0D0, + TEXT_HG_P2_S2 = 0x0D1, + TEXT_RP_1_A = 0x0D2, + TEXT_OK = 0x0D3, + TEXT_MINI_USA = 0x0D4, + TEXT_HG_A2_S2 = 0x0D5, + TEXT_GC_B3_S1 = 0x0D6, + TEXT_PHOTO_SGI = 0x0D7, + TEXT_VIEW_PHOTO2 = 0x0D8, + TEXT_SD_L123_S1 = 0x0D9, + TEXT_CONGURA = 0x0DA, + TEXT_A_S3_PERFECT = 0x0DB, + TEXT_A_S3_BLONDS = 0x0DC, + TEXT_END_MES_P3 = 0x0DD, + TEXT_GC_B1_S1 = 0x0DE, + TEXT_A_HG_1_M = 0x0DF, + TEXT_BGM_V4 = 0x0E0, + TEXT_NO_CNT = 0x0E1, + TEXT_P_RP_1_N = 0x0E2, + TEXT_A_HG_2_M = 0x0E3, + TEXT_P_GC_1_N = 0x0E4, + TEXT_P_EX_1_M = 0x0E5, + TEXT_P_RP_2_N = 0x0E6, + TEXT_HG_B3_S1 = 0x0E7, + TEXT_P_GC_2_N = 0x0E8, + TEXT_END_MES_G2 = 0x0E9, + TEXT_B_EX_1_N = 0x0EA, + TEXT_P_EX_2_M = 0x0EB, + TEXT_P_RP_3_N = 0x0EC, + TEXT_P_GC_3_N = 0x0ED, + TEXT_B_EX_2_N = 0x0EE, + TEXT_P_EX_3_M = 0x0EF, + TEXT_HG_B1_S1 = 0x0F0, + TEXT_E_BD_1_M = 0x0F1, + TEXT_B_EX_3_N = 0x0F2, + TEXT_R_PASS_T = 0x0F3, + TEXT_CB_L123_S1 = 0x0F4, + TEXT_CRASH = 0x0F5, + TEXT_LEVEL3 = 0x0F6, + TEXT_MISSY = 0x0F7, + TEXT_GC_9_A = 0x0F8, + TEXT_E_BD_2_M = 0x0F9, + TEXT_NO_CNT4 = 0x0FA, + TEXT_HG_9_A = 0x0FB, + TEXT_FUEL_OUT = 0x0FC, + TEXT_MODE_STEREO = 0x0FD, + TEXT_E_BD_3_M = 0x0FE, + TEXT_GC_E_S2 = 0x0FF, + TEXT_RP_B2_S2 = 0x100, + TEXT_DUMMY = 0x101, + TEXT_E_BD_4_M = 0x102, + TEXT_HG_E_S2 = 0x103, + TEXT_NEXT_SGI = 0x104, + TEXT_GC_P3_S1 = 0x105, + TEXT_P_HG_1_H = 0x106, + TEXT_REPLAY_SGI = 0x107, + TEXT_BONUS_S3_BLONDS = 0x108, + TEXT_RP_14_A = 0x109, + TEXT_SFX_V1 = 0x10A, + TEXT_RP_12_A = 0x10B, + TEXT_P_HG_2_H = 0x10C, + TEXT_RP_10_A = 0x10D, + TEXT_GC_7_A = 0x10E, + TEXT_GC_P1_S1 = 0x10F, + TEXT_P_S3_GREAT = 0x110, + TEXT_OPTION2 = 0x111, + TEXT_HG_7_A = 0x112, + TEXT_A_RP_1_M = 0x113, + TEXT_COUNT_2 = 0x114, + TEXT_P_HG_3_H = 0x115, + TEXT_WINDOW1 = 0x116, + TEXT_A_GC_1_M = 0x117, + TEXT_END_MES_G = 0x118, + TEXT_A_S3_GREAT = 0x119, + TEXT_A_RP_2_M = 0x11A, + TEXT_A_GC_2_M = 0x11B, + TEXT_A_BD_1_N = 0x11C, + TEXT_FILE_12 = 0x11D, + TEXT_B_BD_1_M = 0x11E, + TEXT_FILE_22 = 0x11F, + TEXT_GC_A1_S1 = 0x120, + TEXT_A_BD_2_N = 0x121, + TEXT_ARCTIC = 0x122, + TEXT_GC_15_A = 0x123, + TEXT_B_BD_2_M = 0x124, + TEXT_HG_P3_S1 = 0x125, + TEXT_GOOSE = 0x126, + TEXT_GC_13_A = 0x127, + TEXT_LAND_OUT2 = 0x128, + TEXT_A_BD_3_N = 0x129, + TEXT_VIEW_PHOTO3 = 0x12A, + TEXT_GC_11_A = 0x12B, + TEXT_HG_15_A = 0x12C, + TEXT_B_BD_3_M = 0x12D, + TEXT_HG_13_A = 0x12E, + TEXT_A_BD_4_N = 0x12F, + TEXT_LAND_OUT = 0x130, + TEXT_HG_11_A = 0x131, + TEXT_B_BD_4_M = 0x132, + TEXT_HG_P1_S1 = 0x133, + TEXT_GC_5_A = 0x134, + TEXT_ERASE_SEL = 0x135, + TEXT_HG_5_A = 0x136, + TEXT_RP_E_S1 = 0x137, + TEXT_SOUND_OPTIONS = 0x138, + TEXT_FILE_1 = 0x139, + TEXT_HG_A1_S1 = 0x13A, + TEXT_BONUS_S3_GOLD = 0x13B, + TEXT_BD_ALL_S3 = 0x13C, + TEXT_RP_P2_S2 = 0x13D, + TEXT_BONUS_S3_PERFECT = 0x13E, + TEXT_P_RP_1_H = 0x13F, + TEXT_SHUTTLE = 0x140, + TEXT_P_GC_1_H = 0x141, + TEXT_LAND_MOW = 0x142, + TEXT_P_RP_2_H = 0x143, + TEXT_BGM_V2 = 0x144, + TEXT_RP_A2_S2 = 0x145, + TEXT_GC_3_A = 0x146, + TEXT_P_GC_2_H = 0x147, + TEXT_CANON_1 = 0x148, + TEXT_HG_3_A = 0x149, + TEXT_SD_L123_S2 = 0x14A, + TEXT_TRY3 = 0x14B, + TEXT_B_EX_1_H = 0x14C, + TEXT_P_RP_3_H = 0x14D, + TEXT_P_GC_3_H = 0x14E, + TEXT_BLONDS_QFY = 0x14F, + TEXT_B_EX_2_H = 0x150, + TEXT_B_EX_3_H = 0x151, + TEXT_E_HG_1_M = 0x152, + TEXT_R_PASS_N = 0x153, + TEXT_POINTS = 0x154, + TEXT_ERASE_SEL2 = 0x155, + TEXT_MODE_MONO = 0x156, + TEXT_LEVEL_SEL = 0x157, + TEXT_END_MES_G3 = 0x158, + TEXT_LEVEL1 = 0x159, + TEXT_C_TERGET_1 = 0x15A, + TEXT_GC_1_A = 0x15B, + TEXT_RP_B3_S1 = 0x15C, + TEXT_HG_1_A = 0x15D, + TEXT_RP_8_A = 0x15E, + TEXT_P_S3_SILVER = 0x15F, + TEXT_CANNON = 0x160, + TEXT_GC_B3_S2 = 0x161, + TEXT_CB_L123_S2 = 0x162, + TEXT_BONUS_S3_GREAT = 0x163, + TEXT_RP_B1_S1 = 0x164, + TEXT_B_S3_GOLD = 0x165, + TEXT_NO = 0x166, + TEXT_TRY1 = 0x167, + TEXT_GC_B1_S2 = 0x168, + TEXT_SFX_V4 = 0x169, + TEXT_S_OPEN = 0x16A, + TEXT_A_BD_1_H = 0x16B, + TEXT_A_HG_1_N = 0x16C, + TEXT_VIEW_PHOTO4 = 0x16D, + TEXT_OUT = 0x16E, + TEXT_E_S3_BLONDS = 0x16F, + TEXT_B_HG_1_M = 0x170, + TEXT_PHOTO = 0x171, + TEXT_A_BD_2_H = 0x172, + TEXT_A_HG_2_N = 0x173, + TEXT_B_S3_BLONDS = 0x174, + TEXT_B_HG_2_M = 0x175, + TEXT_P_EX_1_N = 0x176, + TEXT_RP_6_A = 0x177, + TEXT_A_S3_SILVER = 0x178, + TEXT_HG_B3_S2 = 0x179, + TEXT_A_BD_3_H = 0x17A, + TEXT_CHECKMAP_SGI = 0x17B, + TEXT_KIWI = 0x17C, + TEXT_B_HG_3_M = 0x17D, + TEXT_P_EX_2_N = 0x17E, + TEXT_NO_CNT2 = 0x17F, + TEXT_A_BD_4_H = 0x180, + TEXT_E_RP_1_M = 0x181, + TEXT_STALL_WA = 0x182, + TEXT_E_GC_1_M = 0x183, + TEXT_P_EX_3_N = 0x184, + TEXT_STALL_AT = 0x185, + TEXT_HG_B1_S2 = 0x186, + TEXT_GOAL = 0x187, + TEXT_MUSHI = 0x188, + TEXT_E_BD_1_N = 0x189, + TEXT_HP_L2_S1 = 0x18A, + TEXT_E_BD_2_N = 0x18B, + TEXT_E_BD_3_N = 0x18C, + TEXT_RP_P3_S1 = 0x18D, + TEXT_RP_4_A = 0x18E, + TEXT_BONUS_S3_SILVER = 0x18F, + TEXT_PILOT_SEL = 0x190, + TEXT_E_BD_4_N = 0x191, + TEXT_GC_P3_S2 = 0x192, + TEXT_RP_P1_S1 = 0x193, + TEXT_FUEL_WAR = 0x194, + TEXT_FILE_10 = 0x195, + TEXT_FILE_20 = 0x196, + TEXT_BGM_V5 = 0x197, + TEXT_GC_P1_S2 = 0x198, + TEXT_B_HIT_M = 0x199, + TEXT_RETRY_SGI = 0x19A, + TEXT_GAMESTART = 0x19B, + TEXT_A_RP_1_N = 0x19C, + TEXT_RP_A1_S1 = 0x19D, + TEXT_B_RP_1_M = 0x19E, + TEXT_A_GC_1_N = 0x19F, + TEXT_B_GC_1_M = 0x1A0, + TEXT_A_EX_1_M = 0x1A1, + TEXT_P_BD_1_M = 0x1A2, + TEXT_A_RP_2_N = 0x1A3, + TEXT_RP_2_A = 0x1A4, + TEXT_B_RP_2_M = 0x1A5, + TEXT_A_GC_2_N = 0x1A6, + TEXT_B_BD_1_N = 0x1A7, + TEXT_B_GC_2_M = 0x1A8, + TEXT_A_EX_2_M = 0x1A9, + TEXT_P_BD_2_M = 0x1AA, + TEXT_GC_A1_S2 = 0x1AB, + TEXT_P_CLR = 0x1AC, + TEXT_LAND_NOW2 = 0x1AD, + TEXT_B_RP_3_M = 0x1AE, + TEXT_B_HIT_B = 0x1AF, + TEXT_C_POINTS = 0x1B0, + TEXT_HG_P3_S2 = 0x1B1, + TEXT_B_BD_2_N = 0x1B2, + TEXT_B_GC_3_M = 0x1B3, + TEXT_A_EX_3_M = 0x1B4, + TEXT_P_BD_3_M = 0x1B5, + TEXT_PERFECT_QFY = 0x1B6, +#else TEXT_RP_1_A = 0x000, // < Hovering > ... TEXT_P_BD_4_M = 0x001, // Little States | - Starry Night - TEXT_HG_P2_S2 = 0x002, // Ring 0/40 pts. ... @@ -443,6 +888,7 @@ enum TextId { TEXT_HG_P3_S2 = 0x1B4, // Photo Pts. 0/60 pts. ... TEXT_PERFECT_QFY = 0x1B5, // needed for perfect score TEXT_P_S3_BLONDS = 0x1B6, // < 210 pts. for Bronze Badge. > ... +#endif }; // load TEXT and DATA blocks for user file index diff --git a/src/app/title_screen.c b/src/app/title_screen.c index a4181837..54b0e2c8 100644 --- a/src/app/title_screen.c +++ b/src/app/title_screen.c @@ -61,6 +61,12 @@ STATIC_DATA s32 sMainMenuItems[] = { TEXT_GAMESTART, TEXT_OPTION }; Unk80378CE0* D_80378CE0; f32 D_80378CE4; +#if defined(VERSION_JP) +// TODO: remove when (J) matches +#undef STATIC_FUNC +#define STATIC_FUNC +#endif + // forward decls STATIC_FUNC void func_803427FC(void); // init function STATIC_FUNC void func_80343294(void); // deinit function @@ -112,6 +118,10 @@ s32 func_80342630(void) { return var_s1; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/qvdZR +#pragma GLOBAL_ASM("asm/nonmatchings/app/title_screen/func_803427FC.s") +#else // VERSION_US STATIC_FUNC void func_803427FC(void) { Mtx4F sp58; Camera* camera; @@ -204,6 +214,7 @@ STATIC_FUNC void func_803427FC(void) { func_8033FCD0(0xFFU); } } +#endif STATIC_FUNC void func_80342D2C(void) { Unk803136C4_Arg0 sp2FC; @@ -301,11 +312,17 @@ STATIC_FUNC void func_803433A4(void) { } } +#if !defined(VERSION_JP) void func_803434E8(void) { uvClkReset(UV_CLKID_APP); while (uvClkGetSec(UV_CLKID_APP) < 1.0) { } } +#endif +#if defined(VERSION_JP) +// https://decomp.me/scratch/svW3A +#pragma GLOBAL_ASM("asm/nonmatchings/app/title_screen/func_80343550.s") +#else // VERSION_US STATIC_FUNC s32 func_80343550(void) { s32 temp_v0; s32 gameState; @@ -413,6 +430,7 @@ STATIC_FUNC s32 func_80343550(void) { D_80378CE0->unk22C += D_8034F854; return gameState; } +#endif STATIC_FUNC void introSceneRunner(void) { Camera* camera = D_80362690->unkC[D_80362690->unk9C].unk70; @@ -424,6 +442,9 @@ STATIC_FUNC void introSceneRunner(void) { } uvSprtDraw(1); +#if defined(VERSION_JP) + uvSprtDraw(2); +#endif uvSprtDraw(3); if ((D_80378CE0->unk22C - D_80378CE0->unk230) <= 2.0f) { sp30 = (s32)(((D_80378CE0->unk22C - D_80378CE0->unk230) * 80.0f) + 0.5f) * (1.0f / 2.0f); @@ -439,7 +460,11 @@ STATIC_FUNC void introSceneRunner(void) { screenDrawBoxSetup(); screenDrawBox(30, 18, 285, 34, 0, 0, 0, sp30); +#if defined(VERSION_JP) + screenDrawBox(89, 74, 222, 120, 0, 0, 0, sp30); +#else // VERSION_US screenDrawBox(97, 76, 202, 118, 0, 0, 0, sp30); +#endif func_802DFA18(); if (D_80378CE0->unk22C >= 16.65f) { menuRender(); diff --git a/src/app/total_results.c b/src/app/total_results.c index 06f238cd..0c68447d 100644 --- a/src/app/total_results.c +++ b/src/app/total_results.c @@ -24,7 +24,9 @@ STATIC_DATA s16* sTotPtUnitStr; STATIC_DATA s16 D_8037AD38[5]; STATIC_DATA u8 D_8037AD42; STATIC_DATA s32 D_8037AD44_pad; +#if !defined(VERSION_JP) STATIC_DATA s16* sTestPtUnitStr[4]; +#endif STATIC_DATA char sMedalNameCopy[24]; STATIC_DATA const char* sStageMedalName[][5] = { @@ -44,6 +46,8 @@ STATIC_DATA s32 sResultsMenuCount = 0; STATIC_DATA s16* sTestPtsStr[4] = { sTestPtsStr0, sTestPtsStr1, sTestPtsStr2, sTestPtsStr3 }; +STATIC_DATA s16* D_80343398 = 0; // workaround for undefined ref + // forward declarations void totResultInit(void); void totResultCreateMenu(void); @@ -122,10 +126,16 @@ s32 totResult_80347150(s32 arg0) { return -1; } +#if defined(VERSION_JP) +// https://decomp.me/scratch/sDEmP +#pragma GLOBAL_ASM("asm/nonmatchings/app/total_results/totResultInit.s") +#else // VERSION_US void totResultInit(void) { Unk80362690_Unk0* temp_s4; s32 temp_v0; +#if !defined(VERSION_JP) s32 textId; +#endif s32 var_s5; const char* var_a1; char* var_v0_2; @@ -153,8 +163,10 @@ void totResultInit(void) { var_s5 += temp_v0; textFmtInt(sTestPtsStr[i], temp_v0, 3); } +#if !defined(VERSION_JP) textId = (temp_v0 == 1) ? TEXT_PT : TEXT_PTS; sTestPtUnitStr[i] = textGetDataByIdx(textId); +#endif } if (IS_MAIN_VEHICLE(temp_s4->veh)) { @@ -164,8 +176,10 @@ void totResultInit(void) { } D_8037AD42 = levelSetPointsToNextMedal(&sp50, var_s5, var_v1); textFmtInt(sTotalPtsStr, var_s5, 3); +#if !defined(VERSION_JP) textId = (var_s5 == 1) ? TEXT_PT : TEXT_PTS; sTotPtUnitStr = textGetDataByIdx(textId); +#endif textFmtInt(D_8037AD38, sp50, 3); var_v1 = D_8037AD42; if ((var_v1 == 3) && (sp50 == 0)) { @@ -184,12 +198,18 @@ void totResultInit(void) { sMedalName = textGetDataByName(var_a1); totResultCreateMenu(); } +#endif void totResultCreateMenu(void) { +#if defined(VERSION_JP) +#define TOT_MENU_X 204 +#else // VERSION_US +#define TOT_MENU_X 170 +#endif Unk80362690_Unk0* temp_a0; if (totResult_80346FC0(&D_80362690->unkC[D_80362690->unk9C])) { - menuCreateItems(170, 2, 6, 1.0f, 1.0f, sResultNextMenu, ARRAY_COUNT(sResultNextMenu)); + menuCreateItems(TOT_MENU_X, 2, 6, 1.0f, 1.0f, sResultNextMenu, ARRAY_COUNT(sResultNextMenu)); return; } temp_a0 = &D_80362690->unkC[D_80362690->unk9C]; @@ -201,7 +221,7 @@ void totResultCreateMenu(void) { sResultsMenuItems[sResultsMenuCount++] = TEXT_ANOTHER_TASK_SGI; } sResultsMenuItems[sResultsMenuCount++] = TEXT_QUIT_SGI; - menuCreateItems(170, 2, 6, 1.0f, 1.0f, sResultsMenuItems, sResultsMenuCount); + menuCreateItems(TOT_MENU_X, 2, 6, 1.0f, 1.0f, sResultsMenuItems, sResultsMenuCount); } void totResultDeinit(void) { @@ -239,6 +259,10 @@ s32 totResultMenuChoose(void) { // Test 2 100 pts // ------------------ // Total 200 pts +#if defined(VERSION_JP) +// https://decomp.me/scratch/QrBod +#pragma GLOBAL_ASM("asm/nonmatchings/app/total_results/totResultDrawTally.s") +#else // VERSION_US #if defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsometimes-uninitialized" @@ -271,7 +295,9 @@ void totResultDrawTally(void) { x1 = 34; x2 = 272; y = 120; +#if !defined(VERSION_JP) uvGfxClearFlags(0x400000); +#endif uvVtxBeginPoly(); uvVtx(x1, y, 0, 0, 0, 0xD2, 0xD2, 0xD2, 0xFF); uvVtx(x1, y - 1, 0, 0, 0, 0xD2, 0xD2, 0xD2, 0xFF); @@ -297,19 +323,25 @@ void totResultDrawTally(void) { if (sp6C->veh == VEHICLE_CANNONBALL) { uvFontPrintStr16(202, 116, sTotalPtsStr, 3, 0xFFE); +#if !defined(VERSION_JP) uvFontPrintStr16(236, 116, sTotPtUnitStr, 4, 0xFFE); +#endif } else { numTests = taskGetTestCount(sp6C->cls, sp6C->veh); for (i = 0; i < numTests; i++) { y = ((numTests * 16) + 100) - 16 * i; uvFontPrintStr16(202, y, sTestPtsStr[i], 3, 0xFFE); +#if !defined(VERSION_JP) uvFontPrintStr16(236, y, sTestPtUnitStr[i], 4, 0xFFE); +#endif } } if ((numTests != 1) && (sp6C->veh != VEHICLE_CANNONBALL)) { uvFontPrintStr16(202, 100, sTotalPtsStr, 3, 0xFFE); +#if !defined(VERSION_JP) uvFontPrintStr16(236, 100, sTotPtUnitStr, 4, 0xFFE); +#endif } if (D_8037AD42 != 4) { uvFontPrintStr16(128, 68, D_8037AD38, 3, 0xFFE); @@ -320,3 +352,4 @@ void totResultDrawTally(void) { #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif +#endif // VERSION_JP diff --git a/src/kernel/font.c b/src/kernel/font.c index 5aa9f7c5..ef97b4ea 100644 --- a/src/kernel/font.c +++ b/src/kernel/font.c @@ -229,7 +229,7 @@ s32 uvFontHeight(void) { #if defined(VERSION_JP) #pragma GLOBAL_ASM("asm/nonmatchings/kernel/font/uvFontPrintStr16.s") -#else +#else // VERSION_US // adds str16 to messages using current font settings s32 uvFontPrintStr16(s32 x, s32 y, s16* str16, s32 strLen, s32 end) { s32 i16; diff --git a/src/kernel/graphics.c b/src/kernel/graphics.c index 58468abf..e9298a39 100644 --- a/src/kernel/graphics.c +++ b/src/kernel/graphics.c @@ -230,7 +230,7 @@ void uvGfxStateDrawDL(uvGfxState_t* arg0) { #if defined(VERSION_JP) #pragma GLOBAL_ASM("asm/nonmatchings/kernel/graphics/uvGfxStateDraw.s") -#else +#else // VERSION_US void uvGfxStateDraw(uvGfxState_t* arg0) { u32 clearMode; u32 setMode; @@ -1132,4 +1132,3 @@ void uvCopyFrameBuf(s32 fb_id) { dst = gGfxFbPtrs[fb_id ^ 1]; _uvMediaCopy(dst, src, SCREEN_WIDTH * SCREEN_HEIGHT * sizeof(u16)); } - diff --git a/src/kernel/system.c b/src/kernel/system.c index d2d020af..900432db 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -191,7 +191,7 @@ void uvSetVideoMode(void) { osCreateMesgQueue(&D_802C3B90, D_802C3B68, ARRAY_COUNT(D_802C3B68)); _uvScCreateScheduler(&gSchedInst, gSchedStack + sizeof(gSchedStack), OS_PRIORITY_APPMAX, OS_VI_NTSC_LAN1, 1); _uvScAddClient(&gSchedInst, &gSchedClient, &D_802C3B50); -#else +#else // VERSION_US s32 viMode; osCreateMesgQueue(&D_802C3B90, D_802C3B68, ARRAY_COUNT(D_802C3B68)); @@ -443,4 +443,3 @@ void _uvDMA(void* vAddr, u32 devAddr, u32 nbytes) { void _uvAssertMsg(const char* expr, const char* filename, int line) { _uvDebugPrintf("%s:%d %s\n", filename, line, expr); } - diff --git a/src/libultra/io/vi.c b/src/libultra/io/vi.c index 709929b1..1faf4436 100644 --- a/src/libultra/io/vi.c +++ b/src/libultra/io/vi.c @@ -30,7 +30,7 @@ void __osViInit(void) { __osViNext->modep = &osViModePalLan1; osViClock = VI_PAL_CLOCK; } -#else +#else // VERSION_US if (sTvType == OS_TV_TYPE_NTSC) { __osViNext->modep = &osViModeNtscLan1; osViClock = VI_NTSC_CLOCK; @@ -49,4 +49,3 @@ void __osViInit(void) { IO_WRITE(VI_STATUS_REG, 0); __osViSwapContext(); } - diff --git a/src/libultra/io/vitbl.c b/src/libultra/io/vitbl.c index 90deb5f3..31171059 100644 --- a/src/libultra/io/vitbl.c +++ b/src/libultra/io/vitbl.c @@ -563,7 +563,7 @@ u32 osViModeTable[] = { 0x000D0269, 0x00000002, }; -#else +#else // VERSION_US u32 osViModeTable[] = { 0x00000000, 0x0000320E, From 857af26fcaad11487c86e80256a45d9a6a7cd670 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Thu, 24 Sep 2026 23:43:37 +0000 Subject: [PATCH 4/9] rocket_belt_sound matches and add (J) scratches --- src/app/hud.c | 1 + src/app/rocket_belt_sound.c | 21 +++++---------------- src/kernel/font.c | 1 + 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/app/hud.c b/src/app/hud.c index 6bf4561c..1d1093f9 100644 --- a/src/app/hud.c +++ b/src/app/hud.c @@ -979,6 +979,7 @@ void hudDrawThrottle(s32 x, s32 y, f32 power) { } #if defined(VERSION_JP) +// https://decomp.me/scratch/Y6Z9F #pragma GLOBAL_ASM("asm/nonmatchings/app/hud/hudDrawRadar.s") #else // VERSION_US void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDRadar* radar) { diff --git a/src/app/rocket_belt_sound.c b/src/app/rocket_belt_sound.c index 6d6c9437..9453a07c 100644 --- a/src/app/rocket_belt_sound.c +++ b/src/app/rocket_belt_sound.c @@ -11,16 +11,10 @@ STATIC_DATA EventCallbackInfo sRbSoundEventCbInfo; STATIC_DATA Unk803599D0 sRbSound_80371898; STATIC_FUNC void rbSoundEventHandler(s32, void*, s32); -#if defined(VERSION_JP) -// TODO: make STATIC_FUNC once functions are matched -void rbSoundEvent12_22(RocketBeltData* rbData); -void rbSoundSubEvent(RocketBeltData* rbData); -#else // VERSION_US STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData); -STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData); -#endif STATIC_FUNC void rbSoundEvent12_18(RocketBeltData* rbData); STATIC_FUNC void rbSoundEvent19(RocketBeltData* rbData); +STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData); STATIC_FUNC void rbSoundEvent13(RocketBeltData* rbData); void rbSoundInit(RocketBeltData* rbData) { @@ -180,9 +174,6 @@ STATIC_FUNC void rbSoundEventHandler(s32 event, void* userData, s32 eventData) { } } -#if defined(VERSION_JP) -#pragma GLOBAL_ASM("asm/nonmatchings/app/rocket_belt_sound/rbSoundEvent12_22.s") -#else // VERSION_US STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData) { Unk80362690_Unk0* sp34; s32 sfxId; @@ -213,7 +204,10 @@ STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData) { } } if ((rbData->unk90 == 4) && (D_80362690->state != 6)) { - if ((rbData->unk384 & 0x2) == 0 && (rbData->unk384 & 0x10) == 0) { +#if !defined(VERSION_JP) + if ((rbData->unk384 & 0x2) == 0 && (rbData->unk384 & 0x10) == 0) +#endif + { if (rbData->unk64 != 0) { sndSetMusic(BGM_ROCKET_BELT_LAND_OK); } else { @@ -231,7 +225,6 @@ STATIC_FUNC void rbSoundEvent12_22(RocketBeltData* rbData) { } } } -#endif STATIC_FUNC void rbSoundEvent12_18(RocketBeltData* rbData) { rbData->unk384 |= 1; @@ -246,9 +239,6 @@ STATIC_FUNC void rbSoundEvent19(RocketBeltData* rbData) { rbData->unk384 &= ~1; } -#if defined(VERSION_JP) -#pragma GLOBAL_ASM("asm/nonmatchings/app/rocket_belt_sound/rbSoundSubEvent.s") -#else // VERSION_US STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData) { f32 temp_fs0; f32 var_fv1; @@ -288,7 +278,6 @@ STATIC_FUNC void rbSoundSubEvent(RocketBeltData* rbData) { } } } -#endif STATIC_FUNC void rbSoundEvent13(RocketBeltData* rbData) { rbData->unk388 = func_8033F8CC(rbData->unk388); diff --git a/src/kernel/font.c b/src/kernel/font.c index ef97b4ea..6e5d12db 100644 --- a/src/kernel/font.c +++ b/src/kernel/font.c @@ -228,6 +228,7 @@ s32 uvFontHeight(void) { } #if defined(VERSION_JP) +// https://decomp.me/scratch/hniSQ #pragma GLOBAL_ASM("asm/nonmatchings/kernel/font/uvFontPrintStr16.s") #else // VERSION_US // adds str16 to messages using current font settings From 0df025f963d8dc23cec663ff098cb88f5002b761 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Fri, 25 Sep 2026 00:17:57 +0000 Subject: [PATCH 5/9] Match bird_802D0080 --- src/app/birdman2.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/app/birdman2.c b/src/app/birdman2.c index dba89b22..58c60fdd 100644 --- a/src/app/birdman2.c +++ b/src/app/birdman2.c @@ -550,10 +550,6 @@ void bird_802CFF74(BirdmanData* bmData) { } } -#if defined(VERSION_JP) -// https://decomp.me/scratch/G8dzk -#pragma GLOBAL_ASM("asm/nonmatchings/app/birdman2/bird_802D0080.s") -#else // VERSION_US void bird_802D0080(BirdmanData* bmData) { Vec3F sp27C; f32 var_fs2; @@ -566,15 +562,14 @@ void bird_802D0080(BirdmanData* bmData) { f32 var_fv1; f32 var_fa0; s32 sp258; +#if !defined(VERSION_JP) Vec3F sp24C; +#endif Vec3F sp240; Vec3F sp234; Vec3F sp228; Mtx4F sp1E8; Unk802D3658_Unk1224 spA4; - f32 temp_fv0; - f32 temp_fv1; - f32 temp_fa0; for (i = 0; i < 4; i++) { bmData->unk140[i] = 0.0f; @@ -620,19 +615,12 @@ void bird_802D0080(BirdmanData* bmData) { #if !defined(VERSION_JP) uvVec3Copy(&sp24C, &bmData->unk200); func_802DC074(&bmData->unk1C0, &bmData->unk200, &bmData->unk218, &temp_s1->unk34, 0.5f); - temp_fv0 = ABS_NOEQ(sp24C.x - bmData->unk200.x); - if (temp_fv0 < 0.1f) { - temp_fv1 = ABS_NOEQ(sp24C.y - bmData->unk200.y); - if (temp_fv1 < 0.1f) { - temp_fa0 = ABS_NOEQ(sp24C.y - bmData->unk200.z); - if (temp_fa0 < 0.1f) { - bmData->unk200.x += temp_s1->unk34.x; - bmData->unk200.y += temp_s1->unk34.y; - bmData->unk200.z += temp_s1->unk34.z; - uvMat4LocalToWorld(&bmData->unk1C0, &bmData->unk218, &bmData->unk200); - return; - } - } + if ((FABS(sp24C.x - bmData->unk200.x) < 0.1f) && (FABS(sp24C.y - bmData->unk200.y) < 0.1f) && (FABS(sp24C.y - bmData->unk200.z) < 0.1f)) { + bmData->unk200.x += temp_s1->unk34.x; + bmData->unk200.y += temp_s1->unk34.y; + bmData->unk200.z += temp_s1->unk34.z; + uvMat4LocalToWorld(&bmData->unk1C0, &bmData->unk218, &bmData->unk200); + return; } #endif bmData->unk10.m[3][0] += 0.01f * bmData->unk174.x; @@ -735,7 +723,6 @@ void bird_802D0080(BirdmanData* bmData) { _uvDebugPrintf("birdman: you got stuck - forcing an instant crash\n"); } } -#endif f32 bird_802D08F8(Unk8034E824* unkState, f32 arg1, f32 arg2) { s32 i; From 828de8f4e2c5af666fd78a193d1658ad3749ccfe Mon Sep 17 00:00:00 2001 From: queueRAM Date: Fri, 25 Sep 2026 05:21:45 +0000 Subject: [PATCH 6/9] Match hudDrawRadar --- src/app/hud.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/hud.c b/src/app/hud.c index 1d1093f9..b7d65b59 100644 --- a/src/app/hud.c +++ b/src/app/hud.c @@ -978,10 +978,6 @@ void hudDrawThrottle(s32 x, s32 y, f32 power) { uvGfxMtxViewPop(); } -#if defined(VERSION_JP) -// https://decomp.me/scratch/Y6Z9F -#pragma GLOBAL_ASM("asm/nonmatchings/app/hud/hudDrawRadar.s") -#else // VERSION_US void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDRadar* radar) { Mtx4F sp108; Mtx4F spC8; @@ -1169,7 +1165,11 @@ void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDR D_8036D224++; if (D_8036D224 > 0xFD) { +#if defined(VERSION_JP) + D_8036D224 = 0; +#else // VERSION_US D_8036D224 = 1; +#endif } for (i = 0; i < 10; i++) { @@ -1236,7 +1236,6 @@ void hudDrawRadar(s32 x, s32 y, f32 xOff, f32 yOff, f32 heading, f32 pitch, HUDR uvSprtDraw(0); uvGfxMtxViewPop(); } -#endif void hudDemoContButton(s32 spriteId, s32 x, s32 y) { uvSprtProps(spriteId, SPRT_PROP_POS(x + 20, 200 - y), SPRT_PROP_END); From 99aff5a749ec4cbd9a6b8b54f43552247530df66 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Fri, 25 Sep 2026 05:26:36 +0000 Subject: [PATCH 7/9] Match func_803335D0 --- src/app/code_BA190.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/code_BA190.c b/src/app/code_BA190.c index 5e2764fe..89251b5b 100644 --- a/src/app/code_BA190.c +++ b/src/app/code_BA190.c @@ -216,10 +216,6 @@ void func_80333384(SkyDivingData* sdData) { sdData->unk160.z = func_80313AF4(var_fs0, sdData->unk160.z, 3.0f); } -#if defined(VERSION_JP) -// https://decomp.me/scratch/f2pMX -#pragma GLOBAL_ASM("asm/nonmatchings/app/code_BA190/func_803335D0.s") -#else // VERSION_US s32 func_803335D0(SkyDivingData* sdData) { f32 sp6C; f32 temp_fv0; @@ -244,7 +240,9 @@ s32 func_803335D0(SkyDivingData* sdData) { sp4C.y = sdData->unk10.m[3][1]; sp4C.z = sdData->unk10.m[3][2]; sdData->unkBC = 1000000.0f; +#if !defined(VERSION_JP) sp6C = 0.0f; +#endif sp43 = db_getgnd(&sdData->unk230, &sp4C, &sdData->unk23C, &sp58, &sp6C, &sp5C); temp_fv0 = sp4C.z - sp6C; @@ -295,4 +293,3 @@ s32 func_803335D0(SkyDivingData* sdData) { } return 1; } -#endif From f833a6b849f6bb769c5ab6dd88aa1f1330c896d6 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Fri, 25 Sep 2026 15:03:00 +0000 Subject: [PATCH 8/9] PR feedback: blit ids, format tables, prettier literals, unnecessary comments --- include/kernel/uv_sprite.h | 83 ++++++---------- src/app/control_info.c | 187 +++++++++++++++++++++---------------- src/app/file_menu.c | 8 +- src/app/fountain.c | 2 +- src/app/level_select.c | 2 +- src/kernel/font.c | 4 +- 6 files changed, 143 insertions(+), 143 deletions(-) diff --git a/include/kernel/uv_sprite.h b/include/kernel/uv_sprite.h index 730a0d95..afa7c5b6 100644 --- a/include/kernel/uv_sprite.h +++ b/include/kernel/uv_sprite.h @@ -6,7 +6,7 @@ #include enum SpriteBlitId { -#if defined(VERSION_JP) // TODO: JP blit IDs +#if defined(VERSION_JP) BLIT_ID_04 = 0x09, BLIT_ID_05 = 0x0A, BLIT_ID_06 = 0x0B, @@ -35,6 +35,34 @@ enum SpriteBlitId { BLIT_ID_2B = 0x31, BLIT_ID_2C = 0x32, BLIT_ID_2D = 0x33, + BLIT_J_41 = 0x41, + BLIT_J_42 = 0x42, + BLIT_J_43 = 0x43, + BLIT_J_44 = 0x44, + BLIT_J_45 = 0x45, + BLIT_J_46 = 0x46, + BLIT_J_47 = 0x47, + BLIT_J_48 = 0x48, + BLIT_J_49 = 0x49, + BLIT_J_4A = 0x4A, + BLIT_J_4B = 0x4B, + BLIT_J_4C = 0x4C, + BLIT_J_4D = 0x4D, + BLIT_J_4E = 0x4E, + BLIT_J_4F = 0x4F, + BLIT_J_50 = 0x50, + BLIT_J_51 = 0x51, + BLIT_J_52 = 0x52, + BLIT_J_53 = 0x53, + BLIT_J_54 = 0x54, + BLIT_J_55 = 0x55, + BLIT_J_56 = 0x56, + BLIT_J_57 = 0x57, + BLIT_J_58 = 0x58, + BLIT_J_59 = 0x59, + BLIT_J_5A = 0x5A, + BLIT_J_5B = 0x5B, + BLIT_J_5C = 0x5C, BLIT_N64_CONTROLLER_INFOGRAPHIC = 0x5D, // N64 controller infographic BLIT_ID_3D = 0x5F, BLIT_ID_3E = 0x60, @@ -51,59 +79,6 @@ enum SpriteBlitId { BLIT_ID_49 = 0x6B, BLIT_ID_4A = 0x6C, BLIT_ID_4B = 0x6D, - - BLIT_ID_09 = 0x09, - BLIT_ID_0A = 0x0A, - BLIT_TEST_MENU_TOP_SCORE = 0x0D, // "Top Score" box title - BLIT_TEST_MENU_BUTTON_START = 0x0E, // "Start" button - BLIT_TEST_MENU_BUTTON_SCORING = 0x0F, // "Scoring" button - BLIT_TEST_MENU_BUTTON_VIEW_MAP = 0x10, // "View map" button - BLIT_TEST_MENU_BUTTON_CONTROL = 0x11, // "Control" button - BLIT_TEST_MENU_BUTTON_HINT = 0x12, // "Hint" button - BLIT_TEST_MENU_BUTTON_SAMPLE_PHOTO = 0x13, // "Sample photo" button - BLIT_TEST_MENU_BUTTON_RETURN = 0x14, // "Return" button - BLIT_TEST_MENU_TEST_TITLE = 0x15, // "TEST" box title - BLIT_ID_1E = 0x1E, - BLIT_WAYPOINT_CURRENT_POSITION = 0x2E, // "Current position" - BLIT_WAYPOINT_LANDING_POINT = 0x2F, // "Landing point" - BLIT_WAYPOINT_RUNWAY = 0x30, // "Runway" - BLIT_WAYPOINT_TARGET = 0x31, // "Target" - BLIT_WAYPOINT_MECHA_HAWK = 0x32, // "Mecha Hawk" - BLIT_WAYPOINT_GOAL = 0x33, // "Goal" - BLIT_WAYPOINT_WHALE = 0x34, // "Whale" - BLIT_WAYPOINT_SPACE_SHUTTLE = 0x35, // "Space shuttle" - BLIT_WAYPOINT_PASSENGER_BOAT = 0x36, // "Passenger boat" - BLIT_WAYPOINT_FOUNTAIN = 0x37, // "Fountain" - BLIT_WAYPOINT_FLAME = 0x38, // "Flame" - BLIT_WAYPOINT_MISSI_THE_MONSTER = 0x39, // "Missi the Monster" - BLIT_WAYPOINT_NEXT_JP = 0x3A, // Japanese "next goal" - BLIT_TEST_MENU_BUTTON_VIEW_DEMO = 0x3C, // "View demo" button - BLIT_WAYPOINT_NEXT = 0x4C, // "Next" waypoint for next ring / hover pad - BLIT_CONT_INFO_FLARE_LANDING = 0x4D, // "Flare (use for air brake or landing)" - BLIT_CONT_INFO_Z_BUTTON = 0x4E, // "( [Z] )" button callout - BLIT_CONT_INFO_SNAP_PHOTO = 0x4F, // "Snap photo" - BLIT_CONT_INFO_CONTROL_VEHICLE = 0x50, // "Control the vehicle" - BLIT_CONT_INFO_DEC_THROTTLE = 0x51, // "Decrease throttle setting" - BLIT_CONT_INFO_INC_THROTTLE = 0x52, // "Increase throttle setting" - BLIT_CONT_INFO_FIRE_MISSILES = 0x53, // "Fire missiles" - BLIT_CONT_INFO_WEAK_JET = 0x54, // "Weak jet" - BLIT_CONT_INFO_STRONG_JET = 0x55, // "Strong jet" - BLIT_CONT_INFO_AIR_BRAKE = 0x56, // "Air brake / Hover" - BLIT_CONT_INFO_FIRE = 0x57, // "Fire" - BLIT_CONT_INFO_ADJUST_FIRE = 0x58, // "Adjust fire angle & Move cannon left / right" - BLIT_CONT_INFO_FLARE = 0x59, // "Flare (Use for air brake)" - BLIT_CONT_INFO_OPEN_CHUTE = 0x5A, // "Open chute" - BLIT_CONT_INFO_TILT_BACKWARD = 0x5B, // "Tilt backward" - BLIT_CONT_INFO_TILT_FORWARD = 0x5C, // "Tilt forward" - BLIT_CONT_INFO_TURN_LEFT_RIGHT = 0x5D, // "Turn left / right" - BLIT_CONT_INFO_LEFT_RIGHT_ARROWS = 0x5E, // "<- ->" - BLIT_CONT_INFO_UP_ARROW = 0x5F, // "↑" - BLIT_CONT_INFO_DOWN_ARROW = 0x60, // "↓" - BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE = 0x61, // "Change the altitude of jump" - BLIT_CONT_INFO_ADJUST_LEFT_RIGHT = 0x62, // "Adjust left and right directions" - BLIT_CONT_INFO_ADJUST_JUMP_ANGLES = 0x63, // "Adjust angles for jumping - BLIT_CONT_INFO_FLAP_WINGS = 0x64, // "Flap the wings" - BLIT_CONT_INFO_BRAKE_HOVER = 0x65, // "Brake / Hover" #else BLIT_ID_04 = 0x04, BLIT_ID_05 = 0x05, diff --git a/src/app/control_info.c b/src/app/control_info.c index 66602548..1793d4a0 100644 --- a/src/app/control_info.c +++ b/src/app/control_info.c @@ -22,111 +22,130 @@ typedef struct { STATIC_DATA s32 sControlInfoCount; +// clang-format off STATIC_DATA ControlInfoLabel sControlInfoHangGlider[] = { #if defined(VERSION_JP) - // TODO: (J) blit IDs - { 222, 123, 0x41 }, - { 224, 137, 0x42 }, - { 243, 153, 0x43 }, - { 229, 196, 0x44 }, - { 220, 212, 0x45 }, - { 63, 194, 0x46 }, - { 46, 180, 0x47 }, + { 222, 123, BLIT_J_41 }, + { 224, 137, BLIT_J_42 }, + { 243, 153, BLIT_J_43 }, + { 229, 196, BLIT_J_44 }, + { 220, 212, BLIT_J_45 }, + { 63, 194, BLIT_J_46 }, + { 46, 180, BLIT_J_47 }, #else // VERSION_US { 223, 108, BLIT_CONT_INFO_FLARE_LANDING }, { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, { 221, 196, BLIT_CONT_INFO_SNAP_PHOTO }, - { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, + { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoGyrocopter[] = { #if defined(VERSION_JP) - { 0xED, 0x6B, 0x48 }, - { 0xEC, 0x7B, 0x4A }, - { 0xED, 0x93, 0x48 }, - { 0xED, 0xA3, 0x49 }, - { 0xC6, 0xC4, 0x44 }, - { 0xBE, 0xD3, 0x4B }, - { 0x3F, 0xC2, 0x46 }, - { 0x2E, 0xB4, 0x47 }, + { 237, 107, BLIT_J_48 }, + { 236, 123, BLIT_J_4A }, + { 237, 147, BLIT_J_48 }, + { 237, 163, BLIT_J_49 }, + { 198, 196, BLIT_J_44 }, + { 190, 211, BLIT_J_4B }, + { 63, 194, BLIT_J_46 }, + { 46, 180, BLIT_J_47 }, #else // VERSION_US - { 227, 98, BLIT_CONT_INFO_INC_THROTTLE }, { 227, 146, BLIT_CONT_INFO_DEC_THROTTLE }, { 193, 179, BLIT_CONT_INFO_Z_BUTTON }, - { 193, 198, BLIT_CONT_INFO_FIRE_MISSILES }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, + { 227, 98, BLIT_CONT_INFO_INC_THROTTLE }, + { 227, 146, BLIT_CONT_INFO_DEC_THROTTLE }, + { 193, 179, BLIT_CONT_INFO_Z_BUTTON }, + { 193, 198, BLIT_CONT_INFO_FIRE_MISSILES }, + { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoRocketBelt[] = { #if defined(VERSION_JP) - { 0xEC, 0x7C, 0x4E }, - { 0xFC, 0x7C, 0x4D }, - { 0xFC, 0x9C, 0x4D }, - { 0xEC, 0x9C, 0x4C }, - { 0xE5, 0xC4, 0x44 }, - { 0xDC, 0xD4, 0x4F }, - { 0x3F, 0xC2, 0x46 }, - { 0x2E, 0xB4, 0x47 }, + { 236, 124, BLIT_J_4E }, + { 252, 124, BLIT_J_4D }, + { 252, 156, BLIT_J_4D }, + { 236, 156, BLIT_J_4C }, + { 229, 196, BLIT_J_44 }, + { 220, 212, BLIT_J_4F }, + { 63, 194, BLIT_J_46 }, + { 46, 180, BLIT_J_47 }, #else // VERSION_US - { 230, 126, BLIT_CONT_INFO_WEAK_JET }, { 230, 104, BLIT_CONT_INFO_STRONG_JET }, { 216, 167, BLIT_CONT_INFO_Z_BUTTON }, - { 216, 185, BLIT_CONT_INFO_AIR_BRAKE }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, + { 230, 126, BLIT_CONT_INFO_WEAK_JET }, + { 230, 104, BLIT_CONT_INFO_STRONG_JET }, + { 216, 167, BLIT_CONT_INFO_Z_BUTTON }, + { 216, 185, BLIT_CONT_INFO_AIR_BRAKE }, + { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoCannonball[] = { #if defined(VERSION_JP) - { 0xEB, 0x86, 0x50 }, - { 0x3D, 0xC4, 0x52 }, - { 0x1C, 0xB4, 0x51 }, + { 235, 134, BLIT_J_50 }, + { 61, 196, BLIT_J_52 }, + { 28, 180, BLIT_J_51 }, #else // VERSION_US { 251, 104, BLIT_CONT_INFO_FIRE }, - { 38, 179, BLIT_CONT_INFO_ADJUST_FIRE }, + { 38, 179, BLIT_CONT_INFO_ADJUST_FIRE }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoSkydiving[] = { #if defined(VERSION_JP) - { 0xDE, 0x7B, 0x41 }, - { 0xE0, 0x89, 0x42 }, - { 0xF3, 0x99, 0x43 }, - { 0xDC, 0xC3, 0x53 }, - { 0xDD, 0xD3, 0x54 }, - { 0x3C, 0xD4, 0x55 }, - { 0x3C, 0xC0, 0x56 }, - { 0x4C, 0xAC, 0x57 }, + { 222, 123, BLIT_J_41 }, + { 224, 137, BLIT_J_42 }, + { 243, 153, BLIT_J_43 }, + { 220, 195, BLIT_J_53 }, + { 221, 211, BLIT_J_54 }, + { 60, 212, BLIT_J_55 }, + { 60, 192, BLIT_J_56 }, + { 76, 172, BLIT_J_57 }, #else // VERSION_US - { 223, 106, BLIT_CONT_INFO_FLARE }, { 218, 161, BLIT_CONT_INFO_OPEN_CHUTE }, { 59, 200, BLIT_CONT_INFO_TILT_BACKWARD }, - { 59, 180, BLIT_CONT_INFO_TILT_FORWARD }, { 59, 159, BLIT_CONT_INFO_TURN_LEFT_RIGHT }, { 30, 159, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, - { 38, 180, BLIT_CONT_INFO_UP_ARROW }, { 38, 201, BLIT_CONT_INFO_DOWN_ARROW }, + { 223, 106, BLIT_CONT_INFO_FLARE }, + { 218, 161, BLIT_CONT_INFO_OPEN_CHUTE }, + { 59, 200, BLIT_CONT_INFO_TILT_BACKWARD }, + { 59, 180, BLIT_CONT_INFO_TILT_FORWARD }, + { 59, 159, BLIT_CONT_INFO_TURN_LEFT_RIGHT }, + { 30, 159, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, + { 38, 180, BLIT_CONT_INFO_UP_ARROW }, + { 38, 201, BLIT_CONT_INFO_DOWN_ARROW }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoJumbleHopper[] = { #if defined(VERSION_JP) - { 0x3D, 0xD3, 0x58 }, - { 0xDD, 0x93, 0x58 }, - { 0x4D, 0xAB, 0x58 }, - { 0x4D, 0xBE, 0x59 }, - { 0x7D, 0xD4, 0x5A }, + { 61, 211, BLIT_J_58 }, + { 221, 147, BLIT_J_58 }, + { 77, 171, BLIT_J_58 }, + { 77, 190, BLIT_J_59 }, + { 125, 212, BLIT_J_5A }, #else // VERSION_US - { 222, 104, BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE }, { 59, 179, BLIT_CONT_INFO_ADJUST_LEFT_RIGHT }, { 59, 198, BLIT_CONT_INFO_ADJUST_JUMP_ANGLES }, - { 27, 179, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, { 35, 195, BLIT_CONT_INFO_UP_ARROW }, { 35, 208, BLIT_CONT_INFO_DOWN_ARROW }, + { 222, 104, BLIT_CONT_INFO_CHANGE_JUMP_ALTITUDE }, + { 59, 179, BLIT_CONT_INFO_ADJUST_LEFT_RIGHT }, + { 59, 198, BLIT_CONT_INFO_ADJUST_JUMP_ANGLES }, + { 27, 179, BLIT_CONT_INFO_LEFT_RIGHT_ARROWS }, + { 35, 195, BLIT_CONT_INFO_UP_ARROW }, + { 35, 208, BLIT_CONT_INFO_DOWN_ARROW }, #endif }; STATIC_DATA ControlInfoLabel sControlInfoBirdman[] = { #if defined(VERSION_JP) - { 0xDE, 0x74, 0x5B }, - { 0xDC, 0x8B, 0x4F }, - { 0xE0, 0x99, 0x5C }, - { 0xE5, 0xC4, 0x44 }, - { 0xDC, 0xD4, 0x45 }, - { 0x3F, 0xC2, 0x46 }, - { 0x2E, 0xB4, 0x47 }, + { 222, 116, BLIT_J_5B }, + { 220, 139, BLIT_J_4F }, + { 224, 153, BLIT_J_5C }, + { 229, 196, BLIT_J_44 }, + { 220, 212, BLIT_J_45 }, + { 63, 194, BLIT_J_46 }, + { 46, 180, BLIT_J_47 }, #else // VERSION_US - { 228, 99, BLIT_CONT_INFO_FLAP_WINGS }, { 228, 131, BLIT_CONT_INFO_BRAKE_HOVER }, { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, - { 220, 196, BLIT_CONT_INFO_SNAP_PHOTO }, { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, + { 228, 99, BLIT_CONT_INFO_FLAP_WINGS }, + { 228, 131, BLIT_CONT_INFO_BRAKE_HOVER }, + { 220, 178, BLIT_CONT_INFO_Z_BUTTON }, + { 220, 196, BLIT_CONT_INFO_SNAP_PHOTO }, + { 46, 163, BLIT_CONT_INFO_CONTROL_VEHICLE }, #endif }; +// clang-format on STATIC_DATA ControlInfoLabelGroup sControlInfoVeh[] = { { ARRAY_COUNT(sControlInfoHangGlider), sControlInfoHangGlider }, @@ -156,11 +175,19 @@ typedef struct { Unk80341584_unk4* unk4; } Unk80341584; -Unk80341584_unk4 D_80341524[] = { 0x01, 0x001E, 0xAA, 0x0151, 0x000B, 0x000B, 0x03, 0x002B, 0xAA, 0x0151, 0x000B, 0x000B, - 0x00, 0x001E, 0xBE, 0x0151, 0x000B, 0x000B, 0x02, 0x001E, 0xD2, 0x0151, 0x000B, 0x000B }; +Unk80341584_unk4 D_80341524[] = { + { 0x1, 0x1E, 0xAA, 0x151, 0xB, 0xB }, + { 0x3, 0x2B, 0xAA, 0x151, 0xB, 0xB }, + { 0x0, 0x1E, 0xBE, 0x151, 0xB, 0xB }, + { 0x2, 0x1E, 0xD2, 0x151, 0xB, 0xB } +}; -Unk80341584_unk4 D_80341554[] = { 0x01, 0x001E, 0xAA, 0x0151, 0x000B, 0x000B, 0x03, 0x002E, 0xAA, 0x0151, 0x000B, 0x000B, - 0x00, 0x001E, 0xCC, 0x0151, 0x000B, 0x000B, 0x02, 0x001E, 0xD9, 0x0151, 0x000B, 0x000B }; +Unk80341584_unk4 D_80341554[] = { + { 0x1, 0x1E, 0xAA, 0x151, 0xB, 0xB }, + { 0x3, 0x2E, 0xAA, 0x151, 0xB, 0xB }, + { 0x0, 0x1E, 0xCC, 0x151, 0xB, 0xB }, + { 0x2, 0x1E, 0xD9, 0x151, 0xB, 0xB } +}; Unk80341584 D_80341584[] = { { 0x00, NULL }, @@ -407,28 +434,28 @@ void contInfo_802CF0CC(s32 arg0) { temp_fs0 = (SCREEN_HEIGHT - temp_s1->unk4); switch (temp_s1->unk0) { case 0: - uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unkA + temp_fs0), 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2, (temp_s1->unkA + temp_fs0), 0, 0, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unkA + temp_fs0), 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2, (temp_s1->unkA + temp_fs0), 0, 0, temp_s1->unkA << 5, 255, 255, 255, 255); break; case 1: - uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unk8 << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 255, 255, 255, 255); break; case 2: - uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unk8 << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, temp_s1->unkA << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unk8, temp_fs0, 0, temp_s1->unk8 << 5, temp_s1->unkA << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unk8, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unk8 << 5, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, 0, 0, 255, 255, 255, 255); break; case 3: - uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 0xFF, 0xFF, 0xFF, 0xFF); - uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 0xFF, 0xFF, 0xFF, 0xFF); + uvVtx(temp_s1->unk2, temp_fs0, 0, 0, 0, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unkA, temp_fs0, 0, 0, temp_s1->unk8 << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2 + temp_s1->unkA, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, temp_s1->unk8 << 5, 255, 255, 255, 255); + uvVtx(temp_s1->unk2, (temp_s1->unk8 + temp_fs0), 0, temp_s1->unkA << 5, 0, 255, 255, 255, 255); break; } uvVtxEndPoly(); diff --git a/src/app/file_menu.c b/src/app/file_menu.c index 0b525589..424db72c 100644 --- a/src/app/file_menu.c +++ b/src/app/file_menu.c @@ -97,13 +97,13 @@ void fileMenu_802E8AF0(void) { temp_s2 = levelGetTotalPoints(temp_s6, k, j); temp_v0 = func_8032BE8C(temp_s6, k, j); if ((temp_s2 >= gMedalPointRequirements[k].gold) && (temp_v0 != 0)) { - texId = TEXTURE_GOLD_MEDAL; // gold medal sprite + texId = TEXTURE_GOLD_MEDAL; } else if ((temp_s2 >= gMedalPointRequirements[k].silver) && (temp_v0 != 0)) { - texId = TEXTURE_SILVER_MEDAL; // silver medal sprite + texId = TEXTURE_SILVER_MEDAL; } else if ((temp_s2 >= gMedalPointRequirements[k].bronze) && (temp_v0 != 0)) { - texId = TEXTURE_BRONZE_MEDAL; // bronze medal sprite + texId = TEXTURE_BRONZE_MEDAL; } else { - texId = TEXTURE_NO_MEDAL; // no medal sprite + texId = TEXTURE_NO_MEDAL; } uvSprtProps(k * 3 + j, SPRT_PROP_TEX_ID(texId), SPRT_PROP_END); } diff --git a/src/app/fountain.c b/src/app/fountain.c index 46c3879b..ee1e271e 100644 --- a/src/app/fountain.c +++ b/src/app/fountain.c @@ -168,7 +168,7 @@ void fountainSetInterval(f32 interval) { if (sFountainObjId != 0xFFFF) { #if defined(VERSION_JP) sFountainScale = interval; -#else +#else // VERSION_US sFountainScale = interval * 0.7f; #endif fountainUpdatePose(); diff --git a/src/app/level_select.c b/src/app/level_select.c index e45220de..b9437ecb 100644 --- a/src/app/level_select.c +++ b/src/app/level_select.c @@ -17,7 +17,7 @@ #include #include -f32 D_8036A8C0; // 0x8035D2B0 +f32 D_8036A8C0; f32 D_8036A8C4; s8 D_8036A8C8; s8 D_8036A8C9; diff --git a/src/kernel/font.c b/src/kernel/font.c index 6e5d12db..254a6969 100644 --- a/src/kernel/font.c +++ b/src/kernel/font.c @@ -8,11 +8,9 @@ #if defined(VERSION_JP) #define FONT_MAX_MSG_LEN 25 #define FONT_DL_COUNT 4524 -#elif defined(VERSION_US) +#else // VERSION_US #define FONT_MAX_MSG_LEN 44 #define FONT_DL_COUNT 7944 -#else -#error Unknown build VERSION #endif #define FONT_MSG_COUNT 30 From 29acd3fd7988b250fda7d37f02c0974963814ca3 Mon Sep 17 00:00:00 2001 From: queueRAM Date: Fri, 25 Sep 2026 15:59:54 +0000 Subject: [PATCH 9/9] Match func_8033E3A8 --- src/app/snap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/snap.c b/src/app/snap.c index 76e011b0..49c35b23 100644 --- a/src/app/snap.c +++ b/src/app/snap.c @@ -1786,10 +1786,6 @@ void func_8033DFD0(s32 arg0, Unk80373060* arg1, s32 arg2) { func_8033A6B8(); } -#if defined(VERSION_JP) -// https://decomp.me/scratch/igj04 -#pragma GLOBAL_ASM("asm/nonmatchings/app/snap/func_8033E3A8.s") -#else // VERSION_US s32 func_8033E3A8(s32 arg0) { s32 spC4; s32 var_s0; @@ -1804,17 +1800,23 @@ s32 func_8033E3A8(s32 arg0) { Mtx4F sp60; Camera* camera; s32 renderFlags; +#if !defined(VERSION_JP) u8* ptr; +#endif u16 classIdx; u16 vehIdx; u16 testIdx; camera = D_80362690->unkC[D_80362690->unk9C].unk70; +#if !defined(VERSION_JP) ptr = taskGet_80345CB0(); +#endif D_80350550 = 0; +#if !defined(VERSION_JP) if ((D_80362690->state != GAME_STATE_OPTIONS) && (ptr[1] == 1)) { snowDisable(); } +#endif if (arg0 == 3) { arg0 = 1; D_80350594 = 1; @@ -1898,7 +1900,6 @@ s32 func_8033E3A8(s32 arg0) { func_8033FCD0(vehIdx); return D_80350550; } -#endif void func_8033E784(Unk8033F050* arg0, s32 arg1, s32 arg2) { if (arg2 != 0) {