PAL: match up through core1/audio/copy

This commit is contained in:
Banjo Kazooie
2024-09-07 01:54:12 -05:00
parent 64c9d1eca8
commit 057a22e8ef
8 changed files with 464 additions and 443 deletions

View File

@@ -102,7 +102,7 @@ void func_8023DBDC(void){
void core1_init(void){
#if VERSION == VERSION_PAL
D_80000300 = 0;
osTvType = 0;
#endif
func_80255C30();
func_8023E00C(func_8023DBA4());

View File

@@ -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

View File

@@ -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){

View File

@@ -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

View File

@@ -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,