diff --git a/doc/web/src/site/apt/developing.apt b/doc/web/src/site/apt/developing.apt index 4e44699..34a0b3f 100644 --- a/doc/web/src/site/apt/developing.apt +++ b/doc/web/src/site/apt/developing.apt @@ -129,6 +129,6 @@ by runnning the command: <<>> If you are porting to an X-windows and Unix-based machine, it should be easy. Start with <<>> if you are a little-endian machine, or -<<>> if you are big endian. Don't define <<<-DKEGS_LITTLE_ENDIAN>>> +<<>> if you are big endian. Don't define <<<-DGSPORT_LITTLE_ENDIAN>>> unless your processor is little-endian (x86, Alpha). Mac, Sun, MIPS, HP, Motorola, and IBM are big-endian. \ No newline at end of file diff --git a/src/Info.plist b/src/Info.plist index a6848d1..e5a3602 100644 --- a/src/Info.plist +++ b/src/Info.plist @@ -26,7 +26,7 @@ CFBundleTypeExtensions - kegs + gsport CFBundleTypeIconFile 525.icns @@ -34,7 +34,7 @@ GSport Configuration File CFBundleTypeOSTypes - kegs + gsport CFBundleTypeRole None diff --git a/src/Makefile b/src/Makefile index 2a48b4a..56eddee 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,9 @@ PERL = perl all: $(TARGET) clean: - rm $(OBJECTS) + - rm $(OBJECTS) + - rm 8inst_c.h + - rm 16inst_c.h specials: 8inst_s 16inst_s 8size 16size 8inst_c 16inst_c size_c size_s @@ -48,14 +50,8 @@ gsportx: $(OBJECTS) compile_time.o mv gsportx .. cp -f ../config.template ../config.txt -# Cygwin for X builds: -gsport.exe: $(OBJECTS) compile_time.o - $(CC) $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(XLIBS) $(EXTRA_LIBS) -lXext -lX11 -lm -lshell32 - mv gsport.exe .. - cp -f ../config.template ../config.txt - # Mingw32 (native windows) builds: -gsportwin.exe: $(OBJECTS) compile_time.o +gsport.exe: $(OBJECTS) compile_time.o $(CC) $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32 mv $(NAME)$(SUFFIX) .. cp -f ../config.template ../config.txt @@ -104,8 +100,8 @@ partls: partls.c to_pro: prodos.h prodos_protos.h to_pro.c cc $(CCOPTS) $(XOPTS) $(OPTS) -o to_pro to_pro.c -kegs32.o: win32.rc winresource.h - windres win32.rc -o kegs32.o +gsport32.o: win32.rc winresource.h + windres win32.rc -o gsport32.o compile_time.o: $(OBJECTS) @@ -131,12 +127,12 @@ sim65816.o: sim65816.c defc.h defcomm.h iwm.h protos.h smartport.o: smartport.c defc.h defcomm.h iwm.h protos.h sound.o: sound.c defc.h defcomm.h iwm.h protos.h sound.h sound_driver.o: sound_driver.c defc.h defcomm.h iwm.h protos.h sound.h -video.o: video.c defc.h defcomm.h iwm.h protos.h superhires.h kegsfont.h +video.o: video.c defc.h defcomm.h iwm.h protos.h superhires.h gsportfont.h tfe.o: tfe/tfe.c tfe/tfe.h tfe/tfe_protos.h tfearch.o:arch/win32/tfearch.c tfe/tfearch.h tfe/tfe_protos.h tfesupp.o: tfe/tfesupp.c tfe/tfesupp.h tfe/tfe_protos.h uilib.o: tfe/uilib.c tfe/uilib.h tfe/tfe_protos.h macdriver.o: macdriver.c defc.h defcomm.h iwm.h protos.h protos_macdriver.h macsnd_driver.o: macsnd_driver.c defc.h defcomm.h iwm.h protos.h sound.h -windriver.o: windriver.c defc.h defcomm.h iwm.h protos.h protos_windriver.h winresource.h kegs32.o +windriver.o: windriver.c defc.h defcomm.h iwm.h protos.h protos_windriver.h winresource.h gsport32.o win32snd_driver.o: win32snd_driver.c defc.h defcomm.h iwm.h protos.h sound.h diff --git a/src/arch/os2/Makefile b/src/arch/os2/Makefile index f51c794..faaa2fd 100644 --- a/src/arch/os2/Makefile +++ b/src/arch/os2/Makefile @@ -47,6 +47,6 @@ sim65816.obj: ../../sim65816.c ../../scc.c ../../defc.h ../../defcomm.h ../../iw smartport.obj: ../../smartport.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h sound.obj: ../../sound.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h sound_driver.obj: ../../sound_driver.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h ../../sound.h -video.obj: ../../video.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h ../../superhires.h ../../kegsfont.h +video.obj: ../../video.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h ../../superhires.h ../../gsportfont.h os2driver.obj: ../../os2driver.c ../../scc.c ../../defc.h ../../defcomm.h ../../iwm.h ../../protos.h  \ No newline at end of file diff --git a/src/clock.c b/src/clock.c index 4ef383a..ba6f4d7 100644 --- a/src/clock.c +++ b/src/clock.c @@ -33,7 +33,7 @@ const char rcsid_clock_c[] = "@(#)$KmKId: clock.c,v 1.31 2004-10-19 17:32:07-04 extern int Verbose; extern int g_vbl_count; extern int g_rom_version; -extern int g_config_kegs_update_needed; +extern int g_config_gsport_update_needed; #define CLK_IDLE 1 #define CLK_TIME 2 @@ -327,7 +327,7 @@ do_clock_data() clk_printf("Writing BRAM loc %02x with %02x\n", g_clk_reg1, g_c033_data); g_bram_ptr[g_clk_reg1] = g_c033_data; - g_config_kegs_update_needed = 1; + g_config_gsport_update_needed = 1; } } g_clk_mode = CLK_IDLE; diff --git a/src/config.c b/src/config.c index cc8c2ef..77456b1 100644 --- a/src/config.c +++ b/src/config.c @@ -92,16 +92,16 @@ extern int g_a2_new_all_stat[]; extern int g_new_a2_stat_cur_line; extern int g_key_down; -extern const char g_kegs_version_str[]; +extern const char g_gsport_version_str[]; int g_config_control_panel = 0; -char g_config_kegs_name[1024]; +char g_config_gsport_name[1024]; char g_cfg_cwd_str[CFG_PATH_MAX] = { 0 }; -int g_config_kegs_auto_update = 1; -int g_config_kegs_update_needed = 0; +int g_config_gsport_auto_update = 1; +int g_config_gsport_update_needed = 0; -const char *g_config_kegs_name_list[] = { - "config.txt", "config.kegs", "kegs_conf", ".config.kegs", 0 +const char *g_config_gsport_name_list[] = { + "config.txt", "config.gsport", "gsport_conf", ".config.gsport", 0 }; int g_highest_smartport_unit = -1; @@ -111,7 +111,7 @@ int g_user_page2_shadow = 1; byte g_save_text_screen_bytes[0x800]; int g_save_cur_a2_stat = 0; char g_cfg_printf_buf[CFG_PRINTF_BUFSIZE]; -char g_config_kegs_buf[CONF_BUF_LEN]; +char g_config_gsport_buf[CONF_BUF_LEN]; word32 g_cfg_vbl_count = 0; @@ -271,7 +271,7 @@ Cfg_menu g_cfg_main_menu[] = { { "Virtual Printer Configuration", g_cfg_printer_menu, 0, 0, CFGTYPE_MENU }, { "Force X-windows display depth", KNMP(g_force_depth), CFGTYPE_INT }, { "Auto-update configuration file,0,Manual,1,Immediately", - KNMP(g_config_kegs_auto_update), CFGTYPE_INT }, + KNMP(g_config_gsport_auto_update), CFGTYPE_INT }, { "Speed,0,Unlimited,1,1.0MHz,2,2.8MHz,3,8.0MHz (Zip)", KNMP(g_limit_speed), CFGTYPE_INT }, { "Expansion Mem Size,0,0MB,0x100000,1MB,0x200000,2MB,0x300000,3MB," @@ -289,7 +289,7 @@ Cfg_menu g_cfg_main_menu[] = { KNMP(g_user_page2_shadow), CFGTYPE_INT }, { "Dump text screen to file", (void *)cfg_text_screen_dump, 0, 0, CFGTYPE_FUNC}, { "", 0, 0, 0, 0 }, -{ "Save changes to configuration file", (void *)config_write_config_kegs_file, 0, 0, +{ "Save changes to configuration file", (void *)config_write_config_gsport_file, 0, 0, CFGTYPE_FUNC }, { "", 0, 0, 0, 0 }, { "Exit Config (or press F4)", (void *)cfg_exit, 0, 0, CFGTYPE_FUNC }, @@ -316,23 +316,23 @@ Cfg_listhdr g_cfg_partitionlist = { 0 }; int g_cfg_file_pathfield = 0; -const char *g_kegs_rom_names[] = { "ROM", "ROM", "ROM.01", "ROM.03", 0 }; +const char *g_gsport_rom_names[] = { "ROM", "ROM", "ROM.01", "ROM.03", 0 }; /* First entry is special--it will be overwritten by g_cfg_rom_path */ -const char *g_kegs_c1rom_names[] = { "parallel.rom" }; -const char *g_kegs_c2rom_names[] = { 0 }; -const char *g_kegs_c3rom_names[] = { 0 }; -const char *g_kegs_c4rom_names[] = { 0 }; -const char *g_kegs_c5rom_names[] = { 0 }; -const char *g_kegs_c6rom_names[] = { "c600.rom", "controller.rom", "disk.rom", +const char *g_gsport_c1rom_names[] = { "parallel.rom" }; +const char *g_gsport_c2rom_names[] = { 0 }; +const char *g_gsport_c3rom_names[] = { 0 }; +const char *g_gsport_c4rom_names[] = { 0 }; +const char *g_gsport_c5rom_names[] = { 0 }; +const char *g_gsport_c6rom_names[] = { "c600.rom", "controller.rom", "disk.rom", "DISK.ROM", "diskII.prom", 0 }; -const char *g_kegs_c7rom_names[] = { 0 }; +const char *g_gsport_c7rom_names[] = { 0 }; -const char **g_kegs_rom_card_list[8] = { - 0, g_kegs_c1rom_names, - g_kegs_c2rom_names, g_kegs_c3rom_names, - g_kegs_c4rom_names, g_kegs_c5rom_names, - g_kegs_c6rom_names, g_kegs_c7rom_names }; +const char **g_gsport_rom_card_list[8] = { + 0, g_gsport_c1rom_names, + g_gsport_c2rom_names, g_gsport_c3rom_names, + g_gsport_c4rom_names, g_gsport_c5rom_names, + g_gsport_c6rom_names, g_gsport_c7rom_names }; byte g_rom_c600_rom01_diffs[256] = { 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0xe2, 0x00, @@ -415,7 +415,7 @@ config_init_menus(Cfg_menu *menuptr) // We need to malloc this string since all // string values must be dynamically alloced defptr->strval = str; // this can have a copy - *str_ptr = kegs_malloc_str(str); + *str_ptr = gsport_malloc_str(str); menuptr->defptr = &(defptr->strval); break; case CFGTYPE_FILE: @@ -424,7 +424,7 @@ config_init_menus(Cfg_menu *menuptr) // We need to malloc this string since all // string values must be dynamically alloced defptr->strval = str; // this can have a copy - *str_ptr = kegs_malloc_str(str); + *str_ptr = gsport_malloc_str(str); menuptr->defptr = &(defptr->strval); break; default: @@ -449,12 +449,12 @@ config_init() config_init_menus(g_cfg_main_menu); // Find the configuration file - g_config_kegs_name[0] = 0; + g_config_gsport_name[0] = 0; can_create = 1; - setup_kegs_file(&g_config_kegs_name[0], sizeof(g_config_kegs_name), 0, - can_create, &g_config_kegs_name_list[0]); + setup_gsport_file(&g_config_gsport_name[0], sizeof(g_config_gsport_name), 0, + can_create, &g_config_gsport_name_list[0]); - config_parse_config_kegs_file(); + config_parse_config_gsport_file(); } void @@ -486,7 +486,7 @@ cfg_text_screen_dump() int pos; int i, j; - filename = "kegs.screen.dump"; + filename = "gsport.screen.dump"; printf("Writing text screen to the file %s\n", filename); ofile = fopen(filename, "w"); if(ofile == 0) { @@ -561,8 +561,8 @@ void config_vbl_update(int doit_3_persec) { if(doit_3_persec) { - if(g_config_kegs_auto_update && g_config_kegs_update_needed) { - config_write_config_kegs_file(); + if(g_config_gsport_auto_update && g_config_gsport_update_needed) { + config_write_config_gsport_file(); } } return; @@ -648,14 +648,14 @@ config_parse_option(char *buf, int pos, int len, int line) if(strptr && *strptr) { free(*strptr); } - *strptr = kegs_malloc_str(&buf[pos]); + *strptr = gsport_malloc_str(&buf[pos]); break; case CFGTYPE_FILE: strptr = (char **)menuptr->ptr; if(strptr && *strptr) { free(*strptr); } - *strptr = kegs_malloc_str(&buf[pos]); + *strptr = gsport_malloc_str(&buf[pos]); break; default: printf("Config file variable %s is unknown type: %d\n", @@ -713,11 +713,11 @@ config_load_roms() g_rom_version = -1; - /* set first entry of g_kegs_rom_names[] to g_cfg_rom_path so that */ + /* set first entry of g_gsport_rom_names[] to g_cfg_rom_path so that */ /* it becomes the first place searched. */ - g_kegs_rom_names[0] = g_cfg_rom_path; - setup_kegs_file(&g_cfg_tmp_path[0], CFG_PATH_MAX, -1, 0, - &g_kegs_rom_names[0]); + g_gsport_rom_names[0] = g_cfg_rom_path; + setup_gsport_file(&g_cfg_tmp_path[0], CFG_PATH_MAX, -1, 0, + &g_gsport_rom_names[0]); if(g_cfg_tmp_path[0] == 0) { // Just get out, let config interface select ROM @@ -783,7 +783,7 @@ config_load_roms() } for(i = 1; i < 8; i++) { - names_ptr = g_kegs_rom_card_list[i]; + names_ptr = g_gsport_rom_card_list[i]; if(names_ptr == 0) { continue; } @@ -791,7 +791,7 @@ config_load_roms() continue; } - setup_kegs_file(&g_cfg_tmp_path[0], CFG_PATH_MAX, 1, 0, + setup_gsport_file(&g_cfg_tmp_path[0], CFG_PATH_MAX, 1, 0, names_ptr); if(g_cfg_tmp_path[0] != 0) { @@ -903,7 +903,7 @@ config_load_roms() } void -config_parse_config_kegs_file() +config_parse_config_gsport_file() { FILE *fconf; char *buf; @@ -927,7 +927,7 @@ config_parse_config_kegs_file() g_highest_smartport_unit = -1; - cfg_get_base_path(&g_cfg_cwd_str[0], g_config_kegs_name, 0); + cfg_get_base_path(&g_cfg_cwd_str[0], g_config_gsport_name, 0); if(g_cfg_cwd_str[0] != 0) { ret = chdir(&g_cfg_cwd_str[0]); if(ret != 0) { @@ -938,16 +938,16 @@ config_parse_config_kegs_file() /* In any case, copy the directory path to g_cfg_cwd_str */ (void)getcwd(&g_cfg_cwd_str[0], CFG_PATH_MAX); - fconf = fopen(g_config_kegs_name, "r"); + fconf = fopen(g_config_gsport_name, "r"); if(fconf == 0) { fatal_printf("cannot open configuration file at %s! Stopping!\n", - g_config_kegs_name); + g_config_gsport_name); my_exit(3); } line = 0; while(1) { - buf = &g_config_kegs_buf[0]; + buf = &g_config_gsport_buf[0]; ptr = fgets(buf, CONF_BUF_LEN, fconf); if(ptr == 0) { iwm_printf("Done reading disk_conf\n"); @@ -1096,7 +1096,7 @@ cfg_get_dsk_from_slot_drive(int slot, int drive) } void -config_generate_config_kegs_name(char *outstr, int maxlen, Disk *dsk, +config_generate_config_gsport_name(char *outstr, int maxlen, Disk *dsk, int with_extras) { char *str; @@ -1124,7 +1124,7 @@ config_generate_config_kegs_name(char *outstr, int maxlen, Disk *dsk, } void -config_write_config_kegs_file() +config_write_config_gsport_file() { FILE *fconf; Disk *dsk; @@ -1136,16 +1136,16 @@ config_write_config_kegs_file() int slot, drive; int i; - printf("Writing configuration file to %s\n", g_config_kegs_name); + printf("Writing configuration file to %s\n", g_config_gsport_name); - fconf = fopen(g_config_kegs_name, "w+"); + fconf = fopen(g_config_gsport_name, "w+"); if(fconf == 0) { halt_printf("cannot open %s! Stopping!\n"); return; } fprintf(fconf, "# GSport configuration file version %s\n", - g_kegs_version_str); + g_gsport_version_str); for(i = 0; i < MAX_C7_DISKS + 4; i++) { slot = 7; @@ -1168,7 +1168,7 @@ config_write_config_kegs_file() fprintf(fconf, "\n"); continue; } - config_generate_config_kegs_name(&g_cfg_tmp_path[0], + config_generate_config_gsport_name(&g_cfg_tmp_path[0], CFG_PATH_MAX, dsk, 1); fprintf(fconf, "%s\n", &g_cfg_tmp_path[0]); } @@ -1213,7 +1213,7 @@ config_write_config_kegs_file() fclose(fconf); - g_config_kegs_update_needed = 0; + g_config_gsport_update_needed = 0; } void @@ -1241,7 +1241,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size, int tmp; int i; - g_config_kegs_update_needed = 1; + g_config_gsport_update_needed = 1; if((slot < 5) || (slot > 7)) { fatal_printf("Invalid slot for inserting disk: %d\n", slot); @@ -1580,7 +1580,7 @@ eject_disk(Disk *dsk) return; } - g_config_kegs_update_needed = 1; + g_config_gsport_update_needed = 1; motor_on = iwm.motor_on; if(g_c031_disk35 & 0x40) { @@ -2010,7 +2010,7 @@ cfg_get_disk_name(char *outstr, int maxlen, int type_ext, int with_extras) return; } - config_generate_config_kegs_name(outstr, maxlen, dsk, with_extras); + config_generate_config_gsport_name(outstr, maxlen, dsk, with_extras); } void @@ -2236,7 +2236,7 @@ cfg_parse_menu(Cfg_menu *menuptr, int menu_pos, int highlight_pos, int change) str_ptr = (char **)menuptr->ptr; *str_ptr = curstr; } - g_config_kegs_update_needed = 1; + g_config_gsport_update_needed = 1; } #if 0 @@ -2829,7 +2829,7 @@ cfg_file_draw() cfg_htab_vtab(2, 1); cfg_printf("Configuration file path: %-56s", - cfg_shorten_filename(&g_config_kegs_name[0], 56)); + cfg_shorten_filename(&g_config_gsport_name[0], 56)); cfg_htab_vtab(2, 2); cfg_printf("Current directory: %-50s", @@ -2958,7 +2958,7 @@ cfg_file_update_ptr(char *str) printf("Updated ROM file\n"); load_roms_init_memory(); } - g_config_kegs_update_needed = 1; + g_config_gsport_update_needed = 1; } void diff --git a/src/defc.h b/src/defc.h index b9b0f44..0dbb871 100644 --- a/src/defc.h +++ b/src/defc.h @@ -52,7 +52,7 @@ void U_STACK_TRACE(); #define DCYCS_IN_16MS ((double)((int)DCYCS_IN_16MS_RAW)) #define DRECIP_DCYCS_IN_16MS (1.0 / (DCYCS_IN_16MS)) -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN # define BIGEND(a) ((((a) >> 24) & 0xff) + \ (((a) >> 8) & 0xff00) + \ (((a) << 8) & 0xff0000) + \ diff --git a/src/gsport32.aps b/src/gsport32.aps new file mode 100644 index 0000000..a4529cd Binary files /dev/null and b/src/gsport32.aps differ diff --git a/src/kegs32.ico b/src/gsport32.ico similarity index 100% rename from src/kegs32.ico rename to src/gsport32.ico diff --git a/src/kegs32.rc b/src/gsport32.rc similarity index 90% rename from src/kegs32.rc rename to src/gsport32.rc index 3920f48..efad538 100644 --- a/src/kegs32.rc +++ b/src/gsport32.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menu // -IDC_KEGS32 MENU +IDC_GSPORT32 MENU BEGIN POPUP "&Emulator" BEGIN @@ -53,7 +53,7 @@ END // Bitmap // -IDC_KEGS32 BITMAP "wintoolbar.bmp" +IDC_GSPORT32 BITMAP "wintoolbar.bmp" ///////////////////////////////////////////////////////////////////////////// // @@ -74,8 +74,8 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDC_KEGS32 ICON "kegs32.ico" -KEGS32_ICON ICON "kegs32.ico" +IDC_GSPORT32 ICON "gsport32.ico" +GSPORT32_ICON ICON "gsport32.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -88,8 +88,8 @@ CAPTION "About" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,78,61,50,14 - LTEXT "KEGS32: GS Emulator.\nBased on KEGS by Kent Dickey\nWindows Port by Chea Chee Keong\n\nThis software is free for non-commercial use.",IDC_STATIC,38,7,162,45,NOT WS_GROUP - ICON "KEGS32_ICON",IDC_STATIC,7,7,20,20 + LTEXT "GSport: GS Emulator.\nBased on KEGS by Kent Dickey\nWindows Port by Chea Chee Keong\n\nThis software is free for non-commercial use.",IDC_STATIC,38,7,162,45,NOT WS_GROUP + ICON "GSPORT32_ICON",IDC_STATIC,7,7,20,20 END IDD_DLG_DISKCONF DIALOGEX 0, 0, 268, 182 @@ -135,20 +135,20 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,183,107,50,15 GROUPBOX "Speed Control",IDC_STATIC,7,7,226,96,WS_GROUP LTEXT "Adjust the speed of your emulator by selecting the appropriate speed control",IDC_STATIC,46,19,181,19,NOT WS_GROUP - ICON IDC_KEGS32,IDC_STATIC,14,19,21,20 + ICON IDC_GSPORT32,IDC_STATIC,14,19,21,20 END -IDD_KEGS32_KEY DIALOGEX 0, 0, 186, 172 +IDD_GSPORT32_KEY DIALOGEX 0, 0, 186, 172 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Help About Key Commands" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,65,151,50,14 - LTEXT "KEGS32 Key Commands",IDC_STATIC,7,7,82,10 + LTEXT "GSport Key Commands",IDC_STATIC,7,7,82,10 LTEXT "Alt/F1\t\tOpen-Apple\nF2\t\tClose-Apple\nF7\t\tToggle Fast Disk Emulation\nF8\t\tToggle Mouse Pointer\n\t\tDisplay\n",IDC_STATIC,21,25,151,42 LTEXT "F11\t\tToggle Fullscreen Display\nF12\t\tReset\nCtrl-Alt-Break\tReboot Emulator\nCtrl-Alt-Esc\tControl-Panel\nCtrl-Break\tReset Emulator",IDC_STATIC,21,66,141,50 CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | WS_DISABLED | WS_BORDER,7,17,172,1 - LTEXT "For more information, please consult the readme.kegs file",IDC_STATIC,21,124,144,19 + LTEXT "For more information, please consult the readme.gsport file",IDC_STATIC,21,124,144,19 END diff --git a/src/kegsfont.h b/src/gsportfont.h similarity index 100% rename from src/kegsfont.h rename to src/gsportfont.h diff --git a/src/iwm.c b/src/iwm.c index 0bce1a7..ae7ab3c 100644 --- a/src/iwm.c +++ b/src/iwm.c @@ -1828,7 +1828,7 @@ iwm_nibblize_track_525(Disk *dsk, Trk *trk, byte *track_buf, int qtr_track) word_ptr = (word32 *)&(trk->nib_area[0]); -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val = 0xff08ff08; #else val = 0x08ff08ff; @@ -1933,7 +1933,7 @@ iwm_nibblize_track_35(Disk *dsk, Trk *trk, byte *track_buf, int qtr_track) int i; word_ptr = (word32 *)&(trk->nib_area[0]); -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val = 0xff08ff08; #else val = 0x08ff08ff; diff --git a/src/kegs32.aps b/src/kegs32.aps deleted file mode 100644 index 7e93301..0000000 Binary files a/src/kegs32.aps and /dev/null differ diff --git a/src/macdriver.c b/src/macdriver.c index 0e90b21..27126c1 100644 --- a/src/macdriver.c +++ b/src/macdriver.c @@ -121,7 +121,7 @@ extern int g_screen_redraw_skip_amt; extern word32 g_a2_screen_buffer_changed; extern char *g_status_ptrs[MAX_STATUS_LINES]; -extern const char g_kegs_version_str[]; +extern const char g_gsport_version_str[]; #if 0 extern int g_debug_file_fd; @@ -141,7 +141,7 @@ printf(const char *fmt, ...) fprintf(stdout, "g_debug_file_fd = %d, %d\n", g_debug_file_fd, errno); } - ret = kegs_vprintf(fmt, ap); + ret = gsport_vprintf(fmt, ap); va_end(ap); @@ -166,19 +166,19 @@ show_simple_alert(char *str1, char *str2, char *str3, int num) { char buf[256]; - g_fatal_log_strs[0] = kegs_malloc_str(str1); - g_fatal_log_strs[1] = kegs_malloc_str(str2); - g_fatal_log_strs[2] = kegs_malloc_str(str3); + g_fatal_log_strs[0] = gsport_malloc_str(str1); + g_fatal_log_strs[1] = gsport_malloc_str(str2); + g_fatal_log_strs[2] = gsport_malloc_str(str3); g_fatal_log = 3; if(num != 0) { snprintf(buf, 250, ": %d", num); - g_fatal_log_strs[g_fatal_log++] = kegs_malloc_str(buf); + g_fatal_log_strs[g_fatal_log++] = gsport_malloc_str(buf); } x_show_alert(0, 0); } void -x_dialog_create_kegs_conf(const char *str) +x_dialog_create_gsport_conf(const char *str) { char *path; char tmp_buf[512]; @@ -278,7 +278,7 @@ my_cmd_handler( EventHandlerCallRef handlerRef, EventRef event, void *userdata) osresult = noErr; break; case 'abou': - show_simple_alert("GSport v", (char *)g_kegs_version_str, + show_simple_alert("GSport v", (char *)g_gsport_version_str, ", Copyright 2010 GSport Contributors\n" "Latest version at http://gsport.sourceforge.net/\n", 0); osresult = noErr; @@ -390,7 +390,7 @@ dummy_event_handler(EventHandlerCallRef call_ref, EventRef in_event, err = InstallApplicationEventHandler(g_quit_handler_UPP, 1, &event_spec, NULL, &installed_handler); - kegsmain(g_mac_argc, g_mac_argv); + gsportmain(g_mac_argc, g_mac_argv); return noErr; } diff --git a/src/moremem.c b/src/moremem.c index 6436a1a..a5a5052 100644 --- a/src/moremem.c +++ b/src/moremem.c @@ -27,7 +27,7 @@ const char rcsid_moremem_c[] = "@(#)$KmKId: moremem.c,v 1.251 2004-11-19 01:55:5 #include "tfe/protos_tfe.h" #endif -extern char g_kegs_version_str[]; +extern char g_gsport_version_str[]; extern byte *g_memory_ptr; extern byte *g_dummy_memory1_ptr; @@ -1273,8 +1273,8 @@ io_read(word32 loc, double *cyc_ptr) return 'G'; case 2: g_em_emubyte_cnt = 0; - tmp = g_kegs_version_str[0] - '0'; - i = g_kegs_version_str[2] - '0'; + tmp = g_gsport_version_str[0] - '0'; + i = g_gsport_version_str[2] - '0'; return ((tmp & 0xf) << 4) + (i & 0xf); default: g_em_emubyte_cnt = 0; @@ -2399,7 +2399,7 @@ in_vblank(double dcycs) /* horizontal video counter goes from 0x00,0x40 - 0x7f, then 0x80,0xc0-0xff */ /* over 2*65 cycles. The last visible screen pos is 0x7f and 0xff */ -/* This matches KEGS starting line 0 at the border for line -1 */ +/* This matches GSport starting line 0 at the border for line -1 */ int read_vid_counters(int loc, double dcycs) { diff --git a/src/os2driver.c b/src/os2driver.c index 239ec9c..701807c 100644 --- a/src/os2driver.c +++ b/src/os2driver.c @@ -63,7 +63,7 @@ win_nonblock_read_stdin(int fd, char *bufptr, int len) } void -x_dialog_create_kegs_conf(const char *str) +x_dialog_create_gsport_conf(const char *str) { } @@ -80,8 +80,8 @@ main(int argc, char **argv) { printf("In OS/2 main...\n"); - // Call kegsmain - return kegsmain(argc, argv); + // Call gsportmain + return gsportmain(argc, argv); } diff --git a/src/protos.h b/src/protos.h index 9162281..fec5ba5 100644 --- a/src/protos.h +++ b/src/protos.h @@ -22,7 +22,7 @@ /* xdriver.c and macdriver.c and windriver.c */ int x_show_alert(int is_fatal, const char *str); int win_nonblock_read_stdin(int fd, char *bufptr, int len); -void x_dialog_create_kegs_conf(const char *str); +void x_dialog_create_gsport_conf(const char *str); void update_color_array(int col_num, int a2_color); void set_border_color(int val); void x_update_physical_colormap(void); @@ -162,10 +162,10 @@ void config_vbl_update(int doit_3_persec); void config_parse_option(char *buf, int pos, int len, int line); void config_parse_bram(char *buf, int pos, int len); void config_load_roms(void); -void config_parse_config_kegs_file(void); +void config_parse_config_gsport_file(void); Disk *cfg_get_dsk_from_slot_drive(int slot, int drive); -void config_generate_config_kegs_name(char *outstr, int maxlen, Disk *dsk, int with_extras); -void config_write_config_kegs_file(void); +void config_generate_config_gsport_name(char *outstr, int maxlen, Disk *dsk, int with_extras); +void config_write_config_gsport_file(void); void insert_disk(int slot, int drive, const char *name, int ejected, int force_size, const char *partition_name, int part_num); void eject_named_disk(Disk *dsk, const char *name, const char *partition_name); void eject_disk_by_num(int slot, int drive); @@ -392,10 +392,10 @@ void do_reset(void); void check_engine_asm_defines(void); byte *memalloc_align(int size, int skip_amt, void **alloc_ptr); void memory_ptr_init(void); -int kegsmain(int argc, char **argv); +int gsportmain(int argc, char **argv); void load_roms_init_memory(void); -void kegs_expand_path(char *out_ptr, const char *in_ptr, int maxlen); -void setup_kegs_file(char *outname, int maxlen, int ok_if_missing, int can_create_file, const char **name_ptr); +void gsport_expand_path(char *out_ptr, const char *in_ptr, int maxlen); +void setup_gsport_file(char *outname, int maxlen, int ok_if_missing, int can_create_file, const char **name_ptr); void initialize_events(void); void check_for_one_event_type(int type); void add_event_entry(double dcycs, int type); @@ -429,10 +429,10 @@ void do_wai(void); void do_stp(void); void size_fail(int val, word32 v1, word32 v2); int fatal_printf(const char *fmt, ...); -int kegs_vprintf(const char *fmt, va_list ap); +int gsport_vprintf(const char *fmt, va_list ap); void must_write(int fd, char *bufptr, int len); void clear_fatal_logs(void); -char *kegs_malloc_str(char *in_str); +char *gsport_malloc_str(char *in_str); /* smartport.c */ diff --git a/src/protos_macdriver.h b/src/protos_macdriver.h index 2c5daeb..05c16d9 100644 --- a/src/protos_macdriver.h +++ b/src/protos_macdriver.h @@ -26,7 +26,7 @@ const char rcsid_protos_mac_h[] = "@(#)$KmKId: protos_macdriver.h,v 1.11 2004-11 /* macdriver.c */ pascal OSStatus quit_event_handler(EventHandlerCallRef call_ref, EventRef event, void *ignore); void show_simple_alert(char *str1, char *str2, char *str3, int num); -void x_dialog_create_kegs_conf(const char *str); +void x_dialog_create_gsport_conf(const char *str); int x_show_alert(int is_fatal, const char *str); pascal OSStatus my_cmd_handler(EventHandlerCallRef handlerRef, EventRef event, void *userdata); void update_window(void); diff --git a/src/protos_xdriver.h b/src/protos_xdriver.h index c11721b..12eaead 100644 --- a/src/protos_xdriver.h +++ b/src/protos_xdriver.h @@ -25,7 +25,7 @@ const char rcsid_protos_x_h[] = "@(#)$KmKId: protos_xdriver.h,v 1.19 2004-11-15 /* xdriver.c */ int main(int argc, char **argv); -void x_dialog_create_kegs_conf(const char *str); +void x_dialog_create_gsport_conf(const char *str); int x_show_alert(int is_fatal, const char *str); void x_update_color(int col_num, int red, int green, int blue, word32 rgb); void x_update_physical_colormap(void); diff --git a/src/resource b/src/resource index 0e1f280..13fcc90 100644 --- a/src/resource +++ b/src/resource @@ -1,13 +1,13 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by kegs32.rc +// Used by gsport32.rc // #define IDD_ABOUT_DIALOG 101 -#define IDC_KEGS32 102 +#define IDC_GSPORT32 102 #define IDR_TOOLBAR 103 #define IDD_DLG_DISKCONF 104 #define IDR_ACCEL 105 -#define IDD_KEGS32_KEY 106 +#define IDD_GSPORT32_KEY 106 #define IDD_SPEEDDIALOG 117 #define IDC_SLOW 1007 #define IDC_CUSTOM 1008 diff --git a/src/resource.h b/src/resource.h index eebe4cd..289d009 100644 --- a/src/resource.h +++ b/src/resource.h @@ -1,13 +1,13 @@ //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. -// Used by kegs32.rc +// Used by gsport32.rc // #define IDD_ABOUT_DIALOG 101 -#define IDC_KEGS32 102 +#define IDC_GSPORT32 102 #define IDR_TOOLBAR 103 #define IDD_DLG_DISKCONF 104 #define IDR_ACCEL 105 -#define IDD_KEGS32_KEY 106 +#define IDD_GSPORT32_KEY 106 #define ID_TOOLBAR 5000 #define ID_STATUSBAR 5001 #define IDC_EDIT_S5D1 10051 diff --git a/src/scc_socket_driver.c b/src/scc_socket_driver.c index 735b3c0..f425962 100644 --- a/src/scc_socket_driver.c +++ b/src/scc_socket_driver.c @@ -746,7 +746,7 @@ scc_socket_empty_writebuf(int port, double dcycs) # else /* ignore SIGPIPE around writes to the socket, so we */ /* can catch a closed socket and prepare to accept */ - /* a new connection. Otherwise, SIGPIPE kills KEGS */ + /* a new connection. Otherwise, SIGPIPE kills GSport */ sigemptyset(&newact.sa_mask); newact.sa_handler = SIG_IGN; newact.sa_flags = 0; diff --git a/src/sim65816.c b/src/sim65816.c index 0d0deda..10b3b1e 100644 --- a/src/sim65816.c +++ b/src/sim65816.c @@ -38,7 +38,7 @@ const char rcsid_sim65816_c[] = "@(#)$KmKId: sim65816.c,v 1.367 2004-11-22 02:39 char g_argv0_path[256] = "./"; -const char *g_kegs_default_paths[] = { "", "./", "${HOME}/", +const char *g_gsport_default_paths[] = { "", "./", "${HOME}/", "${HOME}/Library/GSport/", "${0}/Contents/Resources/", "/usr/local/lib/", "/usr/local/gsport/", "/usr/local/lib/gsport/", "/usr/share/gsport/", @@ -132,7 +132,7 @@ char* g_printer_font_script = "script.ttf"; char* g_printer_font_ocra = "ocra.ttf"; int g_config_iwm_vbl_count = 0; -const char g_kegs_version_str[] = "0.1"; +const char g_gsport_version_str[] = "0.1"; #define START_DCYCS (0.0) @@ -780,7 +780,7 @@ int g_screen_depth = 8; int -kegsmain(int argc, char **argv) +gsportmain(int argc, char **argv) { int skip_amt; int diff; @@ -940,7 +940,7 @@ kegsmain(int argc, char **argv) #ifdef HAVE_PARALLEL printer_init(g_printer_dpi,85,110,g_printer_output,g_printer_multipage); #endif - //If ethernet is enabled in config.kegs, lets initialize it + //If ethernet is enabled in config.gsport, lets initialize it #ifdef HAVE_TFE if (g_ethernet == 1) { @@ -949,7 +949,7 @@ kegsmain(int argc, char **argv) char *ppdes = NULL; if (tfe_enumadapter_open()) { - //Loop through the available adapters until we reach the interface number specified in config.kegs + //Loop through the available adapters until we reach the interface number specified in config.gsport while(tfe_enumadapter(&ppname,&ppdes)) { if (i == g_ethernet_interface) break; @@ -1022,7 +1022,7 @@ load_roms_init_memory() } void -kegs_expand_path(char *out_ptr, const char *in_ptr, int maxlen) +gsport_expand_path(char *out_ptr, const char *in_ptr, int maxlen) { char name_buf[256]; char *tmp_ptr; @@ -1088,7 +1088,7 @@ kegs_expand_path(char *out_ptr, const char *in_ptr, int maxlen) } void -setup_kegs_file(char *outname, int maxlen, int ok_if_missing, +setup_gsport_file(char *outname, int maxlen, int ok_if_missing, int can_create_file, const char **name_ptr) { char local_path[256]; @@ -1099,11 +1099,11 @@ setup_kegs_file(char *outname, int maxlen, int ok_if_missing, outname[0] = 0; - path_ptr = &g_kegs_default_paths[0]; + path_ptr = &g_gsport_default_paths[0]; save_path_ptr = path_ptr; while(*path_ptr) { - kegs_expand_path(&(local_path[0]), *path_ptr, 250); + gsport_expand_path(&(local_path[0]), *path_ptr, 250); cur_name_ptr = name_ptr; while(*cur_name_ptr) { strcpy(outname, &(local_path[0])); @@ -1136,12 +1136,12 @@ setup_kegs_file(char *outname, int maxlen, int ok_if_missing, if(can_create_file) { // Ask user if it's OK to create the file - x_dialog_create_kegs_conf(*name_ptr); + x_dialog_create_gsport_conf(*name_ptr); can_create_file = 0; // But clear out the fatal_printfs first clear_fatal_logs(); - setup_kegs_file(outname, maxlen, ok_if_missing, + setup_gsport_file(outname, maxlen, ok_if_missing, can_create_file, name_ptr); // It's one-level of recursion--it cannot loop since we // clear can_create_file. @@ -2003,7 +2003,7 @@ update_60hz(double dcycs, double dtime_now) sprintf(status_buf, "GSport v%-6s " "Press F4 for Config Menu %s", - g_kegs_version_str, code_str2); + g_gsport_version_str, code_str2); video_update_status_line(6, status_buf); g_status_refresh_needed = 1; @@ -2456,14 +2456,14 @@ fatal_printf(const char *fmt, ...) if(g_fatal_log < 0) { g_fatal_log = 0; } - ret = kegs_vprintf(fmt, ap); + ret = gsport_vprintf(fmt, ap); va_end(ap); return ret; } int -kegs_vprintf(const char *fmt, va_list ap) +gsport_vprintf(const char *fmt, va_list ap) { char *bufptr, *buf2ptr; int len; @@ -2516,7 +2516,7 @@ clear_fatal_logs() } char * -kegs_malloc_str(char *in_str) +gsport_malloc_str(char *in_str) { char *str; int len; diff --git a/src/smartport.c b/src/smartport.c index b86c9aa..e4e30a7 100644 --- a/src/smartport.c +++ b/src/smartport.c @@ -644,7 +644,7 @@ do_write_c7(int unit_num, word32 buf, int blk) val1 = get_memory16_c(buf + i, 0); val2 = get_memory16_c(buf + i + 2, 0); /* reorder the little-endian bytes to be big-endian */ -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val = (val2 << 16) + val1; #else val = (val1 << 24) + ((val1 << 8) & 0xff0000) + diff --git a/src/sound.c b/src/sound.c index 9f75e94..78ee5d5 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1025,7 +1025,7 @@ sound_play(double dsamps) #if defined(__linux__) || defined(OSS) /* Linux seems to expect little-endian */ /* samples always, even on PowerPC */ -# ifdef KEGS_LITTLE_ENDIAN +# ifdef GSPORT_LITTLE_ENDIAN sndptr[pos] = (val << 16) + (val0 & 0xffff); # else sndptr[pos] = ((val & 0xff) << 24) + @@ -1034,7 +1034,7 @@ sound_play(double dsamps) ((val0 >> 8) & 0xff); # endif #else -# ifdef KEGS_LITTLE_ENDIAN +# ifdef GSPORT_LITTLE_ENDIAN sndptr[pos] = (val << 16) + (val0 & 0xffff); # else sndptr[pos] = (val0 << 16) + (val & 0xffff); diff --git a/src/sound_driver.c b/src/sound_driver.c index 57d44d2..aebcaee 100644 --- a/src/sound_driver.c +++ b/src/sound_driver.c @@ -396,7 +396,7 @@ child_sound_init_linux() exit(1); } -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN fmt = AFMT_S16_LE; #else fmt = AFMT_S16_BE; diff --git a/src/superhires.h b/src/superhires.h index 6169c79..380e92a 100644 --- a/src/superhires.h +++ b/src/superhires.h @@ -84,7 +84,7 @@ SUPER_TYPE(byte *screen_data, int pixels_per_line, int y, int scan, (pal << 4); if(mode_640 && !use_a2vid_palette) { -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN pal_word += 0x04000c08; #else pal_word += 0x080c0004; @@ -121,7 +121,7 @@ SUPER_TYPE(byte *screen_data, int pixels_per_line, int y, int scan, pix3 = palptr[pix3+4]; } #if SUPER_PIXEL_SIZE == 8 -# ifdef KEGS_LITTLE_ENDIAN +# ifdef GSPORT_LITTLE_ENDIAN tmp = (pix3 << 24) + (pix2 << 16) + (pix1 << 8) + pix0 + pal_word; # else @@ -130,7 +130,7 @@ SUPER_TYPE(byte *screen_data, int pixels_per_line, int y, int scan, # endif *img_ptr++ = tmp; *img_ptr2++ = tmp; #elif SUPER_PIXEL_SIZE == 16 -# ifdef KEGS_LITTLE_ENDIAN +# ifdef GSPORT_LITTLE_ENDIAN tmp = (pix1 << 16) + pix0; tmp2 = (pix3 << 16) + pix2; # else @@ -192,7 +192,7 @@ SUPER_TYPE(byte *screen_data, int pixels_per_line, int y, int scan, printf("y:%d, x2:%d, val:%02x = %08x %08x\n", y, x2, val0, pix0, pix1); } #if SUPER_PIXEL_SIZE == 8 -# ifdef KEGS_LITTLE_ENDIAN +# ifdef GSPORT_LITTLE_ENDIAN tmp = (pix1 << 24) + (pix1 << 16) + (pix0 << 8) + pix0 + pal_word; # else diff --git a/src/vars_kegs32 b/src/vars_kegs32 index 7d1fa96..0257d70 100644 --- a/src/vars_kegs32 +++ b/src/vars_kegs32 @@ -1,9 +1,9 @@ -TARGET = gsportwin.exe -OBJECTS = $(OBJECTS1) win32snd_driver.o windriver.o kegs32.o -CCOPTS = -O2 -DKEGS_LITTLE_ENDIAN +TARGET = gsport.exe +OBJECTS = $(OBJECTS1) win32snd_driver.o windriver.o gsport32.o +CCOPTS = -O2 -DGSPORT_LITTLE_ENDIAN SUFFIX = ".exe" -NAME = gsportwin +NAME = gsport XOPTS = -Wall -fomit-frame-pointer -march=pentium XLIBS = diff --git a/src/vars_win32 b/src/vars_win32 index 4e4ab07..ca463c9 100644 --- a/src/vars_win32 +++ b/src/vars_win32 @@ -1,10 +1,10 @@ -TARGET = gsportwin.exe +TARGET = gsport.exe TFEOBJ = tfe/tfe.o arch/win32/tfearch.o tfe/tfesupp.o OBJECTS = $(OBJECTS1) $(TFEOBJ) scc_windriver.o win32snd_driver.o windriver.o -CCOPTS = -O2 -DKEGS_LITTLE_ENDIAN -DHAVE_TFE +CCOPTS = -O2 -DGSPORT_LITTLE_ENDIAN -DHAVE_TFE SUFFIX = ".exe" -NAME = gsportwin +NAME = gsport XOPTS = -Wall -fomit-frame-pointer -march=pentium XLIBS = diff --git a/src/vars_x86linux b/src/vars_x86linux index 5f1b64d..3fe2a8c 100644 --- a/src/vars_x86linux +++ b/src/vars_x86linux @@ -3,7 +3,7 @@ TARGET = gsportx OBJECTS = $(OBJECTS1) xdriver.o CC = cc CCOPTS = -O2 -Wall -fomit-frame-pointer -march=pentium -OPTS = -DKEGS_LITTLE_ENDIAN +OPTS = -DGSPORT_LITTLE_ENDIAN SUFFIX = NAME = gsportx LDFLAGS = diff --git a/src/vars_x86solaris b/src/vars_x86solaris index a995279..e7a2ca8 100644 --- a/src/vars_x86solaris +++ b/src/vars_x86solaris @@ -3,7 +3,7 @@ TARGET = gsportx OBJECTS = $(OBJECTS1) xdriver.o CC = gcc CCOPTS = -O -OPTS = -DNDEBUG -DSOLARIS -DKEGS_LITTLE_ENDIAN -DSOLARISSOUND +OPTS = -DNDEBUG -DSOLARIS -DGSPORT_LITTLE_ENDIAN -DSOLARISSOUND SUFFIX = NAME = gsportx LDFLAGS = diff --git a/src/video.c b/src/video.c index 1e3c456..765fd3e 100644 --- a/src/video.c +++ b/src/video.c @@ -453,7 +453,7 @@ video_init() val1 = g_dhires_colors_16[col[1] & 0xf]; val2 = g_dhires_colors_16[col[2] & 0xf]; val3 = g_dhires_colors_16[col[3] & 0xf]; -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val = (val3 << 24) + (val2 << 16) + (val1 << 8) + val0; #else val = (val0 << 24) + (val1 << 16) + (val2 << 8) + val3; @@ -1531,7 +1531,7 @@ redraw_changed_gr(int start_offset, int start_line, int num_lines, int reparse, (val0 << 8) + val0; val1_wd = (val1 << 24) + (val1 << 16) + (val1 << 8) + val1; -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val01_wd = (val1_wd << 16) + (val0_wd & 0xffff); #else val01_wd = (val0_wd << 16) + (val1_wd & 0xffff); @@ -1671,7 +1671,7 @@ redraw_changed_dbl_gr(int start_offset, int start_line, int num_lines, (val2 << 8) + val2; val3_wd = (val3 << 24) + (val3 << 16) + (val3 << 8) + val3; -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN val01_wd = (val1_wd << 24) + (val0_wd&0xffffff); val12_wd = (val2_wd << 16) + (val1_wd & 0xffff); val23_wd = (val3_wd << 8) + (val2_wd & 0xff); @@ -2905,7 +2905,7 @@ end_screen() } byte g_font_array[256][8] = { -#include "kegsfont.h" +#include "gsportfont.h" }; void diff --git a/src/win32.rc b/src/win32.rc index c048034..1c71181 100644 --- a/src/win32.rc +++ b/src/win32.rc @@ -12,7 +12,7 @@ // Menu // -IDC_KEGS32 MENU DISCARDABLE +IDC_GSPORT32 MENU DISCARDABLE BEGIN POPUP "&Emulator" BEGIN @@ -38,14 +38,14 @@ END // RT_MANIFEST // -// CREATEPROCESS_MANIFEST RT_MANIFEST "kegs.manifest" +// CREATEPROCESS_MANIFEST RT_MANIFEST "gsport.manifest" ///////////////////////////////////////////////////////////////////////////// // // Bitmap // -IDC_KEGS32 BITMAP DISCARDABLE "wintoolbar.bmp" +IDC_GSPORT32 BITMAP DISCARDABLE "wintoolbar.bmp" ///////////////////////////////////////////////////////////////////////////// // @@ -65,8 +65,8 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDC_KEGS32 ICON DISCARDABLE "win32.ico" -KEGS32_ICON ICON DISCARDABLE "win32.ico" +IDC_GSPORT32 ICON DISCARDABLE "win32.ico" +GSPORT32_ICON ICON DISCARDABLE "win32.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -81,7 +81,7 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,78,61,50,14 LTEXT "GSport: GS Emulator.\nBased on KEGS by Kent Dickey\nWindows Port by Chea Chee Keong\n\nThis software is licensed under GNU GPL.", IDC_STATIC,38,7,162,45,NOT WS_GROUP - ICON "KEGS32_ICON",IDC_STATIC,7,7,21,20,0 + ICON "GSPORT32_ICON",IDC_STATIC,7,7,21,20,0 END IDD_DLG_DISKCONF DIALOGEX 0, 0, 268, 182 @@ -139,10 +139,10 @@ BEGIN GROUPBOX "Speed Control",IDC_STATIC,7,7,226,96,WS_GROUP LTEXT "Adjust the speed of your emulator by selecting the appropriate speed control", IDC_STATIC,46,19,181,19,NOT WS_GROUP - ICON IDC_KEGS32,IDC_STATIC,14,19,21,20 + ICON IDC_GSPORT32,IDC_STATIC,14,19,21,20 END -IDD_KEGS32_KEY DIALOG 0, 0, 186, 172 +IDD_GSPORT32_KEY DIALOG 0, 0, 186, 172 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Help About Key Commands" FONT 8, "MS Sans Serif" diff --git a/src/windriver.c b/src/windriver.c index 16d5a5f..93ce38e 100644 --- a/src/windriver.c +++ b/src/windriver.c @@ -221,7 +221,7 @@ win_nonblock_read_stdin(int fd, char *bufptr, int len) } void -x_dialog_create_kegs_conf(const char *str) +x_dialog_create_gsport_conf(const char *str) { } @@ -434,7 +434,7 @@ main(int argc, char **argv) wndclass.hCursor = LoadCursor((HINSTANCE) NULL, IDC_ARROW); wndclass.hbrBackground = GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = "gsportwin"; + wndclass.lpszClassName = "gsport"; // Register the window if(!RegisterClass(&wndclass)) { @@ -445,7 +445,7 @@ main(int argc, char **argv) height = X_A2_WINDOW_HEIGHT + (MAX_STATUS_LINES * 16) + 32; g_main_height = height; - g_hwnd_main = CreateWindowEx(WS_EX_ACCEPTFILES, "gsportwin", "GSportWin - Apple //gs Emulator", + g_hwnd_main = CreateWindowEx(WS_EX_ACCEPTFILES, "gsport", "GSport - Apple //gs Emulator", WS_TILED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, X_A2_WINDOW_WIDTH, height, @@ -467,8 +467,8 @@ main(int argc, char **argv) g_screen_mdepth = 32; - // Call kegsmain - return kegsmain(argc, argv); + // Call gsportmain + return gsportmain(argc, argv); } diff --git a/src/winresource.h b/src/winresource.h index 7d5d615..f40907f 100644 --- a/src/winresource.h +++ b/src/winresource.h @@ -5,11 +5,11 @@ // #define CREATEPROCESS_MANIFEST 1 #define IDD_ABOUT_DIALOG 101 -#define IDC_KEGS32 102 +#define IDC_GSPORT32 102 #define IDR_TOOLBAR 103 #define IDD_DLG_DISKCONF 104 #define IDR_ACCEL 105 -#define IDD_KEGS32_KEY 106 +#define IDD_GSPORT32_KEY 106 #define ID_TOOLBAR 5000 #define ID_STATUSBAR 5001 #define IDC_EDIT_S5D1 10051 diff --git a/src/xdriver.c b/src/xdriver.c index d4e6f8f..61954ed 100644 --- a/src/xdriver.c +++ b/src/xdriver.c @@ -256,11 +256,11 @@ int a2_key_to_xsym[][3] = { int main(int argc, char **argv) { - return kegsmain(argc, argv); + return gsportmain(argc, argv); } void -x_dialog_create_kegs_conf(const char *str) +x_dialog_create_gsport_conf(const char *str) { /* do nothing -- not implemented yet */ return; @@ -898,7 +898,7 @@ get_ximage(Kimage *kimage_ptr) xim = XCreateImage(g_display, g_vis, depth, ZPixmap, 0, (char *)ptr, width, height, 8, 0); -#ifdef KEGS_LITTLE_ENDIAN +#ifdef GSPORT_LITTLE_ENDIAN xim->byte_order = LSBFirst; #else xim->byte_order = MSBFirst;