changeset 66:43d4fb2a6fc2

resets now work correctly
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 23:23:15 -0600
parents 60c768964937
children 8cb500493ec2
files clojure/com/aurellem/gb_driver.clj org/todo.org src/sdl/SDL.cpp
diffstat 3 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb_driver.clj	Wed Mar 07 21:04:55 2012 -0600
     1.2 +++ b/clojure/com/aurellem/gb_driver.clj	Wed Mar 07 23:23:15 2012 -0600
     1.3 @@ -3,12 +3,12 @@
     1.4    (:import java.io.File)
     1.5    (:import (java.nio IntBuffer ByteOrder)))
     1.6  
     1.7 +(Gb/loadVBA)
     1.8  
     1.9  (def yellow-rom-image
    1.10    (File. "/home/r/proj/pokemon-escape/roms/yellow.gbc"))
    1.11  
    1.12  (defn vba-init []
    1.13 -  (Gb/loadVBA)
    1.14    (future
    1.15      (Gb/startEmulator (.getCanonicalPath yellow-rom-image))))
    1.16  
    1.17 @@ -43,6 +43,8 @@
    1.18     :u         0x0040
    1.19     :d         0x0080
    1.20  
    1.21 +   :0         0x0000
    1.22 +   
    1.23     :select    0x0004
    1.24     :start     0x0008
    1.25     :restart   0x0800})
     2.1 --- a/org/todo.org	Wed Mar 07 21:04:55 2012 -0600
     2.2 +++ b/org/todo.org	Wed Mar 07 23:23:15 2012 -0600
     2.3 @@ -35,3 +35,5 @@
     2.4  
     2.5  step(int buttons) --- steps the game while pressing the chosen button(s)
     2.6  
     2.7 +
     2.8 +idea: use konami code to invoke ram writer
     3.1 --- a/src/sdl/SDL.cpp	Wed Mar 07 21:04:55 2012 -0600
     3.2 +++ b/src/sdl/SDL.cpp	Wed Mar 07 23:23:15 2012 -0600
     3.3 @@ -2095,7 +2095,12 @@
     3.4  
     3.5  void step(int keymask){
     3.6    currentButtons[0] = keymask;
     3.7 -  step();
     3.8 +  if (keymask == 0x0800){
     3.9 +    theEmulator.emuReset(true);
    3.10 +  }
    3.11 +  else {
    3.12 +    step();
    3.13 +  }
    3.14    currentButtons[0] = keymask;
    3.15  }
    3.16