comparison src/gb/GB.cpp @ 62:4699c7bab77d

added code to retrieve CPU registers
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 20:10:21 -0600
parents dc8b383ecefa
children d7c38ce83421
comparison
equal deleted inserted replaced
61:dc8b383ecefa 62:4699c7bab77d
3897 for (i = 0; i < 0x4000; i++){ 3897 for (i = 0; i < 0x4000; i++){
3898 store[i] = (int32) gbVram[i]; 3898 store[i] = (int32) gbVram[i];
3899 } 3899 }
3900 } 3900 }
3901 3901
3902 3902 void storeRegisters(int32* store){
3903 3903 store[0] = (int32) PC.W;
3904 3904 store[1] = (int32) SP.W;
3905 store[2] = (int32) AF.W;
3906 store[3] = (int32) BC.W;
3907 store[4] = (int32) DE.W;
3908 store[5] = (int32) HL.W;
3909 store[6] = (int32) register_DIV;
3910 store[7] = (int32) register_TIMA;
3911 store[8] = (int32) register_TMA;
3912 store[9] = (int32) register_TAC;
3913 store[10] = (int32) register_IF;
3914 store[11] = (int32) register_LCDC;
3915 store[12] = (int32) register_STAT;
3916 store[13] = (int32) register_SCY;
3917 store[14] = (int32) register_SCX;
3918 store[15] = (int32) register_LY;
3919 store[16] = (int32) register_LYC;
3920 store[17] = (int32) register_DMA;
3921 store[18] = (int32) register_WY;
3922 store[19] = (int32) register_WX;
3923 store[20] = (int32) register_VBK;
3924 store[21] = (int32) register_HDMA1;
3925 store[22] = (int32) register_HDMA2;
3926 store[23] = (int32) register_HDMA3;
3927 store[24] = (int32) register_HDMA4;
3928 store[25] = (int32) register_HDMA5;
3929 store[26] = (int32) register_SVBK;
3930 store[27] = (int32) register_IE;
3931 }
3905 3932
3906 struct EmulatedSystem GBSystem = 3933 struct EmulatedSystem GBSystem =
3907 { 3934 {
3908 // emuMain 3935 // emuMain
3909 gbEmulate, 3936 gbEmulate,