commit bd041ea2a0fae3fbddcb0ec6c86feff0623985e7
parent ac08f08a4d7749ee4b76754d448536e4d8d18ecd
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 18 Feb 2021 18:34:26 -0800
Added toggle for debugger
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git 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
@@ -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
@@ -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