reorder fields for easier access on ARM
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@328 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
183bb261ff
commit
0031cecc5f
@ -111,16 +111,16 @@ void CPU::loadState(const SaveState &state) {
|
||||
memory.loadState(state/*, cycleCounter_*/);
|
||||
|
||||
cycleCounter_ = state.cpu.cycleCounter;
|
||||
PC_ = state.cpu.PC;
|
||||
SP = state.cpu.SP;
|
||||
A_ = state.cpu.A;
|
||||
B = state.cpu.B;
|
||||
C = state.cpu.C;
|
||||
D = state.cpu.D;
|
||||
E = state.cpu.E;
|
||||
PC_ = state.cpu.PC & 0xFFFF;
|
||||
SP = state.cpu.SP & 0xFFFF;
|
||||
A_ = state.cpu.A & 0xFF;
|
||||
B = state.cpu.B & 0xFF;
|
||||
C = state.cpu.C & 0xFF;
|
||||
D = state.cpu.D & 0xFF;
|
||||
E = state.cpu.E & 0xFF;
|
||||
FROM_F(state.cpu.F);
|
||||
H = state.cpu.H;
|
||||
L = state.cpu.L;
|
||||
H = state.cpu.H & 0xFF;
|
||||
L = state.cpu.L & 0xFF;
|
||||
skip = state.cpu.skip;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ class InputGetter;
|
||||
class FilterInfo;
|
||||
|
||||
class Memory {
|
||||
Cartridge cart;
|
||||
unsigned char ioamhram[0x200];
|
||||
|
||||
InputGetter *getInput;
|
||||
@ -37,7 +38,6 @@ class Memory {
|
||||
unsigned long lastOamDmaUpdate;
|
||||
|
||||
InterruptRequester intreq;
|
||||
Cartridge cart;
|
||||
Tima tima;
|
||||
LCD display;
|
||||
PSG sound;
|
||||
|
@ -1443,6 +1443,8 @@ namespace M2 {
|
||||
namespace gambatte {
|
||||
|
||||
PPUPriv::PPUPriv(NextM0Time &nextM0Time, const unsigned char *const oamram, const unsigned char *const vram) :
|
||||
nextSprite(0),
|
||||
currentSprite(0xFF),
|
||||
vram(vram),
|
||||
nextCallPtr(&M2::Ly0::f0_),
|
||||
now(0),
|
||||
@ -1464,8 +1466,6 @@ PPUPriv::PPUPriv(NextM0Time &nextM0Time, const unsigned char *const oamram, cons
|
||||
reg1(0),
|
||||
attrib(0),
|
||||
nattrib(0),
|
||||
nextSprite(0),
|
||||
currentSprite(0xFF),
|
||||
xpos(0),
|
||||
endx(0),
|
||||
cgb(false),
|
||||
|
@ -51,6 +51,10 @@ struct PPUState {
|
||||
struct PPUPriv {
|
||||
unsigned long bgPalette[8 * 4];
|
||||
unsigned long spPalette[8 * 4];
|
||||
struct Sprite { unsigned char spx, oampos, line, attrib; } spriteList[11];
|
||||
unsigned short spwordList[11];
|
||||
unsigned char nextSprite;
|
||||
unsigned char currentSprite;
|
||||
|
||||
const unsigned char *vram;
|
||||
const PPUState *nextCallPtr;
|
||||
@ -62,12 +66,9 @@ struct PPUPriv {
|
||||
unsigned tileword;
|
||||
unsigned ntileword;
|
||||
|
||||
LyCounter lyCounter;
|
||||
SpriteMapper spriteMapper;
|
||||
LyCounter lyCounter;
|
||||
PPUFrameBuf framebuf;
|
||||
|
||||
struct Sprite { unsigned char spx, oampos, line, attrib; } spriteList[11];
|
||||
unsigned short spwordList[11];
|
||||
|
||||
unsigned char lcdc;
|
||||
unsigned char scy;
|
||||
@ -82,8 +83,6 @@ struct PPUPriv {
|
||||
unsigned char reg1;
|
||||
unsigned char attrib;
|
||||
unsigned char nattrib;
|
||||
unsigned char nextSprite;
|
||||
unsigned char currentSprite;
|
||||
unsigned char xpos;
|
||||
unsigned char endx;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user