Skip to content

Commit

Permalink
leoC2_Correction match
Browse files Browse the repository at this point in the history
  • Loading branch information
LuigiBlood committed Aug 3, 2023
1 parent 8525679 commit f50d41d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/libleo/leoc2ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,36 @@
//Tables to add here
extern u8 ganlog[512];
extern u8 glog[512];
//To be determined, should be a struct
extern static u8 LEOc2_param[16];

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunknown-pragmas"

#ifdef NON_MATCHING
s32 leoC2_Correction(void) {
switch (LEOc2_param[12]) {
case 1:
leoC2_single_ecc();
return 0;
case 2:
leoC2_double_ecc();
return 0;
case 3:
leoC2_3_ecc();
return 0;
case 4:
leoC2_4_ecc();
return 0;
default:
return -1;
case 0:
return 0;
}
}
#else
#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_Correction.s")
#endif

#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_single_ecc.s")

Expand Down
1 change: 1 addition & 0 deletions tools/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ leoDiskStack = 0x801020D0;
LEOdisk_type = 0x801006D8;
LEO_country_code = 0x801006EC;
LEOrw_flags = 0x801006D6;
LEOc2_param = 0x80101080;
leoC2_Correction = 0x80053710;
leoC2_single_ecc = 0x8005379C;
leoC2_double_ecc = 0x80053870;
Expand Down

0 comments on commit f50d41d

Please sign in to comment.