| ... | ... |
@@ -26,20 +26,6 @@ error(char *msg, const char *err) |
| 26 | 26 |
return 0; |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-static void |
|
| 30 |
-printstack(Stack *s) |
|
| 31 |
-{
|
|
| 32 |
- Uint8 x, y; |
|
| 33 |
- fprintf(stderr, "\n\n"); |
|
| 34 |
- for(y = 0; y < 0x08; ++y) {
|
|
| 35 |
- for(x = 0; x < 0x08; ++x) {
|
|
| 36 |
- Uint8 p = y * 0x08 + x; |
|
| 37 |
- fprintf(stderr, p == s->ptr ? "[%02x]" : " %02x ", s->dat[p]); |
|
| 38 |
- } |
|
| 39 |
- fprintf(stderr, "\n"); |
|
| 40 |
- } |
|
| 41 |
-} |
|
| 42 |
- |
|
| 43 | 29 |
#pragma mark - Devices |
| 44 | 30 |
|
| 45 | 31 |
static void |
| ... | ... |
@@ -48,9 +34,19 @@ system_talk(Device *d, Uint8 b0, Uint8 w) |
| 48 | 34 |
if(!w) {
|
| 49 | 35 |
d->dat[0x2] = d->u->wst.ptr; |
| 50 | 36 |
d->dat[0x3] = d->u->rst.ptr; |
| 51 |
- } else if(b0 == 0xe) |
|
| 52 |
- printstack(&d->u->wst); |
|
| 53 |
- else if(b0 == 0xf) |
|
| 37 |
+ } else if(b0 == 0xe) {
|
|
| 38 |
+ Uint8 x, y; |
|
| 39 |
+ fprintf(stderr, "\n\n"); |
|
| 40 |
+ for(y = 0; y < 0x08; ++y) {
|
|
| 41 |
+ for(x = 0; x < 0x08; ++x) {
|
|
| 42 |
+ Uint8 p = y * 0x08 + x; |
|
| 43 |
+ fprintf(stderr, |
|
| 44 |
+ p == d->u->wst.ptr ? "[%02x]" : " %02x ", |
|
| 45 |
+ d->u->wst.dat[p]); |
|
| 46 |
+ } |
|
| 47 |
+ fprintf(stderr, "\n"); |
|
| 48 |
+ } |
|
| 49 |
+ } else if(b0 == 0xf) |
|
| 54 | 50 |
d->u->ram.ptr = 0x0000; |
| 55 | 51 |
} |
| 56 | 52 |
|
| ... | ... |
@@ -138,7 +134,7 @@ load(Uxn *u, char *filepath) |
| 138 | 134 |
if(!(f = fopen(filepath, "rb"))) |
| 139 | 135 |
return 0; |
| 140 | 136 |
fread(u->ram.dat + PAGE_PROGRAM, sizeof(u->ram.dat) - PAGE_PROGRAM, 1, f); |
| 141 |
- fprintf(stderr, "Uxn loaded[%s].\n", filepath); |
|
| 137 |
+ fprintf(stderr, "Loaded %s\n", filepath); |
|
| 142 | 138 |
return 1; |
| 143 | 139 |
} |
| 144 | 140 |
|
| ... | ... |
@@ -482,7 +482,7 @@ load(Uxn *u, char *filepath) |
| 482 | 482 |
if(!(f = fopen(filepath, "rb"))) |
| 483 | 483 |
return 0; |
| 484 | 484 |
fread(u->ram.dat + PAGE_PROGRAM, sizeof(u->ram.dat) - PAGE_PROGRAM, 1, f); |
| 485 |
- fprintf(stderr, "Uxn loaded[%s].\n", filepath); |
|
| 485 |
+ fprintf(stderr, "Loaded %s\n", filepath); |
|
| 486 | 486 |
return 1; |
| 487 | 487 |
} |
| 488 | 488 |
|