Mercurial > vba-clojure
diff src/gb/GB.cpp @ 93:4c60ebca1a9d
added function to get all the GB's memory.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 11 Mar 2012 20:16:09 -0500 |
parents | 1ff2c546f5ad |
children | 612393a0d3a0 |
line wrap: on
line diff
1.1 --- a/src/gb/GB.cpp Sun Mar 11 19:07:31 2012 -0500 1.2 +++ b/src/gb/GB.cpp Sun Mar 11 20:16:09 2012 -0500 1.3 @@ -46,7 +46,7 @@ 1.4 // mappers 1.5 void (*mapper)(u16, u8) = NULL; 1.6 void (*mapperRAM)(u16, u8) = NULL; 1.7 -u8 (*mapperReadRAM)(u16) = NULL; 1.8 +u8 (*mapperReadRAM)(u16) = NULL; 1.9 1.10 // registers 1.11 gbRegister PC; 1.12 @@ -55,7 +55,7 @@ 1.13 gbRegister BC; 1.14 gbRegister DE; 1.15 gbRegister HL; 1.16 -u16 IFF; 1.17 +u16 IFF; 1.18 // 0xff04 1.19 u8 register_DIV = 0; 1.20 // 0xff05 1.21 @@ -3886,6 +3886,13 @@ 1.22 return gbRomSize; 1.23 } 1.24 1.25 +void storeMemory(int32* store){ 1.26 + int i; 1.27 + for (i = 0; i < 0xFFFF; i++){ 1.28 + store[i] = (int32) gbMemory[i]; 1.29 + } 1.30 +} 1.31 + 1.32 void storeRam(int32* store){ 1.33 int i; 1.34 for (i = 0; i < gbRamSize; i++){