# HG changeset patch # User Robert McIntyre # Date 1331184195 21600 # Node ID 43d4fb2a6fc25342ade82248b90cd5fb6a7d0323 # Parent 60c76896493709768eb3b750c19c387369664b19 resets now work correctly diff -r 60c768964937 -r 43d4fb2a6fc2 clojure/com/aurellem/gb_driver.clj --- a/clojure/com/aurellem/gb_driver.clj Wed Mar 07 21:04:55 2012 -0600 +++ b/clojure/com/aurellem/gb_driver.clj Wed Mar 07 23:23:15 2012 -0600 @@ -3,12 +3,12 @@ (:import java.io.File) (:import (java.nio IntBuffer ByteOrder))) +(Gb/loadVBA) (def yellow-rom-image (File. "/home/r/proj/pokemon-escape/roms/yellow.gbc")) (defn vba-init [] - (Gb/loadVBA) (future (Gb/startEmulator (.getCanonicalPath yellow-rom-image)))) @@ -43,6 +43,8 @@ :u 0x0040 :d 0x0080 + :0 0x0000 + :select 0x0004 :start 0x0008 :restart 0x0800}) diff -r 60c768964937 -r 43d4fb2a6fc2 org/todo.org --- a/org/todo.org Wed Mar 07 21:04:55 2012 -0600 +++ b/org/todo.org Wed Mar 07 23:23:15 2012 -0600 @@ -35,3 +35,5 @@ step(int buttons) --- steps the game while pressing the chosen button(s) + +idea: use konami code to invoke ram writer diff -r 60c768964937 -r 43d4fb2a6fc2 src/sdl/SDL.cpp --- a/src/sdl/SDL.cpp Wed Mar 07 21:04:55 2012 -0600 +++ b/src/sdl/SDL.cpp Wed Mar 07 23:23:15 2012 -0600 @@ -2095,7 +2095,12 @@ void step(int keymask){ currentButtons[0] = keymask; - step(); + if (keymask == 0x0800){ + theEmulator.emuReset(true); + } + else { + step(); + } currentButtons[0] = keymask; }