[nostalgia/core/gba] Fix memory range
This commit is contained in:
		@@ -45,7 +45,7 @@
 | 
			
		||||
typedef uint16_t BgMapTile[1024];
 | 
			
		||||
#define MEM_BG_MAP reinterpret_cast<BgMapTile*>(0x06000000)
 | 
			
		||||
 | 
			
		||||
#define MEM_ROM *reinterpret_cast<char*>(0x08000000)
 | 
			
		||||
#define MEM_ROM reinterpret_cast<char*>(0x08000000)
 | 
			
		||||
 | 
			
		||||
#define MEM_WRAM_BEGIN reinterpret_cast<uint8_t*>(0x02000000)
 | 
			
		||||
#define MEM_WRAM_END   reinterpret_cast<uint8_t*>(0x0203FFFF)
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ char *loadRom(const char*) {
 | 
			
		||||
	constexpr auto headerP2Len = 16;
 | 
			
		||||
	constexpr auto headerLen = headerP1Len + headerP2Len + 1;
 | 
			
		||||
 | 
			
		||||
	for (auto current = &MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
 | 
			
		||||
	for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
 | 
			
		||||
		if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
 | 
			
		||||
		    ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
 | 
			
		||||
			return current + headerLen;
 | 
			
		||||
 
 | 
			
		||||
@@ -13,10 +13,6 @@ namespace nostalgia::core {
 | 
			
		||||
 | 
			
		||||
void free(void *ptr);
 | 
			
		||||
 | 
			
		||||
void panic(const char *msg) {
 | 
			
		||||
    oxPanic(msg, OxError(1));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void initHeap(char *heapBegin, char *heapEnd);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user