diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 136663ff1..c1f9ea75e 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -256,17 +256,17 @@ extern int machine_at_spc4620p_init(const machine_t *); extern int machine_at_kmxc02_init(const machine_t *); extern int machine_at_deskmaster286_init(const machine_t *); -extern int machine_at_ncrpc8_init(const machine_t *); -extern int machine_at_ncr3302_init(const machine_t *); +extern int machine_at_pc8_init(const machine_t *); +extern int machine_at_3302_init(const machine_t *); #if defined(DEV_BRANCH) && defined(USE_OLIVETTI) -extern int machine_at_olim290_init(const machine_t *); +extern int machine_at_m290_init(const machine_t *); #endif extern int machine_at_shuttle386sx_init(const machine_t *); extern int machine_at_adi386sx_init(const machine_t *); -extern int machine_at_commodore_sl386sx16_init(const machine_t *); -extern int machine_at_commodore_sl386sx25_init(const machine_t *); +extern int machine_at_cmdsl386sx16_init(const machine_t *); +extern int machine_at_cmdsl386sx25_init(const machine_t *); extern int machine_at_spc6033p_init(const machine_t *); extern int machine_at_wd76c10_init(const machine_t *); extern int machine_at_flytech386_init(const machine_t *); @@ -277,18 +277,18 @@ extern int machine_at_arb1375_init(const machine_t *); extern int machine_at_pja511m_init(const machine_t *); #endif -extern int machine_at_ncrpc916sx_init(const machine_t *); +extern int machine_at_pc916sx_init(const machine_t *); -extern int machine_at_olim300_08_init(const machine_t *); -extern int machine_at_olim300_15_init(const machine_t *); +extern int machine_at_m30008_init(const machine_t *); +extern int machine_at_m30015_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t *at_ama932j_get_device(void); extern const device_t *at_flytech386_get_device(void); -extern const device_t *at_commodore_sl386sx25_get_device(void); +extern const device_t *at_cmdsl386sx25_get_device(void); extern const device_t *at_spc4620p_get_device(void); extern const device_t *at_spc6033p_get_device(void); -extern const device_t *at_m300_08_get_device(void); +extern const device_t *at_m30008_get_device(void); #endif /* m_at_386dx_486.c */ @@ -573,12 +573,12 @@ extern const device_t europc_device; #endif /* m_xt_olivetti.c */ -extern int machine_xt_olim24_init(const machine_t *); +extern int machine_xt_m24_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t *m24_get_device(void); #endif -extern int machine_xt_olim240_init(const machine_t *); -extern int machine_xt_olim19_init(const machine_t *); +extern int machine_xt_m240_init(const machine_t *); +extern int machine_xt_m19_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t *m19_get_device(void); #endif @@ -645,10 +645,10 @@ extern int machine_xt_jukopc_init(const machine_t *); extern int machine_xt_open_xt_init(const machine_t *); extern int machine_xt_pcxt_init(const machine_t *); extern int machine_xt_pxxt_init(const machine_t *); -extern int machine_xt_ncrpc4i_init(const machine_t *); +extern int machine_xt_pc4i_init(const machine_t *); extern int machine_xt_mpc1600_init(const machine_t *); -extern int machine_xt_eaglepcspirit_init(const machine_t *); -extern int machine_xt_multitechpc700_init(const machine_t *); +extern int machine_xt_pcspirit_init(const machine_t *); +extern int machine_xt_pc700_init(const machine_t *); extern int machine_xt_iskra3104_init(const machine_t *); diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_286_386sx.c index 7141e0121..c9e45ece5 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_286_386sx.c @@ -514,12 +514,12 @@ machine_at_wd76c10_init(const machine_t *model) int -machine_at_commodore_sl386sx16_init(const machine_t *model) +machine_at_cmdsl386sx16_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/cbm_sl386sx16/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", - "roms/machines/cbm_sl386sx16/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", + ret = bios_load_interleaved("roms/machines/cmdsl386sx16/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", + "roms/machines/cmdsl386sx16/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -556,18 +556,18 @@ machine_at_scamp_common_init(const machine_t *model) const device_t * -at_commodore_sl386sx25_get_device(void) +at_cmdsl386sx25_get_device(void) { return &gd5402_onboard_device; } int -machine_at_commodore_sl386sx25_init(const machine_t *model) +machine_at_cmdsl386sx25_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/cbm_sl386sx25/f000.rom", + ret = bios_load_linear("roms/machines/cmdsl386sx25/f000.rom", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -710,22 +710,22 @@ machine_at_pja511m_init(const machine_t *model) * - ctrl-alt-del produces an 8042 error */ int -machine_at_ncrpc8_init(const machine_t *model) +machine_at_pc8_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/ncr_pc8/ncr_35117_u127_vers.4-2.bin", - "roms/machines/ncr_pc8/ncr_35116_u113_vers.4-2.bin", - 0x000f0000, 65536, 0); + ret = bios_load_interleaved("roms/machines/pc8/ncr_35117_u127_vers.4-2.bin", + "roms/machines/pc8/ncr_35116_u113_vers.4-2.bin", + 0x000f0000, 65536, 0); if (bios_only || !ret) - return ret; + return ret; machine_at_common_init(model); device_add(&keyboard_at_ncr_device); if (fdc_type == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&fdc_at_device); return ret; } @@ -735,30 +735,30 @@ machine_at_ncrpc8_init(const machine_t *model) * - ctrl-alt-del produces an 8042 error */ int -machine_at_ncr3302_init(const machine_t *model) +machine_at_3302_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ncr_3302/f000-flex_drive_test.bin", + ret = bios_load_linear("roms/machines/3302/f000-flex_drive_test.bin", 0x000f0000, 65536, 0); if (ret) { - bios_load_aux_linear("roms/machines/ncr_3302/f800-setup_ncr3.5-013190.bin", + bios_load_aux_linear("roms/machines/3302/f800-setup_ncr3.5-013190.bin", 0x000f8000, 32768, 0); } if (bios_only || !ret) - return ret; + return ret; machine_at_common_ide_init(model); device_add(&neat_device); device_add(&keyboard_at_ncr_device); if (fdc_type == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&fdc_at_device); if (gfxcard == VID_INTERNAL) - device_add(¶dise_pvga1a_ncr3302_device); + device_add(¶dise_pvga1a_ncr3302_device); return ret; } @@ -768,16 +768,16 @@ machine_at_ncr3302_init(const machine_t *model) * - soft-reboot after saving CMOS settings/pressing ctrl-alt-del produces an 8042 error */ int -machine_at_ncrpc916sx_init(const machine_t *model) +machine_at_pc916sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/ncr_pc916sx/ncr_386sx_u46-17_7.3.bin", - "roms/machines/ncr_pc916sx/ncr_386sx_u12-19_7.3.bin", - 0x000f0000, 65536, 0); + ret = bios_load_interleaved("roms/machines/pc916sx/ncr_386sx_u46-17_7.3.bin", + "roms/machines/pc916sx/ncr_386sx_u12-19_7.3.bin", + 0x000f0000, 65536, 0); if (bios_only || !ret) - return ret; + return ret; machine_at_common_init(model); @@ -785,14 +785,14 @@ machine_at_ncrpc916sx_init(const machine_t *model) mem_remap_top(384); if (fdc_type == FDC_INTERNAL) - device_add(&fdc_at_device); + device_add(&fdc_at_device); return ret; } #if defined(DEV_BRANCH) && defined(USE_OLIVETTI) int -machine_at_olim290_init(const machine_t *model) +machine_at_m290_init(const machine_t *model) { int ret; @@ -800,12 +800,12 @@ machine_at_olim290_init(const machine_t *model) 0x000f0000, 65536, 0); if (bios_only || !ret) - return ret; + return ret; machine_at_common_init(model); device_add(&keyboard_at_olivetti_device); - if (fdc_type == FDC_INTERNAL) + if (fdc_type == FDC_INTERNAL) device_add(&fdc_at_device); device_add(&olivetti_eva_device); @@ -815,17 +815,17 @@ machine_at_olim290_init(const machine_t *model) #endif const device_t * -at_m300_08_get_device(void) +at_m30008_get_device(void) { return &oti067_m300_device; } int -machine_at_olim300_08_init(const machine_t *model) +machine_at_m30008_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/olivetti_m300_08/BIOS.ROM", + ret = bios_load_linear("roms/machines/m30008/BIOS.ROM", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -845,11 +845,11 @@ machine_at_olim300_08_init(const machine_t *model) /* Almost identical to M300-08, save for CPU speed, VRAM, and BIOS identification string */ int -machine_at_olim300_15_init(const machine_t *model) +machine_at_m30015_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/olivetti_m300_15/BIOS.ROM", + ret = bios_load_linear("roms/machines/m30015/BIOS.ROM", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -862,8 +862,8 @@ machine_at_olim300_15_init(const machine_t *model) device_add(&pc87310_ide_device); /* Stock VRAM is maxed out, so no need to expose video card config */ - if (gfxcard == VID_INTERNAL) - device_add(&oti067_m300_device); + if (gfxcard == VID_INTERNAL) + device_add(&oti067_m300_device); return ret; } diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index e2b82c2a6..ea022895c 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -336,8 +336,8 @@ machine_xt_iskra3104_init(const machine_t *model) int ret; ret = bios_load_interleaved("roms/machines/iskra3104/198.bin", - "roms/machines/iskra3104/199.bin", - 0x000fc000, 16384, 0); + "roms/machines/iskra3104/199.bin", + 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; @@ -349,15 +349,15 @@ machine_xt_iskra3104_init(const machine_t *model) int -machine_xt_ncrpc4i_init(const machine_t *model) +machine_xt_pc4i_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/ncr_pc4i/NCR_PC4i_BIOSROM_1985.bin", + ret = bios_load_linear("roms/machines/pc4i/NCR_PC4i_BIOSROM_1985.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) - return ret; + return ret; machine_xt_clone_init(model); @@ -374,7 +374,7 @@ machine_xt_mpc1600_init(const machine_t *model) 0x000fc000, 16384, 0); if (bios_only || !ret) - return ret; + return ret; device_add(&keyboard_pc82_device); @@ -385,20 +385,20 @@ machine_xt_mpc1600_init(const machine_t *model) int -machine_xt_eaglepcspirit_init(const machine_t *model) +machine_xt_pcspirit_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/eagle_pcspirit/u1101.bin", + ret = bios_load_linear("roms/machines/pcspirit/u1101.bin", 0x000fe000, 16384, 0); if (ret) { - bios_load_aux_linear("roms/machines/eagle_pcspirit/u1103.bin", + bios_load_aux_linear("roms/machines/pcspirit/u1103.bin", 0x000fc000, 8192, 0); } if (bios_only || !ret) - return ret; + return ret; device_add(&keyboard_pc82_device); @@ -409,15 +409,15 @@ machine_xt_eaglepcspirit_init(const machine_t *model) int -machine_xt_multitechpc700_init(const machine_t *model) +machine_xt_pc700_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/multitech_pc700/multitech pc-700 3.1.bin", + ret = bios_load_linear("roms/machines/pc700/multitech pc-700 3.1.bin", 0x000fe000, 8192, 0); - + if (bios_only || !ret) - return ret; + return ret; device_add(&keyboard_pc_device); diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index 44c13d32f..331ebdcac 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -84,13 +84,13 @@ typedef struct { int mouse_mode; int x, y, b; pc_timer_t send_delay_timer; -} olim24_kbd_t; +} m24_kbd_t; typedef struct { ogc_t ogc; colorplus_t colorplus; int mode; -} olim19_vid_t; +} m19_vid_t; static uint8_t key_queue[16]; static int key_queue_start = 0, @@ -122,7 +122,7 @@ m24_log(const char *fmt, ...) static void m24_kbd_poll(void *priv) { - olim24_kbd_t *m24_kbd = (olim24_kbd_t *)priv; + m24_kbd_t *m24_kbd = (m24_kbd_t *)priv; timer_advance_u64(&m24_kbd->send_delay_timer, 1000 * TIMER_USEC); if (m24_kbd->wantirq) { @@ -165,7 +165,7 @@ m24_kbd_adddata_ex(uint16_t val) static void m24_kbd_write(uint16_t port, uint8_t val, void *priv) { - olim24_kbd_t *m24_kbd = (olim24_kbd_t *)priv; + m24_kbd_t *m24_kbd = (m24_kbd_t *)priv; #if ENABLE_KEYBOARD_LOG m24_log("M24: write %04X %02X\n", port, val); @@ -246,7 +246,7 @@ m24_kbd_write(uint16_t port, uint8_t val, void *priv) static uint8_t m24_kbd_read(uint16_t port, void *priv) { - olim24_kbd_t *m24_kbd = (olim24_kbd_t *)priv; + m24_kbd_t *m24_kbd = (m24_kbd_t *)priv; uint8_t ret = 0xff; switch (port) { @@ -284,7 +284,7 @@ m24_kbd_read(uint16_t port, void *priv) static void m24_kbd_close(void *priv) { - olim24_kbd_t *kbd = (olim24_kbd_t *)priv; + m24_kbd_t *kbd = (m24_kbd_t *)priv; /* Stop the timer. */ timer_disable(&kbd->send_delay_timer); @@ -306,7 +306,7 @@ m24_kbd_close(void *priv) static void m24_kbd_reset(void *priv) { - olim24_kbd_t *m24_kbd = (olim24_kbd_t *)priv; + m24_kbd_t *m24_kbd = (m24_kbd_t *)priv; /* Initialize the keyboard. */ m24_kbd->status = STAT_LOCK | STAT_CD; @@ -327,7 +327,7 @@ m24_kbd_reset(void *priv) static int ms_poll(int x, int y, int z, int b, void *priv) { - olim24_kbd_t *m24_kbd = (olim24_kbd_t *)priv; + m24_kbd_t *m24_kbd = (m24_kbd_t *)priv; m24_kbd->x += x; m24_kbd->y += y; @@ -408,7 +408,7 @@ ms_poll(int x, int y, int z, int b, void *priv) static void -m24_kbd_init(olim24_kbd_t *kbd) +m24_kbd_init(m24_kbd_t *kbd) { /* Initialize the keyboard. */ @@ -432,7 +432,7 @@ m24_kbd_init(olim24_kbd_t *kbd) static void m19_vid_out(uint16_t addr, uint8_t val, void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; int oldmode = vid->mode; /* activating plantronics mode */ @@ -473,7 +473,7 @@ m19_vid_out(uint16_t addr, uint8_t val, void *priv) static uint8_t m19_vid_in(uint16_t addr, void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; if (vid->mode == PLANTRONICS_MODE) return colorplus_in(addr, &vid->colorplus); @@ -485,7 +485,7 @@ m19_vid_in(uint16_t addr, void *priv) static uint8_t m19_vid_read(uint32_t addr, void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; vid->colorplus.cga.mapping = vid->ogc.cga.mapping; if (vid->mode == PLANTRONICS_MODE) @@ -498,7 +498,7 @@ m19_vid_read(uint32_t addr, void *priv) static void m19_vid_write(uint32_t addr, uint8_t val, void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; colorplus_write(addr, val, &vid->colorplus); ogc_write(addr, val, &vid->ogc); @@ -508,7 +508,7 @@ m19_vid_write(uint32_t addr, uint8_t val, void *priv) static void m19_vid_close(void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; free(vid->ogc.cga.vram); free(vid->colorplus.cga.vram); @@ -519,7 +519,7 @@ m19_vid_close(void *priv) static void m19_vid_speed_changed(void *priv) { - olim19_vid_t *vid = (olim19_vid_t *)priv; + m19_vid_t *vid = (m19_vid_t *)priv; colorplus_recalctimings(&vid->colorplus); ogc_recalctimings(&vid->ogc); @@ -527,7 +527,7 @@ m19_vid_speed_changed(void *priv) static void -m19_vid_init(olim19_vid_t *vid) +m19_vid_init(m19_vid_t *vid) { /* int display_type; */ vid->mode = OLIVETTI_OGC_MODE; @@ -537,7 +537,7 @@ m19_vid_init(olim19_vid_t *vid) /* display_type = device_get_config_int("display_type"); */ /* OGC emulation part begin */ - loadfont_ex("roms/machines/olivetti_m19/BIOS.BIN", 1, 90); + loadfont_ex("roms/machines/m19/BIOS.BIN", 1, 90); /* composite is not working yet */ vid->ogc.cga.composite = 0; // (display_type != CGA_RGB); /* vid->ogc.cga.snow_enabled = device_get_config_int("snow_enabled"); */ @@ -704,30 +704,30 @@ m24_get_device(void) int -machine_xt_olim24_init(const machine_t *model) +machine_xt_m24_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/olivetti_m24/olivetti_m24_version_1.43_low.bin", - "roms/machines/olivetti_m24/olivetti_m24_version_1.43_high.bin", + ret = bios_load_interleaved("roms/machines/m24/olivetti_m24_version_1.43_low.bin", + "roms/machines/m24/olivetti_m24_version_1.43_high.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) - return ret; + return ret; - if (gfxcard == VID_INTERNAL) + if (gfxcard == VID_INTERNAL) device_add(&ogc_m24_device); - olim24_kbd_t *m24_kbd; + m24_kbd_t *m24_kbd; - m24_kbd = (olim24_kbd_t *)malloc(sizeof(olim24_kbd_t)); - memset(m24_kbd, 0x00, sizeof(olim24_kbd_t)); + m24_kbd = (m24_kbd_t *) malloc(sizeof(m24_kbd_t)); + memset(m24_kbd, 0x00, sizeof(m24_kbd_t)); machine_common_init(model); - /* On-board FDC can be disabled only on M24SP */ + /* On-board FDC can be disabled only on M24SP */ if (fdc_type == FDC_INTERNAL) - device_add(&fdc_xt_device); + device_add(&fdc_xt_device); /* Address 66-67 = mainboard dip-switch settings */ io_sethandler(0x0066, 2, m24_read, NULL, NULL, NULL, NULL, NULL, NULL); @@ -751,20 +751,20 @@ machine_xt_olim24_init(const machine_t *model) * - handles only 360kb floppy drives (drive type and capacity selectable with jumpers mapped to unknown memory locations) */ int -machine_xt_olim240_init(const machine_t *model) +machine_xt_m240_init(const machine_t *model) { int ret; - ret = bios_load_interleaved("roms/machines/olivetti_m240/olivetti_m240_pch6_2.04_low.bin", - "roms/machines/olivetti_m240/olivetti_m240_pch5_2.04_high.bin", + ret = bios_load_interleaved("roms/machines/m240/olivetti_m240_pch6_2.04_low.bin", + "roms/machines/m240/olivetti_m240_pch5_2.04_high.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) - return ret; + return ret; - machine_common_init(model); + machine_common_init(model); - pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); + pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); /* * port 60: should return jumper settings only under unknown conditions @@ -774,10 +774,10 @@ machine_xt_olim240_init(const machine_t *model) */ device_add(&keyboard_at_olivetti_device); - /* FIXME: make sure this is correct?? */ + /* FIXME: make sure this is correct?? */ device_add(&at_nvr_device); - if (fdc_type == FDC_INTERNAL) + if (fdc_type == FDC_INTERNAL) device_add(&fdc_xt_device); if (joystick_type) @@ -796,22 +796,22 @@ machine_xt_olim240_init(const machine_t *model) * - setting CPU speed at 4.77MHz sometimes throws a timer error. If the machine is hard-resetted, the error disappears. */ int -machine_xt_olim19_init(const machine_t *model) +machine_xt_m19_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/olivetti_m19/BIOS.BIN", + ret = bios_load_linear("roms/machines/m19/BIOS.BIN", 0x000fc000, 16384, 0); if (bios_only || !ret) return ret; - olim19_vid_t *vid; + m19_vid_t *vid; /* Do not move memory allocation elsewhere. */ - vid = (olim19_vid_t *)malloc(sizeof(olim19_vid_t)); - memset(vid, 0x00, sizeof(olim19_vid_t)); - + vid = (m19_vid_t *) malloc(sizeof(m19_vid_t)); + memset(vid, 0x00, sizeof(m19_vid_t)); + machine_common_init(model); /* On-board FDC cannot be disabled */ diff --git a/src/machine/m_xt_philips.c b/src/machine/m_xt_philips.c index b03dbf7ba..f9b205d4c 100644 --- a/src/machine/m_xt_philips.c +++ b/src/machine/m_xt_philips.c @@ -41,13 +41,15 @@ #include <86box/io.h> #include <86box/video.h> + typedef struct { uint8_t reg; } philips_t; -#ifdef ENABLE_philips_LOG -int philips_do_log = ENABLE_philips_LOG; + +#ifdef ENABLE_PHILIPS_LOG +int philips_do_log = ENABLE_PHILIPS_LOG; static void philips_log(const char *fmt, ...) { @@ -67,21 +69,20 @@ static void philips_write(uint16_t port, uint8_t val, void *priv) { philips_t *dev = (philips_t *) priv; - - switch (port) - { - /* port 0xc0 - * bit 7: turbo - * bits 4-5: rtc read/set (I2C Bus SDA/SCL?) - * bit 2: parity disabled - */ - case 0xc0: - dev->reg = val; - if (val & 0x80) - cpu_dynamic_switch(cpu); - else - cpu_dynamic_switch(0); - break; + + switch (port) { + /* port 0xc0 + * bit 7: turbo + * bits 4-5: rtc read/set (I2C Bus SDA/SCL?) + * bit 2: parity disabled + */ + case 0xc0: + dev->reg = val; + if (val & 0x80) + cpu_dynamic_switch(cpu); + else + cpu_dynamic_switch(0); + break; } philips_log("Philips XT Mainboard: Write %02x at %02x\n", val, port); @@ -94,17 +95,15 @@ philips_read(uint16_t port, void *priv) philips_t *dev = (philips_t *) priv; uint8_t ret = 0xff; - switch (port) - { - /* port 0xc0 - * bit 7: turbo - * bits 4-5: rtc read/set - * bit 2: parity disabled - */ - case 0xc0: - ret = dev->reg; - break; - + switch (port) { + /* port 0xc0 + * bit 7: turbo + * bits 4-5: rtc read/set + * bit 2: parity disabled + */ + case 0xc0: + ret = dev->reg; + break; } philips_log("Philips XT Mainboard: Read %02x at %02x\n", ret, port); @@ -128,7 +127,7 @@ philips_init(const device_t *info) memset(dev, 0, sizeof(philips_t)); dev->reg = 0x40; - + io_sethandler(0x0c0, 0x01, philips_read, NULL, NULL, philips_write, NULL, NULL, dev); return dev; @@ -152,7 +151,7 @@ machine_xt_philips_common_init(const machine_t *model) pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); + device_add(&fdc_xt_device); nmi_init(); @@ -172,11 +171,11 @@ machine_xt_p3105_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/philips_p3105/philipsnms9100.bin", + ret = bios_load_linear("roms/machines/p3105/philipsnms9100.bin", 0x000fc000, 16384, 0); if (bios_only || !ret) - return ret; + return ret; machine_xt_philips_common_init(model); @@ -188,11 +187,11 @@ machine_xt_p3120_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/philips_p3120/philips_p3120.bin", + ret = bios_load_linear("roms/machines/p3120/philips_p3120.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) - return ret; + return ret; machine_xt_philips_common_init(model); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index ceaf3d297..fe1d53fd3 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -67,12 +67,12 @@ const machine_t machines[] = { { "[8088] Columbia Data Products MPC-1600", "mpc1600", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 512, 64, 0, machine_xt_mpc1600_init, NULL }, { "[8088] Compaq Portable", "portable", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_portable_init, NULL }, { "[8088] DTK XT clone", "dtk", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_dtk_init, NULL }, - { "[8088] Eagle PC Spirit", "pcspirit", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_eaglepcspirit_init, NULL }, + { "[8088] Eagle PC Spirit", "pcspirit", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pcspirit_init, NULL }, { "[8088] Generic XT clone", "genxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_genxt_init, NULL }, { "[8088] Juko XT clone", "jukopc", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_jukopc_init, NULL }, - { "[8088] Multitech PC-700", "pc700", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_multitechpc700_init, NULL }, - { "[8088] NCR PC4i", "pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_ncrpc4i_init, NULL }, - { "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_olim19_init, NULL }, + { "[8088] Multitech PC-700", "pc700", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 64, 0, machine_xt_pc700_init, NULL }, + { "[8088] NCR PC4i", "pc4i", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 256, 640, 256, 0, machine_xt_pc4i_init, NULL }, + { "[8088] Olivetti M19", "m19", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 256, 640, 256, 0, machine_xt_m19_init, NULL }, { "[8088] OpenXT", "openxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_open_xt_init, NULL }, { "[8088] Philips P3105/NMS9100", "p3105", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_XTA, 256, 768, 256, 0, machine_xt_p3105_init, NULL }, { "[8088] Phoenix XT clone", "pxxt", MACHINE_TYPE_8088, CPU_PKG_8088, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 64, 640, 64, 0, machine_xt_pxxt_init, NULL }, @@ -98,8 +98,8 @@ const machine_t machines[] = { { "[8086] Amstrad PC20(0)", "pc200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_pc200_init, pc200_get_device }, { "[8086] Amstrad PPC512/640", "ppc512", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE | MACHINE_NONMI, 512, 640, 128, 63, machine_ppc512_init, ppc512_get_device }, { "[8086] Compaq Deskpro", "deskpro", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_compaq_deskpro_init, NULL }, - { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_xt_olim24_init, m24_get_device }, - { "[8086] Olivetti M240", "m240", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_olim240_init, NULL }, + { "[8086] Olivetti M21/24/24SP", "m24", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, machine_xt_m24_init, m24_get_device }, + { "[8086] Olivetti M240", "m240", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_m240_init, NULL }, { "[8086] Schetmash Iskra-3104", "iskra3104", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC, 128, 640, 128, 0, machine_xt_iskra3104_init, NULL }, { "[8086] Tandy 1000 SL/2", "tandy1000sl2", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO_FIXED, 512, 768, 128, 0, machine_tandy1000sl2_init, tandy1k_sl_get_device }, { "[8086] Toshiba T1200", "t1200", MACHINE_TYPE_8086, CPU_PKG_8086, 0, 0, 0, 0, 0, 0, 0, MACHINE_PC | MACHINE_VIDEO, 1024, 2048,1024, 63, machine_xt_t1200_init, t1200_get_device }, @@ -123,9 +123,9 @@ const machine_t machines[] = { { "[ISA] Compaq Portable II", "portableii", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_portableii_init, NULL }, { "[ISA] Compaq Portable III", "portableiii", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_VIDEO, 640, 16384, 128, 127, machine_at_portableiii_init, at_cpqiii_get_device }, { "[ISA] MR 286 clone", "mr286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 512, 16384, 128, 127, machine_at_mr286_init, NULL }, - { "[ISA] NCR PC8/810/710/3390/3392", "pc8", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_ncrpc8_init, NULL }, + { "[ISA] NCR PC8/810/710/3390/3392", "pc8", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_pc8_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_OLIVETTI) - { "[ISA] Olivetti M290", "m290", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_olim290_init, NULL }, + { "[ISA] Olivetti M290", "m290", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 640, 16384, 128, 127, machine_at_m290_init, NULL }, #endif #if defined(DEV_BRANCH) && defined(USE_OPEN_AT) { "[ISA] OpenAT", "open_at", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 256, 15872, 128, 63, machine_at_open_at_init, NULL }, @@ -137,7 +137,7 @@ const machine_t machines[] = { { "[GC103] Quadtel 286 clone", "quadt286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_quadt286_init, NULL }, { "[GC103] Trigem 286M", "tg286m", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE, 512, 8192, 128, 127, machine_at_tg286m_init, NULL }, { "[NEAT] AMI 286 clone", "ami286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_neat_ami_init, NULL }, - { "[NEAT] NCR 3302", "3302", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_VIDEO, 512, 16384, 128, 127, machine_at_ncr3302_init, NULL }, + { "[NEAT] NCR 3302", "3302", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_VIDEO, 512, 16384, 128, 127, machine_at_3302_init, NULL }, { "[NEAT] Phoenix 286 clone", "px286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_px286_init, NULL }, { "[SCAT] Award 286 clone", "award286", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_award286_init, NULL }, { "[SCAT] GW-286CT GEAR", "gw286ct", MACHINE_TYPE_286, CPU_PKG_286, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 128, 127, machine_at_gw286ct_init, NULL }, @@ -154,7 +154,7 @@ const machine_t machines[] = { /* 386SX machines */ { "[ISA] IBM PS/1 model 2121", "ibmps1_2121", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO_FIXED, 2048, 6144,1024, 63, machine_ps1_m2121_init, NULL }, { "[ISA] IBM PS/1 m.2121+ISA", "ibmps1_2121_isa", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 6144,1024, 63, machine_ps1_m2121_init, NULL }, - { "[ISA] NCR PC916SX", "pc916sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 128, 127, machine_at_ncrpc916sx_init, NULL }, + { "[ISA] NCR PC916SX", "pc916sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 128, 127, machine_at_pc916sx_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_M6117) { "[ALi M6117] Acrosser AR-B1375", "arb1375", MACHINE_TYPE_386SX, CPU_PKG_M6117, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 32768,1024, 127, machine_at_arb1375_init, NULL }, { "[ALi M6117] Acrosser PJ-A511M", "pja511m", MACHINE_TYPE_386SX, CPU_PKG_M6117, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 32768,1024, 127, machine_at_pja511m_init, NULL }, @@ -163,12 +163,12 @@ const machine_t machines[] = { { "[HT18] AMA-932J", "ama932j", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_IDE | MACHINE_VIDEO, 512, 8192, 128, 127, machine_at_ama932j_init, at_ama932j_get_device }, { "[Intel 82335] ADI 386SX", "adi386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_adi386sx_init, NULL }, { "[Intel 82335] Shuttle 386SX", "shuttle386sx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_shuttle386sx_init, NULL }, - { "[NEAT] Commodore SL386SX-16", "cmdsl386sx16", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 8192, 512, 127, machine_at_commodore_sl386sx16_init, NULL }, + { "[NEAT] Commodore SL386SX-16", "cmdsl386sx16", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE, 1024, 8192, 512, 127, machine_at_cmdsl386sx16_init, NULL }, { "[NEAT] DTK 386SX clone", "dtk386", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 8192, 128, 127, machine_at_neat_init, NULL }, - { "[OPTi 283] Olivetti M300-08", "m30008", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 20000000, 20000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_olim300_08_init, at_m300_08_get_device }, - { "[OPTi 283] Olivetti M300-15", "m30015", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 25000000, 25000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_olim300_15_init, NULL }, + { "[OPTi 283] Olivetti M300-08", "m30008", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 20000000, 20000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_m30008_init, at_m30008_get_device }, + { "[OPTi 283] Olivetti M300-15", "m30015", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 25000000, 25000000, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 16384, 2048, 127, machine_at_m30015_init, NULL }, { "[OPTi 291] DTK PPM-3333P", "awardsx", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 16384, 1024, 127, machine_at_awardsx_init, NULL }, - { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, machine_at_commodore_sl386sx25_init, at_commodore_sl386sx25_get_device }, + { "[SCAMP] Commodore SL386SX-25", "cmdsl386sx25", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 8192, 512, 127, machine_at_cmdsl386sx25_init, at_cmdsl386sx25_get_device }, { "[SCAMP] Samsung SPC-6033P", "spc6033p", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 12288, 2048, 127, machine_at_spc6033p_init, at_spc6033p_get_device }, { "[SCAT] KMX-C-02", "kmxc02", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 512, 16384, 512, 127, machine_at_kmxc02_init, NULL }, { "[WD76C10] Amstrad MegaPC", "megapc", MACHINE_TYPE_386SX, CPU_PKG_386SX, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 1024, 32768, 1024, 127, machine_at_wd76c10_init, NULL },