summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--docs/source/commandline/commandline-all.rst6
-rw-r--r--src/devices/bus/a2bus/snesmax.h2
-rwxr-xr-xsrc/mame/roland/roland_d70.cpp417
-rw-r--r--src/mame/tektronix/tek440x.cpp13
-rw-r--r--src/mame/yamaha/ympsr2000.cpp6
5 files changed, 231 insertions, 213 deletions
diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst
index b2cd5ad2c64..89f7dac1287 100644
--- a/docs/source/commandline/commandline-all.rst
+++ b/docs/source/commandline/commandline-all.rst
@@ -3989,7 +3989,7 @@ Core Misc Options
Specifies the type of UI to use, either ``simple`` or ``cabinet``.
- The default is Cabinet (**-ui cabinet**).
+ The default is cabinet (**-ui cabinet**).
Example:
.. code-block:: bash
@@ -4025,9 +4025,9 @@ Core Misc Options
**\-[no]ui_mouse**
- Displays a mouse cursor when using the built-in UI for MAME.
+ Displays a mouse cursor when using the built-in MAME user interface.
- The default is (**-noui_mouse**).
+ The default is ON (**-ui_mouse**).
.. _mame-commandline-language:
diff --git a/src/devices/bus/a2bus/snesmax.h b/src/devices/bus/a2bus/snesmax.h
index a28bae2de5c..3cf381242dc 100644
--- a/src/devices/bus/a2bus/snesmax.h
+++ b/src/devices/bus/a2bus/snesmax.h
@@ -2,7 +2,7 @@
// copyright-holders:Vas Crabb
/***********************************************************************
- Orange Micro Grappler/Grappler+ Printer Interface
+ Homebrew dual SNES controller interface by Lukazi
https://lukazi.blogspot.com/2021/06/game-controller-snes-max-snes.html
diff --git a/src/mame/roland/roland_d70.cpp b/src/mame/roland/roland_d70.cpp
index 2180550542c..147aabbc31c 100755
--- a/src/mame/roland/roland_d70.cpp
+++ b/src/mame/roland/roland_d70.cpp
@@ -7,23 +7,28 @@
****************************************************************************/
+#include "emu.h"
+
#include "bus/generic/carts.h"
#include "bus/generic/slot.h"
#include "bus/midi/midiinport.h"
#include "bus/midi/midioutport.h"
#include "cpu/mcs96/i8x9x.h"
#include "cpu/mcs96/i8xc196.h"
-#include "emu.h"
-#include "emupal.h"
-#include "machine/ram.h"
#include "machine/timer.h"
+#include "sound/rolandpcm.h"
+#include "video/t6963c.h"
+
+#include "emupal.h"
#include "screen.h"
#include "softlist_dev.h"
-#include "sound/rolandpcm.h"
#include "speaker.h"
-#include "video/t6963c.h"
+
+#include "multibyte.h"
+
#include <queue>
+
namespace {
// unscramble address: ROM dump offset -> proper (descrambled) offset
@@ -36,105 +41,121 @@ namespace {
#define UNSCRAMBLE_DATA(_data) bitswap<8>(_data, 1, 2, 7, 3, 5, 0, 4, 6)
// Bitmasks for the display board interface via PORT1
-static constexpr uint8_t CONT_MASK = 0b10000000;
-static constexpr uint8_t RW_MASK = 0b01000000;
-static constexpr uint8_t AD_MASK = 0b00100000;
-static constexpr uint8_t SCK_MASK = 0b00010000;
-static constexpr uint8_t SI_MASK = 0b00001000;
-static constexpr uint8_t SO_MASK = 0b00000100;
-static constexpr uint8_t ACK_MASK = 0b00000010;
-static constexpr uint8_t ENCO_MASK = 0b00000001;
+static constexpr u8 CONT_MASK = 0b10000000;
+static constexpr u8 RW_MASK = 0b01000000;
+static constexpr u8 AD_MASK = 0b00100000;
+static constexpr u8 SCK_MASK = 0b00010000;
+static constexpr u8 SI_MASK = 0b00001000;
+static constexpr u8 SO_MASK = 0b00000100;
+static constexpr u8 ACK_MASK = 0b00000010;
+static constexpr u8 ENCO_MASK = 0b00000001;
static INPUT_PORTS_START(d70)
- PORT_START("KEY0")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Performance") PORT_CODE(KEYCODE_K)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Patch") PORT_CODE(KEYCODE_L)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone") PORT_CODE(KEYCODE_COLON)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A/B") PORT_CODE(KEYCODE_Q)
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Int/Card") PORT_CODE(KEYCODE_W)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Command") PORT_CODE(KEYCODE_E)
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Write") PORT_CODE(KEYCODE_R)
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Enter") PORT_CODE(KEYCODE_T)
-
- PORT_START("KEY1")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 1")
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 2")
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 3")
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 4")
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 5")
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 6")
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 7")
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 8")
-
- PORT_START("KEY2")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 1") PORT_CODE(KEYCODE_1)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 2") PORT_CODE(KEYCODE_2)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 3") PORT_CODE(KEYCODE_3)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 4") PORT_CODE(KEYCODE_4)
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 5") PORT_CODE(KEYCODE_5)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 6") PORT_CODE(KEYCODE_6)
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 7") PORT_CODE(KEYCODE_7)
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 8") PORT_CODE(KEYCODE_8)
-
- PORT_START("KEY3")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_H)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_J)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("S") PORT_CODE(KEYCODE_DOWN)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A") PORT_CODE(KEYCODE_LEFT)
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D") PORT_CODE(KEYCODE_RIGHT)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("W") PORT_CODE(KEYCODE_UP)
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Midi Out") PORT_CODE(KEYCODE_N)
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone Display") PORT_CODE(KEYCODE_B)
-
- PORT_START("KEY4")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Exit") PORT_CODE(KEYCODE_SLASH)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F5") PORT_CODE(KEYCODE_G)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F4") PORT_CODE(KEYCODE_F)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F3") PORT_CODE(KEYCODE_D)
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F2") PORT_CODE(KEYCODE_S)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F1") PORT_CODE(KEYCODE_A)
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("User") PORT_CODE(KEYCODE_STOP)
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Part") PORT_CODE(KEYCODE_COMMA)
-
- PORT_START("KEY5")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Edit") PORT_CODE(KEYCODE_X)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Portamento")
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Resonance")
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pan")
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tuning") PORT_CODE(KEYCODE_V)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Attack")
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Release")
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pcm Card") PORT_CODE(KEYCODE_C)
-
- PORT_START("KEY6")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Play") PORT_CODE(KEYCODE_Z)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Solo")
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cutoff")
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Level")
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Upper 4")
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Upper 3")
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Lower 2")
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Lower 1")
-
- PORT_START("KEY7")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Effect/Ctrl") PORT_CODE(KEYCODE_M)
+ PORT_START("KEY0")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Performance") PORT_CODE(KEYCODE_K)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Patch") PORT_CODE(KEYCODE_L)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone") PORT_CODE(KEYCODE_COLON)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A/B") PORT_CODE(KEYCODE_Q)
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Int/Card") PORT_CODE(KEYCODE_W)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Command") PORT_CODE(KEYCODE_E)
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Write") PORT_CODE(KEYCODE_R)
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Enter") PORT_CODE(KEYCODE_T)
+
+ PORT_START("KEY1")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 1")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 2")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 3")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 4")
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 5")
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 6")
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 7")
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank 8")
+
+ PORT_START("KEY2")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 1") PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 2") PORT_CODE(KEYCODE_2)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 3") PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 4") PORT_CODE(KEYCODE_4)
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 5") PORT_CODE(KEYCODE_5)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 6") PORT_CODE(KEYCODE_6)
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 7") PORT_CODE(KEYCODE_7)
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 8") PORT_CODE(KEYCODE_8)
+
+ PORT_START("KEY3")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_H)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_J)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("S") PORT_CODE(KEYCODE_DOWN)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A") PORT_CODE(KEYCODE_LEFT)
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D") PORT_CODE(KEYCODE_RIGHT)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("W") PORT_CODE(KEYCODE_UP)
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Midi Out") PORT_CODE(KEYCODE_N)
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone Display") PORT_CODE(KEYCODE_B)
+
+ PORT_START("KEY4")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Exit") PORT_CODE(KEYCODE_SLASH)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F5") PORT_CODE(KEYCODE_G)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F4") PORT_CODE(KEYCODE_F)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F3") PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F2") PORT_CODE(KEYCODE_S)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F1") PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("User") PORT_CODE(KEYCODE_STOP)
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Part") PORT_CODE(KEYCODE_COMMA)
+
+ PORT_START("KEY5")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Edit") PORT_CODE(KEYCODE_X)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Portamento")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Resonance")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pan")
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tuning") PORT_CODE(KEYCODE_V)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Attack")
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Release")
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pcm Card") PORT_CODE(KEYCODE_C)
+
+ PORT_START("KEY6")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Play") PORT_CODE(KEYCODE_Z)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Solo")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cutoff")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Level")
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Upper 4")
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Upper 3")
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Lower 2")
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Lower 1")
+
+ PORT_START("KEY7")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x8, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x4, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x2, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Effect/Ctrl") PORT_CODE(KEYCODE_M)
INPUT_PORTS_END
class roland_d70_state : public driver_device {
public:
- roland_d70_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag), m_cpu(*this, "maincpu"),
- m_pcm(*this, "pcm"), m_lcd(*this, "lcd"), m_midi_timer(*this, "midi_timer"),
- m_ram(*this, "ram"), m_dsp_ram(*this, "dsp_ram"), m_keys(*this, "KEY%u", 0),
- sw_scan_index(0), sw_scan_bank(-1), sw_scan_state(0xFF), sw_scan_mode(0),
- sw_scan_current_out(0xFF), m_midi_rx(0), m_midi_pos(0) {}
+ roland_d70_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_bank_view(*this, "bank"),
+ m_ram(*this, "ram", 128 * 1024, ENDIANNESS_LITTLE),
+ m_dsp_ram(*this, "dsp_ram", 8 * 1024, ENDIANNESS_LITTLE),
+ m_rom_bank(*this, "rom_bank"),
+ m_ram_bank(*this, "ram_bank"),
+ m_pcm_rom(*this, "pcm"),
+ m_cpu(*this, "maincpu"),
+ m_pcm(*this, "pcm"),
+ m_lcd(*this, "lcd"),
+ m_midi_timer(*this, "midi_timer"),
+ m_keys(*this, "KEY%u", 0),
+ m_sw_scan_index(0),
+ m_sw_scan_bank(-1),
+ m_sw_scan_state(0xff),
+ m_sw_scan_mode(0),
+ m_sw_scan_current_out(0xff),
+ m_midi_rx(0),
+ m_midi_pos(0)
+ {
+ }
void d70(machine_config &config);
void init_d70();
@@ -143,24 +164,15 @@ protected:
virtual void machine_start() override;
private:
- required_device<i8x9x_device> m_cpu;
- required_device<mb87419_mb87420_device> m_pcm;
- required_device<t6963c_device> m_lcd;
- required_device<timer_device> m_midi_timer;
- required_device<ram_device> m_ram;
- required_device<ram_device> m_dsp_ram;
- required_ioport_array<8> m_keys;
-
void lcd_map(address_map &map);
void lcd_palette(palette_device &palette) const;
- void bank_w(uint8_t data);
+ void bank_w(u8 data);
u8 ksga_io_r(offs_t offset);
void ksga_io_w(offs_t offset, u8 data);
u16 port0_r();
u8 port1_r();
void port1_w(u8 data);
- u8 pcmrom_r(offs_t offset);
u8 dsp_io_r(offs_t offset);
void dsp_io_w(offs_t offset, u8 data);
u8 tvf_io_r(offs_t offset);
@@ -184,27 +196,41 @@ private:
void descramble_rom_internal(u8 *dst, const u8 *src);
void descramble_rom_external(u8 *dst, const u8 *src);
- u8 sound_io_buffer[0x100];
- u8 dsp_io_buffer[0x80];
- int sw_scan_index;
- int sw_scan_bank;
- u8 sw_scan_state;
- u8 sw_scan_mode;
- u8 sw_scan_current_out;
+ memory_view m_bank_view;
+ memory_share_creator<u16> m_ram;
+ memory_share_creator<u8> m_dsp_ram;
+ required_memory_bank m_rom_bank;
+ required_memory_bank m_ram_bank;
+ required_region_ptr<u8> m_pcm_rom;
+ required_device<i8x9x_device> m_cpu;
+ required_device<mb87419_mb87420_device> m_pcm;
+ required_device<t6963c_device> m_lcd;
+ required_device<timer_device> m_midi_timer;
+ required_ioport_array<8> m_keys;
+
+ u8 m_sound_io_buffer[0x100];
+ u8 m_dsp_io_buffer[0x80];
+ int m_sw_scan_index;
+ int m_sw_scan_bank;
+ u8 m_sw_scan_state;
+ u8 m_sw_scan_mode;
+ u8 m_sw_scan_current_out;
u8 m_midi_rx;
int m_midi_pos;
std::queue<u8> midi_queue;
};
void roland_d70_state::machine_start() {
- membank("bank")->configure_entries(0, 8, memregion("maincpu")->base(), 0x4000);
- membank("bank")->configure_entries(0x20, 2, m_ram->pointer(), 0x4000);
- membank("bank")->configure_entries(0x30, 2, m_ram->pointer(), 0x4000);
- membank("fixed")->set_base(m_ram->pointer());
+ m_bank_view.select(0);
+ m_rom_bank->configure_entries(0, 8, memregion("maincpu")->base(), 0x4000);
+ m_ram_bank->configure_entries(0, 2, &m_ram[0], 0x4000);
+ m_cpu->space(AS_PROGRAM).install_ram(0xc000, 0xffff, &m_ram[0]);
}
-void roland_d70_state::bank_w(uint8_t data) {
- membank("bank")->set_entry(data);
+void roland_d70_state::bank_w(u8 data) {
+ m_bank_view.select(BIT(data, 5));
+ m_rom_bank->set_entry(data & 0x07);
+ m_ram_bank->set_entry(data & 0x01);
}
u8 roland_d70_state::ksga_io_r(offs_t offset) {
@@ -252,86 +278,76 @@ u16 roland_d70_state::port0_r() {
return 0x00;
}
-u8 roland_d70_state::roland_d70_state::port1_r() {
- sw_scan_current_out = m_ram->read(0x0F);
- // logerror("p1r %02x\n", sw_scan_current_out);
- return sw_scan_current_out;
+u8 roland_d70_state::port1_r() {
+ m_sw_scan_current_out = m_ram[0x0f / 2] >> 8;
+ // logerror("p1r %02x\n", m_sw_scan_current_out);
+ return m_sw_scan_current_out;
}
-void roland_d70_state::roland_d70_state::port1_w(u8 data) {
+void roland_d70_state::port1_w(u8 data) {
// logerror("p1w %02x\n", data);
- // sw_scan_current_out = data & ~(SO_MASK);
+ // m_sw_scan_current_out = data & ~(SO_MASK);
if (data & RW_MASK) {
- if ((data & CONT_MASK) && !(sw_scan_state & CONT_MASK)) {
- sw_scan_index = 0;
- sw_scan_bank += 1;
- }
-
- // Clock cycle
- if ((data & SCK_MASK) && !(sw_scan_state & SCK_MASK)) {
- if ((data & AD_MASK)) {
- if (sw_scan_mode == 0) {
- sw_scan_current_out &= ~(SO_MASK);
- } else if (sw_scan_mode == 1) {
- u8 buttonState = sw_scan_bank != -1 ? (m_keys[sw_scan_bank]->read() >> sw_scan_index) & 0x1 : 1;
+ if ((data & CONT_MASK) && !(m_sw_scan_state & CONT_MASK)) {
+ m_sw_scan_index = 0;
+ m_sw_scan_bank += 1;
+ }
- if (buttonState) {
- sw_scan_current_out |= SO_MASK;
+ // Clock cycle
+ if ((data & SCK_MASK) && !(m_sw_scan_state & SCK_MASK)) {
+ if ((data & AD_MASK)) {
+ if (m_sw_scan_mode == 0) {
+ m_sw_scan_current_out &= ~(SO_MASK);
+ } else if (m_sw_scan_mode == 1) {
+ u8 buttonState = m_sw_scan_bank != -1 ? BIT(m_keys[m_sw_scan_bank]->read(), m_sw_scan_index) : 1;
+
+ if (buttonState) {
+ m_sw_scan_current_out |= SO_MASK;
+ } else {
+ m_sw_scan_current_out &= ~(SO_MASK);
+ }
+ m_sw_scan_index += 1;
+ }
} else {
- sw_scan_current_out &= ~(SO_MASK);
+ m_sw_scan_mode += 1;
}
- sw_scan_index += 1;
}
- } else {
- sw_scan_mode += 1;
- }
- }
} else {
- sw_scan_mode = 0;
- sw_scan_index = 0;
- sw_scan_bank = -1;
+ m_sw_scan_mode = 0;
+ m_sw_scan_index = 0;
+ m_sw_scan_bank = -1;
}
- sw_scan_state = data;
+ m_sw_scan_state = data;
- m_ram->write(0x0F, sw_scan_current_out);
-}
-
-u8 roland_d70_state::pcmrom_r(offs_t offset) {
- const u8 *pcm_rom = memregion("pcm")->base();
- // logerror("pcm read %x %x\n", offset, pcm_rom[offset]);
- return pcm_rom[offset];
+ m_ram[0x0f / 2] = (m_ram[0x0f / 2] & 0x00ff) | (u16(m_sw_scan_current_out) << 8);
}
u8 roland_d70_state::dsp_io_r(offs_t offset) {
- return dsp_io_buffer[offset];
+ return m_dsp_io_buffer[offset];
}
void roland_d70_state::dsp_io_w(offs_t offset, u8 data) {
- dsp_io_buffer[offset] = data;
+ m_dsp_io_buffer[offset] = data;
// do read/write to some external memory, makes the RCC-CPU check pass.
// (routine at 0x4679)
switch (offset) {
- case 0x04:
+ case 0x04:
// write to partials?? (written in loop at 0x4375)
break;
- case 0x06: {
- u8 *ram = m_dsp_ram->pointer();
- offs_t ofs = data;
- ram[0x000 | ofs] = dsp_io_buffer[0x00] & 0x03;
- ram[0x100 | ofs] = dsp_io_buffer[0x01];
- ram[0x200 | ofs] = dsp_io_buffer[0x02];
- } break;
-
- case 0x0A: {
- const u8 *ram = m_dsp_ram->pointer();
- offs_t ofs = data;
- dsp_io_buffer[0x00] = ram[0x000 | ofs];
- dsp_io_buffer[0x01] = ram[0x100 | ofs];
- dsp_io_buffer[0x02] = ram[0x200 | ofs];
- } break;
+ case 0x06:
+ m_dsp_ram[0x000 | data] = m_dsp_io_buffer[0x00] & 0x03;
+ m_dsp_ram[0x100 | data] = m_dsp_io_buffer[0x01];
+ m_dsp_ram[0x200 | data] = m_dsp_io_buffer[0x02];
+ break;
+
+ case 0x0a:
+ m_dsp_io_buffer[0x00] = m_dsp_ram[0x000 | data];
+ m_dsp_io_buffer[0x01] = m_dsp_ram[0x100 | data];
+ m_dsp_io_buffer[0x02] = m_dsp_ram[0x200 | data];
+ break;
}
}
@@ -354,31 +370,26 @@ u8 roland_d70_state::snd_io_r(offs_t offset) {
// All this is just for making debugging easier, as it allows one to check the
// register state using the Memory Viewer.
if (offset == 0x01 || offset == 0x21)
- offset ^= 0x20; // remove when PCM data readback via sound chip is confirmed
- // to work
+ offset ^= 0x20; // remove when PCM data readback via sound chip is confirmed to work
if (offset < 0x20)
- return m_pcm->read(offset);
+ return m_pcm->read(offset);
if (offset < 0x40)
- offset -= 0x20;
+ offset -= 0x20;
if (offset == 0x01) {
- // code for reading from the PCM sample table is at 0xB027
- // The code at 0xB0AC writes to 1411/1F (??), then 1403/02 (bank), then
- // 1409/08/0B/0A (address). It waits a few cycles and at 0xB0F7 it reads the
+ // code for reading from the PCM sample table is at 0xb027
+ // The code at 0xb0ac writes to 1411/1F (??), then 1403/02 (bank), then
+ // 1409/08/0b/0a (address). It waits a few cycles and at 0xb0f7 it reads the
// resulting data from 1401.
- offs_t bank = sound_io_buffer[0x03];
- offs_t addr = (sound_io_buffer[0x09] << 0) | (sound_io_buffer[0x0A] << 8) |
- (sound_io_buffer[0x0B] << 16);
- addr = ((addr >> 6) + 2) & 0x3FFFF;
+ offs_t bank = m_sound_io_buffer[0x03];
+ offs_t addr = get_u24le(&m_sound_io_buffer[0x09]);
+ addr = ((addr >> 6) + 2) & 0x3ffff;
addr |= (bank << 16);
// write actual ROM address to 1440..1443 for debugging
- sound_io_buffer[0x43] = (addr >> 0) & 0xFF;
- sound_io_buffer[0x42] = (addr >> 8) & 0xFF;
- sound_io_buffer[0x41] = (addr >> 16) & 0xFF;
- sound_io_buffer[0x40] = (addr >> 24) & 0xFF;
- return pcmrom_r(addr);
+ put_u32be(&m_sound_io_buffer[40], addr);
+ return m_pcm_rom[addr];
}
- return sound_io_buffer[offset];
+ return m_sound_io_buffer[offset];
}
void roland_d70_state::snd_io_w(offs_t offset, u8 data) {
@@ -398,7 +409,7 @@ void roland_d70_state::snd_io_w(offs_t offset, u8 data) {
if (offset < 0x20) {
m_pcm->write(offset, data);
}
- sound_io_buffer[offset] = data;
+ m_sound_io_buffer[offset] = data;
}
u8 roland_d70_state::ach0_r() { return 128; }
@@ -418,13 +429,15 @@ void roland_d70_state::lcd_palette(palette_device &palette) const {
void roland_d70_state::d70_map(address_map &map) {
map(0x0100, 0x0100).w(FUNC(roland_d70_state::bank_w));
map(0x0400, 0x07ff).rw(FUNC(roland_d70_state::ksga_io_r), FUNC(roland_d70_state::ksga_io_w));
- map(0x0800, 0x0802).rw(m_lcd, FUNC(t6963c_device::read), FUNC(t6963c_device::write)).umask16(0x00FF);
+ map(0x0800, 0x0802).rw(m_lcd, FUNC(t6963c_device::read), FUNC(t6963c_device::write)).umask16(0x00ff);
map(0x0900, 0x09ff).rw(FUNC(roland_d70_state::snd_io_r), FUNC(roland_d70_state::snd_io_w));
map(0x0a00, 0x0aff).rw(FUNC(roland_d70_state::dsp_io_r), FUNC(roland_d70_state::dsp_io_w));
map(0x0c00, 0x0cff).rw(FUNC(roland_d70_state::tvf_io_r), FUNC(roland_d70_state::tvf_io_w));
- map(0x1000, 0x7FFF).rom().region("maincpu", 0x1000);
- map(0x8000, 0xbfff).bankrw("bank");
- map(0xc000, 0xffff).bankrw("fixed");
+ map(0x1000, 0x7fff).rom().region("maincpu", 0x1000);
+ map(0x8000, 0xbfff).view(m_bank_view);
+ m_bank_view[0](0x8000, 0xbfff).bankr(m_rom_bank);
+ m_bank_view[1](0x8000, 0xbfff).bankrw(m_ram_bank);
+ //map(0xc000, 0xffff) fixed RAM - will install on start
}
void roland_d70_state::d70(machine_config &config) {
@@ -440,8 +453,6 @@ void roland_d70_state::d70(machine_config &config) {
maincpu.ach3_cb().set(FUNC(roland_d70_state::ach3_r));
maincpu.ach4_cb().set(FUNC(roland_d70_state::ach4_r));
- RAM(config, m_ram).set_default_size("128K");
-
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -450,8 +461,6 @@ void roland_d70_state::d70(machine_config &config) {
m_pcm->add_route(0, "lspeaker", 1.0);
m_pcm->add_route(1, "rspeaker", 1.0);
- RAM(config, m_dsp_ram).set_default_size("8K");
-
T6963C(config, m_lcd, 0);
m_lcd->set_addrmap(0, &roland_d70_state::lcd_map);
@@ -481,8 +490,8 @@ void roland_d70_state::init_d70() {
// Only the first 0x80 bytes of the ROMs are readable text in a raw dump.
// The U-110 actually checks some of these header bytes, but it uses
// post-scrambling variants of offsets/values.
- u8 *src = static_cast<u8 *>(memregion("pcmorg")->base());
- u8 *dst = static_cast<u8 *>(memregion("pcm")->base());
+ u8 *src = reinterpret_cast<u8 *>(memregion("pcmorg")->base());
+ u8 *dst = reinterpret_cast<u8 *>(memregion("pcm")->base());
// descramble internal ROMs
descramble_rom_internal(&dst[0x000000], &src[0x000000]);
descramble_rom_internal(&dst[0x100000], &src[0x100000]);
diff --git a/src/mame/tektronix/tek440x.cpp b/src/mame/tektronix/tek440x.cpp
index 26098b473d0..e96705f3d3c 100644
--- a/src/mame/tektronix/tek440x.cpp
+++ b/src/mame/tektronix/tek440x.cpp
@@ -42,20 +42,23 @@
***************************************************************************/
#include "emu.h"
+
+#include "tek410x_kbd.h"
+
+#include "bus/nscsi/hd.h"
#include "bus/rs232/rs232.h"
+#include "cpu/m6502/m6502.h"
#include "cpu/m68000/m68010.h"
#include "cpu/m68000/m68020.h"
-#include "cpu/m6502/m6502.h"
#include "machine/am9513.h"
#include "machine/bankdev.h"
-#include "machine/mos6551.h" // debug tty
#include "machine/mc146818.h"
#include "machine/mc68681.h"
-#include "machine/nscsi_bus.h"
-#include "bus/nscsi/hd.h"
+#include "machine/mos6551.h" // debug tty
#include "machine/ncr5385.h"
-#include "tek410x_kbd.h"
+#include "machine/nscsi_bus.h"
#include "sound/sn76496.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
diff --git a/src/mame/yamaha/ympsr2000.cpp b/src/mame/yamaha/ympsr2000.cpp
index 4edbed9cbec..89bc48c01de 100644
--- a/src/mame/yamaha/ympsr2000.cpp
+++ b/src/mame/yamaha/ympsr2000.cpp
@@ -7,11 +7,15 @@
#include "bus/midi/midioutport.h"
#include "cpu/sh/sh4.h"
#include "video/sed1330.h"
+
#include "debugger.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
+
+namespace {
+
class psr2000_state : public driver_device {
public:
psr2000_state(const machine_config &mconfig, device_type type, const char *tag)
@@ -97,4 +101,6 @@ ROM_START( psr2000 )
ROM_LOAD32_WORD_SWAP( "x004110.ic407", 2, 0x800000, CRC(fae720fe) SHA1(df80a9a75308f0ab1ab33248b5e8cd6563e6aed5))
ROM_END
+} // anonymous namespace
+
SYST( 2001, psr2000, 0, 0, psr2000, psr2000, psr2000_state, empty_init, "Yamaha", "PSR2000", MACHINE_IS_SKELETON )