src/core1: renamed files

umbenannt:      src/core1/code_1E6E0.c -> src/core1/crccalc.c
        umbenannt:      src/core1/code_15770.c -> src/core1/depthbuffer.c
This commit is contained in:
mariob92
2024-10-09 08:46:12 +02:00
parent 6050ddbbd2
commit 0cee3c6697
6 changed files with 12 additions and 28 deletions

View File

@@ -174,7 +174,7 @@ segments:
- [0xF50360, c, code_13990] - [0xF50360, c, code_13990]
- [0xF51FC0, hasm, code_155F0] - [0xF51FC0, hasm, code_155F0]
- [0xF52000, c, overlay] - [0xF52000, c, overlay]
- [0xF52140, c, code_15770] - [0xF52140, c, depthbuffer]
- [0xF52500, c, code_15B30] - [0xF52500, c, code_15B30]
- [0xF53420, c, memory] - [0xF53420, c, memory]
- [0xF54AE0, c, eeprom] - [0xF54AE0, c, eeprom]
@@ -186,7 +186,7 @@ segments:
- [0xF59F90, hasm, code_1D5C0] - [0xF59F90, hasm, code_1D5C0]
- [0xF59FA0, c, code_1D5D0] - [0xF59FA0, c, code_1D5D0]
- [0xF5AD30, c, sns] - [0xF5AD30, c, sns]
- [0xF5B0B0, c, code_1E6E0] - [0xF5B0B0, c, crccalc]
- [0xF5B1F0, hasm, code_1E820] - [0xF5B1F0, hasm, code_1E820]
- [0xF5B290, c, audio/n_sl] - [0xF5B290, c, audio/n_sl]
- [0xF5B320, c, audio/n_synthesizer] - [0xF5B320, c, audio/n_synthesizer]
@@ -473,7 +473,7 @@ segments:
- [0xF791D0, .bss, stub_13640] - [0xF791D0, .bss, stub_13640]
- [0xF791D0, .bss, overlaymanager] - [0xF791D0, .bss, overlaymanager]
- [0xF791D0, .bss, code_13990] - [0xF791D0, .bss, code_13990]
- [0xF791D0, .bss, code_15770] - [0xF791D0, .bss, depthbuffer]
- [0xF791D0, .bss, code_15B30] - [0xF791D0, .bss, code_15B30]
- [0xF791D0, .bss, memory] - [0xF791D0, .bss, memory]
- [0xF791D0, .bss, ucode] - [0xF791D0, .bss, ucode]

View File

@@ -175,7 +175,7 @@ segments:
- [0xF2CBE0, c, code_13990] - [0xF2CBE0, c, code_13990]
- [0xF2E840, hasm, code_155F0] #DONE - [0xF2E840, hasm, code_155F0] #DONE
- [0xF2E880, c, overlay] #DONE - [0xF2E880, c, overlay] #DONE
- [0xF2E9C0, c, code_15770] #DONE - [0xF2E9C0, c, depthbuffer] #DONE
- [0xF2ED80, c, code_15B30] #DONE - [0xF2ED80, c, code_15B30] #DONE
- [0xF2FCA0, c, memory] #DONE - [0xF2FCA0, c, memory] #DONE
- [0xF31360, c, eeprom] #DONE - [0xF31360, c, eeprom] #DONE
@@ -187,7 +187,7 @@ segments:
- [0xF36810, hasm, code_1D5C0] #DONE - [0xF36810, hasm, code_1D5C0] #DONE
- [0xF36820, c, code_1D5D0] #DONE - [0xF36820, c, code_1D5D0] #DONE
- [0xF375B0, c, sns] #DONE - [0xF375B0, c, sns] #DONE
- [0xF37930, c, code_1E6E0] #DONE - [0xF37930, c, crccalc] #DONE
- [0xF37A70, hasm, code_1E820] #DONE - [0xF37A70, hasm, code_1E820] #DONE
- [0xF37B10, c, audio/n_sl] #DONE - [0xF37B10, c, audio/n_sl] #DONE
- [0xF37BA0, c, audio/n_synthesizer] #DONE - [0xF37BA0, c, audio/n_synthesizer] #DONE
@@ -474,7 +474,7 @@ segments:
- [0xF55960, .bss, stub_13640] - [0xF55960, .bss, stub_13640]
- [0xF55960, .bss, overlaymanager] - [0xF55960, .bss, overlaymanager]
- [0xF55960, .bss, code_13990] - [0xF55960, .bss, code_13990]
- [0xF55960, .bss, code_15770] - [0xF55960, .bss, depthbuffer]
- [0xF55960, .bss, code_15B30] - [0xF55960, .bss, code_15B30]
- [0xF55960, .bss, memory] - [0xF55960, .bss, memory]
- [0xF55960, .bss, ucode] - [0xF55960, .bss, ucode]

View File

@@ -17,10 +17,10 @@
void mlMtx_apply_vec3f(f32[3], f32[3]); void mlMtx_apply_vec3f(f32[3], f32[3]);
void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]); void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]);
void glcrc_calc_checksum(void *start, void *end, u32 checksum[2]);
/* src/core1/depthbuffer.c */
/* src/core1/code_15770.c */
extern u8 D_8000E800; extern u8 D_8000E800;

View File

@@ -504,7 +504,6 @@ void actor_update_func_80326224(Actor *this);
void func_802F9FD0(s32, f32, f32, f32); void func_802F9FD0(s32, f32, f32, f32);
void func_80324D54(f32, enum sfx_e, f32, s32, f32 [3], f32, f32); void func_80324D54(f32, enum sfx_e, f32, s32, f32 [3], f32, f32);
void glcrc_calc_checksum(void *start, void *end, u32 *checksum);
f32 climbGetBottomY(void); f32 climbGetBottomY(void);
f32 climbGetTopY(void); f32 climbGetTopY(void);
void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]); void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);

View File

@@ -1,45 +1,30 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h" #include "core1/core1.h"
#include "functions.h"
#include "variables.h"
// transform seed (in mips3 file) // transform seed (in mips3 file)
u32 func_8025C29C(u32 *seed); u32 func_8025C29C(u32 *seed); // TODO: This function does not exist in source code, why does it work?
void glcrc_calc_checksum(void *start, void *end, u32 checksum[2]) void glcrc_calc_checksum(void *start, void *end, u32 checksum[2]) {
{
u8 *p; u8 *p;
u32 shift = 0; u32 shift = 0;
u64 seed = 0x8F809F473108B3C1; u64 seed = 0x8F809F473108B3C1;
u32 crc1 = 0; u32 crc1 = 0;
u32 crc2 = 0; u32 crc2 = 0;
u32 tmp; u32 tmp;
// CRC1: Iterate forwards over bytes // CRC1: Iterate forwards over bytes
for (p = start; (void *)p < end; p++) for (p = start; (void *)p < end; p++) {
{
seed += *p << (shift & 15); seed += *p << (shift & 15);
tmp = func_8025C29C(&seed); tmp = func_8025C29C(&seed);
shift += 7; shift += 7;
crc1 ^= tmp; crc1 ^= tmp;
} }
// CRC2: Iterate backwards over bytes // CRC2: Iterate backwards over bytes
for (p = (u8 *)end - 1; (void *)p >= start; p--) for (p = (u8 *)end - 1; (void *)p >= start; p--) {
{
seed += *p << (shift & 15); seed += *p << (shift & 15);
tmp = func_8025C29C(&seed); tmp = func_8025C29C(&seed);
shift += 3; shift += 3;
crc2 ^= tmp; crc2 ^= tmp;
} }