diff src/gb/GB.cpp @ 96:cb487c4ce5c0

added write-memory!, which allows me to write any value to the gameboy's memory-mapped rom or ram.
author Robert McIntyre <rlm@mit.edu>
date Sun, 11 Mar 2012 23:27:19 -0500
parents 612393a0d3a0
children 2090bcb78f44
line wrap: on
line diff
     1.1 --- a/src/gb/GB.cpp	Sun Mar 11 23:10:44 2012 -0500
     1.2 +++ b/src/gb/GB.cpp	Sun Mar 11 23:27:19 2012 -0500
     1.3 @@ -3896,6 +3896,16 @@
     1.4    }
     1.5  }
     1.6  
     1.7 +void writeMemory(int32* newMemory){
     1.8 +  int i;
     1.9 +  int j;
    1.10 +  for (i = 0; i < 0x10; i++){
    1.11 +    for (j = 0; j< 0x1000; j++){
    1.12 +      gbMemoryMap[i][j] = (u8)(0xFF & newMemory[i*0x1000 + j]);
    1.13 +    }
    1.14 +  }
    1.15 +}
    1.16 +
    1.17  void storeRam(int32* store){
    1.18    int i;
    1.19    for (i = 0; i < gbRamSize; i++){