define block_param_form struct & LEOc2_param & LEOC2_Syndrome

This commit is contained in:
LuigiBlood 2023-08-04 19:46:14 +02:00
parent 760153eb15
commit f269d58d12
4 changed files with 17 additions and 4 deletions

View File

@ -15,6 +15,15 @@ typedef struct {
/* 0xA */ u8 start_block;
} tgt_param_form; // size = 0xC
typedef struct {
/* 0x00 */ u8* pntr;
/* 0x04 */ u8* c2buff_e;
/* 0x08 */ u8 err_pos[4];
/* 0x0C */ u8 err_num;
/* 0x0D */ u8 bytes;
/* 0x0E */ u16 blkbytes;
} block_param_form; // size = 0x10
typedef union {
/* 0x00 */ struct {
/* 0x00 */ u32 country;

View File

@ -1,17 +1,19 @@
#include "common.h"
#include <ultra64.h>
#include "libleo/internal.h"
//Tables to add here
extern u8 ganlog[512];
extern u8 glog[512];
//To be determined, should be a struct
extern u8 LEOc2_param[16];
extern block_param_form LEOc2_param;
extern u8 LEOC2_Syndrome[2][0xE8*4];
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#ifdef NON_MATCHING
s32 leoC2_Correction(void) {
switch (LEOc2_param[12]) {
switch (LEOc2_param.err_num) {
case 1:
leoC2_single_ecc();
return 0;

View File

@ -2,6 +2,7 @@
#include "libleo/internal.h"
extern vu16 LEOrw_flags;
extern u8 LEOC2_Syndrome[2][0xE8*4];
void* read_write_track();

View File

@ -143,6 +143,7 @@ LEOdisk_type = 0x801006D8;
LEO_country_code = 0x801006EC;
LEOrw_flags = 0x801006D6;
LEOc2_param = 0x80101080;
LEOC2_Syndrome = 0x80100940;
leoC2_Correction = 0x80053710;
leoC2_single_ecc = 0x8005379C;
leoC2_double_ecc = 0x80053870;