diff --git a/src/machine/machine_ps1.c b/src/machine/machine_ps1.c index 3434f565c..b1aa7b056 100644 --- a/src/machine/machine_ps1.c +++ b/src/machine/machine_ps1.c @@ -342,7 +342,10 @@ machine_ps1_common_init(machine_t *model) machine_common_init(model); +#if 0 + /* Already done in machine.c */ mem_add_bios(); +#endif pit_set_out_func(&pit, 1, pit_refresh_timer_at); dma16_init(); if (romset != ROM_IBMPS1_2011) diff --git a/src/machine/machine_ps2_isa.c b/src/machine/machine_ps2_isa.c index 8d62be7fd..c5e762b7a 100644 --- a/src/machine/machine_ps2_isa.c +++ b/src/machine/machine_ps2_isa.c @@ -160,6 +160,9 @@ machine_ps2_m30_286_init(machine_t *model) machine_common_init(model); +#if 0 + /* Already done in machine.c */ +#endif mem_add_bios(); pit_set_out_func(&pit, 1, pit_refresh_timer_at); dma16_init(); diff --git a/src/machine/machine_ps2_mca.c b/src/machine/machine_ps2_mca.c index 68c1dfd5e..b68fdfd65 100644 --- a/src/machine/machine_ps2_mca.c +++ b/src/machine/machine_ps2_mca.c @@ -809,8 +809,8 @@ machine_ps2_common_init(machine_t *model) machine_common_init(model); -#if 0 - /* Already done in pc.c. */ +#if 1 + /* Already done in machine.c. */ mem_add_bios(); #endif dma16_init(); diff --git a/src/pc.c b/src/pc.c index 3739d3a90..9591355e4 100644 --- a/src/pc.c +++ b/src/pc.c @@ -8,7 +8,7 @@ * * Emulation core dispatcher. * - * Version: @(#)pc.c 1.0.20 2017/10/09 + * Version: @(#)pc.c 1.0.21 2017/10/10 * * Authors: Sarah Walker, * Miran Grca, @@ -554,8 +554,8 @@ pc_reset_hard_init(void) * should be resetting all devices set up for it, to their * current configurations ! * - * For, we will call their reset functions here, but that - * will be a call to device_reset_all() later ! + * For now, we will call their reset functions here, but + * that will be a call to device_reset_all() later ! */ /* Reset some basic devices. */ @@ -569,6 +569,8 @@ pc_reset_hard_init(void) /* Reset the video card. */ video_reset(); + if (voodoo_enabled) + device_add(&voodoo_device); /* Reset the Floppy Disk controller. */ fdc_reset(); @@ -588,37 +590,35 @@ pc_reset_hard_init(void) /* Reset and reconfigure the SCSI layer. */ scsi_card_init(); + cdrom_hard_reset(); + /* Reset and reconfigure the Network Card layer. */ network_reset(); /* Reset and reconfigure the Sound Card layer. */ sound_card_init(); if (mpu401_standalone_enable) - mpu401_device_add(); + mpu401_device_add(); if (GUS) - device_add(&gus_device); + device_add(&gus_device); if (GAMEBLASTER) - device_add(&cms_device); + device_add(&cms_device); if (SSI2001) - device_add(&ssi2001_device); - if (voodoo_enabled) - device_add(&voodoo_device); + device_add(&ssi2001_device); /* Reset the CPU module. */ cpu_set(); + cpu_cache_int_enabled = cpu_cache_ext_enabled = 0; resetx86(); dma_reset(); pic_reset(); + shadowbios = 0; + if (AT) setpitclock(machines[machine].cpu[cpu_manufacturer].cpus[cpu].rspeed); else setpitclock(14318184.0); - - shadowbios = 0; - cpu_cache_int_enabled = cpu_cache_ext_enabled = 0; - - cdrom_hard_reset(); } diff --git a/src/rom.c b/src/rom.c index ce89e307c..25d9019d6 100644 --- a/src/rom.c +++ b/src/rom.c @@ -13,11 +13,12 @@ * - c386sx16 BIOS fails checksum * - the loadfont() calls should be done elsewhere * - * Version: @(#)rom.c 1.0.6 2017/09/30 + * Version: @(#)rom.c 1.0.7 2017/10/10 * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, + * * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. * Copyright 2017 Fred N. van Kempen. @@ -437,7 +438,7 @@ rom_load_bios(int rom_id) if (! rom_load_interleaved( L"roms/machines/cmdpc30/commodore pc 30 iii even.bin", L"roms/machines/cmdpc30/commodore pc 30 iii odd.bin", - 0x000000, 16384, 0, rom)) break; + 0x000000, 32768, 0, rom)) break; biosmask = 0x7fff; return(1); @@ -776,7 +777,7 @@ rom_load_bios(int rom_id) if (! rom_load_interleaved( L"roms/machines/ibmps2_m55sx/33f8146.zm41", L"roms/machines/ibmps2_m55sx/33f8145.zm40", - 0x000000, 65536, 0, rom)) break; + 0x000000, 131072, 0, rom)) break; biosmask = 0x1ffff; return(1); diff --git a/src/win/win_dialog.c b/src/win/win_dialog.c index 887dd8119..a92bf8c02 100644 --- a/src/win/win_dialog.c +++ b/src/win/win_dialog.c @@ -8,7 +8,7 @@ * * Several dialogs for the application. * - * Version: @(#)win_dialog.c 1.0.2 2017/10/09 + * Version: @(#)win_dialog.c 1.0.3 2017/10/10 * * Author: Miran Grca, * Fred N. van Kempen, @@ -128,7 +128,13 @@ ui_msgbox(int flags, void *arg) * higher than the numeric ID's. So, we guesswork * that if the value of 'arg' is low, its an ID.. */ +#if defined(__gcc__) && defined(__x86_64__) + /* GCC, 64-bit mode. */ if (((int64_t)arg) < ((int64_t)65636)) +#else + /* Assume 32-bit mode. */ + if (((uint32_t)arg) < ((uint32_t)65636)) +#endif str = plat_get_string((int)arg); } diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 9df8979b4..bd56c89a3 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -8,7 +8,7 @@ * * Windows 86Box Settings dialog handler. * - * Version: @(#)win_settings.c 1.0.19 2017/10/09 + * Version: @(#)win_settings.c 1.0.20 2017/10/10 * * Author: Miran Grca, * @@ -1118,11 +1118,11 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa { midi_dev = midi_device_getdevice(c); - if (!midi_dev) + if (midi_dev) { if (c == 0) { - SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2152)); + SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2152)); } else {