mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
Miscellaneous DSi NAND fixes (#1852)
* Replace some standard I/O calls with Platform equivalents - I missed a spot when I submitted that PR a few months ago * Include <memory> in DSi_NAND.h - Because it uses unique_ptr * Split DSi_NAND::ReadHardwareInfo into ReadSerialData and ReadHardwareInfoN * Add a RegionMask enum * Move DSi NAND patching to the frontend * Add DSiSupportedLanguageMask - Not currently used by the frontend, but I use it in melonDS DS * Remove some Platform::ConfigEntry values - The core no longer needs to know about them - The corresponding Config values are unchanged * Mark NANDMount's destructor as noexcept
This commit is contained in:

committed by
GitHub

parent
8c4e5af737
commit
21590b0709
@ -22,6 +22,21 @@
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
|
||||
/// Set to indicate the console regions that a ROM (including DSiWare)
|
||||
/// can be played on.
|
||||
enum RegionMask : u32
|
||||
{
|
||||
NoRegion = 0,
|
||||
Japan = 1 << 0,
|
||||
USA = 1 << 1,
|
||||
Europe = 1 << 2,
|
||||
Australia = 1 << 3,
|
||||
China = 1 << 4,
|
||||
Korea = 1 << 5,
|
||||
Reserved = ~(Japan | USA | Europe | Australia | China | Korea),
|
||||
RegionFree = 0xFFFFFFFF,
|
||||
};
|
||||
|
||||
// Consult GBATEK for info on what these are
|
||||
struct NDSHeader
|
||||
{
|
||||
@ -105,7 +120,7 @@ struct NDSHeader
|
||||
u8 DSiMBKWriteProtect[3]; // global MBK9 setting
|
||||
u8 DSiWRAMCntSetting; // global WRAMCNT setting
|
||||
|
||||
u32 DSiRegionMask;
|
||||
RegionMask DSiRegionMask;
|
||||
u32 DSiPermissions[2];
|
||||
u8 Reserved6[3];
|
||||
u8 AppFlags; // flags at 1BF
|
||||
|
Reference in New Issue
Block a user