diff --git a/src/config.c b/src/config.c index 5a3dedc4d..8dfd7d6c2 100644 --- a/src/config.c +++ b/src/config.c @@ -8,7 +8,7 @@ * * Configuration file handler. * - * Version: @(#)config.c 1.0.41 2018/02/09 + * Version: @(#)config.c 1.0.42 2018/02/10 * * Authors: Sarah Walker, * Miran Grca, @@ -434,6 +434,7 @@ load_general(void) video_graytype = config_get_int(cat, "video_graytype", 0); rctrl_is_lalt = config_get_int(cat, "rctrl_is_lalt", 0); + update_icons = config_get_int(cat, "update_icons", 1); window_remember = config_get_int(cat, "window_remember", 0); if (window_remember) { @@ -448,9 +449,7 @@ load_general(void) window_w = window_h = window_x = window_y = 0; } - sound_gain[0] = config_get_int(cat, "sound_gain_main", 0); - sound_gain[1] = config_get_int(cat, "sound_gain_cd", 0); - sound_gain[2] = config_get_int(cat, "sound_gain_midi", 0); + sound_gain = config_get_int(cat, "sound_gain", 0); #ifdef USE_LANGUAGE /* @@ -1530,6 +1529,11 @@ save_general(void) else config_set_int(cat, "rctrl_is_lalt", rctrl_is_lalt); + if (update_icons == 1) + config_delete_var(cat, "update_icons"); + else + config_set_int(cat, "update_icons", update_icons); + if (window_remember) { config_set_int(cat, "window_remember", window_remember); @@ -1540,20 +1544,10 @@ save_general(void) config_delete_var(cat, "window_coordinates"); } - if (sound_gain[0] != 0) - config_set_int(cat, "sound_gain_main", sound_gain[0]); + if (sound_gain != 0) + config_set_int(cat, "sound_gain", sound_gain); else - config_delete_var(cat, "sound_gain_main"); - - if (sound_gain[1] != 0) - config_set_int(cat, "sound_gain_cd", sound_gain[1]); - else - config_delete_var(cat, "sound_gain_cd"); - - if (sound_gain[2] != 0) - config_set_int(cat, "sound_gain_midi", sound_gain[2]); - else - config_delete_var(cat, "sound_gain_midi"); + config_delete_var(cat, "sound_gain"); #ifdef USE_LANGUAGE if (plat_langid == 0x0409) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 0c58980a4..e1a7ae764 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -9,7 +9,7 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * Version: @(#)hdc_ide.c 1.0.24 2018/01/21 + * Version: @(#)hdc_ide.c 1.0.25 2018/02/08 * * Authors: Sarah Walker, * Miran Grca, @@ -1348,84 +1348,50 @@ void writeide(int ide_board, uint16_t addr, uint8_t val) return; case WIN_DRIVE_DIAGNOSTICS: /* Execute Drive Diagnostics */ + if (ide_drive_is_zip(ide)) + zip[atapi_zip_drives[ide->channel]].status = BUSY_STAT; + else if (ide_drive_is_cdrom(ide)) + cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT; + else + ide->atastat = BUSY_STAT; + + if (ide_drive_is_zip(ide_other)) + zip[atapi_zip_drives[ide_other->channel]].status = BUSY_STAT; + else if (ide_drive_is_cdrom(ide_other)) + cdrom[atapi_cdrom_drives[ide_other->channel]].status = BUSY_STAT; + else + ide_other->atastat = BUSY_STAT; + + timer_process(); + if (ide_drive_is_zip(ide)) + zip[atapi_zip_drives[ide->channel]].callback = 200LL * IDE_TIME; + else if (ide_drive_is_cdrom(ide)) + cdrom[atapi_cdrom_drives[ide->channel]].callback = 200LL * IDE_TIME; + idecallback[ide_board] = 200LL * IDE_TIME; + timer_update_outstanding(); + return; + case WIN_PIDENTIFY: /* Identify Packet Device */ case WIN_SET_MULTIPLE_MODE: /* Set Multiple Mode */ - case WIN_SET_FEATURES: /* Set Features */ case WIN_NOP: case WIN_STANDBYNOW1: case WIN_IDLENOW1: case WIN_SETIDLE1: /* Idle */ case WIN_CHECKPOWERMODE1: case WIN_SLEEP1: - if (val == WIN_DRIVE_DIAGNOSTICS) - { - if (ide_drive_is_zip(ide)) - { - zip[atapi_zip_drives[ide->channel]].status = BUSY_STAT; - } - else if (ide_drive_is_cdrom(ide)) - { - cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT; - } - else - { - ide->atastat = BUSY_STAT; - } - - if (ide_drive_is_zip(ide_other)) - { - zip[atapi_zip_drives[ide_other->channel]].status = BUSY_STAT; - } - else if (ide_drive_is_cdrom(ide_other)) - { - cdrom[atapi_cdrom_drives[ide_other->channel]].status = BUSY_STAT; - } - else - { - ide_other->atastat = BUSY_STAT; - } - - timer_process(); - if (ide_drive_is_zip(ide)) - { - zip[atapi_zip_drives[ide->channel]].callback = 200LL * IDE_TIME; - } - else if (ide_drive_is_cdrom(ide)) - { - cdrom[atapi_cdrom_drives[ide->channel]].callback = 200LL * IDE_TIME; - } - idecallback[ide_board] = 200LL * IDE_TIME; - timer_update_outstanding(); - } + if (ide_drive_is_zip(ide)) + zip[atapi_zip_drives[ide->channel]].status = BUSY_STAT; + else if (ide_drive_is_cdrom(ide)) + cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT; else - { - if (ide_drive_is_zip(ide)) - { - zip[atapi_zip_drives[ide->channel]].status = BUSY_STAT; - } - else if (ide_drive_is_cdrom(ide)) - { - cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT; - } - else - { - ide->atastat = BUSY_STAT; - } - timer_process(); - if (ide_drive_is_zip(ide)) - { - zip[atapi_zip_drives[ide->channel]].callback = 30LL * IDE_TIME; - } - else if (ide_drive_is_cdrom(ide)) - { - cdrom[atapi_cdrom_drives[ide->channel]].callback = 30LL * IDE_TIME; - } - idecallback[ide_board] = 30LL * IDE_TIME; - timer_update_outstanding(); - } + ide->atastat = BUSY_STAT; + timer_process(); + callbackide(ide_board); + timer_update_outstanding(); return; case WIN_IDENTIFY: /* Identify Device */ + case WIN_SET_FEATURES: /* Set Features */ case WIN_READ_NATIVE_MAX: if (ide_drive_is_zip(ide)) { @@ -1472,7 +1438,7 @@ void writeide(int ide_board, uint16_t addr, uint8_t val) { ide->atastat = BUSY_STAT; timer_process(); - idecallback[ide_board]=1LL; + idecallback[ide_board]=200LL*IDE_TIME; timer_update_outstanding(); ide->pos=0; } diff --git a/src/disk/hdd_image.c b/src/disk/hdd_image.c index 660096a14..4e41057fd 100644 --- a/src/disk/hdd_image.c +++ b/src/disk/hdd_image.c @@ -8,7 +8,7 @@ * * Handling of hard disk image files. * - * Version: @(#)hdd_image.c 1.0.11 2018/02/07 + * Version: @(#)hdd_image.c 1.0.12 2018/02/08 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -332,7 +332,7 @@ void hdd_image_seek(uint8_t id, uint32_t sector) void hdd_image_read(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buffer) { - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); fread(buffer, 1, count * 512, hdd_images[id].file); } @@ -350,7 +350,7 @@ int hdd_image_read_ex(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buff if ((sectors - sector) < transfer_sectors) transfer_sectors = sectors - sector; - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); fread(buffer, 1, transfer_sectors * 512, hdd_images[id].file); if (count != transfer_sectors) @@ -360,7 +360,7 @@ int hdd_image_read_ex(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buff void hdd_image_write(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buffer) { - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); fwrite(buffer, count * 512, 1, hdd_images[id].file); } @@ -372,7 +372,7 @@ int hdd_image_write_ex(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buf if ((sectors - sector) < transfer_sectors) transfer_sectors = sectors - sector; - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); fwrite(buffer, transfer_sectors * 512, 1, hdd_images[id].file); if (count != transfer_sectors) @@ -384,7 +384,7 @@ void hdd_image_zero(uint8_t id, uint32_t sector, uint32_t count) { int i = 0; - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); for (i = 0; i < count; i++) fwrite(empty_sector, 512, 1, hdd_images[id].file); } @@ -399,7 +399,7 @@ int hdd_image_zero_ex(uint8_t id, uint32_t sector, uint32_t count) if ((sectors - sector) < transfer_sectors) transfer_sectors = sectors - sector; - hdd_image_seek(id, sector); + fseeko64(hdd_images[id].file, ((uint64_t)sector * 512) + hdd_images[id].base, SEEK_SET); for (i = 0; i < transfer_sectors; i++) fwrite(empty_sector, 1, 512, hdd_images[id].file); diff --git a/src/plat.h b/src/plat.h index 4473a44b9..665aeaf0a 100644 --- a/src/plat.h +++ b/src/plat.h @@ -8,7 +8,7 @@ * * Define the various platform support functions. * - * Version: @(#)plat.h 1.0.24 2018/02/09 + * Version: @(#)plat.h 1.0.25 2018/02/11 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -60,6 +60,7 @@ GLOBAL uint64_t timer_freq; GLOBAL int infocus; GLOBAL char emu_version[128]; /* version ID string */ GLOBAL int rctrl_is_lalt; +GLOBAL int update_icons; /* System-related functions. */ diff --git a/src/sound/openal.c b/src/sound/openal.c index 016125bfb..dead49c3a 100644 --- a/src/sound/openal.c +++ b/src/sound/openal.c @@ -8,7 +8,7 @@ * * Interface to the OpenAL sound processing library. * - * Version: @(#)openal.c 1.0.3 2018/01/16 + * Version: @(#)openal.c 1.0.4 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, @@ -231,8 +231,7 @@ givealbuffer_common(void *buf, uint8_t src, int size, int freq) alGetSourcei(source[src], AL_BUFFERS_PROCESSED, &processed); if (processed >= 1) { - gain = pow(10.0, (double)sound_gain[src] / 20.0); - + gain = pow(10.0, (double)sound_gain / 20.0); alListenerf(AL_GAIN, gain); alSourceUnqueueBuffers(source[src], 1, &buffer); diff --git a/src/sound/sound.c b/src/sound/sound.c index d2a74da29..fbb2cc321 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -8,13 +8,13 @@ * * Sound emulation core. * - * Version: @(#)sound.c 1.0.11 2017/12/28 + * Version: @(#)sound.c 1.0.12 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, * - * Copyright 2008-2017 Sarah Walker. - * Copyright 2016,2017 Miran Grca. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. */ #include #include @@ -52,7 +52,7 @@ typedef struct { int sound_card_current = 0; int sound_pos_global = 0; int soundon = 1; -int sound_gain[3] = { 0, 0, 0 }; +int sound_gain = 0; static int sound_card_last = 0; diff --git a/src/sound/sound.h b/src/sound/sound.h index 334a73a1d..39a2abc45 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -8,19 +8,19 @@ * * Sound emulation core. * - * Version: @(#)sound.h 1.0.3 2017/12/09 + * Version: @(#)sound.h 1.0.4 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, * - * Copyright 2008-2017 Sarah Walker. - * Copyright 2016,2017 Miran Grca. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. */ #ifndef EMU_SOUND_H # define EMU_SOUND_H -extern int sound_gain[3]; +extern int sound_gain; #define SOUNDBUFLEN (48000/50) diff --git a/src/video/vid_svga.h b/src/video/vid_svga.h index d389ebaa2..80331a948 100644 --- a/src/video/vid_svga.h +++ b/src/video/vid_svga.h @@ -8,7 +8,7 @@ * * Generic SVGA handling. * - * Version: @(#)vid_svga.h 1.0.6 2018/02/07 + * Version: @(#)vid_svga.h 1.0.7 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, @@ -197,7 +197,7 @@ uint32_t svga_mask_changedaddr(uint32_t addr, svga_t *svga); extern uint32_t shade[5][256]; -__inline__ uint32_t svga_color_transform(uint32_t color) +static __inline__ uint32_t svga_color_transform(uint32_t color) { uint8_t *clr8 = (uint8_t *) &color; if (!video_grayscale && !invert_display) diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 7047f7d4a..9a0aa9cd7 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -8,7 +8,7 @@ * * Define all known video cards. * - * Version: @(#)vid_table.c 1.0.15 2018/02/07 + * Version: @(#)vid_table.c 1.0.16 2018/02/11 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -35,6 +35,7 @@ #include "vid_ati28800.h" #include "vid_ati_mach64.h" #include "vid_cga.h" +#include "vid_cl5428.h" #ifdef DEV_BRANCH # ifdef USE_CIRRUS # include "vid_cl_ramdac.h" /* vid_cl_gd.c needs this */ @@ -156,6 +157,7 @@ video_cards[] = { #if defined(DEV_BRANCH) && defined(USE_STEALTH32) {"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_vlb", &et4000w32p_vlb_device, GFX_ET4000W32_VLB, {VIDEO_BUS, 4, 4, 4, 10, 10, 10}}, #endif + {"[VLB] Diamond SpeedStar PRO (CL-GD5428)", "cl_gd5428_vlb", &gd5428_device, GFX_CL_GD5428, {VIDEO_BUS, 4, 8, 16, 4, 8, 16}}, {"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device, GFX_VIRGE_VLB, {VIDEO_BUS, 2, 2, 3, 28, 28, 45}}, {"[VLB] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_vlb", &s3_virge_988_vlb_device, GFX_VIRGEVX_VLB, {VIDEO_BUS, 2, 2, 4, 26, 26, 42}}, {"[VLB] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_vlb", &s3_diamond_stealth64_vlb_device, GFX_STEALTH64_VLB, {VIDEO_BUS, 2, 2, 4, 26, 26, 42}}, diff --git a/src/video/video.h b/src/video/video.h index 9b769ff03..7af93a210 100644 --- a/src/video/video.h +++ b/src/video/video.h @@ -8,7 +8,7 @@ * * Definitions for the video controller module. * - * Version: @(#)video.h 1.0.13 2018/02/07 + * Version: @(#)video.h 1.0.14 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, @@ -69,6 +69,9 @@ enum { GFX_MACH64VT2, /* ATI Mach64 VT2 */ #if defined(DEV_BRANCH) && defined(USE_CIRRUS) GFX_CL_GD5422, /* Cirrus Logic CL-GD5422 */ +#endif + GFX_CL_GD5428, /* Diamond SpeedStar PRO (Cirrus Logic CL-GD5428) */ +#if defined(DEV_BRANCH) && defined(USE_CIRRUS) GFX_CL_GD5429, /* Cirrus Logic CL-GD5429 */ GFX_CL_GD5430, /* Cirrus Logic CL-GD5430 */ GFX_CL_GD5434, /* Cirrus Logic CL-GD5434 */ diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 8ab9a0ce9..546d11ef8 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -8,7 +8,7 @@ * * Application resource script for Windows. * - * Version: @(#)86Box.rc 1.0.29 2018/02/09 + * Version: @(#)86Box.rc 1.0.30 2018/02/11 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -120,6 +120,8 @@ BEGIN MENUITEM SEPARATOR MENUITEM "S&tatus", IDM_STATUS MENUITEM "Take s&creenshot\tCtrl+F11", IDM_ACTION_SCREENSHOT + MENUITEM SEPARATOR + MENUITEM "&Update status bar icons", IDM_UPDATE_ICONS END #if defined(ENABLE_LOG_TOGGLES) || defined(ENABLE_LOG_COMMANDS) POPUP "&Logging" @@ -237,22 +239,16 @@ BEGIN LTEXT "1",IDT_STEXT,16,186,180,1000 END -DLG_SND_GAIN DIALOG DISCARDABLE 0, 0, 174, 136 +DLG_SND_GAIN DIALOG DISCARDABLE 0, 0, 113, 136 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sound Gain" FONT 8, "MS Sans Serif" BEGIN - DEFPUSHBUTTON "OK",IDOK,117,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,117,24,50,14 - CONTROL "Main",IDC_SLIDER_MAIN,"msctls_trackbar32",TBS_VERT | + DEFPUSHBUTTON "OK",IDOK,57,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,57,24,50,14 + CONTROL "Gain",IDC_SLIDER_GAIN,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_AUTOTICKS | WS_TABSTOP,15,20,20,109 - CONTROL "CD",IDC_SLIDER_CD,"msctls_trackbar32",TBS_VERT | - TBS_BOTH | TBS_AUTOTICKS | WS_TABSTOP,45,20,20,109 - CONTROL "MIDI",IDC_SLIDER_MIDI,"msctls_trackbar32",TBS_VERT | - TBS_BOTH | TBS_AUTOTICKS | WS_TABSTOP,77,20,20,109 - CTEXT "Main",IDT_1746,7,7,32,9,SS_CENTERIMAGE - CTEXT "CD",IDT_1747,38,7,32,9,SS_CENTERIMAGE - CTEXT "MIDI",IDT_1748,70,7,32,9,SS_CENTERIMAGE + CTEXT "Gain",IDT_1746,16,7,32,9,SS_CENTERIMAGE END DLG_NEW_FLOPPY DIALOG DISCARDABLE 0, 0, 226, 86 diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 269bf4df3..b9c393595 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -8,7 +8,7 @@ # # Makefile for Win32 (MinGW32) environment. # -# Version: @(#)Makefile.mingw 1.0.98 2018/02/07 +# Version: @(#)Makefile.mingw 1.0.100 2018/02/11 # # Authors: Miran Grca, # Fred N. van Kempen, @@ -216,7 +216,7 @@ else endif endif endif -AFLAGS := -fomit-frame-pointer -msse2 -mfpmath=sse -mstackrealign -fno-strict-aliasing +AFLAGS := -msse2 -mfpmath=sse RFLAGS := --input-format=rc -O coff ifeq ($(RELEASE), y) OPTS += -DRELEASE_BUILD @@ -346,6 +346,7 @@ endif ifeq ($(STEALTH32), y) OPTS += -DUSE_STEALTH32 +DEVBROBJ += vid_icd2061.o endif endif @@ -359,12 +360,14 @@ endif # Final versions of the toolchain flags. CFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \ - $(AFLAGS) -fomit-frame-pointer -mstackrealign -Wall -CXXFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \ - $(AFLAGS) -fno-strict-aliasing -fvisibility=hidden \ - -Wall -Wundef -fvisibility-inlines-hidden \ - -Wunused-parameter -Wno-ctor-dtor-privacy \ - -Woverloaded-virtual + $(AFLAGS) -fomit-frame-pointer -mstackrealign -Wall \ + -fno-strict-aliasing -flto +CFLAGS := $(CFLAGS) +# CXXFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \ +# $(AFLAGS) -fno-strict-aliasing -fvisibility=hidden \ +# -Wall -Wundef -fvisibility-inlines-hidden \ +# -Wunused-parameter -Wno-ctor-dtor-privacy \ +# -Woverloaded-virtual ######################################################################### @@ -372,29 +375,37 @@ CXXFLAGS := $(WX_FLAGS) $(OPTS) $(DFLAGS) $(COPTIM) $(AOPTIM) \ ######################################################################### MAINOBJ := pc.o config.o random.o timer.o io.o dma.o nmi.o pic.o \ pit.o ppi.o pci.o mca.o mcr.o mem.o memregs.o rom.o \ - device.o nvr.o nvr_at.o nvr_ps2.o $(VNCOBJ) $(RDPOBJ) \ - intel.o intel_flash.o intel_piix.o intel_piix4.o intel_sio.o + device.o nvr.o nvr_at.o nvr_ps2.o $(VNCOBJ) $(RDPOBJ) + +INTELOBJ := intel.o \ + intel_flash.o \ + intel_sio.o \ + intel_piix.o intel_piix4.o CPUOBJ := cpu.o cpu_table.o \ - 808x.o 386.o x86seg.o x87.o \ - 386_dynarec.o $(DYNARECOBJ) + 808x.o 386.o 386_dynarec.o \ + x86seg.o x87.o \ + $(DYNARECOBJ) MCHOBJ := machine.o machine_table.o \ - m_amstrad.o m_europc.o m_europc_hdc.o \ - m_olivetti_m24.o m_tandy.o \ m_xt.o m_xt_compaq.o \ - m_at.o m_at_ali1429.o m_at_commodore.o \ + m_pcjr.o \ + m_amstrad.o \ + m_europc.o m_europc_hdc.o \ + m_olivetti_m24.o m_tandy.o \ + m_at.o \ + m_at_ali1429.o m_at_commodore.o \ m_at_neat.o m_at_headland.o \ m_at_t3100e.o \ + m_ps1.o \ + m_ps2_isa.o m_ps2_mca.o \ m_at_opti495.o m_at_scat.o \ m_at_compaq.o m_at_wd76c10.o \ m_at_sis_85c471.o m_at_sis_85c496.o \ m_at_430lx_nx.o m_at_430fx.o \ - m_at_430hx.o m_at_430vx.o \ - m_pcjr.o m_ps1.o m_ps2_isa.o m_ps2_mca.o + m_at_430hx.o m_at_430vx.o DEVOBJ := bugger.o lpt.o $(SERIAL) \ - sio_detect.o \ sio_fdc37c66x.o sio_fdc37c669.o sio_fdc37c93x.o \ sio_pc87306.o sio_w83877f.o sio_um8669f.o \ keyboard.o \ @@ -403,8 +414,8 @@ DEVOBJ := bugger.o lpt.o $(SERIAL) \ joystick_standard.o joystick_ch_flightstick_pro.o \ joystick_sw_pad.o joystick_tm_fcs.o \ mouse.o \ - mouse_serial.o mouse_ps2.o mouse_bus.o \ - zip.o + mouse_bus.o \ + mouse_serial.o mouse_ps2.o FDDOBJ := fdd.o fdc.o fdi2raw.o \ fdd_common.o fdd_86f.o \ @@ -414,12 +425,16 @@ FDDOBJ := fdd.o fdc.o fdi2raw.o \ HDDOBJ := hdd.o \ hdd_image.o hdd_table.o \ hdc.o \ - hdc_esdi_at.o hdc_esdi_mca.o hdc_ide.o hdc_mfm_at.o \ - hdc_mfm_xt.o hdc_xtide.o + hdc_mfm_xt.o hdc_xtide.o \ + hdc_mfm_at.o \ + hdc_esdi_at.o hdc_esdi_mca.o \ + hdc_ide.o CDROMOBJ := cdrom.o \ cdrom_dosbox.o cdrom_image.o cdrom_null.o +ZIPOBJ := zip.o + ifeq ($(USB), y) USBOBJ := usb.o endif @@ -441,6 +456,7 @@ NETOBJ := network.o \ SNDOBJ := sound.o \ openal.o \ + snd_opl.o snd_dbopl.o \ dbopl.o nukedopl.o \ snd_resid.o \ convolve.o convolve-sse.o envelope.o extfilt.o \ @@ -454,10 +470,12 @@ SNDOBJ := sound.o \ snd_pssj.o \ snd_lpt_dac.o snd_lpt_dss.o \ snd_adlib.o snd_adlibgold.o snd_ad1848.o snd_audiopci.o \ - snd_sb.o snd_sb_dsp.o snd_cms.o snd_dbopl.o \ - snd_emu8k.o snd_gus.o snd_opl.o \ - snd_mpu401.o \ - snd_sn76489.o snd_ssi2001.o snd_wss.o \ + snd_cms.o \ + snd_gus.o \ + snd_sb.o snd_sb_dsp.o \ + snd_emu8k.o snd_mpu401.o \ + snd_sn76489.o snd_ssi2001.o \ + snd_wss.o \ snd_ym7128.o VIDOBJ := video.o \ @@ -465,25 +483,28 @@ VIDOBJ := video.o \ vid_cga.o vid_cga_comp.o \ vid_compaq_cga.o \ vid_mda.o \ - vid_ega.o vid_ega_render.o \ - vid_vga.o vid_svga.o vid_svga_render.o \ vid_hercules.o vid_herculesplus.o vid_incolor.o \ vid_colorplus.o \ vid_genius.o \ vid_t3100e.o \ - vid_s3.o vid_s3_virge.o \ - vid_et4000.o vid_et4000w32.o vid_icd2061.o \ + vid_wy700.o \ + vid_ega.o vid_ega_render.o \ + vid_svga.o vid_svga_render.o \ + vid_vga.o \ + vid_ati_eeprom.o \ + vid_ati18800.o vid_ati28800.o \ + vid_ati_mach64.o vid_ati68860_ramdac.o \ + vid_ics2595.o \ + vid_cl5428.o \ + vid_et4000.o vid_sc1502x_ramdac.o \ + vid_et4000w32.o vid_stg_ramdac.o \ vid_oti067.o \ vid_paradise.o \ - vid_tvga.o vid_tgui9440.o vid_tkd8001_ramdac.o \ - vid_ati_eeprom.o vid_ati18800.o vid_ati28800.o \ - vid_ati68860_ramdac.o vid_ati_mach64.o \ - vid_ics2595.o \ - vid_sc1502x_ramdac.o \ - vid_sdac_ramdac.o \ - vid_stg_ramdac.o \ vid_ti_cf62011.o \ - vid_wy700.o \ + vid_tvga.o \ + vid_tgui9440.o vid_tkd8001_ramdac.o \ + vid_s3.o vid_s3_virge.o \ + vid_sdac_ramdac.o \ vid_voodoo.o PLATOBJ := win.o \ @@ -491,8 +512,8 @@ PLATOBJ := win.o \ win_cdrom.o win_cdrom_ioctl.o win_keyboard.o \ win_mouse.o win_joystick.o win_midi.o -OBJ := $(MAINOBJ) $(CPUOBJ) $(MCHOBJ) $(DEVOBJ) \ - $(FDDOBJ) $(CDROMOBJ) $(HDDOBJ) \ +OBJ := $(MAINOBJ) $(INTELOBJ) $(CPUOBJ) $(MCHOBJ) $(DEVOBJ) \ + $(FDDOBJ) $(CDROMOBJ) $(ZIPOBJ) $(HDDOBJ) \ $(USBOBJ) $(NETOBJ) $(SCSIOBJ) $(SNDOBJ) $(VIDOBJ) \ $(PLATOBJ) $(UIOBJ) $(DEVBROBJ) ifdef EXOBJ diff --git a/src/win/resource.h b/src/win/resource.h index c9e9212ae..3112d462a 100644 --- a/src/win/resource.h +++ b/src/win/resource.h @@ -8,7 +8,7 @@ * * Windows resource defines. * - * Version: @(#)resource.h 1.0.20 2018/02/09 + * Version: @(#)resource.h 1.0.21 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, @@ -80,9 +80,7 @@ #define IDT_1743 1743 /* Channel: */ #define IDT_STEXT 1744 /* text in status window */ #define IDT_SDEVICE 1745 /* text in status window */ -#define IDT_1746 1746 /* Main */ -#define IDT_1747 1747 /* CD */ -#define IDT_1748 1748 /* MIDI */ +#define IDT_1746 1746 /* Gain */ #define IDT_1749 1749 /* File name: */ #define IDT_1750 1750 /* Disk size: */ #define IDT_1751 1751 /* RPM mode: */ @@ -198,9 +196,7 @@ #define IDC_COMBO_ZIP_CHANNEL_IDE 1164 #define IDC_CHECK250 1165 -#define IDC_SLIDER_MAIN 1180 /* sound gain dialog */ -#define IDC_SLIDER_CD 1181 -#define IDC_SLIDER_MIDI 1182 +#define IDC_SLIDER_GAIN 1180 /* sound gain dialog */ #define IDC_EDIT_FILE_NAME 1190 /* new floppy image dialog */ #define IDC_COMBO_DISK_SIZE 1191 @@ -240,6 +236,7 @@ #define IDM_CONFIG_LOAD 40021 #define IDM_CONFIG_SAVE 40022 #define IDM_STATUS 40030 +#define IDM_UPDATE_ICONS 40040 #define IDM_VID_RESIZE 40050 #define IDM_VID_REMEMBER 40051 #define IDM_VID_DDRAW 40060 diff --git a/src/win/win_snd_gain.c b/src/win/win_snd_gain.c index 61d3df68d..6580fec7e 100644 --- a/src/win/win_snd_gain.c +++ b/src/win/win_snd_gain.c @@ -8,7 +8,7 @@ * * Handle the sound gain dialog. * - * Version: @(#)win_snd_gain.c 1.0.0 2018/01/17 + * Version: @(#)win_snd_gain.c 1.0.1 2018/02/10 * * Authors: Miran Grca, * @@ -32,7 +32,7 @@ #include "win.h" -static uint8_t old_gain[3]; +static uint8_t old_gain; #ifdef __amd64__ @@ -43,43 +43,34 @@ static BOOL CALLBACK SoundGainDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND h; - int i; switch (message) { case WM_INITDIALOG: - plat_pause(1); - for (i = 0; i < 3; i++) { - old_gain[i] = sound_gain[i]; - h = GetDlgItem(hdlg, IDC_SLIDER_MAIN + i); - SendMessage(h, TBM_SETRANGE, (WPARAM)1, (LPARAM)MAKELONG(0, 9)); - SendMessage(h, TBM_SETPOS, (WPARAM)1, 9 - (sound_gain[i] >> 1)); - SendMessage(h, TBM_SETTICFREQ, (WPARAM)1, 0); - SendMessage(h, TBM_SETLINESIZE, (WPARAM)0, 1); - SendMessage(h, TBM_SETPAGESIZE, (WPARAM)0, 2); - } + old_gain = sound_gain; + h = GetDlgItem(hdlg, IDC_SLIDER_GAIN); + SendMessage(h, TBM_SETRANGE, (WPARAM)1, (LPARAM)MAKELONG(0, 9)); + SendMessage(h, TBM_SETPOS, (WPARAM)1, 9 - (sound_gain >> 1)); + SendMessage(h, TBM_SETTICFREQ, (WPARAM)1, 0); + SendMessage(h, TBM_SETLINESIZE, (WPARAM)0, 1); + SendMessage(h, TBM_SETPAGESIZE, (WPARAM)0, 2); break; case WM_VSCROLL: - for (i = 0; i < 3; i++) { - h = GetDlgItem(hdlg, IDC_SLIDER_MAIN + i); - sound_gain[i] = (9 - SendMessage(h, TBM_GETPOS, (WPARAM)0, 0)) << 1; - } + h = GetDlgItem(hdlg, IDC_SLIDER_GAIN); + sound_gain = (9 - SendMessage(h, TBM_GETPOS, (WPARAM)0, 0)) << 1; break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: - for (i = 0; i < 3; i++) { - h = GetDlgItem(hdlg, IDC_SLIDER_MAIN + i); - sound_gain[i] = (9 - SendMessage(h, TBM_GETPOS, (WPARAM)0, 0)) << 1; - } + h = GetDlgItem(hdlg, IDC_SLIDER_GAIN); + sound_gain = (9 - SendMessage(h, TBM_GETPOS, (WPARAM)0, 0)) << 1; config_save(); EndDialog(hdlg, 0); return TRUE; case IDCANCEL: - for (i = 0; i < 3; i++) - sound_gain[i] = old_gain[i]; + sound_gain = old_gain; config_save(); EndDialog(hdlg, 0); return TRUE; diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index 3628a3642..6d78b745f 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -8,7 +8,7 @@ * * Implement the application's Status Bar. * - * Version: @(#)win_stbar.c 1.0.13 2018/02/06 + * Version: @(#)win_stbar.c 1.0.14 2018/02/11 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -55,6 +55,7 @@ HWND hwndSBAR; +int update_icons = 1; static LONG_PTR OriginalProcedure; @@ -277,6 +278,9 @@ ui_sb_update_icon(int tag, int active) int temp_flags = 0; int found; + if (!update_icons) + return; + if (((tag & 0xf0) >= SB_TEXT) || !sb_ready || (sb_parts == 0) || (sb_icon_flags == NULL) || (sb_part_icons == NULL)) { return; } diff --git a/src/win/win_ui.c b/src/win/win_ui.c index 28c983980..8c797df41 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -8,7 +8,7 @@ * * user Interface module for WinAPI on Windows. * - * Version: @(#)win_ui.c 1.0.17 2018/02/09 + * Version: @(#)win_ui.c 1.0.18 2018/02/11 * * Authors: Sarah Walker, * Miran Grca, @@ -135,6 +135,8 @@ ResetAllMenus(void) CheckMenuItem(menuMain, IDM_ACTION_RCTRL_IS_LALT, MF_UNCHECKED); + CheckMenuItem(menuMain, IDM_UPDATE_ICONS, MF_UNCHECKED); + #ifdef ENABLE_LOG_TOGGLES # ifdef ENABLE_BUSLOGIC_LOG CheckMenuItem(menuMain, IDM_LOG_BUSLOGIC, MF_UNCHECKED); @@ -195,6 +197,8 @@ ResetAllMenus(void) CheckMenuItem(menuMain, IDM_ACTION_RCTRL_IS_LALT, rctrl_is_lalt ? MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(menuMain, IDM_UPDATE_ICONS, update_icons ? MF_CHECKED : MF_UNCHECKED); + #ifdef ENABLE_LOG_TOGGLES # ifdef ENABLE_BUSLOGIC_LOG CheckMenuItem(menuMain, IDM_LOG_BUSLOGIC, buslogic_do_log?MF_CHECKED:MF_UNCHECKED); @@ -330,6 +334,12 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) StatusWindowCreate(hwnd); break; + case IDM_UPDATE_ICONS: + update_icons ^= 1; + CheckMenuItem(hmenu, IDM_UPDATE_ICONS, update_icons ? MF_CHECKED : MF_UNCHECKED); + config_save(); + break; + case IDM_VID_RESIZE: vid_resize = !vid_resize; CheckMenuItem(hmenu, IDM_VID_RESIZE, (vid_resize)? MF_CHECKED : MF_UNCHECKED);