summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mtouchxl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mtouchxl.cpp')
-rw-r--r--src/mame/drivers/mtouchxl.cpp94
1 files changed, 93 insertions, 1 deletions
diff --git a/src/mame/drivers/mtouchxl.cpp b/src/mame/drivers/mtouchxl.cpp
index bfff75d3ad5..e0c0d743301 100644
--- a/src/mame/drivers/mtouchxl.cpp
+++ b/src/mame/drivers/mtouchxl.cpp
@@ -39,6 +39,7 @@
#include "machine/ins8250.h"
#include "machine/microtch.h"
#include "machine/atapicdr.h"
+#include "machine/idehd.h"
#include "machine/bankdev.h"
#include "machine/intelfsh.h"
#include "machine/ds128x.h"
@@ -64,6 +65,7 @@ public:
{ }
void at486(machine_config &config);
+ void at486hd(machine_config &config);
private:
required_device<cpu_device> m_maincpu;
@@ -80,6 +82,7 @@ private:
DECLARE_WRITE8_MEMBER(key_w);
DECLARE_READ8_MEMBER(coin_r);
static void cdrom(device_t *device);
+ static void hdd(device_t *device);
void at32_io(address_map &map);
void at32_map(address_map &map);
void dbank_map(address_map &map);
@@ -195,6 +198,7 @@ void mtxl_state::machine_reset()
static void mt6k_ata_devices(device_slot_interface &device)
{
device.option_add("cdrom", ATAPI_FIXED_CDROM);
+ device.option_add("hdd", IDE_HARDDISK);
}
void mtxl_state::cdrom(device_t *device)
@@ -206,7 +210,20 @@ void mtxl_state::cdrom(device_t *device)
ide0->set_fixed(true);
auto ide1 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:1"));
- ide1->set_default_option("");
+ ide1->set_default_option("hdd");
+ ide1->set_fixed(true);
+}
+
+void mtxl_state::hdd(device_t *device)
+{
+ auto ide0 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:0"));
+ ide0->option_reset();
+ mt6k_ata_devices(*ide0);
+ ide0->set_default_option("hdd");
+ ide0->set_fixed(true);
+
+ auto ide1 = dynamic_cast<device_slot_interface *>(device->subdevice("ide:1"));
+ ide1->set_default_option("cdrom");
ide1->set_fixed(true);
}
#endif
@@ -271,6 +288,66 @@ void mtxl_state::at486(machine_config &config)
#endif
}
+void mtxl_state::at486hd(machine_config &config)
+{
+ I486DX4(config, m_maincpu, 33000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mtxl_state::at32_map);
+ m_maincpu->set_addrmap(AS_IO, &mtxl_state::at32_io);
+#ifndef REAL_PCI_CHIPSET
+ m_maincpu->set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+
+ AT_MB(config, "mb", 0);
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
+ // on board devices
+ ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "ide", true).set_option_machine_config("ide", hdd); // FIXME: determine ISA bus clock
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_dm", true); // original is a gd-5440
+
+ ns16550_device &uart(NS16550(config, "ns16550", XTAL(1'843'200)));
+ uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx));
+ uart.out_int_callback().set("mb:pic8259_master", FUNC(pic8259_device::ir4_w));
+
+ MICROTOUCH(config, "microtouch", 9600).stx().set(uart, FUNC(ins8250_uart_device::rx_w));
+
+ ad1848_device &cs4231(AD1848(config, "cs4231", 0));
+ cs4231.irq().set("mb:pic8259_master", FUNC(pic8259_device::ir5_w));
+ cs4231.drq().set("mb:dma8237_1", FUNC(am9517a_device::dreq1_w));
+
+ subdevice<am9517a_device>("mb:dma8237_1")->out_iow_callback<1>().set("cs4231", FUNC(ad1848_device::dack_w));
+
+ // remove the keyboard controller and use the HLE one which allow keys to be unmapped
+ config.device_remove("mb:keybc");
+ config.device_remove("mb:pc_kbdc");
+ kbdc8042_device &kbdc(KBDC8042(config, "kbdc"));
+ kbdc.set_keyboard_type(kbdc8042_device::KBDC8042_AT386);
+ kbdc.system_reset_callback().set_inputline(m_maincpu, INPUT_LINE_RESET);
+ kbdc.gate_a20_callback().set_inputline(m_maincpu, INPUT_LINE_A20);
+ kbdc.input_buffer_full_callback().set("mb:pic8259_master", FUNC(pic8259_device::ir1_w));
+
+ ds12885_device &rtc(DS12885(config.replace(), "mb:rtc"));
+ rtc.irq().set("mb:pic8259_slave", FUNC(pic8259_device::ir0_w));
+ rtc.set_century_index(0x32);
+#endif
+ /* internal ram */
+ RAM(config, RAM_TAG).set_default_size("32M"); // Early XL games had 8 MB RAM, 6000 and later require 32MB
+
+ /* bankdev for dxxxx */
+ ADDRESS_MAP_BANK(config, "dbank").set_map(&mtxl_state::dbank_map).set_options(ENDIANNESS_LITTLE, 32, 32, 0x10000);
+
+ /* Flash ROM */
+ AMD_29F040(config, "flash");
+
+ /* Security key */
+ DS1205(config, "multikey");
+
+#ifdef REAL_PCI_CHIPSET
+ /* PCI root */
+ PCI_ROOT(config, ":pci");
+ // FIXME: This MCFG fragment does not compile. -R
+ //MCFG_SIS85C496_ADD(":pci:05.0", ":maincpu", 32*1024*1024)
+#endif
+}
+
#ifdef REAL_PCI_CHIPSET
#define MOTHERBOARD_ROMS \
ROM_REGION(0x20000, ":pci:05.0", 0) \
@@ -406,6 +483,19 @@ ROM_START( mtchxlgldo )
DISK_IMAGE_READONLY("r00", 0, SHA1(635e267f1abea060ce813eb7e78b88d57ea3f951))
ROM_END
+ROM_START( mtchxlti )
+ MOTHERBOARD_ROMS
+
+ ROM_REGION(0x100000, "ioboard", ROMREGION_ERASE00)
+
+ ROM_REGION(0x8000, "nvram", ROMREGION_ERASE00)
+
+ ROM_REGION(192, "multikey", ROMREGION_ERASE00)
+
+ DISK_REGION("board1:ide:ide:0:hdd")
+ DISK_IMAGE_READONLY("r00", 0, SHA1(8e9a2f9e670f02139cee11b7e8f758639d8b2838))
+ROM_END
+
/***************************************************************************
Game driver(s)
@@ -423,3 +513,5 @@ COMP( 1999, mtchxl6ko4, mtchxl6k, 0, at486, mtouchxl, mtxl_state, empty_
COMP( 1999, mtchxl6ko, mtchxl6k, 0, at486, mtouchxl, mtxl_state, empty_init, "Merit Industries", "MegaTouch XL 6000 (Version r02)", 0 )
COMP( 2000, mtchxlgld, 0, 0, at486, mtouchxl, mtxl_state, empty_init, "Merit Industries", "MegaTouch XL Gold (Version r01)", MACHINE_NOT_WORKING )
COMP( 2000, mtchxlgldo, mtchxlgld, 0, at486, mtouchxl, mtxl_state, empty_init, "Merit Industries", "MegaTouch XL Gold (Version r00)", MACHINE_NOT_WORKING )
+// this is a cracked operator bootleg, but the original files exist on the disk and could be replaced to create an imperfect non-cracked dump
+COMP( 2002, mtchxlti, 0, 0, at486hd, mtouchxl, mtxl_state, empty_init, "bootleg", "MegaTouch XL Titanium (Version r0?, cracked)", MACHINE_NOT_WORKING )