Revert nds magic number check because it broke loading some homebrew roms.
This commit is contained in:
parent
3e0f2e7734
commit
3653a8dfc1
|
@ -302,20 +302,12 @@ void debug()
|
|||
|
||||
#define DSGBA_EXTENSTION ".ds.gba"
|
||||
#define DSGBA_LOADER_SIZE 512
|
||||
#define NDS_MAGIC_NUMBER_OFFSET 192
|
||||
enum
|
||||
{
|
||||
ROM_NDS = 0,
|
||||
ROM_DSGBA
|
||||
};
|
||||
|
||||
static int NDS_check_ds_rom(u8 * data)
|
||||
{
|
||||
const char ds_magic[7] = "\044\377\256Qi\232";
|
||||
|
||||
return memcmp(data+NDS_MAGIC_NUMBER_OFFSET, ds_magic, 6);
|
||||
}
|
||||
|
||||
int NDS_LoadROM( const char *filename, int bmtype, u32 bmsize,
|
||||
const char *cflash_disk_image_file)
|
||||
{
|
||||
|
@ -390,14 +382,6 @@ int NDS_LoadROM( const char *filename, int bmtype, u32 bmsize,
|
|||
reader->DeInit(file);
|
||||
MMU_unsetRom();
|
||||
NDS_SetROM(data, mask);
|
||||
|
||||
if (NDS_check_ds_rom(data) != 0) {
|
||||
MMU_unsetRom();
|
||||
free(noext);
|
||||
free(data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
NDS_Reset();
|
||||
|
||||
/* I guess any directory can be used
|
||||
|
|
Loading…
Reference in New Issue