Merge branch 'wip/pal_integration' into 'master'
Wip/pal integration See merge request banjo.decomp/banjo-kazooie!63
This commit is contained in:
commit
28f1144b92
|
@ -70,3 +70,27 @@ build-test-us10:
|
|||
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||
- echo "Expected SHA1 - $BASEROM_US10_SHA1"
|
||||
- if [ "${FILE_SHA1}" != "${BASEROM_US10_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||
|
||||
# Try to compile the code inside the image to make sure it works (run docker container)
|
||||
build-test-pal:
|
||||
stage: test
|
||||
image:
|
||||
name: $CI_REGISTRY_IMAGE:latest
|
||||
entrypoint: [""]
|
||||
before_script:
|
||||
- curl -L "$BASEROM_PAL_URL" -o baserom.pal.enc.z64
|
||||
- openssl enc -d -aes-256-cbc -in baserom.pal.enc.z64 -out baserom.pal.z64 -k "$BASEROM_PAL_KEY"
|
||||
- FILE_SHA1=$(sha1sum baserom.pal.z64 | awk '{ print $1 }')
|
||||
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||
- echo "Expected SHA1 - $BASEROM_PAL_SHA1"
|
||||
- if [ "${FILE_SHA1}" != "${BASEROM_PAL_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||
script:
|
||||
# Compile the code
|
||||
- make VERSION=pal
|
||||
# Check if the resulting decompressed ROM is the same as the expected one
|
||||
# ToDo: compare compressed ROMs once tooling is in place
|
||||
- DECOMP_SHA1=$(sha1sum decompressed.pal.z64 | awk '{ print $1 }')
|
||||
- FILE_SHA1=$(sha1sum build/pal/banjo.pal.prelim.z64 | awk '{ print $1 }')
|
||||
- echo "Calculated SHA1 - $FILE_SHA1"
|
||||
- echo "Expected SHA1 - $DECOMP_SHA1"
|
||||
- if [ "${FILE_SHA1}" != "${DECOMP_SHA1}" ]; then echo "Checksum verification failed"; exit 1; else echo "Checksum verification passed"; fi
|
||||
|
|
19
Makefile
19
Makefile
|
@ -166,7 +166,7 @@ OPT_FLAGS := -O2
|
|||
MIPSBIT := -mips2
|
||||
ASFLAGS := -EB -mtune=vr4300 -march=vr4300 -mabi=32 -I include
|
||||
GCC_ASFLAGS := -c -x assembler-with-cpp -mabi=32 -ffreestanding -mtune=vr4300 -march=vr4300 -mfix4300 -G 0 -O -mno-shared -fno-PIC -mno-abicalls
|
||||
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T manual_syms.txt
|
||||
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T manual_syms.$(VERSION).txt
|
||||
BINOFLAGS := -I binary -O elf32-tradbigmips
|
||||
|
||||
### Rules ###
|
||||
|
@ -186,10 +186,17 @@ $(addprefix progress-,$(OVERLAYS)) : progress-% : progress/progress.%.csv
|
|||
@$(PROGRESS_READ) $< $(VERSION) $*
|
||||
|
||||
# Verify that the roms match, also sets up diff_settings
|
||||
ifeq ($(VERSION), us.v10)
|
||||
verify: $(BASEROM) $(FINAL_Z64)
|
||||
@$(DIFF) $(BASEROM) $(FINAL_Z64) > /dev/null && \
|
||||
$(PRINT) "$(YELLOW) _\n _( )_\n [ ]_\n ) _ _)\n [_( )_]\n$(BLUE)$(BASENAME).$(VERSION).z64$(NO_COL): $(GREEN)OK$(NO_COL)\n" || \
|
||||
$(PRINT) "$(BLUE)$(BASEROM) $(RED)differs$(NO_COL)\n"
|
||||
else
|
||||
verify: $(DECOMPRESSED_BASEROM) $(PRELIM_Z64)
|
||||
@$(DIFF) $^ > /dev/null && \
|
||||
$(PRINT) "$(YELLOW) _\n _( )_\n [ ]_\n ) _ _)\n [_( )_]\n$(BLUE)$(BASENAME).$(VERSION).z64$(NO_COL): $(GREEN)OK$(NO_COL)\n" || \
|
||||
$(PRINT) "$(BLUE)$(BASEROM) $(RED)differs$(NO_COL)\n"
|
||||
endif
|
||||
|
||||
$(OVERLAY_PROG_SVGS) : progress/progress_%.svg: progress/progress.%.csv
|
||||
$(call print1,Creating progress svg for:,$*)
|
||||
|
@ -293,8 +300,12 @@ $(ASSET_ROOT)/assets.yaml : $(BIN_ROOT)/assets.bin $(BK_ASSET_TOOL)
|
|||
$(call print1,Extracting Assets:,$@)
|
||||
$(BK_ASSET_TOOL) -e $< $(ASSET_ROOT)
|
||||
|
||||
# .yaml -> .bin
|
||||
ifneq (,$(shell which cargo))
|
||||
# .yaml -> .
|
||||
ifeq ($(VERSION),pal)
|
||||
$(ASSET_BIN): $(BIN_ROOT)/assets.bin
|
||||
$(call print2,Copying Asset Binary (install cargo to construct instead):,$<,$@)
|
||||
@$(CP) $< $@
|
||||
else ifneq (,$(shell which cargo))
|
||||
$(ASSET_BIN): $(ASSET_ROOT)/assets.yaml $(BK_ASSET_TOOL) $(ALL_ASSET_FILES)
|
||||
$(call print2,Constructing Asset Binary:,$<,$@)
|
||||
$(BK_ASSET_TOOL) -c $< $@
|
||||
|
@ -316,7 +327,7 @@ $(DECOMPRESSED_BASEROM): $(BASEROM) $(BK_ROM_DECOMPRESS)
|
|||
# .o -> .elf (dummy symbols)
|
||||
$(PRELIM_ELF): $(ALL_OBJS) $(LD_SCRIPT) $(ASSET_OBJS)
|
||||
$(call print1,Linking elf:,$@)
|
||||
@$(LD) $(LDFLAGS) -T rzip_dummy_addrs.txt -o $@
|
||||
@$(LD) $(LDFLAGS) -T rzip_dummy_addrs.$(VERSION).txt -o $@
|
||||
|
||||
# .elf -> .z64 (dummy symbols)
|
||||
$(PRELIM_Z64) : $(PRELIM_ELF)
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
.include "macro.inc"
|
||||
|
||||
/* assembler directives */
|
||||
.set noat /* allow manual use of $at */
|
||||
.set noreorder /* don't insert nops after branches */
|
||||
.set gp=64 /* allow use of 64-bit general purpose registers */
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
glabel func_8025C240
|
||||
/* F37A70 8025C240 3C048027 */ lui $a0, %hi(D_80276E70)
|
||||
/* F37A74 8025C244 DC846E70 */ ld $a0, %lo(D_80276E70)($a0)
|
||||
/* F37A78 8025C248 3C018027 */ lui $at, %hi(D_80276E70)
|
||||
/* F37A7C 8025C24C 000437FC */ dsll32 $a2, $a0, 31
|
||||
/* F37A80 8025C250 00042FF8 */ dsll $a1, $a0, 31
|
||||
/* F37A84 8025C254 000637FA */ dsrl $a2, $a2, 31
|
||||
/* F37A88 8025C258 0005283E */ dsrl32 $a1, $a1, 0
|
||||
/* F37A8C 8025C25C 0004233C */ dsll32 $a0, $a0, 12
|
||||
/* F37A90 8025C260 00C53025 */ or $a2, $a2, $a1
|
||||
/* F37A94 8025C264 0004203E */ dsrl32 $a0, $a0, 0
|
||||
/* F37A98 8025C268 00C43026 */ xor $a2, $a2, $a0
|
||||
/* F37A9C 8025C26C 0006253A */ dsrl $a0, $a2, 20
|
||||
/* F37AA0 8025C270 30840FFF */ andi $a0, $a0, 0xFFF
|
||||
/* F37AA4 8025C274 00862026 */ xor $a0, $a0, $a2
|
||||
/* F37AA8 8025C278 0004103C */ dsll32 $v0, $a0, 0
|
||||
/* F37AAC 8025C27C FC246E70 */ sd $a0, %lo(D_80276E70)($at)
|
||||
/* F37AB0 8025C280 03E00008 */ jr $ra
|
||||
/* F37AB4 8025C284 0002103F */ dsra32 $v0, $v0, 0
|
||||
endlabel func_8025C240
|
||||
|
||||
glabel func_8025C288
|
||||
/* F37AB8 8025C288 64840001 */ daddiu $a0, $a0, 0x1
|
||||
/* F37ABC 8025C28C 3C018027 */ lui $at, %hi(D_80276E70)
|
||||
/* F37AC0 8025C290 FC246E70 */ sd $a0, %lo(D_80276E70)($at)
|
||||
/* F37AC4 8025C294 03E00008 */ jr $ra
|
||||
/* F37AC8 8025C298 24040000 */ addiu $a0, $zero, 0x0
|
||||
endlabel func_8025C288
|
||||
|
||||
glabel func_8025C29C
|
||||
/* F37ACC 8025C29C DC870000 */ ld $a3, 0x0($a0)
|
||||
/* F37AD0 8025C2A0 000737FC */ dsll32 $a2, $a3, 31
|
||||
/* F37AD4 8025C2A4 00072FF8 */ dsll $a1, $a3, 31
|
||||
/* F37AD8 8025C2A8 000637FA */ dsrl $a2, $a2, 31
|
||||
/* F37ADC 8025C2AC 0005283E */ dsrl32 $a1, $a1, 0
|
||||
/* F37AE0 8025C2B0 00073B3C */ dsll32 $a3, $a3, 12
|
||||
/* F37AE4 8025C2B4 00C53025 */ or $a2, $a2, $a1
|
||||
/* F37AE8 8025C2B8 0007383E */ dsrl32 $a3, $a3, 0
|
||||
/* F37AEC 8025C2BC 00C73026 */ xor $a2, $a2, $a3
|
||||
/* F37AF0 8025C2C0 00063D3A */ dsrl $a3, $a2, 20
|
||||
/* F37AF4 8025C2C4 30E70FFF */ andi $a3, $a3, 0xFFF
|
||||
/* F37AF8 8025C2C8 00E63826 */ xor $a3, $a3, $a2
|
||||
/* F37AFC 8025C2CC 0007103C */ dsll32 $v0, $a3, 0
|
||||
/* F37B00 8025C2D0 FC870000 */ sd $a3, 0x0($a0)
|
||||
/* F37B04 8025C2D4 03E00008 */ jr $ra
|
||||
/* F37B08 8025C2D8 0002103F */ dsra32 $v0, $v0, 0
|
||||
/* F37B0C 8025C2DC 00000000 */ nop
|
||||
endlabel func_8025C29C
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,50 @@
|
|||
#ifndef __BANJO_KAZOOIE_VERSION_H__
|
||||
#define __BANJO_KAZOOIE_VERSION_H__
|
||||
|
||||
//These values of `VERSION` match the values defined via the Makefile
|
||||
#define VERSION_USA_1_0 0
|
||||
#define VERSION_PAL 1
|
||||
#define VERSION_USA_1_1 2
|
||||
#define VERSION_JP 3
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
#define USA10_EXCLUSIVE(body) body
|
||||
#else
|
||||
#define USA10_EXCLUSIVE(body)
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
#define PAL_EXCLUSIVE(body) body
|
||||
#else
|
||||
#define PAL_EXCLUSIVE(body)
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_USA_1_1
|
||||
#define USA11_EXCLUSIVE(body) body
|
||||
#else
|
||||
#define USA11_EXCLUSIVE(body)
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_JP
|
||||
#define JP_EXCLUSIVE(body) body
|
||||
#else
|
||||
#define JP_EXCLUSIVE(body)
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
#define VER_SELECT(usa0, pal, usa1, jp) usa0
|
||||
#elif VERSION == VERSION_PAL
|
||||
#define VER_SELECT(usa0, pal, usa1, jp) pal
|
||||
#elif VERSION == VERSION_USA_1_1
|
||||
#define VER_SELECT(usa0, pal, usa1, jp) usa1
|
||||
#elif VERSION == VERSION_JP
|
||||
#define VER_SELECT(usa0, pal, usa1, jp) jp
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
#define FRAMERATE 50
|
||||
#else
|
||||
#define FRAMERATE 60
|
||||
#endif
|
||||
|
||||
#endif // __BANJO_KAZOOIE_VERSION_H__
|
|
@ -0,0 +1,385 @@
|
|||
/* Microcode renames to match ucode.h names */
|
||||
n_aspMainTextStart = _binary_bin_core1_n_aspMain_text_bin_start;
|
||||
n_aspMainTextEnd = _binary_bin_core1_n_aspMain_text_bin_end;
|
||||
gSPF3DEX_fifoTextStart = _binary_bin_core1_gSPF3DEX_fifo_text_bin_start;
|
||||
gSPF3DEX_fifoTextEnd = _binary_bin_core1_gSPF3DEX_fifo_text_bin_end;
|
||||
gSPL3DEX_fifoTextStart = _binary_bin_core1_gSPL3DEX_fifo_text_bin_start;
|
||||
gSPL3DEX_fifoTextEnd = _binary_bin_core1_gSPL3DEX_fifo_text_bin_end;
|
||||
n_aspMainDataStart = _binary_bin_core1_n_aspMain_data_bin_start;
|
||||
n_aspMainDataEnd = _binary_bin_core1_n_aspMain_data_bin_end;
|
||||
gSPF3DEX_fifoDataStart = _binary_bin_core1_gSPF3DEX_fifo_data_bin_start;
|
||||
gSPF3DEX_fifoDataEnd = _binary_bin_core1_gSPF3DEX_fifo_data_bin_end;
|
||||
gSPL3DEX_fifoDataStart = _binary_bin_core1_gSPL3DEX_fifo_data_bin_start;
|
||||
gSPL3DEX_fifoDataEnd = _binary_bin_core1_gSPL3DEX_fifo_data_bin_end;
|
||||
|
||||
/* Fixed-address buffers */
|
||||
D_8000E800 = 0x8000E800;
|
||||
D_8002D500 = 0x8002D500;
|
||||
D_8023DA00 = 0x8023E600; /* confirm */
|
||||
func_8023DA20 = 0x8023E620;
|
||||
D_803FBE00 = 0x803FBE00;
|
||||
D_803FFE00 = 0x803FFE00;
|
||||
D_803FFE10 = 0x803FFE10;
|
||||
gOverlayTable = 0x803FFE10;
|
||||
D_803A5D00 = 0x803A5D00; /* framebuffers */
|
||||
|
||||
/* Renames for the boot segment */
|
||||
boot_D_8002D500 = D_8002D500;
|
||||
boot_core1_VRAM = core1_VRAM;
|
||||
boot_D_803FBE00 = D_803FBE00;
|
||||
boot_D_803FFE00 = D_803FFE00;
|
||||
boot_gOverlayTable = gOverlayTable;
|
||||
boot_func_8023DA20 = func_8023DA20;
|
||||
|
||||
/* Temporary*/
|
||||
/* Temporary Correct*/
|
||||
_init_lpfilter = 0x80268620;
|
||||
_doModFunc = 0x80268b00;
|
||||
rmonPrintf = 0x8026976c;
|
||||
alSeqSetLoc = 0x802697ac;
|
||||
alSeqGetTicks = 0x802697c8;
|
||||
__alSeqNextDelta = 0x80269c00;
|
||||
__osSetSR = 0x80269db0;
|
||||
__osGetSR = 0x80269dc0;
|
||||
__osSetFpcCsr = 0x80269dd0;
|
||||
__osSiRawReadIo = 0x80269de0;
|
||||
__osSiRawWriteIo = 0x80269e30;
|
||||
func_8026A2E0 = 0x80269e80;
|
||||
__osEnqueueAndYield = 0x8026a4ac;
|
||||
__osEnqueueThread = 0x8026a5ac;
|
||||
__osPopThread = 0x8026a5f4;
|
||||
__osDispatchThread = 0x8026a604;
|
||||
__osCleanupThread = 0x8026A780;
|
||||
osMapTLBRdb = 0x8026a790;
|
||||
osPiRawReadIo = 0x8026a7f0;
|
||||
__ull_div = 0x8026a8b8;
|
||||
__ll_mul = 0x8026a9b8;
|
||||
__osDisableInt = 0x8026ab10;
|
||||
__osDequeueThread = 0x8026ab50;
|
||||
__osRestoreInt = 0x8026ab30;
|
||||
alSynNew = 0x8026af70;
|
||||
alSynDelete = 0x8026b270;
|
||||
__osProbeTLB = 0x8026b280;
|
||||
__osAiDeviceBusy = 0x8026b340;
|
||||
osJamMesg = 0x8026b370;
|
||||
osPiGetCmdQueue = 0x8026b4c0;
|
||||
__osPiCreateAccessQueue = 0x8026b6f0;
|
||||
__osPiGetAccess = 0x8026b740;
|
||||
__osPiRelAccess = 0x8026b784;
|
||||
osGetThreadPri = 0x8026b7b0;
|
||||
osPiRawStartDma = 0x8026B7D0;
|
||||
osEPiRawStartDma = 0x8026b8b0;
|
||||
__osDevMgrMain = 0x8026bae0;
|
||||
bcopy = 0x8026bf70;
|
||||
__osSpSetStatus = 0x8026c280;
|
||||
__osSpDeviceBusy = 0x8026c360;
|
||||
__osSpRawStartDma = 0x8026c2d0;
|
||||
__osSpSetPc = 0x8026c290;
|
||||
__osViInit = 0x8026c390;
|
||||
__osTimerServicesInit = 0x8026c4d0;
|
||||
__osTimerInterrupt = 0x8026c55c;
|
||||
__osSetTimerIntr = 0x8026c6d4;
|
||||
__osInsertTimer = 0x8026c748;
|
||||
__osSetCompare = 0x8026c8d0;
|
||||
__osSpGetStatus = 0x8026c8e0;
|
||||
__osViGetCurrentContext = 0x8026c8f0;
|
||||
__osViSwapContext = 0x8026c900;
|
||||
osGetCount = 0x8026cc60;
|
||||
guNormalize = 0x8026cc70;
|
||||
__osSiCreateAccessQueue = 0x8026cd00;
|
||||
__osSiGetAccess = 0x8026cd50;
|
||||
__osSiRelAccess = 0x8026cd94;
|
||||
__osSiRawStartDma = 0x8026cdc0;
|
||||
__osContAddressCrc = 0x8026d1e0;
|
||||
__osContRamWrite = 0x8026d360;
|
||||
__osContRamRead = 0x8026d6e0;
|
||||
__osPfsGetStatus = 0x8026da70;
|
||||
__osGetId = 0x8026e1f4;
|
||||
osPfsChecker = 0x8026e8e0;
|
||||
osEepromWrite = 0x8026f340;
|
||||
osEepromRead = 0x8026f890;
|
||||
|
||||
|
||||
__osThreadTail = 0x802770c0;
|
||||
__osRunQueue = 0x802770c8;
|
||||
__osActiveQueue = 0x802770cc;
|
||||
__osRunningThread = 0x802770d0;
|
||||
__osPiAccessQueueEnabled = 0x802770e0;
|
||||
__osViCurr = 0x80277150;
|
||||
__osViNext = 0x80277154;
|
||||
__osTimerList = 0x80277160;
|
||||
__libm_qnan_f = 0x80278AF0;
|
||||
__osPiDevMgr = 0x80276eb0;
|
||||
CartRomHandle = 0x80285A00;
|
||||
LeoDiskHandle = 0x80285A80;
|
||||
__osPiAccessQueue = 0x80285b08;
|
||||
__osCurrentTime = 0x80285b40;
|
||||
__osBaseCounter = 0x80285b48;
|
||||
__osViIntrCount = 0x80285b4c;
|
||||
__osPfsPifRam = 0x80285b80;
|
||||
|
||||
core2_VRAM = 0x80286db0;
|
||||
core2_TEXT_START = 0x80286db0;
|
||||
animCache_flushStale = 0x80287f40;
|
||||
animBinCache_flushStale = 0x8028855c;
|
||||
player_getPosition = 0x8028e7c4;
|
||||
player_getPosition_s32 = 0x8028e95c;
|
||||
player_getWaterState = 0x8028eca4;
|
||||
player_is_present = 0x8028eff4;
|
||||
func_8028F22C = 0x8028f04c;
|
||||
spawnQueue_func_802C3A18 = 0x802C3898;
|
||||
spawnQueue_flush = 0x802c38b8;
|
||||
func_802C5A30 = 0x802c5b20;
|
||||
mapSpecificFlags_get = 0x802caeb8;
|
||||
mapSpecificFlags_validateCRC1 = 0x802cb1cc;
|
||||
func_802D686C = 0x802d6a4c;
|
||||
chmole_learnedAllSpiralMountainAbilities = 0x802da678;
|
||||
chOverlayNoController_spawn = 0x802dd1e8;
|
||||
chOverlayNoController_func_802DD040 = 0x802dd220;
|
||||
func_802E3580 = 0x802E3770;
|
||||
dummy_func_802E35D0 = 0x802E37C0;
|
||||
func_802E35D8 = 0x802E37c8;
|
||||
game_draw = 0x802E417c;
|
||||
func_802E4170 = 0x802E4360;
|
||||
func_802E4214 = 0x802E4404;
|
||||
func_802E4384 = 0x802e4574;
|
||||
func_802E4424 = 0x802E4614;
|
||||
game_defrag = 0x802e4ac8;
|
||||
func_802E49E0 = 0x802e4bd0;
|
||||
getGameMode = 0x802e4bec;
|
||||
func_802E4A08 = 0x802e4bf8;
|
||||
func_802E6820 = 0x802e6a04;
|
||||
freelist_clear = 0x802edc20;
|
||||
freelist_at = 0x802edc5c;
|
||||
freelist_size = 0x802edc74;
|
||||
freelist_next = 0x802edc84;
|
||||
freelist_elementIsAlive = 0x802eddf8;
|
||||
freelist_free = 0x802ede44;
|
||||
freelist_new = 0x802ede64;
|
||||
freelist_freeElement = 0x802edebc;
|
||||
freelist_defrag = 0x802edee0;
|
||||
func_802F1294 = 0x802f1474;
|
||||
printbuffer_defrag = 0x802f560c;
|
||||
func_802F9AA8 = 0x802f9c88;
|
||||
func_802F9F80 = 0x802fa160;
|
||||
func_802F9FD0 = 0x802fa1b0;
|
||||
func_802FA060 = 0x802fa240;
|
||||
func_80309B48 = 0x80309ce8;
|
||||
func_80309D58 = 0x80309ef8;
|
||||
func_8030A850 = 0x8030a9f0;
|
||||
gctransition_done = 0x8030bf38;
|
||||
gctransition_8030BDC0 = 0x8030bf60;
|
||||
gctransition_reset = 0x8030c07c;
|
||||
func_8030C704 = 0x8030c8a4;
|
||||
scissorBox_setSmall = 0x8030c8b0;
|
||||
func_8030D90C = 0x8030daac;
|
||||
func_8030DA44 = 0x8030dbe4;
|
||||
sfxsource_setSfxId = 0x8030dc20;
|
||||
sfxsource_setSampleRate = 0x8030dc5c;
|
||||
func_8030DBB4 = 0x8030dd54;
|
||||
func_8030E2C4 = 0x8030e464;
|
||||
func_8030E6A4 = 0x8030e844;
|
||||
func_8030ED70 = 0x8030ef10;
|
||||
func_8030E394 = 0x8030e534;
|
||||
func_8031C44C = 0x8031c82c;
|
||||
func_8031C5AC = 0x8031c98c;
|
||||
func_8031C5D4 = 0x8031c9b4;
|
||||
func_8031C618 = 0x8031c9f8;
|
||||
func_8031C638 = 0x8031ca18;
|
||||
func_80320240 = 0x80320630;
|
||||
func_803203FC = 0x803207ec;
|
||||
func_803204E4 = 0x803208d4;
|
||||
func_8032056C = 0x8032095C;
|
||||
func_80320B98 = 0x80320f88;
|
||||
func_80320C94 = 0x80321084;
|
||||
func_80320DB0 = 0x803211a0;
|
||||
jiggyscore_isCollected = 0x803213d0;
|
||||
levelSpecificFlags_get = 0x803222d4;
|
||||
levelSpecificFlags_validateCRC1 = 0x8032243c;
|
||||
func_8032274C = 0x80322b4c;
|
||||
func_80322758 = 0x80322b58;
|
||||
func_80323240 = 0x80323690;
|
||||
timedFunc_set_1 = 0x80325334;
|
||||
timedFunc_set_2 = 0x80325370;
|
||||
timedFunc_set_3 = 0x803253b4;
|
||||
marker_getActor = 0x80329db0;
|
||||
func_8032AD7C = 0x8032b1d4;
|
||||
func_803306C8 = 0x80330b18;
|
||||
map_get = 0x80334d10;
|
||||
func_80335134 = 0x80335584;
|
||||
sfxInstruments_init = 0x80335670;
|
||||
assetcache_release = 0x8033b828;
|
||||
assetcache_update_ptr = 0x8033b9c4;
|
||||
func_8033B61C = 0x8033ba6c;
|
||||
func_8033B788 = 0x8033bbd8;
|
||||
assetcache_get = 0x8033bbe8;
|
||||
assetCache_init = 0x8033bfd4;
|
||||
func_8033BD6C = 0x8033C1BC;
|
||||
func_8033BD8C = 0x8033c1dc;
|
||||
savedata_8033CA9C = 0x8033ceec;
|
||||
savedata_8033CE40 = 0x8033d15c;
|
||||
func_8033DD04 = 0x8033e154;
|
||||
func_8033DD90 = 0x8033e1e0;
|
||||
time_getDelta = 0x8033e1ec;
|
||||
allocUnusedBlock = 0x8033f3a8;
|
||||
func_8033EFB0 = 0x8033f400;
|
||||
func_8033F000 = 0x8033f450;
|
||||
demo_readInput = 0x8034a334;
|
||||
randf = 0x8034a7e0;
|
||||
func_8034C630 = 0x8034ca90;
|
||||
func_8034E698 = 0x8034eaf8;
|
||||
D_803727F4 = 0x80372d74;
|
||||
D_80379B90 = 0x8037A560;
|
||||
|
||||
core2_TEXT_END = 0x80363a00;
|
||||
core2_DATA_START = 0x80363a00;
|
||||
core2_RODATA_END = 0x8037A560;
|
||||
core2_BSS_START = 0x8037A560;
|
||||
core2_BSS_END = 0x80386dd0;
|
||||
core2_VRAM_END = 0x80386dd0;
|
||||
|
||||
CC_VRAM = 0x80386dd0;
|
||||
CC_VRAM_END = 0x8038a9e0;
|
||||
CC_ROM_START = 0x0106c980;
|
||||
CC_ROM_END = 0x01070500;
|
||||
CC_TEXT_START = 0x80386dd0;
|
||||
CC_TEXT_END = 0x8038a480;
|
||||
CC_DATA_START = 0x8038a480;
|
||||
CC_RODATA_END = 0x8038a950;
|
||||
CC_BSS_START = 0x8038a950;
|
||||
CC_BSS_END = 0x8038a9e0;
|
||||
|
||||
MMM_VRAM = 0x80386dd0;
|
||||
MMM_VRAM_END = 0x8038cf10;
|
||||
MMM_ROM_START = 0x0107bb30;
|
||||
MMM_ROM_END = 0x01081c00;
|
||||
MMM_TEXT_START = 0x80386dd0;
|
||||
MMM_TEXT_END = 0x8038c3c0;
|
||||
MMM_DATA_START = 0x8038c3c0;
|
||||
MMM_RODATA_END = 0x8038cea0;
|
||||
MMM_BSS_START = 0x8038cea0;
|
||||
MMM_BSS_END = 0x8038cf10;
|
||||
|
||||
GV_VRAM = 0x80386dd0;
|
||||
GV_VRAM_END = 0x803924f0;
|
||||
GV_ROM_START = 0x01070500;
|
||||
GV_ROM_END = 0x0107bb30;
|
||||
GV_TEXT_START = 0x80386dd0;
|
||||
GV_TEXT_END = 0x803915b0;
|
||||
GV_DATA_START = 0x803915b0;
|
||||
GV_RODATA_END = 0x80392400;
|
||||
GV_BSS_START = 0x80392400;
|
||||
GV_BSS_END = 0x803924f0;
|
||||
|
||||
TTC_VRAM = 0x80386dd0;
|
||||
TTC_VRAM_END = 0x8038e120;
|
||||
TTC_ROM_START = 0x01081c00;
|
||||
TTC_ROM_END = 0x01088f00;
|
||||
TTC_TEXT_START = 0x80386dd0;
|
||||
TTC_TEXT_END = 0x8038CD90;
|
||||
TTC_DATA_START = 0x8038CD90;
|
||||
TTC_RODATA_END = 0x8038E0D0;
|
||||
TTC_BSS_START = 0x8038E0D0;
|
||||
TTC_BSS_END = 0x8038e120;
|
||||
|
||||
MM_VRAM = 0x80386dd0;
|
||||
MM_VRAM_END = 0x8038a680;
|
||||
MM_ROM_START = 0x01088f00;
|
||||
MM_ROM_END = 0x0108c790;
|
||||
MM_TEXT_START = 0x80386dd0;
|
||||
MM_TEXT_END = 0x8038a270;
|
||||
MM_DATA_START = 0x8038a270;
|
||||
MM_RODATA_END = 0x8038a660;
|
||||
MM_BSS_START = 0x8038a660;
|
||||
MM_BSS_END = 0x8038a680;
|
||||
|
||||
BGS_VRAM = 0x80386DD0;
|
||||
BGS_TEXT_START = 0x80386DD0;
|
||||
BGS_ROM_START = 0x0108c790;
|
||||
BGS_TEXT_END = 0x80391070;
|
||||
BGS_DATA_START = 0x80391070;
|
||||
BGS_RODATA_END = 0x80391C10;
|
||||
BGS_BSS_START = 0x80391C10;
|
||||
BGS_BSS_END = 0x80391C30;
|
||||
BGS_VRAM_END = 0x80391C30;
|
||||
BGS_ROM_END = 0x010975d0;
|
||||
|
||||
RBB_VRAM = 0x80386DD0;
|
||||
RBB_VRAM_END = 0x80391cd0;
|
||||
RBB_ROM_START = 0x010975d0;
|
||||
RBB_ROM_END = 0x010a2470;
|
||||
RBB_TEXT_START = 0x80386DD0;
|
||||
RBB_TEXT_END = 0x80390a50;
|
||||
RBB_DATA_START = 0x80390a50;
|
||||
RBB_RODATA_END = 0x80391c70;
|
||||
RBB_BSS_START = 0x80391c70;
|
||||
RBB_BSS_END = 0x80391cd0;
|
||||
|
||||
FP_VRAM = 0x80386dd0;
|
||||
FP_VRAM_END = 0x80393fd0;
|
||||
FP_ROM_START = 0x010a2470;
|
||||
FP_ROM_END = 0x010aef90;
|
||||
FP_TEXT_START = 0x80386dd0;
|
||||
FP_TEXT_END = 0x803923d0;
|
||||
FP_DATA_START = 0x803923d0;
|
||||
FP_RODATA_END = 0x803938f0;
|
||||
FP_BSS_START = 0x803938f0;
|
||||
FP_BSS_END = 0x80393fd0;
|
||||
|
||||
CCW_VRAM = 0x80386dd0;
|
||||
CCW_VRAM_END = 0x803907d0;
|
||||
CCW_ROM_START = 0x010d7A90;
|
||||
CCW_ROM_END = 0x010e1470;
|
||||
CCW_TEXT_START = 0x80386dd0;
|
||||
CCW_TEXT_END = 0x8038f530;
|
||||
CCW_DATA_START = 0x8038f530;
|
||||
CCW_RODATA_END = 0x803907b0;
|
||||
CCW_BSS_START = 0x803907b0;
|
||||
CCW_BSS_END = 0x803907d0;
|
||||
|
||||
SM_VRAM = 0x80386dd0;
|
||||
SM_VRAM_END = 0x8038c010;
|
||||
SM_ROM_START = 0x010aef90;
|
||||
SM_ROM_END = 0x010b4170;
|
||||
SM_TEXT_START = 0x80386dd0;
|
||||
SM_TEXT_END = 0x8038b6e0;
|
||||
SM_DATA_START = 0x8038b6e0;
|
||||
SM_RODATA_END = 0x8038bfb0;
|
||||
SM_BSS_START = 0x8038bfb0;
|
||||
SM_BSS_END = 0x8038c010;
|
||||
|
||||
cutscenes_VRAM = 0x80386dd0;
|
||||
cutscenes_VRAM_END = 0x8038f3d0;
|
||||
cutscenes_ROM_START = 0x010b4170;
|
||||
cutscenes_ROM_END = 0x010bc760;
|
||||
cutscenes_TEXT_START = 0x80386dd0;
|
||||
cutscenes_TEXT_END = 0x8038dd30;
|
||||
cutscenes_DATA_START = 0x8038dd30;
|
||||
cutscenes_RODATA_END = 0x8038f3c0;
|
||||
cutscenes_BSS_START = 0x8038f3c0;
|
||||
cutscenes_BSS_END = 0x8038f3d0;
|
||||
|
||||
lair_VRAM = 0x80386dd0;
|
||||
lair_VRAM_END = 0x80395e50;
|
||||
lair_ROM_START = 0x010bc760;
|
||||
lair_ROM_END = 0x010cb6c0;
|
||||
lair_TEXT_START = 0x80386dd0;
|
||||
lair_TEXT_END = 0x80393690;
|
||||
lair_DATA_START = 0x80393690;
|
||||
lair_RODATA_END = 0x80395d30;
|
||||
lair_BSS_START = 0x80395d30;
|
||||
lair_BSS_END = 0x80395e50;
|
||||
|
||||
fight_VRAM = 0x80386dd0;
|
||||
fight_VRAM_END = 0x80393390;
|
||||
fight_ROM_START = 0x010cb6c0;
|
||||
fight_ROM_END = 0x010d7a90;
|
||||
fight_TEXT_START = 0x80386dd0;
|
||||
fight_TEXT_END = 0x80391de0;
|
||||
fight_DATA_START = 0x80391de0;
|
||||
fight_RODATA_END = 0x803931a0;
|
||||
fight_BSS_START = 0x803931a0;
|
||||
fight_BSS_END = 0x80393390;
|
||||
|
||||
|
||||
/* Temporary */
|
|
@ -29,3 +29,4 @@ boot_D_803FBE00 = D_803FBE00;
|
|||
boot_D_803FFE00 = D_803FFE00;
|
||||
boot_gOverlayTable = gOverlayTable;
|
||||
boot_func_8023DA20 = func_8023DA20;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
boot_core1_rzip_ROM_START = 0xF3D980;
|
||||
boot_core1_rzip_ROM_END = 0xF5BEC0;
|
||||
boot_core2_rzip_ROM_START = 0xF5BEC0;
|
||||
boot_core2_rzip_ROM_END = 0xFC8460;
|
||||
boot_CC_rzip_ROM_START = 0xFC8460;
|
||||
boot_CC_rzip_ROM_END = 0xFCA3C0;
|
||||
boot_MMM_rzip_ROM_START = 0xFCA3C0;
|
||||
boot_MMM_rzip_ROM_END = 0xFCD5C0;
|
||||
boot_GV_rzip_ROM_START = 0xFCD5C0;
|
||||
boot_GV_rzip_ROM_END = 0xFD2CC0;
|
||||
boot_TTC_rzip_ROM_START = 0xFD2CC0;
|
||||
boot_TTC_rzip_ROM_END = 0xFD6900;
|
||||
boot_MM_rzip_ROM_START = 0xFD6900;
|
||||
boot_MM_rzip_ROM_END = 0xFD8930;
|
||||
boot_BGS_rzip_ROM_START = 0xFD8930;
|
||||
boot_BGS_rzip_ROM_END = 0xFDDE80;
|
||||
boot_RBB_rzip_ROM_START = 0xFDDE80;
|
||||
boot_RBB_rzip_ROM_END = 0xFE3060;
|
||||
boot_FP_rzip_ROM_START = 0xFE3060;
|
||||
boot_FP_rzip_ROM_END = 0xFE8CA0;
|
||||
boot_CCW_rzip_ROM_START = 0xFFA830;
|
||||
boot_CCW_rzip_ROM_END = 0xFFF090;
|
||||
boot_SM_rzip_ROM_START = 0xFE8CA0;
|
||||
boot_SM_rzip_ROM_END = 0xFEB540;
|
||||
boot_cutscenes_rzip_ROM_START = 0xFEB540;
|
||||
boot_cutscenes_rzip_ROM_END = 0xFED780;
|
||||
boot_lair_rzip_ROM_START = 0xFED780;
|
||||
boot_lair_rzip_ROM_END = 0xFF4A50;
|
||||
boot_fight_rzip_ROM_START = 0xFF4A50;
|
||||
boot_fight_rzip_ROM_END = 0xFFA830;
|
||||
boot_emptyLvl_rzip_ROM_START = 0xFFF090;
|
||||
boot_emptyLvl_rzip_ROM_END = 0xFFF0B0;
|
|
@ -1,32 +0,0 @@
|
|||
boot_core1_us_v10_rzip_ROM_START = 0xF19250;
|
||||
boot_core1_us_v10_rzip_ROM_END = 0xF37F90;
|
||||
boot_core2_us_v10_rzip_ROM_START = 0xF37F90;
|
||||
boot_core2_us_v10_rzip_ROM_END = 0xFA3FD0;
|
||||
boot_CC_us_v10_rzip_ROM_START = 0xFA3FD0;
|
||||
boot_CC_us_v10_rzip_ROM_END = 0xFA5F50;
|
||||
boot_MMM_us_v10_rzip_ROM_START = 0xFA5F50;
|
||||
boot_MMM_us_v10_rzip_ROM_END = 0xFA9150;
|
||||
boot_GV_us_v10_rzip_ROM_START = 0xFA9150;
|
||||
boot_GV_us_v10_rzip_ROM_END = 0xFAE860;
|
||||
boot_TTC_us_v10_rzip_ROM_START = 0xFAE860;
|
||||
boot_TTC_us_v10_rzip_ROM_END = 0xFB24A0;
|
||||
boot_MM_us_v10_rzip_ROM_START = 0xFB24A0;
|
||||
boot_MM_us_v10_rzip_ROM_END = 0xFB44E0;
|
||||
boot_BGS_us_v10_rzip_ROM_START = 0xFB44E0;
|
||||
boot_BGS_us_v10_rzip_ROM_END = 0xFB9A30;
|
||||
boot_RBB_us_v10_rzip_ROM_START = 0xFB9A30;
|
||||
boot_RBB_us_v10_rzip_ROM_END = 0xFBEBE0;
|
||||
boot_FP_us_v10_rzip_ROM_START = 0xFBEBE0;
|
||||
boot_FP_us_v10_rzip_ROM_END = 0xFC4810;
|
||||
boot_CCW_us_v10_rzip_ROM_START = 0xFD6190;
|
||||
boot_CCW_us_v10_rzip_ROM_END = 0xFDAA10;
|
||||
boot_SM_us_v10_rzip_ROM_START = 0xFC4810;
|
||||
boot_SM_us_v10_rzip_ROM_END = 0xFC6F20;
|
||||
boot_cutscenes_us_v10_rzip_ROM_START = 0xFC6F20;
|
||||
boot_cutscenes_us_v10_rzip_ROM_END = 0xFC9150;
|
||||
boot_lair_us_v10_rzip_ROM_START = 0xFC9150;
|
||||
boot_lair_us_v10_rzip_ROM_END = 0xFD0420;
|
||||
boot_fight_us_v10_rzip_ROM_START = 0xFD0420;
|
||||
boot_fight_us_v10_rzip_ROM_END = 0xFD6190;
|
||||
boot_emptyLvl_us_v10_rzip_ROM_START = 0xFDAA10;
|
||||
boot_emptyLvl_us_v10_rzip_ROM_END = 0xFDAA30;
|
|
@ -0,0 +1,32 @@
|
|||
boot_core1_rzip_ROM_START = 0xF19250;
|
||||
boot_core1_rzip_ROM_END = 0xF37F90;
|
||||
boot_core2_rzip_ROM_START = 0xF37F90;
|
||||
boot_core2_rzip_ROM_END = 0xFA3FD0;
|
||||
boot_CC_rzip_ROM_START =0xFA3FD0;
|
||||
boot_CC_rzip_ROM_END = 0xFA5F50;
|
||||
boot_MMM_rzip_ROM_START = 0xFA5F50;
|
||||
boot_MMM_rzip_ROM_END = 0xFA9150;
|
||||
boot_GV_rzip_ROM_START = 0xFA9150;
|
||||
boot_GV_rzip_ROM_END = 0xFAE860;
|
||||
boot_TTC_rzip_ROM_START = 0xFAE860;
|
||||
boot_TTC_rzip_ROM_END = 0xFB24A0;
|
||||
boot_MM_rzip_ROM_START = 0xFB24A0;
|
||||
boot_MM_rzip_ROM_END = 0xFB44E0;
|
||||
boot_BGS_rzip_ROM_START = 0xFB44E0;
|
||||
boot_BGS_rzip_ROM_END = 0xFB9A30;
|
||||
boot_RBB_rzip_ROM_START = 0xFB9A30;
|
||||
boot_RBB_rzip_ROM_END = 0xFBEBE0;
|
||||
boot_FP_rzip_ROM_START = 0xFBEBE0;
|
||||
boot_FP_rzip_ROM_END = 0xFC4810;
|
||||
boot_CCW_rzip_ROM_START = 0xFD6190;
|
||||
boot_CCW_rzip_ROM_END = 0xFDAA10;
|
||||
boot_SM_rzip_ROM_START = 0xFC4810;
|
||||
boot_SM_rzip_ROM_END = 0xFC6F20;
|
||||
boot_cutscenes_rzip_ROM_START = 0xFC6F20;
|
||||
boot_cutscenes_rzip_ROM_END = 0xFC9150;
|
||||
boot_lair_rzip_ROM_START = 0xFC9150;
|
||||
boot_lair_rzip_ROM_END = 0xFD0420;
|
||||
boot_fight_rzip_ROM_START = 0xFD0420;
|
||||
boot_fight_rzip_ROM_END = 0xFD6190;
|
||||
boot_emptyLvl_rzip_ROM_START = 0xFDAA10;
|
||||
boot_emptyLvl_rzip_ROM_END = 0xFDAA30;
|
|
@ -12,44 +12,44 @@ u8 D_8038BFC2;
|
|||
int func_8038AAB0(void){return 0;}
|
||||
|
||||
#elif VERSION == PAL
|
||||
void func_8038AAB0(s32 arg0, s32 arg1){
|
||||
if(arg1 < 0){
|
||||
func_8031A844();
|
||||
}
|
||||
else{
|
||||
D_8038BFC2 = arg1;
|
||||
func_8038B4D0(3);
|
||||
}
|
||||
}
|
||||
// void func_8038AAB0(s32 arg0, s32 arg1){
|
||||
// if(arg1 < 0){
|
||||
// func_8031A844();
|
||||
// }
|
||||
// else{
|
||||
// D_8038BFC2 = arg1;
|
||||
// func_8038B4D0(3);
|
||||
// }
|
||||
// }
|
||||
|
||||
// #pragma GLOBAL_ASM("asm/nonmatchings/SM/code_46C0/func_8038A8F0.s")
|
||||
void func_8038A8F0(s32 arg0) {
|
||||
u8 temp_v0;
|
||||
// void func_8038A8F0(s32 arg0) {
|
||||
// u8 temp_v0;
|
||||
|
||||
switch (arg0) { /* irregular */
|
||||
case 1:
|
||||
D_8038BFC1 = 1;
|
||||
func_80319400();
|
||||
break;
|
||||
case 2:
|
||||
D_8038BFC8->unk0 = (s32) D_8038BD38;
|
||||
D_8038BFC8->unk4 = (s32) D_8038BD3C;
|
||||
D_8038BFC8->unk10 = (s32) D_8038BD40;
|
||||
D_8038BFC8->unk20 = (s32) D_8038BD44;
|
||||
D_8038BFC8->unk30 = (s32) D_8038BD48;
|
||||
func_8031A5E4(&D_8038BD30, &D_8038BD34, (void *)0x8038BFC8, 0xA, &D_8038B490);
|
||||
break;
|
||||
case 3:
|
||||
temp_v0 = *(u8 *)0x8038BFC2;
|
||||
if (temp_v0 != 0) {
|
||||
func_8031B9A4(temp_v0 - 1, 0x80390000);
|
||||
}
|
||||
func_802FAF44(0);
|
||||
D_8038BFC1 = 0;
|
||||
break;
|
||||
}
|
||||
D_8038BFC0 = (s8) arg0;
|
||||
}
|
||||
// switch (arg0) { /* irregular */
|
||||
// case 1:
|
||||
// D_8038BFC1 = 1;
|
||||
// func_80319400();
|
||||
// break;
|
||||
// case 2:
|
||||
// D_8038BFC8->unk0 = (s32) D_8038BD38;
|
||||
// D_8038BFC8->unk4 = (s32) D_8038BD3C;
|
||||
// D_8038BFC8->unk10 = (s32) D_8038BD40;
|
||||
// D_8038BFC8->unk20 = (s32) D_8038BD44;
|
||||
// D_8038BFC8->unk30 = (s32) D_8038BD48;
|
||||
// func_8031A5E4(&D_8038BD30, &D_8038BD34, (void *)0x8038BFC8, 0xA, &D_8038B490);
|
||||
// break;
|
||||
// case 3:
|
||||
// temp_v0 = *(u8 *)0x8038BFC2;
|
||||
// if (temp_v0 != 0) {
|
||||
// func_8031B9A4(temp_v0 - 1, 0x80390000);
|
||||
// }
|
||||
// func_802FAF44(0);
|
||||
// D_8038BFC1 = 0;
|
||||
// break;
|
||||
// }
|
||||
// D_8038BFC0 = (s8) arg0;
|
||||
// }
|
||||
|
||||
|
||||
// #pragma GLOBAL_ASM("asm/nonmatchings/SM/code_46C0/func_8038A9E4.s")
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
#include "gc/gctransition.h"
|
||||
|
||||
|
||||
void setBootMap(enum map_e);
|
||||
void func_8023DFF0(s32);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
extern s32 D_80000300;
|
||||
#endif
|
||||
|
||||
s32 D_80275610 = 0;
|
||||
s32 D_80275614 = 0;
|
||||
|
@ -16,10 +19,9 @@ u32 D_8027561C[] = {
|
|||
0x9, 0x4, 0xA, 0x3, 0xB, 0x2, 0xC, 0x5, 0x0,
|
||||
0x1, 0x6, 0xD, -1
|
||||
};
|
||||
u32 D_80275650 = 0xAD019D3C; //SM_DATA_CRC_1
|
||||
u32 D_80275654 = 0xD381B72F; //SM_DATA_CRC_2
|
||||
char D_80275658[] = "HjunkDire:218755";
|
||||
|
||||
u32 D_80275650 = VER_SELECT(0xAD019D3C, 0xA371A8F3, 0, 0); //SM_DATA_CRC_1
|
||||
u32 D_80275654 = VER_SELECT(0xD381B72F, 0xD0709154, 0, 0); //SM_DATA_CRC_2
|
||||
char D_80275658[] = VER_SELECT("HjunkDire:218755", "HjunkDire:300875", "HjunkDire:", "HjunkDire:");
|
||||
|
||||
/* .bss */
|
||||
u32 D_8027A130;
|
||||
|
@ -99,6 +101,9 @@ void func_8023DBDC(void){
|
|||
}
|
||||
|
||||
void core1_init(void){
|
||||
#if VERSION == VERSION_PAL
|
||||
osTvType = 0;
|
||||
#endif
|
||||
func_80255C30();
|
||||
setBootMap(getDefaultBootMap());
|
||||
rarezip_init(); //initialize decompressor's huft table
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
extern s32 D_803727F4;
|
||||
|
||||
extern struct {
|
||||
|
@ -30,8 +32,13 @@ typedef struct {
|
|||
extern s32 D_80276574;
|
||||
|
||||
/* .data */
|
||||
s32 D_80275D30 = 0xC3A68832; //WHAT IS THIS?
|
||||
s32 D_80275D34 = 0xDDC3A724; //WHAT IS THIS?
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
s32 D_80275D30 = 0xC3A68832; //WHAT IS THIS?
|
||||
s32 D_80275D34 = 0xDDC3A724; //WHAT IS THIS?
|
||||
#elif VERSION == VERSION_PAL
|
||||
s32 D_80275D30 = 0xED7BCDB7; //WHAT IS THIS?
|
||||
s32 D_80275D34 = 0xF82DC7AC; //WHAT IS THIS?
|
||||
#endif
|
||||
s32 D_80275D38 = 0;
|
||||
|
||||
/* .bss */
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "music.h"
|
||||
#include "n_libaudio.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
extern void func_8025F570(ALCSPlayer *, u8);
|
||||
extern void func_8025F510(ALCSPlayer *, u8, u8);
|
||||
extern void func_8025F5C0(ALCSPlayer *, u8);
|
||||
|
@ -266,7 +268,11 @@ ALBank *music_get_sound_bank(void){
|
|||
void func_8024F764(s32 arg0){//music track load
|
||||
if(D_802820E0[arg0] == NULL){
|
||||
func_8033B788();
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
D_802820E0[arg0] = assetcache_get(arg0 + 0x1516);
|
||||
#elif VERSION == VERSION_PAL
|
||||
D_802820E0[arg0] = assetcache_get(arg0 + 0xd74);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -532,8 +538,8 @@ void func_80250200(s32 arg0, s16 chan, s16 arg2, f32 arg3){
|
|||
mask = osSetIntMask(OS_IM_NONE);
|
||||
tmpf = (!func_80250074(arg0))? func_8025F4A0(sp28, chan) :127.0f;
|
||||
|
||||
if(arg3 < 0.0333333351f){
|
||||
arg3 = 0.0333333351f;
|
||||
if(arg3 < (2.0f/FRAMERATE)){
|
||||
arg3 = (2.0f/FRAMERATE);
|
||||
}
|
||||
|
||||
for(i = 0; i< 0x20; i++){
|
||||
|
@ -543,7 +549,7 @@ void func_80250200(s32 arg0, s16 chan, s16 arg2, f32 arg3){
|
|||
D_80282110[i].unk0 = arg0;
|
||||
D_80282110[i].chan = chan;
|
||||
D_80282110[i].unk8 = tmpf;
|
||||
D_80282110[i].unkC = (arg2 - tmpf)/((arg3 * 60.0f)/2);
|
||||
D_80282110[i].unkC = (arg2 - tmpf)/((arg3 * (float)FRAMERATE)/2);
|
||||
D_80282110[i].unk10 = arg2;
|
||||
osSetIntMask(mask);
|
||||
return;
|
||||
|
@ -561,8 +567,8 @@ void func_80250360(s32 arg0, s32 arg1, f32 arg2){
|
|||
sp24 = func_802500CC(arg0);
|
||||
sp1C = osSetIntMask(1);
|
||||
tempo = alCSPGetTempo(sp24);
|
||||
if( arg2 < 0.0333333351f){
|
||||
arg2 = 0.0333333351f;
|
||||
if( arg2 < (2.0f/FRAMERATE)){
|
||||
arg2 = (2.0f/FRAMERATE);
|
||||
}
|
||||
for(i = 0; i < 0x20; i++){
|
||||
if(D_80282110[i].unk8 == D_80282110[i].unk10
|
||||
|
@ -571,7 +577,7 @@ void func_80250360(s32 arg0, s32 arg1, f32 arg2){
|
|||
D_80282110[i].unk0 = arg0;
|
||||
D_80282110[i].chan = -1;
|
||||
D_80282110[i].unk8 = tempo;
|
||||
D_80282110[i].unkC = (arg1 - tempo)/((arg2 * 60.0f)/2);
|
||||
D_80282110[i].unkC = (arg1 - tempo)/((arg2 * (float)FRAMERATE)/2);
|
||||
D_80282110[i].unk10 = arg1;
|
||||
osSetIntMask(sp1C);
|
||||
return;
|
||||
|
|
|
@ -2,18 +2,21 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include "ml/mtx.h"
|
||||
|
||||
void _guRotateF(Mtx*, f32, f32, f32, f32);
|
||||
f32 func_80263FF0(f32);
|
||||
f32 cosf(f32);
|
||||
|
||||
#ifndef CORE2_DATA_CRC2
|
||||
#define CORE2_DATA_CRC2 0x84D7B4F8
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
s32 D_80276570 = 0xFF62C2B8; //WHAT IS THIS?
|
||||
s32 D_80276574 = 0x84D7B4F8; //CORE2_DATA_CRC2
|
||||
#elif VERSION == VERSION_PAL
|
||||
s32 D_80276570 = 0xF71CBE76; //WHAT IS THIS?
|
||||
s32 D_80276574 = 0xA2B6F47C; //CORE2_DATA_CRC2
|
||||
#endif
|
||||
|
||||
s32 D_80276570 = 0xFF62C2B8; //WHAT IS THIS?
|
||||
s32 D_80276574 = CORE2_DATA_CRC2;
|
||||
f32 D_80276578 = BAD_DTOR;
|
||||
f32 D_8027657C = BAD_DTOR;
|
||||
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
|
||||
/* .data*/
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
u32 D_80276CB0 = 0xD22FFFD8; //WHAT IS THIS?
|
||||
u32 D_80276CB4 = 0xDEFEF692; //WHAT IS THIS?
|
||||
#elif VERSION == VERSION_PAL
|
||||
u32 D_80276CB0 = 0x90FA97CB; //WHAT IS THIS?
|
||||
u32 D_80276CB4 = 0x8D96D002; //WHAT IS THIS?
|
||||
#endif
|
||||
u16 *D_80276CB8 = NULL; //! ml_acosPrecValTblPtr
|
||||
//! Might not be 90, but 91 or 92? Initial lowerIdx is OOB if 90
|
||||
f32 ml_acosValTbl[90] = { //D_80276CBC
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
#include "version.h"
|
||||
|
||||
extern func_8024FDDC(u8, s32);
|
||||
|
||||
|
@ -540,19 +540,20 @@ void func_8025AB00(void){
|
|||
}
|
||||
|
||||
void comusic_8025AB44(enum comusic_e comusic_id, s32 arg1, s32 arg2){
|
||||
func_8025AC20(comusic_id, arg1, arg2, 0.0f, "comusic.c", 0x39e);
|
||||
func_8025AC20(comusic_id, arg1, arg2, 0.0f, "comusic.c", VER_SELECT(0x39e, 0x39f, 0, 0));
|
||||
|
||||
}
|
||||
|
||||
void comusic_8025AB78(enum comusic_e comusic_id, s32 arg1, s32 arg2, s32 arg3){
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, arg3, "comusic.c", 0x3a3);
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, arg3, "comusic.c", VER_SELECT(0x3a3, 0x3a4, 0, 0));
|
||||
}
|
||||
|
||||
void func_8025ABB8(enum comusic_e comusic_id, s32 arg1, s32 arg2, s32 arg3){
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, (s32)&(__find_track(comusic_id)->unk1C[arg3]), "comusic.c", 0x3aa);
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, (s32)&(__find_track(comusic_id)->unk1C[arg3]), "comusic.c", VER_SELECT(0x3aa, 0x3ab,0,0));
|
||||
}
|
||||
|
||||
void func_8025AC20(enum comusic_e comusic_id, s32 arg1, s32 arg2, f32 arg3, char* arg4, s32 char5){
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, (s32) __find_track(comusic_id)->unk1C, "comusic.c", 0x3b1);
|
||||
func_8025AC7C(comusic_id, arg1, arg2, 0.0f, (s32) __find_track(comusic_id)->unk1C, "comusic.c", VER_SELECT(0x3b1, 0x3b2,0,0));
|
||||
}
|
||||
|
||||
void func_8025AC7C(enum comusic_e comusic_id, s32 arg1, s32 arg2, f32 arg3, s32 arg4, char* arg5, s32 arg6){
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
#include "2.0L/PR/sched.h"
|
||||
#include "n_libaudio.h"
|
||||
|
||||
#define AUDIO_HEAP_SIZE VER_SELECT(0x21000, 0x23A00, 0x21000, 0x21000)
|
||||
|
||||
extern void n_alInit(N_ALGlobals *, ALSynConfig *);
|
||||
|
||||
typedef struct AudioInfo_s {
|
||||
|
@ -144,12 +147,12 @@ struct {
|
|||
} audioManager;
|
||||
u8 pad_8027C178[0xE78];
|
||||
ALHeap D_8027CFF0;
|
||||
u8 * D_8027D000;
|
||||
u8 * D_8027D000;
|
||||
s32 D_8027D004;
|
||||
OSMesgQueue D_8027D008;
|
||||
OSMesg D_8027D020[50];
|
||||
OSMesg D_8027D020[3000/FRAMERATE];
|
||||
OSIoMesg D_8027D0E8;
|
||||
Struct_core1_1D00_4 D_8027D100[50];
|
||||
Struct_core1_1D00_4 D_8027D100[3000/FRAMERATE];
|
||||
struct {
|
||||
u8 unk0;
|
||||
Struct_1D00_3 *unk4;
|
||||
|
@ -282,11 +285,15 @@ void func_8023FA64(ALSeqpConfig *arg0) {
|
|||
}
|
||||
|
||||
void audioManager_init(void){
|
||||
D_8027D000 = (u8 *) malloc(0x21000);
|
||||
bzero(D_8027D000, 0x21000);
|
||||
alHeapInit(&D_8027CFF0, D_8027D000, 0x21000);
|
||||
D_8027D000 = (u8 *) malloc(AUDIO_HEAP_SIZE);
|
||||
bzero(D_8027D000, AUDIO_HEAP_SIZE);
|
||||
alHeapInit(&D_8027CFF0, D_8027D000, AUDIO_HEAP_SIZE);
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if(osTvType != OS_TV_NTSC)
|
||||
osViClock = 0x2e6025c;
|
||||
#elif VERSION == VERSION_PAL
|
||||
osViClock = 0x2f5b2d2;
|
||||
#endif
|
||||
audioManager_create();
|
||||
sfxInstruments_init();
|
||||
musicInstruments_init();
|
||||
|
@ -297,10 +304,10 @@ void audioManager_create(void) {
|
|||
int i;
|
||||
f32 var_f0;
|
||||
|
||||
osCreateMesgQueue(&D_8027D008, D_8027D020, 50);
|
||||
osCreateMesgQueue(&D_8027D008, D_8027D020, 3000/FRAMERATE);
|
||||
osCreateMesgQueue(&audioManager.audioReplyMsgQ, audioManager.audioReplyMsgBuf, 8); //audioReplyMesgQueue
|
||||
osCreateMesgQueue(&audioManager.audioFrameMsgQ, audioManager.audioFrameMsgBuf, 8);
|
||||
var_f0 = 733.333313f;
|
||||
var_f0 = 44000.0f/FRAMERATE;
|
||||
D_8027DD74 = (s32)var_f0;
|
||||
if ((f32) D_8027DD74 < var_f0) {
|
||||
D_8027DD74++;
|
||||
|
@ -321,14 +328,14 @@ void audioManager_create(void) {
|
|||
D_8027D5C0[0].unk0.next = NULL;
|
||||
for(i = 0; i < 89; i++){
|
||||
alLink((ALLink *)&D_8027D5C0[i+1], (ALLink *)&D_8027D5C0[i]);
|
||||
D_8027D5C0[i].unk10 = alHeapDBAlloc(0, 0, D_8027DD50.heap, 1, 0x200);
|
||||
D_8027D5C0[i].unk10 = alHeapDBAlloc(0, 0, D_8027DD50.heap, 1, VER_SELECT(0x200, 0x270, 0x200, 0x200));
|
||||
}
|
||||
D_8027D5C0[i].unk10 = alHeapDBAlloc(0, 0, D_8027DD50.heap, 1, 0x200);
|
||||
|
||||
D_8027D5C0[i].unk10 = alHeapDBAlloc(0, 0, D_8027DD50.heap, 1, VER_SELECT(0x200, 0x270, 0x200, 0x200));
|
||||
for(i = 0; i < 2; i++){
|
||||
audioManager.ACMDList[i] = malloc(20000);
|
||||
audioManager.ACMDList[i] = malloc(1200000/FRAMERATE);
|
||||
}
|
||||
D_8027DD80 = 2500;
|
||||
|
||||
D_8027DD80 = 150000/FRAMERATE;
|
||||
for(i = 0; i < 3; i++){
|
||||
audioManager.audioInfo[i] = alHeapDBAlloc(0, 0, D_8027DD50.heap, 1, 0x10);
|
||||
audioManager.audioInfo[i]->unk8 = 0;
|
||||
|
@ -368,7 +375,11 @@ bool audioManager_handleFrameMsg(AudioInfo *info, AudioInfo *prev_info){
|
|||
s16 *outbuffer;
|
||||
Acmd *sp38;
|
||||
s32 sp34;
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
s32 sp30 = 0;
|
||||
#else
|
||||
s32 sp30;
|
||||
#endif
|
||||
f32 pad;
|
||||
|
||||
outbuffer = (s16 *)osVirtualToPhysical(info->data);
|
||||
|
@ -377,13 +388,15 @@ bool audioManager_handleFrameMsg(AudioInfo *info, AudioInfo *prev_info){
|
|||
if(prev_info){
|
||||
sp30 = osAiSetNextBuffer(prev_info->data, prev_info->frameSamples*4);
|
||||
}//L8024003C
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if(sp30 == -1){
|
||||
func_80247F24(2, 0x7d2);
|
||||
func_80247F9C(prev_info->frameSamples);
|
||||
func_80247F9C(info->frameSamples);
|
||||
func_802483D8();
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if((D_80275770 >= 0x139) & !D_80275778){
|
||||
info->frameSamples = D_8027DD78;
|
||||
|
@ -401,12 +414,14 @@ bool audioManager_handleFrameMsg(AudioInfo *info, AudioInfo *prev_info){
|
|||
|
||||
sp38 = n_alAudioFrame(audioManager.ACMDList[D_8027DCD0], &sp34, outbuffer, info->frameSamples);
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if(D_8027DD80 < sp34){
|
||||
func_80247F24(2, 2000);
|
||||
func_80247F9C(sp34);
|
||||
func_80247F9C(D_8027DD80);
|
||||
func_802483D8();
|
||||
}
|
||||
#endif
|
||||
|
||||
if(sp34 == 0){
|
||||
return 0;
|
||||
|
@ -426,6 +441,7 @@ void audioManager_handleDoneMsg(AudioInfo *info)
|
|||
}
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
s32 func_80240204(s32 addr, s32 len, void *state){
|
||||
void *sp44;
|
||||
s32 sp40;
|
||||
|
@ -479,6 +495,63 @@ s32 func_80240204(s32 addr, s32 len, void *state){
|
|||
osPiStartDma(&D_8027D100[D_8027DCCC++], 1, 0, addr, sp44, 0x200U, &D_8027D008);
|
||||
return osVirtualToPhysical(sp44) + sp40;
|
||||
}
|
||||
#elif VERSION == VERSION_PAL
|
||||
#ifndef NONMATCHING
|
||||
s32 func_80240204(s32 addr, s32 len, void *state);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_1D00/func_80240204.s")
|
||||
#else
|
||||
s32 func_80240204(s32 addr, s32 len, void *state){
|
||||
void *sp44;
|
||||
s32 sp40;
|
||||
Struct_1D00_3 *phi_s0;
|
||||
Struct_1D00_3 *phi_v0;
|
||||
s32 new_var;
|
||||
Struct_1D00_3 *sp30;
|
||||
|
||||
phi_v0 = D_8027D5B0.unk4;
|
||||
sp30 = NULL;
|
||||
for(phi_s0 = phi_v0; phi_s0 != NULL; phi_s0 = phi_s0->unk0.next) {
|
||||
sp40 = (phi_s0->unk8 + 0x270);
|
||||
if ((phi_s0->unk8 > addr)) break;
|
||||
|
||||
sp30 = phi_s0;
|
||||
if ((addr + len) <= sp40) {
|
||||
phi_s0->unkC = (s32) D_8027DCC8;
|
||||
return osVirtualToPhysical(phi_s0->unk10 + (addr - phi_s0->unk8));
|
||||
}
|
||||
}
|
||||
phi_s0 = D_8027D5B0.unk8;
|
||||
if (phi_s0 == NULL) {
|
||||
return osVirtualToPhysical(phi_v0);
|
||||
}
|
||||
D_8027D5B0.unk8 = phi_s0->unk0.next;
|
||||
alUnlink(phi_s0);
|
||||
if (sp30 != NULL) {
|
||||
alLink(phi_s0, sp30);
|
||||
} else {
|
||||
phi_v0 = D_8027D5B0.unk4;
|
||||
if (phi_v0 != NULL) {
|
||||
D_8027D5B0.unk4 = phi_s0;
|
||||
phi_s0->unk0.next = (ALLink *)phi_v0;
|
||||
phi_s0->unk0.prev = NULL;
|
||||
phi_v0->unk0.prev = (ALLink *)phi_s0;
|
||||
} else {
|
||||
D_8027D5B0.unk4 = phi_s0;
|
||||
phi_s0->unk0.next = NULL;
|
||||
phi_s0->unk0.prev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
new_var = addr & 1;
|
||||
addr = addr - new_var;
|
||||
phi_s0->unk8 = addr;
|
||||
phi_s0->unkC = (s32) D_8027DCC8;
|
||||
sp44 = phi_s0->unk10;
|
||||
osPiStartDma(&D_8027D100[D_8027DCCC++], 1, 0, phi_s0->unk8, phi_s0->unk10, 0x270U, &D_8027D008);
|
||||
return osVirtualToPhysical(sp44) + new_var;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void *func_802403B8(void *state) {
|
||||
if (D_8027D5B0.unk0 == 0) {
|
||||
|
@ -498,12 +571,17 @@ void func_802403F0(void) {
|
|||
|
||||
sp40 = NULL;
|
||||
for(phi_s0 = 0; phi_s0 < D_8027DCCC; phi_s0++){
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if (osRecvMesg(&D_8027D008, &sp40, 0) == -1) {
|
||||
func_80247F24(2, 0x7D5);
|
||||
func_80247F9C(D_8027DCCC);
|
||||
func_80247F9C(phi_s0);
|
||||
func_802483D8();
|
||||
}
|
||||
#else
|
||||
osRecvMesg(&D_8027D008, &sp40, 0);
|
||||
#endif
|
||||
}
|
||||
phi_s0_2 = D_8027D5B0.unk4;
|
||||
while(phi_s0_2 != NULL){
|
||||
|
@ -527,6 +605,12 @@ void func_802403F0(void) {
|
|||
D_8027DCC8 += 1;
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
void *audioManager_getThread_PAL(void){
|
||||
return &audioManager.thread;
|
||||
}
|
||||
#endif
|
||||
|
||||
void audioManager_stopThread(void){
|
||||
if(D_80275774){
|
||||
D_80275774 = 0;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
OSIoMesg D_8027E090;
|
||||
struct {
|
||||
|
@ -13,7 +15,7 @@ OSMesgQueue D_8027E108; //g_PimgrMesgQueue
|
|||
void func_802405F0(u32 * arg0, s32 arg1, s32 size){
|
||||
s32 block_cnt;
|
||||
s32 block_remainder;
|
||||
s32 block_size = 0x20000;
|
||||
s32 block_size = VER_SELECT(0x20000, 0x8000, 0, 0);
|
||||
int i;
|
||||
|
||||
osWritebackDCache(arg0, size);
|
||||
|
@ -21,10 +23,10 @@ void func_802405F0(u32 * arg0, s32 arg1, s32 size){
|
|||
block_remainder = size % block_size;
|
||||
|
||||
for(i = 0; i < block_cnt; i++){
|
||||
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, 0x20000, &D_8027E0A8.queue);
|
||||
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, VER_SELECT(0x20000, 0x8000, 0, 0), &D_8027E0A8.queue);
|
||||
osRecvMesg(&D_8027E0A8.queue, NULL, 1);
|
||||
arg1 += 0x20000;
|
||||
arg0 += 0x8000;
|
||||
arg1 += VER_SELECT(0x20000, 0x8000, 0, 0);
|
||||
arg0 += VER_SELECT(0x8000, 0x2000, 0, 0);
|
||||
}
|
||||
|
||||
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, block_remainder, &D_8027E0A8.queue);
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "version.h"
|
||||
|
||||
static void _guMtxIdentF(float mf[4][4]);
|
||||
|
||||
u8 D_80275900[] = {0xCF, 0xAD, 0xA2, 0x90, 0x93, 0x4A, 0x83, 0xF1};
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
u8 D_80275900[8] = {0xCF, 0xAD, 0xA2, 0x90, 0x93, 0x4A, 0x83, 0xF1};
|
||||
#elif VERSION == VERSION_PAL
|
||||
u8 D_80275900[8] = {0xD3, 0x9E, 0xA6, 0x20, 0xC7, 0x7E, 0xD5, 0xC6};
|
||||
#endif
|
||||
|
||||
f32 D_80275908 = BAD_DTOR;
|
||||
|
||||
static s32 guFToFix32(f32 arg0){
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
|
@ -283,7 +283,11 @@ void func_80246D78(void){
|
|||
|
||||
if(D_802806D0){
|
||||
osStopTimer(&D_802806B0);
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
osSetTimer(&D_802806B0, ((osClockRate / 60)* 2) / 3, 0, &D_8027FB60, CORE1_8C50_EVENT_CONT_TIMER);
|
||||
#elif VERSION == VERSION_PAL
|
||||
osSetTimer(&D_802806B0, ((osClockRate / 60.0)* 2) / 3, 0, &D_8027FB60, CORE1_8C50_EVENT_CONT_TIMER);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,16 +393,40 @@ void func_8024730C(void){
|
|||
{640, 1024, 0x2501FF, 0xE0204, 2}
|
||||
}
|
||||
};
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
static OSViMode D_80275A48 = {
|
||||
OS_VI_PAL_LPN1, /* type */
|
||||
{
|
||||
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | 0x3200, /*ctrl*/
|
||||
320, /*width*/
|
||||
0x404233A, /*burst*/
|
||||
0x271, /*vSync*/
|
||||
0x150C69, /* hSync*/
|
||||
0xC6F0C6E, /* leap*/
|
||||
0x800300, /* hStart*/
|
||||
0, /* xScale*/
|
||||
0, /* vCurrent*/
|
||||
},
|
||||
{
|
||||
{640, 1024, 0x5F0239, 0x9026B, 2},
|
||||
{640, 1024, 0x5F0239, 0x9026B, 2}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
static s32 D_802806D4;
|
||||
|
||||
if(!D_802806D4){
|
||||
D_802806D4 = TRUE;
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if(osTvType != OS_TV_NTSC){
|
||||
osViSetMode(&D_802759A8);
|
||||
} else {
|
||||
osViSetMode(&D_802759F8);
|
||||
}
|
||||
#elif VERSION == VERSION_PAL
|
||||
// if(&D_802759A8){}
|
||||
osViSetMode(&D_80275A48);
|
||||
#endif
|
||||
rumbleManager_80250FC0(); //stop controller motors
|
||||
do{
|
||||
osDpSetStatus(DPC_STATUS_FLUSH);
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
extern u16 D_803A5D00[2][0xF660]; //framebuffer
|
||||
extern s32 framebuffer_width; //framebuffer width
|
||||
extern s32 framebuffer_height; //framebuffer height
|
||||
|
@ -437,4 +439,4 @@ s32 func_802485BC(void){
|
|||
void func_802485C8(UNK_TYPE(s32) arg0){
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
void func_8024BF94(s32 arg0);
|
||||
|
@ -52,6 +52,27 @@ OSViMode D_80275CD0 = {
|
|||
}
|
||||
};
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
OSViMode D_PAL_80275CD0 = {
|
||||
OS_VI_PAL_LPN1,
|
||||
{
|
||||
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | 0x3100, /*ctrl*/
|
||||
292, /* width*/
|
||||
0x404233A, /* burst*/
|
||||
0x271, /* vSync*/
|
||||
0x150C69, /* hSync*/
|
||||
0xC6F0C6E, /* leap */
|
||||
0x9802E1, /* hstart */
|
||||
0x200, /* xScale */
|
||||
0x0, /* vCurrent */
|
||||
},
|
||||
{
|
||||
{0x248, 0x350, 0x48024C, 0x9026B, 2},
|
||||
{0x248, 0x350, 0x48024C, 0x9026B, 2},
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
// 42200000 3FAD097B 41F00000 457A0000
|
||||
// C3A68832 DDC3A724 00000000 00000000
|
||||
|
||||
|
@ -65,7 +86,7 @@ OSMesg D_80280788[10];
|
|||
OSMesgQueue D_802807B0;
|
||||
OSMesg D_802807C8[1];
|
||||
OSMesgQueue D_802807D0;
|
||||
OSMesg D_802807E8[60];
|
||||
OSMesg D_802807E8[FRAMERATE];
|
||||
volatile s32 D_802808D8;
|
||||
s32 D_802808DC;
|
||||
OSThread D_802808E0;
|
||||
|
@ -108,17 +129,20 @@ void func_8024BE30(void){
|
|||
|
||||
func_8024C428();
|
||||
osCreateViManager(OS_PRIORITY_VIMGR);
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
if(osTvType != OS_TV_NTSC)
|
||||
osViSetMode(&D_80275CD0); //PAL
|
||||
else
|
||||
osViSetMode(&D_80275C80); //NTSC
|
||||
|
||||
#elif VERSION == VERSION_PAL
|
||||
osViSetMode(&D_PAL_80275CD0); //PAL
|
||||
#endif
|
||||
osViSetSpecialFeatures(OS_VI_DITHER_FILTER_ON);
|
||||
osViSetSpecialFeatures(OS_VI_GAMMA_OFF);
|
||||
osViSwapBuffer(&D_803A5D00);
|
||||
osCreateMesgQueue(&D_80280770, D_80280788, 10);
|
||||
osCreateMesgQueue(&D_802807B0, D_802807C8, 1);
|
||||
osCreateMesgQueue(&D_802807D0, D_802807E8, 60);
|
||||
osCreateMesgQueue(&D_802807D0, D_802807E8, FRAMERATE);
|
||||
osViSetEvent(&D_80280770,NULL,1);
|
||||
gActiveFramebuffer = 0;
|
||||
D_80280724 = 1;
|
||||
|
@ -207,7 +231,9 @@ void func_8024C2F8(void *arg0){
|
|||
func_80247380();
|
||||
D_802808D8++;
|
||||
if(D_802808D8 == 420){
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
func_802485BC();
|
||||
#endif
|
||||
}
|
||||
osSendMesg(&D_802807D0, NULL, OS_MESG_NOBLOCK);
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "version.h"
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
unsigned long long __ull_rshift(unsigned long long a0, unsigned long long a1)
|
||||
{
|
||||
return a0 >> a1;
|
||||
|
@ -51,3 +53,46 @@ long long __ll_rshift(long long a0, long long a1)
|
|||
{
|
||||
return a0 >> a1;
|
||||
}
|
||||
|
||||
#elif VERSION == VERSION_PAL
|
||||
|
||||
long long __d_to_ll(double a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
long long __f_to_ll(float a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
unsigned long long __d_to_ull(double a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
unsigned long long __f_to_ull(float a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
double __ll_to_d(long long a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
float __ll_to_f(long long a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
double __ull_to_d(unsigned long long a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
|
||||
float __ull_to_f(unsigned long long a0)
|
||||
{
|
||||
return a0;
|
||||
}
|
||||
#endif
|
|
@ -2,7 +2,7 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "SnS.h"
|
||||
|
||||
#include "version.h"
|
||||
/*
|
||||
* Every chunk of allocated memory is prefixed with a HeapHeader.
|
||||
*
|
||||
|
@ -16,9 +16,12 @@
|
|||
extern void func_80253010(void *dest, void *src, s32 size);
|
||||
|
||||
#define chunkSize(s) ((u32)(s)->next - (u32)(s) - sizeof(HeapHeader))
|
||||
#if VERSION == VERSION_USA_1_0
|
||||
#define HEAP_SIZE 0x210520
|
||||
#elif VERSION == VERSION_PAL
|
||||
#define HEAP_SIZE 0x211120
|
||||
#endif
|
||||
#define LAST_HEAP_BLOCK HEAP_SIZE/sizeof(EmptyHeapBlock) - 1
|
||||
|
||||
typedef enum {
|
||||
HEAP_BLOCK_EMPTY = 0,
|
||||
HEAP_BLOCK_USED = 1,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
void func_8024F35C(s32);
|
||||
|
||||
|
@ -68,7 +69,7 @@ void __rumbleUpdate(void *arg0) {
|
|||
do{
|
||||
osRecvMesg(&D_80282390, NULL, 1);
|
||||
D_802827E0++;
|
||||
if (!D_802823B0 && ((D_802827E0 % 60) == 0)) {
|
||||
if (!D_802823B0 && ((D_802827E0 % FRAMERATE) == 0)) {
|
||||
func_80250930();
|
||||
}
|
||||
prev_state = rumble_state;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
u64 gEntryStack[ENTRY_STACK_LEN_U64];
|
||||
|
||||
extern u8 core1_us_v10_rzip_ROM_START[];
|
||||
extern u8 core1_us_v10_rzip_ROM_END[];
|
||||
extern u8 core1_rzip_ROM_START[];
|
||||
extern u8 core1_rzip_ROM_END[];
|
||||
extern u8 D_8002D500;
|
||||
extern u8 core1_VRAM;
|
||||
extern u32 D_803FFE00[4];
|
||||
|
@ -25,7 +25,7 @@ void func_80000450(s32 arg0){
|
|||
tmp = &D_8002D500;
|
||||
dst = &core1_VRAM;
|
||||
osInitialize();
|
||||
osPiRawStartDma(OS_READ, core1_us_v10_rzip_ROM_START, tmp, core1_us_v10_rzip_ROM_END - core1_us_v10_rzip_ROM_START);
|
||||
osPiRawStartDma(OS_READ, core1_rzip_ROM_START, tmp, core1_rzip_ROM_END - core1_rzip_ROM_START);
|
||||
while(osPiGetStatus() & PI_STATUS_DMA_BUSY);
|
||||
func_8000055C();
|
||||
func_80000594(&tmp, &dst);
|
||||
|
|
|
@ -3,42 +3,42 @@
|
|||
#include "variables.h"
|
||||
|
||||
#define OVERLAY(ovl, _) \
|
||||
extern u8 ovl##_us_v10_rzip_ROM_START[]; \
|
||||
extern u8 ovl##_us_v10_rzip_ROM_END[];
|
||||
extern u8 ovl##_rzip_ROM_START[]; \
|
||||
extern u8 ovl##_rzip_ROM_END[];
|
||||
#include <overlays.h>
|
||||
#undef OVERLAY
|
||||
|
||||
// This doesn't match as macros, even if two macros are used per overlay.
|
||||
// Look into autogenerating this table in the long run for a cleaner solution.
|
||||
void overlay_table_init(void) {
|
||||
gOverlayTable[ 0].start = core2_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 0].end = core2_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 1].start = emptyLvl_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 1].end = emptyLvl_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 2].start = CC_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 2].end = CC_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 3].start = MMM_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 3].end = MMM_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 4].start = GV_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 4].end = GV_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 5].start = TTC_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 5].end = TTC_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 6].start = MM_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 6].end = MM_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 7].start = BGS_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 7].end = BGS_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 8].start = RBB_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 8].end = RBB_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 9].start = FP_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[ 9].end = FP_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[10].start = CCW_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[10].end = CCW_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[11].start = SM_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[11].end = SM_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[12].start = cutscenes_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[12].end = cutscenes_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[13].start = lair_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[13].end = lair_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[14].start = fight_us_v10_rzip_ROM_START;
|
||||
gOverlayTable[14].end = fight_us_v10_rzip_ROM_END;
|
||||
gOverlayTable[ 0].start = core2_rzip_ROM_START;
|
||||
gOverlayTable[ 0].end = core2_rzip_ROM_END;
|
||||
gOverlayTable[ 1].start = emptyLvl_rzip_ROM_START;
|
||||
gOverlayTable[ 1].end = emptyLvl_rzip_ROM_END;
|
||||
gOverlayTable[ 2].start = CC_rzip_ROM_START;
|
||||
gOverlayTable[ 2].end = CC_rzip_ROM_END;
|
||||
gOverlayTable[ 3].start = MMM_rzip_ROM_START;
|
||||
gOverlayTable[ 3].end = MMM_rzip_ROM_END;
|
||||
gOverlayTable[ 4].start = GV_rzip_ROM_START;
|
||||
gOverlayTable[ 4].end = GV_rzip_ROM_END;
|
||||
gOverlayTable[ 5].start = TTC_rzip_ROM_START;
|
||||
gOverlayTable[ 5].end = TTC_rzip_ROM_END;
|
||||
gOverlayTable[ 6].start = MM_rzip_ROM_START;
|
||||
gOverlayTable[ 6].end = MM_rzip_ROM_END;
|
||||
gOverlayTable[ 7].start = BGS_rzip_ROM_START;
|
||||
gOverlayTable[ 7].end = BGS_rzip_ROM_END;
|
||||
gOverlayTable[ 8].start = RBB_rzip_ROM_START;
|
||||
gOverlayTable[ 8].end = RBB_rzip_ROM_END;
|
||||
gOverlayTable[ 9].start = FP_rzip_ROM_START;
|
||||
gOverlayTable[ 9].end = FP_rzip_ROM_END;
|
||||
gOverlayTable[10].start = CCW_rzip_ROM_START;
|
||||
gOverlayTable[10].end = CCW_rzip_ROM_END;
|
||||
gOverlayTable[11].start = SM_rzip_ROM_START;
|
||||
gOverlayTable[11].end = SM_rzip_ROM_END;
|
||||
gOverlayTable[12].start = cutscenes_rzip_ROM_START;
|
||||
gOverlayTable[12].end = cutscenes_rzip_ROM_END;
|
||||
gOverlayTable[13].start = lair_rzip_ROM_START;
|
||||
gOverlayTable[13].end = lair_rzip_ROM_END;
|
||||
gOverlayTable[14].start = fight_rzip_ROM_START;
|
||||
gOverlayTable[14].end = fight_rzip_ROM_END;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
D_5E90 = 0x5E90;
|
||||
D_D846C0 = 0xD846C0;
|
||||
D_D954B0 = 0xD954B0;
|
||||
D_EA3EB0 = 0xEA3EB0;
|
||||
D_EADE60 = 0xEADE60;
|
||||
osRomBase = 0x80000308;
|
||||
bzero = 0x800020F0;
|
||||
__osSetSR = 0x80002190;
|
||||
__osGetSR = 0x800021A0;
|
||||
__osSetFpcCsr = 0x800021B0;
|
||||
osWritebackDCache = 0x80002B70;
|
||||
osInvalICache = 0x80002BF0;
|
||||
osMapTLBRdb = 0x80002C70;
|
||||
__osProbeTLB = 0x80003BD0;
|
||||
__osDisableInt = 0x80003FC0;
|
||||
__osRestoreInt = 0x80003FE0;
|
||||
bk_boot_BSS_START = 0x80005270;
|
||||
func_80253010 = 0x80252c60;
|
||||
func_80253034 = 0x80252c84;
|
||||
___osGetSR = 0x8025AC30;
|
||||
func_8025C29C = 0x8025beec;
|
||||
bzero = 0x80263790;
|
||||
osWriteBackDCacheAll = 0x80263830;
|
||||
osWritebackDCache = 0x80264740;
|
||||
osInvalDCache = 0x802647C0;
|
||||
osSetIntMask = 0x80265120;
|
||||
osInvalICache = 0x80268060;
|
||||
|
||||
|
||||
__osSetSR = 0x8026A210;
|
||||
__osGetSR = 0x8026A220;
|
||||
__osSetFpcCsr = 0x8026A230;
|
||||
__osEnqueueAndYield = 0x8026A90C;
|
||||
__osEnqueueThread = 0x8026AA0C;
|
||||
__osPopThread = 0x8026AA54;
|
||||
__osDispatchThread = 0x8026AA64;
|
||||
__osCleanupThread = 0x8026ABE0;
|
||||
osMapTLBRdb = 0x8026ABF0;
|
||||
__osDisableInt = 0x8026ACB0;
|
||||
__osRestoreInt = 0x8026ACD0;
|
||||
__osProbeTLB = 0x8026B420;
|
||||
bcopy = 0x8026C110;
|
||||
__osSetCompare = 0x8026CA70;
|
||||
osGetCount = 0x8026CE00;
|
||||
|
||||
|
||||
D_80276E70 = 0x80276bc0;
|
||||
|
||||
|
||||
|
||||
|
||||
__osShutdown = 0x8027712C;
|
||||
__OSGlobalIntMask = 0x80277130;
|
||||
__osRunQueue = 0x80277378;
|
||||
__osRunningThread = 0x80277380;
|
||||
__osFaultedThread = 0x80277384;
|
||||
__osRcpImTable = 0x80278C60;
|
||||
__libm_qnan_f = 0x80278DB0;
|
||||
|
||||
func_80240204 = 0x80240D80;
|
||||
alUnlink = 0x80264080;
|
||||
alLink = 0x802640b0;
|
||||
osVirtualToPhysical = 0x802642f0;
|
||||
osPiStartDma = 0x80264420;
|
||||
D_8027D008 = 0x8027cd48;
|
||||
D_8027D5B0 = 0x8027D408;
|
||||
D_8027DCC8 = 0x8027DB20;
|
||||
D_8027DCCC = 0x8027DB24;
|
||||
D_8027D100 = 0x8027CE68;
|
|
@ -1 +1 @@
|
|||
Subproject commit 56ecf52f2c7977af411461f6425624d8f625fc43
|
||||
Subproject commit ba74fff47c78f9243d5c5365222ad75b4d9c4eb3
|
|
@ -1 +1 @@
|
|||
Subproject commit 48ac16ba5bb0f3e926a7634c4837bf87a58cbbb5
|
||||
Subproject commit 272180b527b01c0023dc2ab02bdfdfd373670906
|
Loading…
Reference in New Issue