Re: Verifying console/emulator behavior with 8F
Posted by: ISSOtm
Date: 2016-07-21 20:03:33
I asserted that hte game will hang, although there is a chance my information is not correct. Anyone having a GBC/A could test ? Thanks.
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
It might or might not hang… It's also decided by how well the CPU perform
I edited my previous post, and I bump here for everyone to notice the bump.
I asserted that hte game will hang, although there is a chance my information is not correct. Anyone having a GBC/A could test ? Thanks.
It might or might not hang… It's also decided by how well the CPU perform
I edited my previous post, and I bump here for everyone to notice the bump.
I asserted that hte game will hang, although there is a chance my information is not correct. Anyone having a GBC/A could test ? Thanks.
int gb_read_memory(unsigned int address)
{
#define UNDEFINED 0xff
switch ( address >> 12 ) {
case 0u:
case 1u:
case 2u:
case 3u:
return bank0_ptr[address];
case 4u:
case 5u:
case 6u:
case 7u:
return currbank_ptr[address - 0x4000];
case 8u:
case 9u:
if ( (*LCDSTAT_ptr & 3u) >= 3 )
return UNDEFINED;
return vram_ptr[address - 0x8000];
case 0xAu:
case 0xBu:
if ( !fp_read_sram )
return UNDEFINED;
return fp_read_sram(address);
case 0xCu:
return wram_bank0_ptr[address - 0xc000];
case 0xDu:
return wram_currbank_ptr[address - 0xd000];
case 0xEu:
return wram_bank0_ptr[address - 0xe000];
case 0xFu:
if ( address >= 0xff80 )
return hram_ptr[address - 0xff80];
if ( address >= 0xff00 )
return io_regs[address - 0xff00] & io_regs_maxvalues[address - 0xff00];
if ( address >= 0xfea0 )
return UNDEFINED;
if ( address >= 0xfe00 )
return oam_ptr[address - 0xfe00];
return wram_currbank_ptr[address - 0xf000];
default:
return UNDEFINED;
}
}