2015-11-10 11:02:29 +00:00
|
|
|
auto Cartridge::MROM::read(uint mode, uint32 addr) -> uint32 {
|
|
|
|
if(mode & Word) {
|
|
|
|
uint32 word = 0;
|
|
|
|
word |= read(mode & ~Word | Half, (addr & ~3) + 0) << 0;
|
|
|
|
word |= read(mode & ~Word | Half, (addr & ~3) + 2) << 16;
|
|
|
|
return word;
|
|
|
|
}
|
|
|
|
|
|
|
|
addr &= 0x01ff'ffff;
|
|
|
|
if(addr >= size) return (uint16)(addr >> 1);
|
|
|
|
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
if(mode & Half) addr &= ~1;
|
2015-11-10 11:02:29 +00:00
|
|
|
auto p = data + addr;
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
if(mode & Half) return p[0] << 0 | p[1] << 8;
|
|
|
|
if(mode & Byte) return p[0] << 0;
|
|
|
|
return 0; //should never occur
|
|
|
|
}
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto Cartridge::MROM::write(uint mode, uint32 addr, uint32 word) -> void {
|
|
|
|
}
|