diff --git a/src/adb.c b/src/adb.c index c63061a..ec51ea5 100644 --- a/src/adb.c +++ b/src/adb.c @@ -1578,7 +1578,7 @@ adb_read_c000() /* got one */ if((g_kbd_read_no_update++ > 5) && (g_kbd_chars_buffered > 1)) { /* read 5 times, keys pending, let's move it along */ - printf("Read %02x %d times, tossing\n", g_kbd_buf[0], + gloghead(); printf("Read %02x %d times, tossing\n", g_kbd_buf[0], g_kbd_read_no_update); adb_access_c010(); } diff --git a/src/config.c b/src/config.c index 972a337..33df473 100644 --- a/src/config.c +++ b/src/config.c @@ -24,6 +24,7 @@ #include "defc.h" #include #include "config.h" +#include "glog.h" #include "imagewriter.h" #if defined(__OS2__) #include "arch\os2\src\dirport.h" @@ -136,8 +137,7 @@ int g_config_gsplus_auto_update = 1; int g_config_gsplus_update_needed = 0; const char *g_config_gsplus_name_list[] = { - "config.txt", "config.gsport", "gsport_conf", ".config.gsport", - ".gsplus", "config.gsplus",0 + "config.txt", "config.gsp",0 }; int g_highest_smartport_unit = -1; @@ -1258,7 +1258,7 @@ config_write_config_gsplus_file() int slot, drive; int i; - printf("Writing configuration file to %s\n", g_config_gsplus_name); + gloghead(); printf("Writing configuration file to %s\n", g_config_gsplus_name); fconf = fopen(g_config_gsplus_name, "w+"); if(fconf == 0) { @@ -1524,22 +1524,22 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size, if(buf_2img[0] == '2' && buf_2img[1] == 'I' && buf_2img[2] == 'M' && buf_2img[3] == 'G') { /* It's a 2IMG disk */ - printf("Image named %s is in 2IMG format\n", dsk->name_ptr); + gloghead(); printf("Image named %s is in 2IMG format\n", dsk->name_ptr); image_identified = 1; if(buf_2img[12] == 0) { - printf("2IMG is in DOS 3.3 sector order\n"); + glog("2IMG is in DOS 3.3 sector order"); dsk->image_type = DSK_TYPE_DOS33; } if(buf_2img[19] & 0x80) { /* disk is locked */ - printf("2IMG is write protected\n"); + glog("2IMG is write protected"); dsk->write_prot = 1; dsk->write_through_to_unix = 0; } if((buf_2img[17] & 1) && (dsk->image_type == DSK_TYPE_DOS33)) { dsk->vol_num = buf_2img[16]; - printf("Setting DOS 3.3 vol num to %d\n", dsk->vol_num); + gloghead(); printf("Setting DOS 3.3 vol num to %d\n", dsk->vol_num); } // Some 2IMG archives have the size byte reversed size = (buf_2img[31] << 24) + (buf_2img[30] << 16) + @@ -1563,8 +1563,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size, (buf_2img[0x42] << 8) + buf_2img[0x43]; if((size >= (exp_size + 0x54)) && (tmp == exp_size)) { /* It's diskcopy since data size field matches */ - printf("Image named %s is in Mac diskcopy format\n", - dsk->name_ptr); + gloghead(); printf("Image named %s is in Mac diskcopy format\n", dsk->name_ptr); image_identified = 1; dsk->image_start += 0x54; dsk->image_size = exp_size; @@ -1637,7 +1636,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size, nibs = len; } if(size != 35*len) { - fatal_printf("Disk 5.25 error: size is %d, not 140K. " + gloghead(); fatal_printf("Disk 5.25 error: size is %d, not 140K. " "Will try to mount anyway\n", size, 35*len); } for(i = 0; i < 35; i++) { @@ -1726,7 +1725,7 @@ eject_disk(Disk *dsk) iwm_flush_disk_to_unix(dsk); - printf("Ejecting disk: %s\n", dsk->name_ptr); + gloghead(); printf("Ejecting disk: %s\n", dsk->name_ptr); /* Free all memory, close file */ @@ -3176,7 +3175,7 @@ cfg_file_handle_key(int key) } break; case 0x0d: /* return */ - printf("handling return press\n"); + glog("Selected disk image file"); cfg_file_selected(); break; case 0x09: /* tab */ diff --git a/src/sim65816.c b/src/sim65816.c index 7377678..bebd51d 100644 --- a/src/sim65816.c +++ b/src/sim65816.c @@ -746,7 +746,7 @@ void my_exit(int ret) end_screen(); imagewriter_close(); printer_close(); - printf("exiting (ret=%d)\n",ret); + gloghead(); printf("exiting (ret=%d)\n",ret); fatalExit(ret); } @@ -928,7 +928,7 @@ void banner() { printf("\x1b[31m | | | ||_____ | |_|\x1b[0m \n"); printf("\x1b[35m | |__| | _____| | \x1b[0m \n"); printf("\x1b[34m |_______||_______| \x1b[0m \n\n"); - printf("\x1b[37m GSplus v0.12s \x1b[0m \n\n"); + printf("\x1b[37m GSplus v%s \x1b[0m \n\n", g_gsplus_version_str); } int @@ -1348,12 +1348,15 @@ setup_gsplus_file(char *outname, int maxlen, int ok_if_missing, } /* couldn't find it, print out all the attempts */ + /* path_ptr = save_path_ptr; gloghead(); fatal_printf("Could not find required file \"%s\" in any of these " "directories:\n", *name_ptr); while(*path_ptr) { fatal_printf(" %s\n", *path_ptr++); } + */ + gloghead(); fatal_printf("Could not find required file \"%s\"", *name_ptr); if(can_create_file) { // If we didn't find a file, pick a place to put it. diff --git a/src/smartport.c b/src/smartport.c index 5d42f4e..f675ab8 100644 --- a/src/smartport.c +++ b/src/smartport.c @@ -553,7 +553,7 @@ do_read_c7(int unit_num, word32 buf, int blk) image_start = iwm.smartport[unit_num].image_start; image_size = iwm.smartport[unit_num].image_size; if(!file) { - glog("Trying mapped file to $C7xx, but it's null!"); + glog("Trying file mapped to $C7xx, but it's null!"); #if 0 if(blk != 2 && blk != 0) { /* don't print error if only reading directory */ @@ -787,8 +787,8 @@ do_c700(word32 ret) if(ret != 0) { glog("Failure reading boot disk in s7d1!"); - glog("- Press to enter config menu, or edit your config file"); - glog("- if you intended to use slot slot 7."); + glog(" Press to enter config menu, or edit your config"); + glog(" file if you intended to use slot slot 7."); engine.kpc = 0xff59; /* Jump to monitor, fix $36-$39 */ } } diff --git a/src/sound_driver.c b/src/sound_driver.c index 1ce8e29..bfed000 100644 --- a/src/sound_driver.c +++ b/src/sound_driver.c @@ -199,7 +199,7 @@ child_sound_playit(word32 tmp) int size; size = tmp & 0xffffff; - printf("SIze: %d ",size); + if((tmp >> 24) == 0xa2) { /* play sound here */ diff --git a/src/video.c b/src/video.c index a266113..7869403 100644 --- a/src/video.c +++ b/src/video.c @@ -24,6 +24,7 @@ #include #include "defc.h" +#include "glog.h" extern int Verbose; @@ -3012,7 +3013,7 @@ void video_release_kimages(); void end_screen() { - printf("In end_screen\n"); + glog("Shutting down display"); // OG Free up allocated images video_release_kimages();