Better DSi header check

This commit is contained in:
Pk11 2022-01-10 23:11:06 -06:00
parent 50192436ab
commit cc45070fb4
2 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,7 @@ GAME_TITLE := NAND Title Manager
GAME_SUBTITLE1 := JeffRuLz, Pk11
GAME_CODE := HTMA
GAME_LABEL := TITLEMAN
GAME_LABEL := NANDTM
include $(DEVKITARM)/ds_rules

View File

@ -277,5 +277,7 @@ bool isDsiHeader(tDSiHeader* h)
{
if (!h) return false;
return ( h->tid_low == (unsigned int)((h->ndshdr.gameCode[0] << 24) | (h->ndshdr.gameCode[1] << 16) | (h->ndshdr.gameCode[2] << 8) | h->ndshdr.gameCode[3]) );
u16 crc16 = swiCRC16(0xFFFF, h, 0x15E);
return h->ndshdr.headerCRC16 == crc16;
}