Skip to content

Commit

Permalink
Fix Tetris DS black screen
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jun 19, 2018
1 parent 993a8e3 commit b045c06
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions bootloader/source/card_patcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ u32 j_HaltSignature3Alt1[3] = {0xE59FC000, 0xE12FFF1C, 0x038010F3};
u32 j_HaltSignature3Alt2[3] = {0xE59FC000, 0xE12FFF1C, 0x038011BF};
u32 j_HaltSignature3Alt3[3] = {0xE59FC000, 0xE12FFF1C, 0x03803597};
u32 j_HaltSignature3Alt4[3] = {0xE59FC000, 0xE12FFF1C, 0x038040C3};
u32 j_HaltSignature3Alt5[3] = {0xE59FC000, 0xE12FFF1C, 0x038042AF};
u32 j_HaltSignature3Alt6[3] = {0xE59FC000, 0xE12FFF1C, 0x0380433F};
u32 j_HaltSignature3Alt7[3] = {0xE59FC000, 0xE12FFF1C, 0x038043E3};
u32 j_HaltSignature3Alt8[3] = {0xE59FC000, 0xE12FFF1C, 0x03804503};
u32 j_HaltSignature3Alt9[3] = {0xE59FC000, 0xE12FFF1C, 0x038045BF};
u32 j_HaltSignature3Alt10[3] = {0xE59FC000, 0xE12FFF1C, 0x0380538B};
u32 j_HaltSignature3Alt5[3] = {0xE59FC000, 0xE12FFF1C, 0x038042AB};
u32 j_HaltSignature3Alt6[3] = {0xE59FC000, 0xE12FFF1C, 0x038042AF};
u32 j_HaltSignature3Alt7[3] = {0xE59FC000, 0xE12FFF1C, 0x0380433F};
u32 j_HaltSignature3Alt8[3] = {0xE59FC000, 0xE12FFF1C, 0x038043E3};
u32 j_HaltSignature3Alt9[3] = {0xE59FC000, 0xE12FFF1C, 0x03804503};
u32 j_HaltSignature3Alt10[3] = {0xE59FC000, 0xE12FFF1C, 0x038045BF};
u32 j_HaltSignature3Alt11[3] = {0xE59FC000, 0xE12FFF1C, 0x0380538B};
u32 j_HaltSignature4[3] = {0xE59FC000, 0xE12FFF1C, 0x0380064B};
u32 j_HaltSignature4Alt1[3] = {0xE59FC000, 0xE12FFF1C, 0x038008C3};
u32 j_HaltSignature4Alt2[3] = {0xE59FC000, 0xE12FFF1C, 0x038008CF};
Expand All @@ -90,12 +91,13 @@ u32 j_GetPitchTableSignature3[3] = {0xE59FC000, 0xE12FFF1C, 0x03800FD5};
u32 j_GetPitchTableSignature3Alt1[3] = {0xE59FC000, 0xE12FFF1C, 0x03801149};
u32 j_GetPitchTableSignature3Alt2[3] = {0xE59FC000, 0xE12FFF1C, 0x03801215};
u32 j_GetPitchTableSignature3Alt3[3] = {0xE59FC000, 0xE12FFF1C, 0x03804119};
u32 j_GetPitchTableSignature3Alt4[3] = {0xE59FC000, 0xE12FFF1C, 0x03804305};
u32 j_GetPitchTableSignature3Alt5[3] = {0xE59FC000, 0xE12FFF1C, 0x03804395};
u32 j_GetPitchTableSignature3Alt6[3] = {0xE59FC000, 0xE12FFF1C, 0x03804439};
u32 j_GetPitchTableSignature3Alt7[3] = {0xE59FC000, 0xE12FFF1C, 0x03804559};
u32 j_GetPitchTableSignature3Alt8[3] = {0xE59FC000, 0xE12FFF1C, 0x03804615};
u32 j_GetPitchTableSignature3Alt9[3] = {0xE59FC000, 0xE12FFF1C, 0x038053E1};
u32 j_GetPitchTableSignature3Alt4[3] = {0xE59FC000, 0xE12FFF1C, 0x03804301};
u32 j_GetPitchTableSignature3Alt5[3] = {0xE59FC000, 0xE12FFF1C, 0x03804305};
u32 j_GetPitchTableSignature3Alt6[3] = {0xE59FC000, 0xE12FFF1C, 0x03804395};
u32 j_GetPitchTableSignature3Alt7[3] = {0xE59FC000, 0xE12FFF1C, 0x03804439};
u32 j_GetPitchTableSignature3Alt8[3] = {0xE59FC000, 0xE12FFF1C, 0x03804559};
u32 j_GetPitchTableSignature3Alt9[3] = {0xE59FC000, 0xE12FFF1C, 0x03804615};
u32 j_GetPitchTableSignature3Alt10[3] = {0xE59FC000, 0xE12FFF1C, 0x038053E1};
u32 j_GetPitchTableSignature4[3] = {0xE59FC000, 0xE12FFF1C, 0x038006A1};
u32 j_GetPitchTableSignature4Alt1[3] = {0xE59FC000, 0xE12FFF1C, 0x03800919};
u32 j_GetPitchTableSignature4Alt2[3] = {0xE59FC000, 0xE12FFF1C, 0x03800925};
Expand Down Expand Up @@ -2965,6 +2967,12 @@ void patchSwiHalt (const tNDSHeader* ndsHeader, u32* cardEngineLocation) {
}
if (!swiHaltOffset) {
dbg_printf("swiHalt SDK3 call alt 10 not found\n");
swiHaltOffset =
getOffset((u32*)ndsHeader->arm7destination, 0x00002000,//, ndsHeader->arm7binarySize,
(u32*)j_HaltSignature3Alt11, 3, 1);
}
if (!swiHaltOffset) {
dbg_printf("swiHalt SDK3 call alt 11 not found\n");
swiHaltOffset =
getOffset((u32*)ndsHeader->arm7destination, 0x00002000,//, ndsHeader->arm7binarySize,
(u32*)j_HaltSignature4, 3, 1);
Expand Down Expand Up @@ -3155,6 +3163,12 @@ void fixForDsiBios (const tNDSHeader* ndsHeader, u32* cardEngineLocation) {
}
if (!swiGetPitchTableOffset) {
dbg_printf("swiGetPitchTable SDK3 call alt 9 not found\n");
swiGetPitchTableOffset =
getOffset((u32*)ndsHeader->arm7destination, 0x00010000,//, ndsHeader->arm7binarySize,
(u32*)j_GetPitchTableSignature3Alt10, 3, 1);
}
if (!swiGetPitchTableOffset) {
dbg_printf("swiGetPitchTable SDK3 call alt 10 not found\n");
swiGetPitchTableOffset =
getOffset((u32*)ndsHeader->arm7destination, 0x00010000,//, ndsHeader->arm7binarySize,
(u32*)j_GetPitchTableSignature4, 3, 1);
Expand Down

0 comments on commit b045c06

Please sign in to comment.