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 97f31ca
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/libleo/leoc2ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,21 @@ s32 leoC2_Correction(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_Correction.s")
#endif

#pragma GLOBAL_ASM("asm/nonmatchings/libleo/leoc2ecc/leoC2_single_ecc.s")
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);
}
}

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

Expand Down

0 comments on commit 97f31ca

Please sign in to comment.