2015-10-10 02:16:12 +00:00
|
|
|
template<typename T, unsigned size>
|
|
|
|
struct ModuloArray {
|
|
|
|
inline auto operator[](signed index) const -> T {
|
|
|
|
return buffer[size + index];
|
|
|
|
}
|
|
|
|
|
|
|
|
inline auto read(signed index) const -> T {
|
|
|
|
return buffer[size + index];
|
|
|
|
}
|
|
|
|
|
|
|
|
inline auto write(unsigned index, const T value) -> void {
|
|
|
|
buffer[index] =
|
|
|
|
buffer[index + size] =
|
|
|
|
buffer[index + size + size] = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto serialize(serializer& s) -> void {
|
|
|
|
s.array(buffer, size * 3);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
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
|
|
|
T buffer[size * 3] = {0};
|
2015-10-10 02:16:12 +00:00
|
|
|
};
|