diff options
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/debug.c | 49 | ||||
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 8 | ||||
-rw-r--r-- | apps/plugins/rockboy/menu.c | 5 |
3 files changed, 11 insertions, 51 deletions
diff --git a/apps/plugins/rockboy/debug.c b/apps/plugins/rockboy/debug.c index a829b98799..8dc7320035 100644 --- a/apps/plugins/rockboy/debug.c +++ b/apps/plugins/rockboy/debug.c | |||
@@ -571,7 +571,7 @@ void debug_disassemble(addr a, int c) | |||
571 | static int opaddr; | 571 | static int opaddr; |
572 | static char mnemonic[256]; | 572 | static char mnemonic[256]; |
573 | static char *pattern; | 573 | static char *pattern; |
574 | char meow[500],buf[300]; | 574 | char ops_str[300]; |
575 | if(!debug_trace) return; | 575 | if(!debug_trace) return; |
576 | 576 | ||
577 | while (c > 0) | 577 | while (c > 0) |
@@ -600,8 +600,7 @@ void debug_disassemble(addr a, int c) | |||
600 | case 'B': | 600 | case 'B': |
601 | case 'b': | 601 | case 'b': |
602 | ops[k] = readb(a); a++; | 602 | ops[k] = readb(a); a++; |
603 | j += snprintf(mnemonic + j,255-j, | 603 | j += snprintf(mnemonic + j,255-j, "%02Xh", ops[k++]); |
604 | "%02Xh", ops[k++]); | ||
605 | break; | 604 | break; |
606 | case 'W': | 605 | case 'W': |
607 | case 'w': | 606 | case 'w': |
@@ -614,8 +613,7 @@ void debug_disassemble(addr a, int c) | |||
614 | case 'O': | 613 | case 'O': |
615 | case 'o': | 614 | case 'o': |
616 | ops[k] = readb(a); a++; | 615 | ops[k] = readb(a); a++; |
617 | j += snprintf(mnemonic + j, 255-j,"%+d", | 616 | j += snprintf(mnemonic + j, 255-j,"%+d", (n8)(ops[k++])); |
618 | (n8)(ops[k++])); | ||
619 | break; | 617 | break; |
620 | } | 618 | } |
621 | i++; | 619 | i++; |
@@ -626,52 +624,19 @@ void debug_disassemble(addr a, int c) | |||
626 | } | 624 | } |
627 | } | 625 | } |
628 | mnemonic[j] = 0; | 626 | mnemonic[j] = 0; |
629 | snprintf(buf,299,"%04X ", opaddr); | ||
630 | strcpy(meow,buf); | ||
631 | switch (operand_count[ops[0]]) { | 627 | switch (operand_count[ops[0]]) { |
632 | case 1: | 628 | case 1: |
633 | snprintf(buf,299,"%02X ", ops[0]); | 629 | snprintf(ops_str,sizeof(ops_str),"%02X ", ops[0]); |
634 | strcat(meow,buf); | ||
635 | break; | 630 | break; |
636 | case 2: | 631 | case 2: |
637 | snprintf(buf,299,"%02X %02X ", ops[0], ops[1]); | 632 | snprintf(ops_str,sizeof(ops_str),"%02X %02X ", ops[0], ops[1]); |
638 | strcat(meow,buf); | ||
639 | break; | 633 | break; |
640 | case 3: | 634 | case 3: |
641 | snprintf(buf,299,"%02X %02X %02X ", ops[0], ops[1], ops[2]); | 635 | snprintf(ops_str,sizeof(ops_str),"%02X %02X %02X", ops[0], ops[1], ops[2]); |
642 | strcat(meow,buf); | ||
643 | break; | 636 | break; |
644 | } | 637 | } |
645 | snprintf(buf,"%-16.16s", mnemonic); | 638 | rb->lcd_putsxyf(0,0,"%04X %s %-16.16s", opaddr, ops_str, mnemonic); |
646 | strcat(meow,buf); | ||
647 | rb->lcd_putsxy(0,0,meow); | ||
648 | rb->lcd_update(); | 639 | rb->lcd_update(); |
649 | c--; | 640 | c--; |
650 | } | 641 | } |
651 | } | 642 | } |
652 | |||
653 | |||
654 | |||
655 | |||
656 | |||
657 | |||
658 | |||
659 | |||
660 | |||
661 | |||
662 | |||
663 | |||
664 | |||
665 | |||
666 | |||
667 | |||
668 | |||
669 | |||
670 | |||
671 | |||
672 | |||
673 | |||
674 | |||
675 | |||
676 | |||
677 | |||
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index 0da9fc7e9d..22f8864889 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c | |||
@@ -1009,10 +1009,6 @@ void setvidmode(void) | |||
1009 | 1009 | ||
1010 | void lcd_refreshline(void) | 1010 | void lcd_refreshline(void) |
1011 | { | 1011 | { |
1012 | #ifdef HAVE_LCD_COLOR | ||
1013 | char frameout[30]; | ||
1014 | #endif | ||
1015 | |||
1016 | if (!(R_LCDC & 0x80)) | 1012 | if (!(R_LCDC & 0x80)) |
1017 | return; /* should not happen... */ | 1013 | return; /* should not happen... */ |
1018 | 1014 | ||
@@ -1112,8 +1108,8 @@ void lcd_refreshline(void) | |||
1112 | { | 1108 | { |
1113 | if(options.showstats) | 1109 | if(options.showstats) |
1114 | { | 1110 | { |
1115 | snprintf(frameout,sizeof(frameout),"FPS: %d Frameskip: %d ",options.fps, options.frameskip); | 1111 | rb->lcd_putsxyf(0,LCD_HEIGHT-10,"FPS: %d Frameskip: %d ", |
1116 | rb->lcd_putsxy(0,LCD_HEIGHT-10,frameout); | 1112 | options.fps, options.frameskip); |
1117 | rb->lcd_update_rect(0,LCD_HEIGHT-10, LCD_WIDTH, 10); | 1113 | rb->lcd_update_rect(0,LCD_HEIGHT-10, LCD_WIDTH, 10); |
1118 | } | 1114 | } |
1119 | 1115 | ||
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 6e8df5c0ea..242518c01e 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c | |||
@@ -171,7 +171,7 @@ static void build_slot_path(char *buf, size_t bufsiz, int slot_id) { | |||
171 | * | 171 | * |
172 | */ | 172 | */ |
173 | static bool do_file(char *path, char *desc, bool is_load) { | 173 | static bool do_file(char *path, char *desc, bool is_load) { |
174 | char buf[200], desc_buf[20]; | 174 | char desc_buf[20]; |
175 | int fd, file_mode; | 175 | int fd, file_mode; |
176 | 176 | ||
177 | /* set file mode */ | 177 | /* set file mode */ |
@@ -191,8 +191,7 @@ static bool do_file(char *path, char *desc, bool is_load) { | |||
191 | loadstate(fd); | 191 | loadstate(fd); |
192 | 192 | ||
193 | /* print out a status message so the user knows the state loaded */ | 193 | /* print out a status message so the user knows the state loaded */ |
194 | snprintf(buf, 200, "Loaded state from \"%s\"", path); | 194 | rb->splashf(HZ * 1, "Loaded state from \"%s\"", path); |
195 | rb->splash(HZ * 1, buf); | ||
196 | } | 195 | } |
197 | else | 196 | else |
198 | { | 197 | { |