diff --git a/README.md b/README.md index 0e66768..445a191 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ BRK ### Controller(dev/ctrl) -A device that works like a NES controller, each button is a bit from a single byte. +A device that works like a NES controller, each button is a bit from a single byte. Press `h` to toggle debugger. - `0x01` Ctrl - `0x02` Alt diff --git a/emulator.c b/emulator.c index bc23e31..4b2e3b6 100644 --- a/emulator.c +++ b/emulator.c @@ -258,6 +258,8 @@ void doctrl(SDL_Event *event, int z) { Uint8 flag = 0x00; + if(z && event->key.keysym.sym == SDLK_h) + GUIDES = !GUIDES; if(SDL_GetModState() & KMOD_LCTRL || SDL_GetModState() & KMOD_RCTRL) flag = 0x01; if(SDL_GetModState() & KMOD_LALT || SDL_GetModState() & KMOD_RALT) @@ -394,7 +396,7 @@ main(int argc, char **argv) devconsole = portuxn(&u, "console", defaultrw, consolew); devscreen = portuxn(&u, "screen", screenr, screenw); - devsprite = portuxn(&u, "sprite", defaultrw, spritew); + devsprite = portuxn(&u, "sprite", screenr, spritew); devcontroller = portuxn(&u, "controller", defaultrw, defaultrw); devkey = portuxn(&u, "key", defaultrw, consolew); devmouse = portuxn(&u, "mouse", defaultrw, defaultrw); diff --git a/examples/paint.usm b/examples/paint.usm index 2cb7cdf..7923584 100644 --- a/examples/paint.usm +++ b/examples/paint.usm @@ -29,7 +29,7 @@ BRK ( check paint ) #04 IOR #00 EQU ,skip ROT JMP? POP2 - #05 ,brush_large ~mousex #0004 SUB2 ~mousey #0004 SUB2 ,drawsprite JSR + #05 ,brush_large ~mousex #0004 SUB2 ~mousey #0004 SUB2 ,drawsprite JSR @skip ~mousex =lastx ~mousey =lasty