mirror of https://github.com/snes9xgit/snes9x.git
WRAM works now. Gonna implement the rest of the descriptors now...
This commit is contained in:
parent
2313dc0ce4
commit
bb7850dd39
|
@ -328,19 +328,6 @@ void S9xAppendMapping(struct retro_memory_descriptor * desc)
|
|||
memcpy(&memorydesc[64 - (++memorydesc_c)], desc, sizeof(struct retro_memory_descriptor));
|
||||
}
|
||||
|
||||
//#define RETRO_MEMDESC_CONST (1 << 0)
|
||||
//struct retro_memory_descriptor {
|
||||
// uint64_t flags;
|
||||
// void * ptr;
|
||||
// size_t offset;
|
||||
// size_t start;
|
||||
// size_t select;
|
||||
// size_t disconnect;
|
||||
// size_t len;
|
||||
// const char * addrspace;
|
||||
//};
|
||||
//void S9xAppendMapping(struct retro_memory_descriptor desc);
|
||||
|
||||
bool retro_load_game(const struct retro_game_info *game)
|
||||
{
|
||||
memorydesc_c = 0;
|
||||
|
|
|
@ -663,6 +663,7 @@ struct retro_memory_descriptor {
|
|||
//If the same byte is mapped my multiple descriptors, their descriptors must have the same pointer.
|
||||
//If 'start' does not point to the first byte in the pointer, put the difference in 'offset' instead.
|
||||
//May be NULL if there's nothing usable here (e.g. hardware registers and open bus). No flags should be set if the pointer is NULL.
|
||||
//It's recommended to minimize the number of descriptors if possible, but not mandatory.
|
||||
void * ptr;
|
||||
size_t offset;
|
||||
|
||||
|
|
22
memmap.cpp
22
memmap.cpp
|
@ -2787,7 +2787,7 @@ void CMemory::map_lorom (uint32 bank_s, uint32 bank_e, uint32 addr_s, uint32 add
|
|||
desc.start=0;//
|
||||
desc.select=0x8000;
|
||||
desc.len=0;//
|
||||
S9xAppendMapping(&desc);
|
||||
//S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2816,7 +2816,7 @@ void CMemory::map_hirom (uint32 bank_s, uint32 bank_e, uint32 addr_s, uint32 add
|
|||
desc.select=0;//
|
||||
desc.disconnect=0;
|
||||
desc.len=0;//
|
||||
S9xAppendMapping(&desc);
|
||||
//S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2845,7 +2845,7 @@ void CMemory::map_lorom_offset (uint32 bank_s, uint32 bank_e, uint32 addr_s, uin
|
|||
desc.select=0;//
|
||||
desc.disconnect=0x8000;
|
||||
desc.len=0;//
|
||||
S9xAppendMapping(&desc);
|
||||
//S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2873,7 +2873,7 @@ void CMemory::map_hirom_offset (uint32 bank_s, uint32 bank_e, uint32 addr_s, uin
|
|||
desc.select=0;//
|
||||
desc.disconnect=0x0000;
|
||||
desc.len=0;//
|
||||
S9xAppendMapping(&desc);
|
||||
//S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2896,11 +2896,11 @@ void CMemory::map_space (uint32 bank_s, uint32 bank_e, uint32 addr_s, uint32 add
|
|||
desc.flags=0;
|
||||
desc.ptr=data;
|
||||
desc.offset=0;
|
||||
if (data == RAM+0x10000) { desc.ptr=RAM; desc.offset=0x10000; }
|
||||
desc.start=0;//
|
||||
desc.select=0;//
|
||||
desc.disconnect=0;//
|
||||
desc.len=0;//
|
||||
desc.start=bank_s<<16 | addr_s;
|
||||
desc.select=(bank_s<<16 | addr_s) ^ (bank_e<<16 | addr_e) ^ 0xFFFFFF;
|
||||
desc.disconnect=0;
|
||||
desc.len=0;
|
||||
if (bank_s==0x7e || bank_s==0x7f)
|
||||
S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
@ -2975,7 +2975,7 @@ void CMemory::map_index (uint32 bank_s, uint32 bank_e, uint32 addr_s, uint32 add
|
|||
desc.select=0;//
|
||||
desc.disconnect=0;//
|
||||
desc.len=0;//
|
||||
S9xAppendMapping(&desc);
|
||||
//S9xAppendMapping(&desc);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2993,8 +2993,8 @@ void CMemory::map_System (void)
|
|||
void CMemory::map_WRAM (void)
|
||||
{
|
||||
// will overwrite others
|
||||
map_space(0x7e, 0x7e, 0x0000, 0xffff, RAM);
|
||||
map_space(0x7f, 0x7f, 0x0000, 0xffff, RAM + 0x10000);
|
||||
map_space(0x7e, 0x7e, 0x0000, 0xffff, RAM);
|
||||
}
|
||||
|
||||
void CMemory::map_LoROMSRAM (void)
|
||||
|
|
Loading…
Reference in New Issue