|
@@ -290,8 +290,7 @@ uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
290
|
290
|
is_black = 1;
|
291
|
291
|
}
|
292
|
292
|
|
293
|
|
- // TODO support one debug value on DMG
|
294
|
|
- if ((_cpu == CGB_TYPE) && (conf_get()->debug_flags & DBG_OUT_ON)) {
|
|
293
|
+ if (conf_get()->debug_flags & DBG_OUT_ON) {
|
295
|
294
|
uint8_t redraw = 0;
|
296
|
295
|
|
297
|
296
|
static int32_t prev_score = 0;
|
|
@@ -306,12 +305,18 @@ uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
306
|
305
|
uint8_t x_off = number(score, 0, 0, is_black) >> 3;
|
307
|
306
|
uint8_t y_off = 0;
|
308
|
307
|
|
|
308
|
+ uint8_t y_max = (_cpu == CGB_TYPE) ? 2 : 1;
|
|
309
|
+
|
309
|
310
|
if ((conf_get()->debug_flags & DBG_SHOW_FPS) && (y_off < 2)) {
|
310
|
311
|
static uint8_t prev_fps = 0;
|
311
|
312
|
if ((game_fps != prev_fps) || redraw) {
|
312
|
313
|
prev_fps = game_fps;
|
313
|
|
- sprintf(str_buff, get_string(STR_PRINTF_FPS), (uint8_t)game_fps);
|
314
|
|
- str_ascii(str_buff, x_off, y_off, 1);
|
|
314
|
+ if (_cpu == CGB_TYPE) {
|
|
315
|
+ sprintf(str_buff, get_string(STR_PRINTF_FPS), (uint8_t)game_fps);
|
|
316
|
+ str_ascii(str_buff, x_off, y_off, 1);
|
|
317
|
+ } else {
|
|
318
|
+ number(game_fps, x_off + 1, y_off, 1);
|
|
319
|
+ }
|
315
|
320
|
}
|
316
|
321
|
y_off++;
|
317
|
322
|
}
|
|
@@ -320,8 +325,12 @@ uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
320
|
325
|
static uint16_t prev_framecount = 0;
|
321
|
326
|
if ((frame_count != prev_framecount) || redraw) {
|
322
|
327
|
prev_framecount = frame_count;
|
323
|
|
- sprintf(str_buff, get_string(STR_PRINTF_FRAMES), (uint16_t)frame_count);
|
324
|
|
- str_ascii(str_buff, x_off, y_off, 1);
|
|
328
|
+ if (_cpu == CGB_TYPE) {
|
|
329
|
+ sprintf(str_buff, get_string(STR_PRINTF_FRAMES), (uint16_t)frame_count);
|
|
330
|
+ str_ascii(str_buff, x_off, y_off, 1);
|
|
331
|
+ } else {
|
|
332
|
+ number(frame_count, x_off + 1, y_off, 1);
|
|
333
|
+ }
|
325
|
334
|
}
|
326
|
335
|
y_off++;
|
327
|
336
|
}
|
|
@@ -330,8 +339,12 @@ uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
330
|
339
|
static uint16_t prev_timer = 0;
|
331
|
340
|
uint16_t timer = timer_get();
|
332
|
341
|
if ((timer != prev_timer) || redraw) {
|
333
|
|
- sprintf(str_buff, get_string(STR_PRINTF_TIMER), (uint16_t)timer);
|
334
|
|
- str_ascii(str_buff, x_off, y_off, 1);
|
|
342
|
+ if (_cpu == CGB_TYPE) {
|
|
343
|
+ sprintf(str_buff, get_string(STR_PRINTF_TIMER), (uint16_t)timer);
|
|
344
|
+ str_ascii(str_buff, x_off, y_off, 1);
|
|
345
|
+ } else {
|
|
346
|
+ number(timer, x_off + 1, y_off, 1);
|
|
347
|
+ }
|
335
|
348
|
}
|
336
|
349
|
y_off++;
|
337
|
350
|
}
|
|
@@ -341,8 +354,12 @@ uint8_t win_game_draw(int32_t score, uint8_t initial) BANKED {
|
341
|
354
|
get_sp();
|
342
|
355
|
if ((stack_pointer != prev_stack_pointer) || redraw) {
|
343
|
356
|
prev_stack_pointer = stack_pointer;
|
344
|
|
- sprintf(str_buff, get_string(STR_PRINTF_STACK), (uint16_t)stack_pointer);
|
345
|
|
- str_ascii(str_buff, x_off, y_off, 1);
|
|
357
|
+ if (_cpu == CGB_TYPE) {
|
|
358
|
+ sprintf(str_buff, get_string(STR_PRINTF_STACK), (uint16_t)stack_pointer);
|
|
359
|
+ str_ascii(str_buff, x_off, y_off, 1);
|
|
360
|
+ } else {
|
|
361
|
+ number(stack_pointer, x_off + 1, y_off, 1);
|
|
362
|
+ }
|
346
|
363
|
}
|
347
|
364
|
y_off++;
|
348
|
365
|
}
|