Skip to content

Commit

Permalink
leoC2_single_ecc match
Browse files Browse the repository at this point in the history
  • Loading branch information
LuigiBlood committed Aug 4, 2023
1 parent f269d58 commit dfc4072
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/libleo/leoc2ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,25 @@ s32 leoC2_Correction(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_Correction.s")
#endif

#ifdef NON_MATCHING
void leoC2_single_ecc(void) {
u8* pointer;
u32 byte;
u8* p_s;

if (LEOc2_param.err_pos[0] < 0x55) {
byte = LEOc2_param.bytes;
pointer = &LEOc2_param.pntr[(LEOc2_param.err_pos[0] + 1) * byte];
p_s = LEOc2_param.c2buff_e;

do {
*(--pointer) ^= *(p_s -= 4);
} while(--byte != 0);
}
}
#else
#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_single_ecc.s")
#endif

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

Expand Down

0 comments on commit dfc4072

Please sign in to comment.