diff --git a/docs/source/usingmame/defaultkeys.rst b/docs/source/usingmame/defaultkeys.rst
index f558c42cdef..9892c86cb1f 100644
--- a/docs/source/usingmame/defaultkeys.rst
+++ b/docs/source/usingmame/defaultkeys.rst
@@ -141,9 +141,6 @@ and saving/loading save states.
state.
**Left Shift+F6**
Create a quick save state.
-**Left Ctrl+F6**
- Decrease Prescaling.
- (*SDL MAME only*)
**F7**
Load a save state. You will be prompted to press a key or select from the
menu to determine which save state you wish to load.
@@ -154,15 +151,18 @@ and saving/loading save states.
save or load.*
**Left Shift+F7**
Load a quick save state.
-**Left Ctrl+F7**
- Increase Prescaling.
- (*SDL MAME only*)
**F8**
Decrease frame skipping on the fly.
**Left Shift+F8**
Toggle cheat mode. (if started with “-cheat”)
+**Left Alt+F8**
+ Decrease Prescaling.
+ (*SDL MAME only*)
**F9**
Increase frame skipping on the fly.
+**Left Alt+F9**
+ Increase Prescaling.
+ (*SDL MAME only*)
**F10**
Toggle speed throttling.
**Left Alt+F10**
@@ -185,14 +185,9 @@ and saving/loading save states.
Begin recording AVI video.
**Left Alt+F12**
Take HLSL Rendered Snapshot.
-**Insert**
- Fast forward. While held, runs game with throttling disabled and with the
- maximum frameskip.
- (*Windows non-SDL MAME only*)
-**Page Down**
+**Insert** (Windows non-SDL MAME)/**Page Down** (SDL MAME)
Fast forward. While held, runs game with throttling disabled and with the
maximum frameskip.
- (*SDL MAME only*)
**Left Alt+Enter**
Toggles between full-screen and windowed mode.
**Scroll Lock**/**Forward Delete** (Mac Desktop)/**fn-Delete** (Mac Laptop)
diff --git a/docs/source/usingmame/mamemenus.rst b/docs/source/usingmame/mamemenus.rst
index 9bae9407acc..ebade1e5188 100644
--- a/docs/source/usingmame/mamemenus.rst
+++ b/docs/source/usingmame/mamemenus.rst
@@ -27,7 +27,7 @@ settings.
Emulated system inputs are ignored while menus are displayed. You can still
pause or resume the running system while most menus are displayed by pressing
-the **Pause** key or button (**P** on the keyboard by default).
+the **Pause** key or button (**F5** on the keyboard by default).
If you start MAME without specifying a system on the command line, the system
selection menu will be shown (assuming the
diff --git a/hash/compclr2_flop.xml b/hash/compclr2_flop.xml
index 072ab498859..706510ba8ab 100644
--- a/hash/compclr2_flop.xml
+++ b/hash/compclr2_flop.xml
@@ -3,7 +3,7 @@
-
+
Action Soundware
@@ -50,7 +50,7 @@ license:CC0-1.0
- Alien Invasion (v1.4, Alt)
+ Alien Invasion (v1.4, alt)
19??
<unknown>
@@ -192,7 +192,7 @@ license:CC0-1.0
- Asteroids (Alt)
+ Asteroids (alt)
19??
<unknown>
@@ -284,7 +284,7 @@ license:CC0-1.0
- BASIC Lessons (Alt)
+ BASIC Lessons (alt)
19??
<unknown>
@@ -317,7 +317,7 @@ license:CC0-1.0
- Battleship (Alt)
+ Battleship (alt)
19??
<unknown>
@@ -361,7 +361,7 @@ license:CC0-1.0
- Blank (Alt)
+ Blank (alt)
19??
<unknown>
@@ -1279,7 +1279,7 @@ license:CC0-1.0
- Draw 2 (Alt)
+ Draw 2 (alt)
19??
<unknown>
@@ -1436,7 +1436,7 @@ license:CC0-1.0
- FORTRAN Strings Source (Alt)
+ FORTRAN Strings Source (alt)
19??
<unknown>
@@ -1469,7 +1469,7 @@ license:CC0-1.0
- Galaxian (Alt)
+ Galaxian (alt)
19??
<unknown>
@@ -1641,7 +1641,7 @@ license:CC0-1.0
- Invaders (Alt)
+ Invaders (alt)
19??
<unknown>
@@ -1746,7 +1746,7 @@ license:CC0-1.0
- Life (Alt)
+ Life (alt)
19??
<unknown>
@@ -2418,7 +2418,7 @@ license:CC0-1.0
- Star Trek (Graham Epps, v30.8.80, Alt)
+ Star Trek (Graham Epps, v30.8.80, alt)
19??
Graham Epps
diff --git a/hash/digilog320.xml b/hash/digilog320.xml
index 5d8242d6c16..bcecc5fa6a5 100644
--- a/hash/digilog320.xml
+++ b/hash/digilog320.xml
@@ -3,7 +3,7 @@
-
+
+
+ Enkamichi Volume 8 (Japan) (EC0058-ENK)
+ 2001
+ Takara
+
+
+
+
+
+
+
J-Pop Mix Volume 25 (Japan) (EC0059-JPM)
diff --git a/hash/ekara_japan_d.xml b/hash/ekara_japan_d.xml
index 1df734ec4b8..bfe14188fb6 100644
--- a/hash/ekara_japan_d.xml
+++ b/hash/ekara_japan_d.xml
@@ -25,9 +25,9 @@ license:CC0-1.0
*D-3 DC0003-BHT Best Hit Volume 9
D-4 DC0004-TPJ TV Pop Junior Volume 8
*D-5 DC0005-TPJ TV Pop Junior Volume 9
- D-6 DC0006-BHT Best Hit Volume 10
+ *D-6 DC0006-BHT Best Hit Volume 10
D-7 DC0007-KID Kids' Song Volume 4 (volumes 1, 2 and 3 are in the main EC series)
- D-8 DC0008-BAT Best Artist (no volume number on cover)
+ *D-8 DC0008-BAT Best Artist Volume 7
D-9 DC0009-TPJ TV Pop Junior (no volume number on cover)
(more? what's the D highest number?)
@@ -92,4 +92,28 @@ license:CC0-1.0
+
+ Dream Cartridge: Best Hit Vol.10 (Japan) (DC0006-BHT)
+ 2004
+ Takara
+
+
+
+
+
+
+
+
+
+ Dream Cartridge: Best Artist Vol.7 (Japan) (DC0008-BAT)
+ 2004
+ Takara
+
+
+
+
+
+
+
+
diff --git a/hash/ekara_japan_sp.xml b/hash/ekara_japan_sp.xml
index f4912c1c544..b509f196172 100644
--- a/hash/ekara_japan_sp.xml
+++ b/hash/ekara_japan_sp.xml
@@ -30,7 +30,7 @@ license:CC0-1.0
*SP-03 'Super Cartridge' SP-03 TV Pop Junior
*SP-04 'Super Cartridge' SP-04 Best Hit
*SP-05 'Super Cartridge' SP-05 TV Pop Junior
- SP-06 'Super Cartridge' SP-06 TV Pop Junior
+ *SP-06 'Super Cartridge' SP-06 TV Pop Junior
SP-07 'Super Cartridge' SP-07 Best Hit
(more? what's the SP highest number? correct titles for each of these etc.)
@@ -102,4 +102,17 @@ license:CC0-1.0
+
+ Super Cartridge: TV Pop Junior (Japan) (SP-06)
+ 2004
+ Takara
+
+
+
+
+
+
+
+
+
diff --git a/hash/h88_cass.xml b/hash/h88_cass.xml
new file mode 100644
index 00000000000..25dd090a262
--- /dev/null
+++ b/hash/h88_cass.xml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+ BUG-8 02.05.00
+ 1978
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BUG-8 02.06.00
+ 1978
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extended Benton Harbor Basic 10.05.00
+ 1978
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extended Benton Harbor Basic 10.05.01
+ 1978
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extended Benton Harbor Basic 10.06.00
+ 1979
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Heath H8 Assembler 04.05.00
+ 1978
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Heath H8 Assembler 04.06.00
+ 1979
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Heath/Wintek H8 Editor 03.05.00
+ 1979
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Heath/Wintek H8 Editor 03.06.00
+ 1979
+ Heath Corp.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hash/intv.xml b/hash/intv.xml
index 853b798fa3b..4dce15daab4 100644
--- a/hash/intv.xml
+++ b/hash/intv.xml
@@ -11,7 +11,7 @@ license:CC0-1.0
-->
-
+
ABPA Backgammon
diff --git a/hash/rainbow.xml b/hash/rainbow.xml
index 4aacc572848..dbe7cec33ca 100644
--- a/hash/rainbow.xml
+++ b/hash/rainbow.xml
@@ -6,7 +6,7 @@ license:CC0-1.0
Software from here: http://rainbow-100.com
-->
-
+
Concurrent CP/M-86
198?
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index a048bc78ab9..8d7079b3ba2 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -1525,6 +1525,8 @@ if (BUSES["IDPARTNER"]~=null) then
MAME_DIR .. "src/devices/bus/idpartner/bus.h",
MAME_DIR .. "src/devices/bus/idpartner/gdp.cpp",
MAME_DIR .. "src/devices/bus/idpartner/gdp.h",
+ MAME_DIR .. "src/devices/bus/idpartner/sasi.cpp",
+ MAME_DIR .. "src/devices/bus/idpartner/sasi.h",
}
end
@@ -3214,6 +3216,8 @@ if (BUSES["RS232"]~=null) then
MAME_DIR .. "src/devices/bus/rs232/rs232.h",
MAME_DIR .. "src/devices/bus/rs232/rs232_sync_io.cpp",
MAME_DIR .. "src/devices/bus/rs232/rs232_sync_io.h",
+ MAME_DIR .. "src/devices/bus/rs232/scorpion.cpp",
+ MAME_DIR .. "src/devices/bus/rs232/scorpion.h",
MAME_DIR .. "src/devices/bus/rs232/sun_kbd.cpp",
MAME_DIR .. "src/devices/bus/rs232/sun_kbd.h",
MAME_DIR .. "src/devices/bus/rs232/swtpc8212.cpp",
@@ -4721,6 +4725,8 @@ if (BUSES["SPECTRUM"]~=null) then
MAME_DIR .. "src/devices/bus/spectrum/usource.h",
MAME_DIR .. "src/devices/bus/spectrum/uspeech.cpp",
MAME_DIR .. "src/devices/bus/spectrum/uspeech.h",
+ MAME_DIR .. "src/devices/bus/spectrum/vtx5000.cpp",
+ MAME_DIR .. "src/devices/bus/spectrum/vtx5000.h",
MAME_DIR .. "src/devices/bus/spectrum/wafa.cpp",
MAME_DIR .. "src/devices/bus/spectrum/wafa.h",
}
@@ -5510,6 +5516,8 @@ if (BUSES["PCI"]~=null) then
MAME_DIR .. "src/devices/bus/pci/sw1000xg.h",
MAME_DIR .. "src/devices/bus/pci/virge_pci.cpp",
MAME_DIR .. "src/devices/bus/pci/virge_pci.h",
+ MAME_DIR .. "src/devices/bus/pci/vt6306.cpp",
+ MAME_DIR .. "src/devices/bus/pci/vt6306.h",
MAME_DIR .. "src/devices/bus/pci/wd9710_pci.cpp",
MAME_DIR .. "src/devices/bus/pci/wd9710_pci.h",
MAME_DIR .. "src/devices/bus/pci/ymp21.cpp",
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 21946964984..881e4ca7338 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -897,8 +897,6 @@ if CPUS["SH"] then
MAME_DIR .. "src/devices/cpu/sh/sh7032.h",
MAME_DIR .. "src/devices/cpu/sh/sh7042.cpp",
MAME_DIR .. "src/devices/cpu/sh/sh7042.h",
- MAME_DIR .. "src/devices/cpu/sh/sh_adc.h",
- MAME_DIR .. "src/devices/cpu/sh/sh_adc.cpp",
MAME_DIR .. "src/devices/cpu/sh/sh7604_bus.cpp",
MAME_DIR .. "src/devices/cpu/sh/sh7604_bus.h",
MAME_DIR .. "src/devices/cpu/sh/sh7604_sci.cpp",
diff --git a/scripts/src/video.lua b/scripts/src/video.lua
index edac07a927f..825ff9b08a9 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -619,13 +619,13 @@ end
--------------------------------------------------
--
---@src/devices/video/lc7582.h,VIDEOS["LC7582"] = true
+--@src/devices/video/lc7580.h,VIDEOS["LC7580"] = true
--------------------------------------------------
-if (VIDEOS["LC7582"]~=null) then
+if (VIDEOS["LC7580"]~=null) then
files {
- MAME_DIR .. "src/devices/video/lc7582.cpp",
- MAME_DIR .. "src/devices/video/lc7582.h",
+ MAME_DIR .. "src/devices/video/lc7580.cpp",
+ MAME_DIR .. "src/devices/video/lc7580.h",
}
end
diff --git a/src/devices/bus/coco/dragon_serial.cpp b/src/devices/bus/coco/dragon_serial.cpp
index cb9127959b5..85a5808ca91 100644
--- a/src/devices/bus/coco/dragon_serial.cpp
+++ b/src/devices/bus/coco/dragon_serial.cpp
@@ -8,75 +8,64 @@
includes a through port for DOS cartridges.
TODO:
- - RX/TX rate set by dipswitches (default 100001/001001?), for use with a 1200/75 modem.
- add throughport, not known how CTS/SCS lines are switched between slots.
***************************************************************************/
#include "emu.h"
#include "dragon_serial.h"
+#include "machine/6850acia.h"
#include "machine/clock.h"
#include "bus/rs232/rs232.h"
-//-------------------------------------------------
-// ROM( dragon_serial )
-//-------------------------------------------------
+namespace {
-ROM_START(dragon_serial)
- ROM_REGION(0x2000, "eprom", 0)
- ROM_LOAD("comron_peaksoft.rom", 0x0000, 0x2000, CRC(9d18cf46) SHA1(14124dfb4bd78d1907e80d779cd7f3bae30564c9))
-ROM_END
+class dragon_serial_device : public device_t, public device_cococart_interface
+{
+public:
+ dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, DRAGON_SERIAL, tag, owner, clock)
+ , device_cococart_interface(mconfig, *this )
+ , m_eprom(*this, "eprom")
+ , m_acia(*this, "acia")
+ {
+ }
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
+protected:
+ // device_t overrides
+ virtual void device_start() override { }
+ virtual u8 *get_cart_base() override { return m_eprom->base(); }
+ virtual memory_region *get_cart_memregion() override { return m_eprom; }
-DEFINE_DEVICE_TYPE(DRAGON_SERIAL, dragon_serial_device, "dragon_serial", "Dragon Peaksoft Prestel Module")
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual u8 cts_read(offs_t offset) override;
+ virtual u8 scs_read(offs_t offset) override;
+ virtual void scs_write(offs_t offset, u8 data) override;
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
+private:
+ required_memory_region m_eprom;
+ required_device m_acia;
+};
-//-------------------------------------------------
-// dragon_serial_device - constructor
-//-------------------------------------------------
-
-dragon_serial_device::dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, DRAGON_SERIAL, tag, owner, clock)
- , device_cococart_interface(mconfig, *this )
- , m_eprom(*this, "eprom")
- , m_acia(*this, "acia")
-{
-}
//-------------------------------------------------
-// device_start - device-specific startup
+// ROM( dragon_serial )
//-------------------------------------------------
-void dragon_serial_device::device_start()
-{
- set_line_value(line::CART, line_value::Q);
-}
-
-//-------------------------------------------------
-// dragon_serial_device::get_cart_base
-//-------------------------------------------------
+ROM_START(dragon_serial)
+ ROM_REGION(0x2000, "eprom", 0)
+ ROM_LOAD("comron_peaksoft.rom", 0x0000, 0x2000, CRC(9d18cf46) SHA1(14124dfb4bd78d1907e80d779cd7f3bae30564c9))
+ROM_END
-u8 *dragon_serial_device::get_cart_base()
+const tiny_rom_entry *dragon_serial_device::device_rom_region() const
{
- return m_eprom->base();
+ return ROM_NAME( dragon_serial );
}
-//-------------------------------------------------
-// dragon_serial_device::get_cart_memregion
-//-------------------------------------------------
-
-memory_region *dragon_serial_device::get_cart_memregion()
-{
- return m_eprom;
-}
//-------------------------------------------------
// device_add_mconfig - add device configuration
@@ -89,23 +78,18 @@ void dragon_serial_device::device_add_mconfig(machine_config &config)
m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts));
m_acia->irq_handler().set([this](int state) { set_line_value(line::NMI, state); });
- clock_device &acia_clock(CLOCK(config, "acia_clock", 2.4576_MHz_XTAL));
- acia_clock.signal_handler().set(FUNC(dragon_serial_device::write_acia_clock));
+ clock_device &rx_clock(CLOCK(config, "rx_clock", 2.4576_MHz_XTAL / 32)); // 1200 baud
+ rx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_rxc));
+
+ clock_device &tx_clock(CLOCK(config, "tx_clock", 2.4576_MHz_XTAL / 512)); // 75 baud
+ tx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "null_modem"));
rs232.rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
rs232.cts_handler().set(m_acia, FUNC(acia6850_device::write_cts));
- rs232.dcd_handler().set(m_acia, FUNC(acia6850_device::write_dcd));
+ rs232.dcd_handler().set(m_acia, FUNC(acia6850_device::write_dcd)).invert();
}
-//-------------------------------------------------
-// rom_region - device-specific ROM region
-//-------------------------------------------------
-
-const tiny_rom_entry *dragon_serial_device::device_rom_region() const
-{
- return ROM_NAME( dragon_serial );
-}
//-------------------------------------------------
// cts_read
@@ -130,6 +114,7 @@ u8 dragon_serial_device::scs_read(offs_t offset)
result = m_acia->read(offset & 1);
break;
}
+
return result;
}
@@ -147,8 +132,7 @@ void dragon_serial_device::scs_write(offs_t offset, u8 data)
}
}
-void dragon_serial_device::write_acia_clock(int state)
-{
- m_acia->write_txc(state);
- m_acia->write_rxc(state);
-}
+} // anonymous namespace
+
+
+DEFINE_DEVICE_TYPE_PRIVATE(DRAGON_SERIAL, device_cococart_interface, dragon_serial_device, "dragon_serial", "Dragon Peaksoft Prestel Module")
diff --git a/src/devices/bus/coco/dragon_serial.h b/src/devices/bus/coco/dragon_serial.h
index 0dcb75b6575..5bd93f7e930 100644
--- a/src/devices/bus/coco/dragon_serial.h
+++ b/src/devices/bus/coco/dragon_serial.h
@@ -6,47 +6,8 @@
#pragma once
#include "cococart.h"
-#include "machine/6850acia.h"
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-// ======================> dragon_serial_device
-
-class dragon_serial_device :
- public device_t,
- public device_cococart_interface
-{
-public:
- // construction/destruction
- dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
-
- static constexpr feature_type imperfect_features() { return feature::COMMS; }
-
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual u8 *get_cart_base() override;
- virtual memory_region *get_cart_memregion() override;
-
- // optional information overrides
- virtual void device_add_mconfig(machine_config &config) override;
- virtual const tiny_rom_entry *device_rom_region() const override;
-
- virtual u8 cts_read(offs_t offset) override;
- virtual u8 scs_read(offs_t offset) override;
- virtual void scs_write(offs_t offset, u8 data) override;
-
-private:
- void write_acia_clock(int state);
-
- required_memory_region m_eprom;
- required_device m_acia;
-};
-
-
-// device type definition
-DECLARE_DEVICE_TYPE(DRAGON_SERIAL, dragon_serial_device)
+DECLARE_DEVICE_TYPE(DRAGON_SERIAL, device_cococart_interface)
#endif // MAME_BUS_COCO_DRAGON_SERIAL_H
diff --git a/src/devices/bus/idpartner/bus.cpp b/src/devices/bus/idpartner/bus.cpp
index abf2535bcfc..6b82488062a 100644
--- a/src/devices/bus/idpartner/bus.cpp
+++ b/src/devices/bus/idpartner/bus.cpp
@@ -59,6 +59,7 @@ bus_device::bus_device(const machine_config &mconfig, const char *tag, device_t
, m_io(*this, finder_base::DUMMY_TAG, -1)
, m_int_handler(*this)
, m_nmi_handler(*this)
+ , m_drq_handler(*this)
{
}
@@ -77,8 +78,10 @@ void bus_device::device_reset()
} // namespace bus::idpartner
#include "gdp.h"
+#include "sasi.h"
void idpartner_exp_devices(device_slot_interface &device)
{
device.option_add("gdp", IDPARTNER_GDP);
+ device.option_add("sasi", IDPARTNER_SASI);
}
diff --git a/src/devices/bus/idpartner/bus.h b/src/devices/bus/idpartner/bus.h
index 9b23b58b32c..0ac5cc6cb47 100644
--- a/src/devices/bus/idpartner/bus.h
+++ b/src/devices/bus/idpartner/bus.h
@@ -93,10 +93,12 @@ class bus_device : public device_t
// callbacks
auto int_handler() { return m_int_handler.bind(); }
auto nmi_handler() { return m_nmi_handler.bind(); }
+ auto drq_handler() { return m_drq_handler.bind(); }
// called from expansion device
void int_w(int state) { m_int_handler(state); }
void nmi_w(int state) { m_nmi_handler(state); }
+ void drq_w(int state) { m_drq_handler(state); }
address_space &io() { return *m_io; }
@@ -110,6 +112,7 @@ class bus_device : public device_t
devcb_write_line m_int_handler;
devcb_write_line m_nmi_handler;
+ devcb_write_line m_drq_handler;
};
// ======================> device_exp_card_interface
diff --git a/src/devices/bus/idpartner/sasi.cpp b/src/devices/bus/idpartner/sasi.cpp
new file mode 100644
index 00000000000..8895c889e23
--- /dev/null
+++ b/src/devices/bus/idpartner/sasi.cpp
@@ -0,0 +1,134 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/**********************************************************************
+
+ Iskra Delta SASI Adapter
+
+**********************************************************************/
+
+#include "emu.h"
+#include "sasi.h"
+
+#include "bus/nscsi/devices.h"
+#include "machine/nscsi_bus.h"
+#include "machine/nscsi_cb.h"
+
+namespace {
+
+class idpartner_sasi_device :
+ public device_t,
+ public bus::idpartner::device_exp_card_interface
+{
+public:
+ // construction/destruction
+ idpartner_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ // device_t implementation
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ u8 stat_r();
+ u8 data_r();
+ void ctrl_w(u8 data);
+ void data_w(u8 data);
+ void reset_w(u8 data);
+
+ void req_w(int state);
+
+private:
+ required_device m_sasibus;
+ required_device m_sasi;
+
+ int m_drq_enable;
+ int m_data_enable;
+};
+
+
+idpartner_sasi_device::idpartner_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, IDPARTNER_SASI, tag, owner, clock)
+ , bus::idpartner::device_exp_card_interface(mconfig, *this)
+ , m_sasibus(*this, "sasibus")
+ , m_sasi(*this, "sasibus:7:scsicb")
+ , m_drq_enable(0)
+ , m_data_enable(0)
+{
+}
+
+/*----------------------------------
+ device_t implementation
+----------------------------------*/
+
+void idpartner_sasi_device::device_start()
+{
+ m_bus->io().install_read_handler (0x10, 0x10, emu::rw_delegate(*this, FUNC(idpartner_sasi_device::stat_r))); // RDSTAT
+ m_bus->io().install_read_handler (0x11, 0x11, emu::rw_delegate(*this, FUNC(idpartner_sasi_device::data_r))); // RDDATA
+ m_bus->io().install_write_handler(0x10, 0x10, emu::rw_delegate(*this, FUNC(idpartner_sasi_device::ctrl_w))); // WRCONTR
+ m_bus->io().install_write_handler(0x11, 0x11, emu::rw_delegate(*this, FUNC(idpartner_sasi_device::data_w))); // WRDATA
+ m_bus->io().install_write_handler(0x12, 0x12, emu::rw_delegate(*this, FUNC(idpartner_sasi_device::reset_w))); // RESET
+}
+
+void idpartner_sasi_device::device_reset()
+{
+}
+
+u8 idpartner_sasi_device::stat_r()
+{
+ u8 data = (m_sasi->req_r() << 7)
+ | (m_sasi->io_r() << 6)
+ | (m_sasi->msg_r() << 5)
+ | (m_sasi->cd_r() << 4)
+ | (m_sasi->bsy_r() << 3);
+ return data;
+}
+
+u8 idpartner_sasi_device::data_r()
+{
+ u8 data = m_sasi->read();
+ if (m_data_enable) {
+ m_sasi->ack_w(1);
+ }
+ return data;
+}
+
+void idpartner_sasi_device::ctrl_w(u8 data)
+{
+ m_sasi->write(BIT(data,0));
+ m_sasi->sel_w(BIT(data,0));
+ m_data_enable = BIT(data,1);
+ m_drq_enable = BIT(data,5);
+}
+
+void idpartner_sasi_device::data_w(u8 data)
+{
+ m_sasi->write(data);
+ if (m_data_enable) {
+ m_sasi->ack_w(1);
+ }
+}
+
+void idpartner_sasi_device::reset_w(u8 data)
+{
+ m_sasi->rst_w(1);
+ m_sasi->rst_w(0);
+}
+
+void idpartner_sasi_device::req_w(int state)
+{
+ m_sasi->ack_w(0);
+}
+
+void idpartner_sasi_device::device_add_mconfig(machine_config &config)
+{
+ NSCSI_BUS(config, m_sasibus);
+ NSCSI_CONNECTOR(config, "sasibus:0", default_scsi_devices, "s1410", true);
+ NSCSI_CONNECTOR(config, "sasibus:7", default_scsi_devices, "scsicb", true)
+ .option_add_internal("scsicb", NSCSI_CB)
+ .machine_config([this](device_t* device) {
+ downcast(*device).req_callback().set(*this, FUNC(idpartner_sasi_device::req_w));
+ });
+ }
+} // anonymous namespace
+
+DEFINE_DEVICE_TYPE_PRIVATE(IDPARTNER_SASI, bus::idpartner::device_exp_card_interface, idpartner_sasi_device, "partner_sai", "Iskra Delta Partner SASI card")
diff --git a/src/devices/bus/idpartner/sasi.h b/src/devices/bus/idpartner/sasi.h
new file mode 100644
index 00000000000..645c8baed3d
--- /dev/null
+++ b/src/devices/bus/idpartner/sasi.h
@@ -0,0 +1,12 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+#ifndef MAME_BUS_IDPARTNER_SASI_H
+#define MAME_BUS_IDPARTNER_SASI_H
+
+#pragma once
+
+#include "bus.h"
+
+DECLARE_DEVICE_TYPE_NS(IDPARTNER_SASI, bus::idpartner, device_exp_card_interface)
+
+#endif // MAME_BUS_IDPARTNER_SASI_H
diff --git a/src/devices/bus/pci/pci_slot.cpp b/src/devices/bus/pci/pci_slot.cpp
index ac99f1b12cd..43b84f55405 100644
--- a/src/devices/bus/pci/pci_slot.cpp
+++ b/src/devices/bus/pci/pci_slot.cpp
@@ -22,6 +22,7 @@
#include "sonicvibes.h"
#include "sw1000xg.h"
#include "virge_pci.h"
+#include "vt6306.h"
#include "wd9710_pci.h"
#include "zr36057.h"
@@ -143,6 +144,7 @@ void pci_cards(device_slot_interface &device)
// 0x0a - docking stations
// 0x0b - processors
// 0x0c - Serial Bus controllers
+ device.option_add("vt6306", VT6306_PCI);
device.option_add("opti82c861", OPTI_82C861);
// 0x0d - wireless controllers
diff --git a/src/devices/bus/pci/vt6306.cpp b/src/devices/bus/pci/vt6306.cpp
new file mode 100644
index 00000000000..a68bace280d
--- /dev/null
+++ b/src/devices/bus/pci/vt6306.cpp
@@ -0,0 +1,97 @@
+// license:BSD-3-Clause
+// copyright-holders:
+/**************************************************************************************************
+
+VIA VT6306 generic FireWire IEEE 1394a card
+
+- paired with USB 2.0 controller on a Sunix UFC3212V 4x USB 3x Firewire card
+ (as multifunction, at .3 while USB takes .0/.1/.2)
+- midway/midzeus.cpp crusnexo/thegrid uses regular IEEE 1394 ports.
+- skeleton/pegasos2.cpp uses an on-board version of this.
+- PHY has default vendor ID=0x004063, device ID=306000, Compliance Level=1
+
+**************************************************************************************************/
+
+#include "emu.h"
+#include "vt6306.h"
+
+#define LOG_WARN (1U << 1)
+
+#define VERBOSE (LOG_GENERAL | LOG_WARN)
+//#define LOG_OUTPUT_FUNC osd_printf_info
+#include "logmacro.h"
+
+#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__)
+
+
+DEFINE_DEVICE_TYPE(VT6306_PCI, vt6306_device, "vt6306", "VT6306 VIA Fire II IEEE-1394a OHCI Link Layer Controller")
+
+
+
+vt6306_device::vt6306_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : pci_card_device(mconfig, type, tag, owner, clock)
+{
+ set_ids(0x11063044, 0x00, 0x0c0010, 0x11063044);
+ // Sunix UFC3212V has these values
+// set_ids(0x11063044, 0x46, 0x0c0010, 0x1106e8c1);
+}
+
+vt6306_device::vt6306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : vt6306_device(mconfig, VT6306_PCI, tag, owner, clock)
+{
+}
+
+void vt6306_device::device_add_mconfig(machine_config &config)
+{
+
+}
+
+void vt6306_device::device_start()
+{
+ pci_card_device::device_start();
+
+ add_map(2048, M_MEM, FUNC(vt6306_device::ohci_mmio_map));
+ add_map( 128, M_IO, FUNC(vt6306_device::vio_map));
+// add_map( 256, M_MEM, FUNC(vt6306_device::cardbus_map));
+
+ // INTA#
+ intr_pin = 1;
+
+ // TODO: min_gnt = 0x00, max_lat = 0x20
+}
+
+void vt6306_device::device_reset()
+{
+ pci_card_device::device_reset();
+
+ command = 0x0000;
+ // doc claims not having an I/O space but real HW pci.exe proved otherwise
+ command_mask = 7;
+ // Fast Back-to-Back, medium DEVSEL#
+ status = 0x0280;
+
+ remap_cb();
+}
+
+u8 vt6306_device::capptr_r()
+{
+ return 0x50;
+}
+
+void vt6306_device::config_map(address_map &map)
+{
+ pci_card_device::config_map(map);
+// map(0x40, 0x43) PCI HCI Control (?)
+ // ACPI
+ map(0x50, 0x50).lr8(NAME([] () { return 0x01; }));
+ map(0x51, 0x51).lr8(NAME([] () { return 0x00; })); // NULL pointer
+// map(0x52, 0x57) PCI Power Management v1.1
+}
+
+void vt6306_device::ohci_mmio_map(address_map &map)
+{
+}
+
+void vt6306_device::vio_map(address_map &map)
+{
+}
diff --git a/src/devices/bus/pci/vt6306.h b/src/devices/bus/pci/vt6306.h
new file mode 100644
index 00000000000..ea8ea0f953d
--- /dev/null
+++ b/src/devices/bus/pci/vt6306.h
@@ -0,0 +1,38 @@
+// license:BSD-3-Clause
+// copyright-holders:
+
+#ifndef MAME_BUS_PCI_VT6306_H
+#define MAME_BUS_PCI_VT6306_H
+
+#pragma once
+
+#include "pci_slot.h"
+
+class vt6306_device : public pci_card_device
+{
+public:
+ vt6306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ vt6306_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+// virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
+// uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
+
+ virtual void config_map(address_map &map) override;
+
+private:
+ void ohci_mmio_map(address_map &map);
+ void vio_map(address_map &map);
+
+ virtual u8 capptr_r() override;
+
+};
+
+DECLARE_DEVICE_TYPE(VT6306_PCI, vt6306_device)
+
+#endif // MAME_BUS_PCI_VT6306_H
diff --git a/src/devices/bus/rs232/rs232.cpp b/src/devices/bus/rs232/rs232.cpp
index e85a15dd275..4fc49cea61b 100644
--- a/src/devices/bus/rs232/rs232.cpp
+++ b/src/devices/bus/rs232/rs232.cpp
@@ -163,6 +163,7 @@ device_rs232_port_interface::~device_rs232_port_interface()
#include "printer.h"
#include "pty.h"
#include "rs232_sync_io.h"
+#include "scorpion.h"
#include "sun_kbd.h"
#include "swtpc8212.h"
#include "terminal.h"
@@ -183,6 +184,7 @@ void default_rs232_devices(device_slot_interface &device)
device.option_add("pty", PSEUDO_TERMINAL);
device.option_add("rs232_sync_io", RS232_SYNC_IO);
device.option_add("rs_printer", RADIO_SHACK_SERIAL_PRINTER);
+ device.option_add("scorpion", SCORPION_IC);
device.option_add("sunkbd", SUN_KBD_ADAPTOR);
device.option_add("swtpc8212", SERIAL_TERMINAL_SWTPC8212);
device.option_add("terminal", SERIAL_TERMINAL);
diff --git a/src/devices/bus/rs232/scorpion.cpp b/src/devices/bus/rs232/scorpion.cpp
new file mode 100644
index 00000000000..e32f0a2b12c
--- /dev/null
+++ b/src/devices/bus/rs232/scorpion.cpp
@@ -0,0 +1,199 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+/******************************************************************************
+
+ Micro-Robotics Scorpion Intelligent Controller
+
+ Specification:
+ - 6303 CMOS micro-processor, 1.23 MHz operation
+ - 24K RAM with battery backup
+ - 32K system ROM
+ - clock calendar
+
+ Programming requirements:
+ A computer with a serial port capable of running at 9600 baud, supporting a
+ terminal emulator preferably conforming to VT52 or VT100 standards.
+
+ Note: Use with BBC Micro with Scorpion Terminal Emulator ROM.
+
+ TODO:
+ - verify serial handshaking
+ - LCD display
+ - 20 key keypad
+
+******************************************************************************/
+
+#include "emu.h"
+#include "scorpion.h"
+
+#include "cpu/m6800/m6801.h"
+#include "machine/nvram.h"
+#include "machine/pcf8573.h"
+
+
+#define LOG_PORT2 (1U << 1)
+#define LOG_PORT5 (1U << 2)
+#define LOG_PORT6 (1U << 3)
+#define LOG_PORT7 (1U << 4)
+
+#define VERBOSE (0)
+#include "logmacro.h"
+
+
+namespace {
+
+class scorpion_ic_device : public device_t, public device_rs232_port_interface
+{
+public:
+ scorpion_ic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, SCORPION_IC, tag, owner, clock)
+ , device_rs232_port_interface(mconfig, *this)
+ , m_maincpu(*this, "maincpu")
+ , m_rombank(*this, "rombank")
+ , m_rtc(*this, "rtc")
+ , m_txd(0)
+ , m_rts(0)
+ {
+ }
+
+ virtual void input_txd(int state) override { m_txd = state; }
+ virtual void input_rts(int state) override { m_rts = state; }
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ required_device m_maincpu;
+ required_memory_bank m_rombank;
+ required_device m_rtc;
+
+ void scorpion_map(address_map &map);
+
+ uint8_t port2_r();
+ uint8_t port5_r();
+ uint8_t port6_r();
+ void port6_w(uint8_t data);
+ void port7_w(uint8_t data);
+
+ int m_txd;
+ int m_rts;
+};
+
+
+void scorpion_ic_device::device_start()
+{
+ m_rombank->configure_entries(0, 2, memregion("sys_rom")->base(), 0x4000);
+}
+
+void scorpion_ic_device::device_reset()
+{
+ m_rombank->set_entry(0);
+
+ output_cts(0);
+}
+
+
+ROM_START( scorpion )
+ ROM_REGION(0x8000, "sys_rom", 0)
+ ROM_SYSTEM_BIOS(0, "61203", "Version 61203 (3rd Dec 1986)")
+ ROMX_LOAD("scorpion_61203.bin", 0x0000, 0x8000, CRC(4ff495d1) SHA1(91c273c94cd0dbca655e192dd01ac6dc3a4f60a8), ROM_BIOS(0))
+
+ ROM_REGION(0x4000, "exp_rom", ROMREGION_ERASE00)
+ROM_END
+
+const tiny_rom_entry *scorpion_ic_device::device_rom_region() const
+{
+ return ROM_NAME( scorpion );
+}
+
+
+void scorpion_ic_device::scorpion_map(address_map &map)
+{
+ map(0x07f0, 0x07f0).nopr(); // ??
+ map(0x0bf0, 0x0bf0).nopr(); // ??
+ map(0x0ef0, 0x0ef0).nopr(); // ??
+ map(0x0fb0, 0x0fb0).nopr(); // ??
+ map(0x0fe0, 0x0fe0).nopr(); // ??
+ map(0x2000, 0x7fff).ram().share("nvram");
+ map(0x8000, 0xbfff).rom().region("exp_rom", 0);
+ map(0xc000, 0xffff).bankr("rombank").nopw();
+}
+
+
+void scorpion_ic_device::device_add_mconfig(machine_config &config)
+{
+ HD6303X(config, m_maincpu, 4.9152_MHz_XTAL); // TODO: verify clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &scorpion_ic_device::scorpion_map);
+ m_maincpu->in_p2_cb().set(FUNC(scorpion_ic_device::port2_r));
+ //m_maincpu->out_p2_cb().set([this](uint8_t data) { logerror("%s port2_w: %02x\n", machine().describe_context(), data); } );
+ m_maincpu->in_p5_cb().set(FUNC(scorpion_ic_device::port5_r));
+ m_maincpu->in_p6_cb().set(FUNC(scorpion_ic_device::port6_r));
+ m_maincpu->out_p6_cb().set(FUNC(scorpion_ic_device::port6_w));
+ m_maincpu->out_p7_cb().set(FUNC(scorpion_ic_device::port7_w));
+ m_maincpu->out_ser_tx_cb().set(FUNC(scorpion_ic_device::output_rxd));
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
+ PCF8573(config, m_rtc, 32.768_kHz_XTAL);
+}
+
+
+uint8_t scorpion_ic_device::port2_r()
+{
+ uint8_t data = 0xf7;
+
+ data |= m_txd << 3;
+
+ if (!machine().side_effects_disabled())
+ LOGMASKED(LOG_PORT2, "%s port2_r: %02x\n", machine().describe_context(), data);
+
+ return data;
+}
+
+uint8_t scorpion_ic_device::port5_r()
+{
+ uint8_t data = 0xef;
+
+ data |= m_rts << 4;
+
+ if (!machine().side_effects_disabled())
+ LOGMASKED(LOG_PORT5, "%s port5_r: %02x\n", machine().describe_context(), data);
+
+ return data;
+}
+
+uint8_t scorpion_ic_device::port6_r()
+{
+ uint8_t data = 0x00;
+
+ data |= m_rtc->sda_r() << 3;
+
+ if (!machine().side_effects_disabled())
+ LOGMASKED(LOG_PORT6, "%s port6_r: %02x\n", machine().describe_context(), data);
+
+ return data;
+}
+
+void scorpion_ic_device::port6_w(uint8_t data)
+{
+ LOGMASKED(LOG_PORT6, "%s port6_w: %02x\n", machine().describe_context(), data);
+
+ m_rtc->sda_w(BIT(data, 3));
+ m_rtc->scl_w(BIT(data, 4));
+
+ m_rombank->set_entry(BIT(data, 6));
+}
+
+void scorpion_ic_device::port7_w(uint8_t data)
+{
+ LOGMASKED(LOG_PORT7, "%s port7_w: %02x\n", machine().describe_context(), data);
+}
+
+} // anonymous namespace
+
+
+DEFINE_DEVICE_TYPE_PRIVATE(SCORPION_IC, device_rs232_port_interface, scorpion_ic_device, "scorpion_ic", "Micro-Robotics Scorpion Intelligent Controller")
diff --git a/src/devices/bus/rs232/scorpion.h b/src/devices/bus/rs232/scorpion.h
new file mode 100644
index 00000000000..81f02159458
--- /dev/null
+++ b/src/devices/bus/rs232/scorpion.h
@@ -0,0 +1,13 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+#ifndef MAME_BUS_RS232_SCORPION_H
+#define MAME_BUS_RS232_SCORPION_H
+
+#pragma once
+
+#include "rs232.h"
+
+
+DECLARE_DEVICE_TYPE(SCORPION_IC, device_rs232_port_interface)
+
+#endif // MAME_BUS_RS232_SCORPION_H
diff --git a/src/devices/bus/spectrum/beta.cpp b/src/devices/bus/spectrum/beta.cpp
index 539b1e38161..c159b625df7 100644
--- a/src/devices/bus/spectrum/beta.cpp
+++ b/src/devices/bus/spectrum/beta.cpp
@@ -477,9 +477,9 @@ void spectrum_betav2_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_betav2_device::romcs()
+bool spectrum_betav2_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_betav2_device::fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/beta.h b/src/devices/bus/spectrum/beta.h
index 3118ab81874..3dac22f95d3 100644
--- a/src/devices/bus/spectrum/beta.h
+++ b/src/devices/bus/spectrum/beta.h
@@ -47,7 +47,7 @@ class spectrum_betav2_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
@@ -59,7 +59,7 @@ class spectrum_betav2_device :
required_device_array m_floppy;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
u8 m_masterdisable;
u8 m_control;
bool m_motor_active;
@@ -153,7 +153,7 @@ class spectrum_gamma_device :
virtual const tiny_rom_entry *device_rom_region() const override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override { return 1; }
+ virtual bool romcs() override { return 1; }
required_device m_ppi;
required_device m_acia;
diff --git a/src/devices/bus/spectrum/beta128.cpp b/src/devices/bus/spectrum/beta128.cpp
index de6726e260f..b97159c46fc 100644
--- a/src/devices/bus/spectrum/beta128.cpp
+++ b/src/devices/bus/spectrum/beta128.cpp
@@ -177,9 +177,9 @@ void spectrum_beta128_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_beta128_device::romcs()
+bool spectrum_beta128_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
diff --git a/src/devices/bus/spectrum/beta128.h b/src/devices/bus/spectrum/beta128.h
index ab870aefc35..3201e9ecf6e 100644
--- a/src/devices/bus/spectrum/beta128.h
+++ b/src/devices/bus/spectrum/beta128.h
@@ -43,7 +43,7 @@ class spectrum_beta128_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
@@ -57,7 +57,7 @@ class spectrum_beta128_device :
required_device m_exp;
required_ioport m_switch;
- int m_romcs;
+ bool m_romcs;
u8 m_control;
bool m_motor_active;
bool m_128rom_bit;
diff --git a/src/devices/bus/spectrum/d40.cpp b/src/devices/bus/spectrum/d40.cpp
index 89f0417c681..f7c5f5c28ed 100644
--- a/src/devices/bus/spectrum/d40.cpp
+++ b/src/devices/bus/spectrum/d40.cpp
@@ -211,7 +211,7 @@ void spectrum_d40base_device::device_reset()
// IMPLEMENTATION spectrum_d40base_device
//**************************************************************************
-int spectrum_d40base_device::romcs()
+bool spectrum_d40base_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/d40.h b/src/devices/bus/spectrum/d40.h
index f03c71cabbb..b3f3b856217 100644
--- a/src/devices/bus/spectrum/d40.h
+++ b/src/devices/bus/spectrum/d40.h
@@ -42,7 +42,7 @@ class spectrum_d40base_device: public device_t, public device_spectrum_expansion
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t fdc0_r(offs_t offset) { return 0xff; }
virtual uint8_t fdc1_r(offs_t offset) { return 0xff; }
@@ -54,7 +54,7 @@ class spectrum_d40base_device: public device_t, public device_spectrum_expansion
required_device m_ppi;
required_ioport m_snap;
- int m_romcs;
+ bool m_romcs;
uint8_t m_ram[2 * 1024];
int m_snap_flag;
int m_8255_reset;
diff --git a/src/devices/bus/spectrum/exp.cpp b/src/devices/bus/spectrum/exp.cpp
index 1f38862fa26..90015c8c72a 100644
--- a/src/devices/bus/spectrum/exp.cpp
+++ b/src/devices/bus/spectrum/exp.cpp
@@ -64,7 +64,7 @@ void spectrum_expansion_slot_device::device_start()
// romcs
//-------------------------------------------------
-int spectrum_expansion_slot_device::romcs()
+bool spectrum_expansion_slot_device::romcs()
{
if (m_card)
return m_card->romcs();
@@ -178,6 +178,7 @@ void spectrum_expansion_slot_device::mreq_w(offs_t offset, uint8_t data)
#include "uslot.h"
#include "usource.h"
#include "uspeech.h"
+#include "vtx5000.h"
#include "wafa.h"
void spectrum_expansion_devices(device_slot_interface &device)
@@ -228,6 +229,7 @@ void spectrum_expansion_devices(device_slot_interface &device)
device.option_add("uslot", SPECTRUM_USLOT);
device.option_add("usource", SPECTRUM_USOURCE);
device.option_add("uspeech", SPECTRUM_USPEECH);
+ device.option_add("vtx5000", SPECTRUM_VTX5000);
device.option_add("wafadrive", SPECTRUM_WAFA);
}
diff --git a/src/devices/bus/spectrum/exp.h b/src/devices/bus/spectrum/exp.h
index c2fade96fe8..677d23d6f9e 100644
--- a/src/devices/bus/spectrum/exp.h
+++ b/src/devices/bus/spectrum/exp.h
@@ -87,7 +87,7 @@ class spectrum_expansion_slot_device : public device_t, public device_single_car
void mreq_w(offs_t offset, uint8_t data);
uint8_t iorq_r(offs_t offset);
void iorq_w(offs_t offset, uint8_t data);
- int romcs();
+ bool romcs();
void irq_w(int state) { m_irq_handler(state); }
void nmi_w(int state) { m_nmi_handler(state); }
@@ -120,7 +120,7 @@ class device_spectrum_expansion_interface : public device_interface
virtual void mreq_w(offs_t offset, uint8_t data) { }
virtual uint8_t iorq_r(offs_t offset) { return offset & 1 ? m_slot->fb_r() : 0xff; }
virtual void iorq_w(offs_t offset, uint8_t data) { }
- virtual int romcs() { return 0; }
+ virtual bool romcs() { return 0; }
protected:
// construction/destruction
diff --git a/src/devices/bus/spectrum/floppyone.cpp b/src/devices/bus/spectrum/floppyone.cpp
index 9da83fcb015..063864764f1 100644
--- a/src/devices/bus/spectrum/floppyone.cpp
+++ b/src/devices/bus/spectrum/floppyone.cpp
@@ -195,9 +195,9 @@ void spectrum_flpone_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_flpone_device::romcs()
+bool spectrum_flpone_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_flpone_device::post_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/floppyone.h b/src/devices/bus/spectrum/floppyone.h
index 98820bc2973..1020dac7518 100644
--- a/src/devices/bus/spectrum/floppyone.h
+++ b/src/devices/bus/spectrum/floppyone.h
@@ -45,7 +45,7 @@ class spectrum_flpone_device :
virtual void post_opcode_fetch(offs_t offset) override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
@@ -66,7 +66,7 @@ class spectrum_flpone_device :
required_ioport m_sw1;
required_ioport m_sw2;
- int m_romcs, m_if1cs;
+ bool m_romcs, m_if1cs;
u8 m_ram[0x1000];
int m_busy;
uint8_t m_shifter;
diff --git a/src/devices/bus/spectrum/fuller.h b/src/devices/bus/spectrum/fuller.h
index 9c39738380a..70c776a81a2 100644
--- a/src/devices/bus/spectrum/fuller.h
+++ b/src/devices/bus/spectrum/fuller.h
@@ -47,7 +47,7 @@ class spectrum_fuller_device :
virtual void post_data_fetch(offs_t offset) override { m_exp->post_data_fetch(offset); }
virtual uint8_t mreq_r(offs_t offset) override { return m_exp->romcs() ? m_exp->mreq_r(offset) : 0xff; }
virtual void mreq_w(offs_t offset, uint8_t data) override { if (m_exp->romcs()) m_exp->mreq_w(offset, data); }
- virtual int romcs() override { return m_exp->romcs(); }
+ virtual bool romcs() override { return m_exp->romcs(); }
private:
required_device m_exp;
diff --git a/src/devices/bus/spectrum/intf1.cpp b/src/devices/bus/spectrum/intf1.cpp
index 9e6328eac86..f80a02723ef 100644
--- a/src/devices/bus/spectrum/intf1.cpp
+++ b/src/devices/bus/spectrum/intf1.cpp
@@ -105,9 +105,9 @@ void spectrum_intf1_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_intf1_device::romcs()
+bool spectrum_intf1_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
// the Interface 1 looks for specific bus conditions to enable / disable the expansion overlay ROM
diff --git a/src/devices/bus/spectrum/intf1.h b/src/devices/bus/spectrum/intf1.h
index eac6fd8ab87..bd40d12f25b 100644
--- a/src/devices/bus/spectrum/intf1.h
+++ b/src/devices/bus/spectrum/intf1.h
@@ -42,7 +42,7 @@ class spectrum_intf1_device:
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_data_fetch(offs_t offset) override { m_exp->pre_data_fetch(offset); }
@@ -56,7 +56,7 @@ class spectrum_intf1_device:
required_device m_mdv2;
required_memory_region m_rom;
- int m_romcs;
+ bool m_romcs;
};
diff --git a/src/devices/bus/spectrum/intf2.cpp b/src/devices/bus/spectrum/intf2.cpp
index c5bf565af97..514a7e42151 100644
--- a/src/devices/bus/spectrum/intf2.cpp
+++ b/src/devices/bus/spectrum/intf2.cpp
@@ -107,7 +107,7 @@ DEVICE_IMAGE_LOAD_MEMBER(spectrum_intf2_device::cart_load)
return std::make_pair(std::error_condition(), std::string());
}
-int spectrum_intf2_device::romcs()
+bool spectrum_intf2_device::romcs()
{
if (m_cart && m_cart->exists())
return 1;
diff --git a/src/devices/bus/spectrum/intf2.h b/src/devices/bus/spectrum/intf2.h
index 268e74e9573..cbb2a18ca45 100644
--- a/src/devices/bus/spectrum/intf2.h
+++ b/src/devices/bus/spectrum/intf2.h
@@ -34,7 +34,7 @@ class spectrum_intf2_device:
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
diff --git a/src/devices/bus/spectrum/kempdisc.cpp b/src/devices/bus/spectrum/kempdisc.cpp
index 2533863664f..059403959fa 100644
--- a/src/devices/bus/spectrum/kempdisc.cpp
+++ b/src/devices/bus/spectrum/kempdisc.cpp
@@ -162,9 +162,9 @@ void spectrum_kempdisc_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_kempdisc_device::romcs()
+bool spectrum_kempdisc_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
diff --git a/src/devices/bus/spectrum/kempdisc.h b/src/devices/bus/spectrum/kempdisc.h
index 5c92c77b818..9737da16887 100644
--- a/src/devices/bus/spectrum/kempdisc.h
+++ b/src/devices/bus/spectrum/kempdisc.h
@@ -41,7 +41,7 @@ class spectrum_kempdisc_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
@@ -55,7 +55,7 @@ class spectrum_kempdisc_device :
required_device_array m_floppy;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
// u8 m_control;
};
diff --git a/src/devices/bus/spectrum/logitek.cpp b/src/devices/bus/spectrum/logitek.cpp
index 3d8a9b457f3..cc93252fc55 100644
--- a/src/devices/bus/spectrum/logitek.cpp
+++ b/src/devices/bus/spectrum/logitek.cpp
@@ -127,7 +127,7 @@ void spectrum_proceed_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_proceed_device::romcs()
+bool spectrum_proceed_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/logitek.h b/src/devices/bus/spectrum/logitek.h
index a395c10230c..01236da2dde 100644
--- a/src/devices/bus/spectrum/logitek.h
+++ b/src/devices/bus/spectrum/logitek.h
@@ -50,7 +50,7 @@ class spectrum_proceed_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
required_memory_region m_rom;
required_device m_z80pio;
@@ -61,7 +61,7 @@ class spectrum_proceed_device :
void piob_w(uint8_t data);
uint8_t piob_r();
- int m_romcs;
+ bool m_romcs;
int m_romen;
};
diff --git a/src/devices/bus/spectrum/lprint.cpp b/src/devices/bus/spectrum/lprint.cpp
index 74f93cd5322..92b1e8d533e 100644
--- a/src/devices/bus/spectrum/lprint.cpp
+++ b/src/devices/bus/spectrum/lprint.cpp
@@ -251,7 +251,7 @@ void spectrum_kempcentre_device::device_reset()
// IMPLEMENTATION (lprint)
//**************************************************************************
-int spectrum_lprint_device::romcs()
+bool spectrum_lprint_device::romcs()
{
return m_romcs;
}
@@ -315,9 +315,9 @@ void spectrum_lprint_device::iorq_w(offs_t offset, uint8_t data)
// IMPLEMENTATION (lprint3)
//**************************************************************************
-int spectrum_lprint3_device::romcs()
+bool spectrum_lprint3_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
uint8_t spectrum_lprint3_device::iorq_r(offs_t offset)
@@ -414,7 +414,7 @@ void spectrum_kempcentrs_device::iorq_w(offs_t offset, uint8_t data)
// IMPLEMENTATION (kempcentre)
//**************************************************************************
-int spectrum_kempcentre_device::romcs()
+bool spectrum_kempcentre_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/lprint.h b/src/devices/bus/spectrum/lprint.h
index 448ba9830e8..f8a1f135096 100644
--- a/src/devices/bus/spectrum/lprint.h
+++ b/src/devices/bus/spectrum/lprint.h
@@ -39,14 +39,14 @@ class spectrum_lprint_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
void busy_w(int state) { m_busy = state; }
required_memory_region m_rom;
required_device m_centronics;
- int m_romcs;
+ bool m_romcs;
int m_busy;
};
@@ -71,7 +71,7 @@ class spectrum_lprint3_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
@@ -87,7 +87,7 @@ class spectrum_lprint3_device :
required_device m_rs232;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
int m_busy;
};
@@ -143,7 +143,7 @@ class spectrum_kempcentre_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
void busy_w(int state) { m_busy = state; }
@@ -151,7 +151,7 @@ class spectrum_kempcentre_device :
required_device m_centronics;
int m_active;
- int m_romcs;
+ bool m_romcs;
int m_busy;
};
diff --git a/src/devices/bus/spectrum/melodik.h b/src/devices/bus/spectrum/melodik.h
index ce1bc0110be..b5775e6438f 100644
--- a/src/devices/bus/spectrum/melodik.h
+++ b/src/devices/bus/spectrum/melodik.h
@@ -46,7 +46,7 @@ class spectrum_melodik_device :
virtual void post_data_fetch(offs_t offset) override { m_exp->post_data_fetch(offset); }
virtual uint8_t mreq_r(offs_t offset) override { return m_exp->romcs() ? m_exp->mreq_r(offset) : 0xff; }
virtual void mreq_w(offs_t offset, uint8_t data) override { if (m_exp->romcs()) m_exp->mreq_w(offset, data); }
- virtual int romcs() override { return m_exp->romcs(); }
+ virtual bool romcs() override { return m_exp->romcs(); }
private:
required_device m_exp;
diff --git a/src/devices/bus/spectrum/mface.cpp b/src/devices/bus/spectrum/mface.cpp
index efecf361ee8..1c79316bcc9 100644
--- a/src/devices/bus/spectrum/mface.cpp
+++ b/src/devices/bus/spectrum/mface.cpp
@@ -509,9 +509,9 @@ void spectrum_mprint_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_mface_base_device::romcs()
+bool spectrum_mface_base_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_mface_base_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/mface.h b/src/devices/bus/spectrum/mface.h
index c76f981c284..c4c73f3d931 100644
--- a/src/devices/bus/spectrum/mface.h
+++ b/src/devices/bus/spectrum/mface.h
@@ -39,7 +39,7 @@ class spectrum_mface_base_device :
virtual void pre_opcode_fetch(offs_t offset) override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
@@ -53,7 +53,7 @@ class spectrum_mface_base_device :
required_memory_region m_rom;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
int m_nmi_pending;
std::unique_ptr m_ram;
};
diff --git a/src/devices/bus/spectrum/mgt.cpp b/src/devices/bus/spectrum/mgt.cpp
index 035f82de2b0..265db2d7301 100644
--- a/src/devices/bus/spectrum/mgt.cpp
+++ b/src/devices/bus/spectrum/mgt.cpp
@@ -404,7 +404,7 @@ void spectrum_disciple_device::device_reset()
// IMPLEMENTATION spectrum_plusd_device
//**************************************************************************
-int spectrum_plusd_device::romcs()
+bool spectrum_plusd_device::romcs()
{
return m_romcs;
}
@@ -540,9 +540,9 @@ void spectrum_plusd_device::busy_w(int state)
// IMPLEMENTATION spectrum_disciple_device
//**************************************************************************
-int spectrum_disciple_device::romcs()
+bool spectrum_disciple_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_disciple_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/mgt.h b/src/devices/bus/spectrum/mgt.h
index 96227ec240c..b40b18c5711 100644
--- a/src/devices/bus/spectrum/mgt.h
+++ b/src/devices/bus/spectrum/mgt.h
@@ -50,7 +50,7 @@ class spectrum_plusd_device: public device_t, public device_spectrum_expansion_i
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
void busy_w(int state);
@@ -59,7 +59,7 @@ class spectrum_plusd_device: public device_t, public device_spectrum_expansion_i
required_device_array m_floppy;
required_device m_centronics;
- int m_romcs;
+ bool m_romcs;
uint8_t m_ram[8 * 1024];
bool m_centronics_busy;
};
@@ -87,7 +87,7 @@ class spectrum_disciple_device: public spectrum_plusd_device
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
TIMER_CALLBACK_MEMBER(reset_tick);
diff --git a/src/devices/bus/spectrum/mikroplus.cpp b/src/devices/bus/spectrum/mikroplus.cpp
index d9c34e89660..76681e372f9 100644
--- a/src/devices/bus/spectrum/mikroplus.cpp
+++ b/src/devices/bus/spectrum/mikroplus.cpp
@@ -100,7 +100,7 @@ uint8_t spectrum_mikroplus_device::iorq_r(offs_t offset)
return data;
}
-int spectrum_mikroplus_device::romcs()
+bool spectrum_mikroplus_device::romcs()
{
return 1;
}
diff --git a/src/devices/bus/spectrum/mikroplus.h b/src/devices/bus/spectrum/mikroplus.h
index 9f6a683ee9d..2ac3bb08fb1 100644
--- a/src/devices/bus/spectrum/mikroplus.h
+++ b/src/devices/bus/spectrum/mikroplus.h
@@ -36,7 +36,7 @@ class spectrum_mikroplus_device :
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
diff --git a/src/devices/bus/spectrum/mpoker.cpp b/src/devices/bus/spectrum/mpoker.cpp
index 9dc2c69c18d..99be5b63f55 100644
--- a/src/devices/bus/spectrum/mpoker.cpp
+++ b/src/devices/bus/spectrum/mpoker.cpp
@@ -129,7 +129,7 @@ void spectrum_mpoker_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_mpoker_device::romcs()
+bool spectrum_mpoker_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/mpoker.h b/src/devices/bus/spectrum/mpoker.h
index 003effe3998..12e72154d5e 100644
--- a/src/devices/bus/spectrum/mpoker.h
+++ b/src/devices/bus/spectrum/mpoker.h
@@ -36,11 +36,11 @@ class spectrum_mpoker_device : public device_t, public device_spectrum_expansion
virtual uint8_t mreq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
required_memory_region m_rom;
- int m_romcs;
+ bool m_romcs;
};
// device type definition
diff --git a/src/devices/bus/spectrum/opus.cpp b/src/devices/bus/spectrum/opus.cpp
index 791804b532a..fef2107cb72 100644
--- a/src/devices/bus/spectrum/opus.cpp
+++ b/src/devices/bus/spectrum/opus.cpp
@@ -159,9 +159,9 @@ void spectrum_opus_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_opus_device::romcs()
+bool spectrum_opus_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_opus_device::post_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/opus.h b/src/devices/bus/spectrum/opus.h
index 109f8efe70f..1bdf7ad26fa 100644
--- a/src/devices/bus/spectrum/opus.h
+++ b/src/devices/bus/spectrum/opus.h
@@ -45,7 +45,7 @@ class spectrum_opus_device:
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
@@ -66,7 +66,7 @@ class spectrum_opus_device:
required_device m_centronics;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
uint8_t m_ram[4 * 1024];
};
diff --git a/src/devices/bus/spectrum/plus2test.cpp b/src/devices/bus/spectrum/plus2test.cpp
index f11bda87fe2..1f6e81246a5 100644
--- a/src/devices/bus/spectrum/plus2test.cpp
+++ b/src/devices/bus/spectrum/plus2test.cpp
@@ -63,7 +63,7 @@ void spectrum_plus2test_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_plus2test_device::romcs()
+bool spectrum_plus2test_device::romcs()
{
return 1;
}
diff --git a/src/devices/bus/spectrum/plus2test.h b/src/devices/bus/spectrum/plus2test.h
index 42f6c5b4aea..34a7e014e41 100644
--- a/src/devices/bus/spectrum/plus2test.h
+++ b/src/devices/bus/spectrum/plus2test.h
@@ -35,7 +35,7 @@ class spectrum_plus2test_device :
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t mreq_r(offs_t offset) override;
private:
diff --git a/src/devices/bus/spectrum/sdi.cpp b/src/devices/bus/spectrum/sdi.cpp
index 3722f80bdec..fc5e1de2406 100644
--- a/src/devices/bus/spectrum/sdi.cpp
+++ b/src/devices/bus/spectrum/sdi.cpp
@@ -98,7 +98,7 @@ void spectrum_sdi_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_sdi_device::romcs()
+bool spectrum_sdi_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/sdi.h b/src/devices/bus/spectrum/sdi.h
index b85f7eb40dc..539ca55eb6b 100644
--- a/src/devices/bus/spectrum/sdi.h
+++ b/src/devices/bus/spectrum/sdi.h
@@ -41,7 +41,7 @@ class spectrum_sdi_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
required_memory_region m_rom;
required_device m_ppi;
@@ -50,7 +50,7 @@ class spectrum_sdi_device :
void ppic_w(uint8_t data);
uint8_t ppic_r();
- int m_romcs;
+ bool m_romcs;
};
diff --git a/src/devices/bus/spectrum/sixword.cpp b/src/devices/bus/spectrum/sixword.cpp
index 5686f61b1e5..81c3ad842a4 100644
--- a/src/devices/bus/spectrum/sixword.cpp
+++ b/src/devices/bus/spectrum/sixword.cpp
@@ -268,9 +268,9 @@ void spectrum_swiftdisc2_device::device_reset()
// IMPLEMENTATION (swiftdisc)
//**************************************************************************
-int spectrum_swiftdisc_device::romcs()
+bool spectrum_swiftdisc_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_swiftdisc_device::post_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/sixword.h b/src/devices/bus/spectrum/sixword.h
index e21bcd75e82..2c35304a391 100644
--- a/src/devices/bus/spectrum/sixword.h
+++ b/src/devices/bus/spectrum/sixword.h
@@ -48,7 +48,7 @@ class spectrum_swiftdisc_device :
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
@@ -63,7 +63,7 @@ class spectrum_swiftdisc_device :
required_device m_rs232;
required_ioport m_joy;
- int m_romcs;
+ bool m_romcs;
u8 m_ram[0x2000];
u16 m_rombank;
u8 m_control;
diff --git a/src/devices/bus/spectrum/speccydos.cpp b/src/devices/bus/spectrum/speccydos.cpp
index 08440c76f78..4512da94d05 100644
--- a/src/devices/bus/spectrum/speccydos.cpp
+++ b/src/devices/bus/spectrum/speccydos.cpp
@@ -170,9 +170,9 @@ void spectrum_speccydos_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_speccydos_device::romcs()
+bool spectrum_speccydos_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_speccydos_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/speccydos.h b/src/devices/bus/spectrum/speccydos.h
index a09d61144c2..6c5ade77630 100644
--- a/src/devices/bus/spectrum/speccydos.h
+++ b/src/devices/bus/spectrum/speccydos.h
@@ -43,7 +43,7 @@ class spectrum_speccydos_device :
virtual void pre_opcode_fetch(offs_t offset) override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
@@ -57,7 +57,7 @@ class spectrum_speccydos_device :
required_device_array m_floppy;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
u8 m_control;
u8 m_ram[0x400];
};
diff --git a/src/devices/bus/spectrum/specmate.cpp b/src/devices/bus/spectrum/specmate.cpp
index c8cab185d71..4b090cf2c17 100644
--- a/src/devices/bus/spectrum/specmate.cpp
+++ b/src/devices/bus/spectrum/specmate.cpp
@@ -151,9 +151,9 @@ void spectrum_specmate_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_specmate_device::romcs()
+bool spectrum_specmate_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_specmate_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/specmate.h b/src/devices/bus/spectrum/specmate.h
index bdf5faa9b46..2c0951a119b 100644
--- a/src/devices/bus/spectrum/specmate.h
+++ b/src/devices/bus/spectrum/specmate.h
@@ -37,7 +37,7 @@ class spectrum_specmate_device : public device_t, public device_spectrum_expansi
virtual void pre_opcode_fetch(offs_t offset) override;
virtual uint8_t mreq_r(offs_t offset) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
@@ -50,7 +50,7 @@ class spectrum_specmate_device : public device_t, public device_spectrum_expansi
required_memory_region m_rom;
required_device m_exp;
- int m_romcs;
+ bool m_romcs;
};
// device type definition
diff --git a/src/devices/bus/spectrum/uslot.cpp b/src/devices/bus/spectrum/uslot.cpp
index 7c078599b18..d3955ec50d5 100644
--- a/src/devices/bus/spectrum/uslot.cpp
+++ b/src/devices/bus/spectrum/uslot.cpp
@@ -71,9 +71,9 @@ void spectrum_uslot_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_uslot_device::romcs()
+bool spectrum_uslot_device::romcs()
{
- return m_exp1->romcs() | m_exp2->romcs();
+ return m_exp1->romcs() || m_exp2->romcs();
}
void spectrum_uslot_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/uslot.h b/src/devices/bus/spectrum/uslot.h
index bff4679cb43..7cda022c3d9 100644
--- a/src/devices/bus/spectrum/uslot.h
+++ b/src/devices/bus/spectrum/uslot.h
@@ -44,7 +44,7 @@ class spectrum_uslot_device :
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
private:
required_device m_exp1;
diff --git a/src/devices/bus/spectrum/usource.cpp b/src/devices/bus/spectrum/usource.cpp
index d5561ac873c..6b9ffbbfbc0 100644
--- a/src/devices/bus/spectrum/usource.cpp
+++ b/src/devices/bus/spectrum/usource.cpp
@@ -78,7 +78,7 @@ void spectrum_usource_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_usource_device::romcs()
+bool spectrum_usource_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/usource.h b/src/devices/bus/spectrum/usource.h
index 22230be0a85..b30aadb7eec 100644
--- a/src/devices/bus/spectrum/usource.h
+++ b/src/devices/bus/spectrum/usource.h
@@ -39,13 +39,13 @@ class spectrum_usource_device :
virtual const tiny_rom_entry *device_rom_region() const override;
virtual void pre_opcode_fetch(offs_t offset) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t mreq_r(offs_t offset) override;
private:
required_memory_region m_rom;
- int m_romcs;
+ bool m_romcs;
};
diff --git a/src/devices/bus/spectrum/uspeech.cpp b/src/devices/bus/spectrum/uspeech.cpp
index 586feaf8bbd..fd013dabacc 100644
--- a/src/devices/bus/spectrum/uspeech.cpp
+++ b/src/devices/bus/spectrum/uspeech.cpp
@@ -94,7 +94,7 @@ void spectrum_uspeech_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_uspeech_device::romcs()
+bool spectrum_uspeech_device::romcs()
{
return m_romcs;
}
diff --git a/src/devices/bus/spectrum/uspeech.h b/src/devices/bus/spectrum/uspeech.h
index ff6948fadb3..d1ec459c8d3 100644
--- a/src/devices/bus/spectrum/uspeech.h
+++ b/src/devices/bus/spectrum/uspeech.h
@@ -41,7 +41,7 @@ class spectrum_uspeech_device :
virtual void device_add_mconfig(machine_config &config) override;
virtual void pre_opcode_fetch(offs_t offset) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
virtual uint8_t mreq_r(offs_t offset) override;
virtual void mreq_w(offs_t offset, uint8_t data) override;
virtual uint8_t iorq_r(offs_t offset) override;
@@ -50,7 +50,7 @@ class spectrum_uspeech_device :
required_device m_nsp;
required_memory_region m_rom;
- int m_romcs;
+ bool m_romcs;
};
diff --git a/src/devices/bus/spectrum/vtx5000.cpp b/src/devices/bus/spectrum/vtx5000.cpp
new file mode 100644
index 00000000000..b028f198266
--- /dev/null
+++ b/src/devices/bus/spectrum/vtx5000.cpp
@@ -0,0 +1,170 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+/**********************************************************************
+
+ Prism VTX 5000 Modem
+
+**********************************************************************/
+
+#include "emu.h"
+#include "vtx5000.h"
+#include "machine/clock.h"
+#include "machine/i8251.h"
+#include "bus/rs232/rs232.h"
+
+
+namespace {
+
+class spectrum_vtx5000_device : public device_t, public device_spectrum_expansion_interface
+{
+public:
+ spectrum_vtx5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, SPECTRUM_VTX5000, tag, owner, clock)
+ , device_spectrum_expansion_interface(mconfig, *this)
+ , m_exp(*this, "exp")
+ , m_usart(*this, "i8251")
+ , m_rom(*this, "rom")
+ {
+ }
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ virtual uint8_t mreq_r(offs_t offset) override;
+ virtual uint8_t iorq_r(offs_t offset) override;
+ virtual void iorq_w(offs_t offset, uint8_t data) override;
+ virtual bool romcs() override;
+
+ // passthru
+ virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
+ virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
+ virtual void pre_data_fetch(offs_t offset) override { m_exp->pre_data_fetch(offset); }
+ virtual void post_data_fetch(offs_t offset) override { m_exp->post_data_fetch(offset); }
+ virtual void mreq_w(offs_t offset, uint8_t data) override { if (m_exp->romcs()) m_exp->mreq_w(offset, data); }
+
+private:
+ required_device m_exp;
+ required_device m_usart;
+ required_memory_region m_rom;
+
+ bool m_romcs;
+};
+
+
+ROM_START(vtx5000)
+ ROM_REGION( 0x2000, "rom", 0 )
+ ROM_SYSTEM_BIOS(0, "v31mnet", "V3.1 Micronet")
+ ROMX_LOAD("vtx5000-3-1.rom", 0x0000, 0x2000, CRC(1431505c) SHA1(42ae2b47c44d8c0d6a6c6a2b39a4a25a6d3a4bda), ROM_BIOS(0))
+
+ ROM_SYSTEM_BIOS(1, "v31hlink", "V3.1 Homelink")
+ ROMX_LOAD("homelink.rom", 0x0000, 0x2000, CRC(527d7f32) SHA1(4490186845b198ca9191dd711bd38274cba6f04b), ROM_BIOS(1))
+ROM_END
+
+
+const tiny_rom_entry *spectrum_vtx5000_device::device_rom_region() const
+{
+ return ROM_NAME(vtx5000);
+}
+
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+void spectrum_vtx5000_device::device_add_mconfig(machine_config &config)
+{
+ I8251(config, m_usart, 2.4576_MHz_XTAL);
+ m_usart->txd_handler().set("modem", FUNC(rs232_port_device::write_txd));
+ m_usart->dtr_handler().set("modem", FUNC(rs232_port_device::write_dtr));
+ m_usart->rts_handler().set([this](int state) { m_romcs = state; });
+
+ clock_device &rx_clock(CLOCK(config, "rx_clock", 2.4576_MHz_XTAL / 16 / 2)); // 1200 baud
+ rx_clock.signal_handler().set(m_usart, FUNC(i8251_device::write_rxc));
+
+ clock_device &tx_clock(CLOCK(config, "tx_clock", 2.4576_MHz_XTAL / 16 / 32)); // 75 baud
+ tx_clock.signal_handler().set(m_usart, FUNC(i8251_device::write_txc));
+
+ rs232_port_device &rs232(RS232_PORT(config, "modem", default_rs232_devices, nullptr)); // TCM3101 (internal modem)
+ rs232.rxd_handler().set(m_usart, FUNC(i8251_device::write_rxd));
+ rs232.dcd_handler().set(m_usart, FUNC(i8251_device::write_dsr)).invert();
+
+ // passthru
+ SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr);
+ m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w));
+ m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w));
+ m_exp->fb_r_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::fb_r));
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void spectrum_vtx5000_device::device_start()
+{
+ // CTS grounded
+ m_usart->write_cts(0);
+
+ save_item(NAME(m_romcs));
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void spectrum_vtx5000_device::device_reset()
+{
+ m_romcs = 1;
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+bool spectrum_vtx5000_device::romcs()
+{
+ return m_romcs || m_exp->romcs();
+}
+
+
+uint8_t spectrum_vtx5000_device::mreq_r(offs_t offset)
+{
+ uint8_t data = 0xff;
+
+ if (m_romcs)
+ data = m_rom->base()[offset & 0x1fff];
+
+ if (m_exp->romcs())
+ data &= m_exp->mreq_r(offset);
+
+ return data;
+}
+
+
+uint8_t spectrum_vtx5000_device::iorq_r(offs_t offset)
+{
+ uint8_t data = m_exp->iorq_r(offset);
+
+ if ((offset & 0x7f) == 0x7f)
+ data = m_usart->read(BIT(offset, 7));
+
+ return data;
+}
+
+void spectrum_vtx5000_device::iorq_w(offs_t offset, uint8_t data)
+{
+ if ((offset & 0x7f) == 0x7f)
+ m_usart->write(BIT(offset, 7), data);
+
+ m_exp->iorq_w(offset, data);
+}
+
+} // anonymous namespace
+
+
+DEFINE_DEVICE_TYPE_PRIVATE(SPECTRUM_VTX5000, device_spectrum_expansion_interface, spectrum_vtx5000_device, "spectrum_vtx5000", "Prism VTX 5000 Modem")
diff --git a/src/devices/bus/spectrum/vtx5000.h b/src/devices/bus/spectrum/vtx5000.h
new file mode 100644
index 00000000000..2ecd3f113cf
--- /dev/null
+++ b/src/devices/bus/spectrum/vtx5000.h
@@ -0,0 +1,11 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+#ifndef MAME_BUS_SPECTRUM_VTX5000_H
+#define MAME_BUS_SPECTRUM_VTX5000_H
+
+#include "exp.h"
+
+
+DECLARE_DEVICE_TYPE(SPECTRUM_VTX5000, device_spectrum_expansion_interface)
+
+#endif // MAME_BUS_SPECTRUM_VTX5000_H
diff --git a/src/devices/bus/spectrum/wafa.cpp b/src/devices/bus/spectrum/wafa.cpp
index a085ba639d1..f1f722715b3 100644
--- a/src/devices/bus/spectrum/wafa.cpp
+++ b/src/devices/bus/spectrum/wafa.cpp
@@ -103,9 +103,9 @@ void spectrum_wafa_device::device_reset()
// IMPLEMENTATION
//**************************************************************************
-int spectrum_wafa_device::romcs()
+bool spectrum_wafa_device::romcs()
{
- return m_romcs | m_exp->romcs();
+ return m_romcs || m_exp->romcs();
}
void spectrum_wafa_device::pre_opcode_fetch(offs_t offset)
diff --git a/src/devices/bus/spectrum/wafa.h b/src/devices/bus/spectrum/wafa.h
index cbf885bff90..39ce95e2a76 100644
--- a/src/devices/bus/spectrum/wafa.h
+++ b/src/devices/bus/spectrum/wafa.h
@@ -44,7 +44,7 @@ class spectrum_wafa_device:
virtual uint8_t mreq_r(offs_t offset) override;
virtual uint8_t iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, uint8_t data) override;
- virtual int romcs() override;
+ virtual bool romcs() override;
// passthru
virtual void pre_data_fetch(offs_t offset) override { m_exp->pre_data_fetch(offset); }
@@ -57,7 +57,7 @@ class spectrum_wafa_device:
required_device m_wafa1;
required_device m_wafa2;
- int m_romcs;
+ bool m_romcs;
};
diff --git a/src/devices/bus/tanbus/keyboard/mt009.cpp b/src/devices/bus/tanbus/keyboard/mt009.cpp
index e1bc1bebefd..50aa471cdf2 100644
--- a/src/devices/bus/tanbus/keyboard/mt009.cpp
+++ b/src/devices/bus/tanbus/keyboard/mt009.cpp
@@ -127,20 +127,20 @@ static const char keyboard[8][9][8] = {
static INPUT_PORTS_START( kbd_mt009 )
PORT_START("KBD0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2 \"") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("6 &") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7 \'") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR(39)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
PORT_START("KBD1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(": *") PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("- =") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=')
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=')
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEW PAGE") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(12)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RUB OUT") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(u8"\u2191") PORT_CODE(KEYCODE_TAB) PORT_CHAR('^') PORT_CHAR('_') // U+2191 = ↑
@@ -158,8 +158,8 @@ static INPUT_PORTS_START( kbd_mt009 )
PORT_START("KBD3")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o')
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("] }") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}')
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("BREAK") PORT_CODE(KEYCODE_DEL) PORT_CHAR(3)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL)
@@ -177,9 +177,9 @@ static INPUT_PORTS_START( kbd_mt009 )
PORT_START("KBD5")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l')
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("@") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('@') PORT_CHAR('`')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\ |") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\\') PORT_CHAR('|')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\\') PORT_CHAR('|')
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT (L)") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x')
@@ -190,9 +190,9 @@ static INPUT_PORTS_START( kbd_mt009 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT (R)") PORT_CODE(KEYCODE_RSHIFT)
PORT_START("KBD7")
diff --git a/src/devices/cpu/cosmac/cosdasm.cpp b/src/devices/cpu/cosmac/cosdasm.cpp
index d491651da50..d655a2e0a2b 100644
--- a/src/devices/cpu/cosmac/cosdasm.cpp
+++ b/src/devices/cpu/cosmac/cosdasm.cpp
@@ -243,9 +243,9 @@ offs_t cosmac_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
case 0xc6: CDP1802_OPCODE("LSNZ %04X", long_skip(pc)); flags = STEP_COND; break;
case 0xc7: CDP1802_OPCODE("LSNF %04X", long_skip(pc)); flags = STEP_COND; break;
case 0xc8: CDP1802_OPCODE("LSKP %04X", long_skip(pc)); break;
- case 0xc9: CDP1802_OPCODE("LBNQ %04X", long_skip(pc)); flags = STEP_COND; break;
- case 0xca: CDP1802_OPCODE("LBNZ %04X", long_skip(pc)); flags = STEP_COND; break;
- case 0xcb: CDP1802_OPCODE("LBNF %04X", long_skip(pc)); flags = STEP_COND; break;
+ case 0xc9: CDP1802_OPCODE("LBNQ %04X", long_branch(pc, params)); flags = STEP_COND; break;
+ case 0xca: CDP1802_OPCODE("LBNZ %04X", long_branch(pc, params)); flags = STEP_COND; break;
+ case 0xcb: CDP1802_OPCODE("LBNF %04X", long_branch(pc, params)); flags = STEP_COND; break;
case 0xcc: CDP1802_OPCODE("LSIE %04X", long_skip(pc)); flags = STEP_COND; break;
case 0xcd: CDP1802_OPCODE("LSQ %04X", long_skip(pc)); flags = STEP_COND; break;
case 0xce: CDP1802_OPCODE("LSZ %04X", long_skip(pc)); flags = STEP_COND; break;
diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp
index 0421693b5dc..26063ffb380 100644
--- a/src/devices/cpu/drcbec.cpp
+++ b/src/devices/cpu/drcbec.cpp
@@ -209,17 +209,17 @@ enum
// union to simplify accessing data via the instruction stream
union drcbec_instruction
{
- uint32_t i;
+ uint32_t i;
void * v;
char * c;
- uint8_t * puint8;
- int8_t * pint8;
- uint16_t * puint16;
- int16_t * pint16;
- uint32_t * puint32;
- int32_t * pint32;
- uint64_t * puint64;
- int64_t * pint64;
+ uint8_t * puint8;
+ int8_t * pint8;
+ uint16_t * puint16;
+ int16_t * pint16;
+ uint32_t * puint32;
+ int32_t * pint32;
+ uint64_t * puint64;
+ int64_t * pint64;
float * pfloat;
double * pdouble;
void (*cfunc)(void *);
diff --git a/src/devices/cpu/drcbec.h b/src/devices/cpu/drcbec.h
index d9c28612fea..a4bc68b5168 100644
--- a/src/devices/cpu/drcbec.h
+++ b/src/devices/cpu/drcbec.h
@@ -8,10 +8,10 @@
***************************************************************************/
-#pragma once
+#ifndef MAME_CPU_DRCBEC_H
+#define MAME_CPU_DRCBEC_H
-#ifndef __DRCBEC_H__
-#define __DRCBEC_H__
+#pragma once
#include "drcuml.h"
#include "drcbeut.h"
@@ -58,4 +58,4 @@ class drcbe_c : public drcbe_interface
};
-#endif /* __DRCBEC_H__ */
+#endif // MAME_CPU_DRCBEC_H
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index 8e68c2a7b71..6b0c004e2f6 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -474,33 +474,51 @@ void h8_device::state_string_export(const device_state_entry &entry, std::string
}
}
+// FIXME: one-state bus cycles are only provided for on-chip ROM & RAM in H8S/2000 and H8S/2600.
+// All other accesses take *at least* two states each, and additional wait states are often programmed for external memory!
+
u16 h8_device::read16i(u32 adr)
{
- m_icount -= 2;
+ if(m_has_exr)
+ m_icount--;
+ else
+ m_icount -= 2;
return m_cache.read_word(adr & ~1);
}
u8 h8_device::read8(u32 adr)
{
- m_icount -= 2;
+ if(m_has_exr)
+ m_icount--;
+ else
+ m_icount -= 2;
return m_program.read_byte(adr);
}
void h8_device::write8(u32 adr, u8 data)
{
- m_icount -= 2;
+ if(m_has_exr)
+ m_icount--;
+ else
+ m_icount -= 2;
m_program.write_byte(adr, data);
}
u16 h8_device::read16(u32 adr)
{
- m_icount -= 2;
+ if(m_has_exr)
+ m_icount--;
+ else
+ m_icount -= 2;
return m_program.read_word(adr & ~1);
}
void h8_device::write16(u32 adr, u16 data)
{
- m_icount -= 2;
+ if(m_has_exr)
+ m_icount--;
+ else
+ m_icount -= 2;
m_program.write_word(adr & ~1, data);
}
@@ -563,9 +581,11 @@ void h8_device::set_irq(int irq_vector, int irq_level, bool irq_nmi)
void h8_device::internal(int cycles)
{
- // all internal operations take an even number of states (at least 2 each)
- // this only applies to: H8/300, H8/300L, H8/300H (not H8S)
- m_icount -= cycles + 1;
+ // on H8/300, H8/300L, H8/300H (not H8S), all internal operations take an even number of states (at least 2 each)
+ if(!m_has_exr)
+ m_icount -= cycles + 1;
+ else
+ m_icount -= cycles;
}
void h8_device::illegal()
diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h
index 2aaf18fa2d8..885ca100c80 100644
--- a/src/devices/cpu/h8/h8.h
+++ b/src/devices/cpu/h8/h8.h
@@ -42,7 +42,7 @@ class h8_device : public cpu_device, public device_nvram_interface {
m_sci[sci].lookup()->do_set_external_clock_period(period);
}
- template void sci_rx_w(int state) { if(Sci == 2) logerror("sci2 rx %d\n", state); m_sci[Sci]->do_rx_w(state); }
+ template void sci_rx_w(int state) { m_sci[Sci]->do_rx_w(state); }
template void sci_clk_w(int state) { m_sci[Sci]->do_clk_w(state); }
void nvram_set_battery(int state) { m_nvram_battery = bool(state); } // default is 1 (nvram_enable_backup needs to be true)
@@ -191,12 +191,12 @@ class h8_device : public cpu_device, public device_nvram_interface {
virtual int trapa_setup();
virtual void irq_setup() = 0;
- virtual u16 read16i(u32 adr);
- virtual u8 read8(u32 adr);
- virtual void write8(u32 adr, u8 data);
- virtual u16 read16(u32 adr);
- virtual void write16(u32 adr, u16 data);
- virtual void internal(int cycles);
+ u16 read16i(u32 adr);
+ u8 read8(u32 adr);
+ void write8(u32 adr, u8 data);
+ u16 read16(u32 adr);
+ void write16(u32 adr, u16 data);
+ void internal(int cycles);
void prefetch_switch(u32 pc, u16 ir) { m_NPC = pc & 0xffffff; m_PC = pc+2; m_PIR = ir; }
void prefetch_done();
void prefetch_done_noirq();
diff --git a/src/devices/cpu/h8/h8s2000.cpp b/src/devices/cpu/h8/h8s2000.cpp
index 7d056a63835..b8e8f18e8c6 100644
--- a/src/devices/cpu/h8/h8s2000.cpp
+++ b/src/devices/cpu/h8/h8s2000.cpp
@@ -15,42 +15,4 @@ std::unique_ptr h8s2000_device::create_disassembler()
return std::make_unique();
}
-// FIXME: one-state bus cycles are only provided for on-chip ROM & RAM in H8S/2000 and H8S/2600.
-// All other accesses take *at least* two states each, and additional wait states are often programmed for external memory!
-
-u16 h8s2000_device::read16i(u32 adr)
-{
- m_icount--;
- return m_cache.read_word(adr & ~1);
-}
-
-u8 h8s2000_device::read8(u32 adr)
-{
- m_icount--;
- return m_program.read_byte(adr);
-}
-
-void h8s2000_device::write8(u32 adr, u8 data)
-{
- m_icount--;
- m_program.write_byte(adr, data);
-}
-
-u16 h8s2000_device::read16(u32 adr)
-{
- m_icount--;
- return m_program.read_word(adr & ~1);
-}
-
-void h8s2000_device::write16(u32 adr, u16 data)
-{
- m_icount--;
- m_program.write_word(adr & ~1, data);
-}
-
-void h8s2000_device::internal(int cycles)
-{
- m_icount -= cycles;
-}
-
#include "cpu/h8/h8s2000.hxx"
diff --git a/src/devices/cpu/h8/h8s2000.h b/src/devices/cpu/h8/h8s2000.h
index 3d1274fb726..2acf28abcd3 100644
--- a/src/devices/cpu/h8/h8s2000.h
+++ b/src/devices/cpu/h8/h8s2000.h
@@ -29,13 +29,6 @@ class h8s2000_device : public h8h_device {
virtual std::unique_ptr create_disassembler() override;
- virtual u16 read16i(u32 adr) override;
- virtual u8 read8(u32 adr) override;
- virtual void write8(u32 adr, u8 data) override;
- virtual u16 read16(u32 adr) override;
- virtual void write16(u32 adr, u16 data) override;
- virtual void internal(int cycles) override;
-
virtual void do_exec_full() override;
virtual void do_exec_partial() override;
diff --git a/src/devices/cpu/m68000/tmp68301.cpp b/src/devices/cpu/m68000/tmp68301.cpp
index 03d9d417cdf..dcbd3a4a4a7 100644
--- a/src/devices/cpu/m68000/tmp68301.cpp
+++ b/src/devices/cpu/m68000/tmp68301.cpp
@@ -688,7 +688,7 @@ void tmp68301_device::pmr_w(u8 data)
u16 tmp68301_device::pdr_r()
{
- if(m_parallel_mode == 0) {
+ if(m_parallel_mode == 0 || m_parallel_mode == 1) {
if(m_pdir == 0xffff)
return m_pdr;
return (m_pdr & m_pdir) | (m_parallel_r_cb() & ~m_pdir);
@@ -704,7 +704,7 @@ void tmp68301_device::pdr_w(offs_t, u16 data, u16 mem_mask)
if(m_pdr == old)
return;
// logerror("parallel data %04x\n", m_pdr);
- if(m_parallel_mode == 0) {
+ if(m_parallel_mode == 0 || m_parallel_mode == 1) {
if(m_pdir == 0x0000)
return;
m_parallel_w_cb(m_pdr & m_pdir);
diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp
index 6fd711a781c..f75c3cdda3b 100644
--- a/src/devices/cpu/mcs51/mcs51.cpp
+++ b/src/devices/cpu/mcs51/mcs51.cpp
@@ -266,6 +266,7 @@ DEFINE_DEVICE_TYPE(DS80C320, ds80c320_device, "ds80c320", "Dallas DS80C320 HSM")
DEFINE_DEVICE_TYPE(SAB80C535, sab80c535_device, "sab80c535", "Siemens SAB80C535")
DEFINE_DEVICE_TYPE(I8344, i8344_device, "i8344", "Intel 8344AH RUPI-44")
DEFINE_DEVICE_TYPE(I8744, i8744_device, "i8744", "Intel 8744H RUPI-44")
+DEFINE_DEVICE_TYPE(P80C552, p80c552_device, "p80c552", "Philips P80C552")
DEFINE_DEVICE_TYPE(P87C552, p87c552_device, "p87c552", "Philips P87C552")
DEFINE_DEVICE_TYPE(P80C562, p80c562_device, "p80c562", "Philips P80C562")
DEFINE_DEVICE_TYPE(DS5002FP, ds5002fp_device, "ds5002fp", "Dallas DS5002FP")
@@ -464,6 +465,11 @@ p80c562_device::p80c562_device(const machine_config &mconfig, const char *tag, d
{
}
+p80c552_device::p80c552_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : p80c562_device(mconfig, P80C552, tag, owner, clock, 0, 8)
+{
+}
+
p87c552_device::p87c552_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: p80c562_device(mconfig, P87C552, tag, owner, clock, 12, 8)
{
@@ -2775,6 +2781,11 @@ std::unique_ptr p80c562_device::create_disassembler()
return std::make_unique();
}
+std::unique_ptr p80c552_device::create_disassembler()
+{
+ return std::make_unique();
+}
+
std::unique_ptr p87c552_device::create_disassembler()
{
return std::make_unique();
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index 676f6709357..8ac6effd4d3 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -340,6 +340,7 @@ DECLARE_DEVICE_TYPE(AT89C52, at89c52_device)
DECLARE_DEVICE_TYPE(AT89S52, at89s52_device)
DECLARE_DEVICE_TYPE(DS80C320, ds80c320_device)
DECLARE_DEVICE_TYPE(SAB80C535, sab80c535_device)
+DECLARE_DEVICE_TYPE(P80C552, p80c552_device)
DECLARE_DEVICE_TYPE(P87C552, p87c552_device)
DECLARE_DEVICE_TYPE(P80C562, p80c562_device)
/* 4k internal perom and 128 internal ram and 2 analog comparators */
@@ -566,6 +567,16 @@ class p80c562_device : public i80c51_device
virtual std::unique_ptr create_disassembler() override;
};
+class p80c552_device : public p80c562_device
+{
+public:
+ // construction/destruction
+ p80c552_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual std::unique_ptr create_disassembler() override;
+};
+
class p87c552_device : public p80c562_device
{
public:
diff --git a/src/devices/cpu/sh/sh7042.cpp b/src/devices/cpu/sh/sh7042.cpp
index 4c195e787a2..5a468b85969 100644
--- a/src/devices/cpu/sh/sh7042.cpp
+++ b/src/devices/cpu/sh/sh7042.cpp
@@ -6,12 +6,23 @@
#include "emu.h"
#include "sh7042.h"
-DEFINE_DEVICE_TYPE(SH7042, sh7042_device, "sh7042", "Hitachi SH-2 (SH7042)")
+DEFINE_DEVICE_TYPE(SH7042, sh7042_device, "sh7042", "Hitachi SH-2 (SH7042)")
+DEFINE_DEVICE_TYPE(SH7043, sh7043_device, "sh7043", "Hitachi SH-2 (SH7043)")
sh7042_device::sh7042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- sh2_device(mconfig, SH7042, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh7042_device::map), this), 32, 0xffffffff),
- m_adc(*this, "adc"),
- m_read_adc(*this, 0)
+ sh7042_device(mconfig, SH7042, tag, owner, clock)
+{
+}
+
+sh7043_device::sh7043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ sh7042_device(mconfig, SH7043, tag, owner, clock)
+{
+}
+
+sh7042_device::sh7042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ sh2_device(mconfig, type, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh7042_device::map), this), 32, 0xffffffff),
+ m_read_adc(*this, 0),
+ m_sci_tx(*this)
{
for(unsigned int i=0; i != m_read_adc.size(); i++)
m_read_adc[i].bind().set([this, i]() { return adc_default(i); });
@@ -26,23 +37,71 @@ u16 sh7042_device::adc_default(int adc)
void sh7042_device::device_start()
{
sh2_device::device_start();
+
+ save_item(NAME(m_addr));
+ save_item(NAME(m_adcsr));
+ save_item(NAME(m_adcr));
}
void sh7042_device::device_reset()
{
sh2_device::device_reset();
+
+ memset(m_addr, 0, sizeof(m_addr));
+ m_adcsr = m_adcr = 0;
}
void sh7042_device::map(address_map &map)
{
- map(0xffff83e0, 0xffff83e0).rw(m_adc, FUNC(sh_adc_device::adcsr_r), FUNC(sh_adc_device::adcsr_w));
- map(0xffff83e1, 0xffff83e1).rw(m_adc, FUNC(sh_adc_device::adcr_r), FUNC(sh_adc_device::adcr_w));
- map(0xffff83f0, 0xffff83ff).r(m_adc, FUNC(sh_adc_device::addr_r));
+ map(0xffff83e0, 0xffff83e0).rw(FUNC(sh7042_device::adcsr_r), FUNC(sh7042_device::adcsr_w));
+ map(0xffff83e1, 0xffff83e1).rw(FUNC(sh7042_device::adcr_r), FUNC(sh7042_device::adcr_w));
+ map(0xffff83f0, 0xffff83ff).r(FUNC(sh7042_device::addr_r));
map(0xfffff000, 0xffffffff).ram();
}
-void sh7042_device::device_add_mconfig(machine_config &config)
+
+// ADC section
+
+u16 sh7042_device::addr_r(offs_t offset)
+{
+ logerror("addr16_r %d %03x\n", offset, m_addr[offset]);
+ return m_addr[offset];
+}
+
+u8 sh7042_device::adcsr_r()
+{
+ logerror("adcsr_r %02x\n", m_adcsr);
+ return m_adcsr;
+}
+
+u8 sh7042_device::adcr_r()
+{
+ logerror("adcr_r %02x\n", m_adcr);
+ return m_adcr;
+}
+
+void sh7042_device::adcsr_w(u8 data)
+{
+ logerror("adcsr_w %02x\n", data);
+ // u8 prev = m_adcsr;
+ m_adcsr = (data & 0x7f) | (m_adcsr & data & CSR_ADF);
+}
+
+void sh7042_device::adcr_w(u8 data)
+{
+ static const char *const tg_modes[4] = { "soft", "mtu", "?", "external" };
+ static const char *const buf_modes[4] = { "normal", "a->b", "a,b->c,d", "a->b->c->d" };
+ logerror("adcr_w speed=%d trigger=%s mode=%s sampling=%s buffering=%s\n",
+ BIT(data, 6) ? "high" : "low",
+ tg_modes[(data >> 4) & 3],
+ BIT(data, 3) ? "scan" : "single",
+ BIT(data, 2) ? "simultaneous" : "normal",
+ buf_modes[data & 3]);
+ m_adcr = data;
+}
+
+void sh7042_device::do_sci_w(int sci, int state)
{
- SH_ADC(config, m_adc, *this);
+ logerror("sci %d %d\n", sci, state);
}
diff --git a/src/devices/cpu/sh/sh7042.h b/src/devices/cpu/sh/sh7042.h
index 7cf319f3ce4..9c73063d4a6 100644
--- a/src/devices/cpu/sh/sh7042.h
+++ b/src/devices/cpu/sh/sh7042.h
@@ -9,7 +9,6 @@
#pragma once
#include "sh2.h"
-#include "sh_adc.h"
class sh7042_device : public sh2_device
{
@@ -17,24 +16,61 @@ class sh7042_device : public sh2_device
sh7042_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
template auto read_adc() { return m_read_adc[Port].bind(); }
+ template void sci_rx_w(int state) { do_sci_w(Sci, state); }
+ template auto write_sci_tx() { return m_sci_tx[Sci].bind(); }
- u16 do_read_adc(int port) { return m_read_adc[port](); }
protected:
+ enum {
+ CSR_ADF = 0x80,
+ CSR_ADIE = 0x40,
+ CSR_ADST = 0x20,
+ CSR_CKS = 0x10,
+ CSR_GRP = 0x08,
+ CSR_CHAN = 0x07
+ };
+
+ enum {
+ CR_PWR = 0x40,
+ CR_TRGS = 0x30,
+ CR_SCAN = 0x08,
+ CR_SIM = 0x04,
+ CR_BUF = 0x03
+ };
+
+ sh7042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
virtual void device_start() override;
virtual void device_reset() override;
- virtual void device_add_mconfig(machine_config &config) override;
private:
- required_device m_adc;
-
devcb_read16::array<8> m_read_adc;
+ devcb_write_line::array<2> m_sci_tx;
+
+ void map(address_map &map);
+
+ // ADC section
+ uint16_t m_addr[8];
+ uint8_t m_adcsr, m_adcr;
u16 adc_default(int adc);
+ u16 addr_r(offs_t offset);
+ u8 adcsr_r();
+ u8 adcr_r();
+ void adcsr_w(u8 data);
+ void adcr_w(u8 data);
+
+ void do_sci_w(int sci, int state);
+};
- void map(address_map &map);
+class sh7043_device : public sh7042_device
+{
+public:
+ sh7043_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
+
DECLARE_DEVICE_TYPE(SH7042, sh7042_device)
+DECLARE_DEVICE_TYPE(SH7043, sh7043_device)
#endif // MAME_CPU_SH_SH7042_H
diff --git a/src/devices/cpu/sh/sh_adc.cpp b/src/devices/cpu/sh/sh_adc.cpp
deleted file mode 100644
index 40f9546dc15..00000000000
--- a/src/devices/cpu/sh/sh_adc.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert
-
-#include "emu.h"
-#include "sh_adc.h"
-#include "sh7042.h"
-
-DEFINE_DEVICE_TYPE(SH_ADC, sh_adc_device, "sh_adc", "SH7042 ADC")
-
-sh_adc_device::sh_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, SH_ADC, tag, owner, clock),
- m_cpu(*this, finder_base::DUMMY_TAG),
- m_adcsr(0), m_adcr(0)
-{
-}
-
-u16 sh_adc_device::addr_r(offs_t offset)
-{
- logerror("addr16_r %d %03x\n", offset, m_addr[offset]);
- return m_addr[offset];
-}
-
-u8 sh_adc_device::adcsr_r()
-{
- logerror("adcsr_r %02x\n", m_adcsr);
- return m_adcsr;
-}
-
-u8 sh_adc_device::adcr_r()
-{
- logerror("adcr_r %02x\n", m_adcr);
- return m_adcr;
-}
-
-void sh_adc_device::adcsr_w(u8 data)
-{
- logerror("adcsr_w %02x\n", data);
- // u8 prev = m_adcsr;
- m_adcsr = (data & 0x7f) | (m_adcsr & data & CSR_ADF);
-}
-
-void sh_adc_device::adcr_w(u8 data)
-{
- logerror("adcr_w %02x\n", data);
- m_adcr = data;
-}
-
-void sh_adc_device::device_start()
-{
- save_item(NAME(m_addr));
- save_item(NAME(m_adcsr));
- save_item(NAME(m_adcr));
-}
-
-void sh_adc_device::device_reset()
-{
- memset(m_addr, 0, sizeof(m_addr));
- m_adcsr = m_adcr = 0;
-}
diff --git a/src/devices/cpu/sh/sh_adc.h b/src/devices/cpu/sh/sh_adc.h
deleted file mode 100644
index 4b8c371c31d..00000000000
--- a/src/devices/cpu/sh/sh_adc.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert
-/***************************************************************************
-
- sh_adc.h
-
- SH Analog to Digital Converter subsystem
-
-***************************************************************************/
-
-#ifndef MAME_CPU_SH_SH_ADC_H
-#define MAME_CPU_SH_SH_ADC_H
-
-#pragma once
-
-// To generalize eventually
-class sh7042_device;
-
-class sh_adc_device : public device_t {
-public:
- sh_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
-
- template sh_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu)
- : sh_adc_device(mconfig, tag, owner)
- {
- set_info(cpu);
- }
-
- template void set_info(T &&cpu) { m_cpu.set_tag(std::forward(cpu)); }
-
- u16 addr_r(offs_t offset);
- u8 adcsr_r();
- u8 adcr_r();
- void adcsr_w(u8 data);
- void adcr_w(u8 data);
-
-protected:
- enum {
- CSR_ADF = 0x80,
- CSR_ADIE = 0x40,
- CSR_ADST = 0x20,
- CSR_CKS = 0x10,
- CSR_GRP = 0x08,
- CSR_CHAN = 0x07
- };
-
- enum {
- CR_PWR = 0x40,
- CR_TRGS = 0x30,
- CR_SCAN = 0x08,
- CR_SIM = 0x04,
- CR_BUF = 0x03
- };
-
- required_device m_cpu;
-
- uint16_t m_addr[8];
- uint8_t m_adcsr, m_adcr;
-
-
- virtual void device_start() override;
- virtual void device_reset() override;
-};
-
-DECLARE_DEVICE_TYPE(SH_ADC, sh_adc_device)
-
-#endif
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp
index c00f9c63464..3f3ea408022 100644
--- a/src/devices/machine/gt64xxx.cpp
+++ b/src/devices/machine/gt64xxx.cpp
@@ -195,8 +195,7 @@ void gt64xxx_device::device_start()
{
pci_host_device::device_start();
m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
- memory_space = &space(AS_PCI_MEM);
- io_space = &space(AS_PCI_IO);
+ set_spaces(&space(AS_PCI_MEM), &space(AS_PCI_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/i82439hx.cpp b/src/devices/machine/i82439hx.cpp
index 2a8e1a12714..7dc130dbfa6 100644
--- a/src/devices/machine/i82439hx.cpp
+++ b/src/devices/machine/i82439hx.cpp
@@ -48,8 +48,7 @@ void i82439hx_host_device::set_ram_size(int _ram_size)
void i82439hx_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &cpu->space(AS_PROGRAM);
- io_space = &cpu->space(AS_IO);
+ set_spaces(&cpu->space(AS_PROGRAM), &cpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/i82439tx.cpp b/src/devices/machine/i82439tx.cpp
index f8c1c9a8bb3..9196f8f7f4d 100644
--- a/src/devices/machine/i82439tx.cpp
+++ b/src/devices/machine/i82439tx.cpp
@@ -37,8 +37,7 @@ void i82439tx_host_device::set_ram_size(int _ram_size)
void i82439tx_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &cpu->space(AS_PROGRAM);
- io_space = &cpu->space(AS_IO);
+ set_spaces(&cpu->space(AS_PROGRAM), &cpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/i82875p.cpp b/src/devices/machine/i82875p.cpp
index 37d95112359..b187bacfa72 100644
--- a/src/devices/machine/i82875p.cpp
+++ b/src/devices/machine/i82875p.cpp
@@ -62,8 +62,7 @@ uint8_t i82875p_host_device::capptr_r()
void i82875p_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &cpu->space(AS_PROGRAM);
- io_space = &cpu->space(AS_IO);
+ set_spaces(&cpu->space(AS_PROGRAM), &cpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/mediagx_host.cpp b/src/devices/machine/mediagx_host.cpp
index d53967f731b..e0772e7920e 100644
--- a/src/devices/machine/mediagx_host.cpp
+++ b/src/devices/machine/mediagx_host.cpp
@@ -104,8 +104,7 @@ device_memory_interface::space_config_vector mediagx_host_device::memory_space_c
void mediagx_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &m_host_cpu->space(AS_PROGRAM);
- io_space = &m_host_cpu->space(AS_IO);
+ set_spaces(&m_host_cpu->space(AS_PROGRAM), &m_host_cpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/mpc106.cpp b/src/devices/machine/mpc106.cpp
index f3c1045cfa0..3bc89e6174d 100644
--- a/src/devices/machine/mpc106.cpp
+++ b/src/devices/machine/mpc106.cpp
@@ -67,8 +67,7 @@ void mpc106_host_device::device_start()
{
pci_host_device::device_start();
m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
- memory_space = &space(AS_PCI_MEM);
- io_space = &space(AS_PCI_IO);
+ set_spaces(&space(AS_PCI_MEM), &space(AS_PCI_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/mv6436x.cpp b/src/devices/machine/mv6436x.cpp
index 07057c54a2b..9db05547393 100644
--- a/src/devices/machine/mv6436x.cpp
+++ b/src/devices/machine/mv6436x.cpp
@@ -1137,8 +1137,7 @@ void mv64361_pci_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &space(AS_PCI_MEM);
- io_space = &space(AS_PCI_IO);
+ set_spaces(&space(AS_PCI_MEM), &space(AS_PCI_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp
index 5f6553c277a..e4c582e29a8 100644
--- a/src/devices/machine/pci.cpp
+++ b/src/devices/machine/pci.cpp
@@ -888,6 +888,12 @@ void pci_host_device::io_configuration_access_map(address_map &map)
map(0xcfc, 0xcff).rw(FUNC(pci_host_device::config_data_r), FUNC(pci_host_device::config_data_w));
}
+void pci_host_device::set_spaces(address_space *memory, address_space *io, address_space *busmaster)
+{
+ memory_space = memory;
+ io_space = io ? io : memory;
+ m_pci_root->set_pci_busmaster_space(busmaster ? busmaster : memory);
+}
pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: pci_bridge_device(mconfig, type, tag, owner, clock)
@@ -1012,7 +1018,8 @@ void pci_host_device::root_config_write(uint8_t bus, uint8_t device, uint16_t re
pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PCI_ROOT, tag, owner, clock),
m_pin_mapper(*this),
- m_irq_handler(*this)
+ m_irq_handler(*this),
+ m_pci_busmaster_space(nullptr)
{
}
diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h
index e6acc255802..d95bf58afbf 100644
--- a/src/devices/machine/pci.h
+++ b/src/devices/machine/pci.h
@@ -133,6 +133,8 @@ class pci_device : public device_t {
void set_map_address(int id, uint64_t adr);
void set_map_size(int id, uint64_t size);
void set_map_flags(int id, int flags);
+
+ inline address_space *get_pci_busmaster_space() const;
};
class agp_device : public pci_device {
@@ -243,6 +245,8 @@ class pci_host_device : public pci_bridge_device {
public:
void io_configuration_access_map(address_map &map);
+ void set_spaces(address_space *memory, address_space *io = nullptr, address_space *busmaster = nullptr);
+
protected:
pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -264,12 +268,13 @@ class pci_host_device : public pci_bridge_device {
void regenerate_mapping();
- address_space *memory_space, *io_space;
-
uint64_t memory_window_start, memory_window_end, memory_offset;
uint64_t io_window_start, io_window_end, io_offset;
uint32_t config_address;
+
+private:
+ address_space *memory_space, *io_space;
};
using pci_pin_mapper = device_delegate;
@@ -285,6 +290,10 @@ class pci_root_device : public device_t {
void set_pin_mapper(pci_pin_mapper &&mapper) { m_pin_mapper = std::move(mapper); }
void set_irq_handler(pci_irq_handler &&handler) { m_irq_handler = std::move(handler); }
+ address_space *get_pci_busmaster_space() const { return m_pci_busmaster_space; }
+
+ void set_pci_busmaster_space(address_space *space) { m_pci_busmaster_space = space; }
+
protected:
virtual void device_start() override;
virtual void device_reset() override;
@@ -292,9 +301,14 @@ class pci_root_device : public device_t {
private:
pci_pin_mapper m_pin_mapper;
pci_irq_handler m_irq_handler;
-
+ address_space *m_pci_busmaster_space;
};
+address_space *pci_device::get_pci_busmaster_space() const
+{
+ return m_pci_root->get_pci_busmaster_space();
+}
+
DECLARE_DEVICE_TYPE(PCI_ROOT, pci_root_device)
DECLARE_DEVICE_TYPE(PCI_BRIDGE, pci_bridge_device)
diff --git a/src/devices/machine/sis630_host.cpp b/src/devices/machine/sis630_host.cpp
index 5088585aa5f..e5c9f897cde 100644
--- a/src/devices/machine/sis630_host.cpp
+++ b/src/devices/machine/sis630_host.cpp
@@ -53,8 +53,7 @@ void sis630_host_device::device_start()
io_window_end = 0xffff;
io_offset = 0;
- memory_space = &m_host_cpu->space(AS_PROGRAM);
- io_space = &m_host_cpu->space(AS_IO);
+ set_spaces(&m_host_cpu->space(AS_PROGRAM), &m_host_cpu->space(AS_IO));
add_map(8*1024*1024, M_MEM, FUNC(sis630_host_device::memory_map));
m_ram.resize(m_ram_size/4);
diff --git a/src/devices/machine/sis85c496.cpp b/src/devices/machine/sis85c496.cpp
index f74a1d818c7..45cc3c9ae66 100644
--- a/src/devices/machine/sis85c496.cpp
+++ b/src/devices/machine/sis85c496.cpp
@@ -172,8 +172,7 @@ void sis85c496_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &m_maincpu->space(AS_PROGRAM);
- io_space = &m_maincpu->space(AS_IO);
+ set_spaces(&m_maincpu->space(AS_PROGRAM), &m_maincpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp
index b7e993c8f90..e4105c88ab6 100644
--- a/src/devices/machine/vrc4373.cpp
+++ b/src/devices/machine/vrc4373.cpp
@@ -116,8 +116,7 @@ void vrc4373_device::device_start()
pci_host_device::device_start();
m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
- memory_space = &space(AS_PCI_MEM);
- io_space = &space(AS_PCI_IO);
+ set_spaces(&space(AS_PCI_MEM), &space(AS_PCI_IO));
is_multifunction_device = false;
std::fill(std::begin(m_cpu_regs), std::end(m_cpu_regs), 0);
diff --git a/src/devices/machine/vrc5074.cpp b/src/devices/machine/vrc5074.cpp
index cfaa8a1e8e8..2bddcaa54a9 100644
--- a/src/devices/machine/vrc5074.cpp
+++ b/src/devices/machine/vrc5074.cpp
@@ -203,8 +203,7 @@ void vrc5074_device::device_start()
{
pci_host_device::device_start();
m_cpu_space = &m_cpu->space(AS_PROGRAM);
- memory_space = &space(AS_DATA);
- io_space = &space(AS_IO);
+ set_spaces(&space(AS_DATA), &space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/devices/sound/dspv.cpp b/src/devices/sound/dspv.cpp
index cf14ead15d3..b0f4d8f3596 100644
--- a/src/devices/sound/dspv.cpp
+++ b/src/devices/sound/dspv.cpp
@@ -6,13 +6,16 @@
#include "emu.h"
#include "dspv.h"
-DEFINE_DEVICE_TYPE(DSPV, dspv_device, "dspv", "Yamaha DSPV audio simulation DSP (YSS217-F/")
+DEFINE_DEVICE_TYPE(DSPV, dspv_device, "dspv", "Yamaha DSPV audio simulation DSP (YSS217-F)")
dspv_device::dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, DSPV, tag, owner, clock),
device_sound_interface(mconfig, *this),
- m_program_config("program", ENDIANNESS_BIG, 16, 16, -1, address_map_constructor(FUNC(dspv_device::prg_map), this)),
- m_data_config("data", ENDIANNESS_BIG, 16, 14, -1, address_map_constructor(FUNC(dspv_device::data_map), this))
+ m_prg1_config("prg1", ENDIANNESS_BIG, 64, 8, -3, address_map_constructor(FUNC(dspv_device::prg1_map), this)),
+ m_prg2_config("prg2", ENDIANNESS_BIG, 64, 8, -3, address_map_constructor(FUNC(dspv_device::prg2_map), this)),
+ m_data_config("data", ENDIANNESS_BIG, 16, 32, -1, address_map_constructor(FUNC(dspv_device::data_map), this)),
+ m_prg1(*this, "prg1"),
+ m_prg2(*this, "prg2")
{
}
@@ -22,57 +25,74 @@ void dspv_device::map(address_map &map)
map(0x02, 0x03).r(FUNC(dspv_device::status_r));
map(0x06, 0x07).w(FUNC(dspv_device::prg_adr_w));
- map(0x20, 0x21).w(FUNC(dspv_device::table_adrh_w));
- map(0x22, 0x23).w(FUNC(dspv_device::table_adrl_w));
- map(0x24, 0x25).w(FUNC(dspv_device::table_data_w));
- map(0x26, 0x27).w(FUNC(dspv_device::table_zero_w));
- map(0x40, 0x7f).w(FUNC(dspv_device::prg_data_w));
+ map(0x12, 0x13).lw16(NAME([](u16 data) { }));
+ map(0x20, 0x21).w(FUNC(dspv_device::data_adrh_w));
+ map(0x22, 0x23).w(FUNC(dspv_device::data_adrl_w));
+ map(0x24, 0x25).w(FUNC(dspv_device::data_data_w));
+ map(0x26, 0x27).w(FUNC(dspv_device::data_zero_w));
+ map(0x38, 0x39).lr16(NAME([]() -> u16 { return 0; }));
+ map(0x40, 0x7f).rw(FUNC(dspv_device::prg_data_r), FUNC(dspv_device::prg_data_w));
}
-void dspv_device::prg_map(address_map &map)
+void dspv_device::prg1_map(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ map(0x00, 0xff).ram().share(m_prg1);
+}
+
+void dspv_device::prg2_map(address_map &map)
+{
+ map(0x00, 0xff).ram().share(m_prg2);
}
void dspv_device::data_map(address_map &map)
{
- map(0x0000, 0x3fff).ram();
+ map(0x00000, 0x03fff).ram();
+ map(0x1c000, 0x1dfff).ram();
}
-void dspv_device::table_adrh_w(u16 data)
+void dspv_device::data_adrh_w(u16 data)
{
- m_table_adr = (m_table_adr & 0x0000ffff) | (data << 16);
+ m_data_adr = (m_data_adr & 0x0000ffff) | (data << 16);
}
-void dspv_device::table_adrl_w(u16 data)
+void dspv_device::data_adrl_w(u16 data)
{
- m_table_adr = (m_table_adr & 0xffff0000) | data;
+ m_data_adr = (m_data_adr & 0xffff0000) | data;
}
-void dspv_device::table_data_w(u16 data)
+void dspv_device::data_data_w(u16 data)
{
- if(m_table_adr >= 0x4000)
- logerror("table_adr overflow!\n");
- m_data->write_word(m_table_adr, data);
- m_table_adr++;
+ m_data->write_word(m_data_adr, data);
+ m_data_adr++;
}
-void dspv_device::table_zero_w(u16 data)
+void dspv_device::data_zero_w(u16 data)
{
- if(data)
- logerror("table_zero_w %04x\n", data);
+ logerror("data_zero_w %04x\n", data);
}
void dspv_device::prg_adr_w(u16 data)
{
- m_prg_adr = data;
+ u32 slot = BIT(data, 13, 3);
+ u32 len = BIT(data, 8, 5);
+ u32 address = BIT(data, 0, 8);
+ if(len == 0)
+ len = 0x20;
+ auto &prg = slot >= 4 ? m_prg2 : m_prg1;
+ u32 shift = (slot & 3)*16;
+ u64 mask = ~(u64(0xffff) << shift);
+ for(u32 i=0; i != len; i++)
+ prg[(i + address) & 0xff] = (prg[(i + address) & 0xff] & mask) | (u64(m_buffer[i]) << shift);
}
void dspv_device::prg_data_w(offs_t offset, u16 data)
{
- u16 adr = m_prg_adr + offset;
- adr = (adr << 3) | (adr >> 13);
- m_program->write_word(adr, data);
+ m_buffer[offset] = data;
+}
+
+u16 dspv_device::prg_data_r(offs_t offset)
+{
+ return m_buffer[offset];
}
u16 dspv_device::status_r()
@@ -100,7 +120,6 @@ void dspv_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override;
private:
- address_space_config m_program_config, m_data_config;
- address_space *m_program, *m_data;
+ address_space_config m_prg1_config, m_prg2_config, m_data_config;
+ address_space *m_data;
+
+ required_shared_ptr m_prg1, m_prg2;
+
+ std::array m_buffer;
u32 m_pc;
int m_icount;
- u32 m_table_adr;
- u16 m_prg_adr;
+ u32 m_data_adr;
u16 m_status;
- // Table ram access
- void table_adrh_w(u16 data);
- void table_adrl_w(u16 data);
- void table_data_w(u16 data);
- void table_zero_w(u16 data);
+ // Data ram access
+ void data_adrh_w(u16 data);
+ void data_adrl_w(u16 data);
+ void data_data_w(u16 data);
+ void data_zero_w(u16 data);
// Program ram access
void prg_adr_w(u16 data);
void prg_data_w(offs_t offset, u16 data);
+ u16 prg_data_r(offs_t offset);
// Registers
u16 status_r();
@@ -59,7 +63,8 @@ class dspv_device : public cpu_device, public device_sound_interface
u16 snd_r(offs_t offset);
void snd_w(offs_t offset, u16 data);
- void prg_map(address_map &map);
+ void prg1_map(address_map &map);
+ void prg2_map(address_map &map);
void data_map(address_map &map);
};
diff --git a/src/devices/sound/dspvd.cpp b/src/devices/sound/dspvd.cpp
index 3a2fd254cf6..2865958113a 100644
--- a/src/devices/sound/dspvd.cpp
+++ b/src/devices/sound/dspvd.cpp
@@ -21,9 +21,9 @@ u32 dspv_disassembler::opcode_alignment() const
offs_t dspv_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms)
{
- u16 opc = opcodes.r16(pc);
-
- util::stream_format(stream, "dc.w %04x", opc);
+ u64 opc = opcodes.r64(pc);
+ u64 mode = (params.r64(pc) >> 32) & 7;
+ util::stream_format(stream, "%x%016x", mode, opc);
return 1 | SUPPORTED;
}
diff --git a/src/devices/video/lc7582.cpp b/src/devices/video/lc7580.cpp
similarity index 59%
rename from src/devices/video/lc7582.cpp
rename to src/devices/video/lc7580.cpp
index b8f5b87c7ba..17090f74578 100644
--- a/src/devices/video/lc7582.cpp
+++ b/src/devices/video/lc7580.cpp
@@ -2,37 +2,47 @@
// copyright-holders:hap
/*
-Sanyo LC7582 LCD Driver
+Sanyo LC7580 LCD Driver
-53 outputs (static), or 106 outputs (1/2 duty)
+53 outputs (static), or 104 outputs (1/2 duty)
TODO:
+- any difference between LC7580 and LC7582?
- OSC pin (input is R/C)
- AD/DSP function
*/
#include "emu.h"
-#include "video/lc7582.h"
+#include "video/lc7580.h"
+DEFINE_DEVICE_TYPE(LC7580, lc7580_device, "lc7580", "Sanyo LC7580 LCD Driver")
DEFINE_DEVICE_TYPE(LC7582, lc7582_device, "lc7582", "Sanyo LC7582 LCD Driver")
//-------------------------------------------------
// constructor
//-------------------------------------------------
-lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
- device_t(mconfig, LC7582, tag, owner, clock),
+lc7580_device::lc7580_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
+ device_t(mconfig, type, tag, owner, clock),
m_write_segs(*this)
{ }
+lc7580_device::lc7580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ lc7580_device(mconfig, LC7580, tag, owner, clock)
+{ }
+
+lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ lc7580_device(mconfig, LC7582, tag, owner, clock)
+{ }
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
-void lc7582_device::device_start()
+void lc7580_device::device_start()
{
// zerofill
m_data = 0;
@@ -60,13 +70,27 @@ void lc7582_device::device_start()
// handlers
//-------------------------------------------------
-void lc7582_device::refresh_output()
+void lc7580_device::refresh_output()
{
- m_write_segs(0, m_blank ? 0 : m_latch[0]);
- m_write_segs(1, (m_blank || !m_duty) ? 0 : m_latch[1]);
+ if (m_duty)
+ {
+ u64 segs[2] = { 0, 0 };
+
+ // COM1 on even bits, COM2 on uneven bits
+ for (int i = 0; i < 104; i++)
+ segs[i & 1] |= BIT(m_latch[i / 52], i % 52) << (i >> 1);
+
+ for (int i = 0; i < 2; i++)
+ m_write_segs(i, m_blank ? 0 : segs[i]);
+ }
+ else
+ {
+ m_write_segs(0, m_blank ? 0 : m_latch[0]);
+ m_write_segs(1, 0);
+ }
}
-void lc7582_device::clk_w(int state)
+void lc7580_device::clk_w(int state)
{
state = (state) ? 1 : 0;
@@ -77,7 +101,7 @@ void lc7582_device::clk_w(int state)
m_clk = state;
}
-void lc7582_device::ce_w(int state)
+void lc7580_device::ce_w(int state)
{
state = (state) ? 1 : 0;
@@ -86,7 +110,7 @@ void lc7582_device::ce_w(int state)
{
// d53: DP (drive mode select, aka duty)
// d54: DQ (AD/DSP function)
- // d55: commons
+ // d55: latch select
if (!BIT(m_shift, 55))
{
m_duty = BIT(m_shift, 53);
diff --git a/src/devices/video/lc7582.h b/src/devices/video/lc7580.h
similarity index 68%
rename from src/devices/video/lc7582.h
rename to src/devices/video/lc7580.h
index 25299c3dbaf..583ce3c45d6 100644
--- a/src/devices/video/lc7582.h
+++ b/src/devices/video/lc7580.h
@@ -2,12 +2,12 @@
// copyright-holders:hap
/*
- Sanyo LC7582 LCD Driver
+ Sanyo LC7580 LCD Driver
*/
-#ifndef MAME_VIDEO_LC7582_H
-#define MAME_VIDEO_LC7582_H
+#ifndef MAME_VIDEO_LC7580_H
+#define MAME_VIDEO_LC7580_H
#pragma once
@@ -31,10 +31,10 @@ pin desc
*/
-class lc7582_device : public device_t
+class lc7580_device : public device_t
{
public:
- lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ lc7580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// configuration helpers
auto write_segs() { return m_write_segs.bind(); } // S pins, COM1/COM2 in offset
@@ -45,7 +45,9 @@ class lc7582_device : public device_t
void inh_w(int state) { m_blank = bool(state); refresh_output(); }
protected:
- // device-level overrides
+ lc7580_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
+ // device_t implementation
virtual void device_start() override;
private:
@@ -65,7 +67,14 @@ class lc7582_device : public device_t
devcb_write64 m_write_segs;
};
+class lc7582_device : public lc7580_device
+{
+public:
+ lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(LC7580, lc7580_device)
DECLARE_DEVICE_TYPE(LC7582, lc7582_device)
-#endif // MAME_VIDEO_LC7582_H
+#endif // MAME_VIDEO_LC7580_H
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index d9dd075621d..aebada89fa9 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -58,6 +58,7 @@
#define LOG_WARN (1U << 1)
#define LOG_REGS (1U << 2) // deprecated
#define LOG_DSW (1U << 3) // Input sense at $3c2
+#define LOG_CRTC (1U << 4) // CRTC setups with monitor geometry
#define VERBOSE (LOG_GENERAL | LOG_WARN | LOG_DSW)
//#define LOG_OUTPUT_FUNC osd_printf_info
@@ -66,6 +67,7 @@
#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__)
#define LOGREGS(...) LOGMASKED(LOG_REGS, __VA_ARGS__)
#define LOGDSW(...) LOGMASKED(LOG_DSW, __VA_ARGS__)
+#define LOGCRTC(...) LOGMASKED(LOG_CRTC, __VA_ARGS__)
/***************************************************************************
@@ -665,9 +667,11 @@ void vga_device::crtc_map(address_map &map)
}),
NAME([this](offs_t offset, u8 data) {
// doom (DOS) tries to write to protected regs
+ LOGCRTC("CR00 H total %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
vga.crtc.horz_total = (vga.crtc.horz_total & ~0xff) | (data & 0xff);
+ LOGCRTC("%04d\n", vga.crtc.horz_total);
recompute_params();
})
);
@@ -676,9 +680,11 @@ void vga_device::crtc_map(address_map &map)
return vga.crtc.horz_disp_end & 0xff;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR01 H display end %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
- vga.crtc.horz_disp_end = (data & 0xff);
+ vga.crtc.horz_disp_end = (vga.crtc.horz_disp_end & ~0xff) | (data & 0xff);
+ LOGCRTC("%04d\n", vga.crtc.horz_disp_end);
recompute_params();
})
);
@@ -687,9 +693,11 @@ void vga_device::crtc_map(address_map &map)
return vga.crtc.horz_blank_start & 0xff;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR02 H start blank %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
- vga.crtc.horz_blank_start = (data & 0xff);
+ vga.crtc.horz_blank_start = (vga.crtc.horz_blank_start & ~0xff) | (data & 0xff);
+ LOGCRTC("%04d\n", vga.crtc.horz_blank_start);
})
);
map(0x03, 0x03).lrw8(
@@ -700,12 +708,14 @@ void vga_device::crtc_map(address_map &map)
return res;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR03 H blank end %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
vga.crtc.horz_blank_end &= ~0x1f;
vga.crtc.horz_blank_end |= data & 0x1f;
vga.crtc.disp_enable_skew = (data & 0x60) >> 5;
vga.crtc.evra = BIT(data, 7);
+ LOGCRTC("%04d evra %d display enable skew %01x\n", vga.crtc.horz_blank_end, vga.crtc.evra, vga.crtc.disp_enable_skew);
})
);
map(0x04, 0x04).lrw8(
@@ -713,9 +723,11 @@ void vga_device::crtc_map(address_map &map)
return vga.crtc.horz_retrace_start & 0xff;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR04 H retrace start %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
- vga.crtc.horz_retrace_start = data & 0xff;
+ vga.crtc.horz_retrace_start = (vga.crtc.horz_retrace_start & ~0xff) | (data & 0xff);
+ LOGCRTC("%04d\n", vga.crtc.horz_retrace_start);
})
);
map(0x05, 0x05).lrw8(
@@ -726,12 +738,18 @@ void vga_device::crtc_map(address_map &map)
return res;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR05 H blank end %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
vga.crtc.horz_blank_end &= ~0x20;
vga.crtc.horz_blank_end |= ((data & 0x80) >> 2);
vga.crtc.horz_retrace_skew = ((data & 0x60) >> 5);
- vga.crtc.horz_retrace_end = data & 0x1f;
+ vga.crtc.horz_retrace_end = (vga.crtc.horz_retrace_end & ~0x1f) | (data & 0x1f);
+ LOGCRTC("%04d retrace skew %01d retrace end %02d\n"
+ , vga.crtc.horz_blank_end
+ , vga.crtc.horz_retrace_skew
+ , vga.crtc.horz_retrace_end
+ );
})
);
map(0x06, 0x06).lrw8(
@@ -739,10 +757,12 @@ void vga_device::crtc_map(address_map &map)
return vga.crtc.vert_total & 0xff;
}),
NAME([this](offs_t offset, u8 data) {
+ LOGCRTC("CR06 V total %02x %s", data, vga.crtc.protect_enable ? "P?\n" : "-> ");
if(vga.crtc.protect_enable)
return;
vga.crtc.vert_total &= ~0xff;
vga.crtc.vert_total |= data & 0xff;
+ LOGCRTC("%04d\n", vga.crtc.vert_total);
recompute_params();
})
);
@@ -762,6 +782,7 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.line_compare &= ~0x100;
vga.crtc.line_compare |= ((data & 0x10) << (8-4));
+ LOGCRTC("CR07 Overflow %02x -> line compare %04d %s", data, vga.crtc.line_compare, vga.crtc.protect_enable ? "P?\n" : "");
if(vga.crtc.protect_enable)
return;
vga.crtc.vert_total &= ~0x300;
@@ -775,6 +796,12 @@ void vga_device::crtc_map(address_map &map)
vga.crtc.vert_retrace_start |= ((data & 0x04) << (8-2));
vga.crtc.vert_disp_end |= ((data & 0x02) << (8-1));
vga.crtc.vert_total |= ((data & 0x01) << (8-0));
+ LOGCRTC("V total %04d V retrace start %04d V display end %04d V blank start %04d\n"
+ , vga.crtc.vert_total
+ , vga.crtc.vert_retrace_start
+ , vga.crtc.vert_disp_end
+ , vga.crtc.vert_blank_start
+ );
recompute_params();
})
);
@@ -788,6 +815,11 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.byte_panning = (data & 0x60) >> 5;
vga.crtc.preset_row_scan = (data & 0x1f);
+ LOGCRTC("CR08 Preset Row Scan %02x -> %02d byte panning %d\n"
+ , data
+ , vga.crtc.preset_row_scan
+ , vga.crtc.byte_panning
+ );
})
);
// Maximum Scan Line Register
@@ -806,6 +838,13 @@ void vga_device::crtc_map(address_map &map)
vga.crtc.line_compare |= ((data & 0x40) << (9-6));
vga.crtc.vert_blank_start |= ((data & 0x20) << (9-5));
vga.crtc.maximum_scan_line = (data & 0x1f) + 1;
+ LOGCRTC("CR09 Maximum Scan Line %02x -> %02d V blank start %04d line compare %04d scan doubling %d\n"
+ , data
+ , vga.crtc.maximum_scan_line
+ , vga.crtc.vert_blank_start
+ , vga.crtc.line_compare
+ , vga.crtc.scan_doubling
+ );
})
);
map(0x0a, 0x0a).lrw8(
@@ -855,6 +894,7 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.vert_retrace_start &= ~0xff;
vga.crtc.vert_retrace_start |= data & 0xff;
+ LOGCRTC("CR10 V retrace start %02x -> %04d\n", data, vga.crtc.vert_retrace_start);
})
);
map(0x11, 0x11).lrw8(
@@ -869,9 +909,17 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.protect_enable = (data & 0x80) >> 7;
vga.crtc.bandwidth = (data & 0x40) >> 6;
- vga.crtc.vert_retrace_end = data & 0x0f;
+ vga.crtc.vert_retrace_end = (vga.crtc.vert_retrace_end & ~0xf) | (data & 0x0f);
+ // TODO: these two doesn't seem part of the spec
vga.crtc.irq_clear = (data & 0x10) >> 4;
vga.crtc.irq_disable = (data & 0x20) >> 5;
+ LOGCRTC("CR11 V retrace end %02x -> %02d protect enable %d bandwidth %d irq %02x\n"
+ , data
+ , vga.crtc.vert_retrace_end
+ , vga.crtc.protect_enable
+ , vga.crtc.bandwidth
+ , data & 0x30
+ );
})
);
map(0x12, 0x12).lrw8(
@@ -881,6 +929,7 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.vert_disp_end &= ~0xff;
vga.crtc.vert_disp_end |= data & 0xff;
+ LOGCRTC("CR12 V display end %02x -> %04d\n", data, vga.crtc.vert_disp_end);
recompute_params();
})
);
@@ -913,6 +962,7 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.vert_blank_start &= ~0xff;
vga.crtc.vert_blank_start |= data & 0xff;
+ LOGCRTC("CR15 V blank start %02x -> %04d\n", data, vga.crtc.vert_blank_start);
})
);
map(0x16, 0x16).lrw8(
@@ -920,7 +970,8 @@ void vga_device::crtc_map(address_map &map)
return vga.crtc.vert_blank_end & 0x7f;
}),
NAME([this](offs_t offset, u8 data) {
- vga.crtc.vert_blank_end = data & 0x7f;
+ vga.crtc.vert_blank_end = (vga.crtc.vert_blank_end & ~0x7f) | (data & 0x7f);
+ LOGCRTC("CR16 V blank end %02x -> %04d\n", data, vga.crtc.vert_blank_end);
})
);
map(0x17, 0x17).lrw8(
@@ -942,6 +993,18 @@ void vga_device::crtc_map(address_map &map)
vga.crtc.sldiv = BIT(data, 2);
vga.crtc.map14 = BIT(data, 1);
vga.crtc.map13 = BIT(data, 0);
+ LOGCRTC("CR17 Mode control %02x -> Sync Enable %d Word/Byte %d Address Wrap select %d\n"
+ , data
+ , vga.crtc.sync_en
+ , vga.crtc.word_mode
+ , vga.crtc.aw
+ );
+ LOGCRTC("\tDIV2 %d Scan Line Divide %d MAP14 %d MAP13 %d\n"
+ , vga.crtc.div2
+ , vga.crtc.sldiv
+ , vga.crtc.map14
+ , vga.crtc.map13
+ );
})
);
map(0x18, 0x18).lrw8(
@@ -951,6 +1014,7 @@ void vga_device::crtc_map(address_map &map)
NAME([this](offs_t offset, u8 data) {
vga.crtc.line_compare &= ~0xff;
vga.crtc.line_compare |= data & 0xff;
+ LOGCRTC("CR18 Line Compare %02x -> %04d\n", data, vga.crtc.line_compare);
})
);
// TODO: (undocumented) CR22 Memory Data Latch Register (read only)
diff --git a/src/emu/inpttype.ipp b/src/emu/inpttype.ipp
index d85b693c255..88905516ad2 100644
--- a/src/emu/inpttype.ipp
+++ b/src/emu/inpttype.ipp
@@ -872,63 +872,63 @@ namespace {
// Pause on pause key (replace pause definition below, and add backslash at end if you want to use this)
// INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PAUSE, N_p("input-name", "Pause"), input_seq(KEYCODE_NUMLOCK, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) )
-#define CORE_INPUT_TYPES_UI \
- CORE_INPUT_TYPES_BEGIN(ui) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_MENU, N_p("input-name", "Show/Hide Menu"), input_seq(KEYCODE_TAB)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SELECT, N_p("input-name", "UI Select"), input_seq(KEYCODE_ENTER, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_RALT, input_seq::or_code, KEYCODE_ENTER_PAD)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_BACK, N_p("input-name", "UI Back"), input_seq(KEYCODE_ESC)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_CANCEL, N_p("input-name", "UI Cancel"), input_seq(KEYCODE_ESC)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_CLEAR, N_p("input-name", "UI Clear"), input_seq(KEYCODE_DEL)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_HELP, N_p("input-name", "UI Help"), input_seq(KEYCODE_F1)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_UP, N_p("input-name", "UI Up"), input_seq(KEYCODE_UP)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_DOWN, N_p("input-name", "UI Down"), input_seq(KEYCODE_DOWN)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_LEFT, N_p("input-name", "UI Left"), input_seq(KEYCODE_LEFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_RIGHT, N_p("input-name", "UI Right"), input_seq(KEYCODE_RIGHT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_HOME, N_p("input-name", "UI Home"), input_seq(KEYCODE_HOME)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_END, N_p("input-name", "UI End"), input_seq(KEYCODE_END)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PAGE_UP, N_p("input-name", "UI Page Up"), input_seq(KEYCODE_PGUP)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PAGE_DOWN, N_p("input-name", "UI Page Down"), input_seq(KEYCODE_PGDN)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PREV_GROUP, N_p("input-name", "UI Previous Group"), input_seq(KEYCODE_OPENBRACE)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_NEXT_GROUP, N_p("input-name", "UI Next Group"), input_seq(KEYCODE_CLOSEBRACE)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_ON_SCREEN_DISPLAY, N_p("input-name", "On Screen Display"), input_seq(KEYCODE_TILDE)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_TOGGLE_UI, N_p("input-name", "Toggle UI Controls"), input_seq(KEYCODE_SCRLOCK, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_DEBUG_BREAK, N_p("input-name", "Break in Debugger"), input_seq(KEYCODE_TILDE)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PAUSE, N_p("input-name", "Pause"), input_seq(KEYCODE_F5, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PAUSE_SINGLE, N_p("input-name", "Pause - Single Step"), input_seq(KEYCODE_F5, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F5, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_REWIND_SINGLE, N_p("input-name", "Rewind - Single Step"), input_seq(KEYCODE_F4, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F4, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SAVE_STATE, N_p("input-name", "Save State"), input_seq(KEYCODE_F6, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SAVE_STATE_QUICK, N_p("input-name", "Quick Save State"), input_seq(KEYCODE_F6, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F6, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_LOAD_STATE, N_p("input-name", "Load State"), input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_LOAD_STATE_QUICK, N_p("input-name", "Quick Load State"), input_seq(KEYCODE_F7, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F7, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_RESET_MACHINE, N_p("input-name", "Reset Machine"), input_seq(KEYCODE_F3, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F3, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SOFT_RESET, N_p("input-name", "Soft Reset"), input_seq(KEYCODE_F3, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SHOW_GFX, N_p("input-name", "Show Decoded Graphics"), input_seq(KEYCODE_F4, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FRAMESKIP_DEC, N_p("input-name", "Frameskip Dec"), input_seq(KEYCODE_F8, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FRAMESKIP_INC, N_p("input-name", "Frameskip Inc"), input_seq(KEYCODE_F9)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_THROTTLE, N_p("input-name", "Throttle"), input_seq(KEYCODE_F10)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FAST_FORWARD, N_p("input-name", "Fast Forward"), input_seq(KEYCODE_INSERT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SHOW_FPS, N_p("input-name", "Show FPS"), input_seq(KEYCODE_F11, input_seq::not_code, KEYCODE_LSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SNAPSHOT, N_p("input-name", "Save Snapshot"), input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_RECORD_MNG, N_p("input-name", "Record MNG"), input_seq(KEYCODE_F12, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LCONTROL)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_RECORD_AVI, N_p("input-name", "Record AVI"), input_seq(KEYCODE_F12, KEYCODE_LSHIFT, KEYCODE_LCONTROL)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_TOGGLE_CHEAT, N_p("input-name", "Toggle Cheat"), input_seq(KEYCODE_F8, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F8, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_DISPLAY_COMMENT, N_p("input-name", "UI Display Comment"), input_seq(KEYCODE_SPACE)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_ZOOM_IN, N_p("input-name", "UI Zoom In"), input_seq(KEYCODE_EQUALS)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_ZOOM_OUT, N_p("input-name", "UI Zoom Out"), input_seq(KEYCODE_MINUS)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_ZOOM_DEFAULT, N_p("input-name", "UI Default Zoom"), input_seq(KEYCODE_0)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_ROTATE, N_p("input-name", "UI Rotate"), input_seq(KEYCODE_R)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_SHOW_PROFILER, N_p("input-name", "Show Profiler"), input_seq(KEYCODE_F11, KEYCODE_LSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_RELEASE_POINTER, N_p("input-name", "UI Release Pointer"), input_seq(KEYCODE_RCONTROL, KEYCODE_RALT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_PASTE, N_p("input-name", "UI Paste Text"), input_seq(KEYCODE_PGDN, KEYCODE_RSHIFT) ) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_TAPE_START, N_p("input-name", "UI (First) Tape Start"), input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_TAPE_STOP, N_p("input-name", "UI (First) Tape Stop"), input_seq(KEYCODE_F2, KEYCODE_LSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FOCUS_NEXT, N_p("input-name", "UI Focus Next"), input_seq(KEYCODE_TAB, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FOCUS_PREV, N_p("input-name", "UI Focus Previous"), input_seq(KEYCODE_TAB, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_TAB, KEYCODE_RSHIFT)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_DATS, N_p("input-name", "UI External DAT View"), input_seq(KEYCODE_LALT, KEYCODE_D)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_FAVORITES, N_p("input-name", "UI Add/Remove Favorite"), input_seq(KEYCODE_LALT, KEYCODE_F)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_EXPORT, N_p("input-name", "UI Export List"), input_seq(KEYCODE_LALT, KEYCODE_E)) \
- INPUT_PORT_DIGITAL_TYPE(0, UI, UI_AUDIT, N_p("input-name", "UI Audit Media"), input_seq(KEYCODE_F1, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT)) \
- CORE_INPUT_TYPES_END()
+#define CORE_INPUT_TYPES_UI \
+ CORE_INPUT_TYPES_BEGIN(ui) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_MENU, N_p("input-name", "Show/Hide Menu"), input_seq(KEYCODE_TAB) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SELECT, N_p("input-name", "UI Select"), input_seq(KEYCODE_ENTER, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_RALT, input_seq::or_code, KEYCODE_ENTER_PAD) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_BACK, N_p("input-name", "UI Back"), input_seq(KEYCODE_ESC) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CANCEL, N_p("input-name", "UI Cancel"), input_seq(KEYCODE_ESC) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CLEAR, N_p("input-name", "UI Clear"), input_seq(KEYCODE_DEL) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HELP, N_p("input-name", "UI Help"), input_seq(KEYCODE_F1) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP, N_p("input-name", "UI Up"), input_seq(KEYCODE_UP) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN, N_p("input-name", "UI Down"), input_seq(KEYCODE_DOWN) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT, N_p("input-name", "UI Left"), input_seq(KEYCODE_LEFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT, N_p("input-name", "UI Right"), input_seq(KEYCODE_RIGHT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HOME, N_p("input-name", "UI Home"), input_seq(KEYCODE_HOME) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_END, N_p("input-name", "UI End"), input_seq(KEYCODE_END) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_UP, N_p("input-name", "UI Page Up"), input_seq(KEYCODE_PGUP) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_DOWN, N_p("input-name", "UI Page Down"), input_seq(KEYCODE_PGDN) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PREV_GROUP, N_p("input-name", "UI Previous Group"), input_seq(KEYCODE_OPENBRACE) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_NEXT_GROUP, N_p("input-name", "UI Next Group"), input_seq(KEYCODE_CLOSEBRACE) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ON_SCREEN_DISPLAY, N_p("input-name", "On Screen Display"), input_seq(KEYCODE_TILDE) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_UI, N_p("input-name", "Toggle UI Controls"), input_seq(KEYCODE_SCRLOCK, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DEBUG_BREAK, N_p("input-name", "Break in Debugger"), input_seq(KEYCODE_TILDE) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, N_p("input-name", "Pause"), input_seq(KEYCODE_F5, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE_SINGLE, N_p("input-name", "Pause - Single Step"), input_seq(KEYCODE_F5, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F5, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_REWIND_SINGLE, N_p("input-name", "Rewind - Single Step"), input_seq(KEYCODE_F4, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F4, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SAVE_STATE, N_p("input-name", "Save State"), input_seq(KEYCODE_F6, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SAVE_STATE_QUICK, N_p("input-name", "Quick Save State"), input_seq(KEYCODE_F6, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F6, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, N_p("input-name", "Load State"), input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE_QUICK, N_p("input-name", "Quick Load State"), input_seq(KEYCODE_F7, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F7, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RESET_MACHINE, N_p("input-name", "Reset Machine"), input_seq(KEYCODE_F3, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F3, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SOFT_RESET, N_p("input-name", "Soft Reset"), input_seq(KEYCODE_F3, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_GFX, N_p("input-name", "Show Decoded Graphics"), input_seq(KEYCODE_F4, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FRAMESKIP_DEC, N_p("input-name", "Frameskip Dec"), input_seq(KEYCODE_F8, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FRAMESKIP_INC, N_p("input-name", "Frameskip Inc"), input_seq(KEYCODE_F9) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_THROTTLE, N_p("input-name", "Throttle"), input_seq(KEYCODE_F10) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAST_FORWARD, N_p("input-name", "Fast Forward"), input_seq(KEYCODE_INSERT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_FPS, N_p("input-name", "Show FPS"), input_seq(KEYCODE_F11, input_seq::not_code, KEYCODE_LSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SNAPSHOT, N_p("input-name", "Save Snapshot"), input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RECORD_MNG, N_p("input-name", "Record MNG"), input_seq(KEYCODE_F12, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LCONTROL) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RECORD_AVI, N_p("input-name", "Record AVI"), input_seq(KEYCODE_F12, KEYCODE_LSHIFT, KEYCODE_LCONTROL) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_CHEAT, N_p("input-name", "Toggle Cheat"), input_seq(KEYCODE_F8, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_F8, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DISPLAY_COMMENT, N_p("input-name", "UI Display Comment"), input_seq(KEYCODE_SPACE) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ZOOM_IN, N_p("input-name", "UI Zoom In"), input_seq(KEYCODE_EQUALS) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ZOOM_OUT, N_p("input-name", "UI Zoom Out"), input_seq(KEYCODE_MINUS) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ZOOM_DEFAULT, N_p("input-name", "UI Default Zoom"), input_seq(KEYCODE_0) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ROTATE, N_p("input-name", "UI Rotate"), input_seq(KEYCODE_R) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_PROFILER, N_p("input-name", "Show Profiler"), input_seq(KEYCODE_F11, KEYCODE_LSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RELEASE_POINTER, N_p("input-name", "UI Release Pointer"), input_seq(KEYCODE_RCONTROL, KEYCODE_RALT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PASTE, N_p("input-name", "UI Paste Text"), input_seq(KEYCODE_PGDN, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_START, N_p("input-name", "UI (First) Tape Start"), input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_STOP, N_p("input-name", "UI (First) Tape Stop"), input_seq(KEYCODE_F2, KEYCODE_LSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FOCUS_NEXT, N_p("input-name", "UI Focus Next"), input_seq(KEYCODE_TAB, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FOCUS_PREV, N_p("input-name", "UI Focus Previous"), input_seq(KEYCODE_TAB, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_TAB, KEYCODE_RSHIFT) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DATS, N_p("input-name", "UI External DAT View"), input_seq(KEYCODE_LALT, KEYCODE_D) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAVORITES, N_p("input-name", "UI Add/Remove Favorite"), input_seq(KEYCODE_LALT, KEYCODE_F) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_EXPORT, N_p("input-name", "UI Export List"), input_seq(KEYCODE_LALT, KEYCODE_E) ) \
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT, N_p("input-name", "UI Audit Media"), input_seq(KEYCODE_F1, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) \
+ CORE_INPUT_TYPES_END()
#define CORE_INPUT_TYPES_OSD \
CORE_INPUT_TYPES_BEGIN(osd) \
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index fd321949327..b70eecba287 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -863,6 +863,7 @@ void running_machine::handle_saveload()
if (!m_saveload_pending_file.empty())
{
const char *const opname = (m_saveload_schedule == saveload_schedule::LOAD) ? "load" : "save";
+ const char *const preposname = (m_saveload_schedule == saveload_schedule::LOAD) ? "from" : "to";
// if there are anonymous timers, we can't save just yet, and we can't load yet either
// because the timers might overwrite data we have loaded
@@ -870,7 +871,7 @@ void running_machine::handle_saveload()
{
// if more than a second has passed, we're probably screwed
if ((this->time() - m_saveload_schedule_time) > attotime::from_seconds(1))
- popmessage("Unable to %s due to pending anonymous timers. See error.log for details.", opname);
+ popmessage("Error: Unable to %s state %s %s due to pending anonymous timers. See error.log for details.", opname, preposname, m_saveload_pending_file);
else
return; // return without cancelling the operation
}
@@ -883,8 +884,6 @@ void running_machine::handle_saveload()
auto const filerr = file.open(m_saveload_pending_file);
if (!filerr)
{
- const char *const opnamed = (m_saveload_schedule == saveload_schedule::LOAD) ? "loaded" : "saved";
-
// read/write the save state
save_error saverr = (m_saveload_schedule == saveload_schedule::LOAD) ? m_save.read_file(file) : m_save.write_file(file);
@@ -892,30 +891,33 @@ void running_machine::handle_saveload()
switch (saverr)
{
case STATERR_ILLEGAL_REGISTRATIONS:
- popmessage("Error: Unable to %s state due to illegal registrations. See error.log for details.", opname);
+ popmessage("Error: Unable to %s state %s %s due to illegal registrations. See error.log for details.", opname, preposname, m_saveload_pending_file);
break;
case STATERR_INVALID_HEADER:
- popmessage("Error: Unable to %s state due to an invalid header. Make sure the save state is correct for this machine.", opname);
+ popmessage("Error: Unable to %s state %s %s due to an invalid header. Make sure the save state is correct for this system.", opname, preposname, m_saveload_pending_file);
break;
case STATERR_READ_ERROR:
- popmessage("Error: Unable to %s state due to a read error (file is likely corrupt).", opname);
+ popmessage("Error: Unable to %s state %s %s due to a read error (file is likely corrupt).", opname, preposname, m_saveload_pending_file);
break;
case STATERR_WRITE_ERROR:
- popmessage("Error: Unable to %s state due to a write error. Verify there is enough disk space.", opname);
+ popmessage("Error: Unable to %s state %s %s due to a write error. Verify there is enough disk space.", opname, preposname, m_saveload_pending_file);
break;
case STATERR_NONE:
+ {
+ const char *const opnamed = (m_saveload_schedule == saveload_schedule::LOAD) ? "Loaded" : "Saved";
if (!(m_system.flags & MACHINE_SUPPORTS_SAVE))
- popmessage("State successfully %s.\nWarning: Save states are not officially supported for this machine.", opnamed);
+ popmessage("%s state %s %s.\nWarning: Save states are not officially supported for this system.", opnamed, preposname, m_saveload_pending_file);
else
- popmessage("State successfully %s.", opnamed);
+ popmessage("%s state %s %s.", opnamed, preposname, m_saveload_pending_file);
break;
+ }
default:
- popmessage("Error: Unknown error during state %s.", opnamed);
+ popmessage("Error: Unknown error during %s state %s %s.", opname, preposname, m_saveload_pending_file);
break;
}
@@ -926,11 +928,11 @@ void running_machine::handle_saveload()
else if ((openflags == OPEN_FLAG_READ) && (std::errc::no_such_file_or_directory == filerr))
{
// attempt to load a non-existent savestate, report empty slot
- popmessage("Error: No savestate file to load.", opname);
+ popmessage("Error: Load state file %s not found.", m_saveload_pending_file);
}
else
{
- popmessage("Error: Failed to open file for %s operation.", opname);
+ popmessage("Error: Failed to open %s for %s state operation.", m_saveload_pending_file, opname);
}
}
}
diff --git a/src/frontend/mame/ui/cheatopt.cpp b/src/frontend/mame/ui/cheatopt.cpp
index 4338061f1ca..c8457a1403b 100644
--- a/src/frontend/mame/ui/cheatopt.cpp
+++ b/src/frontend/mame/ui/cheatopt.cpp
@@ -101,8 +101,8 @@ bool menu_cheat::handle(event const *ev)
mame_machine_manager::instance()->cheat().reload();
// display the reloaded cheats
- reset(reset_options::REMEMBER_REF);
machine().popmessage(_("All cheats reloaded"));
+ changed = true;
}
// if things changed, update
@@ -130,17 +130,14 @@ void menu_cheat::menu_activated()
void menu_cheat::populate()
{
- // iterate over cheats
- std::string text;
- std::string subtext;
+ const bool empty = mame_machine_manager::instance()->cheat().entries().empty();
- // add global enable toggle
- item_append_on_off(_("Cheat Engine"), mame_machine_manager::instance()->cheat().enabled(), 0, (void *)ITEMREF_CHEATS_ENABLE);
- item_append(menu_item_type::SEPARATOR);
-
- // add cheats
- if (!mame_machine_manager::instance()->cheat().entries().empty())
+ // iterate over cheats
+ if (!empty)
{
+ std::string text;
+ std::string subtext;
+
for (auto &curcheat : mame_machine_manager::instance()->cheat().entries())
{
uint32_t flags;
@@ -150,17 +147,23 @@ void menu_cheat::populate()
else
item_append(text, subtext, flags, curcheat.get());
}
-
- item_append(menu_item_type::SEPARATOR);
-
- // add a reset all option
- item_append(_("Reset All"), 0, (void *)ITEMREF_CHEATS_RESET_ALL);
}
else
{
// indicate that none were found
item_append(_("[no cheats found]"), FLAG_DISABLE, nullptr);
+ }
+
+ item_append(menu_item_type::SEPARATOR);
+
+ if (!empty)
+ {
+ // add global enable toggle
+ item_append_on_off(_("Enable Cheats"), mame_machine_manager::instance()->cheat().enabled(), 0, (void *)ITEMREF_CHEATS_ENABLE);
item_append(menu_item_type::SEPARATOR);
+
+ // add a reset all option
+ item_append(_("Reset All"), 0, (void *)ITEMREF_CHEATS_RESET_ALL);
}
// add a reload all cheats option
diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp
index a109b95e840..22a2c01f6c1 100644
--- a/src/frontend/mame/ui/mainmenu.cpp
+++ b/src/frontend/mame/ui/mainmenu.cpp
@@ -65,8 +65,7 @@ enum : unsigned {
BARCODE_READ,
PTY_INFO,
EXTERNAL_DATS,
- ADD_FAVORITE,
- REMOVE_FAVORITE,
+ FAVORITE,
ABOUT,
QUIT_GAME,
DISMISS,
@@ -180,9 +179,9 @@ void menu_main::populate()
item_append(menu_item_type::SEPARATOR);
if (!mame_machine_manager::instance()->favorite().is_favorite(machine()))
- item_append(_("menu-main", "Add To Favorites"), 0, (void *)ADD_FAVORITE);
+ item_append(_("menu-main", "Add To Favorites"), 0, (void *)FAVORITE);
else
- item_append(_("menu-main", "Remove From Favorites"), 0, (void *)REMOVE_FAVORITE);
+ item_append(_("menu-main", "Remove From Favorites"), 0, (void *)FAVORITE);
item_append(menu_item_type::SEPARATOR);
@@ -306,15 +305,16 @@ bool menu_main::handle(event const *ev)
menu::stack_push(ui(), container());
break;
- case ADD_FAVORITE:
- mame_machine_manager::instance()->favorite().add_favorite(machine());
- reset(reset_options::REMEMBER_REF);
- break;
-
- case REMOVE_FAVORITE:
- mame_machine_manager::instance()->favorite().remove_favorite(machine());
+ case FAVORITE:
+ {
+ favorite_manager &mfav = mame_machine_manager::instance()->favorite();
+ if (mfav.is_favorite(machine()))
+ mfav.remove_favorite(machine());
+ else
+ mfav.add_favorite(machine());
reset(reset_options::REMEMBER_REF);
break;
+ }
case QUIT_GAME:
stack_pop();
diff --git a/src/lib/formats/fs_fat.cpp b/src/lib/formats/fs_fat.cpp
index 7cea0d6a168..4aad4f6b573 100644
--- a/src/lib/formats/fs_fat.cpp
+++ b/src/lib/formats/fs_fat.cpp
@@ -836,6 +836,12 @@ void pc_fat_image::enumerate_f(floppy_enumerator &fe) const
fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_35, floppy_image::DSDD, 737280, "pc_fat_dsdd", "PC FAT 3.5\" dual-sided double density");
fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_35, floppy_image::DSHD, 1474560, "pc_fat_dshd", "PC FAT 3.5\" dual-sided high density");
fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_35, floppy_image::DSED, 2949120, "pc_fat_dsed", "PC FAT 3.5\" dual-sided extra density");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::SSDD, 163840, "pc_fat_525ssdd_8", "PC FAT 5.25\" single-sided double density, 8 sectors/track");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::SSDD, 184320, "pc_fat_525ssdd", "PC FAT 5.25\" single-sided double density, 9 sectors/track");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::DSDD, 327680, "pc_fat_525dsdd_8", "PC FAT 5.25\" dual-sided double density, 8 sectors/track");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::DSDD, 368640, "pc_fat_525dsdd", "PC FAT 5.25\" dual-sided double density, 9 sectors/track");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::DSQD, 737280, "pc_fat_525dsqd", "PC FAT 5.25\" dual-sided quad density");
+ fe.add(FLOPPY_PC_FORMAT, floppy_image::FF_525, floppy_image::DSHD, 1228800, "pc_fat_525dshd", "PC FAT 5.25\" dual-sided high density");
}
diff --git a/src/lib/formats/h8_cas.cpp b/src/lib/formats/h8_cas.cpp
index c0d5d6dd925..e1eabf7baf2 100644
--- a/src/lib/formats/h8_cas.cpp
+++ b/src/lib/formats/h8_cas.cpp
@@ -7,16 +7,31 @@ Support for Heathkit H8 H8T cassette images
Standard Kansas City format (300 baud)
+TODO - investigate 1200 buad support, H8 should support it, but H88 does not.
+
We output a leader, followed by the contents of the H8T file.
********************************************************************/
#include "h8_cas.h"
-#define WAVEENTRY_LOW -32768
-#define WAVEENTRY_HIGH 32767
+#include
+
+
+static constexpr uint16_t WAVEENTRY_LOW = -32768;
+static constexpr uint16_t WAVEENTRY_HIGH = 32767;
+static constexpr uint16_t SILENCE = 0;
+
+// using a multiple of 4800 will ensure an integer multiple of samples for each wave.
+static constexpr uint16_t H8_WAV_FREQUENCY = 9600;
+static constexpr uint16_t TAPE_BAUD_RATE = 300;
+static constexpr uint16_t SAMPLES_PER_BIT = H8_WAV_FREQUENCY / TAPE_BAUD_RATE;
+static constexpr uint16_t SAMPLES_PER_HALF_WAVE = SAMPLES_PER_BIT / 2;
-#define H8_WAV_FREQUENCY 9600
+static constexpr uint16_t ONE_FREQ = 1200;
+static constexpr uint16_t ZERO_FREQ = 2400;
+static constexpr uint16_t ONE_CYCLES = H8_WAV_FREQUENCY / ONE_FREQ;
+static constexpr uint16_t ZERO_CYCLES = H8_WAV_FREQUENCY / ZERO_FREQ;
// image size
static int h8_image_size; // FIXME: global variable prevents multiple instances
@@ -25,8 +40,7 @@ static int h8_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
if (buffer)
{
- for (int i=0; i> i) & 1);
+ for (int i = 0; i < 8; i++)
+ {
+ samples += h8_output_bit(buffer, sample_pos + samples, data & 1);
+ data >>= 1;
+ }
- // stop bits
- for (i = 0; i<2; i++)
- samples += h8_output_bit (buffer, sample_pos + samples, 1);
+ // stop bit
+ samples += h8_output_bit(buffer, sample_pos + samples, 1);
return samples;
}
static int h8_handle_cassette(int16_t *buffer, const uint8_t *bytes)
{
- uint32_t sample_count = 0;
- uint32_t byte_count = 0;
- uint32_t i;
-
+ int sample_count = 0;
- // leader
- for (i=0; i<2000; i++)
+ // leader - 1 second
+ for (int i = 0; i < TAPE_BAUD_RATE; i++)
sample_count += h8_output_bit(buffer, sample_count, 1);
// data
- for (i=byte_count; ibase();
+ cmos[0x30] = 0x20; // *Configure Autoboot On
+ cmos[0x36] = 0x01; // *Configure Netboot On
+ cmos[0xb4] = 0x24; // *Configure Romboard 1 1 1024 *Configure Romboard 1 2 1024
cmos[0xc7] = 0x00; // *Configure Floppies 0
}
@@ -417,7 +421,8 @@ void aabase_state::init_hd()
{
//u8 *cmos = memregion("i2cmem")->base();
- //cmos[0x0b] = 0x04; // *Configure Drive 4
+ //cmos[0x4b] = 0x54; // *Configure Drive 4
+ //cmos[0x50] = 0x90; // *Configure Boot
//cmos[0xc7] = 0x09; // *Configure HardDiscs 1
}
@@ -425,7 +430,7 @@ void aabase_state::init_scsi()
{
//u8 *cmos = memregion("i2cmem")->base();
- //cmos[0x0b] = 0x04; // *Configure Drive 4
+ //cmos[0x4b] = 0x54; // *Configure Drive 4
//cmos[0xc7] = 0x08; // *Configure SCSIFSdiscs 1
}
@@ -433,7 +438,16 @@ void aabase_state::init_ide()
{
u8 *cmos = memregion("i2cmem")->base();
- cmos[0x0b] = 0x04; // *Configure Drive 4
+ cmos[0x4b] = 0x54; // *Configure Drive 4
+ cmos[0xc7] = 0x41; // *Configure IDEDiscs 1
+}
+
+void aabase_state::init_a4()
+{
+ u8 *cmos = memregion("i2cmem")->base();
+
+ cmos[0x28] = 0x01; // !BatMgr
+ cmos[0x4b] = 0x54; // *Configure Drive 4
cmos[0xc7] = 0x41; // *Configure IDEDiscs 1
}
@@ -878,7 +892,7 @@ void aa680_state::machine_reset()
address_space &program = m_maincpu->space(AS_PROGRAM);
// install hexadecimal display
- program.install_read_tap(0x3400000, 0x3420003, "rom_shadow_r",[this](offs_t offset, u32 &data, u32 mem_mask)
+ program.install_read_tap(0x3400000, 0x3420003, "rom_shadow_bank_r", [this](offs_t offset, u32 &data, u32 mem_mask)
{
if (!machine().side_effects_disabled())
{
@@ -932,7 +946,7 @@ void aabase_state::memc_map(address_map &map)
map(0x03000000, 0x0300ffff).rw(m_exp, FUNC(archimedes_exp_device::ms_r), FUNC(archimedes_exp_device::ms_w)).umask32(0x0000ffff);
map(0x03400000, 0x035fffff).nopr().w(m_vidc, FUNC(acorn_vidc10_device::write));
map(0x03600000, 0x037fffff).nopr().w(m_memc, FUNC(acorn_memc_device::registers_w));
- map(0x03800000, 0x03ffffff).rom().region("maincpu", 0).w(m_memc, FUNC(acorn_memc_device::page_w));
+ map(0x03800000, 0x039fffff).mirror(0x600000).rom().region("maincpu", 0).w(m_memc, FUNC(acorn_memc_device::page_w));
}
void aa680_state::memc_map(address_map &map)
@@ -1146,8 +1160,9 @@ void aa500_state::aa500(machine_config &config)
rs232.dsr_handler().set("acia", FUNC(mos6551_device::write_dsr));
//HD63463(config, m_hdc, 24_MHz_XTAL / 3);
- //m_hdc->intrq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
- //m_hdc->drq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il4_w));
+ //m_hdc->usel_callback().set([](u8 data) { return data - 1; });
+ //m_hdc->irq_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
+ //m_hdc->dreq_callback().set(m_ioc, FUNC(acorn_ioc_device::il4_w));
//HARDDISK(config, "hdc:0", "st506_hdd"); // 20MB HDD
//HARDDISK(config, "hdc:1", "st506_hdd");
@@ -1245,8 +1260,9 @@ void aa310_state::aa440(machine_config &config)
m_ram->set_default_size("4M");
//HD63463(config, m_hdc, 24_MHz_XTAL / 3);
- //m_hdc->intrq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
- //m_hdc->drq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
+ //m_hdc->usel_callback().set([](u8 data) { return data - 1; });
+ //m_hdc->irq_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
+ //m_hdc->dreq_callback().set(m_ioc, FUNC(acorn_ioc_device::il4_w));
//HARDDISK(config, "hdc:0", "st506_hdd"); // 20MB HDD
//HARDDISK(config, "hdc:1", "st506_hdd");
@@ -1382,8 +1398,9 @@ void aa310_state::aa4101(machine_config &config)
m_ram->set_default_size("1M").set_extra_options("2M,4M");
//HD63463(config, m_hdc, 24_MHz_XTAL / 3);
- //m_hdc->intrq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
- //m_hdc->drq_wr_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
+ //m_hdc->usel_callback().set([](u8 data) { return data - 1; });
+ //m_hdc->irq_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
+ //m_hdc->dreq_callback().set(m_ioc, FUNC(acorn_ioc_device::il3_w));
//HARDDISK(config, "hdc:0", "st506_hdd");
//HARDDISK(config, "hdc:1", "st506_hdd");
@@ -1444,8 +1461,8 @@ void aa310_state::ar225(machine_config &config)
m_floppy[1]->set_default_option(nullptr);
// expansion slots - 4-card backplane
- m_podule[0]->set_default_option("ether1"); // Acorn AKA25 Ethernet
- m_podule[1]->set_default_option("rom_aka05"); // Acorn AKA05 ROM (with PBOOT fitted)
+ m_podule[0]->set_default_option("ether1"); // Acorn AKA25 Ethernet
+ m_podule[1]->set_default_option("rom_r225boot"); // Acorn AKA05 ROM (with DiscLess Bootstrap support)
m_podule[2]->set_default_option(nullptr);
m_podule[3]->set_default_option(nullptr);
}
@@ -1666,7 +1683,7 @@ void aa5000_state::aa5000a(machine_config &config)
ROM_START( aa500 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "sn104", "#104: RISC OS 2.00 (12 Oct 1988)" ) // serial #41 has same ROMs
ROMX_LOAD( "a500_riscos206_0.ic24", 0x000000, 0x20000, CRC(60910286) SHA1(9bede102207d45dda07b4282a4cc4b4d2212704a), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "a500_riscos206_1.ic25", 0x000001, 0x20000, CRC(3e1aaa54) SHA1(c648c691e083117f9bb2459e4675401824a851b0), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1690,7 +1707,7 @@ ROM_START( aa500 )
ROM_END
ROM_START( aa500d )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "s249", "#249: Arthur 1.20 (25 Sep 1987)" ) // ex Logica, developers of Domesday software
ROMX_LOAD( "a500_arthur_12_0.ic24", 0x000000, 0x10000, CRC(3d61a13c) SHA1(90b70a30a81c22ba7510cfec62730f77d6c7414a), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "a500_arthur_12_1.ic25", 0x000001, 0x10000, CRC(829d2856) SHA1(454847cafd9d6d37a756205e0109c3e8c463ab92), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1705,7 +1722,7 @@ ROM_START( aa500d )
ROM_END
ROM_START( aa305 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "030", "Arthur 0.30 (17 Jun 1987)" )
ROMX_LOAD( "0276,322-01.rom", 0x000000, 0x20000, CRC(e6862d4c) SHA1(13d8470f1cb2c1d15530bc7fa8a95ecc4a371cf3), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "0276,323-01.rom", 0x000001, 0x20000, CRC(a9aeb4cf) SHA1(f37e744ba0e48861815683b24612b0dd69d6ea8b), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1740,7 +1757,7 @@ ROM_START( aa305 )
ROM_END
ROM_START( aa310 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "120", "Arthur 1.20 (25 Sep 1987)" )
ROMX_LOAD( "0277,022-02.rom", 0x000000, 0x20000, CRC(03bfe550) SHA1(e4f3f1e37b84e716d75a32aa291a9189371daa1c), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "0277,023-02.rom", 0x000001, 0x20000, CRC(89ece77c) SHA1(e1979a8d3586c006e3837ff721cfa5439e6394bc), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1776,16 +1793,11 @@ ROM_START( aa310 )
ROMX_LOAD( "0296,042-02.rom", 0x000001, 0x80000, CRC(c7584553) SHA1(144f8f55f06d6d0752f2f989f4f5c7cec38a43ea), ROM_BIOS(6) | ROM_SKIP(3) )
ROMX_LOAD( "0296,043-02.rom", 0x000002, 0x80000, CRC(ff5acf17) SHA1(f9c9d4eb2f465b44353257594e631d0e3706f651), ROM_BIOS(6) | ROM_SKIP(3) )
ROMX_LOAD( "0296,044-02.rom", 0x000003, 0x80000, CRC(e2a3480e) SHA1(5b48e8b66ba86568e2225d60f34e201dd5f5d52a), ROM_BIOS(6) | ROM_SKIP(3) )
- ROM_SYSTEM_BIOS( 7, "319", "RISC OS 3.19 (09 Jun 1993)" )
- ROMX_LOAD( "0296,241-01.rom", 0x000000, 0x80000, CRC(3760f686) SHA1(159792df6984f260b547fb23a9bba335e44a569e), ROM_BIOS(7) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,242-01.rom", 0x000001, 0x80000, CRC(bf45bbb7) SHA1(20ce357266cdb53cb036b29259fceb2a90e6b69f), ROM_BIOS(7) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,243-01.rom", 0x000002, 0x80000, CRC(e6fe37fb) SHA1(285fb7db691572ae3a7097e6ef1e3ec28aaef537), ROM_BIOS(7) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,244-01.rom", 0x000003, 0x80000, CRC(61112615) SHA1(eb80811e7242f734b53cd900cbf697cc49789fa1), ROM_BIOS(7) | ROM_SKIP(3) )
- ROM_SYSTEM_BIOS( 8, "test", "Diagnostic Test ROMs" ) // Usage described in Archimedes 300 Series Service Manual
- ROMX_LOAD( "0276,146-01.rom", 0x000000, 0x10000, CRC(9c45283c) SHA1(9eb5bd7ad0958f194a3416d79d7e01e4c45741e1), ROM_BIOS(8) | ROM_SKIP(3) )
- ROMX_LOAD( "0276,147-01.rom", 0x000001, 0x10000, CRC(ad94e17f) SHA1(1c8e39c69d4ae1b674e0f732aaa62a4403998f41), ROM_BIOS(8) | ROM_SKIP(3) )
- ROMX_LOAD( "0276,148-01.rom", 0x000002, 0x10000, CRC(1ab02f2d) SHA1(dd7d216967524e64d1a03076a6081461ec8528c3), ROM_BIOS(8) | ROM_SKIP(3) )
- ROMX_LOAD( "0276,149-01.rom", 0x000003, 0x10000, CRC(5fd6a406) SHA1(790af8a4c74d0f6714d528f7502443ce5898a618), ROM_BIOS(8) | ROM_SKIP(3) )
+ ROM_SYSTEM_BIOS( 7, "test", "Diagnostic Test ROMs" ) // Usage described in Archimedes 300 Series Service Manual
+ ROMX_LOAD( "0276,146-01.rom", 0x000000, 0x10000, CRC(9c45283c) SHA1(9eb5bd7ad0958f194a3416d79d7e01e4c45741e1), ROM_BIOS(7) | ROM_SKIP(3) )
+ ROMX_LOAD( "0276,147-01.rom", 0x000001, 0x10000, CRC(ad94e17f) SHA1(1c8e39c69d4ae1b674e0f732aaa62a4403998f41), ROM_BIOS(7) | ROM_SKIP(3) )
+ ROMX_LOAD( "0276,148-01.rom", 0x000002, 0x10000, CRC(1ab02f2d) SHA1(dd7d216967524e64d1a03076a6081461ec8528c3), ROM_BIOS(7) | ROM_SKIP(3) )
+ ROMX_LOAD( "0276,149-01.rom", 0x000003, 0x10000, CRC(5fd6a406) SHA1(790af8a4c74d0f6714d528f7502443ce5898a618), ROM_BIOS(7) | ROM_SKIP(3) )
ROM_REGION( 0x100, "i2cmem", ROMREGION_ERASE00 )
ROMX_LOAD( "cmos_arthur.bin", 0x0000, 0x0100, CRC(4fc66ddc) SHA1(f0eae9a535505d82ba3488ddb7895434df940d73), ROM_BIOS(0) )
@@ -1795,23 +1807,22 @@ ROM_START( aa310 )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(4) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(5) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(6) )
- ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(7) )
ROM_END
#define rom_aa440 rom_aa310
ROM_START( am4 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD32_BYTE( "m4_brazil_8mbaddr_rom0.bin", 0x000000, 0x04000, CRC(f01fb7a6) SHA1(840a15882797572db4764f37b725cf9c5a07a8cb) )
- ROM_LOAD32_BYTE( "m4_brazil_8mbaddr_rom1.bin", 0x000001, 0x04000, CRC(924e4181) SHA1(4f1903ef83cb6e0cef130005b0442a6548915b8a) )
- ROM_LOAD32_BYTE( "m4_brazil_8mbaddr_rom2.bin", 0x000002, 0x04000, CRC(c210e9a5) SHA1(ee09b8bac275153467ec31f7a16c366a0f97b550) )
- ROM_LOAD32_BYTE( "m4_brazil_8mbaddr_rom3.bin", 0x000003, 0x04000, CRC(1e520555) SHA1(9b6bdeef8d7fb22ef0203c2f531a4e0a55e22c6f) )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD32_BYTE( "m4_arf_0.bin", 0x000000, 0x10000, CRC(b54544c2) SHA1(f75d6b4c8506d1f14f9583b4175af0c8accd8562) )
+ ROM_LOAD32_BYTE( "m4_arf_1.bin", 0x000001, 0x10000, CRC(cd6fe9be) SHA1(07acf52a9cc81939998f52836be477285571f332) )
+ ROM_LOAD32_BYTE( "m4_arf_2.bin", 0x000002, 0x10000, CRC(575ffc0a) SHA1(816008aa5bd5cfbace07ae4b5e4691951beccf76) )
+ ROM_LOAD32_BYTE( "m4_arf_3.bin", 0x000003, 0x10000, CRC(78feaa86) SHA1(476d9c0006b857b51fa272eef819ecfc8b4257d8) )
ROM_REGION( 0x100, "i2cmem", ROMREGION_ERASE00 )
ROM_END
ROM_START( aa680 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD32_BYTE( "0274,200-c_boot_rom_0.ic150", 0x000000, 0x20000, CRC(b04c206c) SHA1(9f83c20ba738c3a7dc63ded45151108fd75975bd) )
ROM_LOAD32_BYTE( "0274,201-c_boot_rom_1.ic151", 0x000001, 0x20000, CRC(baf57404) SHA1(cf4ea48007f57f4e7d7ac3ae782d462fa34d04bf) )
ROM_LOAD32_BYTE( "0274,202-c_boot_rom_2.ic152", 0x000002, 0x20000, CRC(c9adf722) SHA1(77c613c6b1b4bd49069a18713166ca8d1c926e02) )
@@ -1821,7 +1832,7 @@ ROM_START( aa680 )
ROM_END
ROM_START( aa3000 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "200", "RISC OS 2.00 (05 Oct 1988)" )
ROMX_LOAD( "0283,022-01.rom", 0x000000, 0x20000, CRC(24291ebf) SHA1(758adaf6f73b4041a680cdf9a0b2107da12ca5a0), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "0283,023-01.rom", 0x000001, 0x20000, CRC(44a134f1) SHA1(2db7f06e692c3191b2e131d55a1cf997e226c7c6), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1847,11 +1858,6 @@ ROM_START( aa3000 )
ROMX_LOAD( "0296,042-02.rom", 0x000001, 0x80000, CRC(c7584553) SHA1(144f8f55f06d6d0752f2f989f4f5c7cec38a43ea), ROM_BIOS(4) | ROM_SKIP(3) )
ROMX_LOAD( "0296,043-02.rom", 0x000002, 0x80000, CRC(ff5acf17) SHA1(f9c9d4eb2f465b44353257594e631d0e3706f651), ROM_BIOS(4) | ROM_SKIP(3) )
ROMX_LOAD( "0296,044-02.rom", 0x000003, 0x80000, CRC(e2a3480e) SHA1(5b48e8b66ba86568e2225d60f34e201dd5f5d52a), ROM_BIOS(4) | ROM_SKIP(3) )
- ROM_SYSTEM_BIOS( 5, "319", "RISC OS 3.19 (09 Jun 1993)" )
- ROMX_LOAD( "0296,241-01.rom", 0x000000, 0x80000, CRC(3760f686) SHA1(159792df6984f260b547fb23a9bba335e44a569e), ROM_BIOS(5) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,242-01.rom", 0x000001, 0x80000, CRC(bf45bbb7) SHA1(20ce357266cdb53cb036b29259fceb2a90e6b69f), ROM_BIOS(5) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,243-01.rom", 0x000002, 0x80000, CRC(e6fe37fb) SHA1(285fb7db691572ae3a7097e6ef1e3ec28aaef537), ROM_BIOS(5) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,244-01.rom", 0x000003, 0x80000, CRC(61112615) SHA1(eb80811e7242f734b53cd900cbf697cc49789fa1), ROM_BIOS(5) | ROM_SKIP(3) )
ROM_REGION( 0x100, "i2cmem", ROMREGION_ERASE00 )
ROMX_LOAD( "cmos_riscos2.bin", 0x0000, 0x0100, CRC(1ecf3369) SHA1(96163285797e0d54017d8d4ae87835328a4658bd), ROM_BIOS(0) )
@@ -1859,7 +1865,6 @@ ROM_START( aa3000 )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(2) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(3) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(4) )
- ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(5) )
ROM_END
#define rom_aa4101 rom_aa3000
@@ -1867,7 +1872,7 @@ ROM_END
#define rom_aa4401 rom_aa3000
ROM_START( ar140 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "200", "RISC OS 2.00 (05 Oct 1988)" )
ROMX_LOAD( "0283,022-01.rom", 0x000000, 0x20000, CRC(24291ebf) SHA1(758adaf6f73b4041a680cdf9a0b2107da12ca5a0), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "0283,023-01.rom", 0x000001, 0x20000, CRC(44a134f1) SHA1(2db7f06e692c3191b2e131d55a1cf997e226c7c6), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1885,7 +1890,7 @@ ROM_START( ar140 )
ROM_END
ROM_START( aa540 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_SYSTEM_BIOS( 0, "201", "RISC OS 2.01 (05 Jul 1990)" )
ROMX_LOAD( "0270,601-01.rom", 0x000000, 0x20000, CRC(29e2890b) SHA1(2ccdbda7494824180426d66cd38659f6ee55a045), ROM_BIOS(0) | ROM_SKIP(3) )
ROMX_LOAD( "0270,602-01.rom", 0x000001, 0x20000, CRC(dd1e4893) SHA1(2d39a5027fd164fd9409e38074c68731622406bb), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1906,25 +1911,19 @@ ROM_START( aa540 )
ROMX_LOAD( "0296,042-02.rom", 0x000001, 0x80000, CRC(c7584553) SHA1(144f8f55f06d6d0752f2f989f4f5c7cec38a43ea), ROM_BIOS(3) | ROM_SKIP(3) )
ROMX_LOAD( "0296,043-02.rom", 0x000002, 0x80000, CRC(ff5acf17) SHA1(f9c9d4eb2f465b44353257594e631d0e3706f651), ROM_BIOS(3) | ROM_SKIP(3) )
ROMX_LOAD( "0296,044-02.rom", 0x000003, 0x80000, CRC(e2a3480e) SHA1(5b48e8b66ba86568e2225d60f34e201dd5f5d52a), ROM_BIOS(3) | ROM_SKIP(3) )
- ROM_SYSTEM_BIOS( 4, "319", "RISC OS 3.19 (09 Jun 1993)" )
- ROMX_LOAD( "0296,241-01.rom", 0x000000, 0x80000, CRC(3760f686) SHA1(159792df6984f260b547fb23a9bba335e44a569e), ROM_BIOS(4) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,242-01.rom", 0x000001, 0x80000, CRC(bf45bbb7) SHA1(20ce357266cdb53cb036b29259fceb2a90e6b69f), ROM_BIOS(4) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,243-01.rom", 0x000002, 0x80000, CRC(e6fe37fb) SHA1(285fb7db691572ae3a7097e6ef1e3ec28aaef537), ROM_BIOS(4) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,244-01.rom", 0x000003, 0x80000, CRC(61112615) SHA1(eb80811e7242f734b53cd900cbf697cc49789fa1), ROM_BIOS(4) | ROM_SKIP(3) )
ROM_REGION( 0x100, "i2cmem", ROMREGION_ERASE00 )
ROMX_LOAD( "cmos_riscos2.bin", 0x0000, 0x0100, CRC(1ecf3369) SHA1(96163285797e0d54017d8d4ae87835328a4658bd), ROM_BIOS(0) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(1) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(2) )
ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(3) )
- ROMX_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679), ROM_BIOS(4) )
ROM_END
-#define rom_ar225 rom_aa540 // missing R225 BOOT ROMs fitted on ROM podule
+#define rom_ar225 rom_aa540
#define rom_ar260 rom_aa540
ROM_START( aa5000 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
ROM_DEFAULT_BIOS("311")
ROM_SYSTEM_BIOS( 0, "300", "RISC OS 3.00 (25 Sep 1991)" )
ROMX_LOAD( "0270,251-01.rom", 0x000000, 0x80000, CRC(023115a9) SHA1(d3233f76d5750e04ef2bc39d5b2dfd96e6a03c45), ROM_BIOS(0) | ROM_SKIP(3) )
@@ -1941,11 +1940,6 @@ ROM_START( aa5000 )
ROMX_LOAD( "0296,042-02.rom", 0x000001, 0x80000, CRC(c7584553) SHA1(144f8f55f06d6d0752f2f989f4f5c7cec38a43ea), ROM_BIOS(2) | ROM_SKIP(3) )
ROMX_LOAD( "0296,043-02.rom", 0x000002, 0x80000, CRC(ff5acf17) SHA1(f9c9d4eb2f465b44353257594e631d0e3706f651), ROM_BIOS(2) | ROM_SKIP(3) )
ROMX_LOAD( "0296,044-02.rom", 0x000003, 0x80000, CRC(e2a3480e) SHA1(5b48e8b66ba86568e2225d60f34e201dd5f5d52a), ROM_BIOS(2) | ROM_SKIP(3) )
- ROM_SYSTEM_BIOS( 3, "319", "RISC OS 3.19 (09 Jun 1993)" )
- ROMX_LOAD( "0296,241-01.rom", 0x000000, 0x80000, CRC(3760f686) SHA1(159792df6984f260b547fb23a9bba335e44a569e), ROM_BIOS(3) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,242-01.rom", 0x000001, 0x80000, CRC(bf45bbb7) SHA1(20ce357266cdb53cb036b29259fceb2a90e6b69f), ROM_BIOS(3) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,243-01.rom", 0x000002, 0x80000, CRC(e6fe37fb) SHA1(285fb7db691572ae3a7097e6ef1e3ec28aaef537), ROM_BIOS(3) | ROM_SKIP(3) )
- ROMX_LOAD( "0296,244-01.rom", 0x000003, 0x80000, CRC(61112615) SHA1(eb80811e7242f734b53cd900cbf697cc49789fa1), ROM_BIOS(3) | ROM_SKIP(3) )
ROM_REGION( 0x10000, "extension", ROMREGION_ERASE00 )
@@ -1959,7 +1953,7 @@ ROM_END
#define rom_aa5000a rom_aa5000
ROM_START( aa4 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
// RISC OS 3.10 (30 Apr 1992)
ROM_LOAD32_WORD( "0296,061-01.ic4", 0x000000, 0x100000, CRC(b77fe215) SHA1(57b19ea4b97a9b6a240aa61211c2c134cb295aa0) )
ROM_LOAD32_WORD( "0296,062-01.ic15", 0x000002, 0x100000, CRC(d42e196e) SHA1(64243d39d1bca38b10761f66a8042c883bde87a4) )
@@ -1976,7 +1970,7 @@ ROM_START( aa4 )
ROM_END
ROM_START( aa3010 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
// RISC OS 3.11 (29 Sep 1992)
ROM_LOAD32_WORD( "0296,061-02.ic17", 0x000000, 0x100000, CRC(552fc3aa) SHA1(b2f1911e53d7377f2e69e1a870139745d3df494b) )
ROM_LOAD32_WORD( "0296,062-02.ic18", 0x000002, 0x100000, CRC(308d5a4a) SHA1(b309e1dd85670a06d77ec504dbbec6c42336329f) )
@@ -1985,8 +1979,18 @@ ROM_START( aa3010 )
ROM_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679) )
ROM_END
+ROM_START( aa3010_de )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
+ // RISC OS 3.19 (09 Jun 1993)
+ ROM_LOAD32_WORD( "0296,241-01.ic17", 0x000000, 0x100000, CRC(8aaf7ff3) SHA1(bc00d90842f40259a48d8f0627d4129e2fa766fe) )
+ ROM_LOAD32_WORD( "0296,242-01.ic18", 0x000002, 0x100000, CRC(0ddc807e) SHA1(b0fdb33869cc593123a04fe959c1528f76aac0b9) )
+
+ ROM_REGION( 0x100, "i2cmem", ROMREGION_ERASE00 )
+ ROM_LOAD( "cmos_riscos3.bin", 0x0000, 0x0100, CRC(96ed59b2) SHA1(9dab30b4c3305e1142819687889fca334b532679) )
+ROM_END
+
ROM_START( aa3020 )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
// RISC OS 3.11 (29 Sep 1992)
ROM_LOAD32_WORD( "0296,061-02.ic17", 0x000000, 0x100000, CRC(552fc3aa) SHA1(b2f1911e53d7377f2e69e1a870139745d3df494b) )
ROM_LOAD32_WORD( "0296,062-02.ic18", 0x000002, 0x100000, CRC(308d5a4a) SHA1(b309e1dd85670a06d77ec504dbbec6c42336329f) )
@@ -2003,25 +2007,26 @@ ROM_END
} // anonymous namespace
-// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1986, aa500, 0, 0, aa500, 0, aa500_state, init_hd, "Acorn Computers", "Acorn A500 Development System", MACHINE_NOT_WORKING )
-COMP( 1986, aa500d, aa500, 0, aa500d, 0, aa500_state, init_hd, "Acorn Computers", "Acorn A500 Domesday Development System", MACHINE_NOT_WORKING )
-COMP( 1987, aa305, aa310, 0, aa305, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 305", MACHINE_NOT_WORKING )
-COMP( 1987, aa310, 0, 0, aa310, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 310", MACHINE_NOT_WORKING )
-COMP( 1987, aa440, aa310, 0, aa440, 0, aa310_state, init_hd, "Acorn Computers", "Archimedes 440", MACHINE_NOT_WORKING )
-COMP( 1987, am4, 0, 0, am4, 0, aa680_state, empty_init, "Acorn Computers", "Acorn M4", MACHINE_NOT_WORKING )
-COMP( 1988, aa680, 0, 0, aa680, 0, aa680_state, empty_init, "Acorn Computers", "Acorn A680 UNIX Evaluation System", MACHINE_NOT_WORKING )
-COMP( 1989, aa3000, aa310, 0, aa3000, 0, aa310_state, init_flop, "Acorn Computers", "BBC A3000", MACHINE_NOT_WORKING )
-COMP( 1989, aa4101, aa310, 0, aa4101, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 410/1", MACHINE_NOT_WORKING )
-COMP( 1989, aa4201, aa310, 0, aa4201, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 420/1", MACHINE_NOT_WORKING )
-COMP( 1989, aa4401, aa310, 0, aa4401, 0, aa310_state, init_hd, "Acorn Computers", "Archimedes 440/1", MACHINE_NOT_WORKING )
-COMP( 1989, ar140, aa310, 0, ar140, 0, aa310_state, init_hd, "Acorn Computers", "Acorn R140", MACHINE_NOT_WORKING )
-COMP( 1990, aa540, aa310, 0, aa540, 0, aa310_state, init_scsi, "Acorn Computers", "Archimedes 540", MACHINE_NOT_WORKING )
-COMP( 1990, ar225, aa310, 0, ar225, 0, aa310_state, init_none, "Acorn Computers", "Acorn R225", MACHINE_NOT_WORKING )
-COMP( 1990, ar260, aa310, 0, ar260, 0, aa310_state, init_scsi, "Acorn Computers", "Acorn R260", MACHINE_NOT_WORKING )
-COMP( 1991, aa5000, 0, 0, aa5000, 0, aa5000_state, init_ide, "Acorn Computers", "Acorn A5000", MACHINE_NOT_WORKING )
-COMP( 1992, aa4, aa5000, 0, aa4, 0, aa4_state, init_ide, "Acorn Computers", "Acorn A4", MACHINE_NOT_WORKING )
-COMP( 1992, aa3010, 0, 0, aa3010, aa3010, aa4000_state, init_flop, "Acorn Computers", "Acorn A3010", MACHINE_NOT_WORKING )
-COMP( 1992, aa3020, aa3010, 0, aa3020, 0, aa4000_state, init_ide, "Acorn Computers", "Acorn A3020", MACHINE_NOT_WORKING )
-COMP( 1992, aa4000, aa3010, 0, aa4000, 0, aa4000_state, init_ide, "Acorn Computers", "Acorn A4000", MACHINE_NOT_WORKING )
-COMP( 1993, aa5000a, aa5000, 0, aa5000a, 0, aa5000_state, init_ide, "Acorn Computers", "Acorn A5000 Alpha", MACHINE_NOT_WORKING )
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+COMP( 1986, aa500, 0, 0, aa500, 0, aa500_state, init_hd, "Acorn Computers", "Acorn A500 Development System", MACHINE_NOT_WORKING )
+COMP( 1986, aa500d, aa500, 0, aa500d, 0, aa500_state, init_hd, "Acorn Computers", "Acorn A500 Domesday Development System", MACHINE_NOT_WORKING )
+COMP( 1987, aa305, aa310, 0, aa305, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 305", MACHINE_NOT_WORKING )
+COMP( 1987, aa310, 0, 0, aa310, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 310", MACHINE_NOT_WORKING )
+COMP( 1987, aa440, aa310, 0, aa440, 0, aa310_state, init_hd, "Acorn Computers", "Archimedes 440", MACHINE_NOT_WORKING )
+COMP( 1988, am4, 0, 0, am4, 0, aa680_state, empty_init, "Acorn Computers", "Acorn M4", MACHINE_NOT_WORKING )
+COMP( 1988, aa680, 0, 0, aa680, 0, aa680_state, empty_init, "Acorn Computers", "Acorn A680 UNIX Evaluation System", MACHINE_NOT_WORKING )
+COMP( 1989, aa3000, aa310, 0, aa3000, 0, aa310_state, init_flop, "Acorn Computers", "BBC A3000", MACHINE_NOT_WORKING )
+COMP( 1989, aa4101, aa310, 0, aa4101, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 410/1", MACHINE_NOT_WORKING )
+COMP( 1989, aa4201, aa310, 0, aa4201, 0, aa310_state, init_flop, "Acorn Computers", "Archimedes 420/1", MACHINE_NOT_WORKING )
+COMP( 1989, aa4401, aa310, 0, aa4401, 0, aa310_state, init_hd, "Acorn Computers", "Archimedes 440/1", MACHINE_NOT_WORKING )
+COMP( 1989, ar140, aa310, 0, ar140, 0, aa310_state, init_hd, "Acorn Computers", "Acorn R140", MACHINE_NOT_WORKING )
+COMP( 1990, aa540, aa310, 0, aa540, 0, aa310_state, init_scsi, "Acorn Computers", "Archimedes 540", MACHINE_NOT_WORKING )
+COMP( 1990, ar225, aa310, 0, ar225, 0, aa310_state, init_r225, "Acorn Computers", "Acorn R225", MACHINE_NOT_WORKING )
+COMP( 1990, ar260, aa310, 0, ar260, 0, aa310_state, init_scsi, "Acorn Computers", "Acorn R260", MACHINE_NOT_WORKING )
+COMP( 1991, aa5000, 0, 0, aa5000, 0, aa5000_state, init_ide, "Acorn Computers", "Acorn A5000", MACHINE_NOT_WORKING )
+COMP( 1992, aa4, aa5000, 0, aa4, 0, aa4_state, init_a4, "Acorn Computers", "Acorn A4", MACHINE_NOT_WORKING )
+COMP( 1992, aa3010, 0, 0, aa3010, aa3010, aa4000_state, init_flop, "Acorn Computers", "Acorn A3010", MACHINE_NOT_WORKING )
+COMP( 1993, aa3010_de, aa3010, 0, aa3010, aa3010, aa4000_state, init_flop, "Acorn Computers", "Acorn A3010 (German)", MACHINE_NOT_WORKING )
+COMP( 1992, aa3020, aa3010, 0, aa3020, 0, aa4000_state, init_ide, "Acorn Computers", "Acorn A3020", MACHINE_NOT_WORKING )
+COMP( 1992, aa4000, aa3010, 0, aa4000, 0, aa4000_state, init_ide, "Acorn Computers", "Acorn A4000", MACHINE_NOT_WORKING )
+COMP( 1993, aa5000a, aa5000, 0, aa5000a, 0, aa5000_state, init_ide, "Acorn Computers", "Acorn A5000 Alpha", MACHINE_NOT_WORKING )
diff --git a/src/mame/act/apricotf.cpp b/src/mame/act/apricotf.cpp
index 145c8ddcdaa..d6b9afc3e5a 100644
--- a/src/mame/act/apricotf.cpp
+++ b/src/mame/act/apricotf.cpp
@@ -6,44 +6,25 @@
preliminary driver by Angelo Salese
-
****************************************************************************/
-/*
-
- TODO:
-
- - CTC/SIO interrupt acknowledge
- - CTC clocks
- - sound
-
-*/
-
#include "emu.h"
#include "bus/centronics/ctronics.h"
+#include "bus/rs232/rs232.h"
#include "cpu/i86/i86.h"
#include "formats/apridisk.h"
#include "imagedev/floppy.h"
#include "apricotkb.h"
+#include "machine/74259.h"
#include "machine/buffer.h"
#include "machine/input_merger.h"
#include "machine/wd_fdc.h"
#include "machine/z80ctc.h"
#include "machine/z80sio.h"
+#include "sound/spkrdev.h"
#include "emupal.h"
#include "screen.h"
-
-
-//**************************************************************************
-// MACROS / CONSTANTS
-//**************************************************************************
-
-#define SCREEN_TAG "screen"
-#define I8086_TAG "10d"
-#define Z80CTC_TAG "13d"
-#define Z80SIO2_TAG "15d"
-#define WD2797_TAG "5f"
-#define CENTRONICS_TAG "centronics"
+#include "speaker.h"
//**************************************************************************
@@ -70,12 +51,12 @@ class f1_state : public driver_device
public:
f1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
- , m_maincpu(*this, I8086_TAG)
- , m_ctc(*this, Z80CTC_TAG)
- , m_sio(*this, Z80SIO2_TAG)
- , m_fdc(*this, WD2797_TAG)
- , m_floppy(*this, WD2797_TAG ":%u", 0U)
- , m_centronics(*this, CENTRONICS_TAG)
+ , m_maincpu(*this, "maincpu")
+ , m_ctc(*this, "ctc")
+ , m_sio(*this, "sio")
+ , m_fdc(*this, "fdc")
+ , m_floppy(*this, "fdc:%u", 0U)
+ , m_centronics(*this, "centronics")
, m_cent_data_out(*this, "cent_data_out")
, m_irqs(*this, "irqs")
, m_p_scrollram(*this, "scrollram")
@@ -106,9 +87,15 @@ class f1_state : public driver_device
u16 palette_r(offs_t offset);
void palette_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void system_w(offs_t offset, u8 data);
- void ctc_z1_w(int state);
- void ctc_z2_w(int state);
+
+ void drive_select_w(int state);
+ void hld_w(int state);
+ void motor_on_w(int state);
+ void video_lines_w(int state);
+ void video_columns_w(int state);
+ void led0_enable_w(int state);
+ void led1_enable_w(int state);
+
void m1_w(u8 data);
int m_40_80 = 0;
@@ -202,48 +189,46 @@ static const gfx_layout charset_8x8 =
static GFXDECODE_START( gfx_act_f1 )
- GFXDECODE_ENTRY( I8086_TAG, 0x0800, charset_8x8, 0, 1 )
+ GFXDECODE_ENTRY( "maincpu", 0x0800, charset_8x8, 0, 1 )
GFXDECODE_END
-void f1_state::system_w(offs_t offset, u8 data)
+void f1_state::drive_select_w(int state)
{
- switch(offset)
- {
- case 0: // centronics data port
- m_cent_data_out->write(data);
- break;
-
- case 1: // drive select
- m_fdc->set_floppy(m_floppy[!BIT(data, 0)]->get_device());
- break;
-
- case 3: // drive head load
- break;
+ m_fdc->set_floppy(m_floppy[!state]->get_device());
+}
- case 5: // drive motor on
- m_floppy[0]->get_device()->mon_w(!BIT(data, 0));
- m_floppy[1]->get_device()->mon_w(!BIT(data, 0));
- break;
+void f1_state::hld_w(int state)
+{
+ // TODO: drive head load
+}
- case 7: // video lines (1=200, 0=256)
- m_200_256 = BIT(data, 0);
- break;
+void f1_state::motor_on_w(int state)
+{
+ m_floppy[0]->get_device()->mon_w(!state);
+ m_floppy[1]->get_device()->mon_w(!state);
+}
- case 9: // video columns (1=80, 0=40)
- m_40_80 = BIT(data, 0);
- break;
+void f1_state::video_lines_w(int state)
+{
+ // video lines (1=200, 0=256)
+ m_200_256 = state;
+}
- case 0x0b: // LED 0 enable
- break;
+void f1_state::video_columns_w(int state)
+{
+ // video columns (1=80, 0=40)
+ m_40_80 = state;
+}
- case 0x0d: // LED 1 enable
- break;
+void f1_state::led0_enable_w(int state)
+{
+ // TODO: LED 0 enable
+}
- case 0x0f: // centronics strobe output
- m_centronics->write_strobe(!BIT(data, 0));
- break;
- }
+void f1_state::led1_enable_w(int state)
+{
+ // TODO: LED 1 enable
}
@@ -268,7 +253,7 @@ void f1_state::act_f1_mem(address_map &map)
map(0x01e00, 0x01fff).ram().share("scrollram");
map(0x02000, 0x3ffff).ram();
map(0xe0000, 0xe001f).rw(FUNC(f1_state::palette_r), FUNC(f1_state::palette_w)).share("paletteram");
- map(0xf8000, 0xfffff).rom().region(I8086_TAG, 0);
+ map(0xf8000, 0xfffff).rom().region("maincpu", 0);
}
@@ -279,7 +264,8 @@ void f1_state::act_f1_mem(address_map &map)
void f1_state::act_f1_io(address_map &map)
{
map.unmap_value_high();
- map(0x0000, 0x000f).w(FUNC(f1_state::system_w));
+ map(0x0000, 0x0000).w(m_cent_data_out, FUNC(output_latch_device::write));
+ map(0x0000, 0x000f).w("syslatch", FUNC(ls259_device::write_d0)).umask16(0xff00);
map(0x0010, 0x0017).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)).umask16(0x00ff);
map(0x0020, 0x0027).rw(m_sio, FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)).umask16(0x00ff);
map(0x0030, 0x0030).w(FUNC(f1_state::m1_w));
@@ -310,17 +296,6 @@ INPUT_PORTS_END
// Z80CTC
//-------------------------------------------------
-void f1_state::ctc_z1_w(int state)
-{
- m_sio->rxcb_w(state);
- m_sio->txcb_w(state);
-}
-
-void f1_state::ctc_z2_w(int state)
-{
- m_sio->txca_w(state);
-}
-
void f1_state::m1_w(u8 data)
{
m_ctc->z80daisy_decode(data);
@@ -368,8 +343,8 @@ IRQ_CALLBACK_MEMBER(f1_daisy_device::inta_cb)
static const z80_daisy_config f1_daisy_config[] =
{
- { Z80SIO2_TAG },
- { Z80CTC_TAG },
+ { "sio" },
+ { "ctc" },
{ nullptr }
};
@@ -384,8 +359,11 @@ static const z80_daisy_config f1_daisy_config[] =
void f1_state::act_f1(machine_config &config)
{
+ static constexpr auto CLK5 = 14_MHz_XTAL / 3; // nominally 5 MHz, actually 4.66 MHz
+ static constexpr auto BAUDCLK = 14_MHz_XTAL / 7 / 13; // documented as 153.8 kHz
+
/* basic machine hardware */
- I8086(config, m_maincpu, 14_MHz_XTAL / 4);
+ I8086(config, m_maincpu, CLK5); // @ 10D
m_maincpu->set_addrmap(AS_PROGRAM, &f1_state::act_f1_mem);
m_maincpu->set_addrmap(AS_IO, &f1_state::act_f1_io);
m_maincpu->set_irq_acknowledge_callback("daisy", FUNC(f1_daisy_device::inta_cb));
@@ -394,14 +372,23 @@ void f1_state::act_f1(machine_config &config)
INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ ls259_device &syslatch(LS259(config, "syslatch")); // 74LS259 @ 16B
+ syslatch.q_out_cb<0>().set(FUNC(f1_state::drive_select_w));
+ syslatch.q_out_cb<1>().set(FUNC(f1_state::hld_w));
+ syslatch.q_out_cb<2>().set(FUNC(f1_state::motor_on_w));
+ syslatch.q_out_cb<3>().set(FUNC(f1_state::video_lines_w));
+ syslatch.q_out_cb<4>().set(FUNC(f1_state::video_columns_w));
+ syslatch.q_out_cb<5>().set(FUNC(f1_state::led0_enable_w));
+ syslatch.q_out_cb<6>().set(FUNC(f1_state::led1_enable_w));
+ syslatch.q_out_cb<7>().set(m_centronics, FUNC(centronics_device::write_strobe)).invert();
+
/* video hardware */
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(14_MHz_XTAL, 896, 0, 640, 312, 0, 256);
+ //screen.set_raw(14_MHz_XTAL, 896, 0, 640, 260, 0, 200);
screen.set_screen_update(FUNC(f1_state::screen_update));
- screen.set_size(640, 256);
- screen.set_visarea_full();
screen.set_palette(m_palette);
+ screen.screen_vblank().set(m_ctc, FUNC(z80ctc_device::trg3)).invert();
PALETTE(config, m_palette).set_entries(16);
GFXDECODE(config, "gfxdecode", m_palette, gfx_act_f1);
@@ -409,27 +396,46 @@ void f1_state::act_f1(machine_config &config)
/* Devices */
APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG, 0);
- Z80SIO(config, m_sio, 2500000);
+ Z80SIO(config, m_sio, CLK5 / 2); // Z80-CTC @ 13D
+ m_sio->out_txda_callback().set("speaker", FUNC(speaker_sound_device::level_w));
+ m_sio->out_txdb_callback().set("rs232", FUNC(rs232_port_device::write_txd));
+ m_sio->out_rtsb_callback().set("rs232", FUNC(rs232_port_device::write_rts));
+ m_sio->out_dtrb_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
m_sio->out_int_callback().set("irqs", FUNC(input_merger_device::in_w<0>));
- Z80CTC(config, m_ctc, 2500000);
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.5);
+
+ rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
+ rs232.rxd_handler().set(m_sio, FUNC(z80sio_device::rxb_w));
+ rs232.dcd_handler().set(m_sio, FUNC(z80sio_device::dcdb_w));
+ rs232.cts_handler().set(m_sio, FUNC(z80sio_device::ctsb_w));
+ rs232.dsr_handler().set(m_sio, FUNC(z80sio_device::ctsa_w));
+
+ Z80CTC(config, m_ctc, CLK5 / 2); // Z80-SIO/2 @ 15D
m_ctc->intr_callback().set("irqs", FUNC(input_merger_device::in_w<1>));
- m_ctc->zc_callback<1>().set(FUNC(f1_state::ctc_z1_w));
- m_ctc->zc_callback<2>().set(FUNC(f1_state::ctc_z2_w));
+ m_ctc->set_clk<1>(BAUDCLK);
+ m_ctc->set_clk<2>(BAUDCLK);
+ m_ctc->zc_callback<1>().set(m_sio, FUNC(z80sio_device::rxcb_w));
+ m_ctc->zc_callback<1>().append(m_sio, FUNC(z80sio_device::txcb_w));
+ m_ctc->zc_callback<1>().append("rs232", FUNC(rs232_port_device::write_etc));
+ m_ctc->zc_callback<2>().set(m_sio, FUNC(z80sio_device::txca_w));
CENTRONICS(config, m_centronics, centronics_devices, "printer");
- m_centronics->busy_handler().set(m_sio, FUNC(z80sio_device::ctsa_w));
+ m_centronics->busy_handler().set(m_sio, FUNC(z80sio_device::ctsa_w)).invert();
- OUTPUT_LATCH(config, m_cent_data_out);
+ OUTPUT_LATCH(config, m_cent_data_out); // 74LS373 @ 13C
m_centronics->set_output_latch(*m_cent_data_out);
// floppy
- WD2797(config, m_fdc, 4_MHz_XTAL / 2 /* ? */);
+ WD2797(config, m_fdc, 14_MHz_XTAL / 7); // WD2797 @ 5F
m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
m_fdc->drq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_TEST);
- FLOPPY_CONNECTOR(config, WD2797_TAG ":0", apricotf_floppies, "d32w", f1_state::floppy_formats);
- FLOPPY_CONNECTOR(config, WD2797_TAG ":1", apricotf_floppies, "d32w", f1_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, m_floppy[0], apricotf_floppies, "d32w", f1_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, m_floppy[1], apricotf_floppies, "d32w", f1_state::floppy_formats);
+
+ // TODO: expansion port (INT lines gated onto CLK0 of CTC)
}
@@ -443,7 +449,7 @@ void f1_state::act_f1(machine_config &config)
//-------------------------------------------------
ROM_START( f1 )
- ROM_REGION( 0x8000, I8086_TAG, 0 )
+ ROM_REGION( 0x8000, "maincpu", 0 )
ROM_LOAD16_BYTE( "lo_f1_1.6.8f", 0x0000, 0x4000, CRC(be018be2) SHA1(80b97f5b2111daf112c69b3f58d1541a4ba69da0) ) // Labelled F1 - LO Vr. 1.6
ROM_LOAD16_BYTE( "hi_f1_1.6.10f", 0x0001, 0x4000, CRC(bbba77e2) SHA1(e62bed409eb3198f4848f85fccd171cd0745c7c0) ) // Labelled F1 - HI Vr. 1.6
ROM_END
@@ -457,7 +463,7 @@ ROM_END
//-------------------------------------------------
ROM_START( f10 )
- ROM_REGION( 0x8000, I8086_TAG, 0 )
+ ROM_REGION( 0x8000, "maincpu", 0 )
ROM_LOAD16_BYTE( "lo_f10_3.1.1.8f", 0x0000, 0x4000, CRC(bfd46ada) SHA1(0a36ef379fa9af7af9744b40c167ce6e12093485) ) // Labelled LO-FRange Vr3.1.1
ROM_LOAD16_BYTE( "hi_f10_3.1.1.10f", 0x0001, 0x4000, CRC(67ad5b3a) SHA1(a5ececb87476a30167cf2a4eb35c03aeb6766601) ) // Labelled HI-FRange Vr3.1.1
ROM_END
@@ -469,7 +475,7 @@ ROM_END
//**************************************************************************
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1984, f1, 0, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-COMP( 1984, f1e, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F1e", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-COMP( 1984, f2, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F2", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-COMP( 1985, f10, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F10", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+COMP( 1984, f1, 0, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F1", MACHINE_NOT_WORKING )
+COMP( 1984, f1e, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F1e", MACHINE_NOT_WORKING )
+COMP( 1984, f2, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F2", MACHINE_NOT_WORKING )
+COMP( 1985, f10, f1, 0, act_f1, act, f1_state, empty_init, "ACT", "Apricot F10", MACHINE_NOT_WORKING )
diff --git a/src/mame/alpha/champbas.cpp b/src/mame/alpha/champbas.cpp
index bf64f3f68aa..488dfa847ba 100644
--- a/src/mame/alpha/champbas.cpp
+++ b/src/mame/alpha/champbas.cpp
@@ -138,7 +138,6 @@ class champbas_state : public driver_device
void tilemap_w(offs_t offset, uint8_t data);
void gfxbank_w(int state);
void palette_bank_w(int state);
- void flipscreen_w(int state);
void champbas_palette(palette_device &palette) const;
TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info);
@@ -516,11 +515,6 @@ void champbas_state::palette_bank_w(int state)
m_bg_tilemap->set_palette_offset(m_palette_bank << 8);
}
-void champbas_state::flipscreen_w(int state)
-{
- flip_screen_set(!state);
-}
-
/*************************************
@@ -930,7 +924,7 @@ void champbas_state::talbot(machine_config &config)
m_mainlatch->q_out_cb<0>().set(FUNC(champbas_state::irq_enable_w));
m_mainlatch->q_out_cb<1>().set_nop(); // !WORK board output (no use?)
m_mainlatch->q_out_cb<2>().set_nop(); // no gfxbank
- m_mainlatch->q_out_cb<3>().set(FUNC(champbas_state::flipscreen_w));
+ m_mainlatch->q_out_cb<3>().set(FUNC(champbas_state::flip_screen_set)).invert();
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
@@ -972,7 +966,7 @@ void champbas_state::champbas(machine_config &config)
m_mainlatch->q_out_cb<0>().set(FUNC(champbas_state::irq_enable_w));
m_mainlatch->q_out_cb<1>().set_nop(); // !WORK board output (no use?)
m_mainlatch->q_out_cb<2>().set(FUNC(champbas_state::gfxbank_w));
- m_mainlatch->q_out_cb<3>().set(FUNC(champbas_state::flipscreen_w));
+ m_mainlatch->q_out_cb<3>().set(FUNC(champbas_state::flip_screen_set)).invert();
m_mainlatch->q_out_cb<4>().set(FUNC(champbas_state::palette_bank_w));
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
m_mainlatch->q_out_cb<6>().set_nop(); // no MCU
@@ -1080,7 +1074,7 @@ void exctsccr_state::exctsccr(machine_config &config)
m_mainlatch->q_out_cb<0>().set(FUNC(exctsccr_state::irq_enable_w));
m_mainlatch->q_out_cb<1>().set_nop(); // !WORK board output (no use?)
m_mainlatch->q_out_cb<2>().set(FUNC(exctsccr_state::gfxbank_w));
- m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flipscreen_w));
+ m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flip_screen_set)).invert();
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
@@ -1154,7 +1148,7 @@ void exctsccr_state::exctsccrb(machine_config &config)
m_mainlatch->q_out_cb<0>().set(FUNC(exctsccr_state::irq_enable_w));
m_mainlatch->q_out_cb<1>().set_nop(); // !WORK board output (no use?)
m_mainlatch->q_out_cb<2>().set(FUNC(exctsccr_state::gfxbank_w));
- m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flipscreen_w));
+ m_mainlatch->q_out_cb<3>().set(FUNC(exctsccr_state::flip_screen_set)).invert();
m_mainlatch->q_out_cb<4>().set_nop(); // no palettebank
m_mainlatch->q_out_cb<5>().set_nop(); // n.c.
m_mainlatch->q_out_cb<6>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w));
diff --git a/src/mame/apple/bandit.cpp b/src/mame/apple/bandit.cpp
index 8250c79771e..c13271b0115 100644
--- a/src/mame/apple/bandit.cpp
+++ b/src/mame/apple/bandit.cpp
@@ -51,8 +51,7 @@ void bandit_host_device::device_start()
{
pci_host_device::device_start();
m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
- memory_space = &space(AS_PCI_MEM);
- io_space = &space(AS_PCI_IO);
+ set_spaces(&space(AS_PCI_MEM), &space(AS_PCI_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/mame/apple/heathrow.cpp b/src/mame/apple/heathrow.cpp
index d63685bcc14..086df680036 100644
--- a/src/mame/apple/heathrow.cpp
+++ b/src/mame/apple/heathrow.cpp
@@ -171,7 +171,7 @@ void grandcentral_device::device_add_mconfig(machine_config &config)
{
macio_device::device_add_mconfig(config);
- DBDMA_CHANNEL(config, m_dma_scsi1, 0, m_pci_memory);
+ DBDMA_CHANNEL(config, m_dma_scsi1, 0);
m_dma_scsi1->irq_callback().set(FUNC(macio_device::set_irq_line<10>));
}
@@ -217,7 +217,6 @@ macio_device::macio_device(const machine_config &mconfig, device_type type, cons
m_dma_sccbrx(*this, "dma_sccb_rx"),
m_dma_audio_in(*this, "dma_audin"),
m_dma_audio_out(*this, "dma_audout"),
- m_pci_memory(*this, ":pci:00.0", AS_DATA),
m_cur_floppy(nullptr),
m_hdsel(0)
{
@@ -264,16 +263,18 @@ paddington_device::paddington_device(const machine_config &mconfig, const char *
void macio_device::common_init()
{
- m_dma_scsi->set_address_space(m_pci_memory);
- m_dma_floppy->set_address_space(m_pci_memory);
- m_dma_sccatx->set_address_space(m_pci_memory);
- m_dma_sccarx->set_address_space(m_pci_memory);
- m_dma_sccbtx->set_address_space(m_pci_memory);
- m_dma_sccbrx->set_address_space(m_pci_memory);
- m_dma_audio_in->set_address_space(m_pci_memory);
- m_dma_audio_out->set_address_space(m_pci_memory);
-
pci_device::device_start();
+
+ address_space *bm = get_pci_busmaster_space();
+ m_dma_scsi->set_address_space(bm);
+ m_dma_floppy->set_address_space(bm);
+ m_dma_sccatx->set_address_space(bm);
+ m_dma_sccarx->set_address_space(bm);
+ m_dma_sccbtx->set_address_space(bm);
+ m_dma_sccbrx->set_address_space(bm);
+ m_dma_audio_in->set_address_space(bm);
+ m_dma_audio_out->set_address_space(bm);
+
command = 2; // enable our memory range
revision = 1;
@@ -296,7 +297,7 @@ void grandcentral_device::device_start()
add_map(0x20000, M_MEM, FUNC(grandcentral_device::map)); // Grand Central only has 128K of BAR space, the others have 512K
set_ids(0x106b0002, 0x01, 0xff000001, 0x000000);
- m_dma_scsi1->set_address_space(m_pci_memory);
+ m_dma_scsi1->set_address_space(get_pci_busmaster_space());
}
void ohare_device::device_start()
@@ -306,8 +307,8 @@ void ohare_device::device_start()
set_ids(0x106b0007, 0x01, 0xff0000, 0x000000);
save_item(NAME(m_nvram));
- m_dma_ata0->set_address_space(m_pci_memory);
- m_dma_ata1->set_address_space(m_pci_memory);
+ m_dma_ata0->set_address_space(get_pci_busmaster_space());
+ m_dma_ata1->set_address_space(get_pci_busmaster_space());
}
void heathrow_device::device_start()
diff --git a/src/mame/apple/heathrow.h b/src/mame/apple/heathrow.h
index dd7715a37dc..9ef9d97ef0c 100644
--- a/src/mame/apple/heathrow.h
+++ b/src/mame/apple/heathrow.h
@@ -32,7 +32,6 @@ class macio_device : public pci_device
auto codec_w_callback() { return write_codec.bind(); }
template void set_maincpu_tag(T &&... args) { m_maincpu.set_tag(std::forward(args)...); }
- template void set_pci_root_tag(T &&... args) { m_pci_memory.set_tag(std::forward(args)...); }
void cb1_w(int state);
void cb2_w(int state);
@@ -86,7 +85,6 @@ class macio_device : public pci_device
required_device m_scc;
required_device m_dma_scsi, m_dma_floppy, m_dma_sccatx, m_dma_sccarx;
required_device m_dma_sccbtx, m_dma_sccbrx, m_dma_audio_in, m_dma_audio_out;
- required_address_space m_pci_memory;
private:
floppy_image_device *m_cur_floppy = nullptr;
diff --git a/src/mame/apple/imacg3.cpp b/src/mame/apple/imacg3.cpp
index 8169a8786a2..79f4260b967 100644
--- a/src/mame/apple/imacg3.cpp
+++ b/src/mame/apple/imacg3.cpp
@@ -160,7 +160,6 @@ void imac_state::imac(machine_config &config)
paddington_device &paddington(PADDINGTON(config, "pci:10.0", 0));
paddington.set_maincpu_tag("maincpu");
- paddington.set_pci_root_tag(":pci:00.0", AS_DATA);
paddington.irq_callback().set(FUNC(imac_state::irq_w));
atirage_device &ati(ATI_RAGEIIC(config, "pci:12.0", 14.318181_MHz_XTAL));
diff --git a/src/mame/apple/pippin.cpp b/src/mame/apple/pippin.cpp
index c8784893409..25508016758 100644
--- a/src/mame/apple/pippin.cpp
+++ b/src/mame/apple/pippin.cpp
@@ -181,7 +181,6 @@ void pippin_state::pippin(machine_config &config)
grandcentral_device &grandcentral(GRAND_CENTRAL(config, "pci:0d.0", 0));
grandcentral.set_maincpu_tag("maincpu");
- grandcentral.set_pci_root_tag(":pci:00.0", AS_DATA);
grandcentral.irq_callback().set(FUNC(pippin_state::irq_w));
awacs_macrisc_device &awacs(AWACS_MACRISC(config, "codec", 45.1584_MHz_XTAL / 2));
diff --git a/src/mame/apple/powermacg3.cpp b/src/mame/apple/powermacg3.cpp
index 70e90e33085..efe2e7c99d4 100644
--- a/src/mame/apple/powermacg3.cpp
+++ b/src/mame/apple/powermacg3.cpp
@@ -149,7 +149,6 @@ void pwrmacg3_state::pwrmacg3(machine_config &config)
heathrow_device &heathrow(HEATHROW(config, "pci:10.0", 0));
heathrow.set_maincpu_tag("maincpu");
- heathrow.set_pci_root_tag(":pci:00.0", AS_DATA);
// Apple's documentation says systems with the 4.0f2 ROM use a Rage II+, but
// the 4.0f2 ROM won't init the Rage if the PCI ID is 4755 (II+), only 4754 (Rage II).
diff --git a/src/mame/capcom/gng.cpp b/src/mame/capcom/gng.cpp
index 1bf730591e1..2e76e02b401 100644
--- a/src/mame/capcom/gng.cpp
+++ b/src/mame/capcom/gng.cpp
@@ -95,7 +95,6 @@ class gng_state : public driver_device
void bgvideoram_w(offs_t offset, uint8_t data);
void bgscrollx_w(offs_t offset, uint8_t data);
void bgscrolly_w(offs_t offset, uint8_t data);
- void flipscreen_w(int state);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -190,12 +189,6 @@ void gng_state::bgscrolly_w(offs_t offset, uint8_t data)
}
-void gng_state::flipscreen_w(int state)
-{
- flip_screen_set(!state);
-}
-
-
/***************************************************************************
@@ -599,7 +592,7 @@ void gng_state::gng(machine_config &config)
audiocpu.set_periodic_int(FUNC(gng_state::irq0_line_hold), attotime::from_hz(4 * 60));
ls259_device &mainlatch(LS259(config, "mainlatch")); // 9B on A board
- mainlatch.q_out_cb<0>().set(FUNC(gng_state::flipscreen_w));
+ mainlatch.q_out_cb<0>().set(FUNC(gng_state::flip_screen_set)).invert();
mainlatch.q_out_cb<1>().set_inputline("audiocpu", INPUT_LINE_RESET).invert();
mainlatch.q_out_cb<1>().append(FUNC(gng_state::ym_reset_w));
mainlatch.q_out_cb<2>().set([this] (int state) { machine().bookkeeping().coin_counter_w(0, state); });
diff --git a/src/mame/cxg/dominator.cpp b/src/mame/cxg/dominator.cpp
index 83621d9519c..e87845df2ec 100644
--- a/src/mame/cxg/dominator.cpp
+++ b/src/mame/cxg/dominator.cpp
@@ -12,7 +12,7 @@ This engine was also used in the newer Mephisto Modena.
Hardware notes:
- R65C02P4 @ 4MHz
- 32KB ROM, 8KB RAM battery-backed
-- Sanyo LC7582, 2 LCD panels (each 4-digit)
+- Sanyo LC7582, 2 LCD panels (each 4-digit, some unused segments)
- TTL, piezo, 8*8+8 LEDs, button sensors
Sphinx Commander also uses the Dominator program, and is on similar hardware,
@@ -27,8 +27,8 @@ Sphinx Galaxy is on similar hardware too, with less leds.
#include "machine/nvram.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
+#include "video/lc7580.h"
#include "video/pwm.h"
-#include "video/lc7582.h"
#include "speaker.h"
@@ -46,13 +46,13 @@ class dominator_state : public driver_device
dominator_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_board(*this, "board"),
m_lcd(*this, "lcd"),
m_display(*this, "display"),
- m_board(*this, "board"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0),
m_out_digit(*this, "digit%u", 0U),
- m_out_lcd(*this, "lcd%u.%u", 0U, 0U)
+ m_out_lcd(*this, "s%u.%u", 0U, 0U)
{ }
// machine configs
@@ -66,13 +66,13 @@ class dominator_state : public driver_device
private:
// devices/pointers
required_device m_maincpu;
+ required_device m_board;
required_device m_lcd;
required_device m_display;
- required_device m_board;
required_device m_dac;
required_ioport_array<2> m_inputs;
output_finder<8> m_out_digit;
- output_finder<2, 53> m_out_lcd;
+ output_finder<2, 52> m_out_lcd;
// address maps
void dominator_map(address_map &map);
@@ -101,23 +101,29 @@ void dominator_state::machine_start()
void dominator_state::lcd_s_w(offs_t offset, u64 data)
{
- u8 d[4];
-
- // 1st digit: S1-S9, unused middle vertical segments
- // 2nd digit: S10-S18, unused bottom-right diagonal segment, colon at S17
- // 3rd digit: S21-S27
- // 4th digit: S28-S34
- d[0] = bitswap<9>(data >> 0 & 0x1ff, 2,7,5,4,3,1,0,8,6) & 0x7f;
- d[1] = bitswap<9>(data >> 9 & 0x1ff, 7,6,4,2,0,8,5,3,1) & 0x7f;
- d[2] = bitswap<7>(data >> 20 & 0x7f, 3,5,1,0,2,6,4);
- d[3] = bitswap<7>(data >> 27 & 0x7f, 4,2,0,6,5,3,1);
-
- for (int i = 0; i < 4; i++)
- m_out_digit[offset * 4 + i] = d[i];
-
// output individual segments
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 52; i++)
m_out_lcd[offset][i] = BIT(data, i);
+
+ // unscramble digit 7segs
+ static u8 seg2digit[4*7] =
+ {
+ 0x03, 0x04, 0x00, 0x40, 0x41, 0x02, 0x42,
+ 0x05, 0x06, 0x07, 0x48, 0x44, 0x45, 0x46,
+ 0x0c, 0x0d, 0x0b, 0x0a, 0x4a, 0x4c, 0x4b,
+ 0x0e, 0x0f, 0x10, 0x50, 0x4d, 0x4e, 0x4f
+ };
+
+ for (int i = 0; i < 8; i++)
+ {
+ u8 digit = 0;
+ for (int seg = 0; seg < 7; seg++)
+ {
+ u8 bit = seg2digit[7 * (i & 3) + seg] + 26 * (i >> 2);
+ digit |= m_out_lcd[BIT(bit, 6)][bit & 0x3f] << seg;
+ }
+ m_out_digit[i] = digit;
+ }
}
diff --git a/src/mame/cxg/professor.cpp b/src/mame/cxg/professor.cpp
index d87c1866a17..a0544a8d90b 100644
--- a/src/mame/cxg/professor.cpp
+++ b/src/mame/cxg/professor.cpp
@@ -18,7 +18,6 @@ Hardware notes:
- 8*8 chessboard buttons, 16 LEDs, piezo
TODO:
-- add lcd
- internal artwork
*******************************************************************************/
@@ -28,8 +27,10 @@ Hardware notes:
#include "cpu/m6800/m6801.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
+#include "video/lc7580.h"
#include "video/pwm.h"
+#include "screen.h"
#include "speaker.h"
// internal artwork
@@ -45,9 +46,11 @@ class professor_state : public driver_device
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_board(*this, "board"),
+ m_lcd(*this, "lcd"),
m_display(*this, "display"),
m_dac(*this, "dac"),
- m_inputs(*this, "IN.%u", 0)
+ m_inputs(*this, "IN.%u", 0),
+ m_out_lcd(*this, "s%u.%u", 0U, 0U)
{ }
void professor(machine_config &config);
@@ -61,13 +64,16 @@ class professor_state : public driver_device
// devices/pointers
required_device m_maincpu;
required_device m_board;
+ required_device m_lcd;
required_device m_display;
required_device m_dac;
required_ioport_array<3> m_inputs;
+ output_finder<2, 52> m_out_lcd;
u16 m_inp_mux = 0;
// I/O handlers
+ void lcd_s_w(offs_t offset, u64 data);
template void leds_w(u8 data);
void control_w(u8 data);
u8 input_r();
@@ -76,6 +82,9 @@ class professor_state : public driver_device
void professor_state::machine_start()
{
+ m_out_lcd.resolve();
+
+ // register for savestates
save_item(NAME(m_inp_mux));
}
@@ -92,6 +101,12 @@ INPUT_CHANGED_MEMBER(professor_state::on_button)
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
+void professor_state::lcd_s_w(offs_t offset, u64 data)
+{
+ for (int i = 0; i < 52; i++)
+ m_out_lcd[offset][i] = BIT(data, i);
+}
+
template
void professor_state::leds_w(u8 data)
{
@@ -106,6 +121,13 @@ void professor_state::control_w(u8 data)
// P23: speaker out
m_dac->write(BIT(data, 3));
+
+ // P24: LC7580 DATA
+ // P25: LC7580 CLK
+ // P26: LC7580 CE
+ m_lcd->data_w(BIT(data, 4));
+ m_lcd->clk_w(BIT(data, 5));
+ m_lcd->ce_w(BIT(data, 6));
}
u8 professor_state::input_r()
@@ -192,6 +214,14 @@ void professor_state::professor(machine_config &config)
//m_board->set_nvram_enable(true);
// video hardware
+ LC7580(config, m_lcd, 0);
+ m_lcd->write_segs().set(FUNC(professor_state::lcd_s_w));
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
+ screen.set_refresh_hz(60);
+ screen.set_size(1920/4, 977/4);
+ screen.set_visarea_full();
+
PWM_DISPLAY(config, m_display).set_size(2, 8);
//config.set_default_layout(layout_cxg_professor);
@@ -209,6 +239,9 @@ void professor_state::professor(machine_config &config)
ROM_START( scprof )
ROM_REGION( 0x4000, "maincpu", 0 )
ROM_LOAD("1988_107_newcrest_hd6301y0j76p", 0x0000, 0x4000, CRC(681456c7) SHA1(99f8ab7369dbc2c93335affc38838295a8a2c5f3) )
+
+ ROM_REGION( 100000, "screen", 0 )
+ ROM_LOAD("scprof.svg", 0, 100000, NO_DUMP )
ROM_END
} // anonymous namespace
diff --git a/src/mame/heathkit/h89.cpp b/src/mame/heathkit/h89.cpp
index 063630b915b..91a2757f0b5 100644
--- a/src/mame/heathkit/h89.cpp
+++ b/src/mame/heathkit/h89.cpp
@@ -45,6 +45,7 @@
#include "h_88_cass.h"
#include "intr_cntrl.h"
+#include "sigmasoft_parallel_port.h"
#include "tlb.h"
#include "z37_fdc.h"
@@ -53,6 +54,7 @@
#include "machine/ram.h"
#include "machine/timer.h"
+#include "softlist_dev.h"
// Single Step
#define LOG_SS (1U << 1)
@@ -197,6 +199,25 @@ class h89_state : public h89_base_state
void h89_io(address_map &map);
};
+
+class h89_sigmasoft_state : public h89_state
+{
+public:
+ h89_sigmasoft_state(const machine_config &mconfig, device_type type, const char *tag):
+ h89_state(mconfig, type, tag),
+ m_sigma_parallel(*this, "sigma_parallel")
+ {
+ }
+
+ void h89_sigmasoft(machine_config &config);
+
+protected:
+ required_device m_sigma_parallel;
+
+ void h89_sigmasoft_io(address_map &map);
+};
+
+
/*
The H89 supported 16K, 32K, 48K, or 64K of RAM. The first 8K of address space
is reserved for the monitor ROM, floppy ROM, and scratch pad RAM. For 16k-48K
@@ -361,6 +382,14 @@ void h89_state::h89_io(address_map &map)
map(0x78, 0x7b).rw(m_h37, FUNC(heath_z37_fdc_device::read), FUNC(heath_z37_fdc_device::write));
}
+void h89_sigmasoft_state::h89_sigmasoft_io(address_map &map)
+{
+ h89_io(map);
+
+ // Add parallel port board.
+ map(0x08,0x0f).rw(m_sigma_parallel, FUNC(sigmasoft_parallel_port::read), FUNC(sigmasoft_parallel_port::write));
+}
+
// Input ports
static INPUT_PORTS_START( h88 )
@@ -786,6 +815,17 @@ static void tlb_options(device_slot_interface &device)
device.option_add("watzman", HEATH_WATZ);
}
+
+static void sigma_tlb_options(device_slot_interface *device)
+{
+ device->option_reset();
+ device->option_add("igc", HEATH_IGC);
+ device->option_add("igc_super19", HEATH_IGC_SUPER19);
+ device->option_add("igc_ultrarom", HEATH_IGC_ULTRA);
+ device->option_add("igc_watzman", HEATH_IGC_WATZ);
+ device->set_default_option("igc");
+}
+
static void intr_ctrl_options(device_slot_interface &device)
{
device.option_add("original", HEATH_INTR_CNTRL);
@@ -831,19 +871,23 @@ void h89_base_state::h89_base(machine_config &config)
void h88_state::h88(machine_config &config)
{
- h89_base_state::h89_base(config);
+ h89_base(config);
+
m_maincpu->set_io_map(&h88_state::h88_io);
m_intr_socket->set_default_option("original");
m_intr_socket->set_fixed(true);
+ SOFTWARE_LIST(config, "cass_list").set_original("h88_cass");
+
// H-88-5 Cassette interface board
HEATH_H88_CASS(config, m_cassette, H89_CLOCK);
}
void h89_state::h89(machine_config &config)
{
- h89_base_state::h89_base(config);
+ h89_base(config);
+
m_maincpu->set_io_map(&h89_state::h89_io);
m_intr_socket->set_default_option("h37");
@@ -856,6 +900,24 @@ void h89_state::h89(machine_config &config)
m_h37->block_interrupt_cb().set(m_intr_socket, FUNC(heath_intr_socket::block_interrupts));
}
+void h89_sigmasoft_state::h89_sigmasoft(machine_config & config)
+{
+ h89(config);
+ m_maincpu->set_addrmap(AS_IO, &h89_sigmasoft_state::h89_sigmasoft_io);
+
+ sigma_tlb_options(m_tlbc);
+
+ SIGMASOFT_PARALLEL_PORT(config, m_sigma_parallel);
+ m_sigma_parallel->ctrl_r_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_ctrl_r));
+ m_sigma_parallel->video_mem_r_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_video_mem_r));
+ m_sigma_parallel->video_mem_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_video_mem_w));
+ m_sigma_parallel->io_lo_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_io_lo_addr_w));
+ m_sigma_parallel->io_hi_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_io_hi_addr_w));
+ m_sigma_parallel->window_lo_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_window_lo_addr_w));
+ m_sigma_parallel->window_hi_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_window_hi_addr_w));
+ m_sigma_parallel->ctrl_cb().set(m_tlbc, FUNC(heath_tlb_connector::sigma_ctrl_w));
+}
+
// ROM definition
ROM_START( h88 )
@@ -898,6 +960,37 @@ ROM_START( h89 )
ROMX_LOAD("2716_mtrhex.u518", 0x0000, 0x0800, CRC(842a306a) SHA1(ddbc2b8bb127464af9eda8e7c56e6be7c8b43a16), ROM_BIOS(7))
ROM_END
+ROM_START( h89_sigmasoft )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASEFF )
+ ROM_DEFAULT_BIOS("mtr90")
+
+ ROM_LOAD( "2716_444-19_h17.u520", 0x1800, 0x0800, CRC(26e80ae3) SHA1(0c0ee95d7cb1a760f924769e10c0db1678f2435c))
+
+ ROM_SYSTEM_BIOS(0, "mtr90", "MTR-90 (444-142)")
+ ROMX_LOAD("2732_444-142_mtr90.u518", 0x0000, 0x1000, CRC(c4ff47c5) SHA1(d6f3d71ff270a663003ec18a3ed1fa49f627123a), ROM_BIOS(0))
+
+ ROM_SYSTEM_BIOS(1, "mtr89", "MTR-89 (444-62)")
+ ROMX_LOAD("2716_444-62_mtr89.u518", 0x0000, 0x0800, CRC(8f507972) SHA1(ac6c6c1344ee4e09fb60d53c85c9b761217fe9dc), ROM_BIOS(1))
+
+ ROM_SYSTEM_BIOS(2, "mms84b", "MMS 444-84B")
+ ROMX_LOAD("2732_444_84b_mms.u518", 0x0000, 0x1000, CRC(7e75d6f4) SHA1(baf34e036388d1a191197e31f8a93209f04fc58b), ROM_BIOS(2))
+
+ ROM_SYSTEM_BIOS(3, "kmr-100", "Kres KMR-100 V3.a.02")
+ ROMX_LOAD("2732_kmr100_v3_a_02.u518", 0x0000, 0x1000, CRC(fd491592) SHA1(3d5803f95c38b237b07cd230353cd9ddc9858c13), ROM_BIOS(3))
+
+ ROM_SYSTEM_BIOS(4, "mtrhex_4k", "Ultimeth ROM")
+ ROMX_LOAD("2732_mtrhex_4k.u518", 0x0000, 0x1000, CRC(e26b29a9) SHA1(ba13d6c9deef682a9a8262bc910d46b577929a13), ROM_BIOS(4))
+
+ ROM_SYSTEM_BIOS(5, "mtr90-84", "Heath's MTR-90 (444-84 - Superseded by 444-142)")
+ ROMX_LOAD("2732_444-84_mtr90.u518", 0x0000, 0x1000, CRC(f10fca03) SHA1(c4a978153af0f2dfcc9ba05be4c1033d33fee30b), ROM_BIOS(5))
+
+ ROM_SYSTEM_BIOS(6, "mms84a", "MMS 444-84A (Superseded by MMS 444-84B)")
+ ROMX_LOAD("2732_444_84a_mms.u518", 0x0000, 0x1000, CRC(0e541a7e) SHA1(b1deb620fc89c1068e2e663e14be69d1f337a4b9), ROM_BIOS(6))
+
+ ROM_SYSTEM_BIOS(7, "mtrhex", "Ultimeth 2k ROM")
+ ROMX_LOAD("2716_mtrhex.u518", 0x0000, 0x0800, CRC(842a306a) SHA1(ddbc2b8bb127464af9eda8e7c56e6be7c8b43a16), ROM_BIOS(7))
+ROM_END
+
} // anonymous namespace
@@ -906,3 +999,4 @@ ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
COMP( 1979, h88, h89, 0, h88, h88, h88_state, empty_init, "Heath Company", "Heathkit H88", MACHINE_SUPPORTS_SAVE)
COMP( 1979, h89, 0, 0, h89, h89, h89_state, empty_init, "Heath Company", "Heathkit H89", MACHINE_SUPPORTS_SAVE)
+COMP( 1984, h89_sigmasoft, h89, 0, h89_sigmasoft, h89, h89_sigmasoft_state, empty_init, "Heath Company", "Heathkit H89 with SigmaSoft IGC", MACHINE_SUPPORTS_SAVE)
diff --git a/src/mame/heathkit/h_88_cass.cpp b/src/mame/heathkit/h_88_cass.cpp
index 5f09426f964..7c4e49dee04 100644
--- a/src/mame/heathkit/h_88_cass.cpp
+++ b/src/mame/heathkit/h_88_cass.cpp
@@ -153,13 +153,13 @@ void heath_h_88_cass_device::device_add_mconfig(machine_config &config)
m_cass_player->set_formats(h8_cassette_formats);
m_cass_player->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cass_player->add_route(ALL_OUTPUTS, "mono", 0.15);
- m_cass_player->set_interface("h89_cass_player");
+ m_cass_player->set_interface("h88_cass_player");
CASSETTE(config, m_cass_recorder);
m_cass_recorder->set_formats(h8_cassette_formats);
m_cass_recorder->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cass_recorder->add_route(ALL_OUTPUTS, "mono", 0.15);
- m_cass_recorder->set_interface("h89_cass_recorder");
+ m_cass_recorder->set_interface("h88_cass_recorder");
TIMER(config, "kansas_w").configure_periodic(FUNC(heath_h_88_cass_device::kansas_w), attotime::from_hz(4800));
TIMER(config, "kansas_r").configure_periodic(FUNC(heath_h_88_cass_device::kansas_r), attotime::from_hz(40000));
diff --git a/src/mame/heathkit/sigmasoft_parallel_port.cpp b/src/mame/heathkit/sigmasoft_parallel_port.cpp
new file mode 100644
index 00000000000..35cf1742f1c
--- /dev/null
+++ b/src/mame/heathkit/sigmasoft_parallel_port.cpp
@@ -0,0 +1,165 @@
+// license:BSD-3-Clause
+// copyright-holders:Mark Garlanger
+/***************************************************************************
+
+ SigmaSoft Universal Parallel Interface Board
+
+
+****************************************************************************/
+
+#include "emu.h"
+
+#include "sigmasoft_parallel_port.h"
+
+//
+// Logging defines
+//
+#define LOG_REG (1U << 1) // Shows register setup
+#define LOG_FUNC (1U << 2) // Function calls
+
+#define VERBOSE (0)
+
+#include "logmacro.h"
+
+#define LOGREG(...) LOGMASKED(LOG_REG, __VA_ARGS__)
+#define LOGFUNC(...) LOGMASKED(LOG_FUNC, __VA_ARGS__)
+
+#ifdef _MSC_VER
+#define FUNCNAME __func__
+#else
+#define FUNCNAME __PRETTY_FUNCTION__
+#endif
+
+
+DEFINE_DEVICE_TYPE(SIGMASOFT_PARALLEL_PORT, sigmasoft_parallel_port, "sigmasoft_parallel_port", "SigmaSoft Universal Parallel Board");
+
+sigmasoft_parallel_port::sigmasoft_parallel_port(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock):
+ device_t(mconfig, SIGMASOFT_PARALLEL_PORT, tag, owner, clock),
+ m_ctrl_r(*this, 0x00),
+ m_video_mem_r(*this, 0x00),
+ m_video_mem_w(*this),
+ m_io_lo_addr(*this),
+ m_io_hi_addr(*this),
+ m_window_lo_addr(*this),
+ m_window_hi_addr(*this),
+ m_ctrl_w(*this)
+{
+}
+
+void sigmasoft_parallel_port::video_mem_w(uint8_t val)
+{
+ m_video_mem_w(val);
+}
+
+void sigmasoft_parallel_port::io_lo_addr_w(uint8_t val)
+{
+ m_io_lo_addr(val);
+}
+
+void sigmasoft_parallel_port::io_hi_addr_w(uint8_t val)
+{
+ m_io_hi_addr(val);
+}
+
+void sigmasoft_parallel_port::window_lo_addr_w(uint8_t val)
+{
+ m_window_lo_addr(val);
+}
+
+void sigmasoft_parallel_port::window_hi_addr_w(uint8_t val)
+{
+ m_window_hi_addr(val);
+}
+
+void sigmasoft_parallel_port::ctrl_w(uint8_t val)
+{
+ m_ctrl_w(val);
+}
+
+void sigmasoft_parallel_port::write(offs_t reg, uint8_t val)
+{
+ LOGFUNC("%s: reg: %d val: %d\n", FUNCNAME, reg, val);
+
+ switch (reg)
+ {
+ case 0:
+ video_mem_w(val);
+ break;
+ case 1:
+ io_lo_addr_w(val);
+ break;
+ case 2:
+ io_hi_addr_w(val);
+ break;
+ case 3:
+ window_lo_addr_w(val);
+ break;
+ case 4:
+ window_hi_addr_w(val);
+ break;
+ case 5:
+ ctrl_w(val);
+ break;
+ case 6:
+ // TODO - Centronics interface
+ break;
+ case 7:
+ // TODO - Centronics interface
+ break;
+ }
+}
+
+uint8_t sigmasoft_parallel_port::video_mem_r()
+{
+ // get video memory value from igc device
+ return m_video_mem_r();
+}
+
+uint8_t sigmasoft_parallel_port::ctrl_r()
+{
+ // get control register from igc device
+ return m_ctrl_r();
+}
+
+uint8_t sigmasoft_parallel_port::read(offs_t reg)
+{
+ // default return for the h89
+ uint8_t value = 0xff;
+
+ switch (reg)
+ {
+ case 0:
+ value = video_mem_r();
+ break;
+ case 1:
+ // TODO - Light Pen Low address
+ break;
+ case 2:
+ // TODO - Light Pen High address
+ break;
+ case 3:
+ // TODO - Left input device
+ break;
+ case 4:
+ // TODO - Right input device
+ break;
+ case 5:
+ // Control Register
+ value = ctrl_r();
+ break;
+ case 6:
+ // TODO - Centronics interface
+ break;
+ case 7:
+ // TODO - Centronics interface
+ break;
+ }
+
+ LOGFUNC("%s: reg: %d val: %d\n", FUNCNAME, reg, value);
+
+ return value;
+}
+
+void sigmasoft_parallel_port::device_start()
+{
+}
diff --git a/src/mame/heathkit/sigmasoft_parallel_port.h b/src/mame/heathkit/sigmasoft_parallel_port.h
new file mode 100644
index 00000000000..30f9b98594f
--- /dev/null
+++ b/src/mame/heathkit/sigmasoft_parallel_port.h
@@ -0,0 +1,67 @@
+// license:BSD-3-Clause
+// copyright-holders:Mark Garlanger
+/***************************************************************************
+
+ SigmaSoft Universal Parallel Interface Board
+
+****************************************************************************/
+
+#ifndef MAME_HEATHKIT_SIGMASOFT_PARALLEL_PORT_H
+#define MAME_HEATHKIT_SIGMASOFT_PARALLEL_PORT_H
+
+#pragma once
+
+
+class sigmasoft_parallel_port : public device_t
+{
+public:
+ sigmasoft_parallel_port(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ void write(offs_t reg, uint8_t val);
+ uint8_t read(offs_t reg);
+
+ auto ctrl_r_cb() { return m_ctrl_r.bind(); }
+ auto video_mem_r_cb() { return m_video_mem_r.bind(); }
+
+ auto video_mem_cb() { return m_video_mem_w.bind(); }
+ auto io_lo_cb() { return m_io_lo_addr.bind(); }
+ auto io_hi_cb() { return m_io_hi_addr.bind(); }
+ auto window_lo_cb() { return m_window_lo_addr.bind(); }
+ auto window_hi_cb() { return m_window_hi_addr.bind(); }
+ auto ctrl_cb() { return m_ctrl_w.bind(); }
+
+protected:
+
+ virtual void device_start() override;
+
+ uint8_t video_mem_r();
+ void video_mem_w(uint8_t val);
+
+ void io_lo_addr_w(uint8_t val);
+ void io_hi_addr_w(uint8_t val);
+
+ void window_lo_addr_w(uint8_t val);
+ void window_hi_addr_w(uint8_t val);
+
+ void ctrl_w(uint8_t val);
+ uint8_t ctrl_r();
+
+private:
+
+ // Reads
+ devcb_read8 m_ctrl_r;
+ devcb_read8 m_video_mem_r;
+
+ // Writes
+ devcb_write8 m_video_mem_w;
+ devcb_write8 m_io_lo_addr;
+ devcb_write8 m_io_hi_addr;
+ devcb_write8 m_window_lo_addr;
+ devcb_write8 m_window_hi_addr;
+ devcb_write8 m_ctrl_w;
+};
+
+DECLARE_DEVICE_TYPE(SIGMASOFT_PARALLEL_PORT, sigmasoft_parallel_port)
+
+
+#endif // MAME_HEATHKIT_SIGMASOFT_PARALLEL_PORT_H
diff --git a/src/mame/heathkit/tlb.cpp b/src/mame/heathkit/tlb.cpp
index f7dd540e80b..363c5d043b3 100644
--- a/src/mame/heathkit/tlb.cpp
+++ b/src/mame/heathkit/tlb.cpp
@@ -22,6 +22,16 @@
- With superset slot option
- Screensaver freezes the screen instead of blanking the screen
+ Not Implemented (yet)
+ - With SigmaSoft IGC
+ - Interlace video support (with higher resolution)
+ - Joystick support
+ - Centronics support
+ - Lightpen support
+ - Alternate Font ROM support (missing ROM image)
+ - With Imaginator I-100
+ - Support for Tektronics Emulation (missing ROM image)
+
****************************************************************************/
/***************************************************************************
@@ -61,6 +71,20 @@
#include
+#define LOG_REG (1U << 1) // Shows register setup
+
+//#define VERBOSE (LOG_REG)
+
+#include "logmacro.h"
+
+#define LOGREG(...) LOGMASKED(LOG_REG, __VA_ARGS__)
+
+#ifdef _MSC_VER
+#define FUNCNAME __func__
+#else
+#define FUNCNAME __PRETTY_FUNCTION__
+#endif
+
// Clocks
static constexpr XTAL MASTER_CLOCK = XTAL(12'288'000);
@@ -100,6 +124,11 @@ DEFINE_DEVICE_TYPE(HEATH_WATZ, heath_watz_tlb_device, "heath_watz_tlb", "Heath T
DEFINE_DEVICE_TYPE(HEATH_GP19, heath_gp19_tlb_device, "heath_gp19_tlb", "Heath Terminal Logic Board plus Northwest Digital Systems GP-19")
DEFINE_DEVICE_TYPE(HEATH_IMAGINATOR, heath_imaginator_tlb_device, "heath_imaginator_tlb", "Heath Terminal Logic Board plus Cleveland Codonics Imaginator I-100")
+// Devices for the terminal boards compatible with SigmaSoft IGC
+DEFINE_DEVICE_TYPE(HEATH_IGC, heath_igc_tlb_device, "heath_igc_tlb_device", "Heath Terminal Logic Board plus SigmaSoft Interactive Graphics Controller")
+DEFINE_DEVICE_TYPE(HEATH_IGC_SUPER19, heath_igc_super19_tlb_device, "heath_igc_super19_tlb_device", "Heath Terminal Logic Board w/ Super19 ROM plus SigmaSoft Interactive Graphics Controller")
+DEFINE_DEVICE_TYPE(HEATH_IGC_ULTRA, heath_igc_ultra_tlb_device, "heath_igc_ultra_tlb_device", "Heath Terminal Logic Board w/ Ultra ROM plus SigmaSoft Interactive Graphics Controller")
+DEFINE_DEVICE_TYPE(HEATH_IGC_WATZ, heath_igc_watz_tlb_device, "heath_igc_watz_tlb_device", "Heath Terminal Logic Board w/Watzman ROM plus SigmaSoft Interactive Graphics Controller")
device_heath_tlb_card_interface::device_heath_tlb_card_interface(const machine_config &mconfig, device_t &device) :
@@ -1521,8 +1550,8 @@ void heath_imaginator_tlb_device::device_start()
m_mem_bank->configure_entries(0, 2, memregion("maincpu")->base(), 0x2000);
m_maincpu->space(AS_PROGRAM).install_readwrite_tap(0x8000, 0xbfff, "irq_update",
- [this] (offs_t offset, u8 &data, u8 mem_mask) { if (!machine().side_effects_disabled()) { tap_8000h(); } },
- [this] (offs_t offset, u8 &data, u8 mem_mask) { if (!machine().side_effects_disabled()) { tap_8000h(); } });
+ [this] (offs_t offset, uint8_t &data, uint8_t mem_mask) { if (!machine().side_effects_disabled()) { tap_8000h(); } },
+ [this] (offs_t offset, uint8_t &data, uint8_t mem_mask) { if (!machine().side_effects_disabled()) { tap_8000h(); } });
}
void heath_imaginator_tlb_device::device_reset()
@@ -1532,8 +1561,8 @@ void heath_imaginator_tlb_device::device_reset()
m_mem_bank->set_entry(1);
m_tap_6000h.remove();
m_tap_6000h = m_maincpu->space(AS_PROGRAM).install_readwrite_tap(0x6000, 0x7fff, "mem_map_update",
- [this] (offs_t offset, u8 &data, u8 mem_mask) { if (!machine().side_effects_disabled()) { tap_6000h(); } },
- [this] (offs_t offset, u8 &data, u8 mem_mask) { if (!machine().side_effects_disabled()) { tap_6000h(); } });
+ [this] (offs_t offset, uint8_t &data, uint8_t mem_mask) { if (!machine().side_effects_disabled()) { tap_6000h(); } },
+ [this] (offs_t offset, uint8_t &data, uint8_t mem_mask) { if (!machine().side_effects_disabled()) { tap_6000h(); } });
m_alphanumeric_mode_active = true;
m_graphics_mode_active = false;
@@ -1719,6 +1748,272 @@ void heath_imaginator_tlb_device::set_irq_line()
ASSERT_LINE : CLEAR_LINE);
}
+
+/**
+ * SigmaSoft Interactive Graphics Controller (IGC)
+ *
+ *
+ */
+heath_igc_tlb_device::heath_igc_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ heath_tlb_device(mconfig, HEATH_IGC, tag, owner, clock)
+{
+}
+
+heath_igc_tlb_device::heath_igc_tlb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ heath_tlb_device(mconfig, type, tag, owner, clock)
+{
+}
+
+void heath_igc_tlb_device::device_add_mconfig(machine_config &config)
+{
+ heath_tlb_device::device_add_mconfig(config);
+
+ m_crtc->set_update_row_callback(FUNC(heath_igc_tlb_device::crtc_update_row));
+}
+
+void heath_igc_tlb_device::device_start()
+{
+ heath_tlb_device::device_start();
+
+ m_p_graphic_ram = make_unique_clear(0x3ffff);
+ save_pointer(NAME(m_p_graphic_ram), 0x3ffff);
+
+ save_item(NAME(m_data_reg));
+ save_item(NAME(m_pixel_video_enabled));
+ save_item(NAME(m_character_video_disabled));
+ save_item(NAME(m_video_invert_enabled));
+ save_item(NAME(m_alternate_character_set_enabled));
+ save_item(NAME(m_video_fill_enabled));
+ save_item(NAME(m_read_address_increment_disabled));
+ save_item(NAME(m_memory_bank_select));
+ save_item(NAME(m_io_address));
+ save_item(NAME(m_window_address));
+}
+
+void heath_igc_tlb_device::device_reset()
+{
+ heath_tlb_device::device_reset();
+
+ sigma_ctrl_w(0);
+ m_data_reg = 0x00;
+ m_io_address = 0x0000;
+ m_window_address = 0x0000;
+}
+
+void heath_igc_tlb_device::sigma_ctrl_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_pixel_video_enabled = bool(BIT(data, 0));
+ m_character_video_disabled = bool(BIT(data, 1));
+ m_video_invert_enabled = bool(BIT(data, 2));
+ m_alternate_character_set_enabled = bool(BIT(data, 3));
+ m_video_fill_enabled = bool(BIT(data, 4));
+ m_read_address_increment_disabled = bool(BIT(data, 5));
+
+ m_memory_bank_select = bitswap<2>(data, 6, 7);
+
+ if (m_video_fill_enabled)
+ {
+ std::fill_n(&m_p_graphic_ram[(m_memory_bank_select << 16) & 0x3ffff], 0x10000, m_data_reg);
+ }
+}
+
+uint8_t heath_igc_tlb_device::sigma_ctrl_r()
+{
+ uint8_t ret_val = 0x00;
+
+ ret_val |= m_pixel_video_enabled ? 0x01 : 0x00;
+ ret_val |= m_character_video_disabled ? 0x02 : 0x00;
+ ret_val |= m_video_invert_enabled ? 0x04 : 0x00;
+ ret_val |= m_alternate_character_set_enabled ? 0x08 : 0x00;
+ ret_val |= m_video_fill_enabled ? 0x10 : 0x00;
+ ret_val |= m_read_address_increment_disabled ? 0x20 : 0x00;
+
+ ret_val |= bitswap<2>(m_memory_bank_select, 0, 1) << 6;
+
+ LOGREG("%s: ret_val: %02x\n", FUNCNAME, ret_val);
+
+ return ret_val;
+}
+
+void heath_igc_tlb_device::sigma_video_mem_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_data_reg = data;
+
+ m_p_graphic_ram[(m_memory_bank_select << 16) + m_io_address++] = data;
+}
+
+uint8_t heath_igc_tlb_device::sigma_video_mem_r()
+{
+ // control whether m_io_address is incremented during a read
+ uint32_t addr = (m_read_address_increment_disabled || machine().side_effects_disabled()) ?
+ ((m_memory_bank_select << 16) + m_io_address) :
+ ((m_memory_bank_select << 16) + m_io_address++);
+
+ return m_p_graphic_ram[addr];
+}
+
+void heath_igc_tlb_device::sigma_io_lo_addr_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_io_address = (m_io_address & 0xff00) | data;
+}
+
+void heath_igc_tlb_device::sigma_io_hi_addr_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_io_address = (data << 8) | (m_io_address & 0x00ff);
+}
+
+void heath_igc_tlb_device::sigma_window_lo_addr_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_window_address = (m_window_address & 0xff00) | data;
+}
+
+void heath_igc_tlb_device::sigma_window_hi_addr_w(uint8_t data)
+{
+ LOGREG("%s: data: %02x\n", FUNCNAME, data);
+
+ m_window_address = (data << 8) | (m_window_address & 0x00ff);
+}
+
+MC6845_UPDATE_ROW(heath_igc_tlb_device::crtc_update_row)
+{
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+
+ if (de)
+ {
+ uint8_t video_invert = m_video_invert_enabled ? 0xff : 0;
+
+ for (int x = 0; x < x_count; x++)
+ {
+ uint8_t output = 0x00;
+
+ if (!m_character_video_disabled)
+ {
+ uint8_t inv = (x == cursor_x) ? 0xff : 0;
+ uint8_t chr = m_p_videoram[(ma + x) & 0x7ff];
+
+ if (chr & 0x80)
+ {
+ inv ^= 0xff;
+ chr &= 0x7f;
+ }
+
+ // TODO handle alt font
+ output |= m_p_chargen[(chr << 4) | ra] ^ inv;
+ }
+
+ if (m_pixel_video_enabled)
+ {
+ output |= m_p_graphic_ram[(((y * 80) + x) + m_window_address) & 0xffff];
+ }
+
+ output ^= video_invert;
+
+ for (int b = 0; 8 > b; ++b)
+ {
+ *p++ = palette[BIT(output, b)];
+ }
+ }
+ }
+ else
+ {
+ std::fill_n(p, x_count * 8, palette[0]);
+ }
+}
+
+
+/**
+ * SigmaSoft and Systems IGC plus TLB with Super-19 ROM
+ *
+ */
+heath_igc_super19_tlb_device::heath_igc_super19_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ heath_igc_tlb_device(mconfig, HEATH_IGC_SUPER19, tag, owner, clock)
+{
+}
+
+const tiny_rom_entry *heath_igc_super19_tlb_device::device_rom_region() const
+{
+ return ROM_NAME(super19);
+}
+
+ioport_constructor heath_igc_super19_tlb_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(super19);
+}
+
+
+/**
+ * SigmaSoft and Systems IGC plus TLB with UltraROM
+ *
+ */
+heath_igc_ultra_tlb_device::heath_igc_ultra_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ heath_igc_tlb_device(mconfig, HEATH_IGC_ULTRA, tag, owner, clock)
+{
+}
+
+void heath_igc_ultra_tlb_device::device_add_mconfig(machine_config &config)
+{
+ heath_tlb_device::device_add_mconfig(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &heath_igc_ultra_tlb_device::mem_map);
+}
+
+void heath_igc_ultra_tlb_device::mem_map(address_map &map)
+{
+ heath_tlb_device::mem_map(map);
+
+ // update rom mirror setting to allow page 2 memory
+ map(0x0000, 0x0fff).mirror(0x2000).rom();
+
+ // Page 2 memory
+ map(0x1000, 0x1fff).mirror(0x2000).ram();
+}
+
+const tiny_rom_entry *heath_igc_ultra_tlb_device::device_rom_region() const
+{
+ return ROM_NAME(ultra19);
+}
+
+ioport_constructor heath_igc_ultra_tlb_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(ultra19);
+}
+
+
+/**
+ * SigmaSoft and Systems IGC plus TLB with Watzman ROM
+ *
+*/
+heath_igc_watz_tlb_device::heath_igc_watz_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ heath_igc_tlb_device(mconfig, HEATH_IGC_WATZ, tag, owner, clock)
+{
+}
+
+const tiny_rom_entry *heath_igc_watz_tlb_device::device_rom_region() const
+{
+ return ROM_NAME(watz19);
+}
+
+ioport_constructor heath_igc_watz_tlb_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(watz19);
+}
+
+
+/**
+ * Terminal Logic Board Connector
+ *
+ */
heath_tlb_connector::heath_tlb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, HEATH_TLB_CONNECTOR, tag, owner, clock),
device_single_card_slot_interface(mconfig, *this),
diff --git a/src/mame/heathkit/tlb.h b/src/mame/heathkit/tlb.h
index 55b11d1c98d..c461bf5c180 100644
--- a/src/mame/heathkit/tlb.h
+++ b/src/mame/heathkit/tlb.h
@@ -37,15 +37,23 @@ class device_heath_tlb_card_interface : public device_interface
virtual void dsr_in_w(int state) {}
virtual void cts_in_w(int state) {}
+ // optional SigmaSet operations
+ virtual void sigma_ctrl_w(uint8_t data) {}
+ virtual uint8_t sigma_ctrl_r() { return 0x00; }
+ virtual uint8_t sigma_video_mem_r() { return 0x00; }
+ virtual void sigma_video_mem_w(uint8_t val) {}
+ virtual void sigma_io_lo_addr_w(uint8_t val) {}
+ virtual void sigma_io_hi_addr_w(uint8_t val) {}
+ virtual void sigma_window_lo_addr_w(uint8_t val) {}
+ virtual void sigma_window_hi_addr_w(uint8_t val) {}
+
protected:
- // construction/destruction
device_heath_tlb_card_interface(const machine_config &mconfig, device_t &device);
heath_tlb_connector *const m_slot;
};
-
/**
* Standard Heath Terminal logic board
*/
@@ -290,6 +298,103 @@ class heath_imaginator_tlb_device : public heath_tlb_device
bool m_hsync_irq_raised;
};
+/**
+ * Heath TLB plus SigmaSoft Interactive Graphics Controller
+ */
+class heath_igc_tlb_device : public heath_tlb_device
+{
+public:
+ heath_igc_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ virtual void sigma_ctrl_w(uint8_t data) override;
+ virtual uint8_t sigma_ctrl_r() override;
+
+ virtual uint8_t sigma_video_mem_r() override;
+ virtual void sigma_video_mem_w(uint8_t val) override;
+
+ virtual void sigma_io_lo_addr_w(uint8_t val) override;
+ virtual void sigma_io_hi_addr_w(uint8_t val) override;
+
+ virtual void sigma_window_lo_addr_w(uint8_t val) override;
+ virtual void sigma_window_hi_addr_w(uint8_t val) override;
+
+protected:
+ heath_igc_tlb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ virtual MC6845_UPDATE_ROW(crtc_update_row) override;
+
+ void control_reg_w(uint8_t data);
+ void video_memory_w(uint8_t data);
+ uint8_t video_memory_r();
+
+ void io_addr_lo_w(uint8_t data);
+ void io_addr_hi_w(uint8_t data);
+
+ void window_addr_lo_w(uint8_t data);
+ void window_addr_hi_w(uint8_t data);
+
+ std::unique_ptr m_p_graphic_ram;
+
+ // Control Register
+ bool m_pixel_video_enabled;
+ bool m_character_video_disabled;
+ bool m_video_invert_enabled;
+ bool m_alternate_character_set_enabled;
+ bool m_video_fill_enabled;
+ bool m_read_address_increment_disabled;
+ uint8_t m_memory_bank_select;
+
+ uint8_t m_data_reg;
+
+ uint16_t m_io_address;
+ uint16_t m_window_address;
+};
+
+/**
+ * Heath TLB with the super19 ROM plus SigmaSoft Interactive Graphics Controller
+ */
+class heath_igc_super19_tlb_device : public heath_igc_tlb_device
+{
+public:
+ heath_igc_super19_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+protected:
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual ioport_constructor device_input_ports() const override;
+};
+
+/**
+ * Heath TLB with the ultrarom plus SigmaSoft Interactive Graphics Controller
+ */
+class heath_igc_ultra_tlb_device : public heath_igc_tlb_device
+{
+public:
+ heath_igc_ultra_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+protected:
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ void mem_map(address_map &map);
+};
+
+/**
+ * Heath TLB with the watzman ROM plus SigmaSoft Interactive Graphics Controller
+ */
+class heath_igc_watz_tlb_device : public heath_igc_tlb_device
+{
+public:
+ heath_igc_watz_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+protected:
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual ioport_constructor device_input_ports() const override;
+};
DECLARE_DEVICE_TYPE(HEATH_TLB, heath_tlb_device)
DECLARE_DEVICE_TYPE(HEATH_GP19, heath_gp19_tlb_device)
@@ -298,7 +403,10 @@ DECLARE_DEVICE_TYPE(HEATH_SUPER19, heath_super19_tlb_device)
DECLARE_DEVICE_TYPE(HEATH_SUPERSET, heath_superset_tlb_device)
DECLARE_DEVICE_TYPE(HEATH_WATZ, heath_watz_tlb_device)
DECLARE_DEVICE_TYPE(HEATH_ULTRA, heath_ultra_tlb_device)
-
+DECLARE_DEVICE_TYPE(HEATH_IGC, heath_igc_tlb_device)
+DECLARE_DEVICE_TYPE(HEATH_IGC_SUPER19, heath_igc_super19_tlb_device)
+DECLARE_DEVICE_TYPE(HEATH_IGC_ULTRA, heath_igc_ultra_tlb_device)
+DECLARE_DEVICE_TYPE(HEATH_IGC_WATZ, heath_igc_watz_tlb_device)
/**
* Connector for the Terminal Logic Board in an H-89 class computer
@@ -333,11 +441,25 @@ class heath_tlb_connector : public device_t,
void dsr_in_w(int state) { if (m_tlb) m_tlb->dsr_in_w(state); }
void cts_in_w(int state) { if (m_tlb) m_tlb->cts_in_w(state); }
+ // signals out from the tlb
void serial_out_b(int data) { m_write_sd(data); }
void dtr_out(int data) { m_dtr_cb(data); }
void rts_out(int data) { m_rts_cb(data); }
void reset_out(int data) { m_reset(data); }
+ // optional SigmaSet operations
+ void sigma_ctrl_w(uint8_t data) { if (m_tlb) m_tlb->sigma_ctrl_w(data); }
+ uint8_t sigma_ctrl_r() { return (m_tlb) ? m_tlb->sigma_ctrl_r() : 0x00; }
+
+ uint8_t sigma_video_mem_r() { return (m_tlb) ? m_tlb->sigma_video_mem_r() : 0x00; }
+ void sigma_video_mem_w(uint8_t val) { if (m_tlb) m_tlb->sigma_video_mem_w(val); }
+
+ void sigma_io_lo_addr_w(uint8_t val) { if (m_tlb) m_tlb->sigma_io_lo_addr_w(val); }
+ void sigma_io_hi_addr_w(uint8_t val) { if (m_tlb) m_tlb->sigma_io_hi_addr_w(val); }
+
+ void sigma_window_lo_addr_w(uint8_t val) { if (m_tlb) m_tlb->sigma_window_lo_addr_w(val); }
+ void sigma_window_hi_addr_w(uint8_t val) { if (m_tlb) m_tlb->sigma_window_hi_addr_w(val); }
+
protected:
virtual void device_start() override;
diff --git a/src/mame/igs/lordgun.cpp b/src/mame/igs/lordgun.cpp
index 279b7588508..b706aefff9e 100644
--- a/src/mame/igs/lordgun.cpp
+++ b/src/mame/igs/lordgun.cpp
@@ -11,15 +11,16 @@
CPU : 68000 + Z80
Custom : IGS005, IGS006, IGS007, IGS008
-Sound : M6295 [+ M6295] + YM3812 or YMF278B
+Sound : M6295 + YM3812 or YMF278B
NVRAM : 93C46
------------------------------------------------------------------------------------
-Year + Game PCB FM Sound Chips Notes
------------------------------------------------------------------------------------
-1994 Lord Of Gun T0076 YM3812 IGS005? IGS006 IGS007 IGS008 Lightguns
-1994 Alien Challenge ? YMF278B ? Not encrypted
------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------------
+Year + Game PCB FM Sound Custom IGS Chips Notes
+-------------------------------------------------------------------------------------------------
+1994 Lord Of Gun (World) T0062-2+NO.0064 YM3812 IGS005 IGS006 IGS007 IGS008 Lightguns
+1994 Lord Of Gun (US) T0076 YM3812 IGS005 IGS006 IGS007 IGS008 Lightguns
+1994 Alien Challenge NO-0085 YMF278B IGS005 IGS006 IGS007 IGS008 Not encrypted
+-------------------------------------------------------------------------------------------------
To do:
@@ -28,7 +29,6 @@ To do:
- lordgun: wrong colors for tilemap 0 in the 2nd leg of the last stage (where some sprite priority bugs happen too)
- lordgun: in the jungle level, final enemy, tilemap 0 does not scroll. It may have wrong priority, or may need to be
disabled, even though it is used by enemies to hide, so it's probably just odd but right after all.
-- aliencha: no info on the PCB (clocks, chips etc.)
Notes:
@@ -765,7 +765,7 @@ IGSPCB NO. T0076
|LORDGUN.90 IGSB001 |
|J PAL 6116 |
|A PAL 6116 6116 |
-|M IGS003 6116 |
+|M IGS005 6116 |
|M 68000P10 PAL 6116 |
|A PAL PAL 6116 |
| PAL 6116 |
@@ -778,12 +778,12 @@ IGSPCB NO. T0076
--------------------------------------------------------
HW Notes:
- 68k clock: 10.000MHz
- Z80 clock: 5.000MHz
+ 68k clock: 10.000MHz (20.000MHz/2)
+ Z80 clock: 5.000MHz (20.000MHz/4)
VSync: 60Hz
HSync: 15.15kHz
YM3812 clock: 3.57945MHz
- OKI 6295 clock: 5.000MHz
+ OKI 6295 clock: 1.000MHz (20.000MHz/20)
OKI 6295 pin7: HI
All frequencies are checked with my frequency counter (i.e. they are not guessed)
@@ -795,16 +795,56 @@ HW Notes:
LORDGUN.10 | 27C040
LORDGUN.4 /
------
+--------------------------------------------------
+
+Lord of Gun - World version (c) 1994 IGS
+
+PCB: IGS PCB NO.T0062-2 with a IGS PCB NO.0064 ROM board
+
+ Main: MC68000P10 (10MHz rated)
+ Sub: Zilog Z0840006PCS (Z80 6MHz rated)
+ Sound: OKI M6295, Yamaha YM3812-F + Y3014B-F
+ OSC: 20.000MHz, 3.579545MHz
+EEPROM: NMC 9346N
+
+1 Push Button - Test/Setup Mode
+
+Custom chips:
+IGS 005 (144 Pin PQFP)
+IGS 006 (144 Pin PQFP)
+IGS 007 (144 Pin PQFP)
+Lattice pLSI 1024-60LJ instead of IGS 008
+
+The PCB NO.0064 ROM board has sockets for 9 mask ROMs and 12 EPROMs:
+
+IGS A001
+IGS A002
+IGS A003
+
+IGS B001
+IGS B002
+IGS B003
+
+IGS T001
+IGS T002
+IGS T003
+
+EPROMs replace IGS A004 through IGS A006, EPROM data is interleaved ROMs with pairs
+ matching the lower half of each mask ROM while the upper half has different graphics
+ data but again interleaved.
+
+NOTE: This set is for use in all Countries excluding USA, Canada, Mexico, Japan & Taiwan.
-Lord of Gun (c) 1994 IGS
+--------------------------------------------------
+
+Lord of Gun - USA, Canada & Mexico (c) 1994 IGS
PCB: IGSPCB NO.T0076
- Main: MC68000P10 10MHz
- Sub: Zilog Z0840006PCS (Z80 6MHz)
+ Main: MC68000P10 (10MHz rated)
+ Sub: Zilog Z0840006PCS (Z80 6MHz rated)
Sound: OKI M6295, Yamaha YM3812-F + Y3014B-F
- OSC: 20.000 MHz, Unmarked OSC for sound chips
+ OSC: 20.000MHz, 3.579545MHz
EEPROM: NMC 9346N
1 Push Button - Test/Setup Mode
@@ -815,8 +855,8 @@ IGS 006 (144 Pin PQFP)
IGS 007 (144 Pin PQFP)
IGS 008 (160 Pin PQFP)
-lg_u122.m3 - Labelled as "LORD GUN U122-M3" MX 27C4000
-lg_u144.m3 - Labelled as "LORD GUN U144-M3" MX 27C4000
+lg_u122.m3 - Labelled as "LORD GUN U122-M3" MX 27C4000 (Note: U122 is for the IGS PCB NO.T0062-2)
+lg_u144.m3 - Labelled as "LORD GUN U144-M3" MX 27C4000 (Note: U144 is for the IGS PCB NO.T0062-2)
lordgun.u90 - Labelled as "LORD GUN U90" 27C512
lordgunu.100 - Labelled as "LORD GUN U100" MX 27C4000
@@ -840,6 +880,28 @@ IGS T001
IGS T002
IGS T003
+--------------------------------------------------
+
+NOTE: The following program ROM labels have been seen
+ but not dumped to verify versions:
+
+LORD/GUN U10-D3 (USA version, but not verfied to be currently dumped version)
+LORD/GUN U4-D3
+
+LORD/GUN U10-J3 (possibly a Japanese version?)
+LORD/GUN U4-J3
+LORD/GUN U100-1
+
+LORD/GUN U10-J4 (possibly a Japanese version?)
+LORD/GUN U4-J4
+LORD/GUN U100-1
+
+LORD/GUN U10-K5 (possibly a Korean version?)
+LORD/GUN U4-K5
+LORD/GUN U100-1
+
+--------------------------------------------------
+
DIP Switch-1 (4 Position DIP)
--------------------------------------------------
DipSwitch Title | Function | 1 | 2 | 3 | 4 |
@@ -922,36 +984,78 @@ NOTE: Speakers should be connected serially to Speaker (+) and Speaker (-).
***************************************************************************/
-ROM_START( lordgun )
+ROM_START( lordgun ) // World set, excluding USA, Canada, Mexico, Japan & Taiwan
+ ROM_REGION( 0x100000, "maincpu", 0 ) // 68000
+ ROM_LOAD16_BYTE( "lord_gun_u144-ch.u144", 0x00000, 0x80000, CRC(ea54ee18) SHA1(5ce3fe0d46c524562a627fe7418dab9753cf74b3) ) // hand written label LORD/GUN U144-CH
+ ROM_LOAD16_BYTE( "lord_gun_u122-ch.u122", 0x00001, 0x80000, CRC(969a0348) SHA1(6ce064c7c42c51969ea1271c6f75fc602602cfa3) ) // hand written label LORD/GUN U122-CH
+
+ ROM_REGION( 0x010000, "soundcpu", 0 ) // Z80
+ ROM_LOAD( "lord_gun_160.u160", 0x00000, 0x10000, CRC(d59b5e28) SHA1(36696058684d69306f463ed543c8b0195bafa21e) ) // == lord_gun_u90.u90 - 1xxxxxxxxxxxxxxx = 0xFF
+
+ ROM_REGION( 0x300000, "tiles0", 0 ) // Tilemaps 0 & 3
+ ROM_LOAD( "igs_t001.u8", 0x000000, 0x100000, CRC(36dd96f3) SHA1(4e70eb807160e7ed1b19d7f38df3a38021f42d9b) ) // same data as lordgunu set, different U location
+ ROM_LOAD( "igs_t002.u18", 0x100000, 0x100000, CRC(816a7665) SHA1(f2f2624ab262c957f84c657cfc432d14c61b19e8) )
+ ROM_LOAD( "igs_t003.u19", 0x200000, 0x100000, CRC(cbfee543) SHA1(6fad8ef8d683f709f6ff2b16319447516c372fc8) )
+
+ ROM_REGION( 0x600000, "tiles1", 0 ) // Tilemaps 1 & 2
+ ROM_LOAD( "igs_b001.u1", 0x000000, 0x200000, CRC(3096de1c) SHA1(d010990d21cfda9cb8ab5b4bc0e329c23b7719f5) ) // same data as lordgunu set, different U location
+ ROM_LOAD( "igs_b002.u2", 0x200000, 0x200000, CRC(2234531e) SHA1(58a82e31a1c0c1a4dd026576319f4e7ecffd140e) )
+ ROM_LOAD( "igs_b003.u9", 0x400000, 0x200000, CRC(6cbf21ac) SHA1(ad25090a00f291aa48929ffa01347cc53e0051f8) )
+
+ ROM_REGION( 0xc00000, "sprites", 0 ) // Sprites
+ ROM_LOAD( "igs_a001.u22", 0x000000, 0x200000, CRC(400abe33) SHA1(20de1eb626424ea41bd55eb3cecd6b50be744ee0) ) // == igs_a001.u14, different U location
+ ROM_LOAD16_BYTE( "lord_gun_u24.u24", 0x200000, 0x080000, CRC(454a5b11) SHA1(2e2e16e5f61c6e4648252ef172409efabbaa0b80) ) // == 1/2 IGS A004 even
+ ROM_LOAD16_BYTE( "lord_gun_u23.u23", 0x200001, 0x080000, CRC(a0d7aada) SHA1(3c6d4053e0930dcfdd43c7eb85ca2ba2297c136f) ) // == 1/2 IGS A004 odd
+ ROM_LOAD16_BYTE( "lord_gun_u7.u7", 0x300000, 0x080000, CRC(95ef3894) SHA1(0962e2545f7d0551a8272d87ea21401d2c5b8d80) )
+ ROM_LOAD16_BYTE( "lord_gun_u14.u14", 0x300001, 0x080000, CRC(dc8a77a1) SHA1(0247acda7556c300e1baa9b726ec835523456761) )
+ ROM_LOAD( "igs_a002.u21", 0x400000, 0x200000, CRC(a4810e38) SHA1(c31fe641feab2c93795fc35bf71d4f37af1056d4) ) // == igs_a002.u9, different U location
+ ROM_LOAD16_BYTE( "lord_gun_u5.u5", 0x600000, 0x080000, CRC(63aa10c3) SHA1(743207237409319aec79dc2a486736247a582ca9) ) // == 1/2 IGS A005 even
+ ROM_LOAD16_BYTE( "lord_gun_u13.u13", 0x600001, 0x080000, CRC(478e248c) SHA1(3b2c4cdf262fe766015e8c12a4fe356da8d88f84) ) // == 1/2 IGS A005 odd
+ ROM_LOAD16_BYTE( "lord_gun_u4.u4", 0x700000, 0x080000, CRC(d203c24e) SHA1(d90ba0ea0f823a8013a5a2be50e1c36af96f9efd) )
+ ROM_LOAD16_BYTE( "lord_gun_u11.u11", 0x700001, 0x080000, CRC(72277dcd) SHA1(89f6ad1f6813751fcccc15ee5ab6ce63b93a9b13) )
+ ROM_LOAD( "igs_a003.u20", 0x800000, 0x200000, CRC(649e48d9) SHA1(ce346154024cf13f3e40000ceeb4c2003cd35894) ) // == igs_a003.u3, different U location
+ ROM_LOAD16_BYTE( "lord_gun_u12.u12", 0xa00000, 0x080000, CRC(a2a55d65) SHA1(aad9ee5b9a93a5cd14a088c4bade9bab34f9e206) ) // == 1/2 IGS A006 even
+ ROM_LOAD16_BYTE( "lord_gun_u6.u6", 0xa00001, 0x080000, CRC(fe649605) SHA1(80c22099ed630bdc825ebd910bcc48caad72e647) ) // == 1/2 IGS A006 odd
+ ROM_LOAD16_BYTE( "lord_gun_u10.u10", 0xb00000, 0x080000, CRC(eea39e5e) SHA1(806a97a08d0108509d30732b507e1064215295c6) )
+ ROM_LOAD16_BYTE( "lord_gun_u3.u3", 0xb00001, 0x080000, CRC(233782f8) SHA1(ef2049aadbcf5c409275ecfbbe75bdade5b087d4) )
+
+ ROM_REGION( 0x080000, "oki", 0 ) // Samples
+ ROM_LOAD( "lord_gun_u161-3.u161", 0x00000, 0x80000, CRC(b4e0fa07) SHA1(f5f33fe3f3a124f4737751fda3ea409fceeec0be) ) // == lord_gun_u100.u100
+
+ ROM_REGION( 0x80, "eeprom", ROMREGION_LE|ROMREGION_16BIT ) // Default eeprom
+ ROM_LOAD( "eeprom", 0x00, 0x80, CRC(0dad0e43) SHA1(c216d1f19228e103b78e5acb30a66dab3804ac70) )
+ROM_END
+
+ROM_START( lordgunu ) // USA, Canada & Mexico
ROM_REGION( 0x100000, "maincpu", 0 ) // 68000
- ROM_LOAD16_BYTE( "lordgun.10", 0x00000, 0x80000, CRC(acda77ef) SHA1(7cd8580419e2f62a3b5a1e4a6020a3ef978ff1e8) )
- ROM_LOAD16_BYTE( "lordgun.4", 0x00001, 0x80000, CRC(a1a61254) SHA1(b0c5aa656024cfb9be28a11061656159e7b72d00) )
+ ROM_LOAD16_BYTE( "lord_gun_u10.u10", 0x00000, 0x80000, CRC(acda77ef) SHA1(7cd8580419e2f62a3b5a1e4a6020a3ef978ff1e8) ) // == LORD GUN U144-M3?
+ ROM_LOAD16_BYTE( "lord_gun_u4.u4", 0x00001, 0x80000, CRC(a1a61254) SHA1(b0c5aa656024cfb9be28a11061656159e7b72d00) ) // == LORD GUN U122-M3?
ROM_REGION( 0x010000, "soundcpu", 0 ) // Z80
- ROM_LOAD( "lordgun.90", 0x00000, 0x10000, CRC(d59b5e28) SHA1(36696058684d69306f463ed543c8b0195bafa21e) ) // 1xxxxxxxxxxxxxxx = 0xFF
+ ROM_LOAD( "lord_gun_u90.u90", 0x00000, 0x10000, CRC(d59b5e28) SHA1(36696058684d69306f463ed543c8b0195bafa21e) ) // labeled as LORD/GUN U90 - 1xxxxxxxxxxxxxxx = 0xFF
ROM_REGION( 0x300000, "tiles0", 0 ) // Tilemaps 0 & 3
- ROM_LOAD( "igst001.108", 0x000000, 0x100000, CRC(36dd96f3) SHA1(4e70eb807160e7ed1b19d7f38df3a38021f42d9b) )
- ROM_LOAD( "igst002.114", 0x100000, 0x100000, CRC(816a7665) SHA1(f2f2624ab262c957f84c657cfc432d14c61b19e8) )
- ROM_LOAD( "igst003.119", 0x200000, 0x100000, CRC(cbfee543) SHA1(6fad8ef8d683f709f6ff2b16319447516c372fc8) )
+ ROM_LOAD( "igs_t001.u108", 0x000000, 0x100000, CRC(36dd96f3) SHA1(4e70eb807160e7ed1b19d7f38df3a38021f42d9b) )
+ ROM_LOAD( "igs_t002.u114", 0x100000, 0x100000, CRC(816a7665) SHA1(f2f2624ab262c957f84c657cfc432d14c61b19e8) )
+ ROM_LOAD( "igs_t003.u119", 0x200000, 0x100000, CRC(cbfee543) SHA1(6fad8ef8d683f709f6ff2b16319447516c372fc8) )
ROM_REGION( 0x600000, "tiles1", 0 ) // Tilemaps 1 & 2
- ROM_LOAD( "igsb001.82", 0x000000, 0x200000, CRC(3096de1c) SHA1(d010990d21cfda9cb8ab5b4bc0e329c23b7719f5) )
- ROM_LOAD( "igsb002.91", 0x200000, 0x200000, CRC(2234531e) SHA1(58a82e31a1c0c1a4dd026576319f4e7ecffd140e) )
- ROM_LOAD( "igsb003.97", 0x400000, 0x200000, CRC(6cbf21ac) SHA1(ad25090a00f291aa48929ffa01347cc53e0051f8) )
-
- ROM_REGION( 0xc00000, "sprites", 0 ) // Sprites
- ROM_LOAD( "igsa001.14", 0x000000, 0x200000, CRC(400abe33) SHA1(20de1eb626424ea41bd55eb3cecd6b50be744ee0) )
- ROM_LOAD( "igsa004.13", 0x200000, 0x200000, CRC(52687264) SHA1(28444cf6b5662054e283992857e0827a2ca15b83) )
- ROM_LOAD( "igsa002.9", 0x400000, 0x200000, CRC(a4810e38) SHA1(c31fe641feab2c93795fc35bf71d4f37af1056d4) )
- ROM_LOAD( "igsa005.8", 0x600000, 0x200000, CRC(e32e79e3) SHA1(419f9b501e5a37d763ece9322271e61035b50217) )
- ROM_LOAD( "igsa003.3", 0x800000, 0x200000, CRC(649e48d9) SHA1(ce346154024cf13f3e40000ceeb4c2003cd35894) )
- ROM_LOAD( "igsa006.2", 0xa00000, 0x200000, CRC(39288eb6) SHA1(54d157f0e151f6665f4288b4d09bd65571005132) )
+ ROM_LOAD( "igs_b001.u82", 0x000000, 0x200000, CRC(3096de1c) SHA1(d010990d21cfda9cb8ab5b4bc0e329c23b7719f5) )
+ ROM_LOAD( "igs_b002.u91", 0x200000, 0x200000, CRC(2234531e) SHA1(58a82e31a1c0c1a4dd026576319f4e7ecffd140e) )
+ ROM_LOAD( "igs_b003.u97", 0x400000, 0x200000, CRC(6cbf21ac) SHA1(ad25090a00f291aa48929ffa01347cc53e0051f8) )
+
+ ROM_REGION( 0xc00000, "sprites", 0 ) // Sprites
+ ROM_LOAD( "igs_a001.u14", 0x000000, 0x200000, CRC(400abe33) SHA1(20de1eb626424ea41bd55eb3cecd6b50be744ee0) )
+ ROM_LOAD( "igs_a004.u13", 0x200000, 0x200000, CRC(52687264) SHA1(28444cf6b5662054e283992857e0827a2ca15b83) )
+ ROM_LOAD( "igs_a002.u9", 0x400000, 0x200000, CRC(a4810e38) SHA1(c31fe641feab2c93795fc35bf71d4f37af1056d4) )
+ ROM_LOAD( "igs_a005.u8", 0x600000, 0x200000, CRC(e32e79e3) SHA1(419f9b501e5a37d763ece9322271e61035b50217) )
+ ROM_LOAD( "igs_a003.u3", 0x800000, 0x200000, CRC(649e48d9) SHA1(ce346154024cf13f3e40000ceeb4c2003cd35894) )
+ ROM_LOAD( "igs_a006.u2", 0xa00000, 0x200000, CRC(39288eb6) SHA1(54d157f0e151f6665f4288b4d09bd65571005132) )
ROM_REGION( 0x080000, "oki", 0 ) // Samples
- ROM_LOAD( "lordgun.100", 0x00000, 0x80000, CRC(b4e0fa07) SHA1(f5f33fe3f3a124f4737751fda3ea409fceeec0be) )
+ ROM_LOAD( "lord_gun_u100.u100", 0x00000, 0x80000, CRC(b4e0fa07) SHA1(f5f33fe3f3a124f4737751fda3ea409fceeec0be) ) // labeled as LORD/GUN U100
- ROM_REGION( 0x80, "eeprom", ROMREGION_LE|ROMREGION_16BIT ) // Default eeprom
+ ROM_REGION( 0x80, "eeprom", ROMREGION_LE|ROMREGION_16BIT ) // Default eeprom
ROM_LOAD( "eeprom", 0x00, 0x80, CRC(0dad0e43) SHA1(c216d1f19228e103b78e5acb30a66dab3804ac70) )
ROM_END
@@ -1114,6 +1218,7 @@ void lordgun_state::init_aliencha()
***************************************************************************/
-GAME( 1994, lordgun, 0, lordgun, lordgun, lordgun_state, init_lordgun, ROT0, "IGS", "Lord of Gun (USA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, lordgun, 0, lordgun, lordgun, lordgun_state, init_lordgun, ROT0, "IGS", "Lord of Gun (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // Excludes USA, Canada, Mexico, Japan & Taiwan
+GAME( 1994, lordgunu, lordgun, lordgun, lordgun, lordgun_state, init_lordgun, ROT0, "IGS", "Lord of Gun (USA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // USA, Canada & Mexico
GAME( 1994, aliencha, 0, aliencha, aliencha, lordgun_state, init_aliencha, ROT0, "IGS", "Alien Challenge (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, alienchac, aliencha, aliencha, aliencha, lordgun_state, init_aliencha, ROT0, "IGS", "Alien Challenge (China)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/igs/pgmprot_igs025_igs022.cpp b/src/mame/igs/pgmprot_igs025_igs022.cpp
index d5b21b92b3d..b120facd3fe 100644
--- a/src/mame/igs/pgmprot_igs025_igs022.cpp
+++ b/src/mame/igs/pgmprot_igs025_igs022.cpp
@@ -396,6 +396,7 @@ INPUT_PORTS_START( killbld )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region") /* Region - supplied by protection device */
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x00ff, 0x0021, "Region" )
PORT_DIPSETTING( 0x0016, DEF_STR( Taiwan ) )
PORT_DIPSETTING( 0x0017, DEF_STR( China ) )
@@ -416,6 +417,7 @@ INPUT_PORTS_START( dw3 )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region") /* Region - supplied by protection device */
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_CONFNAME( 0x000f, 0x0006, DEF_STR( Region ) )
// PORT_CONFSETTING( 0x0000, "0" )
PORT_CONFSETTING( 0x0001, DEF_STR( Japan ) )
@@ -432,6 +434,7 @@ INPUT_PORTS_START( dw3j ) // for dw3100 set
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region") /* Region - supplied by protection device */
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_CONFNAME( 0x000f, 0x0001, DEF_STR( Region ) )
// PORT_CONFSETTING( 0x0000, "0" )
PORT_CONFSETTING( 0x0001, DEF_STR( Japan ) )
diff --git a/src/mame/igs/pgmprot_igs025_igs028.cpp b/src/mame/igs/pgmprot_igs025_igs028.cpp
index 55e9a02dee2..c052af3dd65 100644
--- a/src/mame/igs/pgmprot_igs025_igs028.cpp
+++ b/src/mame/igs/pgmprot_igs025_igs028.cpp
@@ -202,6 +202,7 @@ INPUT_PORTS_START( olds )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region") /* Region - supplied by protection device */
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_CONFNAME( 0x000f, 0x0006, DEF_STR( Region ) )
/* includes the following regions:
1 = taiwan, 2 = china, 3 = japan (title = orlegend special),
diff --git a/src/mame/igs/pgmprot_igs027a_type2.cpp b/src/mame/igs/pgmprot_igs027a_type2.cpp
index 4592a910a7b..fbdf66d5caa 100644
--- a/src/mame/igs/pgmprot_igs027a_type2.cpp
+++ b/src/mame/igs/pgmprot_igs027a_type2.cpp
@@ -320,6 +320,7 @@ INPUT_PORTS_START( dw2001 )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region") /* Region - supplied by protection device */
+ PORT_BIT( 0xfff0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_CONFNAME( 0x000f, 0x0005, DEF_STR( Region ) )
PORT_CONFSETTING( 0x0000, DEF_STR( China ) )
PORT_CONFSETTING( 0x0001, DEF_STR( Taiwan ) )
diff --git a/src/mame/igs/pgmprot_orlegend.cpp b/src/mame/igs/pgmprot_orlegend.cpp
index 8fd516ce357..72b3d8d1703 100644
--- a/src/mame/igs/pgmprot_orlegend.cpp
+++ b/src/mame/igs/pgmprot_orlegend.cpp
@@ -189,6 +189,7 @@ INPUT_PORTS_START( orlegend )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region")
+ PORT_BIT( 0xfffc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Region ) )
PORT_CONFSETTING( 0x0000, DEF_STR( World ) )
PORT_CONFSETTING( 0x0001, "World (duplicate)" ) // again?
@@ -200,6 +201,7 @@ INPUT_PORTS_START( orlegendt )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region")
+ PORT_BIT( 0xfff8, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x0007, 0x0004, DEF_STR( Region ) )
PORT_CONFSETTING( 0x0000, "Invalid 00?" )
PORT_CONFSETTING( 0x0001, "Invalid 01?" )
@@ -213,6 +215,7 @@ INPUT_PORTS_START( orlegendk )
PORT_INCLUDE ( pgm )
PORT_MODIFY("Region")
+ PORT_BIT( 0xfff8, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x0007, 0x0002, DEF_STR( Region ) )
PORT_CONFSETTING( 0x0000, "Invalid 00?" )
PORT_CONFSETTING( 0x0001, "Invalid 01?" )
diff --git a/src/mame/irem/m63.cpp b/src/mame/irem/m63.cpp
index b0ddcb2cf2b..d81b600a8a0 100644
--- a/src/mame/irem/m63.cpp
+++ b/src/mame/irem/m63.cpp
@@ -201,7 +201,6 @@ class m63_state : public driver_device
void m63_colorram_w(offs_t offset, uint8_t data);
void m63_videoram2_w(offs_t offset, uint8_t data);
void pal_bank_w(int state);
- void m63_flipscreen_w(int state);
void fghtbskt_flipscreen_w(int state);
void coin1_w(int state);
void coin2_w(int state);
@@ -308,12 +307,6 @@ void m63_state::pal_bank_w(int state)
m_bg_tilemap->mark_all_dirty();
}
-void m63_state::m63_flipscreen_w(int state)
-{
- flip_screen_set(!state);
- machine().tilemap().mark_all_dirty();
-}
-
void m63_state::fghtbskt_flipscreen_w(int state)
{
flip_screen_set(state);
@@ -747,7 +740,7 @@ void m63_state::m63(machine_config &config)
ls259_device &outlatch(LS259(config, "outlatch")); // probably chip at E7 obscured by pulldown resistor
outlatch.q_out_cb<0>().set(FUNC(m63_state::nmi_mask_w));
- outlatch.q_out_cb<2>().set(FUNC(m63_state::m63_flipscreen_w));
+ outlatch.q_out_cb<2>().set(FUNC(m63_state::flip_screen_set)).invert();
outlatch.q_out_cb<3>().set(FUNC(m63_state::pal_bank_w));
outlatch.q_out_cb<6>().set(FUNC(m63_state::coin1_w));
outlatch.q_out_cb<7>().set(FUNC(m63_state::coin2_w));
diff --git a/src/mame/irem/travrusa.cpp b/src/mame/irem/travrusa.cpp
index 18cf5ee7ddf..671c4cfb07d 100644
--- a/src/mame/irem/travrusa.cpp
+++ b/src/mame/irem/travrusa.cpp
@@ -125,9 +125,8 @@ class travrusa_state : public driver_device
Convert the color PROMs into a more useable format.
- Traverse USA has one 256x8 character palette PROM (some versions have two
- 256x4), one 32x8 sprite palette PROM, and one 256x4 sprite color lookup
- table PROM.
+ Traverse USA has one 32x8 sprite palette PROM, one 256x4 sprite color lookup
+ table PROM and either one 256x8 or two 256x4 character palette PROMs.
I don't know for sure how the palette PROMs are connected to the RGB
output, but it's probably something like this; note that RED and BLUE
@@ -712,6 +711,23 @@ void travrusa_state::shtriderb(machine_config &config)
***************************************************************************/
+/* The only difference between 'BIOSes' (not really a BIOS) is a different PROM setup (but same content) on the sprites PCB:
+ Location One character palette PROM Two character palette PROMs
+ F1 74LS32 PROM
+ H1 74LS74 PROM
+ K2 PROM empty
+*/
+#define TRAVRUSA_PROMS \
+ ROM_REGION( 0x0320, "proms", 0 ) \
+ ROM_SYSTEM_BIOS( 0, "1", "One character palette PROM" ) \
+ ROMX_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef), ROM_BIOS(0) ) /* Character palette - last $100 are unused */ \
+ ROMX_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce), ROM_BIOS(0) ) /* Sprite palette */ \
+ ROMX_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54), ROM_BIOS(0) ) /* Sprite lookup table */ \
+ ROM_SYSTEM_BIOS( 1, "2", "Two character palette PROMs" ) \
+ ROMX_LOAD( "prom.h1", 0x0000, 0x0100, CRC(2f98ddf0) SHA1(e90c3cebe3e788cbf8e23030f58a1153564207e2), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_BIOS(1) ) /* On tiles PCB */ \
+ ROMX_LOAD( "prom.f1", 0x0000, 0x0100, CRC(adea1297) SHA1(8f365cc15cc3c26b388ba957d7cf3752584d5475), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_BIOS(1) ) /* On tiles PCB */ \
+ ROMX_LOAD( "prom1.f1", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce), ROM_BIOS(1) ) /* On sprites PCB */ \
+ ROMX_LOAD( "prom2.h2", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54), ROM_BIOS(1) ) /* On sprites PCB */
ROM_START( travrusa )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -733,32 +749,29 @@ ROM_START( travrusa )
ROM_LOAD( "zr1-9.l3", 0x2000, 0x2000, CRC(13be6a14) SHA1(47861910fe4c46cd72634cf7d834be2da2a0a4f9) )
ROM_LOAD( "zr1-10.k3", 0x4000, 0x2000, CRC(6fcc9fdb) SHA1(88f878b9ebf07c5a16f8cb742016cac971ed3f10) )
- ROM_REGION( 0x0320, "proms", 0 )
- ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused
- ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette
- ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table
+ TRAVRUSA_PROMS
ROM_END
- // Bootleg - "American Top" printed on title - (c) 1983 I.P. - Zippy Race graphic logo is blanked out - Main ROM0-ROM3 test NG
+// Bootleg - "American Top" printed on title - (c) 1983 I.P. - Zippy Race graphic logo is blanked out - Main ROM0-ROM3 test NG
ROM_START( travrusab )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "at4.m3", 0x0000, 0x2000, CRC(704ce6e4) SHA1(77385d853e3d5085c6ab155417e2b42212aff6fc) )
- ROM_LOAD( "at5.l3", 0x2000, 0x2000, CRC(686cb0e6) SHA1(64c7e682a181bae159cca60ffa617c532b1e16d3) )
- ROM_LOAD( "at6.k3", 0x4000, 0x2000, CRC(baf87d80) SHA1(761d687ef3f3dde80a47f547d3c822704a2ac821) )
- ROM_LOAD( "at7.h3", 0x6000, 0x2000, CRC(48091ebe) SHA1(6146af6f08053a5955d9b388d25bfbab7ad6b0e5) )
+ ROM_LOAD( "at4.m3", 0x0000, 0x2000, CRC(704ce6e4) SHA1(77385d853e3d5085c6ab155417e2b42212aff6fc) )
+ ROM_LOAD( "at5.l3", 0x2000, 0x2000, CRC(686cb0e6) SHA1(64c7e682a181bae159cca60ffa617c532b1e16d3) )
+ ROM_LOAD( "at6.k3", 0x4000, 0x2000, CRC(baf87d80) SHA1(761d687ef3f3dde80a47f547d3c822704a2ac821) )
+ ROM_LOAD( "at7.h3", 0x6000, 0x2000, CRC(48091ebe) SHA1(6146af6f08053a5955d9b388d25bfbab7ad6b0e5) )
ROM_REGION( 0x8000, "irem_audio:iremsound", 0 )
- ROM_LOAD( "11.a1", 0x7000, 0x1000, CRC(d2c0bc33) SHA1(3a52ae514daf985d297416301dac0ac6cbe671d7) )
+ ROM_LOAD( "11.a1", 0x7000, 0x1000, CRC(d2c0bc33) SHA1(3a52ae514daf985d297416301dac0ac6cbe671d7) )
ROM_REGION( 0x06000, "tiles", 0 )
- ROM_LOAD( "zippyrac.001", 0x0000, 0x2000, CRC(aa8994dd) SHA1(9b326ce52a03d723e5c3c1b5fd4aa8fa7f70f904) ) // at1.e3
- ROM_LOAD( "mr8.3c", 0x2000, 0x2000, CRC(3a046dd1) SHA1(65c1dd1c0b5fb72ac5c04e11a577308245e4b312) ) // at2.c3
- ROM_LOAD( "mr9.3a", 0x4000, 0x2000, CRC(1cc3d3f4) SHA1(e7ee365d43d783cb6b7df37c6edeadbed35318d9) ) // at3.a3
+ ROM_LOAD( "zippyrac.001", 0x0000, 0x2000, CRC(aa8994dd) SHA1(9b326ce52a03d723e5c3c1b5fd4aa8fa7f70f904) ) // at1.e3
+ ROM_LOAD( "mr8.3c", 0x2000, 0x2000, CRC(3a046dd1) SHA1(65c1dd1c0b5fb72ac5c04e11a577308245e4b312) ) // at2.c3
+ ROM_LOAD( "mr9.3a", 0x4000, 0x2000, CRC(1cc3d3f4) SHA1(e7ee365d43d783cb6b7df37c6edeadbed35318d9) ) // at3.a3
ROM_REGION( 0x06000, "sprites", 0 )
- ROM_LOAD( "8.n3", 0x0000, 0x2000, CRC(00c0f46b) SHA1(5fccc188af653785f3fc0f9d36dbbbab472f6fdc) )
- ROM_LOAD( "9.m3", 0x2000, 0x2000, CRC(73ade73b) SHA1(4da012d71e7c1f46407343cc8d4fbe0397b7db71) )
- ROM_LOAD( "10.k3", 0x4000, 0x2000, CRC(fcfeaa69) SHA1(a958caf70d2dc4a80298a395cb48db210e6ca16b) )
+ ROM_LOAD( "8.n3", 0x0000, 0x2000, CRC(00c0f46b) SHA1(5fccc188af653785f3fc0f9d36dbbbab472f6fdc) )
+ ROM_LOAD( "9.m3", 0x2000, 0x2000, CRC(73ade73b) SHA1(4da012d71e7c1f46407343cc8d4fbe0397b7db71) )
+ ROM_LOAD( "10.k3", 0x4000, 0x2000, CRC(fcfeaa69) SHA1(a958caf70d2dc4a80298a395cb48db210e6ca16b) )
ROM_REGION( 0x0320, "proms", 0 )
ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused
@@ -812,10 +825,7 @@ ROM_START( motorace )
ROM_LOAD( "mr5.3m", 0x2000, 0x2000, CRC(f75f2aad) SHA1(e4a8a3da56cbc04f0c9041afac182d1bfceb1d0d) )
ROM_LOAD( "mr6.3k", 0x4000, 0x2000, CRC(518889a0) SHA1(70b417104ce86132cb5542813c1e0509b2260756) )
- ROM_REGION( 0x0320, "proms", 0 )
- ROM_LOAD( "mmi6349.ij", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused
- ROM_LOAD( "tbp18s.2", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette
- ROM_LOAD( "tbp24s10.3", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table
+ TRAVRUSA_PROMS
ROM_END
/*
@@ -845,7 +855,7 @@ mt1-9.m3 -- Sprites. Apparently all different from the other sets
mt1-10.k3 /
mm6349.k2 \
-prom1.f1 -- color PROMs, identical to other versions
+prom1.f1 -- color PROMs, identical to other versions (there are also versions with two character palette PROMs)
prom2.h2 /
Ricky2001
@@ -872,10 +882,7 @@ ROM_START( mototour )
ROM_LOAD( "mt1-9.m3", 0x2000, 0x2000, CRC(6f9f2a4e) SHA1(8ebdd69895a4dd5de7fe84505359cccaa0aca6f8) )
ROM_LOAD( "mt1-10.k3", 0x4000, 0x2000, CRC(d958def5) SHA1(198adf7e87804bd018b8cfa8bbc68623255698a2) )
- ROM_REGION( 0x0320, "proms", 0 )
- ROM_LOAD( "mmi6349.k2", 0x0000, 0x0200, CRC(c9724350) SHA1(1fac20cdc0a53d94e8f67b49d7dd71d1b9f1f7ef) ) // character palette - last $100 are unused // == mmi6349.ij
- ROM_LOAD( "prom1.f1", 0x0200, 0x0020, CRC(a1130007) SHA1(9deb0eed75dd06e86f83c819a3393158be7c9dce) ) // sprite palette // == tbp18s.2
- ROM_LOAD( "prom2.h2", 0x0220, 0x0100, CRC(76062638) SHA1(7378a26cf455d9d3df90929dc665870514c34b54) ) // sprite lookup table // == tbp24s10.3
+ TRAVRUSA_PROMS
ROM_END
@@ -993,12 +1000,12 @@ uint8_t travrusa_state::shtriderb_port11_r()
} // anonymous namespace
-GAME( 1983, travrusa, 0, travrusa, travrusa, travrusa_state, empty_init, ROT270, "Irem", "Traverse USA / Zippy Race", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, travrusab, travrusa, travrusa, travrusa, travrusa_state, empty_init, ROT270, "bootleg (I.P.)", "Traverse USA (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, travrusab2, travrusa, travrusa, travrusa, travrusa_state, empty_init, ROT270, "bootleg", "Traverse USA (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) // still shows both Irem and Tecfri
+GAME( 1983, travrusa, 0, travrusa, travrusa, travrusa_state, empty_init, ROT270, "Irem", "Traverse USA / Zippy Race", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, travrusab, travrusa, travrusa, travrusa, travrusa_state, empty_init, ROT270, "bootleg (I.P.)", "Traverse USA (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, travrusab2, travrusa, travrusa, travrusa, travrusa_state, empty_init, ROT270, "bootleg", "Traverse USA (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) // still shows both Irem and Tecfri
GAME( 1983, mototour, travrusa, travrusa, travrusa, travrusa_state, empty_init, ROT270, "Irem (Tecfri license)", "MotoTour / Zippy Race (Tecfri license)", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, motorace, travrusa, travrusa, motorace, travrusa_state, init_motorace, ROT270, "Irem (Williams license)", "MotoRace USA", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, motorace, travrusa, travrusa, motorace, travrusa_state, init_motorace, ROT270, "Irem (Williams license)", "MotoRace USA", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, shtrider, 0, shtrider, shtrider, travrusa_state, empty_init, ROT270 | ORIENTATION_FLIP_X, "Seibu Kaihatsu", "Shot Rider", MACHINE_SUPPORTS_SAVE ) // possible bootleg
-GAME( 1984, shtridera, shtrider, shtrider, shtrider, travrusa_state, init_shtridra, ROT270 | ORIENTATION_FLIP_X, "Seibu Kaihatsu (Sigma license)", "Shot Rider (Sigma license)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, shtriderb, shtrider, shtriderb, shtrider, travrusa_state, empty_init, ROT270 | ORIENTATION_FLIP_X, "bootleg", "Shot Rider (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, shtrider, 0, shtrider, shtrider, travrusa_state, empty_init, ROT270 | ORIENTATION_FLIP_X, "Seibu Kaihatsu", "Shot Rider", MACHINE_SUPPORTS_SAVE ) // possible bootleg
+GAME( 1984, shtridera, shtrider, shtrider, shtrider, travrusa_state, init_shtridra, ROT270 | ORIENTATION_FLIP_X, "Seibu Kaihatsu (Sigma license)", "Shot Rider (Sigma license)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, shtriderb, shtrider, shtriderb, shtrider, travrusa_state, empty_init, ROT270 | ORIENTATION_FLIP_X, "bootleg", "Shot Rider (bootleg)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/jaleco/jaleco_vj_pc.cpp b/src/mame/jaleco/jaleco_vj_pc.cpp
index fcbe15d1bf3..1341f88c2c2 100644
--- a/src/mame/jaleco/jaleco_vj_pc.cpp
+++ b/src/mame/jaleco/jaleco_vj_pc.cpp
@@ -48,6 +48,7 @@ jaleco_vj_pc_device::jaleco_vj_pc_device(const machine_config &mconfig, const ch
device_t(mconfig, JALECO_VJ_PC, tag, owner, clock),
device_mixer_interface(mconfig, *this, 2),
m_maincpu(*this, "maincpu"),
+ m_king_qtaro(*this, "pci:08.0"),
m_sound(*this, "isa1:vj_sound"),
m_is_steppingstage(false)
{
@@ -125,6 +126,9 @@ void jaleco_vj_pc_device::device_add_mconfig(machine_config &config)
// TODO: pci:07.3 0x30401106 VIA VT83C572, VT86C586/A/B Power Management Controller
+ JALECO_VJ_KING_QTARO(config, m_king_qtaro, 0);
+ m_king_qtaro->set_bus_master_space(m_maincpu, AS_PROGRAM); // FIXME: remove this workaround when PCI framework grows bus mastering support
+
// TODO: Should actually be pci:0a.0 but it only shows a black screen
PCI_SLOT(config, "pci:2", pci_cards, 16, 1, 2, 3, 0, "virgedx").set_fixed(true);
diff --git a/src/mame/jaleco/jaleco_vj_pc.h b/src/mame/jaleco/jaleco_vj_pc.h
index bf21d326aed..5508a9852bc 100644
--- a/src/mame/jaleco/jaleco_vj_pc.h
+++ b/src/mame/jaleco/jaleco_vj_pc.h
@@ -5,6 +5,7 @@
#pragma once
+#include "jaleco_vj_qtaro.h"
#include "jaleco_vj_sound.h"
#include "cpu/i386/i386.h"
@@ -23,6 +24,9 @@ class jaleco_vj_pc_device :
void comm_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { m_sound->comm_w(offset, data, mem_mask); }
void ymz_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { m_sound->ymz_w(offset, data, mem_mask); }
+ template void video_mix_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { m_king_qtaro->video_mix_w(offset, data); }
+ void video_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { m_king_qtaro->video_control_w(offset, data); }
+
protected:
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
@@ -35,6 +39,7 @@ class jaleco_vj_pc_device :
void boot_state_w(uint8_t data);
required_device m_maincpu;
+ required_device m_king_qtaro;
required_device m_sound;
bool m_is_steppingstage;
};
diff --git a/src/mame/jaleco/jaleco_vj_qtaro.cpp b/src/mame/jaleco/jaleco_vj_qtaro.cpp
new file mode 100644
index 00000000000..553a9295737
--- /dev/null
+++ b/src/mame/jaleco/jaleco_vj_qtaro.cpp
@@ -0,0 +1,527 @@
+// license:BSD-3-Clause
+// copyright-holders:windyfairy
+
+/*
+King Qtaro PCI card and Qtaro subboards for VJ
+
+Main board ("King Qtaro"):
+No markings
+----------------------------------------------
+| |
+| |
+| |
+| FLEX |
+| CN3 CN2 |
+| |
+| |
+| LS6201 |
+| |
+| |-------| |-| |------------|
+------ ------------- ------
+
+LS6201 - LSI LS6201 027 9850KX001 PCI Local Bus Interface
+FLEX - Altera Flex EPF10K10QC208-4 DAB239813
+CN2, CN3 - 68-pin connectors
+
+Information about the LS6201:
+https://web.archive.org/web/20070912033617/http://www.lsisys.co.jp/prod/ls6201/ls6201.htm
+https://web.archive.org/web/20001015203836/http://www.lsisys.co.jp:80/prod/LS6201.pdf
+
+The King Qtaro board appears to be a custom spec ordered from LSI Systems and shares some
+layout similarities to the LS6201 evaluation card offered by LSI Systems.
+
+
+
+
+JALECO VJ-98347
+MADE IN JAPAN
+EB-00-20125-0
+(Front)
+-----------------------------------
+| CN2 CN4 CN6 |
+| |
+| |
+| |
+| |
+| |
+| CN1 CN3 CN5 |
+-----------------------------------
+
+CN1/2/3/4/5/6 - 80-pin connectors
+
+(Back)
+-----------------------------------
+| CN9 |
+| |
+| U4 |
+| CN7 U1 CN8 |
+| U2 |
+| U3 |
+| |
+-----------------------------------
+
+U1 - ?
+U2, U3 - (Unpopulated)
+U4 - HM87AV LM3940IS
+CN7, CN8 - 68-pin connectors. Connects to CN3, CN2 on main board
+
+
+
+
+JALECO VJ-98341 ("Qtaro")
+MADE IN JAPAN
+EB-00-20124-0
+----------------------------------------
+| |
+| |----------| |
+| | | D4516161 |
+| | FLEX | U2 CN3 |
+| | | CN4 |
+| |----------| U1 |
+| |
+| |
+----------------------------------------
+FLEX - Altera FLEX EPF10K30AQC240-3 DBA439849
+D4516161 - NEC uPD4516161AG5-A80 512K x 16-bit x 2-banks (16MBit) SDRAM (SSOP50)
+U1, U2 - LVX244
+
+CN3 - 40 pin connector (connects to VJ-98342)
+CN4 - 40 pin connector (connects to VJ-98342)
+
+
+Hardware testing confirms that the Qtaro board is responsible for mixing the sprites from the subboard
+with the movies from the PC side.
+On real hardware, when the CN3 ribbon cables for two monitors going into the subboard are swapped
+but CN4 is left in its proper ordering, the sprites will appear based on the placement of the ribbon
+cable on the subboard. The movies are still in the correct ordering.
+
+
+TODO: Timing of when the videos start and stop is not accurate
+VJ needs all of the videos to start and end at the same time, and if one video finishes before the others then
+it will try to stop *all* of the video data streams at the same time on the PC side.
+Setting the buffer size <= 0x8000 fixes it to some degree because the DMAs can't run ahead of each other too far,
+but there's an issue with Stepping Stage where it'll just not send data for a small period causing videos to pause
+and then go out of sync (???).
+
+The MPEG decoder is on the FPGA on each of the Qtaro boards. The implementation here doesn't try to handle
+any potential quirks with the decoding. I think a more accurate to the FPGA version implementation would
+be required to make things work exactly like the real hardware, because the FPGA version seems to be able
+to start the video stream sooner, and it does not seem to reset any kind of state between videos.
+To the last point, I have multiple video recordings of Stepping Stage showing garbage from the previous
+video at the very start of a new video for a few frames. DMA timings are almost surely incorrect.
+
+TODO: The last decoded video frame can show up at inappropriate times
+Color bar check background in VJ for example enables the video stream so will show the last decoded frame sometimes.
+*/
+
+#include "emu.h"
+#include "jaleco_vj_qtaro.h"
+
+#include
+
+#define LOG_VIDEO (1U << 1)
+#define LOG_DMA (1U << 2)
+#define LOG_VERBOSE_VIDEO (1U << 3)
+#define LOG_VERBOSE_DMA (1U << 4)
+#define LOG_VERBOSE_VIDEO_DATA (1U << 5)
+
+// #define VERBOSE (LOG_VIDEO | LOG_DMA | LOG_VERBOSE_VIDEO | LOG_VERBOSE_DMA)
+// #define LOG_OUTPUT_STREAM std::cout
+
+#include "logmacro.h"
+
+
+DEFINE_DEVICE_TYPE(JALECO_VJ_QTARO, jaleco_vj_qtaro_device, "jaleco_vj_qtaro", "Jaleco VJ Qtaro Subboard")
+DEFINE_DEVICE_TYPE(JALECO_VJ_KING_QTARO, jaleco_vj_king_qtaro_device, "jaleco_vj_king_qtaro", "Jaleco VJ King Qtaro PCI Device")
+
+
+static constexpr unsigned DMA_BURST_SIZE = 128U;
+#define DMA_TIMER_PERIOD attotime::from_hz(33'000'000 / 64)
+
+
+jaleco_vj_qtaro_device::jaleco_vj_qtaro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, JALECO_VJ_QTARO, tag, owner, clock)
+{
+}
+
+void jaleco_vj_qtaro_device::device_start()
+{
+ save_item(NAME(m_int));
+ save_item(NAME(m_mix_level));
+}
+
+void jaleco_vj_qtaro_device::device_reset()
+{
+ m_int = 0;
+ m_mix_level = 0;
+}
+
+void jaleco_vj_qtaro_device::video_mix_w(offs_t offset, uint16_t data, uint16_t mem_mask)
+{
+ if (data != m_mix_level) {
+ LOGMASKED(LOG_VIDEO, "[%s] video_mix_w %04x\n", tag(), data);
+ }
+
+ m_mix_level = data;
+}
+
+uint8_t jaleco_vj_qtaro_device::reg_r(offs_t offset)
+{
+ return m_int;
+}
+
+void jaleco_vj_qtaro_device::reg_w(offs_t offset, uint8_t data)
+{
+ // Bit 7 is set when starting DMA for an entirely new video, then unset when video is ended
+ if (BIT(data, 7) && !BIT(m_int, 7)) {
+ LOGMASKED(LOG_VIDEO, "[%s] DMA transfer thread started %02x\n", tag(), data);
+ } else if (!BIT(data, 7) && BIT(m_int, 7)) {
+ LOGMASKED(LOG_VIDEO, "[%s] DMA transfer thread ended %02x\n", tag(), data);
+ }
+
+ m_int = data;
+}
+
+uint8_t jaleco_vj_qtaro_device::reg2_r(offs_t offset)
+{
+ // WriteStream cleanup function will loop until this returns 0.
+ // Probably relates to DMA or video playback state.
+ return 0;
+}
+
+uint32_t jaleco_vj_qtaro_device::reg3_r(offs_t offset)
+{
+ // 0x20 is some kind of default state. Relates to DMA or video playback.
+ // If this value is 0x40 then the code sets it back to 0x20 during the WriteStream cleanup function.
+ return 0x20;
+}
+
+void jaleco_vj_qtaro_device::reg3_w(offs_t offset, uint32_t data)
+{
+}
+
+void jaleco_vj_qtaro_device::write(uint8_t *data, uint32_t len)
+{
+ LOGMASKED(LOG_VERBOSE_VIDEO_DATA, "[%s] video data write %02x\n", tag(), data);
+}
+
+/////////////////////////////////////////////
+
+void jaleco_vj_king_qtaro_device::video_control_w(offs_t offset, uint16_t data, uint16_t mem_mask)
+{
+ // Speed controlled by IRQ 4 on subboard CPU
+ LOGMASKED(LOG_VIDEO, "video_control_w %04x\n", data);
+
+ // Bits 0, 2, 4 change when a video frame should or shouldn't be decoded
+ // Bits 1, 3, 5 are always set?
+}
+
+uint32_t jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_status_r(offs_t offset)
+{
+ // Tested when uploading Qtaro firmware
+ // 0x100 is set when busy and will keep looping until it's not 0x100
+ return 0;
+}
+
+void jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_status_w(offs_t offset, uint32_t data)
+{
+ // Set to 0x80000020 when uploading Qtaro firmware
+}
+
+uint32_t jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_r(offs_t offset)
+{
+ // Should only return 1 when the Qtaro subboard firmware is finished writing.
+ // Returning 1 on the first byte will cause it to stop uploading the firmware,
+ // then it'll write 3 0xffs and on the last 0xff if it sees 1 then it thinks it finished
+ // uploading the firmware successfully.
+ return 1;
+}
+
+void jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_w(offs_t offset, uint32_t data)
+{
+}
+
+uint32_t jaleco_vj_king_qtaro_device::fpga_firmware_status_r(offs_t offset)
+{
+ // Tested when uploading King Qtaro firmware
+ // 0x100 is set when busy and will keep looping until it's not 0x100
+ return 0;
+}
+
+void jaleco_vj_king_qtaro_device::fpga_firmware_status_w(offs_t offset, uint32_t data)
+{
+ // Set to 0x80000020 when uploading King Qtaro firmware
+}
+
+uint32_t jaleco_vj_king_qtaro_device::fpga_firmware_r(offs_t offset)
+{
+ // Should only return 1 when the King Qtaro firmware is finished writing.
+ // Returning 1 on the first byte will cause it to stop uploading the firmware,
+ // then it'll write 3 0xffs and on the last 0xff if it sees 1 then it thinks it finished
+ // uploading the firmware successfully.
+ return 1;
+}
+
+void jaleco_vj_king_qtaro_device::fpga_firmware_w(offs_t offset, uint32_t data)
+{
+}
+
+uint8_t jaleco_vj_king_qtaro_device::event_io_mask_r(offs_t offset)
+{
+ return m_event_io_mask[offset];
+}
+
+void jaleco_vj_king_qtaro_device::event_io_mask_w(offs_t offset, uint8_t data)
+{
+ m_event_io_mask[offset] = data;
+}
+
+uint8_t jaleco_vj_king_qtaro_device::event_unk_r(offs_t offset)
+{
+ return m_event_unk[offset];
+}
+
+void jaleco_vj_king_qtaro_device::event_unk_w(offs_t offset, uint8_t data)
+{
+ m_event_unk[offset] = data;
+}
+
+uint8_t jaleco_vj_king_qtaro_device::event_io_r(offs_t offset)
+{
+ uint8_t r = m_event_io[offset];
+ if (offset == 0)
+ r |= 0b111; // Some kind of status flag for each Qtaro board? Must be 1 after writing FPGA firmware
+ return r;
+}
+
+void jaleco_vj_king_qtaro_device::event_io_w(offs_t offset, uint8_t data)
+{
+ m_event_io[offset] = data;
+}
+
+uint32_t jaleco_vj_king_qtaro_device::event_r(offs_t offset)
+{
+ // 0x200 = Read event, based on debug strings (What was read? DMA data?)
+ return m_event;
+}
+
+void jaleco_vj_king_qtaro_device::event_w(offs_t offset, uint32_t data)
+{
+ m_event &= ~data;
+}
+
+uint32_t jaleco_vj_king_qtaro_device::event_mask_r(offs_t offset)
+{
+ return m_event_mask;
+}
+
+void jaleco_vj_king_qtaro_device::event_mask_w(offs_t offset, uint32_t data)
+{
+ m_event_mask = data;
+}
+
+uint32_t jaleco_vj_king_qtaro_device::int_r(offs_t offset)
+{
+ auto r = m_int & ~0x10;
+
+ if (m_dma_running[0] || m_dma_running[1] || m_dma_running[2]) {
+ // The only time 0x10 is referenced is when ending WriteStream for the individual Qtaro devices.
+ // All 3 of the WriteStream cleanup functions start by writing 0 to dma_requested_w and dma_running_w
+ // then loop until 0x10 is not set here.
+ r |= 0x10;
+ }
+
+ return r;
+}
+
+void jaleco_vj_king_qtaro_device::int_w(offs_t offset, uint32_t data)
+{
+ // 0x1000000 is used to trigger an event interrupt in the Qtaro driver.
+ // The interrupt will only be accepted and cleared when event_r, event2_r, event_io_r are non-zero.
+ // It's set, read, and cleared all in the device driver on the PC so no need to handle it here.
+ m_int = data;
+}
+
+uint32_t jaleco_vj_king_qtaro_device::int_fpga_r(offs_t offset)
+{
+ return m_int_fpga;
+}
+
+void jaleco_vj_king_qtaro_device::int_fpga_w(offs_t offset, uint32_t data)
+{
+ m_int_fpga = data;
+}
+
+template
+void jaleco_vj_king_qtaro_device::dma_requested_w(offs_t offset, uint32_t data)
+{
+ m_dma_running[DeviceId] = data == 1;
+
+ if (data == 1 && m_dma_descriptor_requested_addr[DeviceId] != 0) {
+ m_dma_descriptor_addr[DeviceId] = m_dma_descriptor_requested_addr[DeviceId];
+ m_dma_descriptor_length[DeviceId] = 0;
+ m_dma_descriptor_requested_addr[DeviceId] = 0;
+ }
+
+ LOGMASKED(LOG_DMA, "%lf %s dma_requested_w<%d>: %08x\n", machine().time().as_double(), machine().describe_context().c_str(), DeviceId, data);
+}
+
+template
+void jaleco_vj_king_qtaro_device::dma_descriptor_phys_addr_w(offs_t offset, uint32_t data)
+{
+ LOGMASKED(LOG_DMA, "dma_descriptor_phys_addr_w<%d>: %08x %d\n", DeviceId, data, m_dma_running[DeviceId]);
+ m_dma_descriptor_requested_addr[DeviceId] = data;
+}
+
+template
+uint32_t jaleco_vj_king_qtaro_device::dma_running_r(offs_t offset)
+{
+ return m_dma_running[DeviceId];
+}
+
+template
+void jaleco_vj_king_qtaro_device::dma_running_w(offs_t offset, uint32_t data)
+{
+ LOGMASKED(LOG_DMA, "dma_running_w<%d>: %08x\n", DeviceId, data);
+
+ if (data == 0)
+ m_dma_running[DeviceId] = false;
+}
+
+TIMER_CALLBACK_MEMBER(jaleco_vj_king_qtaro_device::video_dma_callback)
+{
+ for (int device_id = 0; device_id < 3; device_id++) {
+ if (!m_dma_running[device_id] || BIT(m_dma_descriptor_addr[device_id], 0)) {
+ m_dma_running[device_id] = false;
+ continue;
+ }
+
+ const uint32_t dmaLength = m_dma_space->read_dword(m_dma_descriptor_addr[device_id] + 4);
+ const uint32_t bufferPhysAddr = m_dma_space->read_dword(m_dma_descriptor_addr[device_id] + 8);
+ const uint32_t burstLength = std::min(dmaLength - m_dma_descriptor_length[device_id], DMA_BURST_SIZE);
+
+ if (burstLength == 0)
+ continue;
+
+ LOGMASKED(LOG_VERBOSE_DMA, "DMA %d copy %08x + %04x = %08x: %08x bytes\n", device_id, bufferPhysAddr, m_dma_descriptor_length[device_id], bufferPhysAddr + m_dma_descriptor_length[device_id], burstLength);
+
+ uint8_t buf[DMA_BURST_SIZE];
+ for (int i = 0; i < burstLength; i++) {
+ buf[i] = m_dma_space->read_byte(bufferPhysAddr + m_dma_descriptor_length[device_id]);
+ m_dma_descriptor_length[device_id]++;
+ }
+
+ m_qtaro[device_id]->write(buf, burstLength);
+
+ if (m_dma_running[device_id] && m_dma_descriptor_length[device_id] >= dmaLength) {
+ const uint32_t nextDescriptorPhysAddr = m_dma_space->read_dword(m_dma_descriptor_addr[device_id]);
+ const uint32_t flags = m_dma_space->read_dword(m_dma_descriptor_addr[device_id] + 12); // Bit 24 is set to denote the last entry at the same time as bit 0 of the next descriptor addr is set
+
+ LOGMASKED(LOG_DMA, "DMA %d: %08x -> %08x %08x (%d %d)\n", device_id, m_dma_descriptor_addr[device_id], nextDescriptorPhysAddr, m_dma_descriptor_length[device_id], BIT(nextDescriptorPhysAddr, 0), BIT(flags, 24));
+
+ m_dma_descriptor_addr[device_id] = nextDescriptorPhysAddr;
+ m_dma_descriptor_length[device_id] = 0;
+ m_dma_running[device_id] = BIT(m_dma_descriptor_addr[device_id], 0) == 0 && BIT(flags, 24) == 0;
+ }
+ }
+}
+
+void jaleco_vj_king_qtaro_device::map(address_map &map)
+{
+ map(0x10, 0x10).r(m_qtaro[0], FUNC(jaleco_vj_qtaro_device::reg2_r));
+ map(0x18, 0x1b).rw(m_qtaro[0], FUNC(jaleco_vj_qtaro_device::reg3_r), FUNC(jaleco_vj_qtaro_device::reg3_w));
+ map(0x20, 0x20).r(m_qtaro[1], FUNC(jaleco_vj_qtaro_device::reg2_r));
+ map(0x28, 0x2b).rw(m_qtaro[1], FUNC(jaleco_vj_qtaro_device::reg3_r), FUNC(jaleco_vj_qtaro_device::reg3_w));
+ map(0x30, 0x30).r(m_qtaro[2], FUNC(jaleco_vj_qtaro_device::reg2_r));
+ map(0x38, 0x3b).rw(m_qtaro[2], FUNC(jaleco_vj_qtaro_device::reg3_r), FUNC(jaleco_vj_qtaro_device::reg3_w));
+
+ map(0x50, 0x53).w(FUNC(jaleco_vj_king_qtaro_device::dma_requested_w<0>));
+ map(0x54, 0x57).w(FUNC(jaleco_vj_king_qtaro_device::dma_descriptor_phys_addr_w<0>));
+ map(0x58, 0x5b).rw(FUNC(jaleco_vj_king_qtaro_device::dma_running_r<0>), FUNC(jaleco_vj_king_qtaro_device::dma_running_w<0>));
+ map(0x60, 0x63).w(FUNC(jaleco_vj_king_qtaro_device::dma_requested_w<1>));
+ map(0x64, 0x67).w(FUNC(jaleco_vj_king_qtaro_device::dma_descriptor_phys_addr_w<1>));
+ map(0x68, 0x6b).rw(FUNC(jaleco_vj_king_qtaro_device::dma_running_r<1>), FUNC(jaleco_vj_king_qtaro_device::dma_running_w<1>));
+ map(0x70, 0x73).w(FUNC(jaleco_vj_king_qtaro_device::dma_requested_w<2>));
+ map(0x74, 0x77).w(FUNC(jaleco_vj_king_qtaro_device::dma_descriptor_phys_addr_w<2>));
+ map(0x78, 0x7b).rw(FUNC(jaleco_vj_king_qtaro_device::dma_running_r<2>), FUNC(jaleco_vj_king_qtaro_device::dma_running_w<2>));
+
+ map(0x80, 0x83).rw(FUNC(jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_status_r), FUNC(jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_status_w));
+ map(0x84, 0x87).rw(FUNC(jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_r), FUNC(jaleco_vj_king_qtaro_device::qtaro_fpga_firmware_w));
+ map(0x88, 0x8b).rw(FUNC(jaleco_vj_king_qtaro_device::fpga_firmware_status_r), FUNC(jaleco_vj_king_qtaro_device::fpga_firmware_status_w));
+ map(0x8c, 0x8f).rw(FUNC(jaleco_vj_king_qtaro_device::fpga_firmware_r), FUNC(jaleco_vj_king_qtaro_device::fpga_firmware_w));
+
+ map(0x90, 0x94).rw(FUNC(jaleco_vj_king_qtaro_device::event_io_r), FUNC(jaleco_vj_king_qtaro_device::event_io_w));
+ map(0x98, 0x9c).rw(FUNC(jaleco_vj_king_qtaro_device::event_unk_r), FUNC(jaleco_vj_king_qtaro_device::event_unk_w));
+ map(0xa0, 0xa4).rw(FUNC(jaleco_vj_king_qtaro_device::event_io_mask_r), FUNC(jaleco_vj_king_qtaro_device::event_io_mask_w));
+ map(0xa8, 0xab).rw(FUNC(jaleco_vj_king_qtaro_device::event_mask_r), FUNC(jaleco_vj_king_qtaro_device::event_mask_w));
+ map(0xac, 0xaf).rw(FUNC(jaleco_vj_king_qtaro_device::event_r), FUNC(jaleco_vj_king_qtaro_device::event_w));
+
+ map(0xb1, 0xb1).rw(m_qtaro[0], FUNC(jaleco_vj_qtaro_device::reg_r), FUNC(jaleco_vj_qtaro_device::reg_w));
+ map(0xb2, 0xb2).rw(m_qtaro[1], FUNC(jaleco_vj_qtaro_device::reg_r), FUNC(jaleco_vj_qtaro_device::reg_w));
+ map(0xb3, 0xb3).rw(m_qtaro[2], FUNC(jaleco_vj_qtaro_device::reg_r), FUNC(jaleco_vj_qtaro_device::reg_w));
+ map(0xb4, 0xb7).rw(FUNC(jaleco_vj_king_qtaro_device::int_r), FUNC(jaleco_vj_king_qtaro_device::int_w));
+ map(0xb8, 0xbb).rw(FUNC(jaleco_vj_king_qtaro_device::int_fpga_r), FUNC(jaleco_vj_king_qtaro_device::int_fpga_w));
+}
+
+jaleco_vj_king_qtaro_device::jaleco_vj_king_qtaro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ jaleco_vj_king_qtaro_device(mconfig, JALECO_VJ_KING_QTARO, tag, owner, clock)
+{
+}
+
+jaleco_vj_king_qtaro_device::jaleco_vj_king_qtaro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ pci_device(mconfig, type, tag, owner, clock),
+ m_dma_space(*this, finder_base::DUMMY_TAG, -1, 32),
+ m_qtaro(*this, "qtaro%u", 1)
+{
+}
+
+void jaleco_vj_king_qtaro_device::device_start()
+{
+ pci_device::device_start();
+ set_ids(0x11ca0007, 0x01, 0x068000, 0x00000000);
+
+ intr_pin = 1; // TODO: Verify with real hardware
+ intr_line = 10; // TODO: No idea what this should be on real hardware, but a valid IRQ is required to work
+
+ add_map(256, M_MEM, FUNC(jaleco_vj_king_qtaro_device::map));
+
+ m_dma_timer = timer_alloc(FUNC(jaleco_vj_king_qtaro_device::video_dma_callback), this);
+ m_dma_timer->adjust(DMA_TIMER_PERIOD, 0, DMA_TIMER_PERIOD);
+
+ save_item(NAME(m_int));
+ save_item(NAME(m_int_fpga));
+ save_item(NAME(m_event));
+ save_item(NAME(m_event_mask));
+ save_item(NAME(m_event_io));
+ save_item(NAME(m_event_io_mask));
+ save_item(NAME(m_event_unk));
+ save_item(NAME(m_event_unk_mask));
+ save_item(NAME(m_dma_running));
+ save_item(NAME(m_dma_descriptor_requested_addr));
+ save_item(NAME(m_dma_descriptor_addr));
+ save_item(NAME(m_dma_descriptor_length));
+}
+
+void jaleco_vj_king_qtaro_device::device_reset()
+{
+ m_int = 0;
+ m_int_fpga = 0;
+
+ m_event = m_event_mask = 0;
+ std::fill(std::begin(m_event_io), std::end(m_event_io), 0);
+ std::fill(std::begin(m_event_io_mask), std::end(m_event_io_mask), 0);
+ std::fill(std::begin(m_event_unk), std::end(m_event_unk), 0);
+ std::fill(std::begin(m_event_unk_mask), std::end(m_event_unk_mask), 0);
+
+ std::fill(std::begin(m_dma_running), std::end(m_dma_running), false);
+ std::fill(std::begin(m_dma_descriptor_requested_addr), std::end(m_dma_descriptor_requested_addr), 0);
+ std::fill(std::begin(m_dma_descriptor_addr), std::end(m_dma_descriptor_addr), 0);
+ std::fill(std::begin(m_dma_descriptor_length), std::end(m_dma_descriptor_length), 0);
+}
+
+void jaleco_vj_king_qtaro_device::device_add_mconfig(machine_config &config)
+{
+ JALECO_VJ_QTARO(config, m_qtaro[0], 0);
+ JALECO_VJ_QTARO(config, m_qtaro[1], 0);
+ JALECO_VJ_QTARO(config, m_qtaro[2], 0);
+}
diff --git a/src/mame/jaleco/jaleco_vj_qtaro.h b/src/mame/jaleco/jaleco_vj_qtaro.h
new file mode 100644
index 00000000000..55e50b24c2a
--- /dev/null
+++ b/src/mame/jaleco/jaleco_vj_qtaro.h
@@ -0,0 +1,133 @@
+// license:BSD-3-Clause
+// copyright-holders:windyfairy
+
+#ifndef MAME_JALECO_JALECO_VJ_QTARO_H
+#define MAME_JALECO_JALECO_VJ_QTARO_H
+
+#pragma once
+
+#include "machine/pci.h"
+
+
+class jaleco_vj_qtaro_device : public device_t
+{
+public:
+ jaleco_vj_qtaro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ static constexpr feature_type imperfect_features() {
+ return feature::TIMING; // DMA timings aren't perfectly synced between all displays so one video stream may end up out of sync
+ }
+
+ void video_mix_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+
+ uint8_t reg_r(offs_t offset);
+ void reg_w(offs_t offset, uint8_t data);
+
+ uint8_t reg2_r(offs_t offset);
+
+ uint32_t reg3_r(offs_t offset);
+ void reg3_w(offs_t offset, uint32_t data);
+
+ void write(uint8_t *data, uint32_t len);
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ uint8_t m_int;
+ uint32_t m_mix_level;
+};
+
+
+/////////////////////////////////////////////
+
+class jaleco_vj_king_qtaro_device : public pci_device
+{
+public:
+ jaleco_vj_king_qtaro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // FIXME: this is a workaround for the PCI framework’s lack of bus mastering DMA support
+ template void set_bus_master_space(T &&... args) { m_dma_space.set_tag(std::forward(args)...); }
+
+ template void video_mix_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { m_qtaro[DeviceId]->video_mix_w(offset, data, mem_mask); }
+
+ void video_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
+
+protected:
+ jaleco_vj_king_qtaro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+private:
+ void map(address_map &map);
+
+ uint32_t qtaro_fpga_firmware_status_r(offs_t offset);
+ void qtaro_fpga_firmware_status_w(offs_t offset, uint32_t data);
+
+ uint32_t qtaro_fpga_firmware_r(offs_t offset);
+ void qtaro_fpga_firmware_w(offs_t offset, uint32_t data);
+
+ uint32_t fpga_firmware_status_r(offs_t offset);
+ void fpga_firmware_status_w(offs_t offset, uint32_t data);
+
+ uint32_t fpga_firmware_r(offs_t offset);
+ void fpga_firmware_w(offs_t offset, uint32_t data);
+
+ uint8_t event_io_mask_r(offs_t offset);
+ void event_io_mask_w(offs_t offset, uint8_t data);
+
+ uint8_t event_unk_r(offs_t offset);
+ void event_unk_w(offs_t offset, uint8_t data);
+
+ uint8_t event_io_r(offs_t offset);
+ void event_io_w(offs_t offset, uint8_t data);
+
+ uint32_t event_r(offs_t offset);
+ void event_w(offs_t offset, uint32_t data);
+
+ uint32_t event_mask_r(offs_t offset);
+ void event_mask_w(offs_t offset, uint32_t data);
+
+ uint32_t int_r(offs_t offset);
+ void int_w(offs_t offset, uint32_t data);
+
+ uint32_t int_fpga_r(offs_t offset);
+ void int_fpga_w(offs_t offset, uint32_t data);
+
+ template void dma_requested_w(offs_t offset, uint32_t data);
+
+ template void dma_descriptor_phys_addr_w(offs_t offset, uint32_t data);
+
+ template uint32_t dma_running_r(offs_t offset);
+ template void dma_running_w(offs_t offset, uint32_t data);
+
+ TIMER_CALLBACK_MEMBER(video_dma_callback);
+
+ required_address_space m_dma_space;
+ required_device_array m_qtaro;
+
+ emu_timer* m_dma_timer;
+
+ uint32_t m_int;
+ uint32_t m_int_fpga;
+
+ uint32_t m_event, m_event_mask;
+ uint8_t m_event_io[5], m_event_io_mask[5];
+ uint8_t m_event_unk[5], m_event_unk_mask[5];
+
+ bool m_dma_running[3];
+ uint32_t m_dma_descriptor_requested_addr[3];
+ uint32_t m_dma_descriptor_addr[3];
+ uint32_t m_dma_descriptor_length[3];
+};
+
+
+/////////////////////////////////////////////
+
+DECLARE_DEVICE_TYPE(JALECO_VJ_QTARO, jaleco_vj_qtaro_device)
+DECLARE_DEVICE_TYPE(JALECO_VJ_KING_QTARO, jaleco_vj_king_qtaro_device)
+
+#endif // MAME_JALECO_JALECO_VJ_QTARO_H
diff --git a/src/mame/jaleco/megasys1.cpp b/src/mame/jaleco/megasys1.cpp
index 738ae2ac0d8..7dc5356cae1 100644
--- a/src/mame/jaleco/megasys1.cpp
+++ b/src/mame/jaleco/megasys1.cpp
@@ -2410,9 +2410,6 @@ ROM_START( astyanax ) // EPROM version
ROM_LOAD16_BYTE( "astyan5.bin", 0x000000, 0x010000, CRC(11c74045) SHA1(00310a08a1c9a08050004e39b111b940142f8dea) )
ROM_LOAD16_BYTE( "astyan6.bin", 0x000001, 0x010000, CRC(eecd4b16) SHA1(2078e900b53347aad008a8ce7191f4e5541d4df0) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x80000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "astyan11.bin", 0x000000, 0x020000, CRC(5593fec9) SHA1(8fa5bfa8921c6f03ddf485276207978e345887d5) )
ROM_LOAD( "astyan12.bin", 0x020000, 0x020000, CRC(e8b313ec) SHA1(ee690e284ab05db858aad4f0a0b24681c14f93c8) )
@@ -2457,9 +2454,6 @@ ROM_START( astyanaxa ) // mask ROM version, same content as the EPROM version, h
ROM_LOAD16_BYTE( "astyan5.bin", 0x000000, 0x010000, CRC(11c74045) SHA1(00310a08a1c9a08050004e39b111b940142f8dea) )
ROM_LOAD16_BYTE( "astyan6.bin", 0x000001, 0x010000, CRC(eecd4b16) SHA1(2078e900b53347aad008a8ce7191f4e5541d4df0) )
- // ROM_REGION( 0x1000, "mcu", 0 ) // M50747 MCU Code
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x80000, "scroll0", 0 )
ROM_LOAD( "14.bin", 0x00000, 0x80000, CRC(37388363) SHA1(13526b60cf1a1189c8783a4f802dcb63deacbed0) )
@@ -2495,9 +2489,6 @@ ROM_START( lordofk )
ROM_LOAD16_BYTE( "astyan5.bin", 0x000000, 0x010000, CRC(11c74045) SHA1(00310a08a1c9a08050004e39b111b940142f8dea) )
ROM_LOAD16_BYTE( "astyan6.bin", 0x000001, 0x010000, CRC(eecd4b16) SHA1(2078e900b53347aad008a8ce7191f4e5541d4df0) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x80000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "astyan11.bin", 0x000000, 0x020000, CRC(5593fec9) SHA1(8fa5bfa8921c6f03ddf485276207978e345887d5) )
ROM_LOAD( "astyan12.bin", 0x020000, 0x020000, CRC(e8b313ec) SHA1(ee690e284ab05db858aad4f0a0b24681c14f93c8) )
@@ -3333,9 +3324,6 @@ ROM_START( hachoo )
ROM_LOAD16_BYTE( "hacho05.rom", 0x000000, 0x010000, CRC(6271f74f) SHA1(2fe0f8adf3cdafe13a9107c36f24f1a525d06a05) )
ROM_LOAD16_BYTE( "hacho06.rom", 0x000001, 0x010000, CRC(db9e743c) SHA1(77a3691b48eed389bfcdead5f307415dce47247e) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "hacho14.rom", 0x000000, 0x080000, CRC(10188483) SHA1(43bf08ac777c42351b04e2c35b1a119f524b4388) )
@@ -3370,7 +3358,8 @@ ROM_START( hachooa )
ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */
// This set had 2nd half of the ROMs blank (bad dumps, wrong device type used)
// It has been repaired to boot using 2nd half of other set but still fails service mode (START1+START2 on startup) ROM check
- // so is marked as bad dump. It's clearly a different revision though.
+ // so is marked as bad dump. It's very close to the hachooj set otherwise, so likely the only issue is the checksum stored
+ // in the 2nd half of the ROMs
ROM_LOAD16_BYTE( "rom-2", 0x000000, 0x020000, BAD_DUMP CRC(3ea2f1cd) SHA1(5196a7c6b51c54f9b39e76fb1c5e081e1927ff59) )
ROM_LOAD16_BYTE( "rom-1", 0x000001, 0x020000, BAD_DUMP CRC(3cdffa03) SHA1(9fa6dd64ebff7170875ab1cd012f59698b7ecbc8) )
@@ -3378,8 +3367,45 @@ ROM_START( hachooa )
ROM_LOAD16_BYTE( "hacho05.rom", 0x000000, 0x010000, CRC(6271f74f) SHA1(2fe0f8adf3cdafe13a9107c36f24f1a525d06a05) )
ROM_LOAD16_BYTE( "hacho06.rom", 0x000001, 0x010000, CRC(db9e743c) SHA1(77a3691b48eed389bfcdead5f307415dce47247e) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
+ ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
+ ROM_LOAD( "hacho14.rom", 0x000000, 0x080000, CRC(10188483) SHA1(43bf08ac777c42351b04e2c35b1a119f524b4388) )
+
+ ROM_REGION( 0x080000, "scroll1", 0 ) /* Scroll 1 */
+ ROM_LOAD( "hacho15.rom", 0x000000, 0x020000, CRC(e559347e) SHA1(1d71c83f4946af80083bbd059e55c2d57f2f9647) )
+ ROM_LOAD( "hacho16.rom", 0x020000, 0x020000, CRC(105fd8b5) SHA1(41aafcf6e29417a39ca0945f47a90646da2cbf3c) )
+ ROM_LOAD( "hacho17.rom", 0x040000, 0x020000, CRC(77f46174) SHA1(81d923069191c153773aaeb2d0eab6ab0076a386) )
+ ROM_LOAD( "hacho18.rom", 0x060000, 0x020000, CRC(0be21111) SHA1(45beb7e9f6cfe56893e0c5b052a1922e3d73275b) )
+
+ ROM_REGION( 0x020000, "scroll2", 0 ) /* Scroll 2 */
+ ROM_LOAD( "hacho19.rom", 0x000000, 0x020000, CRC(33bc9de3) SHA1(8bbfda0fea742177e00dd5fff226f85233537cb3) )
+
+ ROM_REGION( 0x080000, "sprites", 0 ) /* Sprites */
+ ROM_LOAD( "hacho20.rom", 0x000000, 0x020000, CRC(2ae2011e) SHA1(f294ebfd87816c7b179fcaba3869e3402b2560a9) )
+ ROM_LOAD( "hacho21.rom", 0x020000, 0x020000, CRC(6dcfb8d5) SHA1(a478fea81acf1f317fe82ec84d4d21227db7432b) )
+ ROM_LOAD( "hacho22.rom", 0x040000, 0x020000, CRC(ccabf0e0) SHA1(3b9d95d8dee6155b484d85cc3f12e20a8ae3c9be) )
+ ROM_LOAD( "hacho23.rom", 0x060000, 0x020000, CRC(ff5f77aa) SHA1(e9fc71ac3499ee5b4636a3bdf1f3fbbe2623b0db) )
+
+ ROM_REGION( 0x040000, "oki1", 0 ) /* Samples */
+ ROM_LOAD( "hacho09.rom", 0x000000, 0x020000, CRC(e9f35c90) SHA1(1a1dd6a7777bbad1475ad65f8797818c9b4f0937) )
+ ROM_LOAD( "hacho10.rom", 0x020000, 0x020000, CRC(1aeaa188) SHA1(40827435c948a2fd448137eb3f8c33fc84da3b82) )
+
+ ROM_REGION( 0x040000, "oki2", 0 ) /* Samples */
+ ROM_LOAD( "hacho07.rom", 0x000000, 0x020000, CRC(06e6ca7f) SHA1(a15a1b754b0d47285a023ecfc4b762ab592f8262) )
+ ROM_LOAD( "hacho08.rom", 0x020000, 0x020000, CRC(888a6df1) SHA1(71d70633ecf7255287e55e92f8d2f186fe58f4b4) )
+
+ ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */
+ ROM_LOAD( "ht.14m", 0x0000, 0x0200, CRC(85302b15) SHA1(8184c1184a71706cdb981e3c4f90a08521413e72) )
+ROM_END
+
+ROM_START( hachooj )
+ // very similar to the hachooa set, but with code to display the scrolling text during the intro
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */
+ ROM_LOAD16_BYTE( "02", 0x000000, 0x020000, CRC(df5fe8f8) SHA1(52e8562c93feb8195ba5659e8e2a8db557e81856) )
+ ROM_LOAD16_BYTE( "01", 0x000001, 0x020000, CRC(adc13eb9) SHA1(6f16f587426cf6a011638772916615a16ff0d0b8) )
+
+ ROM_REGION( 0x20000, "audiocpu", 0 ) /* Sound CPU Code */
+ ROM_LOAD16_BYTE( "hacho05.rom", 0x000000, 0x010000, CRC(6271f74f) SHA1(2fe0f8adf3cdafe13a9107c36f24f1a525d06a05) )
+ ROM_LOAD16_BYTE( "hacho06.rom", 0x000001, 0x010000, CRC(db9e743c) SHA1(77a3691b48eed389bfcdead5f307415dce47247e) )
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "hacho14.rom", 0x000000, 0x080000, CRC(10188483) SHA1(43bf08ac777c42351b04e2c35b1a119f524b4388) )
@@ -3411,6 +3437,7 @@ ROM_START( hachooa )
ROM_LOAD( "ht.14m", 0x0000, 0x0200, CRC(85302b15) SHA1(8184c1184a71706cdb981e3c4f90a08521413e72) )
ROM_END
+
/***************************************************************************
Hayaoshi Quiz Ouza Ketteisen
@@ -3514,9 +3541,6 @@ ROM_START( kazan )
ROM_LOAD16_BYTE( "iga_05.bin", 0x000000, 0x010000, CRC(13580868) SHA1(bfcd11b294b64af81a0403a3e9370c42a9859b6b) )
ROM_LOAD16_BYTE( "iga_06.bin", 0x000001, 0x010000, CRC(7904d5dd) SHA1(4cd9fdab601a90c997a041a9f7966a9a233e897b) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "kazan.11", 0x000000, 0x020000, CRC(08e54137) SHA1(1e3298a896ae0de64f0fc2dab6b32c8bf875f50b) )
ROM_LOAD( "kazan.12", 0x020000, 0x020000, CRC(e89d58bd) SHA1(a4f2530fb544af48f66b3402c5162639745ab11d) )
@@ -3560,9 +3584,6 @@ ROM_START( iganinju )
ROM_LOAD16_BYTE( "iga_05.bin", 0x000000, 0x010000, CRC(13580868) SHA1(bfcd11b294b64af81a0403a3e9370c42a9859b6b) )
ROM_LOAD16_BYTE( "iga_06.bin", 0x000001, 0x010000, CRC(7904d5dd) SHA1(4cd9fdab601a90c997a041a9f7966a9a233e897b) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "iga_14.bin", 0x000000, 0x040000, CRC(c707d513) SHA1(b0067a444385809a7dfd11fea27b1add318d5225) )
@@ -3647,9 +3668,6 @@ ROM_START( inyourfa )
ROM_LOAD16_BYTE( "05.27c512", 0x000000, 0x010000, CRC(1737ed64) SHA1(20be59c43d7975fcc5048f1ee9ed5af893bdef85) )
ROM_LOAD16_BYTE( "06.27c512", 0x000001, 0x010000, CRC(9f12bcb9) SHA1(7c5faf6a295b2124e16823f50e57b234b6127a38) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "11.27c1001", 0x000000, 0x020000, CRC(451a1428) SHA1(c017ef4dd3dffd26a93f5b926d80fd5e7bd7dea1) )
ROM_LOAD( "12.27c1001", 0x020000, 0x020000, CRC(9ead7432) SHA1(0690b640ebe9d1461f44040a33236705a303dc7e) )
@@ -3716,9 +3734,6 @@ ROM_START( jitsupro )
ROM_LOAD16_BYTE( "jp_5.bin", 0x000000, 0x010000, CRC(84454e9e) SHA1(a506d44349a670e57d9dba3ec6a9de2597ba2cdb) ) // 11xxxxxxxxxxxxxx = 0xFF
ROM_LOAD16_BYTE( "jp_6.bin", 0x000001, 0x010000, CRC(1fa9b75b) SHA1(d0e3640333f737658542ed4a8758d62f6d64ae05) ) // 11xxxxxxxxxxxxxx = 0xFF
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "jp_14.bin", 0x000000, 0x080000, CRC(db112abf) SHA1(fd8c510934241b7923660acca6122ca3e63bf934) )
@@ -4361,9 +4376,6 @@ ROM_START( plusalph )
ROM_LOAD16_BYTE( "pa-rom5.bin", 0x000000, 0x010000, CRC(ddc2739b) SHA1(dee31660428baea44c73dec238ed7f39a6771fe6) )
ROM_LOAD16_BYTE( "pa-rom6.bin", 0x000001, 0x010000, CRC(f6f8a167) SHA1(60d5c9db18d8f6704b68ccde5d026174679cec36) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "pa-rom11.bin", 0x000000, 0x020000, CRC(eb709ae7) SHA1(434c9da3c79a97ddd9be77908ce65e9efe6c8106) )
ROM_LOAD( "pa-rom12.bin", 0x020000, 0x020000, CRC(cacbc350) SHA1(328094a5d067775871f7d69b4c20c40e46b0eaba) )
@@ -4699,9 +4711,6 @@ ROM_START( stdragon )
ROM_LOAD16_BYTE( "jsd-05.bin", 0x000000, 0x010000, CRC(8c04feaa) SHA1(57e86fd88dc72d123a41f0dee80a16be38ac2e81) )
ROM_LOAD16_BYTE( "jsd-06.bin", 0x000001, 0x010000, CRC(0bb62f3a) SHA1(68d9f161ba2568f8e046b1a40127bbb973d7a884) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "jsd-11.bin", 0x000000, 0x020000, CRC(2783b7b1) SHA1(4edde596cf26afb33b247cf5b1420d86f8f0c104) )
ROM_LOAD( "jsd-12.bin", 0x020000, 0x020000, CRC(89466ab7) SHA1(8de42f2828e48e4fe3c6d078f6b9d48498933d72) )
@@ -4767,9 +4776,6 @@ ROM_START( stdragona )
ROM_LOAD16_BYTE( "jsd-05.bin", 0x000000, 0x010000, CRC(8c04feaa) SHA1(57e86fd88dc72d123a41f0dee80a16be38ac2e81) )
ROM_LOAD16_BYTE( "jsd-06.bin", 0x000001, 0x010000, CRC(0bb62f3a) SHA1(68d9f161ba2568f8e046b1a40127bbb973d7a884) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 - scrambled */
ROM_LOAD( "e71-14.bin", 0x000000, 0x080000, CRC(8e26ff92) SHA1(06985056027facb1d3df08cf04277492c1be6102) )
@@ -4963,9 +4969,6 @@ ROM_START( tshingena )
ROM_LOAD16_BYTE( "takeda5.bin", 0x000000, 0x010000, CRC(fbdc51c0) SHA1(bc6036c556275f7eccd7741d23437a98b0aa13bb) )
ROM_LOAD16_BYTE( "takeda6.bin", 0x000001, 0x010000, CRC(8fa65b69) SHA1(23a2d60435f235366f877ac79ac1506a99cfae9c) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "takeda11.bin", 0x000000, 0x020000, CRC(bf0b40a6) SHA1(3634b8700b6cfb71d3796847eab50fd2714d4726) )
ROM_LOAD( "takeda12.bin", 0x020000, 0x020000, CRC(07987d89) SHA1(54f0fcbac6ec9c27b70a04a192db2874d38e91d8) )
@@ -5006,9 +5009,6 @@ ROM_START( tshingen )
ROM_LOAD16_BYTE( "takeda5.bin", 0x000000, 0x010000, CRC(fbdc51c0) SHA1(bc6036c556275f7eccd7741d23437a98b0aa13bb) )
ROM_LOAD16_BYTE( "takeda6.bin", 0x000001, 0x010000, CRC(8fa65b69) SHA1(23a2d60435f235366f877ac79ac1506a99cfae9c) )
- // ROM_REGION( 0x1000, "mcu", 0 ) /* M50747 MCU Code */
- // ROM_LOAD( "m50747", 0x0000, 0x1000, NO_DUMP ) // appears to be a UPD65006 gate array, not an MCU
-
ROM_REGION( 0x080000, "scroll0", 0 ) /* Scroll 0 */
ROM_LOAD( "takeda11.bin", 0x000000, 0x020000, CRC(bf0b40a6) SHA1(3634b8700b6cfb71d3796847eab50fd2714d4726) )
ROM_LOAD( "shing_12.rom", 0x020000, 0x020000, CRC(5e4adedb) SHA1(0b67af2913e1f15d0a9d81e7b22d26a1011fa160) )
@@ -5242,8 +5242,9 @@ GAME( 1989, astyanaxa, astyanax, system_A_gs88000, astyanax, megasys1_t
GAME( 1989, lordofk, astyanax, system_A_gs88000, astyanax, megasys1_typea_state, empty_init, ROT0, "Jaleco", "The Lord of King (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, lordofkb, astyanax, system_A, astyanax, megasys1_typea_state, empty_init, ROT0, "bootleg","The Lord of King (bootleg, not protected)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, lordofkbp, astyanax, system_A, astyanax, megasys1_typea_state, init_lordofkbp, ROT0, "bootleg","The Lord of King (bootleg, protected)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, hachoo, 0, system_A_gs88000, hachoo, megasys1_typea_hachoo_state, empty_init, ROT0, "Jaleco", "Hachoo! (set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, hachooa, hachoo, system_A_gs88000, hachoo, megasys1_typea_hachoo_state, empty_init, ROT0, "Jaleco", "Hachoo! (set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, hachoo, 0, system_A_gs88000, hachoo, megasys1_typea_hachoo_state, empty_init, ROT0, "Jaleco", "Hachoo! (World, set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, hachooa, hachoo, system_A_gs88000, hachoo, megasys1_typea_hachoo_state, empty_init, ROT0, "Jaleco", "Hachoo! (World, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, hachooj, hachoo, system_A_gs88000, hachoo, megasys1_typea_hachoo_state, empty_init, ROT0, "Jaleco", "Hachoo! (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, jitsupro, 0, system_A_gs88000, jitsupro, megasys1_typea_state, init_jitsupro_gfx, ROT0, "Jaleco", "Jitsuryoku!! Pro Yakyuu (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, plusalph, 0, system_A_gs88000, plusalph, megasys1_typea_state, empty_init, ROT270, "Jaleco", "Plus Alpha", MACHINE_SUPPORTS_SAVE )
GAME( 1989, stdragon, 0, system_A_d65006, stdragon, megasys1_typea_state, empty_init, ROT0, "Jaleco", "Saint Dragon (set 1)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/jaleco/tetrisp2.cpp b/src/mame/jaleco/tetrisp2.cpp
index ed5d1f86ce9..a95dd7c18de 100644
--- a/src/mame/jaleco/tetrisp2.cpp
+++ b/src/mame/jaleco/tetrisp2.cpp
@@ -939,11 +939,10 @@ void stepstag_state::stepstag_sub_map(address_map &map)
map(0x400000, 0x43ffff).ram().w(FUNC(stepstag_state::stepstag_palette_mid_w)).share("paletteram2");
map(0x500000, 0x53ffff).ram().w(FUNC(stepstag_state::stepstag_palette_right_w)).share("paletteram3");
- // rgb brightness?
- map(0x700000, 0x700001).nopw(); // 0-f
- map(0x700002, 0x700003).nopw(); // 0-f
- map(0x700004, 0x700005).nopw(); // 0-f
- map(0x700006, 0x700007).nopw(); // 0-3f (high bits?)
+ map(0x700000, 0x700001).w(m_jaleco_vj_pc, FUNC(jaleco_vj_pc_device::video_mix_w<0>));
+ map(0x700002, 0x700003).w(m_jaleco_vj_pc, FUNC(jaleco_vj_pc_device::video_mix_w<1>));
+ map(0x700004, 0x700005).w(m_jaleco_vj_pc, FUNC(jaleco_vj_pc_device::video_mix_w<2>));
+ map(0x700006, 0x700007).w(m_jaleco_vj_pc, FUNC(jaleco_vj_pc_device::video_control_w));
// left screen sprites
map(0x800000, 0x8007ff).ram().share("spriteram1"); // Object RAM
diff --git a/src/mame/konami/ksys573.cpp b/src/mame/konami/ksys573.cpp
index bf9656c557b..06321e9557b 100644
--- a/src/mame/konami/ksys573.cpp
+++ b/src/mame/konami/ksys573.cpp
@@ -5476,6 +5476,7 @@ ROM_START( gtfrk11m )
DISK_REGION( "install" )
DISK_IMAGE_READONLY( "d39jba02", 0, SHA1(a10225d1dd6cfd22382970099927aeba5e0c03e7) ) // e-Amusement song data installer for HDD, requires NPU
+ // Supports both JA/JB and AA/AB regions, the only difference seems to be the warning screen and some online network-related details
DISK_REGION( "runtime" )
DISK_IMAGE_READONLY( "d39jaa02", 0, BAD_DUMP SHA1(7a87ee331ba0301bb8724c398e6c77cfb9c172a7) )
ROM_END
@@ -5810,6 +5811,23 @@ ROM_START( mrtlbeat )
DISK_IMAGE_READONLY( "b47jxb02", 0, SHA1(6bbe8d6169ef692bd8995da564bd5a97b6bf0b31) )
ROM_END
+ROM_START( mrtlbeata )
+ // Small differences compared to the standard mrtlbeat JBA version:
+ // - Lacks the "original program" mode
+ // - Select menu screen layout is different due to lack of "original program" mode
+ // - Ending screen lacks one line of text
+ SYS573_BIOS_A
+
+ ROM_REGION( 0x000008c, "cassette:game:eeprom", 0 )
+ ROM_LOAD( "geb47ja.u1", 0x000000, 0x00008c, BAD_DUMP CRC(be474ec0) SHA1(328d352847cdddcf04a6179e45f2f273bee713dd) ) // hand crafted
+
+ ROM_REGION( 0x000008, "cassette:game:id", 0 )
+ ROM_LOAD( "geb47jb.u6", 0x000000, 0x000008, BAD_DUMP CRC(ce84419e) SHA1(839e8ee080ecfc79021a06417d930e8b32dfc6a1) )
+
+ DISK_REGION( "runtime" )
+ DISK_IMAGE_READONLY( "b47jxb02", 0, SHA1(6bbe8d6169ef692bd8995da564bd5a97b6bf0b31) )
+ROM_END
+
ROM_START( powyakex )
SYS573_BIOS_A
@@ -6452,6 +6470,7 @@ GAME( 2001, gtrfrk7m, sys573, gtrfrk7m, gtrfrks, ksys573_state, empty_ini
GAME( 2001, ddrmax, sys573, ddr5m, ddr, ddr_state, empty_init, ROT0, "Konami", "DDRMAX - Dance Dance Revolution 6th Mix (G*B19 VER. JAA)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* BOOT VER 1.9 */
GAME( 2002, ddrmax2, sys573, ddr5m, ddr, ddr_state, empty_init, ROT0, "Konami", "DDRMAX2 - Dance Dance Revolution 7th Mix (G*B20 VER. JAA)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* BOOT VER 1.95 */
GAME( 2002, mrtlbeat, sys573, ddr5m, ddr, ddr_state, empty_init, ROT0, "Konami", "Martial Beat (G*B47 VER. JBA)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* BOOT VER 1.9 */
+GAME( 2002, mrtlbeata, mrtlbeat, ddr5m, ddr, ddr_state, empty_init, ROT0, "Konami", "Martial Beat (G*B47 VER. JAB)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* BOOT VER 1.9 */
GAME( 2002, gbbchmp, sys573, gbbchmp, hyperbbc, ksys573_state, init_serlamp, ROT0, "Konami", "Great Bishi Bashi Champ (GBA48 VER. JAB)", MACHINE_IMPERFECT_SOUND )
GAME( 2002, pcnfrk7m, sys573, drmn4m, drmn, ksys573_state, empty_init, ROT0, "Konami", "Percussion Freaks 7th Mix (G*C07 VER. AAA)", MACHINE_IMPERFECT_SOUND ) /* BOOT VER 1.95 */
GAME( 2002, drmn7m, pcnfrk7m, drmn4m, drmn, ksys573_state, empty_init, ROT0, "Konami", "DrumMania 7th Mix power-up ver. (G*C07 VER. JBA)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) /* BOOT VER 1.95 */
diff --git a/src/mame/layout/cxg_commander.lay b/src/mame/layout/cxg_commander.lay
index ecba3cd6dc3..7319ecf89e7 100644
--- a/src/mame/layout/cxg_commander.lay
+++ b/src/mame/layout/cxg_commander.lay
@@ -325,8 +325,8 @@ authors:hap
-
-
+
+
@@ -337,8 +337,8 @@ authors:hap
-
-
+
+
diff --git a/src/mame/layout/cxg_dominator.lay b/src/mame/layout/cxg_dominator.lay
index 6e2c60c3964..e4c4bdc97f0 100644
--- a/src/mame/layout/cxg_dominator.lay
+++ b/src/mame/layout/cxg_dominator.lay
@@ -377,8 +377,8 @@ authors:hap
-
-
+
+
@@ -389,8 +389,8 @@ authors:hap
-
-
+
+
diff --git a/src/mame/layout/cxg_galaxy.lay b/src/mame/layout/cxg_galaxy.lay
index c6a1299885c..03de0d773cb 100644
--- a/src/mame/layout/cxg_galaxy.lay
+++ b/src/mame/layout/cxg_galaxy.lay
@@ -365,8 +365,8 @@ authors:hap
-
-
+
+
@@ -377,8 +377,8 @@ authors:hap
-
-
+
+
diff --git a/src/mame/layout/mephisto_berlin.lay b/src/mame/layout/mephisto_berlin.lay
index 1686c794e32..4a59bb0cc54 100644
--- a/src/mame/layout/mephisto_berlin.lay
+++ b/src/mame/layout/mephisto_berlin.lay
@@ -360,7 +360,7 @@ authors:Sandro Ronco, hap
-
+
diff --git a/src/mame/layout/mephisto_montreux.lay b/src/mame/layout/mephisto_montreux.lay
index aecfe21f3b3..5ac66e0ee78 100644
--- a/src/mame/layout/mephisto_montreux.lay
+++ b/src/mame/layout/mephisto_montreux.lay
@@ -64,6 +64,36 @@ authors:Sandro Ronco, hap
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
@@ -102,8 +132,7 @@ authors:Sandro Ronco, hap
-
-
+
@@ -474,11 +503,7 @@ authors:Sandro Ronco, hap
-
-
-
-
-
+
diff --git a/src/mame/layout/mephisto_polgar.lay b/src/mame/layout/mephisto_polgar.lay
index bf735d1a71f..ea6315157e6 100644
--- a/src/mame/layout/mephisto_polgar.lay
+++ b/src/mame/layout/mephisto_polgar.lay
@@ -68,18 +68,18 @@ authors:Sandro Ronco, hap
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/mame/layout/mephisto_risc.lay b/src/mame/layout/mephisto_risc.lay
index 4564602252f..df249db3e67 100644
--- a/src/mame/layout/mephisto_risc.lay
+++ b/src/mame/layout/mephisto_risc.lay
@@ -68,18 +68,18 @@ authors:Sandro Ronco, hap
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 88dd8c30a5e..0878dc9949b 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -36,6 +36,7 @@ ar260 // 1990 Acorn R260
aa5000 // 1991 Acorn A5000
aa4 // 1992 Acorn A4
aa3010 // 1992 Acorn A3010
+aa3010_de // 1993 Acorn A3010 (German)
aa3020 // 1992 Acorn A3020
aa4000 // 1992 Acorn A4000
aa5000a // 1993 Acorn A5000 Alpha
@@ -19262,6 +19263,7 @@ h19 // Heath H19 (Zenith Z-19)
@source:heathkit/h89.cpp
h89 // Heath H89 (WH89, Zenith Z-89, Z-90)
h88 // Heath H88 (with cassette tape)
+h89_sigmasoft // H89 with the SigmaSoft IGC card
@source:hec2hrp/hec2hrp.cpp
hec2hr //
@@ -20043,6 +20045,7 @@ kungfu // (c) 1992 IGS
aliencha // (c) 1994
alienchac // (c) 1994
lordgun // (c) 1994
+lordgunu // (c) 1994
@source:igs/pgm.cpp
ddp2 // (c) 2001 DoDonPachi 2 - Bee Storm
@@ -21511,6 +21514,7 @@ edfu // (c) 1991 (North America)
edfp // (c) 1991 (Japan, Prototype)
hachoo // (c) 1989
hachooa // (c) 1989
+hachooj // (c) 1989
hayaosi1 // (c) 1993
iganinju // (c) 1988 (Japan)
iganinjub // bootleg
@@ -24093,6 +24097,7 @@ konam80u // 1998 - Konami 80's AC Special (GC826 VER. UAA
mamboagg // 2001 - Mambo A Go-Go (GQA40 VER. JAB)
mamboagga // 2001 - Mambo A Go-Go (GQA40 VER. JRB, Rental)
mrtlbeat // 2002 - Martial Beat (Martial Beat (G*B47 VER. JBA)
+mrtlbeata // 2002 - Martial Beat (Martial Beat (G*B47 VER. JAB)
pcnfrk // 1999 - Percussion Freaks (GQ881 VER. EAB)
pcnfrka // 1999 - Percussion Freaks (GQ881 VER. AAB)
pcnfrkk // 1999 - Percussion Freaks (GQ881 VER. KAB)
@@ -26844,10 +26849,12 @@ unkmerit // (c) 1989 Merit
@source:merit/merit3xx.cpp
ma6710 // (c) 1989 Merit
+ma6710a // (c) 199? Merit
ma7551p // (c) 199? Merit
ma7551t // (c) 199? Merit
ma7556 // (c) 199? Merit
ma7558 // (c) 199? Merit
+ma8350 // (c) 199? Merit
@source:merit/meritm.cpp
americna // (c) 1987 Merit
@@ -32072,6 +32079,9 @@ nevada //
beezerk //
vlcunk //
+@source:misc/vocalizer.cpp
+vocalizer
+
@source:misc/voyager.cpp
voyager // (c) 2002 Team Play, Inc.
voyagers // (c) 2002 Team Play, Inc.
@@ -41936,6 +41946,10 @@ pv9234 //
@source:skeleton/pwp14.cpp
pwp14 // Smith Corona PWP System 14
+@source:skeleton/qmsirius.cpp
+qmrave //
+qmsirius //
+
@source:skeleton/qtsbc.cpp
qtsbc //
@@ -43993,6 +44007,7 @@ shadowwa // 6215 - (c) 1988 Tecmo (World)
stratof // (c) 1991 Tecmo
tknight // (c) 1989 Tecmo
wildfang // (c) 1989 Tecmo
+wildfangh // (c) 1991? Tecmo?
wildfangs // (c) 1989 Tecmo
@source:tecmo/lvcards.cpp
@@ -46034,6 +46049,9 @@ dx100 //
@source:yamaha/ymmu5.cpp
mu5 // 1994 MU-5
+@source:yamaha/ymmu10.cpp
+mu10
+
@source:yamaha/ymmu15.cpp
mu15
@@ -46051,6 +46069,9 @@ mu100 // 1997 MU-100
mu100r // 1997 MU-100 Rackable version
mu100b // 1998 MU-100B
+@source:yamaha/ymmu128.cpp
+mu128
+
@source:yamaha/ympcs30.cpp
pcs30 // 1984
diff --git a/src/mame/merit/merit3xx.cpp b/src/mame/merit/merit3xx.cpp
index 144847f9b41..d165b95e74d 100644
--- a/src/mame/merit/merit3xx.cpp
+++ b/src/mame/merit/merit3xx.cpp
@@ -8,10 +8,12 @@ The CRT-300 is an extension of CRT-250/CRT-260 boards found in meritm.cpp.
- Hanging at UART device check (PC=5e44)
- Never initializes RAMDAC;
- Never initializes CRTC on 350 games;
+- Map secondary NVRAM module
+- Map / connect up Dallas DS1216 RTC
===================================================================================================
-Merit - Multi-Action 6710-13 Touchscreen game
+Merit - Multi-Action 6710-13
MERIT CRT-300 REV A:
+------------------------------------------------------------+
@@ -49,12 +51,14 @@ Sound: AY8930
MB3731 18-Watt BTL Power Amplifier
RAM: 6264 8K High Speed CMOS Static RAM x 2
OSC: 10.00MHz x 2, 1.85MHz
- DSW: 8 switch dipswitch block labeled S1
+ DSW: 8 switch DIP switch block labeled S1
Other: PC16550DN UART with FIFO clocked @ 1.84MHz
D8255AC Programmable Peripheral Interface chip x 2
DS1225Y-200 Dallas 8Kx8 NVRAM @ U6
DS1231 Power Monitor Chip
+Note: U46 through U47 are for graphics ROMs which matched to the specific game/set
+
* U5 is a 28pin female socket, U20 is 28pin male socket
** U7 is a stacked DS1216 Dallas 2Kx8 SmartWatch RTC + BENCHMARQ bq4010YMA-150 8Kx8 NVRAM
@@ -64,7 +68,7 @@ Other: PC16550DN UART with FIFO clocked @ 1.84MHz
# Denotes unpopulated
-ROMs on CRT-300 mainboard:
+Graphics ROMs (on main board):
U-46
DC-350
@@ -84,7 +88,7 @@ CRT-307 rev A
| U2 74LS00N |
+----------------+
-Other: 8 switch dipswitch block labeled SW1
+Other: 8 switch DIP switch block labeled SW1
28pinM 28pin male socket to plug into U5
28pinF 28pin female socket to receive U20
@@ -98,14 +102,14 @@ U-2
DC-350
Ticket
-Snooping around the U1 & U2 roms with a hex editor shows the game uses a Printer & Modem.
+Snooping around the U1 & U2 ROMs with a hex editor shows the game uses a Printer & Modem.
Game can be played in English or French
-Games look to be basic Poker games, Blackjack & Super 8 Slots
+Games are: Joker Poker, Aces or Better, Jacks or Better, Super Eight & Blackjack
Copyright is 1989
----------------------------------------------------------------------------------------------
+******************************************************************************
-The CRT-350 is an extension of CRT-300 that allows for memory (ROM) expansion.
+The CRT-350 is an extension/revision of CRT-300
MERIT CRT-350 REV C (and REV B):
+------------------------------------------------------------+
@@ -144,11 +148,13 @@ Sound: Yamaha YM2149F or AY-3-8910A
MB3731 18-Watt BTL Power Amplifier (rev B PCB only)
RAM: 6264 8K High Speed CMOS Static RAM x 2
OSC: 10.00MHz x 2, 1.85MHz
- DSW: 8 switch dipswitch block labeled S1
+ DSW: 8 switch DIP switch block labeled S1
Other: PC16550DN UART with FIFO clocked @ 1.84MHz
D8255AC Programmable Peripheral Interface chip x 2
DS1231 Power Monitor Chip
+Note: U46 through U47 are for graphics ROMs which matched to the specific game/set
+
Connectors:
J1 80-pin connector to CRT-351 backplane & wire harness
J2 80-pin connector to CRT-351 backplane & wire harness
@@ -184,7 +190,7 @@ Other: DS1225Y-200 Dallas 8Kx8 NVRAM
DS1230Y-200 Dallas 32Kx8 NVRAM
DS1216 Dallas 2Kx8 SmartWatch RTC
PC16550DN UART with FIFO clocked @ 1.84MHz
- 8 switch dipswitch block labeled SW1 (enable/disable games)
+ 8 switch DIP switch block labeled SW1 (enable/disable games)
Connectors:
J1 96-pin female receiver to connect to CRT-350 main board (64 pins used, middle row pins not connected)
@@ -211,11 +217,54 @@ JPR3 is a 3 pin jumper: Pins 1&2 = Printer, pins 2&3= Hopper
******************************************************************************
+Merit - Multi-Action 6710-21
+
+MERIT CRT-350 REV C + CRT-307 rev A daughter board
+
+Graphics ROMs (on main board):
+
+MLTP
+U46
+
+MLTP
+U47
+
+MLTP
+U48
+
+Other: Dallas DS1235YW 32Kx8 NVRAM @ U6
+ Dallas DS1225Y 8Kx8 NVRAM stacked on a DS1216 Dallas 2Kx8 SmartWatch RTC @ U7
+ NOTE: These are mounted to the mainboard, no room on the CRT-307 rev A board
+
+CRT-307 rev A
++----------------+
+| 28pinM 28pinF |
+| U1 74LS541N |
+| SW1 |
+| U2 74LS00N |
++----------------+
+
+ROMs on CRT-307 daughter board
+
+6710-21
+U1
+5c
+
+6710-21
+U2
+5c
+
+Snooping around the U1 & U2 ROMs with a hex editor shows the game uses a Printer & Modem.
+Game can be played in English or French
+Games are: Joker Poker, Aces or Better, Jacks or Better, Super Eight & Blackjack
+
+******************************************************************************
+
7551-20-R3T
MERIT CRT-350 REV C + MEMORY EXPANSION BOARD CRT-352 rev A
-Main PCB graphics roms (on main board):
+Graphics ROMs (on main board):
U46
DMA6
@@ -265,8 +314,8 @@ According to U14:
CSW1-3 ON =5# KENO
CSW1-4 ON =ADDEM
-Dipswitch on CRT-350 main is labeled S1
-Dipswitch on CRT-352 MEM is labeled SW1
+DIP switch on CRT-350 main is labeled S1
+DIP switch on CRT-352 MEM is labeled SW1
******************************************************************************
@@ -274,7 +323,7 @@ Merit MULTI-ACTION 7551-21-R2P
MERIT CRT-350 REV C + MEMORY EXPANSION BOARD CRT-352 rev A
-Main PCB graphics roms (on main board):
+Graphics ROMs (on main board):
U46
NC $
@@ -317,8 +366,8 @@ According to U14:
CSW1-3 ON =5# KENO
CSW1-4 ON =ADDEM
-Dipswitch on CRT-350 main is labeled S1
-Dipswitch on CRT-352 MEM is labeled SW1
+DIP switch on CRT-350 main is labeled S1
+DIP switch on CRT-352 MEM is labeled SW1
******************************************************************************
@@ -326,7 +375,7 @@ Merit MULTI-ACTION 7556-00-R2
MERIT CRT-350 REV C + MEMORY EXPANSION BOARD CRT-352 rev A
-Main PCB graphics roms (on main board):
+Graphics ROMs (on main board):
U46
MLT8
@@ -378,8 +427,8 @@ According to U14:
CSW1-3 ON =5# KENO
CSW1-4 ON =TREASURE
-Dipswitch on CRT-350 main is labeled S1
-Dipswitch on CRT-352 MEM is labeled SW1
+DIP switch on CRT-350 main is labeled S1
+DIP switch on CRT-352 MEM is labeled SW1
NOTE: on this PCB pin28 on the DS1225Y was bent up so data was not correctly saved from PCB
on this PCB pin28 on the DS1130Y was broken so data was not correctly saved from PCB
@@ -390,7 +439,7 @@ Merit MULTI-ACTION 7558-01-R0 DS
MERIT CRT-350 REV B + MEMORY EXPANSION BOARD CRT-352 rev A
-Main PCB graphics roms (on main board):
+Graphics ROMs (on main board):
Multi-Action
7556-WV
@@ -440,8 +489,57 @@ According to U12:
CSW1-3 ON =D DOG (Dogs + Diamonds)
CSW1-4 ON =TR7 (Treasure Sevens)
-Dipswitch on CRT-350 main is labeled S1
-Dipswitch on CRT-352 MEM is labeled SW1
+DIP switch on CRT-350 main is labeled S1
+DIP switch on CRT-352 MEM is labeled SW1
+
+******************************************************************************
+
+Merit MULTI-ACTION 8350-00-00 R1
+
+MERIT CRT-350 REV B + MEMORY EXPANSION BOARD CRT-352 rev A
+
+Graphics ROMs (on main board):
+
+MTP4
+U46
+
+MTP4
+U47
+
+MTP4
+U48
+
+
+Program ROMs on Expansion board:
+
+U11 *Empty U15 *Empty
+
+
+
+U10 *Empty U14
+ 8350-00-00
+ U14-R1
+
+U9 *Empty U13
+ 8350-00-00
+ U13-R1
+
+U8 *Empty U12
+ 8350-00-00
+ U12-R1
+
+
+According to U14:
+ INVALID DIPSW
+ ENABLE AT LEAST ONE GAME
+ CS1-1 ON =5/10/25 OFF=25
+ CS1-2 ON =JOKER POKER
+ CS1-3 ON =SUPER STAR
+ CS1-4 ON =JACKS OR BETTER
+ CS1-5 ON =DEUCES WILD
+
+DIP switch on CRT-350 main is labeled S1
+DIP switch on CRT-352 MEM is labeled SW1
*/
@@ -556,8 +654,8 @@ void merit3xx_state::main_map(address_map &map)
map(0x8000, 0x9fff).ram().share("nvram");
// definitely accesses RAM here, would drop to "RAM error" with unmap high
map(0xa000, 0xbfff).ram();
- map(0xc000, 0xdfff).ram().share("charram");
- map(0xe000, 0xffff).ram().share("attrram");
+ map(0xc000, 0xdfff).ram().share("attrram");
+ map(0xe000, 0xffff).ram().share("charram");
}
void merit3xx_state::io_map(address_map &map)
@@ -770,22 +868,39 @@ void merit3xx_state::merit350(machine_config &config)
-ROM_START( ma6710 )
+ROM_START( ma6710 ) // CRT-300 mainboard + CRT-307 rev A expansion board
ROM_REGION(0x20000, "maincpu", 0)
- ROM_LOAD( "u-1_dc-350_ticket.u1", 0x00000, 0x10000, CRC(33aa53ce) SHA1(828d6f4828d5d90777c573a6870d800ae6a51425) )
- ROM_LOAD( "u-2_dc-350_ticket.u2", 0x10000, 0x10000, CRC(fcac2391) SHA1(df9a1834441569fef876594aaef7d364831dbae6) )
+ ROM_LOAD( "u-1_dc-350_ticket.u1", 0x00000, 0x10000, CRC(33aa53ce) SHA1(828d6f4828d5d90777c573a6870d800ae6a51425) ) // labeled for CRT-350?
+ ROM_LOAD( "u-2_dc-350_ticket.u2", 0x10000, 0x10000, CRC(fcac2391) SHA1(df9a1834441569fef876594aaef7d364831dbae6) ) // 6710-13 TPT56 042596
ROM_REGION( 0x30000, "gfx1", 0 )
- ROM_LOAD( "u-46_dc-350.u46", 0x00000, 0x10000, CRC(3765a026) SHA1(cdb47d4b3775bec4b3ab16636d795ad737344166) )
+ ROM_LOAD( "u-46_dc-350.u46", 0x00000, 0x10000, CRC(3765a026) SHA1(cdb47d4b3775bec4b3ab16636d795ad737344166) ) // labeled for CRT-350?
ROM_LOAD( "u-47_dc-350.u47", 0x10000, 0x10000, CRC(bbcf8280) SHA1(83c6fd84bdd09dd82506d81be1cbae797fd59347) )
ROM_LOAD( "u-48_dc-350.u48", 0x20000, 0x10000, CRC(b93a0481) SHA1(df60d81fb68bd868ce94f8b313896d6d31e54ad4) )
ROM_REGION( 0x2000, "nvram", 0 )
ROM_LOAD( "ds1225y.u6", 0x0000, 0x2000, CRC(78fd0284) SHA1(37aa7deaafc6faad7505cd56a442913b35f54166) )
- // DS1216?
- ROM_REGION( 0x2000, "unk", 0 )
- ROM_LOAD( "bq4010.u5", 0x0000, 0x2000, CRC(003ea272) SHA1(3f464a0189af49470b33825a00905df6b156913f) )
+ ROM_REGION( 0x2000, "nvram2", 0 )
+ ROM_LOAD( "bq4010.u5", 0x0000, 0x2000, CRC(003ea272) SHA1(3f464a0189af49470b33825a00905df6b156913f) ) // DS1225Y compatible
+ROM_END
+
+
+ROM_START( ma6710a ) // CRT-350 mainboard + CRT-307 rev A expansion board
+ ROM_REGION(0x20000, "maincpu", 0)
+ ROM_LOAD( "6710-21_u1_5c.u1", 0x00000, 0x10000, CRC(cc8d40ca) SHA1(3988c82ed820fd2a8b9e6432e8231efbc0274721) ) // different jurisdiction than the 6710-13 set
+ ROM_LOAD( "6710-21_u1_5c.u2", 0x10000, 0x10000, CRC(47f08ef0) SHA1(f572df3807a83e11a1d361f7cb809818898b98b4) ) // 6710-21 TPT56 011299
+
+ ROM_REGION( 0x30000, "gfx1", 0 )
+ ROM_LOAD( "mltp_u46.u46", 0x00000, 0x10000, CRC(77d89071) SHA1(bf5207aaca2831cbc45734f8cd4ef2468cfd7191) )
+ ROM_LOAD( "mltp_u46.u47", 0x10000, 0x10000, CRC(efdfad6a) SHA1(2f6d2a601f60351d3b5ff735a96bde1e11f2bb74) )
+ ROM_LOAD( "mltp_u46.u48", 0x20000, 0x10000, CRC(daeb9a0e) SHA1(d209ae3f802a5ceeb92e41ed71415629892bce91) )
+
+ ROM_REGION( 0x2000, "nvram", 0 )
+ ROM_LOAD( "ds1225y.u7", 0x0000, 0x2000, CRC(b2977ed0) SHA1(63cddd7af4bdd6734b67dbb38effe1057515fa37) )
+
+ ROM_REGION( 0x8000, "nvram2", 0 )
+ ROM_LOAD( "ds1235yw.u16", 0x0000, 0x8000, CRC(52df2aa0) SHA1(ccfc99693010beedcc354d54d0fda9940469dfd4) )
ROM_END
@@ -798,7 +913,7 @@ ROM_START( ma7551t ) // all ROMs reads matched printed checksum
ROM_LOAD( "u15_7551-20-r3t_0ff2.u15", 0x20000, 0x08000, CRC(39203dd0) SHA1(885424a7c0bdb85891188ca575c0c3ca3ecca04a) )
ROM_LOAD( "u14_7551-20-r3t_a786.u14", 0x28000, 0x08000, CRC(63baf2a5) SHA1(402f8bac78cdbe6d6df90db3e77bd9e97615ae21) )
ROM_LOAD( "u13_7551-20-r3t_5443.u13", 0x30000, 0x08000, CRC(88f89dd9) SHA1(0ce29f56f5a3643a2fb204ce2b919bea6f5dd3b5) )
- ROM_LOAD( "u12_7551-20-r3t_4f74.u12", 0x38000, 0x08000, CRC(9b818bb4) SHA1(5f1228f500618d5de93c82dbc9c710651bdb22f6) )
+ ROM_LOAD( "u12_7551-20-r3t_4f74.u12", 0x38000, 0x08000, CRC(9b818bb4) SHA1(5f1228f500618d5de93c82dbc9c710651bdb22f6) ) // 7551-20 R3T 041200
ROM_REGION( 0x30000, "gfx1", 0 )
ROM_LOAD( "u46_dma6_9c9a.u46", 0x00000, 0x10000, CRC(138d1cc7) SHA1(2043fcc580269966031d86dc445e03bddf83a412) )
@@ -822,7 +937,7 @@ ROM_START( ma7551p )
ROM_LOAD( "u15_7551-21-r2p.u15", 0x20000, 0x08000, CRC(31283190) SHA1(153601d5df7fbbc116f876399ce194797175be2f) )
ROM_LOAD( "u14_7551-21-r2p.u14", 0x28000, 0x08000, CRC(fe993b57) SHA1(4c872b3dff278298558493f6fd9a64be63613956) )
ROM_LOAD( "u13_7551-21-r2p.u13", 0x30000, 0x08000, CRC(9194d993) SHA1(52d094f55c329a7f0b4bf1dd02a7784e9a9faa12) )
- ROM_LOAD( "u12_7551-21-r2p.u12", 0x38000, 0x08000, CRC(8ca19c9c) SHA1(a694a9be8b6d2beea8ee171dcfb2fa64eb6af14c) )
+ ROM_LOAD( "u12_7551-21-r2p.u12", 0x38000, 0x08000, CRC(8ca19c9c) SHA1(a694a9be8b6d2beea8ee171dcfb2fa64eb6af14c) ) // 7551-21 R2P 122700
ROM_REGION( 0x30000, "gfx1", 0 )
ROM_LOAD( "u46_nc+.u46", 0x00000, 0x10000, CRC(5140ca67) SHA1(0f5f7062cd874529630fd6f58e640c11f0692786) )
@@ -846,7 +961,7 @@ ROM_START( ma7556 ) // all ROMs reads matched printed checksum
ROM_LOAD( "u15_7556-01-r0_add3.u15", 0x20000, 0x08000, CRC(83e5f4cd) SHA1(15b999169b28fb267ec8a265c915c1d366e57655) )
ROM_LOAD( "u14_7556-01-r0_dff2.u14", 0x28000, 0x08000, CRC(9e5518c1) SHA1(37ed33118d87f0699845f84c820569666ac8c533) )
ROM_LOAD( "u13_7556-01-r0_7c21.u13", 0x30000, 0x08000, CRC(5288eecc) SHA1(efd569beb22b8a9354520e7755bd797724593a0a) )
- ROM_LOAD( "u12_7556-00-r2.u12", 0x38000, 0x08000, CRC(34357c5d) SHA1(f71db3cd5ced70a709ecb8de1328c12666abc047) ) // rev 2, other program ROMs are rev 0
+ ROM_LOAD( "u12_7556-00-r2.u12", 0x38000, 0x08000, CRC(34357c5d) SHA1(f71db3cd5ced70a709ecb8de1328c12666abc047) ) // 7556-00 R0 102098 - rev 2, other program ROMs are rev 0
ROM_REGION( 0x30000, "gfx1", 0 )
ROM_LOAD( "multi-action_7556-wv_u46.u46", 0x00000, 0x10000, CRC(32c11634) SHA1(26f3c5c220b45e8eedad940ff94dc5ef6f89e3fa) ) // also known to be labeled: U46 MLT8 cs:8bbe
@@ -870,7 +985,7 @@ ROM_START( ma7558 ) // all ROMs reads matched printed checksum
ROM_LOAD( "u15_7558-01-r0_ds_cfba.u15", 0x20000, 0x08000, CRC(fb698a84) SHA1(57d8ff484691b0227034815bac0c4d99bae7d067) )
ROM_LOAD( "u14_7558-01-r0_ds_a309.u14", 0x28000, 0x08000, CRC(25431b2b) SHA1(9ecd04b00d6531f41913f67fef848f2d1e6d7766) )
ROM_LOAD( "u13_7558-01-r0_ds_a833.u13", 0x30000, 0x08000, CRC(55accddc) SHA1(33c845b3b730126a1e3e26483a05e2e186925199) )
- ROM_LOAD( "u12_7558-01-r0_ds_11ff.u12", 0x38000, 0x08000, CRC(9172a8a0) SHA1(b0ef6f8a706f48de9896929647ef30e3555c797b) )
+ ROM_LOAD( "u12_7558-01-r0_ds_11ff.u12", 0x38000, 0x08000, CRC(9172a8a0) SHA1(b0ef6f8a706f48de9896929647ef30e3555c797b) ) // 7558-01 R0 DS 022502
ROM_REGION( 0x30000, "gfx1", 0 )
ROM_LOAD( "multi-action_7556-wv_u46.u46", 0x00000, 0x10000, CRC(32c11634) SHA1(26f3c5c220b45e8eedad940ff94dc5ef6f89e3fa) ) // also known to be labeled: U46 MLT8 cs:8bbe
@@ -884,13 +999,39 @@ ROM_START( ma7558 ) // all ROMs reads matched printed checksum
ROM_LOAD( "dallas_ds1230y-200.u17", 0x0000, 0x8000, CRC(9d196d52) SHA1(21fd5acd7652ba10ae6b4ae520abcc7c34eb37d1) )
ROM_END
+
+ROM_START( ma8350 ) // photo of in game play show title as Montana Superstar with top glass reading Superstar 4000 Jackpot
+ ROM_REGION(0x40000, "maincpu", 0)
+ // u8 not populated
+ // u9 not populated
+ // u10 not populated
+ // u11 not populated
+ // u15 not populated
+ ROM_LOAD( "8350-00-00_u14-r1.u14", 0x28000, 0x08000, CRC(fc18a2da) SHA1(30f60749210205c3d94d5475ffc47dfec77ab0ed) )
+ ROM_LOAD( "8350-00-00_u13-r1.u13", 0x30000, 0x08000, CRC(24b67787) SHA1(24b574f9adc670938520bb59754bcee5748c3e12) )
+ ROM_LOAD( "8350-00-00_u12-r1.u12", 0x38000, 0x08000, CRC(3d5d1357) SHA1(f5a03c41588c06bdd25a8f4f80f659f37e6fc1a0) ) // 8350-00 R1 072894
+
+ ROM_REGION( 0x30000, "gfx1", 0 )
+ ROM_LOAD( "mtp4_u46.u46", 0x00000, 0x10000, CRC(ec3f1128) SHA1(2782000cbb23727c4b94da7180cf34cdc129572a) )
+ ROM_LOAD( "mtp4_u47.u47", 0x10000, 0x10000, CRC(4d39aef7) SHA1(d087481fb7c7721454cee179da127ee33f020a6d) )
+ ROM_LOAD( "mtp4_u48.u48", 0x20000, 0x10000, CRC(8cf3ef36) SHA1(cd4b7da6e2bfe732433a03bb03bc4c3e1b174e59) )
+
+ ROM_REGION( 0x2000, "nvram", 0 )
+ ROM_LOAD( "dallas_ds1225y-200.u7", 0x0000, 0x2000, CRC(6013195c) SHA1(046cdccc51aa4993383507148459c6676c5bdfbc) )
+
+ ROM_REGION( 0x8000, "nvram2", 0 )
+ ROM_LOAD( "dallas_ds1230y-200.u17", 0x0000, 0x8000, CRC(ea57e0ed) SHA1(d32d5969aa76b474defb610e8f033cf9455f92ec) )
+ROM_END
+
} // anonymous namespace
// CRT-300 games
-GAME( 1989, ma6710, 0, merit300, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 6710-13", MACHINE_IS_SKELETON )
+GAME( 1989, ma6710, 0, merit300, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 6710-13", MACHINE_IS_SKELETON ) // build date is 04/25/96?
// CRT-350 games
-GAME( 199?, ma7551t, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7551-20-R3T", MACHINE_IS_SKELETON )
-GAME( 199?, ma7551p, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7551-21-R2P", MACHINE_IS_SKELETON )
-GAME( 199?, ma7556, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7556-00-R2", MACHINE_IS_SKELETON )
-GAME( 199?, ma7558, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7558-01-R0", MACHINE_IS_SKELETON )
+GAME( 198?, ma6710a, 0, merit300, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 6710-21", MACHINE_IS_SKELETON ) // build date is 01/12/99? - should be clone of ma6710??
+GAME( 199?, ma7551t, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7551-20-R3T", MACHINE_IS_SKELETON ) // build date is 04/12/00?
+GAME( 199?, ma7551p, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7551-21-R2P", MACHINE_IS_SKELETON ) // build date is 12/27/00? - should be clone of ma7551t??
+GAME( 199?, ma7556, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7556-00-R2", MACHINE_IS_SKELETON ) // build date is 10/20/98?
+GAME( 199?, ma7558, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 7558-01-R0", MACHINE_IS_SKELETON ) // build date is 02/25/02?
+GAME( 199?, ma8350, 0, merit350, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 8350-00-R1", MACHINE_IS_SKELETON ) // build date is 07/28/94?
diff --git a/src/mame/misc/gammagic.cpp b/src/mame/misc/gammagic.cpp
index 7f89d83b1c6..7aa40f62c79 100644
--- a/src/mame/misc/gammagic.cpp
+++ b/src/mame/misc/gammagic.cpp
@@ -7,21 +7,15 @@ Game Magic (c) 1997 Bally Gaming Co.
Preliminary driver by Grull Osgo
TODO:
-- gammagic: throws a CONFIG.SYS error in CD_BALLY.SYS right away,
- checks the disc drive in bp 6b26 subroutine against a 0x0258 value after sending an
- identify packet device command (shutms11 ATAPI returns 0x0208).
- Seems to be a Toshiba XM-3301 CD/DVD drive according to RAM buffer.
+- gammagic: throws a CONFIG.SYS error in CD_BALLY.SYS right away.
+ Checks the disc drive in bp 6b5b subroutine against a 0x0258 status after sending an
+ identify packet device command (ATAPI returns 0x0208) expecting a ready + device fault?
+ Drive should be a Toshiba XM-3301 CD/DVD drive according to RAM buffer.
-- gammagic: requires Voodoo and a ESS Solo-1/Maestro PCI card family to boot;
+- gammagic: can't find D: if above is skipped after detecting ESS and Voodoo cards.
- 99bottles: "not High Sierra or ISO9660", likely bad (disc-at-once with one track?)
-- Identify and hookup proper motherboard BIOS
- Should be a m55hipl with CD-ROM as bootable option, m55-04ns and m55-04s doesn't cope with
- this requirement, dump mentions using El Torito specs at offset 0x8801.
- Notice that CD_BALLY.SYS driver mentions using an Adaptec AHA-154x SCSI, is the CD drive actually
- connected there rather than being BIOS responsibility?
-
- Missing 68k dump portion.
Very unlikely it transfers code from serial, and CD-ROM dump doesn't have any clear file that
would indicate a code transfer or an handshake between main and sub CPUs;
@@ -56,111 +50,179 @@ Additional CD-ROM games: "99 Bottles of Beer"
#include "emu.h"
-#include "pcshare.h"
-
+#include "bus/isa/isa_cards.h"
+#include "bus/pci/pci_slot.h"
+#include "bus/rs232/hlemouse.h"
+#include "bus/rs232/null_modem.h"
+#include "bus/rs232/rs232.h"
+#include "bus/rs232/sun_kbd.h"
+#include "bus/rs232/terminal.h"
#include "cpu/i386/i386.h"
+#include "machine/fdc37c93x.h"
+#include "machine/i82371eb_acpi.h"
+#include "machine/i82371eb_ide.h"
+#include "machine/i82371eb_isa.h"
+#include "machine/i82371eb_usb.h"
+#include "machine/i82371sb.h"
+#include "machine/i82439hx.h"
+#include "machine/i82439tx.h"
+#include "machine/i82443bx_host.h"
#include "machine/pci.h"
-#include "machine/pckeybrd.h"
-#include "video/pc_vga.h"
+#include "machine/pci-ide.h"
+#include "video/voodoo_pci.h"
namespace {
-class gammagic_state : public pcat_base_state
+class gammagic_state : public driver_device
{
public:
gammagic_state(const machine_config &mconfig, device_type type, const char *tag)
- : pcat_base_state(mconfig, type, tag)
- , m_pciroot(*this, "pci")
+ : driver_device(mconfig, type, tag)
{ }
void gammagic(machine_config &config);
private:
- required_device m_pciroot;
-
- virtual void machine_start() override;
void gammagic_io(address_map &map);
void gammagic_map(address_map &map);
+
+ static void smc_superio_config(device_t *device);
};
-// Memory is mostly handled by the chipset
void gammagic_state::gammagic_map(address_map &map)
{
- map(0x00000000, 0x0009ffff).ram();
-// map(0x000a0000, 0x000bffff).rw("vga", FUNC(vga_device::mem_r), FUNC(vga_device::mem_w));
- map(0x000e0000, 0x000fffff).rom().region("isa", 0x20000);/* System BIOS */
- map(0x00100000, 0x07ffffff).ram();
- map(0x08000000, 0xfffdffff).noprw();
- map(0xfffe0000, 0xffffffff).rom().region("isa", 0x20000);/* System BIOS */
+ map.unmap_value_high();
}
void gammagic_state::gammagic_io(address_map &map)
{
- pcat32_io_common(map);
- map(0x00e8, 0x00ef).noprw();
-// map(0x00f0, 0x01ef).noprw();
-// map(0x01f8, 0x03af).noprw();
-// map(0x03b0, 0x03df).m("vga", FUNC(vga_device::io_map));
-// map(0x03e0, 0x03ef).noprw();
-// map(0x0cf8, 0x0cff).rw("pcibus", FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
-// map(0x0400, 0xffff).noprw();
+ map.unmap_value_high();
}
static INPUT_PORTS_START( gammagic )
INPUT_PORTS_END
-void gammagic_state::machine_start()
+static void isa_internal_devices(device_slot_interface &device)
{
+ device.option_add("fdc37c93x", FDC37C93X);
}
-void gammagic_state::gammagic(machine_config &config)
+static void isa_com(device_slot_interface &device)
{
- // TODO: convert to a m55hipl state machine derivative
- PENTIUM(config, m_maincpu, 133000000); // Intel Pentium 133
- m_maincpu->set_addrmap(AS_PROGRAM, &gammagic_state::gammagic_map);
- m_maincpu->set_addrmap(AS_IO, &gammagic_state::gammagic_io);
- m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
+ device.option_add("microsoft_mouse", MSFT_HLE_SERIAL_MOUSE);
+ device.option_add("logitech_mouse", LOGITECH_HLE_SERIAL_MOUSE);
+ device.option_add("wheel_mouse", WHEEL_HLE_SERIAL_MOUSE);
+ device.option_add("msystems_mouse", MSYSTEMS_HLE_SERIAL_MOUSE);
+ device.option_add("rotatable_mouse", ROTATABLE_HLE_SERIAL_MOUSE);
+ device.option_add("terminal", SERIAL_TERMINAL);
+ device.option_add("null_modem", NULL_MODEM);
+ device.option_add("sun_kbd", SUN_KBD_ADAPTOR);
+}
- pcat_common(config);
+void gammagic_state::smc_superio_config(device_t *device)
+{
+ fdc37c93x_device &fdc = *downcast(device);
+ fdc.set_sysopt_pin(1);
+ fdc.gp20_reset().set_inputline(":maincpu", INPUT_LINE_RESET);
+ fdc.gp25_gatea20().set_inputline(":maincpu", INPUT_LINE_A20);
+ fdc.irq1().set(":pci:07.0", FUNC(i82371sb_isa_device::pc_irq1_w));
+ fdc.irq8().set(":pci:07.0", FUNC(i82371sb_isa_device::pc_irq8n_w));
+ fdc.txd1().set(":serport0", FUNC(rs232_port_device::write_txd));
+ fdc.ndtr1().set(":serport0", FUNC(rs232_port_device::write_dtr));
+ fdc.nrts1().set(":serport0", FUNC(rs232_port_device::write_rts));
+ fdc.txd2().set(":serport1", FUNC(rs232_port_device::write_txd));
+ fdc.ndtr2().set(":serport1", FUNC(rs232_port_device::write_dtr));
+ fdc.nrts2().set(":serport1", FUNC(rs232_port_device::write_rts));
+}
+
+void gammagic_state::gammagic(machine_config &config)
+{
+ pentium_device &maincpu(PENTIUM(config, "maincpu", 133000000));
+ maincpu.set_addrmap(AS_PROGRAM, &gammagic_state::gammagic_map);
+ maincpu.set_addrmap(AS_IO, &gammagic_state::gammagic_io);
+ maincpu.set_irq_acknowledge_callback("pci:07.0:pic8259_master", FUNC(pic8259_device::inta_cb));
+ maincpu.smiact().set("pci:00.0", FUNC(i82439hx_host_device::smi_act_w));
PCI_ROOT(config, "pci", 0);
- // ...
+ // TODO: confirm size
+ I82439HX(config, "pci:00.0", 0, "maincpu", 256*1024*1024);
+
+ i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0, "maincpu"));
+ isa.boot_state_hook().set([](u8 data) { /* printf("%02x\n", data); */ });
+ isa.smi().set_inputline("maincpu", INPUT_LINE_SMI);
+
+ i82371sb_ide_device &ide(I82371SB_IDE(config, "pci:07.1", 0, "maincpu"));
+ ide.irq_pri().set("pci:07.0", FUNC(i82371sb_isa_device::pc_irq14_w));
+ ide.irq_sec().set("pci:07.0", FUNC(i82371sb_isa_device::pc_mirq0_w));
+ // FIXME: change to Toshiba CDROM
+ ide.subdevice("ide1")->slot(0).set_default_option("cdrom");
+// ide.subdevice("ide1")->slot(0).set_option_machine_config("cdrom", cdrom_config);
+ ide.subdevice("ide2")->slot(0).set_default_option(nullptr);
+
+ PCI_SLOT(config, "pci:1", pci_cards, 15, 0, 1, 2, 3, nullptr);
+ PCI_SLOT(config, "pci:2", pci_cards, 16, 1, 2, 3, 0, "ess_solo1");
+// PCI_SLOT(config, "pci:3", pci_cards, 17, 2, 3, 0, 1, "voodoo");
+ PCI_SLOT(config, "pci:4", pci_cards, 18, 3, 0, 1, 2, "oti64111");
+
+ // FIXME: this should obviously map to above instead of direct PCI mount ...
+ voodoo_2_pci_device &voodoo(VOODOO_2_PCI(config, "pci:11.0", 0, "maincpu", "voodoo_screen"));
+ voodoo.set_fbmem(2);
+ voodoo.set_tmumem(4, 4);
+ voodoo.set_status_cycles(1000);
+
+ // FIXME: ... and run in VGA passthru mode not define its own screen canvas
+ screen_device &screen(SCREEN(config, "voodoo_screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57);
+ screen.set_size(800, 262);
+ screen.set_visarea(0, 512 - 1, 0, 240 - 1);
+ screen.set_screen_update("pci:11.0", FUNC(voodoo_2_pci_device::screen_update));
+
+ ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", smc_superio_config);
+ ISA16_SLOT(config, "isa1", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa2", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa3", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa4", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false);
+
+ rs232_port_device& serport0(RS232_PORT(config, "serport0", isa_com, nullptr)); // "microsoft_mouse"));
+ serport0.rxd_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::rxd1_w));
+ serport0.dcd_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ndcd1_w));
+ serport0.dsr_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ndsr1_w));
+ serport0.ri_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::nri1_w));
+ serport0.cts_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ncts1_w));
+
+ rs232_port_device &serport1(RS232_PORT(config, "serport1", isa_com, nullptr));
+ serport1.rxd_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::rxd2_w));
+ serport1.dcd_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ndcd2_w));
+ serport1.dsr_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ndsr2_w));
+ serport1.ri_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::nri2_w));
+ serport1.cts_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::ncts2_w));
}
ROM_START( gammagic )
- ROM_REGION32_LE(0x40000, "isa", 0)
- //Original Memory Set
- //ROM_LOAD("m7s04.rom", 0, 0x40000, CRC(3689f5a9) SHA1(8daacdb0dc6783d2161680564ffe83ac2515f7ef))
- // TODO: add this (needs "OAK SVGA" PCI BIOS hooked up)
- //ROM_LOAD("otivga_tx2953526.rom", 0x0000, 0x8000, CRC(916491af) SHA1(d64e3a43a035d70ace7a2d0603fc078f22d237e1))
-
- // TODO: specs mentions a m55hipl compatible BIOS, this is 5HX29
- ROM_LOAD("5hx29.bin", 0x20000, 0x20000, BAD_DUMP CRC(07719a55) SHA1(b63993fd5186cdb4f28c117428a507cd069e1f68))
+ ROM_REGION32_LE(0x40000, "pci:07.0", 0)
+ ROM_LOAD("m7s04.rom", 0, 0x40000, CRC(3689f5a9) SHA1(8daacdb0dc6783d2161680564ffe83ac2515f7ef))
ROM_REGION(0x20000, "v8000", 0)
// 68k code, unknown size/number of roms
ROM_LOAD("v8000.bin", 0x0000, 0x20000, NO_DUMP)
- DISK_REGION( "cdrom" )
+ DISK_REGION( "pci:07.1:ide1:0:cdrom" )
DISK_IMAGE_READONLY( "gammagic", 0, SHA1(947650b13f87eea6608a32a1bae7dca19d911f15) )
ROM_END
ROM_START( 99bottles )
- ROM_REGION32_LE(0x40000, "isa", 0)
- //Original BIOS/VGA-BIOS Rom Set
- //ROM_LOAD("m7s04.rom", 0, 0x40000, CRC(3689f5a9) SHA1(8daacdb0dc6783d2161680564ffe83ac2515f7ef))
- // TODO: add this (needs "OAK SVGA" PCI BIOS hooked up)
- //ROM_LOAD("otivga_tx2953526.rom", 0x0000, 0x8000, CRC(916491af) SHA1(d64e3a43a035d70ace7a2d0603fc078f22d237e1))
+ ROM_REGION32_LE(0x40000, "pci:07.0", 0)
+ ROM_LOAD("m7s04.rom", 0, 0x40000, CRC(3689f5a9) SHA1(8daacdb0dc6783d2161680564ffe83ac2515f7ef))
- // TODO: specs mentions a m55hipl compatible BIOS, this is 5HX29
- ROM_LOAD("5hx29.bin", 0x20000, 0x20000, BAD_DUMP CRC(07719a55) SHA1(b63993fd5186cdb4f28c117428a507cd069e1f68))
+ // TODO: move to OTI card
+ //ROM_LOAD("otivga_tx2953526.rom", 0x0000, 0x8000, CRC(916491af) SHA1(d64e3a43a035d70ace7a2d0603fc078f22d237e1))
ROM_REGION(0x20000, "v8000", 0)
// 68k code, unknown size/number of roms
ROM_LOAD("v8000.bin", 0x0000, 0x20000, NO_DUMP)
- DISK_REGION( "cdrom" )
+ DISK_REGION( "pci:07.1:ide1:0:cdrom" )
DISK_IMAGE_READONLY( "99bottles", 0, BAD_DUMP SHA1(0b874178c8dd3cfc451deb53dc7936dc4ad5a04f))
ROM_END
diff --git a/src/mame/misc/goldnpkr.cpp b/src/mame/misc/goldnpkr.cpp
index acbfb381843..86b7ed72085 100644
--- a/src/mame/misc/goldnpkr.cpp
+++ b/src/mame/misc/goldnpkr.cpp
@@ -1036,6 +1036,7 @@ class goldnpkr_state : public driver_device
void witchcdj(machine_config &config);
void wcrdxtnd(machine_config &config);
void super21p(machine_config &config);
+ void op5cards(machine_config &config);
void caspoker(machine_config &config);
void icp_ext(machine_config &config);
void gldnirq0(machine_config &config);
@@ -1065,6 +1066,8 @@ class goldnpkr_state : public driver_device
void init_pokersis();
void init_lespendu();
void init_lespenduj();
+ void init_op5cards();
+ void init_olym65();
uint8_t pottnpkr_mux_port_r();
void lamps_a_w(uint8_t data);
@@ -1128,6 +1131,7 @@ class goldnpkr_state : public driver_device
void witchcrd_falcon_map(address_map &map);
void witchcrd_map(address_map &map);
void super21p_map(address_map &map);
+ void op5cards_map(address_map &map);
void icp_ext_map(address_map &map);
void lespendu_map(address_map &map);
@@ -1875,6 +1879,19 @@ void goldnpkr_state::lespendu_map(address_map &map)
map(0x6000, 0x7fff).rom();
}
+void goldnpkr_state::op5cards_map(address_map &map)
+{
+ map(0x0000, 0x07ff).ram().share("nvram"); // battery backed RAM
+ map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w));
+ map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w));
+ map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0x1000, 0x13ff).ram().w(FUNC(goldnpkr_state::goldnpkr_videoram_w)).share("videoram");
+ map(0x1800, 0x1bff).ram().w(FUNC(goldnpkr_state::goldnpkr_colorram_w)).share("colorram");
+ map(0x2000, 0x2000).portr("SW2");
+ map(0xc000, 0xffff).rom();
+}
+
/*********************************************
* Input Ports *
@@ -4115,6 +4132,77 @@ static INPUT_PORTS_START( super21p )
INPUT_PORTS_END
+static INPUT_PORTS_START( op5cards )
+ // Multiplexed - 4x5bits
+ PORT_INCLUDE( super21p )
+
+ PORT_MODIFY("IN0-0")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL )
+
+ PORT_MODIFY("IN0-1")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
+
+ PORT_MODIFY("IN0-3")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) PORT_NAME("Note In")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3)
+
+ PORT_MODIFY("SW1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_MODIFY("SW2")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START(lespendu)
// Multiplexed - 4x5bits
PORT_START("IN0-0")
@@ -4266,6 +4354,13 @@ static GFXDECODE_START( gfx_super21p )
GFXDECODE_ENTRY( "gfx4", 0, fixedtilelayout, 0x300, 16 )
GFXDECODE_END
+static GFXDECODE_START( gfx_op5cards )
+ GFXDECODE_ENTRY( "gfx1", 0, fixedtilelayout, 8, 16 )
+ GFXDECODE_ENTRY( "gfx2", 0, fixedtilelayout, 8, 16 )
+ GFXDECODE_ENTRY( "gfx3", 0, fixedtilelayout, 8, 16 )
+ GFXDECODE_ENTRY( "gfx4", 0, fixedtilelayout, 8, 16 )
+GFXDECODE_END
+
static GFXDECODE_START( gfx_caspoker )
GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 128, 16 )
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 128, 16 )
@@ -4590,6 +4685,30 @@ void goldnpkr_state::super21p(machine_config &config)
m_ay8910->port_b_read_callback().set_ioport("SW2");
}
+void goldnpkr_state::op5cards(machine_config &config)
+{
+ goldnpkr_base(config);
+
+ // basic machine hardware
+ m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::op5cards_map);
+
+ m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
+ m_pia[0]->writepb_handler().set(FUNC(goldnpkr_state::ay8910_control_w));
+ m_pia[1]->readpa_handler().set(FUNC(goldnpkr_state::ay8910_data_r));
+ m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::ay8910_data_w));
+
+ // video hardware
+ MCFG_VIDEO_START_OVERRIDE(goldnpkr_state, super21p)
+ m_gfxdecode->set_info(gfx_op5cards);
+
+ // sound hardware
+ SPEAKER(config, "mono").front_center();
+ AY8910(config, m_ay8910, MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); // guess, seems ok
+ m_ay8910->port_a_read_callback().set_ioport("SW1");
+ m_ay8910->port_b_read_callback().set_ioport("SW2");
+}
+
+
void goldnpkr_state::wildcard(machine_config &config)
{
goldnpkr_base(config);
@@ -11874,7 +11993,7 @@ ROM_END
*/
ROM_START( olym65wc )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "wild_card_u34_v2.0__27c128.u34", 0x4000, 0x4000, CRC(24e422a6) SHA1(d8e84af682a773cd913c88c0cf86d501e7d49290) )
+ ROM_LOAD( "wild_card_u34_v2.0__27c128.u34", 0x2000, 0x4000, CRC(24e422a6) SHA1(d8e84af682a773cd913c88c0cf86d501e7d49290) )
ROM_LOAD( "wild_card_u35_v2.0__27c128.u35", 0x8000, 0x4000, CRC(1a155c3c) SHA1(ec89848d7e8c60bcbb63c31b319a146131d7e678) )
ROM_LOAD( "wild_card_u36_v2.0__27c128.u36", 0xc000, 0x4000, CRC(4e4a8bbc) SHA1(05219847b92f54af0b6e098e048265a8dbec7800) )
@@ -11890,12 +12009,12 @@ ROM_START( olym65wc )
ROM_COPY( "gfx1", 0x5800, 0x2800, 0x0800 ) // cards deck gfx, bitplane3. found in the 4th quarter of the char rom
ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // borroweed from Golden Poker, seems to match
+ ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // borrowed from Golden Poker, seems to match
ROM_END
ROM_START( olym65bj )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "black_jack_v5.04_hx1.u34", 0x4000, 0x4000, CRC(b1ce68da) SHA1(4ed10b7d77cd45a3233b55f852147e19313c5d22) )
+ ROM_LOAD( "black_jack_v5.04_hx1.u34", 0x2000, 0x4000, CRC(b1ce68da) SHA1(4ed10b7d77cd45a3233b55f852147e19313c5d22) )
ROM_LOAD( "black_jack_v5.04_hx2.u35", 0x8000, 0x4000, CRC(d6da3199) SHA1(062595ba775b1548d9acdeeb5c44057a220a5aa0) )
ROM_LOAD( "black_jack_v5.04_hx3.u36", 0xc000, 0x4000, CRC(f8b1d506) SHA1(5e4b2c20601526e3e8e76e981e1c37d535a046cb) )
@@ -11914,7 +12033,7 @@ ROM_START( olym65bj )
ROM_LOAD( "black_jack_v5.04__dallas.u40", 0x0000, 0x0800, CRC(64f6b4ed) SHA1(baa3451ac3b275bf4d771bc3dd14a032fe77cd1c) )
ROM_REGION( 0x0100, "proms", 0 )
- ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // borroweed from Golden Poker, seems to match
+ ROM_LOAD( "bprom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) // borrowed from Golden Poker, seems to match
ROM_END
@@ -11944,7 +12063,7 @@ ROM_END
ROM_START( op5cards )
ROM_REGION( 0x10000, "maincpu", 0 )
// ROM_LOAD( "noname.ic4", 0x8000, 0x8000, CRC(af0ea127) SHA1(466de9a3e2ebe81eac30bbd9139edd71738d33d4) ) // mapping the unrelated program, to check...
- ROM_LOAD( "noname.ic4", 0x4000, 0x4000, CRC(af0ea127) SHA1(466de9a3e2ebe81eac30bbd9139edd71738d33d4) )
+ ROM_LOAD( "noname.ic4", 0xc000, 0x4000, CRC(af0ea127) SHA1(466de9a3e2ebe81eac30bbd9139edd71738d33d4) )
ROM_IGNORE( 0x4000) // discarding 2nd half (the unrelated program).
// noname.ic10 [1/2] noname.ic9 [2/2] IDENTICAL
@@ -11958,13 +12077,29 @@ ROM_END
// noname.ic10 [even 2/2] noname.ic9 [even 1/2] IDENTICAL
// noname.ic10 [odd 2/2] noname.ic9 [odd 1/2] IDENTICAL
- ROM_REGION( 0x18000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x10000, 0x0000 ) // filling the R-G bitplanes
+ ROM_REGION( 0x10000, "gfxpool", 0 )
ROM_LOAD( "noname.ic10", 0x0000, 0x8000, CRC(35321abc) SHA1(4abb37a9aab6ddfd94e4275de8ff6ca841923ce8) ) // chars, title and cards GFX,
+ ROM_LOAD( "noname.ic9", 0x8000, 0x8000, CRC(9af786b1) SHA1(7ea5d0119abf221bc0da37783cfbc53a5c0f69d0) ) // same as IC10, but with scrambled quarters...
- ROM_REGION( 0x18000, "gfx2", 0 )
- ROM_FILL( 0x0000, 0x10000, 0x0000 ) // filling the R-G bitplanes
- ROM_LOAD( "noname.ic9", 0x0000, 0x8000, CRC(9af786b1) SHA1(7ea5d0119abf221bc0da37783cfbc53a5c0f69d0) ) // same as IC10, but with scrambled quarters...
+ ROM_REGION( 0x1800, "gfx1", 0 ) // chars
+ ROM_COPY( "gfxpool", 0x0000, 0x1000, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x2000, 0x0800, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x4000, 0x0000, 0x0800 ) // src-dest-size
+
+ ROM_REGION( 0x1800, "gfx2", 0 ) // cards
+ ROM_COPY( "gfxpool", 0x0800, 0x1000, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x2800, 0x0800, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x4800, 0x0000, 0x0800 ) // src-dest-size
+
+ ROM_REGION( 0x1800, "gfx3", 0 ) // nag, held, cards back
+ ROM_COPY( "gfxpool", 0x1000, 0x1000, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x3000, 0x0800, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x5000, 0x0000, 0x0800 ) // src-dest-size
+
+ ROM_REGION( 0x1800, "gfx4", 0 ) // title
+ ROM_COPY( "gfxpool", 0x1800, 0x1000, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x3800, 0x0800, 0x0800 ) // src-dest-size
+ ROM_COPY( "gfxpool", 0x5800, 0x0000, 0x0800 ) // src-dest-size
ROM_REGION( 0x0100, "proms", 0 )
ROM_LOAD( "82s129.ic31", 0x0000, 0x0100, CRC(b4e1ccd6) SHA1(bb1ce6ff60b92886cd8689b9c9f2fdfa9b33fe09) )
@@ -12451,9 +12586,45 @@ void goldnpkr_state::init_lespenduj()
ROM0[0x7749] = 0x17; // fix lamps bug
}
+void goldnpkr_state::init_op5cards()
+{
+ /* Seems to do a sort of blend
+ between a tile bytes from 1468-146f (top left backcard edge)
+ with 7468-746f range. In this game seems to be only for this tile.
+ */
+
+ uint8_t *ROM = memregion("gfx3")->base();
+
+ ROM[0x1468] = 0x3f;
+ ROM[0x1469] = 0x7f;
+ ROM[0x146a] = 0xff;
+ ROM[0x146b] = 0xf0;
+ ROM[0x146c] = 0xe0;
+ ROM[0x146d] = 0xe0;
+ ROM[0x146e] = 0xe0;
+ ROM[0x146f] = 0xe0;
+}
+
+void goldnpkr_state::init_olym65()
+{
+ uint8_t *rom = memregion("maincpu")->base();
+
+ for (int i = 0x2000; i <= 0x10000; i++)
+ {
+ if (i & 0x01) rom[i] ^= 0x02;
+ if (i & 0x02) rom[i] ^= 0x04;
+ if (i & 0x04) rom[i] ^= 0x09;
+ if (i & 0x08) rom[i] ^= 0x20;
+ if (i & 0x10) rom[i] ^= 0x40;
+ if (i & 0x20) rom[i] ^= 0x90;
+ }
+}
+
+
} // anonymous namespace
+
/*********************************************
* Game Drivers *
*********************************************/
@@ -12518,8 +12689,6 @@ GAMEL( 1990, falcnwlda, falcnwld, wildcard, wildcard, goldnpkr_state, empty_init
GAMEL( 1990, falcnwldb, falcnwld, wildcard, wildcard, goldnpkr_state, empty_init, ROT0, "Video Klein", "Falcons Wild - World Wide Poker (Video Klein, set 2)", 0, layout_goldnpkr )
GAME( 1983, falcnwldc, falcnwld, wildcrdb, wildcard, goldnpkr_state, empty_init, ROT0, "Falcon", "Falcons Wild - World Wide Poker (Falcon original)", MACHINE_NOT_WORKING ) // MCU hook up incomplete, currently game runs only after a soft reset. Then you can coin up but bet doesn't work
-GAME( 1987, super21p, 0, super21p, super21p, goldnpkr_state, empty_init, ROT0, "Public MNG", "Super 21", MACHINE_IMPERFECT_COLORS )
-
GAMEL( 1991, witchcrd, 0, witchcrd, witchcrd, goldnpkr_state, init_vkdlsc, ROT0, "Video Klein?", "Witch Card (Video Klein CPU box, set 1)", 0, layout_goldnpkr )
GAME( 1991, witchcrda, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "", "Witch Card (Spanish, witch game, set 1)", 0 )
GAME( 1991, witchcrdb, witchcrd, witchcrd, witchcda, goldnpkr_state, empty_init, ROT0, "", "Witch Card (Spanish, witch game, set 2)", 0 )
@@ -12617,11 +12786,12 @@ GAME( 1998, super98, bsuerte, witchcrd, super98, goldnpkr_state, init_super
GAME( 198?, animpkr, 0, icp_ext, animpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_IMPERFECT_COLORS ) // banked program. how to switch gfx?
+GAME( 1987, super21p, 0, super21p, super21p, goldnpkr_state, empty_init, ROT0, "Public MNG", "Super 21", MACHINE_IMPERFECT_COLORS )
+GAME( 1987, op5cards, 0, op5cards, op5cards, goldnpkr_state, init_op5cards, ROT0, "MNG", "Open 5 Cards", 0 ) // initialize lamps but doesn't seems to use them
+
GAMEL( 198?, lespendu, 0, lespendu, lespendu, goldnpkr_state, init_lespendu, ROT0, "Voyageur de L'Espace Inc.", "Le Super Pendu (V1, words set #1)", 0, layout_lespendu )
GAMEL( 198?, lespenduj, 0, lespendu, lespendu, goldnpkr_state, init_lespenduj,ROT0, "Voyageur de L'Espace Inc.", "Le Super Pendu (V1, words set #2)", 0, layout_lespendu )
-GAME( 1987, op5cards, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "MNG", "Open 5 Cards", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // initialize lamps but doesn't seems to use them
-
/*************************************** SETS W/IRQ0 ***************************************/
@@ -12641,5 +12811,5 @@ GAME( 1990, maxidpkr, 0, megadpkr, megadpkr, blitz_state, empty_init
/*************************************** SETS W/R6511 ***************************************/
-GAME( 1989, olym65wc, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "Olympic Video Gaming PTY LTD", "Wild Card (Olympic Games, v2.0)", MACHINE_NOT_WORKING )
-GAME( 1989, olym65bj, 0, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "Olympic Video Gaming PTY LTD", "Black jack (Olympic Games, v5.04, upgrade kit for Wild Card)", MACHINE_NOT_WORKING )
+GAME( 1989, olym65wc, 0, goldnpkr, goldnpkr, goldnpkr_state, init_olym65, ROT0, "Olympic Video Gaming PTY LTD", "Wild Card (Olympic Games, v2.0)", MACHINE_NOT_WORKING )
+GAME( 1989, olym65bj, 0, goldnpkr, goldnpkr, goldnpkr_state, init_olym65, ROT0, "Olympic Video Gaming PTY LTD", "Black jack (Olympic Games, v5.04, upgrade kit for Wild Card)", MACHINE_NOT_WORKING )
diff --git a/src/mame/misc/vocalizer.cpp b/src/mame/misc/vocalizer.cpp
new file mode 100644
index 00000000000..9499ba2f8db
--- /dev/null
+++ b/src/mame/misc/vocalizer.cpp
@@ -0,0 +1,569 @@
+// license: BSD-3-Clause
+// copyright-holders: Devin Acker
+/***************************************************************************
+
+ Breakaway Vocalizer 1000
+
+ Voice-powered synth and MIDI controller. ES5503 "DOC"-based.
+
+ To enable MIDI input, press "Option" and then "Melody Guide".
+
+ U11: 512kbit program ROM
+ U12: Sony CXK5864PM-15L (64kbit SRAM)
+ U13: Motorola MC68B09EP
+ U17: NCR E106-71 609-0381069 (ES5503 compatible/clone)
+ U18: 512kbit wave ROM
+ U19: Breakaway GA1 NCR0880995
+ Y1: 8.000 MHz
+
+ TODO:
+ - Microphone input. Data is read by function at $9BFD (after FIRQ_MIC)
+ and then processed by function at $C705.
+ - Instruments that use the sync/AM bit sound weird (need hardware recordings)
+ - Link cable (uses UART 0)
+ - Song cartridges (connected to CPU at $0000-3fff)
+ - Instrument cartridges (connected to DOC at $10000+)
+
+ Misc. notes:
+ - Hold "Cursor Left" / "Delete" on boot to run a self test and re-init NVRAM.
+ - Hold the "Jazz" style button on boot to run a key/button test.
+ Press all buttons (in any order), including both handset buttons,
+ then press any button to exit.
+ - Press "Option" and then "Master Volume -" to display the ROM version.
+
+***************************************************************************/
+
+#include "emu.h"
+
+#include "bus/midi/midiinport.h"
+#include "bus/midi/midioutport.h"
+#include "cpu/m6809/m6809.h"
+#include "machine/nvram.h"
+#include "sound/es5503.h"
+#include "video/hd44780.h"
+
+#include "emupal.h"
+#include "screen.h"
+#include "speaker.h"
+
+//#define VERBOSE 1
+#include "logmacro.h"
+
+class vocalizer_uart_device : public device_t, public device_serial_interface
+{
+public:
+ vocalizer_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+
+ auto tx_cb() { return m_tx_cb.bind(); }
+ auto tx_irq_cb() { return m_tx_irq_cb.bind(); }
+ auto rx_irq_cb() { return m_rx_irq_cb.bind(); }
+
+ u8 read() { m_rx_irq_cb(0); return get_received_char(); }
+ void write(u8 data) { m_tx_irq_cb(0); transmit_register_setup(data); }
+
+protected:
+ virtual void device_start() override {}
+ virtual void device_reset() override;
+
+ virtual void tra_callback() override { m_tx_cb(transmit_register_get_data_bit()); }
+ virtual void tra_complete() override { m_tx_irq_cb(1); }
+ virtual void rcv_complete() override { receive_register_extract(); m_rx_irq_cb(1); }
+
+ devcb_write_line m_tx_cb;
+ devcb_write_line m_tx_irq_cb;
+ devcb_write_line m_rx_irq_cb;
+};
+
+DEFINE_DEVICE_TYPE(VOCALIZER_UART, vocalizer_uart_device, "vocalizer_uart", "Vocalizer 1000 UART")
+
+vocalizer_uart_device::vocalizer_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock):
+ device_t(mconfig, VOCALIZER_UART, tag, owner, clock),
+ device_serial_interface(mconfig, *this),
+ m_tx_cb(*this),
+ m_tx_irq_cb(*this),
+ m_rx_irq_cb(*this)
+{
+}
+
+void vocalizer_uart_device::device_reset()
+{
+ set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
+ set_rate(31250);
+ m_tx_irq_cb(0);
+ m_rx_irq_cb(0);
+}
+
+namespace {
+
+//**************************************************************************
+class vocalizer_state : public driver_device
+{
+public:
+ vocalizer_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_lcdc(*this, "lcdc"),
+ m_es5503(*this, "es5503"),
+ m_uart(*this, "uart%u", 0),
+ m_bank(*this, "rombank"),
+ m_keys(*this, "IN%u", 0)
+ { }
+
+ void vocalizer(machine_config &config);
+
+ void vocalizer_palette(palette_device &palette) const;
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ enum
+ {
+ FIRQ_TX0 = (1<<0), // UART 0 Tx (link cable)
+ FIRQ_RX = (1<<1), // UART Rx (either one)
+ FIRQ_MIC = (1<<2), // audio input detection (triggered by input waveform edge, or something else?)
+ FIRQ_TX1 = (1<<3) // UART 1 Tx (MIDI)
+ };
+
+ void maincpu_map(address_map &map);
+ void sound_map(address_map &map);
+
+ template u8 time_r();
+
+ u8 uart_rx_r();
+ template void uart_rx_irq(int state);
+
+ u8 status_r();
+ void config_w(u8 data) { m_config = data; }
+ void input_sel_w(u8 data) { m_input_sel = BIT(data, 3, 4); }
+
+ template void firq_w(int state);
+ void firq_ack_w(u8 data);
+ void firq_mask_w(u8 data);
+ void firq_update();
+
+ void volume_w(u8 data);
+
+ void apo_w(u8 data);
+
+ template void bank_w(u8 data) { m_bank->set_entry(Num); }
+
+ required_device m_maincpu;
+ required_device m_lcdc;
+ required_device m_es5503;
+ required_device_array m_uart;
+ required_memory_bank m_bank;
+ required_ioport_array<12> m_keys;
+
+ u8 m_power;
+ u8 m_config;
+ u8 m_input_sel;
+ u8 m_firq_status, m_firq_mask;
+};
+
+
+//**************************************************************************
+// ADDRESS MAPS
+//**************************************************************************
+
+void vocalizer_state::maincpu_map(address_map &map)
+{
+ map(0x0000, 0x3fff).noprw(); // TODO: song cartridge
+ map(0x4000, 0x40ff).mirror(0x0f00).rw(m_es5503, FUNC(es5503_device::read), FUNC(es5503_device::write));
+ map(0x5000, 0x5000).mirror(0x0ff0).r(FUNC(vocalizer_state::uart_rx_r));
+ map(0x5000, 0x5000).mirror(0x0ff0).w(m_uart[0], FUNC(vocalizer_uart_device::write));
+ map(0x5001, 0x5001).mirror(0x0ff0).rw(FUNC(vocalizer_state::status_r), FUNC(vocalizer_state::config_w));
+ map(0x5002, 0x5002).mirror(0x0ff0).rw(FUNC(vocalizer_state::time_r<8>), FUNC(vocalizer_state::input_sel_w));
+ map(0x5003, 0x5003).mirror(0x0ff0).r(FUNC(vocalizer_state::time_r<0>));
+ map(0x5003, 0x5003).mirror(0x0ff0).w(m_uart[1], FUNC(vocalizer_uart_device::write));
+ map(0x5004, 0x5005).mirror(0x0ff0).nopr(); // TODO: audio in amplitude
+ map(0x5004, 0x5004).mirror(0x0ff0).w(FUNC(vocalizer_state::firq_ack_w));
+ map(0x5005, 0x5005).mirror(0x0ff0).w(FUNC(vocalizer_state::firq_mask_w));
+ map(0x5006, 0x5007).mirror(0x0ff0).nopr(); // TODO: audio in freq/edge counter
+ map(0x5006, 0x5006).mirror(0x0ff0).nopw(); // TODO: mic input gain
+ map(0x5007, 0x5007).mirror(0x0ff0).w(FUNC(vocalizer_state::volume_w));
+ map(0x5008, 0x5008).mirror(0x0ff0).portr("PORT8");
+ map(0x5009, 0x5009).mirror(0x0f70).rw(m_lcdc, FUNC(hd44780_device::control_r), FUNC(hd44780_device::control_w));
+ map(0x500a, 0x500a).mirror(0x0ff0).nopw(); // ?
+ map(0x500b, 0x500b).mirror(0x0f30).w(FUNC(vocalizer_state::apo_w));
+ map(0x5089, 0x5089).mirror(0x0f70).rw(m_lcdc, FUNC(hd44780_device::data_r), FUNC(hd44780_device::data_w));
+ map(0x508b, 0x508b).mirror(0x0f30).w(FUNC(vocalizer_state::bank_w<0>));
+ map(0x50cb, 0x50cb).mirror(0x0f30).w(FUNC(vocalizer_state::bank_w<1>));
+ map(0x6000, 0x7fff).ram().share("nvram");
+ map(0x8000, 0xffff).bankr("rombank");
+}
+
+void vocalizer_state::sound_map(address_map &map)
+{
+ map(0x00000, 0x0ffff).rom().region("es5503", 0);
+ map(0x10000, 0x1ffff).nopr(); // TODO: instrument cartridge
+}
+
+//**************************************************************************
+// INPUT PORT DEFINITIONS
+//**************************************************************************
+
+static INPUT_PORTS_START( vocalizer )
+ PORT_START("IN0")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Drums Only")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Country)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Latin 2)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Rock 4)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Full SmartSong")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bass & Chord")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Drums & Bass")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 6 / Edit Rhythm")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Multi-Track")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 1 / Record")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 2 / Stop")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 3 / Play")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 4 / Track")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song 5 / Edit Pitch")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Cart")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Demo")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right / Tap")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left / Delete")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down / No")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up / Yes")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tuning")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Jazz)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Soul 1)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Rock 1)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Option")
+ PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Stop/Start")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Blues)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Soul 2)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Rock 2)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song Variations")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Key +")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tempo +")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Ending")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Reggae)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Latin 1)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Song (Rock 3)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rhythm Variations")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Key -")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tempo -")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Melody Guide")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Master Volume -")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Instrument Volume -")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Voice Volume -")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Octave -")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Harmony")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Slide")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN7")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Piano)")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Spirit)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Bells)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Violin)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Sax)")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Flute)")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Electric Guitar)")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN8")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Electric Piano)")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Warp)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Marimba)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Cello)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Trumpet)")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Whistle)")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Fuzz Guitar)")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN9")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Piano Strings)")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Fusion)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Steel Drum)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Bass)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Trombone)")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Clarinet)")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Electric Bass)")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN10")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Organ)")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Sara)")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Synth Drums)")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Synth Strings)")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Synth Brass)")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Harmonica)")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Tone (Slap Bass)")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("IN11")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Voice Guide")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Master Volume +")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Instrument Volume +")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Voice Volume +")
+ PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Octave +")
+ PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Echo")
+ PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Chorus")
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("PORT8") // handset and power button
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Octave + (Hold)")
+ PORT_BIT(0x06, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // power
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Slide (Hold)")
+ PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
+INPUT_PORTS_END
+
+
+//**************************************************************************
+// MACHINE EMULATION
+//**************************************************************************
+
+void vocalizer_state::vocalizer_palette(palette_device &palette) const
+{
+ palette.set_pen_color(0, rgb_t(138, 146, 148)); // background
+ palette.set_pen_color(1, rgb_t( 63, 59, 62)); // LCD pixel on
+ palette.set_pen_color(2, rgb_t(131, 136, 139)); // LCD pixel off
+}
+
+HD44780_PIXEL_UPDATE( vocalizer_state::lcd_pixel_update )
+{
+ // char size is 5x8
+ if (!m_power || x > 4 || y > 7)
+ return;
+
+ if (line < 2 && pos < 8)
+ bitmap.pix(1 + y, 1 + line*48 + pos*6 + x) = state ? 1 : 2;
+}
+
+//**************************************************************************
+void vocalizer_state::machine_start()
+{
+ m_bank->configure_entries(0, 2, memregion("maincpu")->base(), 0x8000);
+
+ save_item(NAME(m_power));
+ save_item(NAME(m_config));
+ save_item(NAME(m_input_sel));
+ save_item(NAME(m_firq_status));
+ save_item(NAME(m_firq_mask));
+}
+
+//**************************************************************************
+void vocalizer_state::machine_reset()
+{
+ m_power = 1;
+ m_config = 0;
+ m_input_sel = 0;
+ m_firq_status = m_firq_mask = 0;
+}
+
+//**************************************************************************
+template
+u8 vocalizer_state::time_r()
+{
+ // used for tempo, auto power off timer, etc
+ return machine().time().as_ticks(2'000'000) >> Shift;
+}
+
+//**************************************************************************
+u8 vocalizer_state::uart_rx_r()
+{
+ return m_uart[BIT(m_config, 0)]->read();
+}
+
+//**************************************************************************
+template
+void vocalizer_state::uart_rx_irq(int state)
+{
+ if (Num == BIT(m_config, 0))
+ firq_w(state);
+}
+
+//**************************************************************************
+u8 vocalizer_state::status_r()
+{
+ u8 status = 0x80;
+ u8 keys = 0;
+
+ if (m_input_sel == 0xf)
+ {
+ // selecting row 15 scans all rows together...
+ for (int i = 0; i < m_keys.size(); i++)
+ keys |= m_keys[i]->read();
+ // and also inverts the ready bit, apparently
+ status = 0x00;
+ }
+ else if (m_input_sel < m_keys.size())
+ {
+ keys = m_keys[m_input_sel]->read();
+ }
+
+ for (int i = 7; i >= 0; i--)
+ {
+ if (BIT(keys, i))
+ {
+ status |= i;
+ status ^= 0x80;
+ break;
+ }
+ }
+
+ status |= (m_firq_status & 0xf) << 3;
+
+ return status;
+}
+
+//**************************************************************************
+template
+void vocalizer_state::firq_w(int state)
+{
+ if (state)
+ {
+ m_firq_status |= Num;
+ firq_update();
+ }
+}
+
+//**************************************************************************
+void vocalizer_state::firq_ack_w(u8 data)
+{
+ m_firq_status &= BIT(~data, 3, 4);
+ firq_update();
+}
+
+//**************************************************************************
+void vocalizer_state::firq_mask_w(u8 data)
+{
+ m_firq_mask = BIT(data, 3, 4);
+ firq_update();
+}
+
+//**************************************************************************
+void vocalizer_state::firq_update()
+{
+ if (m_firq_status & ~m_firq_mask & 0xf)
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
+ else
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
+}
+
+//**************************************************************************
+void vocalizer_state::volume_w(u8 data)
+{
+ // TODO: increase overall gain? per-voice volume almost never goes above 0x40
+ m_es5503->set_output_gain(ALL_OUTPUTS, (float)data / 255);
+}
+
+//**************************************************************************
+void vocalizer_state::apo_w(u8 data)
+{
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_lcdc->reset();
+ m_es5503->reset();
+ m_power = 0;
+}
+
+//**************************************************************************
+// MACHINE DEFINTIONS
+//**************************************************************************
+
+void vocalizer_state::vocalizer(machine_config &config)
+{
+ MC6809E(config, m_maincpu, 8_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &vocalizer_state::maincpu_map);
+
+ NVRAM(config, "nvram");
+
+ VOCALIZER_UART(config, m_uart[0]);
+ m_uart[0]->tx_irq_cb().set(FUNC(vocalizer_state::firq_w));
+ m_uart[0]->rx_irq_cb().set(FUNC(vocalizer_state::uart_rx_irq<0>));
+ // TODO: link cable on uart 0
+
+ VOCALIZER_UART(config, m_uart[1]);
+ m_uart[1]->tx_irq_cb().set(FUNC(vocalizer_state::firq_w));
+ m_uart[1]->rx_irq_cb().set(FUNC(vocalizer_state::uart_rx_irq<1>));
+
+ midi_port_device& mdin(MIDI_PORT(config, "mdin", midiin_slot, "midiin"));
+ mdin.rxd_handler().set(m_uart[1], FUNC(vocalizer_uart_device::rx_w));
+
+ MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ m_uart[1]->tx_cb().set("mdout", FUNC(midi_port_device::write_txd));
+
+ // video hardware
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(6*16 + 1, 10);
+ screen.set_visarea_full();
+ screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", FUNC(vocalizer_state::vocalizer_palette), 3);
+
+ HD44780(config, m_lcdc, 270'000); // TODO: clock not measured, datasheet typical clock used
+ m_lcdc->set_lcd_size(2, 8);
+ m_lcdc->set_pixel_update_cb(FUNC(vocalizer_state::lcd_pixel_update));
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ ES5503(config, m_es5503, 8_MHz_XTAL).set_channels(16);
+ m_es5503->set_addrmap(0, &vocalizer_state::sound_map);
+ m_es5503->irq_func().set_inputline(m_maincpu, M6809_IRQ_LINE);
+ for (int i = 0; i < 16; i++)
+ {
+ if (i <= 8)
+ m_es5503->add_route(i, "lspeaker", 1.0);
+ else if (i < 15)
+ m_es5503->add_route(i, "lspeaker", (15 - i) / 7.0);
+
+ if (i >= 8)
+ m_es5503->add_route(i, "rspeaker", 1.0);
+ else if (i > 0)
+ m_es5503->add_route(i, "rspeaker", i / 8.0);
+ }
+}
+
+
+//**************************************************************************
+// ROM DEFINITIONS
+//**************************************************************************
+
+ROM_START( vocalizer )
+ ROM_REGION(0x10000, "maincpu", 0) // "Version 1.5g"
+ ROM_LOAD("system v-e cs=e700.u11", 0x00000, 0x10000, CRC(ead225ba) SHA1(89ebda078a98babd6513953ee29db4e31e06db83))
+
+ ROM_REGION(0x10000, "es5503", 0)
+ ROM_LOAD("waverom v-a cs=7018.u18", 0x00000, 0x10000, CRC(55567c6d) SHA1(5c67997301f4d3bdc2e5dd893b0234425eb374f0))
+
+ ROM_REGION(0x2000, "nvram", 0)
+ ROM_LOAD("init_ram.bin", 0x0000, 0x2000, CRC(f1e85f3d) SHA1(7897b488d128e044af737e7e6cbb7857d92e4891))
+ROM_END
+
+} // anonymous namespace
+
+
+//**************************************************************************
+// SYSTEM DRIVERS
+//**************************************************************************
+
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+SYST( 1988, vocalizer, 0, 0, vocalizer, vocalizer, vocalizer_state, empty_init, "Breakaway Music Systems", "Vocalizer 1000", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_NODEVICE_MICROPHONE )
diff --git a/src/mame/pc/nforcepc.cpp b/src/mame/pc/nforcepc.cpp
index f2c431c10e9..21dd4604776 100644
--- a/src/mame/pc/nforcepc.cpp
+++ b/src/mame/pc/nforcepc.cpp
@@ -97,8 +97,7 @@ void crush11_host_device::device_start()
{
pci_host_device::device_start();
set_multifunction_device(true);
- memory_space = &cpu->space(AS_DATA);
- io_space = &cpu->space(AS_IO);
+ set_spaces(&cpu->space(AS_DATA), &cpu->space(AS_IO));
memory_window_start = 0;
memory_window_end = 0xffffffff;
diff --git a/src/mame/pc/pcipc.cpp b/src/mame/pc/pcipc.cpp
index 8008cefffed..19bf5ff83dd 100644
--- a/src/mame/pc/pcipc.cpp
+++ b/src/mame/pc/pcipc.cpp
@@ -683,6 +683,7 @@ ROM_START(pcipc)
ROMX_LOAD("m55-04s.rom", 0x20000, 0x20000, CRC(34a7422e) SHA1(68753fe373c97844beff83ea75c634c77cfedb8f), ROM_BIOS(1))
ROM_SYSTEM_BIOS(2, "crisis", "Version 07/01/98, for flash recovery")
ROMX_LOAD("crisis.rom", 0x00000, 0x40000, CRC(38a1458a) SHA1(8881ac336392cca79a772b4168f63efc31f953dd), ROM_BIOS(2) )
+ // FIXME: this is incompatible, it's a Gigabyte GA-586HX with W83877F Super I/O
ROM_SYSTEM_BIOS(3, "5hx29", "5hx29")
ROMX_LOAD("5hx29.bin", 0x20000, 0x20000, CRC(07719a55) SHA1(b63993fd5186cdb4f28c117428a507cd069e1f68), ROM_BIOS(3) )
// ROM_REGION(0x8000,"ibm_vga", 0)
diff --git a/src/mame/rm/rm380z.cpp b/src/mame/rm/rm380z.cpp
index e7a8dcf8e8e..1792db26270 100644
--- a/src/mame/rm/rm380z.cpp
+++ b/src/mame/rm/rm380z.cpp
@@ -136,7 +136,6 @@ Notes on COS 4.0 disassembly:
TODO:
-- Properly implement "backwards" or "last 4 lines" scrolling
- Properly implement dimming and graphic chars (>0x80)
- Understand why any write to disk command fails with "bad sector"
- Understand why ctrl-U (blinking cursor) in COS 4.0 stops keyboard input from working
@@ -231,7 +230,14 @@ static void rm380z_floppies(device_slot_interface &device)
uint32_t rm380z_state::screen_update_rm380z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- update_screen(bitmap);
+ if (screen.width() > 240)
+ {
+ update_screen_vdu80(bitmap);
+ }
+ else
+ {
+ update_screen_vdu40(bitmap);
+ }
return 0;
}
@@ -243,15 +249,13 @@ void rm380z_state::rm380z(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &rm380z_state::rm380z_io);
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- // according to videos and pictures of the real hardware, chars are spaced of at least 1 pixel
- // and there is at least 1 pixel between each row of characters
- screen.set_size((RM380Z_SCREENCOLS*(RM380Z_CHDIMX+1)), (RM380Z_SCREENROWS*(RM380Z_CHDIMY+1)));
- screen.set_visarea(0, (RM380Z_SCREENCOLS*(RM380Z_CHDIMX+1))-1, 0, (RM380Z_SCREENROWS*(RM380Z_CHDIMY+1))-1);
- screen.set_screen_update(FUNC(rm380z_state::screen_update_rm380z));
- screen.set_palette("palette");
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(640, 240);
+ m_screen->set_visarea_full();
+ m_screen->set_screen_update(FUNC(rm380z_state::screen_update_rm380z));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -322,13 +326,12 @@ ROM_END
ROM_START( rm380z ) // COS 4.0B/M
ROM_REGION( 0x10000, RM380Z_MAINCPU_TAG, 0 )
- // I'm not sure of how those roms have been dumped. I don't know if those are good dumps or not.
- ROM_LOAD( "cos40b-m.bin", 0x0000, 0x1000, BAD_DUMP CRC(1f0b3a5c) SHA1(0b29cb2a3b7eaa3770b34f08c4fd42844f42700f))
- ROM_LOAD( "cos40b-m_f600-f9ff.bin", 0x1000, 0x400, BAD_DUMP CRC(e3397d9d) SHA1(490a0c834b0da392daf782edc7d51ca8f0668b1a))
- ROM_LOAD( "cos40b-m_1c00-1dff.bin", 0x1400, 0x200, BAD_DUMP CRC(0f759f44) SHA1(9689c1c1faa62c56def999cbedbbb0c8d928dcff))
- // chargen ROM is undumped, afaik
- ROM_REGION( 0x1680, "chargen", 0 )
- ROM_LOAD( "ch3.raw", 0x0000, 0x1680, BAD_DUMP CRC(c223622b) SHA1(185ef24896419d7ff46f71a760ac217de3811684))
+ // I'm not sure of how those ROMs have been dumped. I don't know if those are good dumps or not.
+ ROM_LOAD( "cos40b-m.bin", 0x0000, 0x1000, BAD_DUMP CRC(1f0b3a5c) SHA1(0b29cb2a3b7eaa3770b34f08c4fd42844f42700f) )
+ ROM_LOAD( "cos40b-m_f600-f9ff.bin", 0x1000, 0x0400, BAD_DUMP CRC(e3397d9d) SHA1(490a0c834b0da392daf782edc7d51ca8f0668b1a) )
+ ROM_LOAD( "cos40b-m_1c00-1dff.bin", 0x1400, 0x0200, BAD_DUMP CRC(0f759f44) SHA1(9689c1c1faa62c56def999cbedbbb0c8d928dcff) )
+ ROM_REGION( 0x0800, "chargen", 0 )
+ ROM_LOAD( "c-gen-22.bin", 0x0000, 0x0800, CRC(1b67127f) SHA1(289a919871d30c5e832d22244bcac1dcfd544baa) )
ROM_END
// RM480Z is quite different, might be better off in its own driver
@@ -337,7 +340,7 @@ ROM_START( rm480z )
ROM_LOAD( "fv2.0_0_12099_19.2.86.ic83", 0x0000, 0x4000, CRC(a0f02d8a) SHA1(1c063b842699dc0ad85a5a5f337f2864497f9c0f) )
ROM_LOAD( "fv2.0_1_12100_27.2.86.ic93", 0x4000, 0x4000, CRC(2a93ca6e) SHA1(7fdd772d4251dbf951a687d184ed787cfe21212b) )
ROM_REGION( 0x2000, "chargen", 0 )
- ROM_LOAD( "cg06_12098_28.2.86.ic98", 0x0000, 0x2000, CRC(15d40f7e) SHA1(a7266357eb9be849f77a97ff3013b236c0af8289) )
+ ROM_LOAD( "cg06_12098_28.2.86.ic98", 0x0000, 0x2000, CRC(15d40f7e) SHA1(a7266357eb9be849f77a97ff3013b236c0af8289) )
ROM_END
ROM_START( rm480za )
@@ -350,7 +353,7 @@ ROM_START( rm480za )
ROM_LOAD( "idc3-1i.rom", 0x0000, 0x2000, CRC(39e2cdf0) SHA1(ba523af357b61bbe6192727139850f36597d79f1) )
ROM_LOAD( "idc5-1j.rom", 0x2000, 0x2000, CRC(d2ac27e2) SHA1(12d3966e0096c9bfb98135e15c3ddb37920cce15) )
ROM_REGION( 0x2000, "chargen", 0 )
- ROM_LOAD( "cg06.lq", 0x0000, 0x2000, BAD_DUMP CRC(15d40f7e) SHA1(a7266357eb9be849f77a97ff3013b236c0af8289) ) // chip is marked CG05, might not be the same, so marked as bad
+ ROM_LOAD( "cg06.lq", 0x0000, 0x2000, BAD_DUMP CRC(15d40f7e) SHA1(a7266357eb9be849f77a97ff3013b236c0af8289) ) // chip is marked CG05, might not be the same, so marked as bad
ROM_END
@@ -359,6 +362,5 @@ ROM_END
COMP(1978, rm380z, 0, 0, rm380z, rm380z, rm380z_state, init_rm380z, "Research Machines", "RM-380Z, COS 4.0B", MACHINE_NO_SOUND_HW)
COMP(1978, rm380z34d, rm380z, 0, rm380z, rm380z, rm380z_state, init_rm380z34d, "Research Machines", "RM-380Z, COS 3.4D", MACHINE_NO_SOUND_HW)
COMP(1978, rm380z34e, rm380z, 0, rm380z, rm380z, rm380z_state, init_rm380z34e, "Research Machines", "RM-380Z, COS 3.4E", MACHINE_NO_SOUND_HW)
-COMP(1981, rm480z, rm380z, 0, rm480z, rm380z, rm380z_state, init_rm380z34e, "Research Machines", "LINK RM-480Z (set 1)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
-COMP(1981, rm480za, rm380z, 0, rm480z, rm380z, rm380z_state, init_rm380z34e, "Research Machines", "LINK RM-480Z (set 2)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
-
+COMP(1981, rm480z, rm380z, 0, rm480z, rm380z, rm380z_state, init_rm480z, "Research Machines", "LINK RM-480Z (set 1)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+COMP(1981, rm480za, rm380z, 0, rm480z, rm380z, rm380z_state, init_rm480z, "Research Machines", "LINK RM-480Z (set 2)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
diff --git a/src/mame/rm/rm380z.h b/src/mame/rm/rm380z.h
index ae5c4bd5991..e35ff6cb1e4 100644
--- a/src/mame/rm/rm380z.h
+++ b/src/mame/rm/rm380z.h
@@ -37,6 +37,7 @@ class rm380z_state : public driver_device
driver_device(mconfig, type, tag),
m_chargen(*this, "chargen"),
m_maincpu(*this, RM380Z_MAINCPU_TAG),
+ m_screen(*this, "screen"),
m_cassette(*this, "cassette"),
m_messram(*this, RAM_TAG),
m_fdc(*this, "wd1771"),
@@ -58,6 +59,26 @@ class rm380z_state : public driver_device
virtual void machine_start() override;
private:
+ template
+ class rm380z_vram
+ {
+ public:
+ void set_char(int row, int col, uint8_t data) { m_chars[get_row(row)][col] = data; }
+ void set_attrib(int row, int col, uint8_t data) { m_attribs[get_row(row)][col] = data; }
+ void set_scroll_register(uint8_t value) { m_scroll_reg = value; }
+ void reset() { memset(m_attribs, 0, sizeof(m_attribs)); memset(m_chars, 0x80, sizeof(m_chars)); }
+
+ uint8_t get_char(int row, int col) const { return m_chars[get_row(row)][col]; }
+ uint8_t get_attrib(int row, int col) const { return m_attribs[get_row(row)][col]; }
+
+ private:
+ int get_row(int row) const { return (row + m_scroll_reg) % ROWS; }
+
+ uint8_t m_chars[ROWS][COLS];
+ uint8_t m_attribs[ROWS][COLS];
+ uint8_t m_scroll_reg = 0;
+ };
+
static inline constexpr int RM380Z_VIDEOMODE_40COL = 0x01;
static inline constexpr int RM380Z_VIDEOMODE_80COL = 0x02;
@@ -68,9 +89,6 @@ class rm380z_state : public driver_device
static inline constexpr int RM380Z_SCREENCOLS = 80;
static inline constexpr int RM380Z_SCREENROWS = 24;
- static inline constexpr int RM380Z_VIDEORAM_SIZE = 0x600;
- static inline constexpr int RM380Z_SCREENSIZE = 0x1200;
-
bool ports_enabled_high() const { return ( m_port0 & 0x80 ); }
bool ports_enabled_low() const { return !( m_port0 & 0x80 ); }
@@ -78,11 +96,10 @@ class rm380z_state : public driver_device
void put_point(int charnum, int x, int y, int col);
void init_graphic_chars();
- void putChar(int charnum, int attribs, int x, int y, bitmap_ind16 &bitmap, int vmode);
+ void putChar_vdu80(int charnum, int attribs, int x, int y, bitmap_ind16 &bitmap);
+ void putChar_vdu40(int charnum, int x, int y, bitmap_ind16 &bitmap);
void decode_videoram_char(int row, int col, uint8_t &chr, uint8_t &attrib);
- void scroll_videoram();
void config_videomode();
- void check_scroll_register();
void port_write(offs_t offset, uint8_t data);
uint8_t port_read(offs_t offset);
@@ -104,7 +121,8 @@ class rm380z_state : public driver_device
DECLARE_MACHINE_RESET(rm480z);
void config_memory_map();
- void update_screen(bitmap_ind16 &bitmap);
+ void update_screen_vdu80(bitmap_ind16 &bitmap);
+ void update_screen_vdu40(bitmap_ind16 &bitmap);
uint32_t screen_update_rm380z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_rm480z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(static_vblank_timer);
@@ -114,33 +132,31 @@ class rm380z_state : public driver_device
void rm480z_io(address_map &map);
void rm480z_mem(address_map &map);
- int writenum = 0;
-
uint8_t m_port0 = 0;
uint8_t m_port0_mask = 0;
uint8_t m_port0_kbd = 0;
uint8_t m_port1 = 0;
- uint8_t m_fbfd = 0;
+ uint8_t m_fbfd_mask = 0;
uint8_t m_fbfe = 0;
+ uint8_t m_character_row = 0;
+ uint8_t m_character = 0;
+
uint8_t m_graphic_chars[0x80][(RM380Z_CHDIMX+1)*(RM380Z_CHDIMY+1)];
+ uint8_t m_user_defined_chars[2048];
- uint8_t m_vramchars[RM380Z_SCREENROWS][RM380Z_SCREENCOLS];
- uint8_t m_vramattribs[RM380Z_SCREENROWS][RM380Z_SCREENCOLS];
+ rm380z_vram m_vram;
int m_rasterlineCtr = 0;
emu_timer* m_vblankTimer = nullptr;
- uint8_t m_old_fbfd = 0;
- uint8_t m_old_old_fbfd = 0;
-
int m_videomode = 0;
- int m_old_videomode = 0;
emu_timer *m_static_vblank_timer = nullptr;
required_region_ptr m_chargen;
required_device m_maincpu;
+ optional_device m_screen;
optional_device m_cassette;
optional_device m_messram;
optional_device m_fdc;
diff --git a/src/mame/rm/rm380z_m.cpp b/src/mame/rm/rm380z_m.cpp
index a079a417fda..947c47dd8d8 100644
--- a/src/mame/rm/rm380z_m.cpp
+++ b/src/mame/rm/rm380z_m.cpp
@@ -7,7 +7,6 @@ RM 380Z machine
*/
-
#include "emu.h"
#include "rm380z.h"
@@ -29,13 +28,13 @@ bit7: 1=map ROM at 0000-0fff/0=RAM
void rm380z_state::port_write(offs_t offset, uint8_t data)
{
- switch ( offset )
+ switch (offset)
{
case 0xfc: // PORT0
- //printf("%s FBFCw[%2.2x] FBFD [%2.2x] FBFE [%2.2x] writenum [%4.4x]\n",machine().describe_context().c_str(),data,m_fbfd,m_fbfe,writenum);
+ //printf("%s FBFCw[%2.2x] FBFD [%2.2x] FBFE [%2.2x] writenum [%4.4x]\n", machine().describe_context().c_str(), data, m_fbfd, m_fbfe,writenum);
m_port0 = data;
- m_cassette->output((m_port0 & 0xEF) ? +1.0 : -1.0); // set 2400hz, bit 4
+ m_cassette->output((m_port0 & 0xef) ? +1.0 : -1.0); // set 2400hz, bit 4
if (data & 0x01)
{
@@ -51,26 +50,43 @@ void rm380z_state::port_write(offs_t offset, uint8_t data)
case 0xfd: // screen line counter (?)
//printf("%s FBFC [%2.2x] FBFDw[%2.2x] FBFE [%2.2x] writenum [%4.4x]\n",machine().describe_context().c_str(),m_port0,data,m_fbfe,writenum);
- m_old_old_fbfd = m_old_fbfd;
- m_old_fbfd = m_fbfd;
- m_fbfd = data;
-
- writenum++;
-
- check_scroll_register();
+ if (m_port0 & 0x08)
+ {
+ // update user defined character data
+ if (m_character >= 128)
+ {
+ m_user_defined_chars[(m_character % 128) * 16 + m_character_row] = data;
+ }
+ }
+ // ignore updates while bit 4 of port 0 is set
+ // (counter is not used to set the scroll register in this case, maybe used for smooth scrolling?)
+ else if (!(m_port0 & 0x10))
+ {
+ // set scroll register (used to verticaly scroll the screen and effect vram addressing)
+ m_vram.set_scroll_register(data & m_fbfd_mask);
+ }
break;
// port 1
case 0xfe: // line on screen to write to divided by 2
//printf("%s FBFC [%2.2x] FBFD [%2.2x] FBFEw[%2.2x] writenum [%4.4x]\n",machine().describe_context().c_str(),m_port0,m_fbfd,data,writenum);
- m_fbfe = data;
+ if (!(m_port0 & 0x04))
+ {
+ m_character_row = data;
+ }
+ else if (m_port0 & 0x08)
+ {
+ m_character = data;
+ }
+
+ m_fbfe = data;
break;
case 0xff: // user I/O port
//printf("write of [%x] to FBFF\n",data);
- //logerror("%s: Write %02X to user I/O port\n", machine().describe_context(), data );
+ //logerror("%s: Write %02X to user I/O port\n", machine().describe_context(), data);
break;
default:
@@ -82,7 +98,7 @@ uint8_t rm380z_state::port_read(offs_t offset)
{
uint8_t data = 0xff;
- switch ( offset )
+ switch (offset)
{
case 0xfc: // PORT0
//m_port0_kbd=getKeyboard();
@@ -94,12 +110,27 @@ uint8_t rm380z_state::port_read(offs_t offset)
case 0xfd: // "counter" (?)
//printf("%s: Read from counter FBFD\n", machine().describe_context().c_str());
- data = 0x00;
+ if (m_port0 & 0x08)
+ {
+ // return character data for requested character and row
+ if (m_character >= 128)
+ {
+ data = m_user_defined_chars[(m_character % 128) * 16 + m_character_row];
+ }
+ else
+ {
+ data = m_chargen[m_character * 16 + m_character_row];
+ }
+ }
+ else
+ {
+ data = 0x00;
+ }
break;
case 0xfe: // PORT1
if (m_cassette->input() < +0.0)
- m_port1 &= 0xDF; // bit 5 off
+ m_port1 &= 0xdf; // bit 5 off
else
m_port1 |= 0x20; // bit 5 on
@@ -233,43 +264,42 @@ void rm380z_state::machine_start()
void rm380z_state::init_rm380z()
{
m_videomode = RM380Z_VIDEOMODE_80COL;
- m_old_videomode = m_videomode;
m_port0_mask = 0xff;
+ m_fbfd_mask = 0x1f; // enable hw scrolling (uses lower 5 bits of counter)
}
void rm380z_state::init_rm380z34d()
{
m_videomode = RM380Z_VIDEOMODE_40COL;
- m_old_videomode = m_videomode;
m_port0_mask = 0xdf; // disable 80 column mode
+ m_screen->set_size(240, 240);
+ m_screen->set_visarea_full();
}
void rm380z_state::init_rm380z34e()
{
m_videomode = RM380Z_VIDEOMODE_40COL;
- m_old_videomode = m_videomode;
m_port0_mask = 0xdf; // disable 80 column mode
+ m_screen->set_size(240, 240);
+ m_screen->set_visarea_full();
}
+void rm380z_state::init_rm480z()
+{
+ // machine not working so do nothing
+}
void rm380z_state::machine_reset()
{
m_port0 = 0x00;
m_port0_kbd = 0x00;
m_port1 = 0x00;
- m_fbfd = 0x00;
m_fbfe = 0x00;
- m_old_fbfd = 0x00;
- m_old_old_fbfd = 0x00;
- writenum = 0;
-// m_videomode=RM380Z_VIDEOMODE_80COL;
-// m_old_videomode = m_videomode;
m_rasterlineCtr = 0;
// note: from COS 4.0 videos, screen seems to show garbage at the beginning
- memset(m_vramattribs, 0, sizeof(m_vramattribs));
- memset(m_vramchars, 0, sizeof(m_vramchars));
+ m_vram.reset();
config_memory_map();
m_fdc->reset();
@@ -283,16 +313,16 @@ void rm380z_state::config_memory_map()
uint8_t *rom = memregion(RM380Z_MAINCPU_TAG)->base();
uint8_t* m_ram_p = m_messram->pointer();
- if ( ports_enabled_high() )
+ if (ports_enabled_high())
{
- program.install_ram( 0x0000, 0xDFFF, m_ram_p );
+ program.install_ram(0x0000, 0xdfff, m_ram_p);
}
else
{
- program.install_rom( 0x0000, 0x0FFF, rom );
- program.install_readwrite_handler(0x1BFC, 0x1BFF, read8sm_delegate(*this, FUNC(rm380z_state::port_read_1b00)), write8sm_delegate(*this, FUNC(rm380z_state::port_write_1b00)));
- program.install_rom( 0x1C00, 0x1DFF, rom + 0x1400 );
- program.install_ram( 0x4000, 0xDFFF, m_ram_p );
+ program.install_rom(0x0000, 0x0fff, rom);
+ program.install_readwrite_handler(0x1bfc, 0x1bff, read8sm_delegate(*this, FUNC(rm380z_state::port_read_1b00)), write8sm_delegate(*this, FUNC(rm380z_state::port_write_1b00)));
+ program.install_rom(0x1c00, 0x1dff, rom + 0x1400);
+ program.install_ram(0x4000, 0xdfff, m_ram_p);
}
}
diff --git a/src/mame/rm/rm380z_v.cpp b/src/mame/rm/rm380z_v.cpp
index 2eae61448dd..87e88200484 100644
--- a/src/mame/rm/rm380z_v.cpp
+++ b/src/mame/rm/rm380z_v.cpp
@@ -66,6 +66,8 @@ void rm380z_state::init_graphic_chars()
void rm380z_state::config_videomode()
{
+ int old_mode = m_videomode;
+
if (m_port0 & 0x20 & m_port0_mask)
{
// 80 cols
@@ -77,9 +79,17 @@ void rm380z_state::config_videomode()
m_videomode = RM380Z_VIDEOMODE_40COL;
}
- if (m_old_videomode != m_videomode)
+ if (m_videomode != old_mode)
{
- m_old_videomode = m_videomode;
+ if (m_videomode == RM380Z_VIDEOMODE_80COL)
+ {
+ m_screen->set_size(640, 240);
+ }
+ else
+ {
+ m_screen->set_size(320, 240);
+ }
+ m_screen->set_visarea_full();
}
}
@@ -93,8 +103,8 @@ void rm380z_state::config_videomode()
void rm380z_state::decode_videoram_char(int row, int col, uint8_t& chr, uint8_t &attrib)
{
- uint8_t ch1 = m_vramchars[row][col];
- uint8_t ch2 = m_vramattribs[row][col];
+ uint8_t ch1 = m_vram.get_char(row, col);
+ uint8_t ch2 = m_vram.get_attrib(row, col);
// "special" (unknown) cases first
if ((ch1 == 0x80) && (ch2 == 0x04))
@@ -111,13 +121,6 @@ void rm380z_state::decode_videoram_char(int row, int col, uint8_t& chr, uint8_t
attrib = 8;
return;
}
- else if ((ch1 == 0) && (ch2 == 0))
- {
- // delete char (?)
- chr = 0x20;
- attrib = 0;
- return;
- }
else if ((ch1 == 4) && (ch2 == 4))
{
// reversed cursor?
@@ -141,37 +144,6 @@ void rm380z_state::decode_videoram_char(int row, int col, uint8_t& chr, uint8_t
}
}
-void rm380z_state::scroll_videoram()
-{
- // scroll up one row of videoram
- std::memmove(m_vramchars, m_vramchars[1], (RM380Z_SCREENROWS - 1) * RM380Z_SCREENCOLS);
- std::memmove(m_vramattribs, m_vramattribs[1], (RM380Z_SCREENROWS - 1) * RM380Z_SCREENCOLS);
-
- // the last line is filled with spaces
- std::memset(m_vramchars[RM380Z_SCREENROWS - 1], 0x20, RM380Z_SCREENCOLS);
- std::memset(m_vramattribs[RM380Z_SCREENROWS - 1], 0x00, RM380Z_SCREENCOLS);
-}
-
-void rm380z_state::check_scroll_register()
-{
- const uint8_t r[3] = { m_old_old_fbfd, m_old_fbfd, m_fbfd };
-
- if (!(r[1] & 0x20) && !(r[2] & 0x20))
- {
- // it's a scroll command
-
- if (r[2] > r[1])
- {
- scroll_videoram();
- }
- else if (!r[2] && (r[1] == 0x17))
- {
- // wrap-scroll
- scroll_videoram();
- }
- }
-}
-
// after ctrl-L (clear screen?): routine at EBBD is executed
// EB30??? next line?
// memory at FF02 seems to hold the line counter (same as FBFD)
@@ -189,11 +161,11 @@ void rm380z_state::videoram_write(offs_t offset, uint8_t data)
// fbfc 6th bit set=attribute, unset=char
if (m_port0 & 0x40)
{
- m_vramattribs[row][col] = data;
+ m_vram.set_attrib(row, col, data);
}
else
{
- m_vramchars[row][col] = data;
+ m_vram.set_char(row, col, data);
}
}
// else out of bounds write had no effect (see VTOUT description in firmware guide)
@@ -206,149 +178,86 @@ uint8_t rm380z_state::videoram_read(offs_t offset)
{
if (m_port0 & 0x40)
{
- return m_vramattribs[row][col];
+ return m_vram.get_attrib(row, col);
}
else
{
- return m_vramchars[row][col];
+ return m_vram.get_char(row, col);
}
}
return 0; // return 0 if out of bounds (see VTIN description in firmware guide)
}
-void rm380z_state::putChar(int charnum, int attribs, int x, int y, bitmap_ind16 &bitmap, int vmode)
+void rm380z_state::putChar_vdu80(int charnum, int attribs, int x, int y, bitmap_ind16 &bitmap)
{
const bool attrUnder = attribs & 0x02;
- //const bool attrDim = attribs & 0x04;
const bool attrRev = attribs & 0x08;
+
+ int data_pos = (charnum % 128) * 16;
- if ((charnum > 0) && (charnum <= 0x7f))
+ for (int r=0; r < 10; r++, data_pos++)
{
- // normal chars (base set)
+ uint8_t data;
- if (vmode==RM380Z_VIDEOMODE_80COL)
+ if (attrUnder && (r == 8))
{
- int basex=RM380Z_CHDIMX*(charnum/RM380Z_NCY);
- int basey=RM380Z_CHDIMY*(charnum%RM380Z_NCY);
-
- for (int r=0;r 0) && (charnum <= 0x7f))
{
- // graphic chars: 0x80-0xbf is "dimmed", 0xc0-0xff is full bright
- if (vmode==RM380Z_VIDEOMODE_80COL)
+ // normal chars (base set)
+ int basex=RM380Z_CHDIMX*(charnum/RM380Z_NCY);
+ int basey=RM380Z_CHDIMY*(charnum%RM380Z_NCY);
+
+ for (int r=0;rwrite_dword(d, memory_space->read_dword(s));
+ space(AS_PCI_MEMORY).write_dword(d, space(AS_PCI_MEMORY).read_dword(s));
s += 4;
d += 4;
l--;
@@ -123,7 +122,7 @@ void sega_315_6154_device::registers_w(offs_t offset, u32 data, u32 mem_mask)
}
template
-u32 sega_315_6154_device::aperture_r(address_space &space, offs_t offset, u32 mem_mask)
+u32 sega_315_6154_device::aperture_r(offs_t offset, u32 mem_mask)
{
const u32 destination_offset = offset & 0x3fffff;
const int destination = (offset >> 22) & 3;
@@ -133,15 +132,15 @@ u32 sega_315_6154_device::aperture_r(address_space &space, offs_t offset, u32 me
return m_configuration->read_dword(destination_offset << 2, mem_mask);
if ((Aperture == 1) && (destination == 0) && (m_useconfig_18x == true))
return m_configuration->read_dword(destination_offset << 2, mem_mask);
- return memory_space->read_dword(m_bases[index] + (destination_offset << 2), mem_mask);
+ return space(AS_PCI_MEMORY).read_dword(m_bases[index] + (destination_offset << 2), mem_mask);
}
-template u32 sega_315_6154_device::aperture_r<0>(address_space &space, offs_t offset, u32 mem_mask);
-template u32 sega_315_6154_device::aperture_r<1>(address_space &space, offs_t offset, u32 mem_mask);
-template u32 sega_315_6154_device::aperture_r<2>(address_space &space, offs_t offset, u32 mem_mask);
+template u32 sega_315_6154_device::aperture_r<0>(offs_t offset, u32 mem_mask);
+template u32 sega_315_6154_device::aperture_r<1>(offs_t offset, u32 mem_mask);
+template u32 sega_315_6154_device::aperture_r<2>(offs_t offset, u32 mem_mask);
template
-void sega_315_6154_device::aperture_w(address_space &space, offs_t offset, u32 data, u32 mem_mask)
+void sega_315_6154_device::aperture_w(offs_t offset, u32 data, u32 mem_mask)
{
const u32 destination_offset = offset & 0x3fffff;
const int destination = (offset >> 22) & 3;
@@ -157,9 +156,9 @@ void sega_315_6154_device::aperture_w(address_space &space, offs_t offset, u32 d
m_configuration->write_dword(destination_offset << 2, data, mem_mask);
return;
}
- memory_space->write_dword(m_bases[index] + (destination_offset << 2), data, mem_mask);
+ space(AS_PCI_MEMORY).write_dword(m_bases[index] + (destination_offset << 2), data, mem_mask);
}
-template void sega_315_6154_device::aperture_w<0>(address_space &space, offs_t offset, u32 data, u32 mem_mask);
-template void sega_315_6154_device::aperture_w<1>(address_space &space, offs_t offset, u32 data, u32 mem_mask);
-template void sega_315_6154_device::aperture_w<2>(address_space &space, offs_t offset, u32 data, u32 mem_mask);
+template void sega_315_6154_device::aperture_w<0>(offs_t offset, u32 data, u32 mem_mask);
+template void sega_315_6154_device::aperture_w<1>(offs_t offset, u32 data, u32 mem_mask);
+template void sega_315_6154_device::aperture_w<2>(offs_t offset, u32 data, u32 mem_mask);
diff --git a/src/mame/sega/315-6154.h b/src/mame/sega/315-6154.h
index 1dcd6c9e83a..0f036be5636 100644
--- a/src/mame/sega/315-6154.h
+++ b/src/mame/sega/315-6154.h
@@ -14,14 +14,13 @@ class sega_315_6154_device : public pci_host_device
public:
// construction/destruction
sega_315_6154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- address_space *memory() { return memory_space; }
u32 registers_r(offs_t offset);
void registers_w(offs_t offset, u32 data, u32 mem_mask = 0xffffffff);
template
- u32 aperture_r(address_space &space, offs_t offset, u32 mem_mask = 0xffffffff);
+ u32 aperture_r(offs_t offset, u32 mem_mask = 0xffffffff);
template
- void aperture_w(address_space &space, offs_t offset, u32 data, u32 mem_mask = 0xffffffff);
+ void aperture_w(offs_t offset, u32 data, u32 mem_mask = 0xffffffff);
enum {
AS_PCI_MEMORY = 1
diff --git a/src/mame/sega/naomigd.cpp b/src/mame/sega/naomigd.cpp
index 77cb4048087..f3baf0e341a 100644
--- a/src/mame/sega/naomigd.cpp
+++ b/src/mame/sega/naomigd.cpp
@@ -700,12 +700,12 @@ void naomi_gdrom_board::sh4_control_w(uint32_t data)
dimm_control = data;
if (dimm_control & 2)
{
- m_315_6154->memory()->unmap_readwrite(0x10000000, 0x10000000 + dimm_data_size - 1);
+ space_6154->unmap_readwrite(0x10000000, 0x10000000 + dimm_data_size - 1);
logerror("Activated 'load mode register' command mode\n");
}
else
{
- m_315_6154->memory()->install_ram(0x10000000, 0x10000000 + dimm_data_size - 1, dimm_des_data.get());
+ space_6154->install_ram(0x10000000, 0x10000000 + dimm_data_size - 1, dimm_des_data.get());
}
if (((old & 1) == 0) && ((dimm_control & 1) == 1))
set_reset_out();
@@ -1036,7 +1036,7 @@ void naomi_gdrom_board::device_reset()
dimm_offsetl = 0;
dimm_parameterl = 0;
dimm_parameterh = 0;
- m_315_6154->memory()->install_ram(0x10000000, 0x10000000 + dimm_data_size - 1, dimm_des_data.get());
+ space_6154->install_ram(0x10000000, 0x10000000 + dimm_data_size - 1, dimm_des_data.get());
if (work_mode == 2) // invalidate dimm memory contents by setting the first 2048 bytes to 0
memset(dimm_des_data.get(), 0, 2048);
}
@@ -1044,7 +1044,7 @@ void naomi_gdrom_board::device_reset()
{
m_maincpu->set_disable();
m_securitycpu->set_disable();
- m_315_6154->memory()->unmap_readwrite(0x10000000, 0x10000000 + dimm_data_size - 1);
+ space_6154->unmap_readwrite(0x10000000, 0x10000000 + dimm_data_size - 1);
}
dimm_cur_address = 0;
diff --git a/src/mame/sfrj/idpart_video.cpp b/src/mame/sfrj/idpart_video.cpp
new file mode 100644
index 00000000000..8df20ba7a6f
--- /dev/null
+++ b/src/mame/sfrj/idpart_video.cpp
@@ -0,0 +1,232 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+
+#include "emu.h"
+#include "idpart_video.h"
+
+#include "cpu/i8085/i8085.h"
+#include "machine/i8257.h"
+#include "machine/pit8253.h"
+#include "machine/z80sio.h"
+#include "video/i8275.h"
+
+#include "emupal.h"
+#include "screen.h"
+
+namespace {
+
+class idpart_video_device : public device_t, public device_rs232_port_interface
+{
+public:
+ idpart_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, IDPART_VIDEO, tag, owner, clock)
+ , device_rs232_port_interface(mconfig, *this)
+ , m_maincpu(*this, "maincpu")
+ , m_mpsc(*this, "mpsc")
+ , m_serial(*this, "serial")
+ , m_dma(*this, "dma")
+ , m_pit(*this, "pit")
+ , m_crtc(*this, "crtc")
+ , m_palette(*this, "palette")
+ , m_chargen(*this, "chargen")
+ , m_dreq0(0)
+ , m_dack0(0)
+ {
+ }
+
+ virtual void input_txd(int state) override { m_mpsc->rxa_w(state); }
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual ioport_constructor device_input_ports() const override;
+
+private:
+ void io_map(address_map &map);
+ void mem_map(address_map &map);
+ I8275_DRAW_CHARACTER_MEMBER(display_pixels);
+
+ uint8_t memory_read_byte(offs_t offset) { return m_program.read_byte(offset); }
+ void memory_write_byte(offs_t offset, uint8_t data) { m_program.write_byte(offset, data); }
+ u8 fast_zero_r(offs_t offset) { return 0; }
+ void dreq0_w(int state) { m_dreq0 = state; }
+ int dreq0_r() { return m_dreq0; }
+ void dack0_w(int state) { m_dack0 = state; }
+ void tc_w(int state) { if (!m_dack0) m_maincpu->set_input_line(I8085_RST75_LINE, state);}
+
+ required_device m_maincpu;
+ required_device m_mpsc;
+ required_device m_serial;
+ required_device m_dma;
+ required_device m_pit;
+ required_device m_crtc;
+ required_device m_palette;
+ required_region_ptr m_chargen;
+ memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program;
+ int m_dreq0;
+ int m_dack0;
+};
+
+
+/* Memory maps */
+void idpart_video_device::mem_map(address_map &map)
+{
+ map.unmap_value_high();
+ map(0x0000, 0x0fff).mirror(0x4000).rom().region("maincpu", 0);
+ map(0x8000, 0x8bff).mirror(0x6000).ram();
+}
+
+void idpart_video_device::io_map(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0xff);
+ map(0x00, 0x01).mirror(0x0e).rw(m_crtc, FUNC(i8275_device::read), FUNC(i8275_device::write));
+ map(0x10, 0x13).mirror(0x0c).rw(m_mpsc, FUNC(i8274_device::cd_ba_r), FUNC(i8274_device::cd_ba_w));
+ map(0x20, 0x2f).rw(m_dma, FUNC(i8257_device::read), FUNC(i8257_device::write));
+ map(0x30, 0x33).mirror(0x0c).rw(m_pit, FUNC(pit8254_device::read), FUNC(pit8254_device::write));
+}
+
+/* F4 Character Displayer */
+static const gfx_layout charlayout =
+{
+ 8, 8, /* 8 x 8 characters */
+ 128, /* 128 characters */
+ 1, /* 1 bits per pixel */
+ { 0 }, /* no bitplanes */
+ /* x offsets */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ /* y offsets */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8*8 /* every char takes 16 bytes */
+};
+
+static GFXDECODE_START( gfx_idpart_video )
+ GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 )
+GFXDECODE_END
+
+I8275_DRAW_CHARACTER_MEMBER(idpart_video_device::display_pixels)
+{
+ using namespace i8275_attributes;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ u8 pixels = m_chargen[(linecount & 7) + (charcode << 3)];
+ if (BIT(attrcode, VSP))
+ pixels = 0;
+
+ if (BIT(attrcode, LTEN))
+ pixels = 0xff;
+
+ if (BIT(attrcode, RVV))
+ pixels ^= 0xff;
+ bool hlgt = BIT(attrcode, HLGT);
+ for (u8 i = 0; i < 7; i++)
+ bitmap.pix(y, x + i) = palette[((pixels >> (7-i)) & 1) ? (hlgt ? 2 : 1) : 0];
+}
+
+static DEVICE_INPUT_DEFAULTS_START(keyboard)
+ DEVICE_INPUT_DEFAULTS("RS232_TXBAUD", 0xff, RS232_BAUD_300)
+DEVICE_INPUT_DEFAULTS_END
+
+void idpart_video_device::device_add_mconfig(machine_config &config)
+{
+ /* basic machine hardware */
+ I8085A(config, m_maincpu, XTAL(6'144'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &idpart_video_device::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &idpart_video_device::io_map);
+ m_maincpu->in_sid_func().set(*this, FUNC(idpart_video_device::dreq0_r));
+
+ PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT);
+ GFXDECODE(config, "gfxdecode", "palette", gfx_idpart_video);
+
+ RS232_PORT(config, m_serial, default_rs232_devices, nullptr);
+ m_serial->rxd_handler().set(m_mpsc, FUNC(z80sio_device::rxb_w));
+ m_serial->set_default_option("keyboard");
+ m_serial->set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard));
+
+ I8274(config, m_mpsc, XTAL(6'144'000) / 2);
+ m_mpsc->out_txdrqa_callback().set(m_dma, FUNC(i8257_device::dreq2_w));
+ m_mpsc->out_rxdrqa_callback().set(m_dma, FUNC(i8257_device::dreq3_w));
+ m_mpsc->out_txda_callback().set(*this, FUNC(idpart_video_device::output_rxd));
+ m_mpsc->out_txdb_callback().set(m_serial, FUNC(rs232_port_device::write_txd));
+ m_mpsc->out_int_callback().set_inputline(m_maincpu, I8085_RST65_LINE);
+
+ I8257(config, m_dma, XTAL(6'144'000) / 2);
+ m_dma->out_hrq_cb().set_inputline(m_maincpu, INPUT_LINE_HALT);
+ m_dma->out_hrq_cb().append(m_dma, FUNC(i8257_device::hlda_w));
+ m_dma->in_memr_cb().set(FUNC(idpart_video_device::memory_read_byte));
+ m_dma->out_memw_cb().set(FUNC(idpart_video_device::memory_write_byte));
+ m_dma->out_tc_cb().set(*this, FUNC(idpart_video_device::tc_w));
+ m_dma->out_iow_cb<0>().set(m_crtc, FUNC(i8275_device::dack_w));
+ m_dma->out_dack_cb<0>().set(*this, FUNC(idpart_video_device::dack0_w));
+ m_dma->in_ior_cb<1>().set(*this, FUNC(idpart_video_device::fast_zero_r));
+ m_dma->in_ior_cb<2>().set(m_mpsc, FUNC(i8274_device::da_r));
+ m_dma->out_iow_cb<3>().set(m_mpsc, FUNC(i8274_device::da_w));
+
+ // PIT
+ PIT8254(config, m_pit, 0);
+ m_pit->set_clk<0>(XTAL(6'144'000) / 2);
+ m_pit->set_clk<1>(XTAL(6'144'000) / 2);
+ m_pit->set_clk<2>(XTAL(6'144'000) / 2);
+ m_pit->out_handler<0>().set(m_mpsc, FUNC(i8274_device::txca_w));
+ m_pit->out_handler<0>().append(m_mpsc, FUNC(i8274_device::rxca_w));
+ m_pit->out_handler<1>().set(m_mpsc, FUNC(i8274_device::txcb_w));
+ m_pit->out_handler<1>().append(m_mpsc, FUNC(i8274_device::rxcb_w));
+
+ /* video hardware */
+ I8275(config, m_crtc, XTAL(22'680'000) / 2 / 7);
+ m_crtc->set_character_width(7);
+ m_crtc->set_display_callback(FUNC(idpart_video_device::display_pixels));
+ m_crtc->set_screen("screen");
+ m_crtc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq0_w));
+ m_crtc->drq_wr_callback().append(*this, FUNC(idpart_video_device::dreq0_w));
+ m_crtc->irq_wr_callback().set_inputline(m_maincpu, I8085_RST55_LINE);
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(22'680'000) / 2, 728, 0, 560, 310, 0, 270);
+ screen.set_screen_update(m_crtc, FUNC(i8275_device::screen_update));
+}
+
+INPUT_PORTS_START(idpart_video)
+INPUT_PORTS_END
+
+ioport_constructor idpart_video_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(idpart_video);
+}
+
+ROM_START(idpart_video)
+ ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASEFF )
+ ROM_LOAD( "video.e34", 0x0000, 0x0800, CRC(67e2c351) SHA1(1ca86b1b35d9a213db0c3f291dc839fc3621269c))
+ ROM_REGION( 0x0800, "chargen",0 )
+ ROM_LOAD( "video.e4", 0x0000, 0x0800, CRC(5fe52e0d) SHA1(c6067e3fdda84e673aaa74ae6561b535157a8281))
+ROM_END
+
+const tiny_rom_entry *idpart_video_device::device_rom_region() const
+{
+ return ROM_NAME( idpart_video );
+}
+
+void idpart_video_device::device_start()
+{
+ m_maincpu->space(AS_PROGRAM).specific(m_program);
+ save_item(NAME(m_dack0));
+ save_item(NAME(m_dreq0));
+}
+
+void idpart_video_device::device_reset()
+{
+ m_dma->dreq1_w(1);
+
+ output_rxd(1);
+
+ output_dcd(0);
+ output_dsr(0);
+ output_cts(0);
+ m_dack0 = 0;
+ m_dreq0 = 0;
+}
+
+} // anonymous namespace
+
+DEFINE_DEVICE_TYPE_PRIVATE(IDPART_VIDEO, device_rs232_port_interface, idpart_video_device, "idpart_video", "Iskra Delta Partner Video (Text) Board")
diff --git a/src/mame/sfrj/idpart_video.h b/src/mame/sfrj/idpart_video.h
new file mode 100644
index 00000000000..5022424ac3e
--- /dev/null
+++ b/src/mame/sfrj/idpart_video.h
@@ -0,0 +1,13 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+
+#ifndef MAME_SFRJ_IDPART_VIDEO_H
+#define MAME_SFRJ_IDPART_VIDEO_H
+
+#pragma once
+
+#include "bus/rs232/rs232.h"
+
+DECLARE_DEVICE_TYPE(IDPART_VIDEO, device_rs232_port_interface)
+
+#endif // MAME_SFRJ_IDPART_VIDEO_H
diff --git a/src/mame/sfrj/idpartner.cpp b/src/mame/sfrj/idpartner.cpp
index 43e2d7cdee9..97da7249790 100644
--- a/src/mame/sfrj/idpartner.cpp
+++ b/src/mame/sfrj/idpartner.cpp
@@ -18,6 +18,8 @@
#include "emu.h"
+#include "idpart_video.h"
+
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "formats/idpart_dsk.h"
@@ -87,17 +89,17 @@ void idpartner_floppy_daisy_device::device_reset()
int idpartner_floppy_daisy_device::z80daisy_irq_state()
{
- if (m_int)
- return Z80_DAISY_INT;
- else if (m_ius)
+ if (m_int)
+ return Z80_DAISY_INT;
+ else if (m_ius)
return Z80_DAISY_IEO;
else
- return 0;
+ return 0;
}
int idpartner_floppy_daisy_device::z80daisy_irq_ack()
-{
- if (m_int) {
+{
+ if (m_int) {
int_w(CLEAR_LINE);
m_ius = true;
return m_vector;
@@ -106,7 +108,7 @@ int idpartner_floppy_daisy_device::z80daisy_irq_ack()
}
void idpartner_floppy_daisy_device::z80daisy_irq_reti()
-{
+{
if (m_ius)
m_ius = false;
}
@@ -281,7 +283,7 @@ void idpartner_state::io_map(address_map &map)
map(0x90,0x97).rw(FUNC(idpartner_state::bank2_r), FUNC(idpartner_state::bank2_w)); // RAM bank 2
map(0x98,0x9f).rw(FUNC(idpartner_state::floppy_motor_r), FUNC(idpartner_state::floppy_motor_w)); // floppy motors
map(0xa0,0xbf).rw(m_rtc, FUNC(mm58167_device::read), FUNC(mm58167_device::write));
- map(0xc0,0xc7).rw(m_dma, FUNC(z80dma_device::read), FUNC(z80dma_device::write));
+ map(0xc0,0xc7).rw(m_dma, FUNC(z80dma_device::read), FUNC(z80dma_device::write));
map(0xc8,0xcb).mirror(0x04).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); // CTC - A2 not connected
map(0xd0,0xd3).mirror(0x04).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt));
map(0xd8,0xdb).mirror(0x04).rw(m_sio1, FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)); // SIO1 - A2 not connected
@@ -332,14 +334,17 @@ void idpartner_state::write_f1_clock(int state)
m_sio2->rxcb_w(state);
}
-static DEVICE_INPUT_DEFAULTS_START( terminal )
- DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
- DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
- DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
- DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
- DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
+static DEVICE_INPUT_DEFAULTS_START(keyboard)
+ DEVICE_INPUT_DEFAULTS("RS232_TXBAUD", 0xff, RS232_BAUD_300)
DEVICE_INPUT_DEFAULTS_END
+
+void partner_rs232_devices(device_slot_interface &device)
+{
+ default_rs232_devices(device);
+ device.option_add("idpart_video", IDPART_VIDEO);
+}
+
/* Machine driver */
void idpartner_state::partner_base(machine_config &config)
{
@@ -357,10 +362,9 @@ void idpartner_state::partner_base(machine_config &config)
MC14411(config, m_brg, XTAL(1'843'200));
m_brg->rsa_w(0);
m_brg->rsb_w(1);
- m_brg->out_f<1>().set(FUNC(idpartner_state::write_f1_clock));
m_brg->out_f<13>().set(m_ctc, FUNC(z80ctc_device::trg0)); // signal XX1
- RS232_PORT(config, m_serial[0], default_rs232_devices, nullptr);
+ RS232_PORT(config, m_serial[0], partner_rs232_devices, nullptr);
m_serial[0]->rxd_handler().set(m_sio1, FUNC(z80sio_device::rxa_w));
RS232_PORT(config, m_serial[1], default_rs232_devices, nullptr);
@@ -394,16 +398,15 @@ void idpartner_state::partner_base(machine_config &config)
IDPARTNER_FLOPPY_DAISY(config, m_fdc_daisy);
m_fdc_daisy->int_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- I8272A(config, m_fdc, XTAL(8'000'000) / 2, false);
+ I8272A(config, m_fdc, XTAL(8'000'000), false);
m_fdc->intrq_wr_callback().set(m_fdc_daisy, FUNC(idpartner_floppy_daisy_device::int_w));
m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w));
- m_fdc->ready_w(false);
FLOPPY_CONNECTOR(config, m_floppy[0], partner_floppies, "fdd", partner_floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, m_floppy[1], partner_floppies, nullptr, partner_floppy_formats).enable_sound(true);
MM58167(config, m_rtc, XTAL(32'768));
- Z80PIO(config, m_pio, XTAL(8'000'000) / 2);
+ Z80PIO(config, m_pio, XTAL(8'000'000) / 2);
m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
// There is one bus connector J2, but cable goes to up to two devices
@@ -411,6 +414,7 @@ void idpartner_state::partner_base(machine_config &config)
m_bus->set_io_space(m_maincpu, AS_IO);
m_bus->int_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_bus->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_bus->drq_handler().set(m_dma, FUNC(z80dma_device::rdy_w));
IDPARTNER_BUS_CONNECTOR(config, m_conn[0], m_bus, idpartner_exp_devices, nullptr);
IDPARTNER_BUS_CONNECTOR(config, m_conn[1], m_bus, idpartner_exp_devices, nullptr);
}
@@ -419,15 +423,21 @@ void idpartner_state::partnerw(machine_config &config)
{
partner_base(config);
- m_serial[0]->set_default_option("terminal");
- m_serial[0]->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // must be below the DEVICE_INPUT_DEFAULTS_START block
+ m_brg->out_f<1>().set(FUNC(idpartner_state::write_f1_clock));
+
+ m_serial[0]->set_default_option("idpart_video");
+
+ m_conn[1]->set_default_option("sasi");
}
void idpartner_state::partner1fg(machine_config &config)
{
partner_base(config);
+ m_brg->out_f<9>().set(FUNC(idpartner_state::write_f1_clock));
+
m_serial[0]->set_default_option("keyboard");
+ m_serial[0]->set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard));
m_conn[0]->set_default_option("gdp");
}
@@ -436,9 +446,13 @@ void idpartner_state::partnerwfg(machine_config &config)
{
partner_base(config);
+ m_brg->out_f<9>().set(FUNC(idpartner_state::write_f1_clock));
+
m_serial[0]->set_default_option("keyboard");
+ m_serial[0]->set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard));
m_conn[0]->set_default_option("gdp");
+ m_conn[1]->set_default_option("sasi");
}
/* ROM definition */
diff --git a/src/mame/shared/xbox_pci.cpp b/src/mame/shared/xbox_pci.cpp
index ba218745e98..3b850664acf 100644
--- a/src/mame/shared/xbox_pci.cpp
+++ b/src/mame/shared/xbox_pci.cpp
@@ -39,8 +39,7 @@ void nv2a_host_device::map_extra(uint64_t memory_window_start, uint64_t memory_w
void nv2a_host_device::device_start()
{
pci_host_device::device_start();
- memory_space = &cpu->space(AS_PROGRAM);
- io_space = &cpu->space(AS_IO);
+ set_spaces(&cpu->space(AS_PROGRAM), &cpu->space(AS_IO));
// do not change the next two
memory_window_start = 0x10000000;
diff --git a/src/mame/skeleton/qmsirius.cpp b/src/mame/skeleton/qmsirius.cpp
new file mode 100644
index 00000000000..c19daf65142
--- /dev/null
+++ b/src/mame/skeleton/qmsirius.cpp
@@ -0,0 +1,95 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ Skeleton driver for Quasimidi Sirius keyboard and Rave-O-Lution module.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/mcs51/mcs51.h"
+#include "video/hd44780.h"
+#include "emupal.h"
+#include "screen.h"
+
+namespace {
+
+class qmsirius_state : public driver_device
+{
+public:
+ qmsirius_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ {
+ }
+
+ void qmsirius(machine_config &config);
+
+private:
+ HD44780_PIXEL_UPDATE(lcd_pixel_update);
+
+ void prog_map(address_map &map);
+ void ext_map(address_map &map);
+
+ required_device m_maincpu;
+};
+
+HD44780_PIXEL_UPDATE(qmsirius_state::lcd_pixel_update)
+{
+ if (x < 5 && y < 8 && line < 2 && pos < 16)
+ bitmap.pix(line * 8 + y, pos * 6 + x) = state;
+}
+
+void qmsirius_state::prog_map(address_map &map)
+{
+ map(0x0000, 0xffff).rom().region("program", 0);
+}
+
+void qmsirius_state::ext_map(address_map &map)
+{
+ map(0x8000, 0x8001).w("lcdc", FUNC(hd44780_device::write));
+ map(0x8002, 0x8003).r("lcdc", FUNC(hd44780_device::read));
+}
+
+static INPUT_PORTS_START(qmsirius)
+INPUT_PORTS_END
+
+void qmsirius_state::qmsirius(machine_config &config)
+{
+ P80C552(config, m_maincpu, 12'000'000); // type guessed; clock unknown
+ m_maincpu->set_addrmap(AS_PROGRAM, &qmsirius_state::prog_map);
+ m_maincpu->set_addrmap(AS_IO, &qmsirius_state::ext_map);
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
+ screen.set_size(6*16, 8*2);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED);
+
+ hd44780_device &lcdc(HD44780(config, "lcdc", 270'000)); // TODO: clock not measured, datasheet typical clock used
+ lcdc.set_lcd_size(2, 16);
+ lcdc.set_pixel_update_cb(FUNC(qmsirius_state::lcd_pixel_update));
+}
+
+ROM_START(qmsirius)
+ ROM_REGION(0x80000, "program", 0)
+ ROM_DEFAULT_BIOS("v205a")
+ ROM_SYSTEM_BIOS(0, "v205a", "Version No. 2.05a")
+ ROMX_LOAD("siriusv205a.bin", 0x00000, 0x80000, CRC(3e974cec) SHA1(d44dca58717f89c6eabcf329a39014df1dea215c), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS(1, "v203", "Version No. 2.03")
+ ROMX_LOAD("siriusv203.bin", 0x00000, 0x80000, CRC(34e08d49) SHA1(fc50b9f89d66eddd0aac4ffc2447ee4be7cc41f6), ROM_BIOS(1)) // TMS27C040-12
+ROM_END
+
+ROM_START(qmrave)
+ ROM_REGION(0x80000, "program", 0)
+ ROM_LOAD("quasimidi raveolution 309 os v2.0e.bin", 0x00000, 0x80000, CRC(b0872f0b) SHA1(db71b3654981ef82eeaa2c999453824ea7d2676e))
+ROM_END
+
+} // anonymous namespace
+
+SYST(1998, qmsirius, 0, 0, qmsirius, qmsirius, qmsirius_state, empty_init, "Quasimidi Musikelektronik GmbH", "Quasimidi Sirius", MACHINE_IS_SKELETON)
+SYST(1996, qmrave, 0, 0, qmsirius, qmsirius, qmsirius_state, empty_init, "Quasimidi Musikelektronik GmbH", "Rave-O-Lution 309", MACHINE_IS_SKELETON)
diff --git a/src/mame/subsino/lastfght.cpp b/src/mame/subsino/lastfght.cpp
index 1b022e70bae..aed6d6de575 100644
--- a/src/mame/subsino/lastfght.cpp
+++ b/src/mame/subsino/lastfght.cpp
@@ -557,7 +557,7 @@ void lastfght_state::lastfght(machine_config &config)
io.in_port_callback<7>().set_ioport("PROT");
io.out_port_callback<7>().set(FUNC(lastfght_state::c00007_w));
- DS2430A(config, m_eeprom).set_timing_scale(0.16);
+ DS2430A(config, m_eeprom).set_timing_scale(0.32);
/* video hardware */
PALETTE(config, m_palette).set_entries(256);
diff --git a/src/mame/subsino/subsino2.cpp b/src/mame/subsino/subsino2.cpp
index 3a5043b9c8a..4ea98aa951c 100644
--- a/src/mame/subsino/subsino2.cpp
+++ b/src/mame/subsino/subsino2.cpp
@@ -2777,7 +2777,7 @@ void subsino2_state::bishjan(machine_config &config)
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
- DS2430A(config, m_eeprom).set_timing_scale(0.12);
+ DS2430A(config, m_eeprom).set_timing_scale(0.24);
// video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -2831,7 +2831,7 @@ void subsino2_state::humlan(machine_config &config)
io.out_port_callback<9>().set(FUNC(subsino2_state::humlan_output1_w));
io.in_port_callback<9>().set_constant(0);
- m_eeprom->set_timing_scale(0.16);
+ m_eeprom->set_timing_scale(0.32);
// sound hardware
// SS9804
diff --git a/src/mame/taito/taitopjc.cpp b/src/mame/taito/taitopjc.cpp
index e0b8d58f73a..9b0d09013b6 100644
--- a/src/mame/taito/taitopjc.cpp
+++ b/src/mame/taito/taitopjc.cpp
@@ -42,7 +42,7 @@ POWER JC MOTHER-G PCB K11X0870A OPERATION TIGER
| | PQ80| | QFP84 | QS32X245 +----------+ | for | |e| filter board
| | QFP116| | | E63-07 | AMP | |c|
| +----------+ +----------+ +----------+ D4624456 | | |t|
-| | | +----------+ |e|
+| | | +----------+ |o|
| TMS418160 | Taito | D4624456 |r|
| IS61C256 E63-01 | TCO780PFA| +----------+ +-+
| TMS418160 | QFP240 | | | |
@@ -130,13 +130,13 @@ POWER JC DAUGHTER PCB K91E0717B OPERATION TIGER
| Taito E63-11 M66220 Taito E63-25 LC3564SM RESET |
| +-+
| |C|
-| * Taito E63-26 RTC6461A C5 |o|
+| * Taito E63-26 RTC64613A C5 |o|
| |n|
| |n| Connects to
| E63 30-1 E63 32-1 25.0000MHz |e| filter board
| +----------+ |c|
| |Toshiba | |t|
-| E63 31-1 E63 33-1 |TMP95C063F| |e|
+| E63 31-1 E63 33-1 |TMP95C063F| |o|
| +----------+ 1.84320MHz |r|
| +-+
| Taito E63-15 Taito E63-21 TLP121-4 |
diff --git a/src/mame/tecmo/gaiden.cpp b/src/mame/tecmo/gaiden.cpp
index 53d9f8784fa..c981f21ea2a 100644
--- a/src/mame/tecmo/gaiden.cpp
+++ b/src/mame/tecmo/gaiden.cpp
@@ -1267,7 +1267,7 @@ ROM_START( mastninj )
ROM_LOAD32_BYTE( "25.ic22", 0x040002, 0x10000, CRC(ca691635) SHA1(177f94a17cfaf67c764c2a2dff48475039207fae) )
ROM_LOAD32_BYTE( "27.ic20", 0x040003, 0x10000, CRC(2ae70f42) SHA1(aad89dbd0309a5e3a786aa028995b56859d5b5ff) )
- ROM_REGION( 0x100000, "sprites", ROMREGION_INVERT) /* these will need a further descramble to be in the same format as gaiden, although the sprites on the bootleg look different anyway */
+ ROM_REGION( 0x100000, "sprites", ROMREGION_INVERT) // these will need a further descramble to be in the same format as gaiden, although the sprites on the bootleg look different anyway
ROM_LOAD( "36.ic50", 0x000000, 0x10000, CRC(3c117e62) SHA1(dee45d6bbe053996e0b3faaba0293a273faf1ffa) )
ROM_LOAD( "37.ic49", 0x010000, 0x10000, CRC(f6d6422d) SHA1(933487b09d3bcff9714fb2469b3d751b38459cfd) )
ROM_LOAD( "38.ic48", 0x020000, 0x10000, CRC(642f06e7) SHA1(5b30b5029884b7eddcad201224a639f94ee27823) )
@@ -1291,151 +1291,178 @@ ROM_START( mastninj )
ROM_LOAD( "tibpal16l8.ic54", 0x000, 0x104, NO_DUMP )
ROM_END
-
-ROM_START( wildfang ) /* Dipswitch selectable title of Wild Fang or Tecmo Knight */
- ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
- ROM_LOAD16_BYTE( "1.3st", 0x00000, 0x20000, CRC(ab876c9b) SHA1(b02c822f107df4c9c4f0024998f225c1ddbbd496) )
- ROM_LOAD16_BYTE( "2.5st", 0x00001, 0x20000, CRC(1dc74b3b) SHA1(c99051ebefd6ce666b13ab56c0a10b188f15ec28) )
+ROM_START( wildfang ) // Dipswitch selectable title of Wild Fang or Tecmo Knight
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "1.3st", 0x00000, 0x20000, CRC(ab876c9b) SHA1(b02c822f107df4c9c4f0024998f225c1ddbbd496) )
+ ROM_LOAD16_BYTE( "2.5st", 0x00001, 0x20000, CRC(1dc74b3b) SHA1(c99051ebefd6ce666b13ab56c0a10b188f15ec28) )
ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "tkni3.bin", 0x0000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) /* Audio CPU is a Z80 */
+ ROM_LOAD( "tkni3.bin", 0x00000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) // Audio CPU is a Z80
- ROM_REGION( 0x0800, "mcu", 0 ) /* protection NEC D8749 */
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
ROM_LOAD( "a-6v.mcu", 0x00000, 0x0800, NO_DUMP )
ROM_REGION( 0x010000, "txtiles", 0 )
- ROM_LOAD( "tkni5.bin", 0x000000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) /* 8x8 tiles */
+ ROM_LOAD( "tkni5.bin", 0x00000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) // 8x8 tiles
ROM_REGION( 0x080000, "bgtiles", 0 )
- ROM_LOAD( "14.3a", 0x000000, 0x20000, CRC(0d20c10c) SHA1(209ca4e166d0b91ff99a338e135e5388af2c51f5) )
- ROM_LOAD( "15.3b", 0x020000, 0x20000, CRC(3f40a6b4) SHA1(7486ddfe4b0ac4198512548b74402f4194c804f1) )
- ROM_LOAD( "16.1a", 0x040000, 0x20000, CRC(0f31639e) SHA1(e150db4f617c5fcf505e5ca95d94073c1f6b7d0d) )
- ROM_LOAD( "17.1b", 0x060000, 0x20000, CRC(f32c158e) SHA1(2861754bda37e30799151b5ca73771937edf38a9) )
+ ROM_LOAD( "14.3a", 0x00000, 0x20000, CRC(0d20c10c) SHA1(209ca4e166d0b91ff99a338e135e5388af2c51f5) )
+ ROM_LOAD( "15.3b", 0x20000, 0x20000, CRC(3f40a6b4) SHA1(7486ddfe4b0ac4198512548b74402f4194c804f1) )
+ ROM_LOAD( "16.1a", 0x40000, 0x20000, CRC(0f31639e) SHA1(e150db4f617c5fcf505e5ca95d94073c1f6b7d0d) )
+ ROM_LOAD( "17.1b", 0x60000, 0x20000, CRC(f32c158e) SHA1(2861754bda37e30799151b5ca73771937edf38a9) )
ROM_REGION( 0x080000, "fgtiles", 0 )
- ROM_LOAD( "tkni6.bin", 0x000000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
+ ROM_LOAD( "tkni6.bin", 0x00000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
ROM_REGION( 0x100000, "sprites", 0 )
- ROM_LOAD16_BYTE( "tkni9.bin", 0x000000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) /* sprites */
- ROM_LOAD16_BYTE( "tkni8.bin", 0x000001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) /* sprites */
+ ROM_LOAD16_BYTE( "tkni9.bin", 0x00000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) // sprites
+ ROM_LOAD16_BYTE( "tkni8.bin", 0x00001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) // sprites
- ROM_REGION( 0x40000, "oki", 0 ) /* 128k for ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "tkni4.bin", 0x0000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) /* samples */
+ ROM_REGION( 0x40000, "oki", 0 ) // 128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "tkni4.bin", 0x00000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) // samples
ROM_END
-ROM_START( wildfangs ) /* Wild Fang - No title change option */
- ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
- ROM_LOAD16_BYTE( "1.3s", 0x00000, 0x20000, CRC(3421f691) SHA1(7829729e2007a53fc598db3ae3524b971cbf49e9) )
- ROM_LOAD16_BYTE( "2.5s", 0x00001, 0x20000, CRC(d3547708) SHA1(91cc0575b25fe15d668eec26dd74945c51ed67eb) )
+ROM_START( wildfangs ) // Wild Fang - No title change option
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "1.3s", 0x00000, 0x20000, CRC(3421f691) SHA1(7829729e2007a53fc598db3ae3524b971cbf49e9) )
+ ROM_LOAD16_BYTE( "2.5s", 0x00001, 0x20000, CRC(d3547708) SHA1(91cc0575b25fe15d668eec26dd74945c51ed67eb) )
ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "tkni3.bin", 0x0000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) /* Audio CPU is a Z80 */
+ ROM_LOAD( "tkni3.bin", 0x00000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) // Audio CPU is a Z80
- ROM_REGION( 0x0800, "mcu", 0 ) /* protection NEC D8749 */
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
ROM_LOAD( "a-6v.mcu", 0x00000, 0x0800, NO_DUMP )
ROM_REGION( 0x010000, "txtiles", 0 )
- ROM_LOAD( "tkni5.bin", 0x000000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) /* 8x8 tiles */
+ ROM_LOAD( "tkni5.bin", 0x00000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) // 8x8 tiles
ROM_REGION( 0x080000, "bgtiles", 0 )
- ROM_LOAD( "14.3a", 0x000000, 0x20000, CRC(0d20c10c) SHA1(209ca4e166d0b91ff99a338e135e5388af2c51f5) )
- ROM_LOAD( "15.3b", 0x020000, 0x20000, CRC(3f40a6b4) SHA1(7486ddfe4b0ac4198512548b74402f4194c804f1) )
- ROM_LOAD( "16.1a", 0x040000, 0x20000, CRC(0f31639e) SHA1(e150db4f617c5fcf505e5ca95d94073c1f6b7d0d) )
- ROM_LOAD( "17.1b", 0x060000, 0x20000, CRC(f32c158e) SHA1(2861754bda37e30799151b5ca73771937edf38a9) )
+ ROM_LOAD( "14.3a", 0x00000, 0x20000, CRC(0d20c10c) SHA1(209ca4e166d0b91ff99a338e135e5388af2c51f5) )
+ ROM_LOAD( "15.3b", 0x20000, 0x20000, CRC(3f40a6b4) SHA1(7486ddfe4b0ac4198512548b74402f4194c804f1) )
+ ROM_LOAD( "16.1a", 0x40000, 0x20000, CRC(0f31639e) SHA1(e150db4f617c5fcf505e5ca95d94073c1f6b7d0d) )
+ ROM_LOAD( "17.1b", 0x60000, 0x20000, CRC(f32c158e) SHA1(2861754bda37e30799151b5ca73771937edf38a9) )
ROM_REGION( 0x080000, "fgtiles", 0 )
- ROM_LOAD( "tkni6.bin", 0x000000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
+ ROM_LOAD( "tkni6.bin", 0x00000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
ROM_REGION( 0x100000, "sprites", 0 )
- ROM_LOAD16_BYTE( "tkni9.bin", 0x000000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) /* sprites */
- ROM_LOAD16_BYTE( "tkni8.bin", 0x000001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) /* sprites */
+ ROM_LOAD16_BYTE( "tkni9.bin", 0x00000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) // sprites
+ ROM_LOAD16_BYTE( "tkni8.bin", 0x00001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) // sprites
- ROM_REGION( 0x40000, "oki", 0 ) /* 128k for ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "tkni4.bin", 0x0000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) /* samples */
+ ROM_REGION( 0x40000, "oki", 0 ) // 128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "tkni4.bin", 0x00000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) // samples
ROM_END
-ROM_START( tknight ) /* Tecmo Knight - No title change option */
- ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
- ROM_LOAD16_BYTE( "tkni1.bin", 0x00000, 0x20000, CRC(9121daa8) SHA1(06ba7779602df8fae32e859371d27c0dbb8d3430) )
- ROM_LOAD16_BYTE( "tkni2.bin", 0x00001, 0x20000, CRC(6669cd87) SHA1(8888522a3aef76a979ffc80ba457dd49f279abf1) )
+ROM_START( tknight ) // Tecmo Knight - No title change option
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "tkni1.bin", 0x00000, 0x20000, CRC(9121daa8) SHA1(06ba7779602df8fae32e859371d27c0dbb8d3430) )
+ ROM_LOAD16_BYTE( "tkni2.bin", 0x00001, 0x20000, CRC(6669cd87) SHA1(8888522a3aef76a979ffc80ba457dd49f279abf1) )
ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "tkni3.bin", 0x0000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) /* Audio CPU is a Z80 */
+ ROM_LOAD( "tkni3.bin", 0x00000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) // Audio CPU is a Z80
- ROM_REGION( 0x0800, "mcu", 0 ) /* protection NEC D8749 */
- ROM_LOAD( "a-6v.mcu", 0x00000, 0x0800, NO_DUMP )
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
+ ROM_LOAD( "a-6v.mcu", 0x00000, 0x00800, NO_DUMP )
ROM_REGION( 0x010000, "txtiles", 0 )
- ROM_LOAD( "tkni5.bin", 0x000000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) /* 8x8 tiles */
+ ROM_LOAD( "tkni5.bin", 0x00000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) // 8x8 tiles
ROM_REGION( 0x080000, "bgtiles", 0 )
- ROM_LOAD( "tkni7.bin", 0x000000, 0x80000, CRC(4b4d4286) SHA1(d386aa223eb288ea829c98d3f39279a75dc66b71) )
+ ROM_LOAD( "tkni7.bin", 0x00000, 0x80000, CRC(4b4d4286) SHA1(d386aa223eb288ea829c98d3f39279a75dc66b71) )
ROM_REGION( 0x080000, "fgtiles", 0 )
- ROM_LOAD( "tkni6.bin", 0x000000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
+ ROM_LOAD( "tkni6.bin", 0x00000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
ROM_REGION( 0x100000, "sprites", 0 )
- ROM_LOAD16_BYTE( "tkni9.bin", 0x000000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) /* sprites */
- ROM_LOAD16_BYTE( "tkni8.bin", 0x000001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) /* sprites */
+ ROM_LOAD16_BYTE( "tkni9.bin", 0x00000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) // sprites
+ ROM_LOAD16_BYTE( "tkni8.bin", 0x00001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) // sprites
- ROM_REGION( 0x40000, "oki", 0 ) /* 128k for ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "tkni4.bin", 0x0000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) /* samples */
+ ROM_REGION( 0x40000, "oki", 0 ) // 128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "tkni4.bin", 0x00000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) // samples
+ROM_END
+
+ROM_START( wildfangh ) // Wild Fang - No title change option. Substantially different code to to wildfangs. Year hack?
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "wlf_91.3s", 0x00000, 0x20000, CRC(3421f691) SHA1(7829729e2007a53fc598db3ae3524b971cbf49e9) )
+ ROM_LOAD16_BYTE( "wlf_91.5s", 0x00001, 0x20000, CRC(37bf1b63) SHA1(91028c181fdc416d7c3bba927ffff0b4c0fb3e87) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "tkni3.bin", 0x00000, 0x10000, CRC(15623ec7) SHA1(db43fe6c417117d7cd90a26e12a52efb0e1a5ca6) ) // Audio CPU is a Z80
+
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
+ ROM_LOAD( "a-6v.mcu", 0x00000, 0x00800, NO_DUMP )
+
+ ROM_REGION( 0x010000, "txtiles", 0 )
+ ROM_LOAD( "tkni5.bin", 0x00000, 0x10000, CRC(5ed15896) SHA1(87bdddb26934af0b2c4e704e6d85c69a7531aeb1) ) // 8x8 tiles
+
+ ROM_REGION( 0x080000, "bgtiles", 0 )
+ ROM_LOAD( "tkni7.bin", 0x00000, 0x80000, CRC(4b4d4286) SHA1(d386aa223eb288ea829c98d3f39279a75dc66b71) )
+
+ ROM_REGION( 0x080000, "fgtiles", 0 )
+ ROM_LOAD( "tkni6.bin", 0x00000, 0x80000, CRC(f68fafb1) SHA1(aeca38eaea2f6dfc484e48ac1114c0c4abaafb9c) )
+
+ ROM_REGION( 0x100000, "sprites", 0 )
+ ROM_LOAD16_BYTE( "tkni9.bin", 0x00000, 0x80000, CRC(d22f4239) SHA1(360a9a821faabe911eef407ef85452d8b706538f) ) // sprites
+ ROM_LOAD16_BYTE( "tkni8.bin", 0x00001, 0x80000, CRC(4931b184) SHA1(864e827ac109c0ee52a898034c021cd5e92ff000) ) // sprites
+
+ ROM_REGION( 0x40000, "oki", 0 ) // 128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "tkni4.bin", 0x00000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) // samples
ROM_END
ROM_START( stratof )
ROM_REGION( 0x40000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "1.3s", 0x00000, 0x20000, CRC(060822a4) SHA1(82abf6ea64695d2f7b5934ad2487e857648aeecf) )
- ROM_LOAD16_BYTE( "2.4s", 0x00001, 0x20000, CRC(339358fa) SHA1(b662bccc2206ae888ea36f355d44bf98fcd2ee2c) )
+ ROM_LOAD16_BYTE( "1.3s", 0x00000, 0x20000, CRC(060822a4) SHA1(82abf6ea64695d2f7b5934ad2487e857648aeecf) )
+ ROM_LOAD16_BYTE( "2.4s", 0x00001, 0x20000, CRC(339358fa) SHA1(b662bccc2206ae888ea36f355d44bf98fcd2ee2c) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a-4b.3", 0x00000, 0x10000, CRC(18655c95) SHA1(8357e0520565a201bb930cadffc759463931ec41) )
- ROM_REGION( 0x0800, "mcu", 0 ) /* protection NEC D8749 */
- ROM_LOAD( "a-6v.mcu", 0x00000, 0x0800, NO_DUMP )
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
+ ROM_LOAD( "a-6v.mcu", 0x00000, 0x00800, NO_DUMP )
ROM_REGION( 0x10000, "txtiles", 0 )
ROM_LOAD( "b-7a.5", 0x00000, 0x10000, CRC(6d2e4bf1) SHA1(edcf96bbcc109da71e3adbb37d119254d3873b29) )
ROM_REGION( 0x100000, "bgtiles", 0 )
- ROM_LOAD( "b-1b", 0x00000, 0x80000, CRC(781d1bd2) SHA1(680d91ea02f1e9cb911501f595008f46ad77ded4) )
+ ROM_LOAD( "b-1b", 0x00000, 0x80000, CRC(781d1bd2) SHA1(680d91ea02f1e9cb911501f595008f46ad77ded4) )
ROM_REGION( 0x80000, "fgtiles", 0 )
- ROM_LOAD( "b-4b", 0x00000, 0x80000, CRC(89468b84) SHA1(af60fe957c98fa3f00623d420a0941a941f5bc6b) )
+ ROM_LOAD( "b-4b", 0x00000, 0x80000, CRC(89468b84) SHA1(af60fe957c98fa3f00623d420a0941a941f5bc6b) )
ROM_REGION( 0x100000, "sprites", 0 )
- ROM_LOAD16_BYTE( "b-2m", 0x00000, 0x80000, CRC(5794ec32) SHA1(07e78d8bcb2373da77ef9f8cde6a01f384f8bf7e) )
- ROM_LOAD16_BYTE( "b-1m", 0x00001, 0x80000, CRC(b0de0ded) SHA1(45c74d0c58e3e73c79e587722d9fea9f7ba9cb0a) )
+ ROM_LOAD16_BYTE( "b-2m", 0x00000, 0x80000, CRC(5794ec32) SHA1(07e78d8bcb2373da77ef9f8cde6a01f384f8bf7e) )
+ ROM_LOAD16_BYTE( "b-1m", 0x00001, 0x80000, CRC(b0de0ded) SHA1(45c74d0c58e3e73c79e587722d9fea9f7ba9cb0a) )
ROM_REGION( 0x40000, "oki", 0 )
- ROM_LOAD( "a-4a.4", 0x00000, 0x20000, CRC(ef9acdcf) SHA1(8d62a666843f0cb22e8926ae18a961052d4f9ed5) )
+ ROM_LOAD( "a-4a.4", 0x00000, 0x20000, CRC(ef9acdcf) SHA1(8d62a666843f0cb22e8926ae18a961052d4f9ed5) )
ROM_END
ROM_START( raiga )
ROM_REGION( 0x40000, "maincpu", 0 )
- ROM_LOAD16_BYTE( "a-3s.1", 0x00000, 0x20000, CRC(303c2a6c) SHA1(cd825329fd1f7d87661114f07cc87e43fd34e251) )
- ROM_LOAD16_BYTE( "a-4s.2", 0x00001, 0x20000, CRC(5f31fecb) SHA1(b0c88d260d0108100c157ea92f7defdc3cbb8933) )
+ ROM_LOAD16_BYTE( "a-3s.1", 0x00000, 0x20000, CRC(303c2a6c) SHA1(cd825329fd1f7d87661114f07cc87e43fd34e251) )
+ ROM_LOAD16_BYTE( "a-4s.2", 0x00001, 0x20000, CRC(5f31fecb) SHA1(b0c88d260d0108100c157ea92f7defdc3cbb8933) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a-4b.3", 0x00000, 0x10000, CRC(18655c95) SHA1(8357e0520565a201bb930cadffc759463931ec41) )
- ROM_REGION( 0x0800, "mcu", 0 ) /* protection NEC D8749 */
- ROM_LOAD( "a-6v.mcu", 0x00000, 0x0800, NO_DUMP )
+ ROM_REGION( 0x0800, "mcu", 0 ) // protection NEC D8749
+ ROM_LOAD( "a-6v.mcu", 0x00000, 0x00800, NO_DUMP )
ROM_REGION( 0x10000, "txtiles", 0 )
ROM_LOAD( "b-7a.5", 0x00000, 0x10000, CRC(6d2e4bf1) SHA1(edcf96bbcc109da71e3adbb37d119254d3873b29) )
ROM_REGION( 0x100000, "bgtiles", 0 )
- ROM_LOAD( "b-1b", 0x00000, 0x80000, CRC(781d1bd2) SHA1(680d91ea02f1e9cb911501f595008f46ad77ded4) )
+ ROM_LOAD( "b-1b", 0x00000, 0x80000, CRC(781d1bd2) SHA1(680d91ea02f1e9cb911501f595008f46ad77ded4) )
ROM_REGION( 0x80000, "fgtiles", 0 )
- ROM_LOAD( "b-4b", 0x00000, 0x80000, CRC(89468b84) SHA1(af60fe957c98fa3f00623d420a0941a941f5bc6b) )
+ ROM_LOAD( "b-4b", 0x00000, 0x80000, CRC(89468b84) SHA1(af60fe957c98fa3f00623d420a0941a941f5bc6b) )
ROM_REGION( 0x100000, "sprites", 0 )
- ROM_LOAD16_BYTE( "b-2m", 0x00000, 0x80000, CRC(5794ec32) SHA1(07e78d8bcb2373da77ef9f8cde6a01f384f8bf7e) )
- ROM_LOAD16_BYTE( "b-1m", 0x00001, 0x80000, CRC(b0de0ded) SHA1(45c74d0c58e3e73c79e587722d9fea9f7ba9cb0a) )
+ ROM_LOAD16_BYTE( "b-2m", 0x00000, 0x80000, CRC(5794ec32) SHA1(07e78d8bcb2373da77ef9f8cde6a01f384f8bf7e) )
+ ROM_LOAD16_BYTE( "b-1m", 0x00001, 0x80000, CRC(b0de0ded) SHA1(45c74d0c58e3e73c79e587722d9fea9f7ba9cb0a) )
ROM_REGION( 0x40000, "oki", 0 )
- ROM_LOAD( "a-4a.4", 0x00000, 0x20000, CRC(ef9acdcf) SHA1(8d62a666843f0cb22e8926ae18a961052d4f9ed5) )
+ ROM_LOAD( "a-4a.4", 0x00000, 0x20000, CRC(ef9acdcf) SHA1(8d62a666843f0cb22e8926ae18a961052d4f9ed5) )
ROM_END
/*
@@ -1485,15 +1512,15 @@ D.B.001 (sticker)
*/
ROM_START( drgnbowl )
- ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
- ROM_LOAD16_BYTE( "4.3h", 0x00000, 0x20000, CRC(90730008) SHA1(84f0668cf978d99f861cbaeb4b33f7cb1428a648) )
- ROM_LOAD16_BYTE( "5.4h", 0x00001, 0x20000, CRC(193cc915) SHA1(e898f31766eaf515e0787848134b1365e75b32a9) )
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "4.3h", 0x00000, 0x20000, CRC(90730008) SHA1(84f0668cf978d99f861cbaeb4b33f7cb1428a648) )
+ ROM_LOAD16_BYTE( "5.4h", 0x00001, 0x20000, CRC(193cc915) SHA1(e898f31766eaf515e0787848134b1365e75b32a9) )
ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "1.2r", 0x00000, 0x10000, CRC(d9cbf84a) SHA1(d14d749a41a440a56fea1d836a8d62be65786d68) ) /* Audio CPU is a Z80 */
+ ROM_LOAD( "1.2r", 0x00000, 0x10000, CRC(d9cbf84a) SHA1(d14d749a41a440a56fea1d836a8d62be65786d68) ) // Audio CPU is a Z80
ROM_REGION( 0x010000, "txtiles", 0 )
- ROM_LOAD( "22.6m", 0x00000, 0x10000, CRC(86e41198) SHA1(40201a139a668e6fc441d500f40601c7af934b1d) ) /* 8x8 tiles */
+ ROM_LOAD( "22.6m", 0x00000, 0x10000, CRC(86e41198) SHA1(40201a139a668e6fc441d500f40601c7af934b1d) ) // 8x8 tiles
ROM_REGION( 0x100000, "bgtiles", 0 )
ROM_LOAD( "6.5a", 0x00000, 0x20000, CRC(b15759f7) SHA1(1710e5ebe8197fdc622ed5c2813257ebe662b7f2) )
@@ -1515,22 +1542,22 @@ ROM_START( drgnbowl )
ROM_LOAD( "21.8r", 0xc0000, 0x20000, CRC(0cee8711) SHA1(5ec071db383a56629a7063d86264bd2bbb6b0036) )
ROM_LOAD( "20.8q", 0xe0000, 0x20000, CRC(9647e02a) SHA1(97b05716b13dd77f31ac6a08326267ec175115f1) )
- ROM_REGION( 0x40000, "oki", 0 ) /* 2*128k for ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "3.3q", 0x00000, 0x20000, CRC(489c6d0e) SHA1(5a276fad500a760c83a16e0a4cd91d5963ad8089) ) /* samples */
- ROM_LOAD( "2.3r", 0x20000, 0x20000, CRC(7710ce39) SHA1(7a7cf0b4005b000589d0bad380575d625d9d20f7) ) /* samples */
+ ROM_REGION( 0x40000, "oki", 0 ) // 2*128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "3.3q", 0x00000, 0x20000, CRC(489c6d0e) SHA1(5a276fad500a760c83a16e0a4cd91d5963ad8089) ) // samples
+ ROM_LOAD( "2.3r", 0x20000, 0x20000, CRC(7710ce39) SHA1(7a7cf0b4005b000589d0bad380575d625d9d20f7) ) // samples
ROM_END
ROM_START( drgnbowla )
- ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
- ROM_LOAD16_BYTE( "dbowl_4.u4", 0x00000, 0x20000, CRC(58d69235) SHA1(58ab422793787cae5dfffd07d3bbbb7fee48b628) )
- ROM_LOAD16_BYTE( "dbowl_5.u3", 0x00001, 0x20000, CRC(e3176ebb) SHA1(9513a84c016b372fbb17117998e6910bde1f72a2) )
+ ROM_REGION( 0x40000, "maincpu", 0 ) // 2*128k for 68000 code
+ ROM_LOAD16_BYTE( "dbowl_4.u4", 0x00000, 0x20000, CRC(58d69235) SHA1(58ab422793787cae5dfffd07d3bbbb7fee48b628) )
+ ROM_LOAD16_BYTE( "dbowl_5.u3", 0x00001, 0x20000, CRC(e3176ebb) SHA1(9513a84c016b372fbb17117998e6910bde1f72a2) )
ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "1.2r", 0x00000, 0x10000, CRC(d9cbf84a) SHA1(d14d749a41a440a56fea1d836a8d62be65786d68) ) /* Audio CPU is a Z80 */
+ ROM_LOAD( "1.2r", 0x00000, 0x10000, CRC(d9cbf84a) SHA1(d14d749a41a440a56fea1d836a8d62be65786d68) ) // Audio CPU is a Z80
ROM_REGION( 0x010000, "txtiles", 0 )
- ROM_LOAD( "22.6m", 0x00000, 0x10000, CRC(86e41198) SHA1(40201a139a668e6fc441d500f40601c7af934b1d) ) /* 8x8 tiles */
+ ROM_LOAD( "22.6m", 0x00000, 0x10000, CRC(86e41198) SHA1(40201a139a668e6fc441d500f40601c7af934b1d) ) // 8x8 tiles
ROM_REGION( 0x100000, "bgtiles", 0 )
ROM_LOAD( "6.5a", 0x00000, 0x20000, CRC(b15759f7) SHA1(1710e5ebe8197fdc622ed5c2813257ebe662b7f2) )
@@ -1552,9 +1579,9 @@ ROM_START( drgnbowla )
ROM_LOAD( "21.8r", 0xc0000, 0x20000, CRC(0cee8711) SHA1(5ec071db383a56629a7063d86264bd2bbb6b0036) )
ROM_LOAD( "20.8q", 0xe0000, 0x20000, CRC(9647e02a) SHA1(97b05716b13dd77f31ac6a08326267ec175115f1) )
- ROM_REGION( 0x40000, "oki", 0 ) /* 2*128k for ADPCM samples - sound chip is OKIM6295 */
- ROM_LOAD( "3.3q", 0x00000, 0x20000, CRC(489c6d0e) SHA1(5a276fad500a760c83a16e0a4cd91d5963ad8089) ) /* samples */
- ROM_LOAD( "2.3r", 0x20000, 0x20000, CRC(7710ce39) SHA1(7a7cf0b4005b000589d0bad380575d625d9d20f7) ) /* samples */
+ ROM_REGION( 0x40000, "oki", 0 ) // 2*128k for ADPCM samples - sound chip is OKIM6295
+ ROM_LOAD( "3.3q", 0x00000, 0x20000, CRC(489c6d0e) SHA1(5a276fad500a760c83a16e0a4cd91d5963ad8089) ) // samples
+ ROM_LOAD( "2.3r", 0x20000, 0x20000, CRC(7710ce39) SHA1(7a7cf0b4005b000589d0bad380575d625d9d20f7) ) // samples
ROM_END
@@ -1690,6 +1717,7 @@ GAME( 1992, drgnbowla, drgnbowl, drgnbowl, drgnbowl, gaiden_state, init_drgnbowl
GAME( 1989, wildfang, 0, wildfang, wildfang, gaiden_state, init_wildfang, ROT0, "Tecmo", "Wild Fang / Tecmo Knight", MACHINE_SUPPORTS_SAVE )
GAME( 1989, wildfangs, wildfang, wildfang, tknight, gaiden_state, init_wildfang, ROT0, "Tecmo", "Wild Fang", MACHINE_SUPPORTS_SAVE )
GAME( 1989, tknight, wildfang, wildfang, tknight, gaiden_state, init_wildfang, ROT0, "Tecmo", "Tecmo Knight", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, wildfangh, wildfang, wildfang, tknight, gaiden_state, init_wildfang, ROT0, "Tecmo", "Wild Fang (year hack?)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, stratof, 0, raiga, raiga, gaiden_state, init_raiga, ROT0, "Tecmo", "Raiga - Strato Fighter (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1991, raiga, stratof, raiga, raiga, gaiden_state, init_raiga, ROT0, "Tecmo", "Raiga - Strato Fighter (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/tvgames/spg29x.cpp b/src/mame/tvgames/spg29x.cpp
index d7fc9cbbb81..8fe1dada319 100644
--- a/src/mame/tvgames/spg29x.cpp
+++ b/src/mame/tvgames/spg29x.cpp
@@ -386,6 +386,9 @@ void spg29x_game_state::machine_reset()
// disable JTAG
m_maincpu->set_state_int(SCORE_CR + 29, 0x20000000);
+
+ // boot from Internal ROM - doesn't currently work as the internal ROM needs to correctly detect the external configuration before booting
+ // m_maincpu->set_state_int(SCORE_PC, 0x8b000000);
}
void spg29x_nand_game_state::machine_reset()
@@ -555,9 +558,11 @@ ROM_START( hyprscan )
ROM_LOAD32_DWORD("hyperscan.bin", 0x000000, 0x100000, CRC(ce346a14) SHA1(560cb747e7193e6781d4b8b0bd4d7b45d3d28690))
ROM_REGION( 0x008000, "spg290", ROMREGION_32BIT | ROMREGION_LE )
- ROM_LOAD32_DWORD("spg290.bin", 0x000000, 0x008000, NO_DUMP) // 256Kbit SPG290 internal ROM
+ ROM_LOAD32_DWORD("spg290.bin", 0x000000, 0x008000, CRC(41aad748) SHA1(3f65f8e88b1c5e9cbc8b39bb3228ebf616aced5a) ) // 256Kbit SPG290 internal ROM
ROM_END
+// the sets below might be using the same SPG290 internal ROM as the above but configured to load from NAND
+// however as the CPU dies were under epoxy globs the exact chip models are not confirmed
ROM_START( jak_bbh )
ROM_REGION( 0x4200000, "nand", 0 ) // ID returned C25A, read as what appears to be a compatible type.
@@ -601,4 +606,5 @@ COMP( 2011, jak_bbsf, 0, 0, spg29x, hyperscan, spg29x_nand_game_stat
COMP( 201?, zonefamf, 0, 0, spg29x, hyperscan, spg29x_zonefamf_game_state, nand_zonefamf,"Zone", "Zone Family Fit", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-// see also spg29x_lexibook_jg7425.cpp which may or may not belong here
+// the sets in spg29x_lexibook_jg7425.cpp probably also belong here, as they use an SPG293 which has the same peripheral mappings (but they make use of additional features)
+// see emu293 https://github.com/gatecat/emu293
diff --git a/src/mame/venture/spcforce.cpp b/src/mame/venture/spcforce.cpp
index 09db6667fa6..9abeeba7652 100644
--- a/src/mame/venture/spcforce.cpp
+++ b/src/mame/venture/spcforce.cpp
@@ -82,7 +82,6 @@ class spcforce_state : public driver_device
int t0_r();
void soundtrigger_w(uint8_t data);
void misc_outputs_w(uint8_t data);
- void flip_screen_w(int state);
void unknown_w(int state);
void palette(palette_device &palette) const;
@@ -112,12 +111,6 @@ class spcforce_state : public driver_device
// video
-void spcforce_state::flip_screen_w(int state)
-{
- flip_screen_set(!state);
-}
-
-
uint32_t spcforce_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int const flip = flip_screen();
@@ -338,7 +331,7 @@ void spcforce_state::spcforce(machine_config &config)
m_audiocpu->t0_in_cb().set(FUNC(spcforce_state::t0_r));
LS259(config, m_mainlatch);
- m_mainlatch->q_out_cb<3>().set(FUNC(spcforce_state::flip_screen_w));
+ m_mainlatch->q_out_cb<3>().set(FUNC(spcforce_state::flip_screen_set)).invert();
m_mainlatch->q_out_cb<6>().set("vblirq", FUNC(input_merger_device::in_w<1>));
m_mainlatch->q_out_cb<7>().set(FUNC(spcforce_state::unknown_w));
@@ -380,7 +373,7 @@ void spcforce_state::meteors(machine_config &config)
spcforce(config);
m_mainlatch->q_out_cb<3>().set_nop();
m_mainlatch->q_out_cb<5>().set("vblirq", FUNC(input_merger_device::in_w<1>)); // ??
- m_mainlatch->q_out_cb<6>().set(FUNC(spcforce_state::flip_screen_w)); // irq mask isn't here, gets written too early causing the game to not boot, see startup code
+ m_mainlatch->q_out_cb<6>().set(FUNC(spcforce_state::flip_screen_set)).invert(); // irq mask isn't here, gets written too early causing the game to not boot, see startup code
}
diff --git a/src/mame/yamaha/ymmu10.cpp b/src/mame/yamaha/ymmu10.cpp
new file mode 100644
index 00000000000..920d4081f7d
--- /dev/null
+++ b/src/mame/yamaha/ymmu10.cpp
@@ -0,0 +1,170 @@
+// license:BSD-3-Clause
+// copyright-holders:R. Belmont, Olivier Galibert
+/*************************************************************************************
+
+ Yamaha MU-10 : 16-part, 32-note polyphonic/multitimbral General MIDI/GS/XG
+ tone module
+ Driver by R. Belmont and O. Galibert
+
+ Essentially a screen-less MU10 (SWP00, identical wave rom) with a gate-array based
+ hack to connect the wave rom space to the adcs so that effects can be applied to
+ analog inputs. Entirely controlled through midi.
+
+**************************************************************************************/
+
+#include "emu.h"
+
+#include "bus/midi/midiinport.h"
+#include "bus/midi/midioutport.h"
+#include "cpu/h8/h83002.h"
+#include "sound/swp00.h"
+#include "machine/nvram.h"
+
+#include "debugger.h"
+#include "speaker.h"
+
+
+namespace {
+
+static INPUT_PORTS_START( mu10 )
+INPUT_PORTS_END
+
+class mu10_state : public driver_device
+{
+public:
+ mu10_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_nvram(*this, "ram")
+ , m_swp00(*this, "swp00")
+ , m_ram(*this, "ram")
+ { }
+
+ void mu10(machine_config &config);
+
+private:
+ required_device m_maincpu;
+ required_device m_nvram;
+ required_device m_swp00;
+ required_shared_ptr m_ram;
+
+ u8 cur_p6, cur_pa, cur_pb;
+
+ u16 adc_battery_r();
+ u16 adc_midisw_r();
+
+ void p6_w(u16 data);
+ void pa_w(u16 data);
+ void pb_w(u16 data);
+ u8 pb_r();
+
+ void mu10_map(address_map &map);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+};
+
+void mu10_state::machine_start()
+{
+ cur_p6 = cur_pa = cur_pb = 0xff;
+}
+
+void mu10_state::machine_reset()
+{
+ // Active-low, wired to gnd
+ m_maincpu->set_input_line(0, ASSERT_LINE);
+}
+
+void mu10_state::mu10_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).rom().region("maincpu", 0);
+ map(0x400000, 0x4007ff).m(m_swp00, FUNC(swp00_device::map));
+ map(0x600000, 0x607fff).ram().share(m_ram); // 32K work RAM
+}
+
+// Battery level
+u16 mu10_state::adc_battery_r()
+{
+ return 0x200;
+}
+
+// Put the host switch to pure midi
+u16 mu10_state::adc_midisw_r()
+{
+ // 000-0bf: midi
+ // 0c0-1ff: pc2
+ // 200-37f: pc1
+ // 380-3ff: mac
+ return 0x000;
+}
+
+void mu10_state::p6_w(u16 data)
+{
+ cur_p6 = data;
+ logerror("reset swp %d dac %d\n", BIT(data, 2), BIT(data, 0));
+}
+
+void mu10_state::pb_w(u16 data)
+{
+ cur_pb = data;
+ logerror("led %d gain %d\n", BIT(data, 0), BIT(data, 2));
+}
+
+u8 mu10_state::pb_r()
+{
+ // bit 3 = a/d plugged in
+ return 8;
+}
+
+void mu10_state::pa_w(u16 data)
+{
+ cur_pa = data;
+ logerror("mac host pin 1 %d\n", !BIT(data, 2));
+}
+
+void mu10_state::mu10(machine_config &config)
+{
+ H83002(config, m_maincpu, 12_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mu10_state::mu10_map);
+ m_maincpu->read_adc<0>().set(FUNC(mu10_state::adc_battery_r));
+ m_maincpu->read_adc<4>().set_constant(0);
+ m_maincpu->read_adc<5>().set_constant(0);
+ m_maincpu->read_adc<6>().set_constant(0);
+ m_maincpu->read_adc<7>().set(FUNC(mu10_state::adc_midisw_r));
+ m_maincpu->write_port6().set(FUNC(mu10_state::p6_w));
+ m_maincpu->write_porta().set(FUNC(mu10_state::pa_w));
+ m_maincpu->write_portb().set(FUNC(mu10_state::pb_w));
+ m_maincpu->read_portb().set(FUNC(mu10_state::pb_r));
+
+ NVRAM(config, m_nvram, nvram_device::DEFAULT_NONE);
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ SWP00(config, m_swp00);
+ m_swp00->add_route(0, "lspeaker", 1.0);
+ m_swp00->add_route(1, "rspeaker", 1.0);
+
+ auto &mdin(MIDI_PORT(config, "mdin"));
+ midiin_slot(mdin);
+ mdin.rxd_handler().set(m_maincpu, FUNC(h83002_device::sci_rx_w<1>));
+
+ auto &mdout(MIDI_PORT(config, "mdout"));
+ midiout_slot(mdout);
+ m_maincpu->write_sci_tx<1>().set(mdout, FUNC(midi_port_device::write_txd));
+}
+
+ROM_START( mu10 )
+ ROM_REGION( 0x80000, "maincpu", 0 )
+ // Ver0.05 94-Nov-24
+ ROM_LOAD16_WORD_SWAP( "xs289a0.ic07", 0x000000, 0x080000, CRC(6438c5a7) SHA1(4c2bb0c53a756d64cf6315b85642cab3b86e39fc) )
+
+ ROM_REGION( 0x400000, "swp00", 0 )
+ // Same content as the mu10 roms but grouped into one rom
+ ROM_LOAD( "xr709a0.ic11", 0x000000, 0x400000, CRC(4261c0bc) SHA1(5286b933976f9e3a9ca82523b8d591b616cf9479) )
+ROM_END
+
+} // anonymous namespace
+
+
+CONS( 1994, mu10, 0, 0, mu10, mu10, mu10_state, empty_init, "Yamaha", "MU10", 0 )
diff --git a/src/mame/yamaha/ymmu128.cpp b/src/mame/yamaha/ymmu128.cpp
new file mode 100644
index 00000000000..b0a15fcfc92
--- /dev/null
+++ b/src/mame/yamaha/ymmu128.cpp
@@ -0,0 +1,146 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+/*************************************************************************************
+
+ Yamaha MU-128 : 64-part, 128-note polyphonic/multitimbral General MIDI/XG
+ tone module
+ Driver by O. Galibert
+
+ Uses a dual SWP30 and a SH7043 as cpu.
+
+**************************************************************************************/
+
+#include "emu.h"
+
+#include "bus/midi/midiinport.h"
+#include "bus/midi/midioutport.h"
+#include "cpu/sh/sh7042.h"
+#include "machine/i8251.h"
+#include "sound/swp30.h"
+#include "mulcd.h"
+#include "machine/nvram.h"
+
+#include "debugger.h"
+#include "speaker.h"
+
+
+namespace {
+
+static INPUT_PORTS_START( mu128 )
+INPUT_PORTS_END
+
+class mu128_state : public driver_device
+{
+public:
+ mu128_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_nvram(*this, "ram")
+ , m_swp30m(*this, "swp30m")
+ , m_swp30s(*this, "swp30s")
+ , m_lcd(*this, "lcd")
+ , m_sci(*this, "sci")
+ , m_ram(*this, "ram")
+ { }
+
+ void mu128(machine_config &config);
+
+private:
+ required_device m_maincpu;
+ required_device m_nvram;
+ required_device m_swp30m, m_swp30s;
+ required_device m_lcd;
+ required_device m_sci;
+ required_shared_ptr m_ram;
+
+ void map(address_map &map);
+ void swp30_map(address_map &map);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+};
+
+void mu128_state::machine_start()
+{
+}
+
+void mu128_state::machine_reset()
+{
+}
+
+void mu128_state::map(address_map &map)
+{
+ map(0x000000, 0x1fffff).rom().region("maincpu", 0);
+ map(0x200000, 0x21ffff).ram().share(m_ram);
+ map(0x800000, 0x801fff).m(m_swp30m, FUNC(swp30_device::map));
+ map(0x802000, 0x803fff).m(m_swp30s, FUNC(swp30_device::map));
+ map(0xc00000, 0xc00000).rw(m_sci, FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)).mirror(0x3ffffe);
+ map(0xc00001, 0xc00001).rw(m_sci, FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)).mirror(0x3ffffe);
+}
+
+void mu128_state::swp30_map(address_map &map)
+{
+ map(0x000000, 0x5fffff).rom().region("swp30", 0);
+}
+
+void mu128_state::mu128(machine_config &config)
+{
+ SH7043(config, m_maincpu, 7_MHz_XTAL * 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mu128_state::map);
+
+ NVRAM(config, m_nvram, nvram_device::DEFAULT_NONE);
+
+ MULCD(config, m_lcd);
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ SWP30(config, m_swp30m);
+ m_swp30m->set_addrmap(AS_DATA, &mu128_state::swp30_map);
+ m_swp30m->add_route(0, "lspeaker", 1.0);
+ m_swp30m->add_route(1, "rspeaker", 1.0);
+
+ SWP30(config, m_swp30s);
+ m_swp30s->set_addrmap(AS_DATA, &mu128_state::swp30_map);
+ m_swp30s->add_route(0, "lspeaker", 1.0);
+ m_swp30s->add_route(1, "rspeaker", 1.0);
+
+ I8251(config, m_sci, 10_MHz_XTAL); // uPD71051GU-10
+
+ auto &mdin_a(MIDI_PORT(config, "mdin_a"));
+ midiin_slot(mdin_a);
+ mdin_a.rxd_handler().set(m_maincpu, FUNC(sh7043_device::sci_rx_w<0>));
+
+ auto &mdin_b(MIDI_PORT(config, "mdin_b"));
+ midiin_slot(mdin_b);
+ mdin_b.rxd_handler().set(m_maincpu, FUNC(sh7043_device::sci_rx_w<1>));
+
+ auto &mdout(MIDI_PORT(config, "mdout"));
+ midiout_slot(mdout);
+ m_maincpu->write_sci_tx<0>().set(mdout, FUNC(midi_port_device::write_txd));
+}
+
+#define ROM_LOAD32_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
+ ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_SKIP(2) | ROM_BIOS(bios))
+
+ROM_START( mu128 )
+ ROM_REGION( 0x200000, "maincpu", 0 )
+ ROM_DEFAULT_BIOS("v200")
+ ROM_SYSTEM_BIOS( 0, "v200", "Upgrade package (Ver2.00 99-MAY-21)" )
+ ROM_LOAD32_WORD_SWAP_BIOS( 0, "mu128-v2.00-h.bin", 0x000000, 0x100000, CRC(2891487b) SHA1(8ed4a6929c66fcb5248e16288dfaf56a3286aaf8) )
+ ROM_LOAD32_WORD_SWAP_BIOS( 0, "mu128-v2.00-l.bin", 0x000002, 0x100000, CRC(cc236dc4) SHA1(e1ff3387968e89f5bc5df3e15cd0d6039104acd0) )
+ ROM_SYSTEM_BIOS( 1, "v106", "c0 (Ver1.06 98-OCT-01)" )
+ ROM_LOAD32_WORD_SWAP_BIOS( 1, "xv217c0.ic27", 0x000000, 0x100000, CRC(f4ba61f1) SHA1(381e1d146c4e693a21f6e6e4ea2a8b9f6e3033ef) )
+ ROM_LOAD32_WORD_SWAP_BIOS( 1, "xv224c0.ic25", 0x000002, 0x100000, CRC(079bfcf0) SHA1(56d69f3214899fa25ef5e9ea6c2bbf0c3d378123) )
+
+ ROM_REGION32_LE( 0x1800000, "swp30", ROMREGION_ERASE00 )
+ ROM_LOAD32_WORD( "xv364a0.ic53", 0x0000000, 0x800000, CRC(cda1afd6) SHA1(e7098246b33c3cf22ed8cc15ed6383f8a06d17e9) )
+ ROM_LOAD32_WORD( "xv365a0.ic54", 0x0000002, 0x800000, CRC(10985ed0) SHA1(d45a2e85859e05046f3ede8317a9bb0b88898116) )
+ ROM_LOAD32_WORD( "xv366a0.ic57", 0x1000000, 0x400000, CRC(781dfac6) SHA1(e6b8b7cf95e4e9552001450570fcea87282db1e8) )
+ ROM_LOAD32_WORD( "xv376a0.ic58", 0x1000002, 0x400000, CRC(91a7533b) SHA1(c30888603fd5db367d14553763f0a3f392c5427c) )
+ROM_END
+
+} // anonymous namespace
+
+
+CONS( 1998, mu128, 0, 0, mu128, mu128, mu128_state, empty_init, "Yamaha", "MU128", MACHINE_NOT_WORKING )
diff --git a/src/mame/yamaha/ymvl1.cpp b/src/mame/yamaha/ymvl1.cpp
index 95f57567d7d..79d167ca438 100644
--- a/src/mame/yamaha/ymvl1.cpp
+++ b/src/mame/yamaha/ymvl1.cpp
@@ -5,9 +5,6 @@
// The VL1-m rackable version exists but we don't have the firmware
-// Waiting on tx possible in serial 2, need to implement decent serial
-// in the 68301 to go on
-
// https://www.synthxl.com/offwp/yamaha_vl1_m_service_manual.pdf
// Address decode:
@@ -15,25 +12,40 @@
// 3210 9876 5432 1098 7654 3210
// 1... .... 000. .... ..0. .... .w led
-// 1... .... 011. .... ..0. .... .w pks
+// 1... .... 010. .... ..0. .... r. pks
// 1... .... 011. .... ..0. .... r. adc
//
-// 1... .... 1000 .... .... .... rw vop
-// 1... .... 1010 .... .... .... rw glcd
+// 1... .... 1000 .... .... .... rw vop (dspv #4)
+// 1... .... 1010 .... .... .... rw lcd
// 1... .... 1011 .... .... .... rw fdc
//
// 0100 0... .... .... .... .... rw raml
// 0100 1... .... .... .... .... rw ramh
-// 0101 0... .... .... .... .... rw ssel1
-// 0101 1... .... .... .... .... rw ssel2
-//
-// 1... .... 1000 .... .... .... rw dvop
-// 1... .... 1010 .... .... .... rw lcd
-// 1... .... 1011 .... .... .... rw dfdc
+// 0101 0... .... .... .... .... rw ssel1 (top gate array)
+// 0101 1... .... .... .... .... rw ssel2 (bottom gate array)
+
+// Uses 4 dsp-v which each have two inputs and two outputs. Their
+// stream inputs/outputs are connected thus:
+// #1.2 -> #3.2
+// #2.1 -> #3.1
+// #3.1 -> #4.1
+// #3.2 -> #4.2
+// #4.1 -> dac
+
+// Uses 3 tmp68301. The main one controls dspv #4. The first subcpu
+// controls dspvs #2 and #3, the second #1, Each subgroup is tucked
+// behind a gate array, selected by ssel1/2.
+
+// There's also an undumped 63b01 dubbed "pks" which scans the
+// switches and has one 8-bit port and an irq line that goes to the
+// main tmp.
#include "emu.h"
#include "cpu/m68000/tmp68301.h"
+#include "imagedev/floppy.h"
+#include "machine/upd765.h"
+#include "sound/dspv.h"
#include "video/t6963c.h"
namespace {
@@ -44,29 +56,53 @@ class vl1_state : public driver_device
vl1_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_lcd(*this, "lcd")
+ m_subcpu1(*this, "subcpu1"),
+ m_subcpu2(*this, "subcpu2"),
+ m_dspv1(*this, "dspv1"),
+ m_dspv2(*this, "dspv2"),
+ m_dspv3(*this, "dspv3"),
+ m_dspv4(*this, "dspv4"),
+ m_lcd(*this, "lcd"),
+ m_fdc(*this, "fdc"),
+ m_mem_s1(*this, "subcpu1_ram"),
+ m_mem_s2(*this, "subcpu2_ram")
{ }
void vl1(machine_config &config);
protected:
virtual void machine_start() override;
+ virtual void machine_reset() override;
private:
- required_device m_maincpu;
+ required_device m_maincpu, m_subcpu1, m_subcpu2;
+ required_device m_dspv1, m_dspv2, m_dspv3, m_dspv4;
required_device m_lcd;
+ required_device m_fdc;
- u16 m_led;
+ required_shared_ptr m_mem_s1, m_mem_s2;
+ u16 m_led, m_main_ctrl, m_sub1_ctrl, m_sub2_ctrl;
void maincpu_map(address_map &map);
+ void subcpu1_map(address_map &map);
+ void subcpu2_map(address_map &map);
+
+ u16 main_r();
+ void main_w(u16 data);
+ u16 sub1_r();
+ void sub1_w(u16 data);
+ u16 sub2_r();
+ void sub2_w(u16 data);
void led_w(u16 data);
+
+ static void hd_floppy(device_slot_interface &device);
};
void vl1_state::led_w(u16 data)
{
u8 activated = (((~m_led) & data) >> 8) & 0xf;
- if(activated) {
+ if(activated && 0) {
if(activated & 1)
logerror("led.0 %02x\n", data & 0xff);
if(activated & 2)
@@ -79,23 +115,154 @@ void vl1_state::led_w(u16 data)
m_led = data;
}
+// Parallel port:
+// o 0-3: adsel 1-4 | breath controller adc & muxer
+// o 4 : adst |
+// i 5 : eoc |
+// o 7 : inh |
+// o 8-9: bshalt 1-2
+// i a : fdc irq
+// i b : fdc hd out (hd floppy detection)
+// i d-e: re 1-2
+// o f : reclr
+
+u16 vl1_state::main_r()
+{
+ if(0)
+ logerror("main_r\n");
+ return m_main_ctrl;
+}
+
+void vl1_state::main_w(u16 data)
+{
+ if(0)
+ logerror("main_w adsel=%x adst=%d inh=%d bshalt=%d reclr=%d\n",
+ BIT(data, 0, 4),
+ BIT(data, 4),
+ BIT(data, 7),
+ BIT(data, 8, 2),
+ BIT(data, 15));
+
+ m_main_ctrl = data;
+ m_subcpu1->set_input_line(INPUT_LINE_HALT, !BIT(data, 8));
+ m_subcpu2->set_input_line(INPUT_LINE_HALT, !BIT(data, 9));
+}
+
+u16 vl1_state::sub1_r()
+{
+ return m_sub1_ctrl;
+}
+
+void vl1_state::sub1_w(u16 data)
+{
+ if(1)
+ logerror("sub1_w dsp = %d %d\n",
+ BIT(data, 0),
+ BIT(data, 1));
+
+ m_sub1_ctrl = data;
+ m_dspv2->set_input_line(INPUT_LINE_RESET, !BIT(data, 0));
+ m_dspv3->set_input_line(INPUT_LINE_RESET, !BIT(data, 1));
+}
+
+u16 vl1_state::sub2_r()
+{
+ return m_sub2_ctrl;
+}
+
+void vl1_state::sub2_w(u16 data)
+{
+ if(1)
+ logerror("sub2_w dsp = %d\n",
+ BIT(data, 0));
+
+ m_sub2_ctrl = data;
+ m_dspv1->set_input_line(INPUT_LINE_RESET, !BIT(data, 0));
+}
+
void vl1_state::machine_start()
+{
+ save_item(NAME(m_main_ctrl));
+ save_item(NAME(m_sub1_ctrl));
+ save_item(NAME(m_sub2_ctrl));
+ save_item(NAME(m_led));
+}
+
+void vl1_state::machine_reset()
{
m_led = 0;
+ m_main_ctrl = 0;
+ m_sub1_ctrl = 0;
+ m_sub2_ctrl = 0;
+
+ m_subcpu1->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ m_subcpu2->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ m_dspv1->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_dspv2->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_dspv3->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_dspv4->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
void vl1_state::maincpu_map(address_map &map)
{
map(0x000000, 0x0fffff).rom().region("maincpu", 0);
map(0x400000, 0x4fffff).ram();
+ map(0x500000, 0x53ffff).ram().share(m_mem_s1);
+ map(0x580000, 0x5bffff).ram().share(m_mem_s2);
map(0x800000, 0x800001).w(FUNC(vl1_state::led_w));
+ map(0x804000, 0x804000).lr8(NAME([]() -> u8 { return 0; })); // pks
+ map(0x806000, 0x806000).lr8(NAME([]() -> u8 { return 0; })); // adc
+ map(0x808000, 0x80807f).m(m_dspv4, FUNC(dspv_device::map));
map(0x80a000, 0x80a003).rw(m_lcd, FUNC(lm24014h_device::read), FUNC(lm24014h_device::write)).umask16(0x00ff);
+ map(0x80b000, 0x80b003).m(m_fdc, FUNC(hd63266f_device::map)).umask16(0x00ff);
+}
+
+void vl1_state::subcpu1_map(address_map &map)
+{
+ map(0x000000, 0x03ffff).ram().share(m_mem_s1);
+ map(0x040000, 0x04007f).m(m_dspv2, FUNC(dspv_device::map));
+ map(0x050000, 0x05007f).m(m_dspv3, FUNC(dspv_device::map));
+}
+
+void vl1_state::subcpu2_map(address_map &map)
+{
+ map(0x000000, 0x03ffff).ram().share(m_mem_s2);
+ map(0x040000, 0x04007f).m(m_dspv1, FUNC(dspv_device::map));
+}
+
+
+void vl1_state::hd_floppy(device_slot_interface &device)
+{
+ device.option_add("35hd", FLOPPY_35_HD);
}
void vl1_state::vl1(machine_config &config)
{
TMP68301(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &vl1_state::maincpu_map);
+ m_maincpu->parallel_r_cb().set(FUNC(vl1_state::main_r));
+ m_maincpu->parallel_w_cb().set(FUNC(vl1_state::main_w));
+ m_maincpu->tx2_handler().set(m_subcpu1, FUNC(tmp68301_device::rx2_w));
+ m_maincpu->tx2_handler().append(m_subcpu2, FUNC(tmp68301_device::rx2_w));
+
+ TMP68301(config, m_subcpu1, 16_MHz_XTAL);
+ m_subcpu1->set_addrmap(AS_PROGRAM, &vl1_state::subcpu1_map);
+ m_subcpu1->parallel_r_cb().set(FUNC(vl1_state::sub1_r));
+ m_subcpu1->parallel_w_cb().set(FUNC(vl1_state::sub1_w));
+
+ TMP68301(config, m_subcpu2, 16_MHz_XTAL);
+ m_subcpu2->set_addrmap(AS_PROGRAM, &vl1_state::subcpu2_map);
+ m_subcpu2->parallel_r_cb().set(FUNC(vl1_state::sub2_r));
+ m_subcpu2->parallel_w_cb().set(FUNC(vl1_state::sub2_w));
+
+ DSPV(config, m_dspv1, 24.576_MHz_XTAL);
+ DSPV(config, m_dspv2, 24.576_MHz_XTAL);
+ DSPV(config, m_dspv3, 24.576_MHz_XTAL);
+ DSPV(config, m_dspv4, 24.576_MHz_XTAL);
+
+ HD63266F(config, m_fdc, 16_MHz_XTAL);
+ m_fdc->set_ready_line_connected(false);
+ FLOPPY_CONNECTOR(config, "fdc:0", hd_floppy, "35hd", floppy_image_device::default_pc_floppy_formats);
LM24014H(config, m_lcd);
}
diff --git a/src/osd/mac/window.cpp b/src/osd/mac/window.cpp
index b3ab9083a90..f4fc7b7f8b0 100644
--- a/src/osd/mac/window.cpp
+++ b/src/osd/mac/window.cpp
@@ -223,7 +223,7 @@ void mac_window_info::modify_prescale(int dir)
{
int new_prescale = prescale();
- if (dir > 0 && prescale() < 3)
+ if (dir > 0 && prescale() < 8)
new_prescale = prescale() + 1;
if (dir < 0 && prescale() > 1)
new_prescale = prescale() - 1;
@@ -243,8 +243,8 @@ void mac_window_info::modify_prescale(int dir)
notify_changed();
m_prescale = new_prescale;
}
- machine().ui().popup_time(1, "Prescale %d", prescale());
}
+ machine().ui().popup_time(1, "Prescale %d", prescale());
}
//============================================================
diff --git a/src/osd/sdl/osdsdl.cpp b/src/osd/sdl/osdsdl.cpp
index f9778f0ab52..2d3e5e4f02c 100644
--- a/src/osd/sdl/osdsdl.cpp
+++ b/src/osd/sdl/osdsdl.cpp
@@ -343,10 +343,10 @@ void sdl_osd_interface::customize_input_type_list(std::vector
entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_PGDN);
break;
- // OSD hotkeys use LCTRL and start at F3, they start at
- // F3 because F1-F2 are hardcoded into many drivers to
+ // OSD hotkeys use LALT/LCTRL and start at F3, they start
+ // at F3 because F1-F2 are hardcoded into many drivers to
// various dipswitches, and pressing them together with
- // LCTRL will still press/toggle these dipswitches.
+ // LALT/LCTRL will still press/toggle these dipswitches.
// LALT-F10 to toggle OpenGL filtering
case IPT_OSD_5:
@@ -359,26 +359,26 @@ void sdl_osd_interface::customize_input_type_list(std::vector
entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F10, input_seq::not_code, KEYCODE_LALT);
break;
- // LCTRL-F6 to decrease OpenGL prescaling
+ // LALT-F8 to decrease OpenGL prescaling
case IPT_OSD_6:
entry.configure_osd("DECREASE_PRESCALE", N_p("input-name", "Decrease Prescaling"));
- entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F6, KEYCODE_LCONTROL);
+ entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F8, KEYCODE_LALT);
break;
- // add a Not LCTRL condition to the save state key
- case IPT_UI_SAVE_STATE:
- entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F6, input_seq::not_code, KEYCODE_LCONTROL, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT);
+ // add a Not LALT condition to the frameskip dec key
+ case IPT_UI_FRAMESKIP_DEC:
+ entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F8, input_seq::not_code, KEYCODE_LALT, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT);
break;
- // LCTRL-F7 to increase OpenGL prescaling
+ // LALT-F9 to increase OpenGL prescaling
case IPT_OSD_7:
entry.configure_osd("INCREASE_PRESCALE", N_p("input-name", "Increase Prescaling"));
- entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F7, KEYCODE_LCONTROL);
+ entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F9, KEYCODE_LALT);
break;
- // add a Not LCTRL condition to the load state key
- case IPT_UI_LOAD_STATE:
- entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F7, input_seq::not_code, KEYCODE_LCONTROL, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT);
+ // add a Not LALT condition to the load state key
+ case IPT_UI_FRAMESKIP_INC:
+ entry.defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F9, input_seq::not_code, KEYCODE_LALT);
break;
// LSHIFT-LALT-F12 for fullscreen video (BGFX)
@@ -695,7 +695,7 @@ void sdl_osd_interface::check_osd_inputs()
if (USE_OPENGL)
{
- //FIXME: on a per window basis
+ // FIXME: on a per window basis
if (machine().ui_input().pressed(IPT_OSD_5))
{
video_config.filter = !video_config.filter;
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 41f0c5af2be..4bb8531df2a 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -266,7 +266,7 @@ void sdl_window_info::modify_prescale(int dir)
{
int new_prescale = prescale();
- if (dir > 0 && prescale() < 3)
+ if (dir > 0 && prescale() < 20)
new_prescale = prescale() + 1;
if (dir < 0 && prescale() > 1)
new_prescale = prescale() - 1;
@@ -286,8 +286,8 @@ void sdl_window_info::modify_prescale(int dir)
m_prescale = new_prescale;
notify_changed();
}
- machine().ui().popup_time(1, "Prescale %d", prescale());
}
+ machine().ui().popup_time(1, "Prescale %d", prescale());
}
//============================================================