| ... | ... |
@@ -16,6 +16,8 @@ |
| 16 | 16 |
%8// { #03 SFT2 }
|
| 17 | 17 |
%8** { #30 SFT2 }
|
| 18 | 18 |
|
| 19 |
+%BREAKPOINT { #0101 #0e DEO2 }
|
|
| 20 |
+ |
|
| 19 | 21 |
( devices ) |
| 20 | 22 |
|
| 21 | 23 |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
| ... | ... |
@@ -132,6 +134,9 @@ BRK |
| 132 | 134 |
#3b .octave LDZ #0c * + ;play JSR2 &no-b |
| 133 | 135 |
DUP #6b ! ,&no-c2 JCN |
| 134 | 136 |
#3c .octave LDZ #0c * + ;play JSR2 &no-c2 |
| 137 |
+ DUP #1b ! ,&no-esc JCN |
|
| 138 |
+ BREAKPOINT |
|
| 139 |
+ &no-esc |
|
| 135 | 140 |
POP |
| 136 | 141 |
|
| 137 | 142 |
( release ) |
| ... | ... |
@@ -33,7 +33,7 @@ static Uint32 stdin_event; |
| 33 | 33 |
|
| 34 | 34 |
#define PAD 4 |
| 35 | 35 |
|
| 36 |
-static Uint8 zoom = 0, debug = 0, reqdraw = 0, bench = 0; |
|
| 36 |
+static Uint8 zoom = 0, reqdraw = 0, bench = 0; |
|
| 37 | 37 |
|
| 38 | 38 |
static int |
| 39 | 39 |
clamp(int val, int min, int max) |
| ... | ... |
@@ -64,7 +64,7 @@ audio_callback(void *u, Uint8 *stream, int len) |
| 64 | 64 |
static void |
| 65 | 65 |
redraw(Uxn *u) |
| 66 | 66 |
{
|
| 67 |
- if(debug) |
|
| 67 |
+ if(u->dev[0].dat[0xe]) |
|
| 68 | 68 |
inspect(&ppu, u->wst.dat, u->wst.ptr, u->rst.ptr, u->ram.dat); |
| 69 | 69 |
SDL_UpdateTexture(bgTexture, &gRect, ppu.bg.pixels, ppu.width * sizeof(Uint32)); |
| 70 | 70 |
SDL_UpdateTexture(fgTexture, &gRect, ppu.fg.pixels, ppu.width * sizeof(Uint32)); |
| ... | ... |
@@ -78,7 +78,7 @@ redraw(Uxn *u) |
| 78 | 78 |
static void |
| 79 | 79 |
toggledebug(Uxn *u) |
| 80 | 80 |
{
|
| 81 |
- debug = !debug; |
|
| 81 |
+ u->dev[0].dat[0xe] = !u->dev[0].dat[0xe]; |
|
| 82 | 82 |
redraw(u); |
| 83 | 83 |
} |
| 84 | 84 |
|
| ... | ... |
@@ -229,11 +229,11 @@ system_talk(Device *d, Uint8 b0, Uint8 w) |
| 229 | 229 |
if(!w) {
|
| 230 | 230 |
d->dat[0x2] = d->u->wst.ptr; |
| 231 | 231 |
d->dat[0x3] = d->u->rst.ptr; |
| 232 |
- } else {
|
|
| 232 |
+ } else if(b0 > 0x7 && b0 < 0xe) {
|
|
| 233 | 233 |
putcolors(&ppu, &d->dat[0x8]); |
| 234 | 234 |
reqdraw = 1; |
| 235 |
- } |
|
| 236 |
- (void)b0; |
|
| 235 |
+ } else if(b0 == 0xf) |
|
| 236 |
+ d->u->ram.ptr = 0x0000; |
|
| 237 | 237 |
} |
| 238 | 238 |
|
| 239 | 239 |
static void |
| ... | ... |
@@ -390,7 +390,7 @@ run(Uxn *u) |
| 390 | 390 |
} |
| 391 | 391 |
} |
| 392 | 392 |
evaluxn(u, mempeek16(devscreen->dat, 0)); |
| 393 |
- if(reqdraw) |
|
| 393 |
+ if(reqdraw || u->dev[0].dat[0xe]) |
|
| 394 | 394 |
redraw(u); |
| 395 | 395 |
if(!bench) {
|
| 396 | 396 |
elapsed = (SDL_GetPerformanceCounter() - start) / (double)SDL_GetPerformanceFrequency() * 1000.0f; |