diff --git a/src/devices/chipsets/acc2168.c b/src/devices/chipsets/acc2168.c index 2a1cd9e..1ef3f10 100644 --- a/src/devices/chipsets/acc2168.c +++ b/src/devices/chipsets/acc2168.c @@ -8,7 +8,7 @@ * * Implementation of the ACC 2168 chipset. * - * Version: @(#)acc2168.c 1.0.1 2019/05/02 + * Version: @(#)acc2168.c 1.0.2 2019/05/05 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -142,13 +142,6 @@ acc2168_read(uint16_t addr, void *priv) } -static uint8_t -port78_read(uint16_t addr, void *priv) -{ - return(0); -} - - static void acc2168_close(void *priv) { @@ -168,8 +161,6 @@ acc2168_init(const device_t *info, UNUSED(void *parent)) io_sethandler(0x00f2, 2, acc2168_read,NULL,NULL, acc2168_write,NULL,NULL, dev); - io_sethandler(0x0078, 1, - port78_read,NULL,NULL, NULL,NULL,NULL, dev); port_92_add(1); diff --git a/src/devices/video/vid_ht216.c b/src/devices/video/vid_ht216.c index 95337aa..623c50a 100644 --- a/src/devices/video/vid_ht216.c +++ b/src/devices/video/vid_ht216.c @@ -8,7 +8,7 @@ * * Video7 VGA 1024i emulation. * - * Version: @(#)vid_ht216.c 1.0.1 2019/05/02 + * Version: @(#)vid_ht216.c 1.0.2 2019/05/05 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -412,6 +412,8 @@ ht216_out(uint16_t addr, uint8_t val, void *priv) break; case 0x46e8: + if (dev->id != 0x7861) break; + io_removehandler(0x03c0, 32, ht216_in,NULL,NULL, ht216_out,NULL,NULL, dev); mem_map_disable(&dev->svga.mapping); @@ -880,6 +882,8 @@ ht216_init(const device_t *info, UNUSED(void *parent)) break; case 0x7861: /* Packard-Bell 410A On-Board */ + io_sethandler(0x46e8, 1, + ht216_in,NULL,NULL, ht216_out,NULL,NULL, dev); vram_sz = (1 << 20); break; } @@ -889,8 +893,6 @@ ht216_init(const device_t *info, UNUSED(void *parent)) io_sethandler(0x03c0, 32, ht216_in,NULL,NULL, ht216_out,NULL,NULL, dev); - io_sethandler(0x46e8, 1, - ht216_in,NULL,NULL, ht216_out,NULL,NULL, dev); if (info->path != NULL) rom_init(&dev->bios_rom, info->path, diff --git a/src/machines/m_pbell.c b/src/machines/m_pbell.c index bfe4af2..9d9ded1 100644 --- a/src/machines/m_pbell.c +++ b/src/machines/m_pbell.c @@ -8,7 +8,14 @@ * * Implementation of various Packard Bell machines. * - * Version: @(#)m_pbell.c 1.0.2 2019/05/03 + * **NOTE** The 410A is not complete yet. Several mainboard jumpers + * and switches need to be implemented to allow it to fully + * work. Currently, system seems to assume monochrome VGA + * on the onboard VGA (there is a jumper for it!), and we + * _MUST_ enable the Internal mouse, or the PS/2 mouse as + * this is onboard. There is a jumper for this as well. + * + * Version: @(#)m_pbell.c 1.0.3 2019/05/05 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -54,6 +61,7 @@ #include "../devices/system/intel_sio.h" #include "../devices/system/intel_piix.h" #include "../devices/input/keyboard.h" +#include "../devices/input/mouse.h" #include "../devices/sio/sio.h" #include "../devices/floppy/fdd.h" #include "../devices/floppy/fdc.h" @@ -63,6 +71,27 @@ #include "machine.h" +/* Read out the configuration port. */ +//FIXME: bit5 makes it sound an alarm of some kind! +static uint8_t +port78_read(uint16_t addr, void *priv) +{ + uint8_t ret = 0x00; + + if (config.video_card != VID_INTERNAL) + ret |= 0x40; + +#if 0 + if (config.mouse_type != MOUSE_INTERNAL) + ret |= 0x80; +#endif + + DEBUG("PB410A: read(%04x) = %02x\n", addr, ret); + + return(ret); +} + + static void * common_init(const device_t *info, void *arg) { @@ -73,12 +102,16 @@ common_init(const device_t *info, void *arg) /* PB410A/PB430/ACC2168/ACC3221 */ case 410: device_add(&acc2168_device); + io_sethandler(0x0078, 1, + port78_read,NULL,NULL, NULL,NULL,NULL, NULL); + memregs_init(); m_at_common_ide_init(); device_add(&keyboard_ps2_device); - memregs_init(); device_add(&acc3221_device); if (config.video_card == VID_INTERNAL) device_add(&ht216_32_pb410a_device); + if (config.mouse_type == MOUSE_INTERNAL) + device_add(&mouse_ps2_device); break; /* PB640: Packard Bell PB640/430FX/AMI/NS PC87306 */ @@ -111,7 +144,7 @@ common_init(const device_t *info, void *arg) static const machine_t pb640_info = { - MACHINE_PCI | MACHINE_ISA | MACHINE_VLB | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, + MACHINE_PCI | MACHINE_ISA | MACHINE_VLB | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO | MACHINE_MOUSE, 0, 8, 128, 8, 128, -1, {{"Intel",cpus_Pentium},{"IDT",cpus_WinChip},CPU_AMD_K56,{"Cyrix",cpus_6x86}} @@ -130,7 +163,7 @@ const device_t m_pb640 = { static const machine_t pb410a_info = { - MACHINE_ISA | MACHINE_VLB | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, + MACHINE_ISA | MACHINE_VLB | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO | MACHINE_MOUSE, 0, 1, 32, 1, 128, -1, {{"Intel",cpus_i486},{"AMD",cpus_Am486},{"Cyrix",cpus_Cx486}}