diff src/gb/GB.cpp @ 94:612393a0d3a0

fixed memory retrieval function to use the simulated gameboy's mapped memory
author Robert McIntyre <rlm@mit.edu>
date Sun, 11 Mar 2012 20:55:21 -0500
parents 4c60ebca1a9d
children cb487c4ce5c0
line wrap: on
line diff
     1.1 --- a/src/gb/GB.cpp	Sun Mar 11 20:16:09 2012 -0500
     1.2 +++ b/src/gb/GB.cpp	Sun Mar 11 20:55:21 2012 -0500
     1.3 @@ -3888,8 +3888,11 @@
     1.4  
     1.5  void storeMemory(int32* store){
     1.6    int i;
     1.7 -  for (i = 0; i < 0xFFFF; i++){
     1.8 -    store[i] = (int32) gbMemory[i];
     1.9 +  int j;
    1.10 +  for (i = 0; i < 0x10; i++){
    1.11 +    for (j = 0; j < 0x1000; j++){
    1.12 +      store[i*0x1000 + j] = (int32) gbMemoryMap[i][j];
    1.13 +    }
    1.14    }
    1.15  }
    1.16