diff options
Diffstat (limited to 'src')
109 files changed, 4696 insertions, 1736 deletions
diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 74f1e0f8dd4..7e41380ddd9 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -66,7 +66,7 @@ static const int m_cmd_fifo_length[256] = -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 6x */ -1, -1, -1, -1, 3, 3, 3, 3, -1, -1, -1, -1, -1, 1, -1, 1, /* 7x */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 8x */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 9x */ + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 9x */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* Ax */ 4, -1, -1, -1, -1, -1, 4, -1, 4, -1, -1, -1, -1, -1, 4, -1, /* Bx */ 4, -1, -1, -1, -1, -1, 4, -1, 4, -1, -1, -1, -1, -1, 4, -1, /* Cx */ @@ -356,6 +356,7 @@ void sb_device::process_fifo(uint8_t cmd) break; case 0x1c: // 8-bit DMA with autoinit + case 0x90: // 8-bit DMA with autoinit, high speed. XXX only on DSP 3.xx // printf("Start DMA (autoinit, size = %x)\n", m_dsp.dma_length); m_dsp.dma_transferred = 0; m_dsp.dma_autoinit = 1; @@ -583,23 +584,20 @@ void sb_device::process_fifo(uint8_t cmd) mode = m_dsp.fifo[1]; m_dsp.flags = 0; m_dsp.dma_length = (m_dsp.fifo[2] + (m_dsp.fifo[3]<<8)) + 1; - if((cmd & 0xf0) == 0xb0) - { - m_dsp.flags |= SIXTEENBIT; - m_dsp.dma_length <<= 1; - drq16_w(1); - } - else - drq_w(1); if(cmd & 0x04) m_dsp.dma_autoinit = 1; if(mode & 0x10) m_dsp.flags |= SIGNED; if(mode & 0x20) - { m_dsp.flags |= STEREO; + if((cmd & 0xf0) == 0xb0) + { + m_dsp.flags |= SIXTEENBIT; m_dsp.dma_length <<= 1; + drq16_w(1); } + else + drq_w(1); m_dsp.dma_transferred = 0; m_dsp.dma_timer_started = false; m_dsp.dma_throttled = false; diff --git a/src/devices/bus/neogeo/cmc.cpp b/src/devices/bus/neogeo/cmc.cpp index 841244c478e..a6e6265c12f 100644 --- a/src/devices/bus/neogeo/cmc.cpp +++ b/src/devices/bus/neogeo/cmc.cpp @@ -251,19 +251,23 @@ void neogeo_cmc_kof2000n_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_JOCKEYGP_CART, neogeo_cmc_jockeygp_cart_device, "neocart_jockeygp", "Neo Geo Jockey GP CMC50 Cart") neogeo_cmc_jockeygp_cart_device::neogeo_cmc_jockeygp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_JOCKEYGP_CART, tag, owner, clock) + neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_JOCKEYGP_CART, tag, owner, clock), + m_nvram(*this, "nvram") { } void neogeo_cmc_jockeygp_cart_device::device_start() { - save_item(NAME(m_ram)); + m_ram = make_unique_clear<uint16_t[]>(0x2000/2); + m_nvram->set_base(m_ram.get(), 0x2000); + save_pointer(NAME(m_ram), 0x2000/2); } -void neogeo_cmc_jockeygp_cart_device::device_reset() +void neogeo_cmc_jockeygp_cart_device::device_add_mconfig(machine_config &config) { - memset(m_ram, 0, 0x2000); + neogeo_cmc_cart_device::device_add_mconfig(config); + NVRAM(config, m_nvram); } void neogeo_cmc_jockeygp_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) diff --git a/src/devices/bus/neogeo/cmc.h b/src/devices/bus/neogeo/cmc.h index 88b1c27cd9f..bba8251d2e5 100644 --- a/src/devices/bus/neogeo/cmc.h +++ b/src/devices/bus/neogeo/cmc.h @@ -8,6 +8,7 @@ #include "slot.h" #include "rom.h" #include "prot_cmc.h" +#include "machine/nvram.h" // ======================> neogeo_cmc_cart_device @@ -218,10 +219,13 @@ public: protected: virtual void device_start() override; - virtual void device_reset() override; + + virtual void device_add_mconfig(machine_config &config) override; private: - uint16_t m_ram[0x1000]; + std::unique_ptr<uint16_t[]> m_ram; + + required_device<nvram_device> m_nvram; }; DECLARE_DEVICE_TYPE(NEOGEO_CMC_JOCKEYGP_CART, neogeo_cmc_jockeygp_cart_device) diff --git a/src/devices/bus/neogeo/rom.cpp b/src/devices/bus/neogeo/rom.cpp index 10c61858386..0f54a808cef 100644 --- a/src/devices/bus/neogeo/rom.cpp +++ b/src/devices/bus/neogeo/rom.cpp @@ -73,17 +73,19 @@ WRITE16_MEMBER(neogeo_rom_device::banksel_w) DEFINE_DEVICE_TYPE(NEOGEO_VLINER_CART, neogeo_vliner_cart_device, "neocart_vliner", "Neo Geo V-Liner Cart") neogeo_vliner_cart_device::neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - neogeo_rom_device(mconfig, NEOGEO_VLINER_CART, tag, owner, clock) + neogeo_rom_device(mconfig, NEOGEO_VLINER_CART, tag, owner, clock), + m_nvram(*this, "nvram") { } - void neogeo_vliner_cart_device::device_start() { - save_item(NAME(m_cart_ram)); + m_cart_ram = make_unique_clear<uint16_t[]>(0x2000/2); + m_nvram->set_base(m_cart_ram.get(), 0x2000); + save_pointer(NAME(m_cart_ram), 0x2000/2); } -void neogeo_vliner_cart_device::device_reset() +void neogeo_vliner_cart_device::device_add_mconfig(machine_config &config) { - memset(m_cart_ram, 0, 0x2000); + NVRAM(config, m_nvram); } diff --git a/src/devices/bus/neogeo/rom.h b/src/devices/bus/neogeo/rom.h index 17efc4da4a7..1f62a890859 100644 --- a/src/devices/bus/neogeo/rom.h +++ b/src/devices/bus/neogeo/rom.h @@ -6,6 +6,7 @@ #pragma once #include "slot.h" +#include "machine/nvram.h" // ======================> neogeo_rom_device @@ -50,10 +51,13 @@ public: protected: virtual void device_start() override; - virtual void device_reset() override; + + virtual void device_add_mconfig(machine_config &config) override; private: - uint16_t m_cart_ram[0x1000]; + std::unique_ptr<uint16_t[]> m_cart_ram; + + required_device<nvram_device> m_nvram; }; DECLARE_DEVICE_TYPE(NEOGEO_VLINER_CART, neogeo_vliner_cart_device) diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp index f85f198f257..4276378bf00 100644 --- a/src/devices/bus/snes/snes_slot.cpp +++ b/src/devices/bus/snes/snes_slot.cpp @@ -225,7 +225,8 @@ base_sns_cart_slot_device::~base_sns_cart_slot_device() void base_sns_cart_slot_device::device_start() { m_cart = dynamic_cast<device_sns_cart_interface *>(get_card_device()); - m_cart->m_slot = this; + if (m_cart != nullptr) + m_cart->m_slot = this; m_irq_callback.resolve_safe(); } diff --git a/src/devices/bus/uts_kbd/extw.cpp b/src/devices/bus/uts_kbd/extw.cpp new file mode 100644 index 00000000000..e2d0b7a6aa7 --- /dev/null +++ b/src/devices/bus/uts_kbd/extw.cpp @@ -0,0 +1,285 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Sperry Univac UTS Expanded Typewriter Keyboard + + This is the default keyboard for the UTS 10 and UTS 20, though the + latter's manual claims that "SYS MODE" and "WS MODE" have no function. + + The LED is located on the LOCK key, but also responds to either shift + key being pressed (which also releases the shift lock). + + The keyboard controller is a custom 48-pin DIP marked: + + P60515 + L7340660 + 20-90039-000 + © INTEL '84 + + This is likely a hybrid ASIC integrating a high-speed 8035-like core + with at least one of the custom drivers/receivers present in other + Keytronic keyboards. + + There seems to be a slight timing error in the transmit routine which + causes data bits to be shifted out one 64th of a bit time too quickly. + +***************************************************************************/ + +#include "emu.h" +#include "cpu/mcs48/mcs48.h" +#include "bus/uts_kbd/extw.h" + +DEFINE_DEVICE_TYPE(UTS_EXTW_KEYBOARD, uts_extw_keyboard_device, "uts_extw", "UTS Expanded Typewriter Keyboard (F4725-25)") + +uts_extw_keyboard_device::uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, UTS_EXTW_KEYBOARD, tag, owner, clock) + , device_uts_keyboard_interface(mconfig, *this) + , m_keys(*this, "KEY%X", 0U) + , m_shift_led(*this, "shift_led") + , m_p1_output(0xff) + , m_p2_output(0xff) + , m_shift_register(0xff) + , m_ready_line(true) + , m_prog_line(true) +{ +} + +void uts_extw_keyboard_device::device_start() +{ + m_shift_led.resolve(); + + save_item(NAME(m_p1_output)); + save_item(NAME(m_p2_output)); + save_item(NAME(m_shift_register)); + save_item(NAME(m_ready_line)); + save_item(NAME(m_prog_line)); +} + +WRITE_LINE_MEMBER(uts_extw_keyboard_device::ready_w) +{ + m_ready_line = bool(state); +} + +u8 uts_extw_keyboard_device::p1_r() +{ + return m_ready_line ? 0xf7 : 0xff; +} + +void uts_extw_keyboard_device::p1_w(u8 data) +{ + write_rxd(!BIT(data, 2)); + + if (!BIT(m_p1_output, 0) && BIT(data, 0)) + m_shift_register = (m_shift_register >> 1) | (m_shift_register & 0x01) << 7; + + // P11 = hysteresis control? + + m_p1_output = data; +} + +void uts_extw_keyboard_device::p2_w(u8 data) +{ + m_shift_led = !BIT(data, 4); + m_p2_output = data; +} + +void uts_extw_keyboard_device::t0_clock(u32 clk) +{ +} + +READ_LINE_MEMBER(uts_extw_keyboard_device::t1_r) +{ + return BIT(m_shift_register, 7); +} + +WRITE_LINE_MEMBER(uts_extw_keyboard_device::prog_w) +{ + if (!m_prog_line && state) + { + u8 n = m_p2_output & 0x0f; + m_shift_register = m_keys[n]->read(); + } + + m_prog_line = bool(state); +} + +static INPUT_PORTS_START(uts_extw) + PORT_START("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E F15") PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(UCHAR_MAMEKEY(F15)) PORT_CODE(KEYCODE_E) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('3') PORT_CHAR('#') PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CODE(KEYCODE_3) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('2') PORT_CHAR('"') PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CODE(KEYCODE_2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W F14") PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(UCHAR_MAMEKEY(F14)) PORT_CODE(KEYCODE_W) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CHAR('s') PORT_CHAR('S') PORT_CODE(KEYCODE_S) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CHAR('a') PORT_CHAR('A') PORT_CODE(KEYCODE_A) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CHAR('x') PORT_CHAR('X') PORT_CODE(KEYCODE_X) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CHAR('z') PORT_CHAR('Z') PORT_CODE(KEYCODE_Z) + + PORT_START("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab Back") PORT_CODE(KEYCODE_RCONTROL) // ⇤ + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(0x08) PORT_CODE(KEYCODE_BACKSPACE) // doesn't work on uts10? + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('^') PORT_CHAR('~') PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_CODE(KEYCODE_EQUALS) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ { Ws Mode") PORT_CHAR('[') PORT_CHAR('{') PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(']') PORT_CHAR('}') PORT_CODE(KEYCODE_BACKSLASH) // between : and return key + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(':') PORT_CHAR('*') PORT_CODE(KEYCODE_QUOTE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(0x0d) PORT_CODE(KEYCODE_ENTER) // ↵ + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) + + PORT_START("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ \\ Sys Mode") PORT_CHAR('@') PORT_CHAR('\\') PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('/') PORT_CHAR('?') PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_CODE(KEYCODE_MINUS) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('0') PORT_CHAR('=') PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_CODE(KEYCODE_0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P F22") PORT_CHAR('p') PORT_CHAR('P') PORT_CODE(KEYCODE_P) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(';') PORT_CHAR('+') PORT_CODE(KEYCODE_COLON) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", ,") PORT_CHAR(',') PORT_CODE(KEYCODE_COMMA) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('-') PORT_CHAR('_') PORT_CODE(KEYCODE_SLASH) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". .") PORT_CHAR('.') PORT_CODE(KEYCODE_STOP) + + PORT_START("KEY3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U F19") PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(UCHAR_MAMEKEY(F19)) PORT_CODE(KEYCODE_U) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('7') PORT_CHAR('\'') PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CODE(KEYCODE_7) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('6') PORT_CHAR('&') PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_CODE(KEYCODE_6) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y F18") PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(UCHAR_MAMEKEY(F18)) PORT_CODE(KEYCODE_Y) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CHAR('h') PORT_CHAR('H') PORT_CODE(KEYCODE_H) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CHAR('g') PORT_CHAR('G') PORT_CODE(KEYCODE_G) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CHAR('n') PORT_CHAR('N') PORT_CODE(KEYCODE_N) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CHAR('b') PORT_CHAR('B') PORT_CODE(KEYCODE_B) + + PORT_START("KEY4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SOE \xe2\x96\xb6 Tab Set") PORT_CODE(KEYCODE_LALT) // ▶ + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Insert in Line Insert in Disp") PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_CODE(KEYCODE_INSERT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete in Line Delete in Disp") PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cursor to Home") PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CODE(KEYCODE_HOME) // ↖ + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CODE(KEYCODE_UP) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CODE(KEYCODE_DOWN) + + PORT_START("KEY5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CODE(KEYCODE_0_PAD) + + PORT_START("KEY6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) PORT_CODE(KEYCODE_PLUS_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_CODE(KEYCODE_MINUS_PAD) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) PORT_CODE(KEYCODE_DEL_PAD) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(TAB_PAD)) PORT_CODE(KEYCODE_ENTER_PAD) // ⇥ + + PORT_START("KEY7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q F13") PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(UCHAR_MAMEKEY(F13)) PORT_CODE(KEYCODE_Q) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('1') PORT_CHAR('!') PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CODE(KEYCODE_1) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('|') PORT_CHAR('`') PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab Forward") PORT_CHAR(0x09) PORT_CODE(KEYCODE_TAB) // ⇥ + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Fctn") PORT_CHAR(UCHAR_SHIFT_2) PORT_CODE(KEYCODE_LCONTROL) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Lock") PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CODE(KEYCODE_CAPSLOCK) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('<') PORT_CHAR('>') PORT_CODE(KEYCODE_BACKSLASH2) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CHAR(UCHAR_SHIFT_1) PORT_CODE(KEYCODE_LSHIFT) + + PORT_START("KEY8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FF Disp 1-2") PORT_CODE(KEYCODE_F3) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0xDA") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0xD8") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LF Hang Up") PORT_CODE(KEYCODE_F2) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Dup") PORT_CODE(KEYCODE_F1) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete Line Insert Line") PORT_CODE(KEYCODE_ESC) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0xC4") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0x96") + + PORT_START("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T F17") PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(UCHAR_MAMEKEY(F17)) PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('5') PORT_CHAR('%') PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CODE(KEYCODE_5) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('4') PORT_CHAR('$') PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CODE(KEYCODE_4) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R F16") PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(UCHAR_MAMEKEY(F16)) PORT_CODE(KEYCODE_R) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CHAR('f') PORT_CHAR('F') PORT_CODE(KEYCODE_F) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CHAR('d') PORT_CHAR('D') PORT_CODE(KEYCODE_D) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CHAR('v') PORT_CHAR('V') PORT_CODE(KEYCODE_V) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CHAR('c') PORT_CHAR('C') PORT_CODE(KEYCODE_C) + + PORT_START("KEYA") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0x07") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0xDC") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Xmit") PORT_CODE(KEYCODE_F12) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Print Ctl Page") PORT_CODE(KEYCODE_F10) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FCC Gen") PORT_CODE(KEYCODE_F8) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Key 0x9C") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Xfer Char Erase") PORT_CODE(KEYCODE_F9) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(' ') PORT_CODE(KEYCODE_SPACE) + + PORT_START("KEYB") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O F21") PORT_CHAR('o') PORT_CHAR('O') PORT_CODE(KEYCODE_O) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('9') PORT_CHAR(')') PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_CODE(KEYCODE_9) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('8') PORT_CHAR('(') PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CODE(KEYCODE_8) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I F20") PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(UCHAR_MAMEKEY(F20)) PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CHAR('k') PORT_CHAR('K') PORT_CODE(KEYCODE_K) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CHAR('l') PORT_CHAR('L') PORT_CODE(KEYCODE_L) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CHAR('j') PORT_CHAR('J') PORT_CODE(KEYCODE_J) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CHAR('m') PORT_CHAR('M') PORT_CODE(KEYCODE_M) + + PORT_START("KEYC") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEYD") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEYE") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEYF") + PORT_DIPNAME(0x0f, 0x0f, "National Layout") + PORT_DIPSETTING(0x0f, "USA/UK English") + PORT_DIPSETTING(0x0d, "German (QWERTZ)") + PORT_DIPSETTING(0x0c, "European A") + PORT_DIPSETTING(0x0b, "European B") // Swedish/Finnish? + PORT_DIPSETTING(0x0a, "European C") + PORT_DIPSETTING(0x09, "European D") // Spanish? + PORT_DIPSETTING(0x08, "European E") + PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + +ioport_constructor uts_extw_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(uts_extw); +} + +void uts_extw_keyboard_device::prog_map(address_map &map) +{ + map(0x000, 0x7ff).rom().region("kbdc", 0); +} + +void uts_extw_keyboard_device::ext_map(address_map &map) +{ + map(0x00, 0xff).nopr(); // read only once, at reset time +} + +void uts_extw_keyboard_device::device_add_mconfig(machine_config &config) +{ + mcs48_cpu_device &kbdc(I8035(config, "kbdc", 9.216_MHz_XTAL)); // not a standard 8035; see notes + kbdc.set_addrmap(AS_PROGRAM, &uts_extw_keyboard_device::prog_map); + kbdc.set_addrmap(AS_IO, &uts_extw_keyboard_device::ext_map); + kbdc.p1_in_cb().set(FUNC(uts_extw_keyboard_device::p1_r)); + kbdc.p1_out_cb().set(FUNC(uts_extw_keyboard_device::p1_w)); + kbdc.p2_out_cb().set(FUNC(uts_extw_keyboard_device::p2_w)); + kbdc.set_t0_clk_cb(FUNC(uts_extw_keyboard_device::t0_clock)); + kbdc.t1_in_cb().set(FUNC(uts_extw_keyboard_device::t1_r)); + kbdc.prog_out_cb().set(FUNC(uts_extw_keyboard_device::prog_w)); +} + +ROM_START(uts_extw) + ROM_REGION(0x800, "kbdc", 0) + ROM_LOAD("2716264.bin", 0x000, 0x800, CRC(75e188aa) SHA1(a6486576525f7eec617fd7f9db469063f8c357fc)) // "© 1985 Keytronic" +ROM_END + +const tiny_rom_entry *uts_extw_keyboard_device::device_rom_region() const +{ + return ROM_NAME(uts_extw); +} diff --git a/src/devices/bus/uts_kbd/extw.h b/src/devices/bus/uts_kbd/extw.h new file mode 100644 index 00000000000..21599139ec1 --- /dev/null +++ b/src/devices/bus/uts_kbd/extw.h @@ -0,0 +1,47 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#ifndef MAME_BUS_UTS_KBD_EXTW_H +#define MAME_BUS_UTS_KBD_EXTW_H + +#pragma once + +#include "bus/uts_kbd/uts_kbd.h" + +class uts_extw_keyboard_device : public device_t, public device_uts_keyboard_interface +{ +public: + uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual DECLARE_WRITE_LINE_MEMBER(ready_w) override; + + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + u8 p1_r(); + void p1_w(u8 data); + void p2_w(u8 data); + void t0_clock(u32 clk); + DECLARE_READ_LINE_MEMBER(t1_r); + DECLARE_WRITE_LINE_MEMBER(prog_w); + + void prog_map(address_map &map); + void ext_map(address_map &map); + + required_ioport_array<16> m_keys; + output_finder<> m_shift_led; + + u8 m_p1_output; + u8 m_p2_output; + u8 m_shift_register; + bool m_ready_line; + bool m_prog_line; +}; + +DECLARE_DEVICE_TYPE(UTS_EXTW_KEYBOARD, uts_extw_keyboard_device) + +#endif // MAME_BUS_UTS_KBD_EXTW_H diff --git a/src/devices/bus/uts_kbd/uts_kbd.cpp b/src/devices/bus/uts_kbd/uts_kbd.cpp new file mode 100644 index 00000000000..df73749823e --- /dev/null +++ b/src/devices/bus/uts_kbd/uts_kbd.cpp @@ -0,0 +1,80 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Sperry Univac UTS series keyboard port + + The UTS 20 System Description presents four types of keyboards that + may be connected to the terminal as auxiliary input devices: + - Typewriter Keyboard + - Expanded Typewriter Keyboard + - Katakana/English Keyboard + - UTS 400-Format Keyboard + + A Magnetic Stripe Reader which can read ABA or IATA data is another + device which can be connected to the keyboard input. This apparently + includes a pass-through keyboard connector. + + Keyboard input is transmitted serially at 9600 baud, using 8 data bits, + 1 stop bit and odd parity. A two-byte sequence is sent for each key, + with the (non-ASCII) keycode being contained in the second byte. The + only other active line appears to be a ready signal (assumed to be + active high), which the terminal drives to synchronize transmissions. + +***************************************************************************/ + +#include "emu.h" +#include "bus/uts_kbd/uts_kbd.h" + +#include "bus/uts_kbd/extw.h" + +//************************************************************************** +// UTS KEYBOARD PORT DEVICE +//************************************************************************** + +DEFINE_DEVICE_TYPE(UTS_KEYBOARD, uts_keyboard_port_device, "uts_kbd", "UTS Keyboard Port") + +uts_keyboard_port_device::uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, UTS_KEYBOARD, tag, owner, clock) + , device_slot_interface(mconfig, *this) + , m_rxd_callback(*this) + , m_kbd(nullptr) +{ +} + +void uts_keyboard_port_device::device_config_complete() +{ + m_kbd = dynamic_cast<device_uts_keyboard_interface *>(get_card_device()); +} + +void uts_keyboard_port_device::device_resolve_objects() +{ + m_rxd_callback.resolve_safe(); +} + +void uts_keyboard_port_device::device_start() +{ +} + +//************************************************************************** +// UTS KEYBOARD INTERFACE +//************************************************************************** + +device_uts_keyboard_interface::device_uts_keyboard_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device) + , m_port(device, DEVICE_SELF_OWNER) +{ +} + +device_uts_keyboard_interface::~device_uts_keyboard_interface() +{ +} + +//************************************************************************** +// KEYBOARD OPTIONS +//************************************************************************** + +void uts_keyboards(device_slot_interface &slot) +{ + slot.option_add("extw", UTS_EXTW_KEYBOARD); +} diff --git a/src/devices/bus/uts_kbd/uts_kbd.h b/src/devices/bus/uts_kbd/uts_kbd.h new file mode 100644 index 00000000000..bed850d4697 --- /dev/null +++ b/src/devices/bus/uts_kbd/uts_kbd.h @@ -0,0 +1,100 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Sperry Univac UTS series keyboard port + +***************************************************************************/ + +#ifndef MAME_BUS_UTS_KBD_H +#define MAME_BUS_UTS_KBD_H 1 + +#pragma once + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// forward declaration +class device_uts_keyboard_interface; + +// ======================> uts_keyboard_port_device + +class uts_keyboard_port_device : public device_t, public device_slot_interface +{ + friend class device_uts_keyboard_interface; + +public: + // construction/destruction + uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + template <typename T> + uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) + : uts_keyboard_port_device(mconfig, tag, owner, 0U) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } + + // configuration + auto rxd_callback() { return m_rxd_callback.bind(); } + + // line handler + inline DECLARE_WRITE_LINE_MEMBER(ready_w); + +protected: + // device-level overrides + virtual void device_config_complete() override; + virtual void device_resolve_objects() override; + virtual void device_start() override; + + // called from keyboard + DECLARE_WRITE_LINE_MEMBER(write_rxd) { m_rxd_callback(state); } + +private: + // user callback + devcb_write_line m_rxd_callback; + + // selected keyboard + device_uts_keyboard_interface *m_kbd; +}; + +// ======================> device_uts_keyboard_interface + +class device_uts_keyboard_interface : public device_slot_card_interface +{ + friend class uts_keyboard_port_device; + +protected: + // construction/destruction + device_uts_keyboard_interface(const machine_config &mconfig, device_t &device); + virtual ~device_uts_keyboard_interface(); + + DECLARE_WRITE_LINE_MEMBER(write_rxd) { m_port->write_rxd(state); } + + virtual DECLARE_WRITE_LINE_MEMBER(ready_w) = 0; + +private: + // parent port + required_device<uts_keyboard_port_device> m_port; +}; + +// type definition +DECLARE_DEVICE_TYPE(UTS_KEYBOARD, uts_keyboard_port_device) + +// standard options +extern void uts_keyboards(device_slot_interface &slot); + +//************************************************************************** +// INLINE FUNCTIONS +//************************************************************************** + +WRITE_LINE_MEMBER(uts_keyboard_port_device::ready_w) +{ + if (m_kbd != nullptr) + m_kbd->ready_w(state); +} + +#endif // MAME_BUS_UTS_KBD_H diff --git a/src/devices/cpu/alto2/a2ether.cpp b/src/devices/cpu/alto2/a2ether.cpp index 7af15ffbad0..2c1a3d56a89 100644 --- a/src/devices/cpu/alto2/a2ether.cpp +++ b/src/devices/cpu/alto2/a2ether.cpp @@ -522,7 +522,7 @@ void alto2_cpu_device::rx_breath_of_life(void* ptr, int32_t arg) m_eth.rx_timer->adjust(attotime::from_seconds(m_eth.breath_of_life), 0); } else { // receive at a rate of 5.44us per word - m_eth.rx_timer->adjust(attotime::from_usec(5.44), arg); + m_eth.rx_timer->adjust(attotime::from_nsec(5440), arg); } eth_wakeup(); } @@ -557,10 +557,10 @@ void alto2_cpu_device::tx_packet(void* ptr, int32_t arg) // the FIFO is empty now: clear the OBUSY and WLF flip flops PUT_ETH_OBUSY(m_eth.status, 0); PUT_ETH_WLF(m_eth.status, 0); - m_eth.tx_timer->adjust(attotime::from_usec(5.44), -1); + m_eth.tx_timer->adjust(attotime::from_nsec(5440), -1); } else { // transmit the next word after 5.44us - m_eth.tx_timer->adjust(attotime::from_usec(5.44), arg + 1); + m_eth.tx_timer->adjust(attotime::from_nsec(5440), arg + 1); } eth_wakeup(); } @@ -722,7 +722,7 @@ void alto2_cpu_device::f2_late_eodfct() uint8_t a49 = m_ether_a49[16 * m_eth.fifo_wr + m_eth.fifo_rd]; if (0 == BF(a49)) { m_task_wakeup &= ~(1 << task_ether); - m_eth.tx_timer->adjust(attotime::from_usec(5.44), 0); + m_eth.tx_timer->adjust(attotime::from_nsec(5440), 0); } } @@ -774,7 +774,7 @@ void alto2_cpu_device::f2_late_eefct() PUT_ETH_OBUSY(m_eth.status, 1); PUT_ETH_OEOT(m_eth.status, 1); // end transmitting the packet - m_eth.tx_timer->adjust(attotime::from_usec(5.44), -1); + m_eth.tx_timer->adjust(attotime::from_nsec(5440), -1); eth_wakeup(); } diff --git a/src/devices/cpu/mips/mips1.cpp b/src/devices/cpu/mips/mips1.cpp index afcf8d13d92..ff629e04bcc 100644 --- a/src/devices/cpu/mips/mips1.cpp +++ b/src/devices/cpu/mips/mips1.cpp @@ -318,98 +318,105 @@ void mips1core_device_base::generate_exception(u32 exception, bool refill) "mount", "hdwconf", "exportfs", "nfsfh_open", "libattach", "libdetach" }; + static char const *const msg_syscalls[] = { "msgget", "msgctl", "msgrcv", "msgsnd" }; + static char const *const shm_syscalls[] = { "shmat", "shmctl", "shmdt", "shmget" }; + static char const *const sem_syscalls[] = { "semctl", "semget", "semop" }; + static char const *const mips_syscalls[] = { "mipskopt", "mipshwconf", "mipsgetrusage", "mipswait", "mipscacheflush", "mipscachectl" }; + int const asid = (m_cpr[0][COP0_EntryHi] & EH_ASID) >> 6; switch (m_r[2]) { case 1000: // indirect switch (m_r[4]) { - case 2151: // sysmips + case 1049: // msgsys + LOGMASKED(LOG_RISCOS, "asid %d syscall msgsys:%s() (%s)\n", + asid, (m_r[5] < ARRAY_LENGTH(msg_syscalls)) ? msg_syscalls[m_r[5]] : "unknown", machine().describe_context()); + break; + + case 1052: // shmsys + LOGMASKED(LOG_RISCOS, "asid %d syscall shmsys:%s() (%s)\n", + asid, (m_r[5] < ARRAY_LENGTH(shm_syscalls)) ? shm_syscalls[m_r[5]] : "unknown", machine().describe_context()); + break; + + case 1053: // semsys + LOGMASKED(LOG_RISCOS, "asid %d syscall semsys:%s() (%s)\n", + asid, (m_r[5] < ARRAY_LENGTH(sem_syscalls)) ? sem_syscalls[m_r[5]] : "unknown", machine().describe_context()); + break; + + case 2151: // bsd_sysmips switch (m_r[5]) { case 0x100: // mipskopt - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipskopt(\"%s\") (%s)\n", + LOGMASKED(LOG_RISCOS, "asid %d syscall bsd_sysmips:mipskopt(\"%s\") (%s)\n", asid, debug_string(m_r[6]), machine().describe_context()); break; - case 0x101: // mipshwconf - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipshwconf() (%s)\n", - asid, machine().describe_context()); - break; - - case 0x102: // mipsgetrusage - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipsgetrusage() (%s)\n", - asid, machine().describe_context()); - break; - - case 0x103: // mipswait - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipswait() (%s)\n", - asid, machine().describe_context()); - break; - - case 0x104: // mipscacheflush - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipscacheflush() (%s)\n", - asid, machine().describe_context()); - break; - - case 0x105: // mipscachectl - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:mipscachectl() (%s)\n", - asid, machine().describe_context()); - break; - default: - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:sysmips:unknown 0x%x (%s)\n", - asid, m_r[5], machine().describe_context()); + if ((m_r[5] > 0x100) && (m_r[5] - 0x100) < ARRAY_LENGTH(mips_syscalls)) + LOGMASKED(LOG_RISCOS, "asid %d syscall bsd_sysmips:%s() (%s)\n", + asid, mips_syscalls[m_r[5] - 0x100], machine().describe_context()); + else + LOGMASKED(LOG_RISCOS, "asid %d syscall bsd_sysmips:unknown %d (%s)\n", + asid, m_r[5], machine().describe_context()); break; } break; default: if ((m_r[4] > 2000) && (m_r[4] - 2000 < ARRAY_LENGTH(bsd_syscalls)) && bsd_syscalls[m_r[4] - 2000]) - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:%s() (%s)\n", + LOGMASKED(LOG_RISCOS, "asid %d syscall bsd_%s() (%s)\n", asid, bsd_syscalls[m_r[4] - 2000], machine().describe_context()); else - LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:unknown 0x%x (%s)\n", + LOGMASKED(LOG_RISCOS, "asid %d syscall indirect:unknown %d (%s)\n", asid, m_r[4], machine().describe_context()); break; } break; - case 1005: // open - LOGMASKED(LOG_RISCOS, "asid %d syscall open(\"%s\") (%s)\n", - asid, debug_string(m_r[4]), machine().describe_context()); + case 1003: // read + case 1006: // close + case 1054: // ioctl + case 1169: // fcntl + LOGMASKED(LOG_RISCOS, "asid %d syscall %s(%d) (%s)\n", + asid, sysv_syscalls[m_r[2] - 1000], m_r[4], machine().describe_context()); break; - case 1009: // link - LOGMASKED(LOG_RISCOS, "asid %d syscall link(\"%s\", \"%s\") (%s)\n", - asid, debug_string(m_r[4]), debug_string(m_r[5]), machine().describe_context()); + case 1004: // write + if (m_r[4] == 1 || m_r[4] == 2) + LOGMASKED(LOG_RISCOS, "asid %d syscall %s(%d, \"%s\") (%s)\n", + asid, sysv_syscalls[m_r[2] - 1000], m_r[4], debug_string(m_r[5], m_r[6]), machine().describe_context()); + else + LOGMASKED(LOG_RISCOS, "asid %d syscall %s(%d) (%s)\n", + asid, sysv_syscalls[m_r[2] - 1000], m_r[4], machine().describe_context()); break; + case 1005: // open + case 1008: // creat + case 1009: // link case 1010: // unlink - LOGMASKED(LOG_RISCOS, "asid %d syscall unlink(\"%s\") (%s)\n", - asid, debug_string(m_r[4]), machine().describe_context()); - break; - + case 1012: // chdir case 1018: // stat - LOGMASKED(LOG_RISCOS, "asid %d syscall stat(\"%s\") (%s)\n", - asid, debug_string(m_r[4]), machine().describe_context()); + case 1033: // access + LOGMASKED(LOG_RISCOS, "asid %d syscall %s(\"%s\") (%s)\n", + asid, sysv_syscalls[m_r[2] - 1000], debug_string(m_r[4]), machine().describe_context()); break; case 1059: // execve - LOGMASKED(LOG_RISCOS, "asid %d syscall execve(\"%s\", [ %s ]) (%s)\n", - asid, debug_string(m_r[4]), debug_string_array(m_r[5]), machine().describe_context()); + LOGMASKED(LOG_RISCOS, "asid %d syscall execve(\"%s\", [ %s ], [ %s ]) (%s)\n", + asid, debug_string(m_r[4]), debug_string_array(m_r[5]), debug_string_array(m_r[6]), machine().describe_context()); break; case 1060: // umask - LOGMASKED(LOG_RISCOS, "asid %d syscall umask(0%o) (%s)\n", - asid, m_r[4], machine().describe_context()); + LOGMASKED(LOG_RISCOS, "asid %d syscall umask(%#o) (%s)\n", + asid, m_r[4] & 0777, machine().describe_context()); break; default: if ((m_r[2] > 1000) && (m_r[2] - 1000 < ARRAY_LENGTH(sysv_syscalls)) && sysv_syscalls[m_r[2] - 1000]) LOGMASKED(LOG_RISCOS, "asid %d syscall %s() (%s)\n", asid, sysv_syscalls[m_r[2] - 1000], machine().describe_context()); else - LOGMASKED(LOG_RISCOS, "asid %d syscall unknown 0x%x (%s)\n", asid, m_r[2], machine().describe_context()); + LOGMASKED(LOG_RISCOS, "asid %d syscall unknown %d (%s)\n", asid, m_r[2], machine().describe_context()); break; } } @@ -429,7 +436,7 @@ void mips1core_device_base::generate_exception(u32 exception, bool refill) m_branch_state = EXCEPTION; // shift the exception bits - SR = (SR & ~SR_KUIE) | ((SR << 2) & (SR_KUo | SR_IEo | SR_KUp | SR_IEp)); + SR = (SR & ~SR_KUIE) | ((SR << 2) & SR_KUIEop); if (refill) m_pc = (SR & SR_BEV) ? 0xbfc00100 : 0x80000000; @@ -441,16 +448,16 @@ void mips1core_device_base::generate_exception(u32 exception, bool refill) void mips1core_device_base::check_irqs() { - if ((CAUSE & SR & 0xff00) && (SR & SR_IEc)) + if ((CAUSE & SR & SR_IM) && (SR & SR_IEc)) generate_exception(EXCEPTION_INTERRUPT); } void mips1core_device_base::set_irq_line(int irqline, int state) { if (state != CLEAR_LINE) - CAUSE |= 0x400 << irqline; + CAUSE |= CAUSE_IPEX0 << irqline; else - CAUSE &= ~(0x400 << irqline); + CAUSE &= ~(CAUSE_IPEX0 << irqline); check_irqs(); } @@ -473,7 +480,7 @@ void mips1core_device_base::set_cop0_reg(int const index, u32 const data) { if (index == COP0_Cause) { - CAUSE = (CAUSE & 0xfc00) | (data & ~0xfc00); + CAUSE = (CAUSE & CAUSE_IPEX) | (data & ~CAUSE_IPEX); // update interrupts -- software ints can occur this way check_irqs(); @@ -534,7 +541,7 @@ void mips1core_device_base::handle_cop0(u32 const op) case 0x02: /* TLBWI */ break; case 0x06: /* TLBWR */ break; case 0x08: /* TLBP */ break; - case 0x10: /* RFE */ SR = (SR & 0xfffffff0) | ((SR >> 2) & 0x0f); break; + case 0x10: /* RFE */ SR = (SR & ~SR_KUIEpc) | ((SR >> 2) & SR_KUIEpc); break; case 0x18: /* ERET */ generate_exception(EXCEPTION_INVALIDOP); break; default: generate_exception(EXCEPTION_INVALIDOP); break; } @@ -1172,7 +1179,7 @@ bool mips1_device_base::memory_translate(int spacenum, int intention, offs_t &ad return true; } - if (!machine().side_effects_disabled()) + if (!machine().side_effects_disabled() && !(intention & TRANSLATE_DEBUG_MASK)) { if (VERBOSE & LOG_TLB) { @@ -1195,26 +1202,32 @@ bool mips1_device_base::memory_translate(int spacenum, int intention, offs_t &ad return false; } -std::string mips1core_device_base::debug_string(u32 string_pointer) +std::string mips1core_device_base::debug_string(u32 string_pointer, int const limit) { auto const suppressor(machine().disable_side_effects()); bool done = false; + bool mapped = false; std::string result(""); while (!done) { done = true; - load<u8>(string_pointer++, [&done, &result](u8 byte) + load<u8>(string_pointer++, [limit, &done, &mapped, &result](u8 byte) { + mapped = true; if (byte != 0) { result += byte; - done = false; + + done = result.length() == limit; } }); } + if (!mapped) + result.assign("[unmapped]"); + return result; } diff --git a/src/devices/cpu/mips/mips1.h b/src/devices/cpu/mips/mips1.h index 343d535d059..3b1f6126e20 100644 --- a/src/devices/cpu/mips/mips1.h +++ b/src/devices/cpu/mips/mips1.h @@ -131,15 +131,28 @@ protected: SR_COP2 = 0x40000000, // coprocessor 2 usable SR_COP3 = 0x80000000, // coprocessor 3 usable - SR_KUIE = 0x0000003f, // all interrupt enable and user mode bits + SR_KUIE = 0x0000003f, // all interrupt enable and user mode bits + SR_KUIEpc = 0x0000000f, // previous and current interrupt enable and user mode bits + SR_KUIEop = 0x0000003c, // old and previous interrupt enable and user mode bits + SR_IM = 0x0000ff00, // all interrupt mask bits }; enum cause_mask : u32 { CAUSE_EXCCODE = 0x0000007c, // exception code + CAUSE_IPSW0 = 0x00000100, // software interrupt 0 pending + CAUSE_IPSW1 = 0x00000200, // software interrupt 1 pending + CAUSE_IPEX0 = 0x00000400, // external interrupt 0 pending + CAUSE_IPEX1 = 0x00000800, // external interrupt 1 pending + CAUSE_IPEX2 = 0x00001000, // external interrupt 2 pending + CAUSE_IPEX3 = 0x00002000, // external interrupt 3 pending + CAUSE_IPEX4 = 0x00004000, // external interrupt 4 pending + CAUSE_IPEX5 = 0x00008000, // external interrupt 5 pending CAUSE_IP = 0x0000ff00, // interrupt pending CAUSE_CE = 0x30000000, // co-processor error CAUSE_BD = 0x80000000, // branch delay + + CAUSE_IPEX = 0x0000fc00, // external interrupt pending }; enum entryhi_mask : u32 @@ -216,7 +229,7 @@ protected: bool fetch(u32 program_address, std::function<void(u32)> &&apply); // debug helpers - std::string debug_string(u32 string_pointer); + std::string debug_string(u32 string_pointer, int const limit = 0); std::string debug_string_array(u32 array_pointer); // address spaces diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp index 669285ccb08..1b8fbfb6a78 100644 --- a/src/devices/machine/diablo_hd.cpp +++ b/src/devices/machine/diablo_hd.cpp @@ -1324,11 +1324,9 @@ void diablo_hd_device::device_start() void diablo_hd_device::device_reset() { // free previous page cache - if (m_cache) { - for (int page = 0; page < m_pages; page++) - if (m_cache[page]) - m_cache[page] = nullptr; - } + for (int page = 0; page < m_pages; page++) + if (m_cache[page]) + m_cache[page] = nullptr; // free previous bits cache if (m_bits) { for (int page = 0; page < m_pages; page++) diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 62c62a038b6..616fec28a27 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -1,6 +1,12 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert +/* + * TODO + * - 16 bit dma order, alignment and last byte handling + * - clean up variable naming and protection + */ + #include "emu.h" #include "ncr5390.h" @@ -143,6 +149,7 @@ ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, const char *ta ncr53c94_device::ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ncr53c90a_device(mconfig, NCR53C94, tag, owner, clock) , config3(0) + , m_busmd(BUSMD_0) { } @@ -267,7 +274,7 @@ void ncr5390_device::step(bool timeout) if(win != scsi_id) { scsi_bus->data_w(scsi_refid, 0); scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); - fatalerror("need to wait for bus free\n"); + fatalerror("ncr5390_device::step need to wait for bus free\n"); } state = (state & STATE_MASK) | (ARB_ASSERT_SEL << SUB_SHIFT); scsi_bus->ctrl_w(scsi_refid, S_SEL, S_SEL); @@ -407,10 +414,9 @@ void ncr5390_device::step(bool timeout) case DISC_SEL_ARBITRATION_INIT: // wait until a command is in the fifo - if (!fifo_pos && dma_command && !(status & S_TC0)) { + if (!fifo_pos) { // dma starts after bus arbitration/selection is complete - dma_set(DMA_OUT); - step(false); + check_drq(); break; } @@ -680,7 +686,7 @@ void ncr5390_device::function_bus_complete() state = IDLE; istatus |= I_FUNCTION|I_BUS; dma_set(DMA_NONE); - drq_clear(); + check_drq(); check_irq(); } @@ -690,7 +696,7 @@ void ncr5390_device::function_complete() state = IDLE; istatus |= I_FUNCTION; dma_set(DMA_NONE); - drq_clear(); + check_drq(); check_irq(); } @@ -700,7 +706,7 @@ void ncr5390_device::bus_complete() state = IDLE; istatus |= I_BUS; dma_set(DMA_NONE); - drq_clear(); + check_drq(); check_irq(); } @@ -746,16 +752,14 @@ uint8_t ncr5390_device::fifo_pop() uint8_t r = fifo[0]; fifo_pos--; memmove(fifo, fifo+1, fifo_pos); - if((!fifo_pos) && dma_dir == DMA_OUT && !(status & S_TC0)) - drq_set(); + check_drq(); return r; } void ncr5390_device::fifo_push(uint8_t val) { fifo[fifo_pos++] = val; - if(!drq && dma_dir == DMA_IN && !(status & S_TC0)) - drq_set(); + check_drq(); } READ8_MEMBER(ncr5390_device::fifo_r) @@ -878,6 +882,7 @@ void ncr5390_device::start_command() "Select with ATN and stop sequence\n"); seq = 0; state = DISC_SEL_ARBITRATION_INIT; + dma_set(dma_command ? DMA_OUT : DMA_NONE); arbitrate(); break; @@ -896,6 +901,7 @@ void ncr5390_device::start_command() state = INIT_XFR; xfr_phase = scsi_bus->ctrl_r() & S_PHASE_MASK; dma_set(dma_command ? ((xfr_phase & S_INP) ? DMA_IN : DMA_OUT) : DMA_NONE); + check_drq(); step(false); break; @@ -936,8 +942,14 @@ void ncr5390_device::start_command() command_pop_and_chain(); break; + case CI_RESET_ATN: + LOGMASKED(LOG_COMMAND, "Reset ATN\n"); + scsi_bus->ctrl_w(scsi_refid, 0, S_ATN); + command_pop_and_chain(); + break; + default: - fatalerror("start unimplemented command %02x\n", c); + fatalerror("ncr5390_device::start_command unimplemented command %02x\n", c); } } @@ -1065,16 +1077,17 @@ WRITE8_MEMBER(ncr5390_device::clock_w) void ncr5390_device::dma_set(int dir) { dma_dir = dir; - if(dma_dir == DMA_OUT && fifo_pos != 16 && ((tcounter > fifo_pos) || !tcounter)) - drq_set(); + + // account for data already in the fifo + if (dir == DMA_OUT && fifo_pos) + decrement_tcounter(fifo_pos); } void ncr5390_device::dma_w(uint8_t val) { fifo_push(val); decrement_tcounter(); - if(fifo_pos == 16 || (status & S_TC0)) - drq_clear(); + check_drq(); step(false); } @@ -1082,34 +1095,41 @@ uint8_t ncr5390_device::dma_r() { uint8_t r = fifo_pop(); decrement_tcounter(); - if(!fifo_pos || (status & S_TC0)) - drq_clear(); + check_drq(); step(false); return r; } -void ncr5390_device::drq_set() +void ncr5390_device::check_drq() { - if(!drq) { - drq = true; - m_drq_handler(drq); + bool drq_state = drq; + + switch (dma_dir) { + case DMA_NONE: + drq_state = false; + break; + + case DMA_IN: // device to memory + drq_state = !(status & S_TC0) && fifo_pos; + break; + + case DMA_OUT: // memory to device + drq_state = !(status & S_TC0) && fifo_pos < 16; + break; } -} -void ncr5390_device::drq_clear() -{ - if(drq) { - drq = false; + if (drq_state != drq) { + drq = drq_state; m_drq_handler(drq); } } -void ncr5390_device::decrement_tcounter() +void ncr5390_device::decrement_tcounter(int count) { if (!dma_command) return; - tcounter--; + tcounter -= count; if (tcounter == 0) status |= S_TC0; } @@ -1186,3 +1206,69 @@ void ncr53c94_device::reset_soft() ncr53c90a_device::reset_soft(); } + +u16 ncr53c94_device::dma16_r() +{ + // check fifo underflow + if (fifo_pos < 2) + fatalerror("ncr53c94_device::dma16_r fifo_pos %d\n", fifo_pos); + + // pop two bytes from fifo + u16 const data = (fifo[0] << 8) | fifo[1]; + fifo_pos -= 2; + memmove(fifo, fifo + 2, fifo_pos); + + // update drq + decrement_tcounter(2); + check_drq(); + + step(false); + + return data; +} + +void ncr53c94_device::dma16_w(u16 data) +{ + // check fifo overflow + if (fifo_pos > 14) + fatalerror("ncr53c94_device::dma16_w fifo_pos %d\n", fifo_pos); + + // push two bytes into fifo + fifo[fifo_pos++] = data >> 8; + fifo[fifo_pos++] = data; + + // update drq + decrement_tcounter(2); + check_drq(); + + step(false); +} + +void ncr53c94_device::check_drq() +{ + if (m_busmd != BUSMD_0) + { + bool drq_state = drq; + + switch (dma_dir) { + case DMA_NONE: + drq_state = false; + break; + + case DMA_IN: // device to memory + drq_state = !(status & S_TC0) && fifo_pos > 1; + break; + + case DMA_OUT: // memory to device + drq_state = !(status & S_TC0) && fifo_pos < 15; + break; + } + + if (drq_state != drq) { + drq = drq_state; + m_drq_handler(drq); + } + } + else + ncr5390_device::check_drq(); +} diff --git a/src/devices/machine/ncr5390.h b/src/devices/machine/ncr5390.h index 712ec597a31..b5fa1699cb3 100644 --- a/src/devices/machine/ncr5390.h +++ b/src/devices/machine/ncr5390.h @@ -207,8 +207,7 @@ protected: bool test_mode; void dma_set(int dir); - void drq_set(); - void drq_clear(); + virtual void check_drq(); void start_command(); void step(bool timeout); @@ -222,10 +221,7 @@ protected: void command_pop_and_chain(); void check_irq(); -protected: virtual void reset_soft(); - -private: void reset_disconnect(); uint8_t fifo_pop(); @@ -236,7 +232,7 @@ private: void delay(int cycles); void delay_cycles(int cycles); - void decrement_tcounter(); + void decrement_tcounter(int count = 1); devcb_write_line m_irq_handler; devcb_write_line m_drq_handler; @@ -270,6 +266,18 @@ protected: S_INTERRUPT = 0x80, }; + enum conf2_mask : u8 + { + PGDP = 0x01, // pass through/generate data parity + PGRP = 0x02, // pass through/generate register parity + ACDPE = 0x04, // abort on command/data parity error + S2FE = 0x08, // scsi-2 features enable + TSDR = 0x10, // tri-state dma request + SBO = 0x20, // select byte order + LSP = 0x40, // latch scsi phase + DAE = 0x80, // data alignment enable + }; + private: u8 config2; }; @@ -279,6 +287,15 @@ class ncr53c94_device : public ncr53c90a_device public: ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + enum busmd_t : u8 + { + BUSMD_0 = 0, // single bus: 8-bit host, 8 bit dma + BUSMD_1 = 1, // single bus: 8 bit host, 16 bit dma + BUSMD_2 = 2, // two buses: 8 bit multiplexed host, 16 bit dma + BUSMD_3 = 3, // two buses: 8 bit host, 16 bit dma + }; + void set_busmd(busmd_t const busmd) { m_busmd = busmd; } + virtual void map(address_map &map) override; DECLARE_READ8_MEMBER(conf3_r) { return config3; }; @@ -288,13 +305,25 @@ public: virtual DECLARE_READ8_MEMBER(read) override; virtual DECLARE_WRITE8_MEMBER(write) override; + u16 dma16_r(); + void dma16_w(u16 data); + protected: + enum conf3_mask : u8 + { + BS8 = 0x01, // burst size 8 + MDM = 0x02, // modify dma mode + LBTM = 0x04, // last byte transfer mode + }; + virtual void device_start() override; virtual void reset_soft() override; + virtual void check_drq() override; private: u8 config3; u8 fifo_align; + busmd_t m_busmd; }; DECLARE_DEVICE_TYPE(NCR5390, ncr5390_device) diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 15a096a6536..137c9e6cf6c 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -1004,17 +1004,18 @@ void netlist_mame_cpu_device::device_start() state_add(STATE_GENPC, "GENPC", m_genPC).noshow(); state_add(STATE_GENPCBASE, "CURPC", m_genPC).noshow(); - for (int i=0; i < netlist().m_nets.size(); i++) + int index = 0; + for (auto &n : netlist().m_nets) { - netlist::detail::net_t *n = netlist().m_nets[i].get(); if (n->is_logic()) { - state_add(i*2, n->name().c_str(), *downcast<netlist::logic_net_t *>(n)->Q_state_ptr()); + state_add(index, n->name().c_str(), *(downcast<netlist::logic_net_t &>(*n).Q_state_ptr())); } else { - state_add(i*2+1, n->name().c_str(), *downcast<netlist::analog_net_t *>(n)->Q_Analog_state_ptr()); + state_add(index, n->name().c_str(), *(downcast<netlist::analog_net_t &>(*n).Q_Analog_state_ptr())); } + index++; } // set our instruction counter @@ -1116,15 +1117,15 @@ void netlist_mame_sound_device::device_start() //m_num_outputs = outdevs.size(); /* resort channels */ - for (int i=0; i < outdevs.size(); i++) + for (auto &outdev : outdevs) { - int chan = outdevs[i]->m_channel(); + int chan = outdev->m_channel(); - netlist().log().verbose("Output %d on channel %d", i, chan); + netlist().log().verbose("Output %s on channel %d", outdev->name(), chan); - //if (chan < 0 || chan >= MAX_OUT || chan >= outdevs.size()) - // fatalerror("illegal channel number"); - m_out[chan] = outdevs[i]; + if (chan < 0 || chan >= outdevs.size()) + fatalerror("illegal channel number"); + m_out[chan] = outdev; m_out[chan]->m_sample_time = netlist::netlist_time::from_hz(clock()); m_out[chan]->m_buffer = nullptr; m_out[chan]->m_bufsize = 0; diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index e081c2c6a17..21fcb11d1f7 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -4,92 +4,29 @@ SMC91C9X ethernet controller implementation - by Aaron Giles, Jean-François DEL NERO + by Aaron Giles, Ted Green -*************************************************************************** - - Notes: - * Connected mode working - -**************************************************************************/ +***************************************************************************/ #include "emu.h" #include "smc91c9x.h" -// Needed for netdev_count??? -#include "osdnet.h" - +#include <sstream> +#include <iomanip> /*************************************************************************** DEBUGGING ***************************************************************************/ -//#define VERBOSE 1 +#define LOG_GENERAL (1U << 0) +#define LOG_PACKETS (1U << 1) +#define LOG_TX (1U << 2) +#define LOG_RX (1U << 3) +#define LOG_FILTER (1U << 4) +//#define VERBOSE (LOG_GENERAL | LOG_PACKETS | LOG_TX | LOG_RX | LOG_FILTER) #include "logmacro.h" #define DISPLAY_STATS (0) - - -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -/* Ethernet registers - bank 0 */ -#define EREG_TCR (0*8 + 0) -#define EREG_EPH_STATUS (0*8 + 1) -#define EREG_RCR (0*8 + 2) -#define EREG_COUNTER (0*8 + 3) -#define EREG_MIR (0*8 + 4) -#define EREG_MCR (0*8 + 5) -#define EREG_BANK (0*8 + 7) - -/* Ethernet registers - bank 1 */ -#define EREG_CONFIG (1*8 + 0) -#define EREG_BASE (1*8 + 1) -#define EREG_IA0_1 (1*8 + 2) -#define EREG_IA2_3 (1*8 + 3) -#define EREG_IA4_5 (1*8 + 4) -#define EREG_GENERAL_PURP (1*8 + 5) -#define EREG_CONTROL (1*8 + 6) - -/* Ethernet registers - bank 2 */ -#define EREG_MMU_COMMAND (2*8 + 0) -#define EREG_PNR_ARR (2*8 + 1) -#define EREG_FIFO_PORTS (2*8 + 2) -#define EREG_POINTER (2*8 + 3) -#define EREG_DATA_0 (2*8 + 4) -#define EREG_DATA_1 (2*8 + 5) -#define EREG_INTERRUPT (2*8 + 6) - -/* Ethernet registers - bank 3 */ -#define EREG_MT0_1 (3*8 + 0) -#define EREG_MT2_3 (3*8 + 1) -#define EREG_MT4_5 (3*8 + 2) -#define EREG_MT6_7 (3*8 + 3) -#define EREG_MGMT (3*8 + 4) -#define EREG_REVISION (3*8 + 5) -#define EREG_ERCV (3*8 + 6) - -/* Ethernet MMU commands */ -#define ECMD_NOP 0 -#define ECMD_ALLOCATE 2 -#define ECMD_RESET_MMU 4 -#define ECMD_REMOVE_TOPFRAME_RX 6 -#define ECMD_REMOVE_TOPFRAME_TX 7 -#define ECMD_REMOVE_RELEASE_TOPFRAME_RX 8 -#define ECMD_RELEASE_PACKET 10 -#define ECMD_ENQUEUE_PACKET 12 -#define ECMD_RESET_FIFOS 14 - -/* Ethernet interrupt bits */ -#define EINT_RCV 0x01 -#define EINT_TX 0x02 -#define EINT_TX_EMPTY 0x04 -#define EINT_ALLOC 0x08 -#define EINT_RX_OVRN 0x10 -#define EINT_EPH 0x20 -#define EINT_ERCV 0x40 - /* Ethernet register names */ static const char *const ethernet_regname[64] = { @@ -107,73 +44,93 @@ static const char *const ethernet_regname[64] = DEVICE INTERFACE ***************************************************************************/ -smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +DEFINE_DEVICE_TYPE(SMC91C94, smc91c94_device, "smc91c94", "SMC91C94 Ethernet Controller") + +smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : smc91c9x_device(mconfig, SMC91C94, tag, owner, clock, dev_type::SMC91C94) +{ + m_num_ebuf = 18; +} + +DEFINE_DEVICE_TYPE(SMC91C96, smc91c96_device, "smc91c96", "SMC91C96 Ethernet Controller") + +smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : smc91c9x_device(mconfig, SMC91C96, tag, owner, clock, dev_type::SMC91C96) +{ + m_num_ebuf = 24; +} + +smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10.0f) + , m_device_type(device_type) + , m_num_ebuf(16) , m_irq_handler(*this) , m_link_unconnected(false) { } +const u8 smc91c9x_device::ETH_BROADCAST[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +const u8 smc91c9x_device::WMS_OUI[] = { 0x00, 0xA0, 0xAF }; + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- void smc91c9x_device::device_start() { + // Allocate main buffer + m_buffer = std::make_unique<u8[]>(ETHER_BUFFER_SIZE * m_num_ebuf); + // TX timer - m_tx_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(smc91c9x_device::send_frame), this)); + m_tx_poll = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(smc91c9x_device::tx_poll), this)); m_irq_handler.resolve_safe(); + // These registers don't get cleared on reset + m_reg[B1_CONFIG] = 0x0030; m_regmask[B1_CONFIG] = 0x17c6; + m_reg[B1_BASE] = 0x1866; m_regmask[B1_BASE] = 0xfffe; + + m_reg[B1_IA0_1] = 0x0000; m_regmask[B1_IA0_1] = 0xffff; + m_reg[B1_IA2_3] = 0x0000; m_regmask[B1_IA2_3] = 0xffff; + m_reg[B1_IA4_5] = 0x0000; m_regmask[B1_IA4_5] = 0xffff; + + // Revision is set based on chip type + m_regmask[B3_REVISION] = 0x0000; + if (m_device_type == dev_type::SMC91C94) + m_reg[B3_REVISION] = 0x3345; + else if (m_device_type == dev_type::SMC91C96) + m_reg[B3_REVISION] = 0x3346; + else + fatalerror("device_start: Unknown device type\n"); + /* register ide states */ save_item(NAME(m_reg)); save_item(NAME(m_regmask)); save_item(NAME(m_irq_state)); - save_item(NAME(m_buffer)); + save_pointer(NAME(m_buffer), ETHER_BUFFER_SIZE * m_num_ebuf); save_item(NAME(m_sent)); save_item(NAME(m_recd)); save_item(NAME(m_alloc_rx)); save_item(NAME(m_alloc_tx)); - // Save vector data for proper save state restoration - save_item(NAME(m_comp_rx_data)); - save_item(NAME(m_comp_tx_data)); - save_item(NAME(m_trans_tx_data)); - // Save vector sizes for proper save state restoration - save_item(NAME(m_comp_tx_size)); - save_item(NAME(m_comp_rx_size)); - save_item(NAME(m_trans_tx_size)); -} - -// Save state presave to save vector sizes -void smc91c9x_device::device_pre_save() -{ - m_comp_tx_size = m_comp_tx.size(); - m_comp_rx_size = m_comp_rx.size(); - m_trans_tx_size = m_trans_tx.size(); - memcpy(m_comp_rx_data, m_comp_rx.data(), m_comp_rx_size * sizeof(u32)); - memcpy(m_comp_tx_data, m_comp_tx.data(), m_comp_tx_size * sizeof(u32)); - memcpy(m_trans_tx_data, m_trans_tx.data(), m_trans_tx_size * sizeof(u32)); - - //osd_printf_info("Save: comp_tx: %d comp_rx: %d trans_tx: %d\n", m_comp_tx_size, m_comp_rx_size, m_trans_tx_size); - //if (m_comp_tx_size) - // osd_printf_info("comp_tx packet: %d\n", m_comp_tx.front()); + save_item(NAME(m_tx_active)); + save_item(NAME(m_rx_active)); + save_item(NAME(m_tx_retry_count)); + save_item(NAME(m_rx_hash)); + save_item(NAME(m_loopback_result)); + + // Circular FIFOs + save_item(NAME(m_queued_tx)); + save_item(NAME(m_queued_tx_h)); + save_item(NAME(m_queued_tx_t)); + save_item(NAME(m_completed_tx)); + save_item(NAME(m_completed_tx_h)); + save_item(NAME(m_completed_tx_t)); + save_item(NAME(m_completed_rx)); + save_item(NAME(m_completed_rx_h)); + save_item(NAME(m_completed_rx_t)); } -// Save state preload to restore vector sizes -void smc91c9x_device::device_post_load() -{ - m_comp_tx.resize(m_comp_tx_size); - m_comp_rx.resize(m_comp_rx_size); - m_trans_tx.resize(m_trans_tx_size); - memcpy(m_comp_rx.data(), m_comp_rx_data, m_comp_rx_size * sizeof(u32)); - memcpy(m_comp_tx.data(), m_comp_tx_data, m_comp_tx_size * sizeof(u32)); - memcpy(m_trans_tx.data(), m_trans_tx_data, m_trans_tx_size * sizeof(u32)); - - //osd_printf_info("Restore: comp_tx: %d comp_rx: %d trans_tx: %d\n", m_comp_tx_size, m_comp_rx_size, m_trans_tx_size); - //if (m_comp_tx_size) - // osd_printf_info("comp_tx size: %lu comp_tx packet: %d array_data: %d\n", m_comp_tx.size(), m_comp_tx.front(), m_comp_tx_data[0]); -} //------------------------------------------------- // device_reset - device-specific reset @@ -181,75 +138,43 @@ void smc91c9x_device::device_post_load() void smc91c9x_device::device_reset() { - std::fill(std::begin(m_reg), std::end(m_reg), 0); - - std::fill(std::begin(m_regmask), std::end(m_regmask), 0); - m_irq_state = 0; m_sent = 0; m_recd = 0; - m_reg[EREG_TCR] = 0x0000; m_regmask[EREG_TCR] = 0x3d87; - m_reg[EREG_EPH_STATUS] = 0x0000; m_regmask[EREG_EPH_STATUS] = 0x0000; - m_reg[EREG_RCR] = 0x0000; m_regmask[EREG_RCR] = 0xc307; - m_reg[EREG_COUNTER] = 0x0000; m_regmask[EREG_COUNTER] = 0x0000; - m_reg[EREG_MIR] = 0x1212; m_regmask[EREG_MIR] = 0x0000; - m_reg[EREG_MCR] = 0x3300; m_regmask[EREG_MCR] = 0x00ff; - m_reg[EREG_BANK] = 0x3300; m_regmask[EREG_BANK] = 0x0007; - - m_reg[EREG_CONFIG] = 0x0030; m_regmask[EREG_CONFIG] = 0x17c6; - m_reg[EREG_BASE] = 0x1866; m_regmask[EREG_BASE] = 0xfffe; - - // Default MAC - m_reg[EREG_IA0_1] = 0x1300; m_regmask[EREG_IA0_1] = 0xffff; - m_reg[EREG_IA2_3] = 0x12F7; m_regmask[EREG_IA2_3] = 0xffff; - m_reg[EREG_IA4_5] = 0x5634; m_regmask[EREG_IA4_5] = 0xffff; - - m_reg[EREG_GENERAL_PURP] = 0x0000; m_regmask[EREG_GENERAL_PURP] = 0xffff; - m_reg[EREG_CONTROL] = 0x0100; m_regmask[EREG_CONTROL] = 0x68e7; - - m_reg[EREG_MMU_COMMAND] = 0x0000; m_regmask[EREG_MMU_COMMAND] = 0x00e7; - m_reg[EREG_PNR_ARR] = 0x8000; m_regmask[EREG_PNR_ARR] = 0x00ff; - m_reg[EREG_FIFO_PORTS] = 0x8080; m_regmask[EREG_FIFO_PORTS] = 0x0000; - m_reg[EREG_POINTER] = 0x0000; m_regmask[EREG_POINTER] = 0xf7ff; - m_reg[EREG_DATA_0] = 0x0000; m_regmask[EREG_DATA_0] = 0xffff; - m_reg[EREG_DATA_1] = 0x0000; m_regmask[EREG_DATA_1] = 0xffff; - m_reg[EREG_INTERRUPT] = 0x0004; m_regmask[EREG_INTERRUPT] = 0x7f00; - - m_reg[EREG_MT0_1] = 0x0000; m_regmask[EREG_MT0_1] = 0xffff; - m_reg[EREG_MT2_3] = 0x0000; m_regmask[EREG_MT2_3] = 0xffff; - m_reg[EREG_MT4_5] = 0x0000; m_regmask[EREG_MT4_5] = 0xffff; - m_reg[EREG_MT6_7] = 0x0000; m_regmask[EREG_MT6_7] = 0xffff; - m_reg[EREG_MGMT] = 0x3030; m_regmask[EREG_MGMT] = 0x0f0f; - // TODO: Revision should be set based on chip type - m_reg[EREG_REVISION] = 0x3345; m_regmask[EREG_REVISION] = 0x0000; - m_reg[EREG_ERCV] = 0x331f; m_regmask[EREG_ERCV] = 0x009f; + m_tx_active = 0; + m_rx_active = 0; + m_tx_retry_count = 0; + + m_reg[B0_TCR] = 0x0000; m_regmask[B0_TCR] = 0x3d87; + m_reg[B0_EPH_STATUS] = 0x0000; m_regmask[B0_EPH_STATUS] = 0x0000; + m_reg[B0_RCR] = 0x0000; m_regmask[B0_RCR] = 0xc307; + m_reg[B0_COUNTER] = 0x0000; m_regmask[B0_COUNTER] = 0x0000; + m_reg[B0_MIR] = 0x1212; m_regmask[B0_MIR] = 0x0000; + m_reg[B0_MCR] = 0x3300; m_regmask[B0_MCR] = 0x00ff; + m_reg[B0_BANK] = 0x3300; m_regmask[B0_BANK] = 0x0007; + + m_reg[B1_GENERAL_PURP] = 0x0000; m_regmask[B1_GENERAL_PURP] = 0xffff; + m_reg[B1_CONTROL] = 0x0100; m_regmask[B1_CONTROL] = 0x68e7; + + m_reg[B2_MMU_COMMAND] = 0x0000; m_regmask[B2_MMU_COMMAND] = 0x00e7; + m_reg[B2_PNR_ARR] = 0x8000; m_regmask[B2_PNR_ARR] = 0x00ff; + m_reg[B2_FIFO_PORTS] = 0x8080; m_regmask[B2_FIFO_PORTS] = 0x0000; + m_reg[B2_POINTER] = 0x0000; m_regmask[B2_POINTER] = 0xf7ff; + m_reg[B2_DATA_0] = 0x0000; m_regmask[B2_DATA_0] = 0xffff; + m_reg[B2_DATA_1] = 0x0000; m_regmask[B2_DATA_1] = 0xffff; + m_reg[B2_INTERRUPT] = 0x0004; m_regmask[B2_INTERRUPT] = 0x7f00; + + m_reg[B3_MT0_1] = 0x0000; m_regmask[B3_MT0_1] = 0xffff; + m_reg[B3_MT2_3] = 0x0000; m_regmask[B3_MT2_3] = 0xffff; + m_reg[B3_MT4_5] = 0x0000; m_regmask[B3_MT4_5] = 0xffff; + m_reg[B3_MT6_7] = 0x0000; m_regmask[B3_MT6_7] = 0xffff; + m_reg[B3_MGMT] = 0x3030; m_regmask[B3_MGMT] = 0x0f0f; + + m_reg[B3_ERCV] = 0x331f; m_regmask[B3_ERCV] = 0x009f; update_ethernet_irq(); - m_tx_timer->reset(); - - // Setup real network if enabled - m_network_available = false; - if (netdev_count()) { - m_network_available = true; - osd_list_network_adapters(); - unsigned char const *const mac = (const unsigned char *)get_mac(); - if (VERBOSE & LOG_GENERAL) - { - logerror("MAC : "); - for (int i = 0; i < ETHERNET_ADDR_SIZE; i++) - logerror("%.2X", mac[i]); - - logerror("\n"); - } - - set_promisc(true); - // Interface MAC - m_reg[EREG_IA0_1] = mac[0] | (mac[1] << 8); - m_reg[EREG_IA2_3] = mac[2] | (mac[3] << 8); - m_reg[EREG_IA4_5] = mac[4] | (mac[5] << 8); - } // Reset MMU mmu_reset(); @@ -261,39 +186,36 @@ void smc91c9x_device::mmu_reset() m_alloc_rx = 0; m_alloc_tx = 0; - // Flush fifos. - clear_tx_fifo(); - clear_rx_fifo(); + // Reset fifos. + reset_tx_fifos(); + reset_completed_rx(); update_ethernet_irq(); } -DEFINE_DEVICE_TYPE(SMC91C94, smc91c94_device, "smc91c94", "SMC91C94 Ethernet Controller") - -smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : smc91c9x_device(mconfig, SMC91C94, tag, owner, clock) -{ -} - -DEFINE_DEVICE_TYPE(SMC91C96, smc91c96_device, "smc91c96", "SMC91C96 Ethernet Controller") - -smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : smc91c9x_device(mconfig, SMC91C96, tag, owner, clock) +void smc91c9x_device::reset_tx_fifos() { + // Disable transmit timer + m_tx_poll->enable(false); + // Reset transmit queue + reset_queued_tx(); + // Reset completion FIFOs + reset_completed_tx(); } bool smc91c9x_device::alloc_req(const int tx, int &packet_num) { u32 curr_alloc = m_alloc_rx | m_alloc_tx; - for (int index = 0; index < ETHER_BUFFERS; index++) { - if (!(curr_alloc & (1 << index))) { + for (int index = 0; index < m_num_ebuf; index++) + { + if (!(curr_alloc & (1 << index))) + { packet_num = index; - if (tx) { + if (tx) m_alloc_tx |= 1 << index; - } else { + else m_alloc_rx |= 1 << index; - } return true; } } @@ -304,7 +226,8 @@ bool smc91c9x_device::alloc_req(const int tx, int &packet_num) void smc91c9x_device::alloc_release(const int packet_num) { int clear_mask = ~(1 << packet_num); - if (!((m_alloc_tx | m_alloc_rx) & (1 << packet_num))) { + if (!((m_alloc_tx | m_alloc_rx) & (1 << packet_num))) + { logerror("alloc_release: Trying to release a non-allocated packet. packet_num: %02x alloc_tx: %04x alloc_rx: %04x\n", packet_num, m_alloc_tx, m_alloc_rx); } @@ -312,338 +235,446 @@ void smc91c9x_device::alloc_release(const int packet_num) m_alloc_rx &= clear_mask; } -void smc91c9x_device::clear_tx_fifo() -{ - // Clear transmit timer - m_tx_timer->reset(); - // Reset transmit queue - m_trans_tx.clear(); - // Reset completion FIFOs - m_comp_tx.clear(); -} +/*************************************************************************** + INTERNAL HELPERS +***************************************************************************/ -void smc91c9x_device::clear_rx_fifo() -{ - // Clear recieve FIFO - m_comp_rx.clear(); -} +/*------------------------------------------------- + update_ethernet_irq - update the IRQ state +-------------------------------------------------*/ -int smc91c9x_device::is_broadcast(const uint8_t *mac_address) +void smc91c9x_device::update_ethernet_irq() { - int i; + // Check tx completion fifo empty + if (empty_completed_tx()) + m_reg[B2_INTERRUPT] &= ~EINT_TX; + else + m_reg[B2_INTERRUPT] |= EINT_TX; + + // Check rx completion fifo empty + if (empty_completed_rx()) + m_reg[B2_INTERRUPT] &= ~EINT_RCV; + else + m_reg[B2_INTERRUPT] |= EINT_RCV; + + uint8_t const mask = m_reg[B2_INTERRUPT] >> 8; + uint8_t const state = m_reg[B2_INTERRUPT] & 0xff; - i = 0; - while(mac_address[i] == 0xFF) + /* update the IRQ state */ + uint8_t new_state = mask & state; + if (m_irq_state ^ new_state) { - i++; + LOG("update_ethernet_irq: old: %02x new: %02x\n", m_irq_state, new_state); + m_irq_state = new_state; + m_irq_handler(m_irq_state ? ASSERT_LINE : CLEAR_LINE); } +} - if ( i == 6 ) - return 1; - return 0; +/*------------------------------------------------- + update_stats - draw statistics +-------------------------------------------------*/ + +void smc91c9x_device::update_stats() +{ + if ( DISPLAY_STATS ) + popmessage("Sent:%d Rec'd:%d", m_sent, m_recd); } +/*------------------------------------------------- +dump_bytes - Print packet bytes +-------------------------------------------------*/ -int smc91c9x_device::ethernet_packet_is_for_me(const uint8_t *mac_address) +void smc91c9x_device::dump_bytes(u8 *buf, int length) { - // tcpdump -i eth0 -q ether host 08:00:1e:01:ae:a5 or ether broadcast or ether dst 09:00:1e:00:00:00 or ether dst 09:00:1e:00:00:01 - // wireshark filter: eth.addr eq 08:00:1e:01:ae:a5 or eth.dst eq ff:ff:ff:ff:ff:ff or eth.dst eq 09:00:1e:00:00:00 or eth.dst eq 09:00:1e:00:00:01 - - int i; + if (VERBOSE & LOG_PACKETS) + { + std::stringstream ss_bytes; + for (int i = 0; i < length; i++) + { + ss_bytes << std::hex << std::setw(2) << std::setfill('0') << (int) buf[i]; + if ((i & 0xf) == 0xf || i == length - 1) + { + LOGMASKED(LOG_PACKETS, "%s\n", ss_bytes.str()); + ss_bytes.str(""); + } + else + ss_bytes << " "; + } + } +} - LOG("\n"); +/*------------------------------------------------- +address_filter - Filter the received packet +-------------------------------------------------*/ - if (VERBOSE & LOG_GENERAL) +int smc91c9x_device::address_filter(u8 *buf) +{ + if (m_reg[B0_RCR] & PRMS) + { + // TODO: 91C94 doesn't receive it's own transmisson when not in full duplex + LOGMASKED(LOG_FILTER, "address_filter accepted (promiscuous mode)\n"); + return ADDR_UNICAST; + } + else if (buf[0] & 1) { - for ( i = 0 ; i < ETHERNET_ADDR_SIZE ; i++ ) + // broadcast + if (!memcmp(ETH_BROADCAST, buf, 6)) { - logerror("%.2X", ((u8 *)&m_reg[EREG_IA0_1])[i]); + LOGMASKED(LOG_FILTER, "address_filter accepted (broadcast) %02x-%02x-%02x-%02x-%02x-%02x\n", + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); + + return ADDR_BROADCAST; } - logerror("="); - for ( i = 0 ; i < ETHERNET_ADDR_SIZE ; i++ ) + + // multicast + /* + * Multicast address matching is performed by computing the fcs crc of + * the destination address, and then using the upper 6 bits as an index + * into the 64-bit logical address filter. + */ + // Check for all multicast bit + if (m_reg[B0_RCR] & ALMUL) + return ADDR_MULTICAST; + + u32 const crc = util::crc32_creator::simple(buf, 6); + // The hash is based on the top 6 MSBs of the CRC + // The CRC needs to be inverted and reflected + m_rx_hash = 0x0; + for (int i = 0; i < 6; i++) + m_rx_hash |= (((~crc) >> i) & 1) << (5 - i); + u64 multicast_addr = *(u64*)&m_reg[B3_MT0_1]; + if (BIT(multicast_addr, m_rx_hash)) { - logerror("%.2X",mac_address[i]); + LOGMASKED(LOG_FILTER, "address_filter accepted (multicast address match) %02x-%02x-%02x-%02x-%02x-%02x\n", + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); + + return ADDR_MULTICAST; } - logerror("?"); + LOGMASKED(LOG_FILTER, "address_filter rejected multicast %02x-%02x-%02x-%02x-%02x-%02x crc: %08x hash: %02x multi: %16ullx\n", + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], crc, m_rx_hash, *(u64*)&m_reg[B3_MT0_1]); } - - // skip Ethernet broadcast packets if RECV_BROAD is not set - if (is_broadcast(mac_address)) + else { - LOG(" -- Broadcast rx\n"); - return 2; - } + // unicast + if (!memcmp(&m_reg[B1_IA0_1], buf, 6)) + { + LOGMASKED(LOG_FILTER, "address_filter accepted (physical address match)\n"); - if (memcmp(mac_address, &m_reg[EREG_IA0_1], ETHERNET_ADDR_SIZE) == 0) - { - LOG(" -- Address Match\n"); - return 1; + return ADDR_UNICAST; + } } - - LOG(" -- Not Matching\n"); - - return 0; + return ADDR_NOMATCH; } -/*************************************************************************** - recv_cb - receive callback - receive and process an ethernet packet - ***************************************************************************/ +/*------------------------------------------------- +recv_start_cb - Start receiving packet + A return value of 0 will stop rx processing in dinetwork device + Any other value will be sent to the recv_complete_cb +-------------------------------------------------*/ -void smc91c9x_device::recv_cb(uint8_t *data, int length) +int smc91c9x_device::recv_start_cb(u8 *buf, int length) { - LOG("recv_cb : %d/0x%x\n",length,length); + // check internal loopback + if (m_reg[B0_TCR] & (EPH_LOOP | LOOP)) + { + LOGMASKED(LOG_RX, "receive internal loopback mode, external packet discarded\n"); - int const isforme = ethernet_packet_is_for_me( data ); + return 0; + } - if (isforme==1 && (length >= ETHERNET_ADDR_SIZE) && (VERBOSE & LOG_GENERAL)) + // discard bad length packets + if (length < 64 || length > 256*6 - 6) { - logerror("RX: "); - for (int i = 0; i < ETHERNET_ADDR_SIZE; i++) - logerror("%.2X", data[i]); + LOGMASKED(LOG_RX, "received bad length packet length %d discarded\n", length); - logerror(" "); + return 0; + } - for (int i = 0; i < length-ETHERNET_ADDR_SIZE; i++) - logerror("%.2X", data[ETHERNET_ADDR_SIZE + i]); + // discard packets not from WMS + if (memcmp(WMS_OUI, &buf[6], 3)) + { + LOGMASKED(LOG_RX, "received non-WMS packet OUI: %02x:%02x:%02x length %d discarded\n", buf[6], buf[7], buf[8], length); - logerror(" - IsForMe %d - %d/0x%x bytes\n", isforme, length, length); + return 0; } - if ( (length < ETHERNET_ADDR_SIZE || !isforme) && !(m_reg[EREG_RCR] & 0x0102) ) + // Check for active transmission + if (m_tx_active) { - LOG("\n"); + // TODO: Update collision counters + LOGMASKED(LOG_RX, "transmit active COLLISION, rx packet length %d discarded\n", length); + + return 0; - // skip packet - return; } - /* signal a receive */ + return receive(buf, length); +} + +/*------------------------------------------------- +receive - Receive data into buffer + Returns the buffer packet number + 1 if successful +-------------------------------------------------*/ + +int smc91c9x_device::receive(u8 *buf, int length) +{ + // check receiver enabled + if (!(m_reg[B0_RCR] & RXEN)) + { + LOGMASKED(LOG_RX, "receive disabled, external packet discarded\n"); + + return -1; + } + + // address filter + int filter = address_filter(buf); + if (filter == ADDR_NOMATCH) + return -1; + + LOGMASKED(LOG_RX, "receive packet length %d\n", length); + dump_bytes(buf, length); // Try to request a packet number int packet_num; - if (!alloc_req(0, packet_num)) { - logerror("recv_cb: Couldn't allocate a receive packet\n"); - return; + if (!alloc_req(0, packet_num)) + { + logerror("recv_cb: Couldn't allocate memory for receive packet\n"); + return -2; } - /* compute the packet length */ + m_rx_active = 1; - if ( ( length < ( ETHER_BUFFER_SIZE - ( 2+2+2 ) ) ) ) - { - uint8_t *const packet = &m_buffer[ packet_num * ETHER_BUFFER_SIZE]; + // build up the packet + uint8_t *const packet = &m_buffer[packet_num * ETHER_BUFFER_SIZE]; - int dst = 0; + // Strip CRC + if (m_reg[B0_RCR] & STRIP_CRC) + length -= 4; - // build up the packet + // Copy received payload + memcpy(&packet[4], buf, length); - // Status word - packet[dst++] = 0x00; + // Status word + u16 *rx_status = (u16*)&packet[0]; + *rx_status = 0x0000; - // set the broadcast flag - if ( isforme == 2 ) - packet[dst++] |= 0x40; - else - packet[dst++] = 0x00; + // set the broadcast flag + if (filter == ADDR_BROADCAST) + *rx_status |= BRODCAST; - //bytes count - packet[dst++] = 0x00; - packet[dst++] = 0x00; + // set the multicast flag and hash + if (filter == ADDR_MULTICAST) + { + *rx_status |= (m_rx_hash << 1) | MULTCAST; + } - memcpy(&packet[dst], data, length ); - dst += length; + // Calculate buffer length and set control byte + u16 buf_length; - if ( dst & 1 ) - { - // ODD Frame - packet[dst++] = 0x40 | 0x20; // Control - } - else - { - packet[dst++] = 0x00; // Pad - packet[dst++] = 0x40 | 0x00; // Control - } + if (length & 1) + { + // ODD Frame + *rx_status |= ODDFRM; + packet[length + 4] = EBUF_RX_ALWAYS | EBUF_ODD; // Control + buf_length = length + 5; + } + else + { + packet[length + 4] = 0x00; // Pad + packet[length + 5] = EBUF_RX_ALWAYS; // Control + buf_length = length + 6; + } - //dst += 2; + // Set buffer length word + *(u16*)&packet[2] = buf_length; - dst &= 0x7FF; + return packet_num + 1; +} - packet[2] = (dst&0xFF); - packet[3] = (dst) >> 8; +/*------------------------------------------------- +recv_complete_cb - End of receive +-------------------------------------------------*/ +void smc91c9x_device::recv_complete_cb(int result) +{ + if (result > 0) + { // Push packet number to rx completion fifo - m_comp_rx.push_back(packet_num); + push_completed_rx(result - 1); } - else + // Couldn't allocate memory + else if (result == -2) { - LOG("Rejected ! Fifo Full ?"); + m_reg[B2_INTERRUPT] |= EINT_ALLOC; } update_ethernet_irq(); - LOG("\n"); + m_rx_active = 0; } -/*************************************************************************** - INTERNAL HELPERS -***************************************************************************/ - /*------------------------------------------------- - update_ethernet_irq - update the IRQ state + tx_poll - Starts transmit -------------------------------------------------*/ -void smc91c9x_device::update_ethernet_irq() +TIMER_CALLBACK_MEMBER(smc91c9x_device::tx_poll) { - // Check tx completion fifo empty - if (m_comp_tx.empty()) - m_reg[EREG_INTERRUPT] &= ~EINT_TX; - else - m_reg[EREG_INTERRUPT] |= EINT_TX; - - // Check rx completion fifo empty - if (m_comp_rx.empty()) - m_reg[EREG_INTERRUPT] &= ~EINT_RCV; - else - m_reg[EREG_INTERRUPT] |= EINT_RCV; + // Check for active RX and delay if necessary + if (m_rx_active) + { + // TODO: Implement correct CSMA/CD algorithm + m_tx_poll->adjust(attotime::from_usec(40)); + m_tx_retry_count++; + LOGMASKED(LOG_TX, "tx_poll: Delaying TX due to active RX retry_count = %d\n", m_tx_retry_count); + } + // Check if TX is enabled and packet is queued + else if ((m_reg[B0_TCR] & TXENA) && !empty_queued_tx()) + { + // Reset retry count + m_tx_retry_count = 0; - uint8_t const mask = m_reg[EREG_INTERRUPT] >> 8; - uint8_t const state = m_reg[EREG_INTERRUPT] & 0xff; + // Get the packet number from the transmit fifo + const int packet_num = curr_queued_tx(); + uint8_t *const tx_buffer = &m_buffer[packet_num * ETHER_BUFFER_SIZE]; + // Get the length and control fields from buffer + u16 length = (*(u16*)&tx_buffer[2]) & 0x7ff; + const u8 control = tx_buffer[length - 1]; - /* update the IRQ state */ - uint8_t new_state = mask & state; - if (m_irq_state ^ new_state) - { - LOG("update_ethernet_irq: old: %02x new: %02x\n", m_irq_state, new_state); - m_irq_state = new_state; - m_irq_handler(m_irq_state ? ASSERT_LINE : CLEAR_LINE); - } -} + // Remove [pad], control + if (control & EBUF_ODD) + length -= 1; + else + length -= 2; + // Add padding up to CRC area + // take into account status & length removal (-4) and crc addtion (+4) + while (length < 64 + 4 - 4 && (m_reg[B0_TCR] & PAD_EN)) + tx_buffer[length++] = 0x00; -/*------------------------------------------------- - update_stats - draw statistics --------------------------------------------------*/ + // Add CRC + // TODO: Calculate CRC + if (1 && ((control & EBUF_CRC) || !(m_reg[B0_TCR] & NOCRC))) + { + tx_buffer[length++] = 0x11; + tx_buffer[length++] = 0x22; + tx_buffer[length++] = 0x33; + tx_buffer[length++] = 0x44; + } -void smc91c9x_device::update_stats() -{ - if ( DISPLAY_STATS ) - popmessage("Sent:%d Rec'd:%d", m_sent, m_recd); -} + // Remove status, length + length -= 4; + // Reset the EPH register */ + m_reg[B0_EPH_STATUS] &= LINK_OK; -/*------------------------------------------------- - send_frame - push a frame to the interface --------------------------------------------------*/ + // Send the frame + m_tx_active = 1; + m_tx_poll->enable(false); -TIMER_CALLBACK_MEMBER(smc91c9x_device::send_frame) -{ - // Get the packet number from the transmit fifo - const int packet_num = m_trans_tx.front(); - uint8_t *const tx_buffer = &m_buffer[packet_num * ETHER_BUFFER_SIZE]; + LOGMASKED(LOG_TX, "Start sending packet %d length = %d time: %s\n", packet_num, length, machine().scheduler().time().as_string()); + dump_bytes(&tx_buffer[4], length); - // Pop the transmit fifo - m_trans_tx.erase(m_trans_tx.begin()); + // Write loopback data and save result + if (m_reg[B0_TCR] & (EPH_LOOP | LOOP | FDUPLX)) + m_loopback_result = receive(&tx_buffer[4], length); + else + m_loopback_result = 0; - /* update the EPH register */ - m_reg[EREG_EPH_STATUS] = 0x0001; + // Local loopback isn't sent to cable + //if ((m_reg[B0_TCR] & (EPH_LOOP | LOOP) || (get_interface() < 0 && (m_reg[B0_TCR] & FDUPLX)))) + if (m_reg[B0_TCR] & (EPH_LOOP | LOOP)) + send_complete_cb(length); + else + send(&tx_buffer[4], length); - if (is_broadcast(&tx_buffer[4])) - m_reg[EREG_EPH_STATUS] |= 0x0040; + } +} - // Check tx completion fifo empty - if (m_trans_tx.empty()) - m_reg[EREG_INTERRUPT] |= EINT_TX_EMPTY; +/*------------------------------------------------- +send_complete_cb - Called after transmit complete +-------------------------------------------------*/ +void smc91c9x_device::send_complete_cb(int result) +{ m_sent++; - update_stats(); - int buffer_len = ((tx_buffer[3] << 8) | tx_buffer[2]) & 0x7ff; - // Remove status, length, [pad], control - if (tx_buffer[buffer_len - 1] & 0x20) - buffer_len -= 5; - else - buffer_len -= 6; - // Add padding - if (buffer_len < 64 && (m_reg[EREG_TCR] & 0x0080)) { - while (buffer_len < 64) - tx_buffer[4 + buffer_len++] = 0x00; - } - if (VERBOSE & LOG_GENERAL) - { - logerror("TX: "); - for (int i = 0; i < ETHERNET_ADDR_SIZE; i++) - logerror("%.2X", tx_buffer[4 + i]); + // Pop the packet number from the transmit fifo + const int packet_num = pop_queued_tx(); + uint8_t *const tx_buffer = &m_buffer[packet_num * ETHER_BUFFER_SIZE]; - logerror(" "); + LOGMASKED(LOG_TX, "End sending packet %d result = %d time: %s\n", packet_num, result, machine().scheduler().time().as_string()); - for (int i = ETHERNET_ADDR_SIZE; i < buffer_len; i++) - logerror("%.2X", tx_buffer[4 + i]); + /* update the EPH register */ + m_reg[B0_EPH_STATUS] |= TX_SUC; - logerror("--- %d/0x%x bytes\n", buffer_len, buffer_len); + // Set LINK_OK in status + if (0 && !(m_reg[B0_EPH_STATUS] & LINK_OK)) + { + m_reg[B0_EPH_STATUS] |= LINK_OK; + // Set a ethernet phy status interrupt + m_reg[B2_INTERRUPT] |= EINT_EPH; } - if (buffer_len > 4) - { - if (m_link_unconnected) - { - // Set lost carrier - if (m_reg[EREG_TCR] & 0x0400) - { - m_reg[EREG_EPH_STATUS] |= 0x400; - // Clear Tx Enable on error - m_reg[EREG_TCR] &= ~0x1; - } + // Set Tx broadcast flag + if (!memcmp(ETH_BROADCAST, &tx_buffer[4], 6)) + m_reg[B0_EPH_STATUS] |= LTX_BRD; - // Set signal quality error - if (m_reg[EREG_TCR] & 0x1000) - { - m_reg[EREG_EPH_STATUS] |= 0x20; - // Clear Tx Enable on error - m_reg[EREG_TCR] &= ~0x1; - } + // Check tx queued fifo empty + if (empty_queued_tx()) + m_reg[B2_INTERRUPT] |= EINT_TX_EMPTY; - // Set a ethernet phy status interrupt - m_reg[EREG_INTERRUPT] |= EINT_EPH; + // Set no-transmission flags + if (m_link_unconnected) + { + //m_reg[B0_EPH_STATUS] &= ~LINK_OK; + //m_reg[B0_EPH_STATUS] &= ~TX_SUC; - // TODO: Is it necessary to clear FIFOs on error? - // Flush fifos. - //clear_tx_fifo(); - //clear_rx_fifo(); - } - else + // Set lost carrier + if (m_reg[B0_TCR] & MON_CSN) { - // Send the frame - if (!send(&tx_buffer[4], buffer_len)) - { - // FIXME: failed to send the Ethernet packet - //logerror("failed to send Ethernet packet\n"); - //LOG(this,("read_command_port(): !!! failed to send Ethernet packet")); - } + m_reg[B0_EPH_STATUS] |= LOST_CARR; + // Clear Tx Enable on error + m_reg[B0_TCR] &= ~TXENA; + } - // Loopback if loopback is set or fduplx is set - // TODO: Figure out correct size - // TODO: Check for addtional filter options for FDUPLX mode - if ((m_reg[EREG_TCR] & 0x2002) || (m_network_available && (m_reg[EREG_TCR] & 0x0800))) - recv_cb(&tx_buffer[4], buffer_len); + // Set signal quality error + if (m_reg[B0_TCR] & STP_SQET) + { + m_reg[B0_EPH_STATUS] |= SQET; + // Clear Tx Enable on error + m_reg[B0_TCR] &= ~TXENA; } + + // Set a ethernet phy status interrupt + m_reg[B2_INTERRUPT] |= EINT_EPH; } + // Update status in the transmit word - tx_buffer[0] = m_reg[EREG_EPH_STATUS]; - tx_buffer[1] = m_reg[EREG_EPH_STATUS] >> 8; + *(u16*)&tx_buffer[0] = m_reg[B0_EPH_STATUS]; // Push the packet number onto the tx completion fifo - m_comp_tx.push_back(packet_num); + push_completed_tx(packet_num); update_ethernet_irq(); - // If there is more packets to transmit then set the tx timer - if ((m_reg[EREG_TCR] & 0x1) && !m_trans_tx.empty()) { - // Shortest packet (64 bytes @ 10Mbps = 50us) - m_tx_timer->adjust(attotime::from_usec(50)); + // Loopback if loopback is set or fduplx is set + if (m_loopback_result) + { + //int rx_result = receive(&tx_buffer[4], result); + recv_complete_cb(m_loopback_result); } + + // If there is more packets to transmit then start the tx polling + if ((m_reg[B0_TCR] & TXENA) && !empty_queued_tx()) + { + m_tx_poll->adjust(attotime::from_usec(10)); + } + + m_tx_active = 0; } /*------------------------------------------------- @@ -662,53 +693,48 @@ void smc91c9x_device::process_command(uint16_t data) LOG(" ALLOCATE MEMORY FOR TX (%d)", (data & 7)); { int packet_num; - if (alloc_req(1, packet_num)) { + if (alloc_req(1, packet_num)) + { LOG(" packet_num = %02x\n", (packet_num)); // Set ARR register - m_reg[EREG_PNR_ARR] &= ~0xff00; - m_reg[EREG_PNR_ARR] |= packet_num << 8; - m_reg[EREG_INTERRUPT] |= EINT_ALLOC; + m_reg[B2_PNR_ARR] &= ~0xff00; + m_reg[B2_PNR_ARR] |= packet_num << 8; + m_reg[B2_INTERRUPT] |= EINT_ALLOC; update_ethernet_irq(); } - else { + else + { logerror("ECMD_ALLOCATE: Couldn't allocate TX memory\n"); } } break; case ECMD_RESET_MMU: - /* - 0100 - - RESET MMU TO INITIAL STATE - - Frees all memory allocations, clears relevant - interrupts, resets packet FIFO pointers. - */ - LOG(" RESET MMU\n"); mmu_reset(); break; case ECMD_REMOVE_TOPFRAME_TX: LOG(" REMOVE FRAME FROM TX FIFO\n"); - if (m_comp_tx.empty()) + if (empty_completed_tx()) logerror("process_command: Trying to remove entry from empty tx completion fifo\n"); else - m_comp_tx.erase(m_comp_tx.begin()); + pop_completed_tx(); break; case ECMD_REMOVE_RELEASE_TOPFRAME_RX: - LOG(" REMOVE AND RELEASE FRAME FROM RX FIFO (PACK_NUM=%d)\n", m_comp_rx.front()); + LOG(" REMOVE AND RELEASE FRAME FROM RX FIFO (PACK_NUM=%d)\n", curr_completed_rx()); // Release memory allocation - alloc_release(m_comp_rx.front()); + alloc_release(curr_completed_rx()); // Fall through case ECMD_REMOVE_TOPFRAME_RX: LOG(" REMOVE FRAME FROM RX FIFO\n"); // remove entry from rx completion queue - if (m_comp_rx.empty()) + if (empty_completed_rx()) logerror("process_command: Trying to remove entry from empty rx completion fifo\n"); else - m_comp_rx.erase(m_comp_rx.begin()); + pop_completed_rx(); update_ethernet_irq(); m_recd++; @@ -717,7 +743,7 @@ void smc91c9x_device::process_command(uint16_t data) case ECMD_RELEASE_PACKET: { - const int packet_number = m_reg[EREG_PNR_ARR] & 0xff; + const int packet_number = m_reg[B2_PNR_ARR] & 0xff; alloc_release(packet_number); LOG(" RELEASE SPECIFIC PACKET %d\n", packet_number); } @@ -726,33 +752,31 @@ void smc91c9x_device::process_command(uint16_t data) case ECMD_ENQUEUE_PACKET: LOG(" ENQUEUE TX PACKET "); - if (m_reg[EREG_TCR] & 0x0001) // TX EN ? + if (m_reg[B0_TCR] & TXENA) { - const int packet_number = m_reg[EREG_PNR_ARR] & 0xff; + const int packet_number = m_reg[B2_PNR_ARR] & 0xff; LOG("(PACKET_NUM=%d)\n", packet_number); // Push packet number to tx transmit fifo - m_trans_tx.push_back(packet_number); - // Calculate transmit time - //uint8_t *const tx_buffer = &m_buffer[packet_number * ETHER_BUFFER_SIZE]; - //int buffer_len = ((tx_buffer[3] << 8) | tx_buffer[2]) & 0x7ff; - //buffer_len -= 6; - //int usec = ((buffer_len * 8) / 10) + 1; - // Shortest packet (64 bytes @ 10Mbps = 50us) - m_tx_timer->adjust(attotime::from_usec(50)); + push_queued_tx(packet_number); + // Start timer to send frame if not already transmitting + if (!m_tx_active && !m_tx_poll->enabled()) + { + m_tx_poll->adjust(attotime::from_usec(10)); + LOG("Start polling time: %s\n", machine().scheduler().time().as_string()); + } } break; case ECMD_RESET_FIFOS: LOG(" RESET TX FIFOS\n"); // Flush fifos. - clear_tx_fifo(); + reset_tx_fifos(); break; } // Set Busy (clear on next read) - m_reg[EREG_MMU_COMMAND] |= 0x0001; - //LOG("process_command: TxQ: %d TxComp: %d RxComp: %d TxAlloc: %04x RxAlloc: %04x\n", - // m_trans_tx.size(), m_comp_tx.size(), m_comp_rx.size(), m_alloc_tx, m_alloc_rx); + m_reg[B2_MMU_COMMAND] |= 0x0001; + } @@ -771,60 +795,60 @@ READ16_MEMBER( smc91c9x_device::read ) /* determine the effective register */ offset %= 8; - if ( offset != EREG_BANK ) - offset += 8 * (m_reg[EREG_BANK] & 7); + if ( offset != B0_BANK ) + offset += 8 * (m_reg[B0_BANK] & 7); result = m_reg[offset]; switch (offset) { - case EREG_MMU_COMMAND: + case B2_MMU_COMMAND: // Clear busy - m_reg[EREG_MMU_COMMAND] &= ~0x0001; + m_reg[B2_MMU_COMMAND] &= ~0x0001; break; - case EREG_PNR_ARR: + case B2_PNR_ARR: if ( ACCESSING_BITS_8_15 ) { - m_reg[EREG_INTERRUPT] &= ~EINT_ALLOC; + m_reg[B2_INTERRUPT] &= ~EINT_ALLOC; update_ethernet_irq(); } break; - case EREG_FIFO_PORTS: + case B2_FIFO_PORTS: result = 0; - if (!m_comp_tx.empty()) - result |= m_comp_tx.front(); + if (!empty_completed_tx()) + result |= curr_completed_tx(); else result |= 0x80; - if (!m_comp_rx.empty()) - result |= m_comp_rx.front() << 8; + if (!empty_completed_rx()) + result |= curr_completed_rx() << 8; else result |= 0x80 << 8; break; - case EREG_DATA_0: /* data register */ - case EREG_DATA_1: /* data register */ + case B2_DATA_0: /* data register */ + case B2_DATA_1: /* data register */ { uint8_t *buffer; - int addr = m_reg[EREG_POINTER] & 0x7ff; + int addr = m_reg[B2_POINTER] & 0x7ff; - if ( m_reg[EREG_POINTER] & 0x8000 ) - buffer = &m_buffer[m_comp_rx.front() * ETHER_BUFFER_SIZE]; + if ( m_reg[B2_POINTER] & 0x8000 ) + buffer = &m_buffer[curr_completed_rx() * ETHER_BUFFER_SIZE]; else - buffer = &m_buffer[(m_reg[EREG_PNR_ARR] & 0x1f) * ETHER_BUFFER_SIZE];; + buffer = &m_buffer[(m_reg[B2_PNR_ARR] & 0x1f) * ETHER_BUFFER_SIZE];; result = buffer[addr++]; if ( ACCESSING_BITS_8_15 ) result |= buffer[addr++] << 8; - if ( m_reg[EREG_POINTER] & 0x4000 ) - m_reg[EREG_POINTER] = (m_reg[EREG_POINTER] & ~0x7ff) | (addr & 0x7ff); + if ( m_reg[B2_POINTER] & 0x4000 ) + m_reg[B2_POINTER] = (m_reg[B2_POINTER] & ~0x7ff) | (addr & 0x7ff); break; } } - if (offset != EREG_BANK) + if (offset != B0_BANK) LOG("%s:smc91c9x_r(%s) = %04X & %04X\n", machine().describe_context(), ethernet_regname[offset], result, mem_mask); return result; } @@ -838,12 +862,12 @@ WRITE16_MEMBER( smc91c9x_device::write ) { /* determine the effective register */ offset %= 8; - if (offset != EREG_BANK) - offset += 8 * (m_reg[EREG_BANK] & 7); + if (offset != B0_BANK) + offset += 8 * (m_reg[B0_BANK] & 7); /* update the data generically */ - if (offset != EREG_BANK && offset < sizeof(m_reg)) + if (offset != B0_BANK && offset < sizeof(m_reg)) LOG("%s:smc91c9x_w(%s) = [%04X]<-%04X & (%04X & %04X)\n", machine().describe_context(), ethernet_regname[offset], offset, data, mem_mask , m_regmask[offset]); mem_mask &= m_regmask[offset]; @@ -852,49 +876,62 @@ WRITE16_MEMBER( smc91c9x_device::write ) /* handle it */ switch (offset) { - case EREG_TCR: /* transmit control register */ + case B0_TCR: /* transmit control register */ // Setting Tx Enable clears some status and interrupts - if ( data & 0x1 ) { - m_reg[EREG_EPH_STATUS] &= ~0x420; - m_reg[EREG_INTERRUPT] &= ~EINT_EPH; - update_ethernet_irq(); + if ( data & TXENA ) + { + if (m_reg[B0_EPH_STATUS] & (LOST_CARR | SQET | LATCOL | E16COL)) + { + m_reg[B0_EPH_STATUS] &= ~(LOST_CARR | SQET | LATCOL | E16COL); + m_reg[B2_INTERRUPT] &= ~EINT_EPH; + update_ethernet_irq(); + } + } + if (VERBOSE & LOG_GENERAL) + { + if (data & FDSE) LOG(" FDSE\n"); + if (data & EPH_LOOP) LOG(" EPH LOOP\n"); + if (data & STP_SQET) LOG(" STP SQET\n"); + if (data & FDUPLX) LOG(" FDUPLX\n"); + if (data & MON_CSN) LOG(" MON_CSN\n"); + if (data & NOCRC) LOG(" NOCRC\n"); + if (data & PAD_EN) LOG(" PAD_EN\n"); + if (data & FORCOL) LOG(" FORCOL\n"); + if (data & LOOP) LOG(" LOOP\n"); + if (data & TXENA) LOG(" TXENA\n"); } - - if (data & 0x2000) LOG(" EPH LOOP\n"); - if (data & 0x1000) LOG(" STP SQET\n"); - if (data & 0x0800) LOG(" FDUPLX\n"); - if (data & 0x0400) LOG(" MON_CSN\n"); - if (data & 0x0100) LOG(" NOCRC\n"); - if (data & 0x0080) LOG(" PAD_EN\n"); - if (data & 0x0004) LOG(" FORCOL\n"); - if (data & 0x0002) LOG(" LOOP\n"); - if (data & 0x0001) LOG(" TXENA\n"); break; - case EREG_RCR: /* receive control register */ + case B0_RCR: /* receive control register */ - if ( data & 0x8000 ) + if ( data & SOFT_RST) { - clear_rx_fifo(); - clear_tx_fifo(); + reset(); } - if ( !(data & 0x0100) ) + if ( !(data & RXEN) ) + { + reset_completed_rx(); + } + if (data & RXEN) { - clear_rx_fifo(); + // Set LINK_OK in status + m_reg[B0_EPH_STATUS] |= LINK_OK; } - if (data & 0x8000) reset(); - if (data & 0x8000) LOG(" SOFT RST\n"); - if (data & 0x4000) LOG(" FILT_CAR\n"); - if (data & 0x0200) LOG(" STRIP CRC\n"); - if (data & 0x0100) LOG(" RXEN\n"); - if (data & 0x0004) LOG(" ALMUL\n"); - if (data & 0x0002) LOG(" PRMS\n"); - if (data & 0x0001) LOG(" RX_ABORT\n"); + if (VERBOSE & LOG_GENERAL) + { + if (data & SOFT_RST) LOG(" SOFT RST\n"); + if (data & FILT_CAR) LOG(" FILT_CAR\n"); + if (data & STRIP_CRC) LOG(" STRIP CRC\n"); + if (data & RXEN) LOG(" RXEN\n"); + if (data & ALMUL) LOG(" ALMUL\n"); + if (data & PRMS) LOG(" PRMS\n"); + if (data & RX_ABORT) LOG(" RX_ABORT\n"); + } break; - case EREG_CONFIG: /* configuration register */ + case B1_CONFIG: /* configuration register */ if (data & 0x1000) LOG(" NO WAIT\n"); if (data & 0x0400) LOG(" FULL STEP\n"); if (data & 0x0200) LOG(" SET SQLCH\n"); @@ -905,64 +942,86 @@ WRITE16_MEMBER( smc91c9x_device::write ) if (data & 0x0002) LOG(" INT SEL0\n"); break; - case EREG_BASE: /* base address register */ + case B1_BASE: /* base address register */ LOG(" base = $%04X\n", (data & 0xe000) | ((data & 0x1f00) >> 3)); LOG(" romsize = %d\n", ((data & 0xc0) >> 6)); LOG(" romaddr = $%05X\n", ((data & 0x3e) << 13)); break; - case EREG_CONTROL: /* control register */ - if (data & 0x4000) LOG(" RCV_BAD\n"); - if (data & 0x2000) LOG(" PWRDN\n"); - if (data & 0x0800) LOG(" AUTO RELEASE\n"); - if (data & 0x0080) LOG(" LE ENABLE\n"); - if (data & 0x0040) LOG(" CR ENABLE\n"); - if (data & 0x0020) LOG(" TE ENABLE\n"); - if (data & 0x0004) LOG(" EEPROM SELECT\n"); - if (data & 0x0002) LOG(" RELOAD\n"); - if (data & 0x0001) LOG(" STORE\n"); + case B1_IA4_5: + set_promisc(m_reg[B0_RCR] & PRMS); + set_mac((char *)&m_reg[B1_IA0_1]); + + break; + + case B1_CONTROL: /* control register */ + // Clearing LE_EN clears interrupt from LINK_OK status change + if (!(data & LE_ENABLE)) + { + m_reg[B2_INTERRUPT] &= ~EINT_EPH; + update_ethernet_irq(); + } + if (0 && (data & LE_ENABLE)) + { + if (m_reg[B0_EPH_STATUS] & LINK_OK) + { + m_reg[B0_EPH_STATUS] &= ~(LINK_OK); + m_reg[B2_INTERRUPT] &= ~EINT_EPH; + update_ethernet_irq(); + } + } + if (VERBOSE & LOG_GENERAL) + { + if (data & RCV_BAD) LOG(" RCV_BAD\n"); + if (data & PWRDN) LOG(" PWRDN\n"); + if (data & WAKEUP_EN) LOG(" WAKEUP ENABLE\n"); + if (data & AUTO_RELEASE) LOG(" AUTO RELEASE\n"); + if (data & LE_ENABLE) LOG(" LE ENABLE\n"); + if (data & CR_ENABLE) LOG(" CR ENABLE\n"); + if (data & TE_ENABLE) LOG(" TE ENABLE\n"); + if (data & EEPROM_SEL) LOG(" EEPROM SELECT\n"); + if (data & RELOAD) LOG(" RELOAD\n"); + if (data & STORE) LOG(" STORE\n"); + } break; - case EREG_MMU_COMMAND: /* command register */ + case B2_MMU_COMMAND: /* command register */ process_command(data); break; - case EREG_DATA_0: /* data register */ - case EREG_DATA_1: /* data register */ + case B2_DATA_0: /* data register */ + case B2_DATA_1: /* data register */ { uint8_t *buffer; - int addr = m_reg[EREG_POINTER] & 0x7ff; + int addr = m_reg[B2_POINTER] & PTR; - if (m_reg[EREG_POINTER] & 0x8000) - buffer = &m_buffer[m_comp_rx.front() * ETHER_BUFFER_SIZE]; + if (m_reg[B2_POINTER] & RCV) + buffer = &m_buffer[curr_completed_rx() * ETHER_BUFFER_SIZE]; else - buffer = &m_buffer[(m_reg[EREG_PNR_ARR] & 0x1f) * ETHER_BUFFER_SIZE];; + buffer = &m_buffer[(m_reg[B2_PNR_ARR] & 0x1f) * ETHER_BUFFER_SIZE];; - // TODO: Should be checking if incr is set buffer[addr++] = data; if ( ACCESSING_BITS_8_15 ) buffer[addr++] = data >> 8; - if ( m_reg[EREG_POINTER] & 0x4000 ) - m_reg[EREG_POINTER] = (m_reg[EREG_POINTER] & ~0x7ff) | (addr & 0x7ff); + if ( m_reg[B2_POINTER] & AUTO_INCR) + m_reg[B2_POINTER] = (m_reg[B2_POINTER] & ~PTR) | (addr & PTR); break; } - case EREG_INTERRUPT: + case B2_INTERRUPT: // Pop tx fifo packet from completion fifo if clear tx int is set - if (m_reg[EREG_INTERRUPT] & data & EINT_TX) { - if (m_comp_tx.empty()) { + if (m_reg[B2_INTERRUPT] & data & EINT_TX) + { + if (empty_completed_tx()) logerror("write: Trying to remove an entry from empty tx completion fifo\n"); + else + { + LOG("Removing tx completion packet_num = %d\n", curr_completed_tx()); + pop_completed_tx(); } - else { - LOG("Removing tx completion packet_num = %d\n", m_comp_tx.front()); - m_comp_tx.erase(m_comp_tx.begin()); - } - } - // Clear TX_EMPTY interrupt if clear tx empty bit is set - if (m_reg[EREG_INTERRUPT] & data & EINT_TX_EMPTY) { - m_reg[EREG_INTERRUPT] &= ~EINT_TX_EMPTY; } - m_reg[EREG_INTERRUPT] &= ~(data & 0x56); + // Clear interrupts + m_reg[B2_INTERRUPT] &= ~(data & (EINT_ERCV | EINT_RX_OVRN | EINT_TX_EMPTY | EINT_TX)); update_ethernet_irq(); break; } diff --git a/src/devices/machine/smc91c9x.h b/src/devices/machine/smc91c9x.h index 79fb52fcd0d..51b520fe971 100644 --- a/src/devices/machine/smc91c9x.h +++ b/src/devices/machine/smc91c9x.h @@ -4,13 +4,15 @@ SMC91C9X ethernet controller implementation - by Aaron Giles, Jean-François DEL NERO + by Aaron Giles, Ted Green **************************************************************************/ #ifndef MAME_MACHINE_SMC91C9X_H #define MAME_MACHINE_SMC91C9X_H +#pragma once + /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ @@ -22,39 +24,206 @@ public: DECLARE_READ16_MEMBER( read ); DECLARE_WRITE16_MEMBER( write ); - TIMER_CALLBACK_MEMBER(send_frame); - virtual void recv_cb(uint8_t *data, int length) override; void set_link_connected(bool connected) { m_link_unconnected = !connected; }; protected: - smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + enum class dev_type { + SMC91C94, + SMC91C96 + }; + + smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type); // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual void device_pre_save(void) override; - virtual void device_post_load(void) override; + // device_network_interface overrides + virtual void send_complete_cb(int result) override; + virtual int recv_start_cb(u8 *buf, int length) override; + virtual void recv_complete_cb(int result) override; -private: - static constexpr unsigned ETHER_BUFFER_SIZE = 2048; - // TODO: 96 device is larger - static constexpr unsigned ETHER_BUFFERS = 16; - static constexpr unsigned ETHERNET_ADDR_SIZE = 6; + void dump_bytes(u8 *buf, int length); + int address_filter(u8 *buf); + int receive(u8 *buf, int length); + + TIMER_CALLBACK_MEMBER(tx_poll); - // external network is present - bool m_network_available; + const dev_type m_device_type; + unsigned m_num_ebuf; + +private: + // Ethernet registers - bank 0 + enum bank0_addr : u8 { + B0_TCR = (0 * 8 + 0), + B0_EPH_STATUS = (0 * 8 + 1), + B0_RCR = (0 * 8 + 2), + B0_COUNTER = (0 * 8 + 3), + B0_MIR = (0 * 8 + 4), + B0_MCR = (0 * 8 + 5), + B0_BANK = (0 * 8 + 7) + }; + + // Ethernet registers - bank 1 + enum bank1_addr : u8 { + B1_CONFIG = (1 * 8 + 0), + B1_BASE = (1 * 8 + 1), + B1_IA0_1 = (1 * 8 + 2), + B1_IA2_3 = (1 * 8 + 3), + B1_IA4_5 = (1 * 8 + 4), + B1_GENERAL_PURP = (1 * 8 + 5), + B1_CONTROL = (1 * 8 + 6) + }; + + // Ethernet registers - bank 2 + enum bank2_addr : u8 { + B2_MMU_COMMAND = (2 * 8 + 0), + B2_PNR_ARR = (2 * 8 + 1), + B2_FIFO_PORTS = (2 * 8 + 2), + B2_POINTER = (2 * 8 + 3), + B2_DATA_0 = (2 * 8 + 4), + B2_DATA_1 = (2 * 8 + 5), + B2_INTERRUPT = (2 * 8 + 6) + }; + + // Ethernet registers - bank 3 + enum bank3_addr : u8 { + B3_MT0_1 = (3 * 8 + 0), + B3_MT2_3 = (3 * 8 + 1), + B3_MT4_5 = (3 * 8 + 2), + B3_MT6_7 = (3 * 8 + 3), + B3_MGMT = (3 * 8 + 4), + B3_REVISION = (3 * 8 + 5), + B3_ERCV = (3 * 8 + 6) + }; + + // Ethernet MMU commands + enum mmu_cmd : u8 { + ECMD_NOP = 0, + ECMD_ALLOCATE = 2, + ECMD_RESET_MMU = 4, + ECMD_REMOVE_TOPFRAME_RX = 6, + ECMD_REMOVE_TOPFRAME_TX = 7, + ECMD_REMOVE_RELEASE_TOPFRAME_RX = 8, + ECMD_RELEASE_PACKET = 10, + ECMD_ENQUEUE_PACKET = 12, + ECMD_RESET_FIFOS = 14 + }; + + // Ethernet interrupt bits + enum eint_def : u8 { + EINT_RCV = 0x01, + EINT_TX = 0x02, + EINT_TX_EMPTY = 0x04, + EINT_ALLOC = 0x08, + EINT_RX_OVRN = 0x10, + EINT_EPH = 0x20, + EINT_ERCV = 0x40, // 91c92 only + EINT_TX_IDLE = 0x80 // 91c94 only + }; + + // Address filter return codes + enum addr_filter_def : int { + ADDR_NOMATCH = 0, + ADDR_UNICAST = 1, + ADDR_BROADCAST = 2, + ADDR_MULTICAST = 3 + }; + + // Rx/Tx control bits + enum control_mask : u8 { + EBUF_RX_ALWAYS = 0x40, // Always set on receive buffer control byte + EBUF_ODD = 0x20, // Odd number of data payload bytes + EBUF_CRC = 0x10 // Tx add CRC + }; + + // Receive buffer status + enum rx_status_mask : u16 { + ALGNERR = 0x8000, + BRODCAST = 0x4000, + BADCRC = 0x2000, + ODDFRM = 0x1000, + TOOLNG = 0x0800, // Received fram is longer than 1518 bytes on cable + TOOSHORT = 0x0400, // Received fram is shorter than 64 bytes on cable + HASHVALUE = 0x007e, + MULTCAST = 0x0001 + }; + + // EPH Status bits + enum eph_mask : u16 { + LINK_OK = 0x4000, // State of link integrity test + CTR_ROL = 0x1000, // Counter roll Over + EXC_DEF = 0x0800, // Excessive deferral + LOST_CARR = 0x0400, // Lost carrier sense + LATCOL = 0x0200, // Late collisions detected + WAKEUP = 0x0100, // Magic packet received + TX_DEFER = 0x0080, // Transmit deferred + LTX_BRD = 0x0040, // Last transmit frame was a broadcast + SQET = 0x0020, // Signal Quality Error Test + E16COL = 0x0010, // 16 collisions reached + LTX_MULT = 0x0008, // Last transmit frame was a multicast + MULCOL = 0x0004, // Multiple collisions detected + SNGLCOL = 0x0002, // Single collision detected + TX_SUC = 0x0001 // Last transmit frame was successful + }; + + // CTR register bits + enum ctr_mask : u16 { + RCV_BAD = 0x4000, // Receive bad CRC packets + PWRDN = 0x2000, // Power down ethernet + WAKEUP_EN = 0x1000, // Enable magic packet wakeup + AUTO_RELEASE = 0x0800, // Release transmit packets on good transmission + LE_ENABLE = 0x0080, // Link Error enable + CR_ENABLE = 0x0040, // Counter Roll over enable + TE_ENABLE = 0x0020, // Transmit Error enable + EEPROM_SEL = 0x0004, // EEPROM address + RELOAD = 0x0002, // Reload config from EEPROM + STORE = 0x0001 // Store config to EEPROM + }; + + // Transmit Control Register bits + enum tcr_mask : u16 { + FDSE = 0x8000, + EPH_LOOP = 0x2000, + STP_SQET = 0x1000, + FDUPLX = 0x0800, + MON_CSN = 0x0400, + NOCRC = 0x0100, + PAD_EN = 0x0080, + FORCOL = 0x0004, + LOOP = 0x0002, + TXENA = 0x0001 + }; + + // Receive Control Register bits + enum rcr_mask : u16 { + SOFT_RST = 0x8000, + FILT_CAR = 0x4000, + STRIP_CRC = 0x0200, + RXEN = 0x0100, + ALMUL = 0x0004, + PRMS = 0x0002, + RX_ABORT = 0x0001 + }; + + // Pointer Register bits + enum pointer_mask : u16 { + RCV = 0x8000, + AUTO_INCR = 0x4000, + READ = 0x2000, + PTR = 0x07ff + }; + + static constexpr unsigned ETHER_BUFFER_SIZE = 256 * 6; + static const u8 ETH_BROADCAST[]; + static const u8 WMS_OUI[]; // mmu + // The bits in these vectors indicate a packet has been allocated u32 m_alloc_rx, m_alloc_tx; - std::vector<u32> m_comp_tx, m_comp_rx; - // Fifo for allocated (queued) transmit packets - std::vector<u32> m_trans_tx; - // Save vector data and sizes for proper save state restoration - u32 m_comp_tx_data[ETHER_BUFFERS], m_comp_rx_data[ETHER_BUFFERS], m_trans_tx_data[ETHER_BUFFERS]; - u32 m_comp_tx_size, m_comp_rx_size, m_trans_tx_size; + // Requests a packet allocation and returns true // and sets the packet number if successful bool alloc_req(const int tx, int &packet_num); @@ -77,23 +246,56 @@ private: uint8_t m_irq_state; // Main memory - uint8_t m_buffer[ETHER_BUFFER_SIZE * ETHER_BUFFERS]; + std::unique_ptr<u8[]> m_buffer; /* counters */ uint32_t m_sent; uint32_t m_recd; - emu_timer* m_tx_timer; + emu_timer* m_tx_poll; - int ethernet_packet_is_for_me(const uint8_t *mac_address); - int is_broadcast(const uint8_t *mac_address); + int m_tx_active; + int m_rx_active; + int m_tx_retry_count; + u8 m_rx_hash; + u8 m_loopback_result; void update_ethernet_irq(); void update_stats(); void process_command(uint16_t data); - void clear_tx_fifo(); - void clear_rx_fifo(); + void reset_tx_fifos(); + + // TODO: Make circular fifo a separate device + // Simple circular FIFO, power of 2 size, no over/under run checking + static constexpr unsigned FIFO_SIZE = 1 << 5; + + // FIFO for allocated (queued) transmit packets + u8 m_queued_tx[FIFO_SIZE]; + int m_queued_tx_h, m_queued_tx_t; + void reset_queued_tx() { m_queued_tx_t = m_queued_tx_h = 0; }; + void push_queued_tx(const u8 &data) { m_queued_tx[m_queued_tx_h++] = data; m_queued_tx_h &= FIFO_SIZE - 1; }; + u8 pop_queued_tx() { u8 val = m_queued_tx[m_queued_tx_t++]; m_queued_tx_t &= FIFO_SIZE - 1; return val; }; + bool empty_queued_tx() const { return m_queued_tx_h == m_queued_tx_t; }; + u8 curr_queued_tx() const { return m_queued_tx[m_queued_tx_t]; }; + + // FIFO for completed transmit packets + u8 m_completed_tx[FIFO_SIZE]; + int m_completed_tx_h, m_completed_tx_t; + void reset_completed_tx() { m_completed_tx_t = m_completed_tx_h = 0; }; + void push_completed_tx(const u8 &data) { m_completed_tx[m_completed_tx_h++] = data; m_completed_tx_h &= FIFO_SIZE - 1; }; + u8 pop_completed_tx() { u8 val = m_completed_tx[m_completed_tx_t++]; m_completed_tx_t &= FIFO_SIZE - 1; return val; }; + bool empty_completed_tx() const { return m_completed_tx_h == m_completed_tx_t; }; + u8 curr_completed_tx() const { return m_completed_tx[m_completed_tx_t]; }; + + // FIFO for completed receive packets + u8 m_completed_rx[FIFO_SIZE]; + int m_completed_rx_h, m_completed_rx_t; + void reset_completed_rx() { m_completed_rx_t = m_completed_rx_h = 0; }; + void push_completed_rx(const u8 &data) { m_completed_rx[m_completed_rx_h++] = data; m_completed_rx_h &= FIFO_SIZE - 1; }; + u8 pop_completed_rx() { u8 val = m_completed_rx[m_completed_rx_t++]; m_completed_rx_t &= FIFO_SIZE - 1; return val; }; + bool empty_completed_rx() const { return m_completed_rx_h == m_completed_rx_t; }; + u8 curr_completed_rx() const { return m_completed_rx[m_completed_rx_t]; }; }; diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp index 49dc4741a75..b7167110f0e 100644 --- a/src/devices/machine/spg2xx.cpp +++ b/src/devices/machine/spg2xx.cpp @@ -41,12 +41,14 @@ DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-C #define LOG_PPU_READS (1U << 22) #define LOG_PPU_WRITES (1U << 23) #define LOG_UNKNOWN_PPU (1U << 24) +#define LOG_FIQ (1U << 25) +#define LOG_SIO (1U << 26) #define LOG_IO (LOG_IO_READS | LOG_IO_WRITES | LOG_IRQS | LOG_GPIO | LOG_UART | LOG_I2C | LOG_DMA | LOG_TIMERS | LOG_UNKNOWN_IO) #define LOG_CHANNELS (LOG_CHANNEL_READS | LOG_CHANNEL_WRITES) #define LOG_SPU (LOG_SPU_READS | LOG_SPU_WRITES | LOG_UNKNOWN_SPU | LOG_CHANNEL_READS | LOG_CHANNEL_WRITES \ | LOG_ENVELOPES | LOG_SAMPLES | LOG_RAMPDOWN | LOG_BEAT) #define LOG_PPU (LOG_PPU_READS | LOG_PPU_WRITES | LOG_UNKNOWN_PPU) -#define LOG_ALL (LOG_IO | LOG_SPU | LOG_PPU | LOG_VLINES | LOG_SEGMENT) +#define LOG_ALL (LOG_IO | LOG_SPU | LOG_PPU | LOG_VLINES | LOG_SEGMENT | LOG_FIQ) #define VERBOSE (0) #include "logmacro.h" @@ -218,6 +220,7 @@ void spg2xx_device::device_reset() m_video_regs[0x36] = 0xffff; m_video_regs[0x37] = 0xffff; m_video_regs[0x3c] = 0x0020; + m_video_regs[0x42] = 0x0001; m_hide_page0 = false; m_hide_page1 = false; @@ -289,7 +292,7 @@ void spg2xx_device::blit(const rectangle &cliprect, uint32_t line, uint32_t xoff uint32_t palette_offset = (attr & 0x0f00) >> 4; if (m_debug_blit && SPG_DEBUG_VIDEO) { - printf("line:%d xy:%08x,%08x attr:%08x ctrl:%08x bitmap_addr:%08x tile:%04x\n", line, xoff, yoff, attr, ctrl, bitmap_addr, tile); + printf("s:%d line:%d xy:%08x,%08x attr:%08x ctrl:%08x bitmap_addr:%08x tile:%04x\n", cliprect.min_x, line, xoff, yoff, attr, ctrl, bitmap_addr, tile); printf("hw:%d,%d f:%d,%d fm:%d,%d ncols:%d pobs:%02x ", w, h, (attr & TILE_X_FLIP) ? 1 : 0, (attr & TILE_Y_FLIP) ? 1 : 0, xflipmask, yflipmask, nc, palette_offset); } palette_offset >>= nc; @@ -301,12 +304,12 @@ void spg2xx_device::blit(const rectangle &cliprect, uint32_t line, uint32_t xoff uint32_t bits_per_row = nc * w / 16; uint32_t words_per_tile = bits_per_row * h; - uint32_t m = bitmap_addr + words_per_tile * tile + bits_per_row * line; + uint32_t m = bitmap_addr + words_per_tile * tile + bits_per_row * (line ^ yflipmask); uint32_t bits = 0; uint32_t nbits = 0; uint32_t y = line; - int yy = (yoff + (y ^ yflipmask)) & 0x1ff; + int yy = (yoff + y) & 0x1ff; if (yy >= 0x01c0) yy -= 0x0200; @@ -400,7 +403,11 @@ void spg2xx_device::blit_page(const rectangle &cliprect, uint32_t scanline, int uint32_t y0 = bitmap_y / tile_h; uint32_t tile_scanline = bitmap_y % tile_h; uint32_t tile_address = tile_count_x * y0; + if (SPG_DEBUG_VIDEO && machine().input().code_pressed(KEYCODE_H)) + printf("s:%3d | baddr:%08x | yscr:%3d | bity:%3d | y0:%2d | ts:%2d\n", scanline, bitmap_addr, yscroll, bitmap_y, y0, tile_scanline); + if (SPG_DEBUG_VIDEO && machine().input().code_pressed(KEYCODE_EQUALS)) + m_debug_blit = true; for (uint32_t x0 = 0; x0 < tile_count_x; x0++, tile_address++) { uint32_t yy = ((tile_h * y0 - yscroll + 0x10) & 0xff) - 0x10; @@ -436,6 +443,8 @@ void spg2xx_device::blit_page(const rectangle &cliprect, uint32_t scanline, int blit(cliprect, tile_scanline, xx, yy, tileattr, tilectrl, bitmap_addr, tile); } + if (SPG_DEBUG_VIDEO && machine().input().code_pressed(KEYCODE_EQUALS)) + m_debug_blit = false; } void spg2xx_device::blit_sprite(const rectangle &cliprect, uint32_t scanline, int depth, uint32_t base_addr) @@ -470,13 +479,22 @@ void spg2xx_device::blit_sprite(const rectangle &cliprect, uint32_t scanline, in x &= 0x01ff; y &= 0x01ff; - if (y > scanline) - return; + static bool check_y = true; + + if (SPG_DEBUG_VIDEO && machine().input().code_pressed_once(KEYCODE_J)) + check_y = !check_y; uint32_t tile_line = ((scanline - y) + 0x200) % h; + int16_t test_y = (y + tile_line) & 0x1ff; + if (test_y >= 0x01c0) + test_y -= 0x0200; - if (tile_line >= h) + if (test_y > scanline && check_y) + { + if (SPG_DEBUG_VIDEO && machine().input().code_pressed(KEYCODE_L)) + printf("Rejecting because %d > %d\n", test_y, scanline); return; + } #if SPG_DEBUG_VIDEO if (m_debug_sprites && machine().input().code_pressed(KEYCODE_MINUS)) @@ -815,9 +833,12 @@ WRITE16_MEMBER(spg2xx_device::video_w) break; case 0x72: // Sprite DMA Length + { LOGMASKED(LOG_DMA, "video_w: Sprite DMA Length = %04x\n", data & 0x03ff); - do_sprite_dma(data & 0x3ff); + uint16_t length = data & 0x3ff; + do_sprite_dma(length ? length : 0x400); break; + } default: LOGMASKED(LOG_UNKNOWN_PPU, "video_w: Unknown register %04x = %04x\n", 0x2800 + offset, data); @@ -891,7 +912,8 @@ void spg2xx_device::uart_rx(uint8_t data) m_uart_rx_fifo[m_uart_rx_fifo_end] = data; m_uart_rx_fifo_end = (m_uart_rx_fifo_end + 1) % ARRAY_LENGTH(m_uart_rx_fifo); m_uart_rx_fifo_count++; - m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate)); + if (m_uart_rx_timer->remaining() == attotime::never) + m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate)); } } @@ -947,6 +969,8 @@ READ16_MEMBER(spg2xx_device::io_r) case 0x27: // ADC Data m_io_regs[0x27] = 0; + IO_IRQ_STATUS &= ~0x4000; + check_irqs(0x4000); LOGMASKED(LOG_IO_READS, "%s: io_r: ADC Data = %04x\n", machine().describe_context(), val); break; @@ -964,7 +988,7 @@ READ16_MEMBER(spg2xx_device::io_r) break; case 0x2e: // FIQ Source Select - LOGMASKED(LOG_IRQS, "io_r: FIQ Source Select = %04x\n", val); + LOGMASKED(LOG_FIQ, "io_r: FIQ Source Select = %04x\n", val); break; case 0x2f: // Data Segment @@ -979,20 +1003,30 @@ READ16_MEMBER(spg2xx_device::io_r) case 0x36: // UART RX Data if (m_uart_rx_available) { + m_io_regs[0x31] &= ~0x0081; + logerror("UART Rx data is available, clearing bits\n"); if (m_uart_rx_fifo_count) { + logerror("Remaining count %d, value %02x\n", m_uart_rx_fifo_count, m_uart_rx_fifo[m_uart_rx_fifo_start]); m_io_regs[0x36] = m_uart_rx_fifo[m_uart_rx_fifo_start]; + val = m_io_regs[0x36]; m_uart_rx_fifo_start = (m_uart_rx_fifo_start + 1) % ARRAY_LENGTH(m_uart_rx_fifo); m_uart_rx_fifo_count--; + if (m_uart_rx_fifo_count == 0) { - m_io_regs[0x31] &= ~0x0081; m_uart_rx_available = false; } + else + { + logerror("Remaining count %d, setting up timer\n", m_uart_rx_fifo_count); + //uart_receive_tick(); + if (m_uart_rx_timer->remaining() == attotime::never) + m_uart_rx_timer->adjust(attotime::from_ticks(BIT(m_io_regs[0x30], 5) ? 11 : 10, m_uart_baud_rate)); + } } else { - m_io_regs[0x31] &= ~0x0081; m_uart_rx_available = false; } } @@ -1091,6 +1125,20 @@ void spg2xx_device::update_portb_special_modes() } } +WRITE16_MEMBER(spg28x_device::io_w) +{ + if (offset == 0x33) + { + m_io_regs[offset] = data; + m_uart_baud_rate = 27000000 / (0x10000 - m_io_regs[0x33]); + LOGMASKED(LOG_UART, "io_w: UART Baud Rate scaler = %04x (%d baud)\n", data, m_uart_baud_rate); + } + else + { + spg2xx_device::io_w(space, offset, data, mem_mask); + } +} + WRITE16_MEMBER(spg2xx_device::io_w) { static const char *const gpioregs[] = { "GPIO Data Port", "GPIO Buffer Port", "GPIO Direction Port", "GPIO Attribute Port", "GPIO IRQ/Latch Port" }; @@ -1274,16 +1322,17 @@ WRITE16_MEMBER(spg2xx_device::io_w) case 0x25: // ADC Control { LOGMASKED(LOG_IO_WRITES, "%s: io_w: ADC Control = %04x\n", machine().describe_context(), data); - const uint16_t changed = m_io_regs[offset] ^ data; - m_io_regs[offset] = data; - if (BIT(changed, 12) && BIT(data, 12) && !BIT(m_io_regs[offset], 1)) + m_io_regs[offset] = data & ~0x1000; + if (BIT(data, 12) && !BIT(m_io_regs[offset], 1)) { m_io_regs[0x27] = 0x8000 | (m_adc_in() & 0x7fff); const uint16_t old = IO_IRQ_STATUS; - IO_IRQ_STATUS |= 0x2000; + IO_IRQ_STATUS |= 0x4000; const uint16_t changed = IO_IRQ_STATUS ^ old; if (changed) + { check_irqs(changed); + } } break; } @@ -1324,7 +1373,7 @@ WRITE16_MEMBER(spg2xx_device::io_w) { "PPU", "SPU Channel", "Timer A", "Timer B", "UART/SPI", "External", "Reserved", "None" }; - LOGMASKED(LOG_IRQS, "io_w: FIQ Source Select (not yet implemented) = %04x, %s\n", data, s_fiq_select[data & 7]); + LOGMASKED(LOG_FIQ, "io_w: FIQ Source Select (not yet implemented) = %04x, %s\n", data, s_fiq_select[data & 7]); m_io_regs[offset] = data; break; } @@ -1424,6 +1473,33 @@ WRITE16_MEMBER(spg2xx_device::io_w) m_io_regs[offset] |= data & 0x0007; break; + case 0x50: // SIO Setup + { + static const char* const s_addr_mode[4] = { "16-bit", "None", "8-bit", "24-bit" }; + static const char* const s_baud_rate[4] = { "/16", "/4", "/8", "/32" }; + LOGMASKED(LOG_SIO, "io_w: SIO Setup (not implemented) = %04x (DS301Ready:%d, Start:%d, Auto:%d, IRQEn:%d, Width:%d, Related:%d\n", data + , BIT(data, 11), BIT(data, 10), BIT(data, 9), BIT(data, 8), BIT(data, 7) ? 16 : 8, BIT(data, 6)); + LOGMASKED(LOG_SIO, " (Mode:%s, RWProtocol:%d, Rate:sysclk%s, AddrMode:%s)\n" + , BIT(data, 5), BIT(data, 4), s_baud_rate[(data >> 2) & 3], s_addr_mode[data & 3]); + break; + } + + case 0x52: // SIO Start Address (low) + LOGMASKED(LOG_SIO, "io_w: SIO Stat Address (low) (not implemented) = %04x\n", data); + break; + + case 0x53: // SIO Start Address (hi) + LOGMASKED(LOG_SIO, "io_w: SIO Stat Address (hi) (not implemented) = %04x\n", data); + break; + + case 0x54: // SIO Data + LOGMASKED(LOG_SIO, "io_w: SIO Data (not implemented) = %04x\n", data); + break; + + case 0x55: // SIO Automatic Transmit Count + LOGMASKED(LOG_SIO, "io_w: SIO Auto Transmit Count (not implemented) = %04x\n", data); + break; + case 0x58: // I2C Command LOGMASKED(LOG_I2C, "io_w: I2C Command = %04x\n", data); m_io_regs[offset] = data; @@ -1482,7 +1558,9 @@ WRITE16_MEMBER(spg2xx_device::io_w) case 0x102: // DMA Length LOGMASKED(LOG_DMA, "io_w: DMA Length = %04x\n", data); - do_cpu_dma(data); + if (!(data & 0xc000)) // jak_dora writes 0xffff here which ends up trashing registers etc. why? such writes can't be valid + do_cpu_dma(data); + break; default: @@ -1548,12 +1626,6 @@ void spg2xx_device::system_timer_tick() uint16_t check_mask = 0x0040; IO_IRQ_STATUS |= 0x0040; - if (machine().input().code_pressed_once(KEYCODE_H)) - { - IO_IRQ_STATUS |= 0x4000; - check_irqs(0x4000); - } - m_2khz_divider++; if (m_2khz_divider == 2) { @@ -1605,9 +1677,6 @@ void spg2xx_device::uart_receive_tick() { LOGMASKED(LOG_UART, "uart_receive_tick: Setting RBF and RxRDY\n"); m_io_regs[0x31] |= 0x81; - m_io_regs[0x36] = m_uart_rx_fifo[m_uart_rx_fifo_start]; - m_uart_rx_fifo_start = (m_uart_rx_fifo_start + 1) % ARRAY_LENGTH(m_uart_rx_fifo); - m_uart_rx_fifo_count--; m_uart_rx_available = true; if (BIT(m_io_regs[0x30], 0)) { @@ -1730,8 +1799,6 @@ void spg2xx_device::do_gpio(uint32_t offset) uint16_t what = (buffer & (push | pull)); what ^= (dir & ~attr); what &= ~special; - //if (index == 0) - //printf("buf:%04x, dir:%04x, pull:%04x, push:%04x\n", buffer, dir, pull, push); switch (index) { diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h index 1220b4bfb3b..937fe1d4ead 100644 --- a/src/devices/machine/spg2xx.h +++ b/src/devices/machine/spg2xx.h @@ -387,8 +387,8 @@ protected: DECLARE_WRITE16_MEMBER(video_w); DECLARE_READ16_MEMBER(audio_r); DECLARE_WRITE16_MEMBER(audio_w); - DECLARE_READ16_MEMBER(io_r); - DECLARE_WRITE16_MEMBER(io_w); + virtual DECLARE_READ16_MEMBER(io_r); + virtual DECLARE_WRITE16_MEMBER(io_w); void check_irqs(const uint16_t changed); inline void check_video_irq(); @@ -552,6 +552,8 @@ public: } spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual DECLARE_WRITE16_MEMBER(io_w) override; }; DECLARE_DEVICE_TYPE(SPG24X, spg24x_device) diff --git a/src/devices/sound/nile.cpp b/src/devices/sound/nile.cpp index 4e78b754db5..fcd9e4b592d 100644 --- a/src/devices/sound/nile.cpp +++ b/src/devices/sound/nile.cpp @@ -69,6 +69,11 @@ nile_device::nile_device(const machine_config &mconfig, const char *tag, device_ void nile_device::device_start() { m_stream = stream_alloc(0, 2, 44100); + save_item(NAME(m_sound_regs)); + save_item(NAME(m_vpos)); + save_item(NAME(m_frac)); + save_item(NAME(m_lponce)); + save_item(NAME(m_ctrl)); } diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp index 006d92855ba..129dddebbf2 100644 --- a/src/devices/video/ef9345.cpp +++ b/src/devices/video/ef9345.cpp @@ -212,7 +212,7 @@ void ef9345_device::device_timer(emu_timer &timer, device_timer_id id, int param void ef9345_device::set_busy_flag(int period) { m_bf = 1; - m_busy_timer->adjust(attotime::from_usec(period)); + m_busy_timer->adjust(attotime::from_nsec(period)); } // draw a char in 40 char line mode @@ -753,7 +753,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) { case 0x00: //KRF: R1,R2,R3->ram case 0x01: //KRF: R1,R2,R3->ram + increment - set_busy_flag(4); + set_busy_flag(4000); m_videoram->write_byte(a, m_registers[1]); m_videoram->write_byte(a + 0x0800, m_registers[2]); m_videoram->write_byte(a + 0x1000, m_registers[3]); @@ -761,14 +761,14 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x02: //KRG: R1,R2->ram case 0x03: //KRG: R1,R2->ram + increment - set_busy_flag(5.5); + set_busy_flag(5500); m_videoram->write_byte(a, m_registers[1]); m_videoram->write_byte(a + 0x0800, m_registers[2]); if (cmd&1) inc_x(7); break; case 0x08: //KRF: ram->R1,R2,R3 case 0x09: //KRF: ram->R1,R2,R3 + increment - set_busy_flag(7.5); + set_busy_flag(7500); m_registers[1] = m_videoram->read_byte(a); m_registers[2] = m_videoram->read_byte(a + 0x0800); m_registers[3] = m_videoram->read_byte(a + 0x1000); @@ -776,14 +776,14 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x0a: //KRG: ram->R1,R2 case 0x0b: //KRG: ram->R1,R2 + increment - set_busy_flag(7.5); + set_busy_flag(7500); m_registers[1] = m_videoram->read_byte(a); m_registers[2] = m_videoram->read_byte(a + 0x0800); if (cmd&1) inc_x(7); break; case 0x30: //OCT: R1->RAM, main pointer case 0x31: //OCT: R1->RAM, main pointer + inc - set_busy_flag(4); + set_busy_flag(4000); m_videoram->write_byte(indexram(7), m_registers[1]); if (cmd&1) @@ -795,7 +795,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x34: //OCT: R1->RAM, aux pointer case 0x35: //OCT: R1->RAM, aux pointer + inc - set_busy_flag(4); + set_busy_flag(4000); m_videoram->write_byte(indexram(5), m_registers[1]); if (cmd&1) @@ -803,7 +803,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x38: //OCT: RAM->R1, main pointer case 0x39: //OCT: RAM->R1, main pointer + inc - set_busy_flag(4.5); + set_busy_flag(4500); m_registers[1] = m_videoram->read_byte(indexram(7)); if (cmd&1) @@ -816,7 +816,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x3c: //OCT: RAM->R1, aux pointer case 0x3d: //OCT: RAM->R1, aux pointer + inc - set_busy_flag(4.5); + set_busy_flag(4500); m_registers[1] = m_videoram->read_byte(indexram(5)); if (cmd&1) @@ -824,7 +824,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x50: //KRL: 80 uint8_t - 12 bits write case 0x51: //KRL: 80 uint8_t - 12 bits write + inc - set_busy_flag(12.5); + set_busy_flag(12500); m_videoram->write_byte(a, m_registers[1]); switch((a / 0x0800) & 1) { @@ -850,7 +850,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) break; case 0x58: //KRL: 80 uint8_t - 12 bits read case 0x59: //KRL: 80 uint8_t - 12 bits read + inc - set_busy_flag(11.5); + set_busy_flag(11500); m_registers[1] = m_videoram->read_byte(a); switch((a / 0x0800) & 1) { @@ -879,7 +879,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x83: //IND: R1->PAT case 0x84: //IND: R1->DOR case 0x87: //IND: R1->ROR - set_busy_flag(2); + set_busy_flag(2000); switch(cmd&7) { case 1: m_tgs = m_registers[1]; break; @@ -897,7 +897,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x8b: //IND: PAT->R1 case 0x8c: //IND: DOR->R1 case 0x8f: //IND: ROR->R1 - set_busy_flag(3.5); + set_busy_flag(3500); switch(cmd&7) { case 0: m_registers[1] = m_charset[indexrom(7) & 0x1fff]; break; @@ -915,7 +915,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) case 0x99: //VSM: vertical sync mask set break; case 0xb0: //INY: increment Y - set_busy_flag(2); + set_busy_flag(2000); inc_y(6); m_state &= 0x8f; //reset S4(LXa), S5(LXm), S6(Al) break; @@ -936,7 +936,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) uint8_t n = (cmd>>4) - 0x0c; uint8_t r1 = (cmd&0x04) ? 7 : 5; uint8_t r2 = (cmd&0x04) ? 5 : 7; - int busy = 2; + int busy = 2000; for(i = 0; i < 1280; i++) { @@ -959,7 +959,7 @@ void ef9345_device::ef9345_exec(uint8_t cmd) inc_y(6); } - busy += 4 * n; + busy += 4000 * n; } m_state &= 0x8f; //reset S4(LXa), S5(LXm), S6(Al) set_busy_flag(busy); @@ -994,7 +994,7 @@ void ef9345_device::update_scanline(uint16_t scanline) if (scanline == 250) m_state &= 0xfb; - set_busy_flag(104); + set_busy_flag(104000); if (m_char_mode == MODE12x80 || m_char_mode == MODE8x80) { diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h index 3ff34b50ae7..8bf4f4a56ec 100644 --- a/src/devices/video/jangou_blitter.h +++ b/src/devices/video/jangou_blitter.h @@ -7,14 +7,6 @@ #pragma once - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_JANGOU_BLITTER_ADD(_tag,_freq) \ - MCFG_DEVICE_ADD(_tag, JANGOU_BLITTER, _freq) - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h index 3fa203f385f..5c6d2c46df3 100644 --- a/src/devices/video/mb90082.h +++ b/src/devices/video/mb90082.h @@ -12,14 +12,6 @@ #pragma once - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_MB90082_ADD(_tag,_freq) \ - MCFG_DEVICE_ADD(_tag, MB90082, _freq) - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h index a8b53637a7d..90f0eea422a 100644 --- a/src/devices/video/mb_vcu.h +++ b/src/devices/video/mb_vcu.h @@ -23,8 +23,8 @@ public: mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - void set_palette_tag(const char *tag) { m_palette.set_tag(tag); } - void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } + template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); } + template <typename T> void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } // I/O operations DECLARE_WRITE8_MEMBER( write_vregs ); @@ -86,15 +86,4 @@ private: // device type definition DECLARE_DEVICE_TYPE(MB_VCU, mb_vcu_device) - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_MB_VCU_CPU(_tag) \ - downcast<mb_vcu_device &>(*device).set_cpu_tag(_tag); - -#define MCFG_MB_VCU_PALETTE(_palette_tag) \ - downcast<mb_vcu_device &>(*device).set_palette_tag(_palette_tag); - #endif // MAME_VIDEO_MB_VCU_H diff --git a/src/devices/video/tlc34076.h b/src/devices/video/tlc34076.h index fb816dd1181..f5aa1d1403c 100644 --- a/src/devices/video/tlc34076.h +++ b/src/devices/video/tlc34076.h @@ -66,15 +66,6 @@ private: }; -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_TLC34076_ADD(tag, bits) \ - MCFG_DEVICE_ADD((tag), TLC34076, 0) \ - downcast<tlc34076_device &>(*device).set_bits((tlc34076_device::bits)); - - DECLARE_DEVICE_TYPE(TLC34076, tlc34076_device) #endif // MAME_VIDEO_TLC34076_H diff --git a/src/devices/video/tms34061.h b/src/devices/video/tms34061.h index e4f92e75ac2..c453cc653ed 100644 --- a/src/devices/video/tms34061.h +++ b/src/devices/video/tms34061.h @@ -15,17 +15,6 @@ #pragma once -#define MCFG_TMS34061_ROWSHIFT(_shift) \ - downcast<tms34061_device &>(*device).set_rowshift(_shift); - -#define MCFG_TMS34061_VRAM_SIZE(_size) \ - downcast<tms34061_device &>(*device).set_vram_size(_size); - -#define MCFG_TMS34061_INTERRUPT_CB(_devcb) \ - downcast<tms34061_device &>(*device).set_interrupt_callback(DEVCB_##_devcb); - - - // ======================> tms34061_device class tms34061_device : public device_t, public device_video_interface @@ -46,7 +35,6 @@ public: void set_rowshift(uint8_t rowshift) { m_rowshift = rowshift; } void set_vram_size(uint32_t vramsize) { m_vramsize = vramsize; } - template <class Object> devcb_base &set_interrupt_callback(Object &&cb) { return m_interrupt_cb.set_callback(std::forward<Object>(cb)); } auto int_callback() { return m_interrupt_cb.bind(); } /* reads/writes to the 34061 */ diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h index 11146f8b21f..e20e02d09c3 100644 --- a/src/devices/video/tms3556.h +++ b/src/devices/video/tms3556.h @@ -19,12 +19,6 @@ /* if DOUBLE_WIDTH set, the horizontal resolution is doubled */ #define TMS3556_DOUBLE_WIDTH 0 -///************************************************************************* -// INTERFACE CONFIGURATION MACROS -///************************************************************************* - -#define MCFG_TMS3556_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, TMS3556, 0) ///************************************************************************* // TYPE DEFINITIONS diff --git a/src/devices/video/vector.h b/src/devices/video/vector.h index 919395f043a..6b473c3501c 100644 --- a/src/devices/video/vector.h +++ b/src/devices/video/vector.h @@ -62,7 +62,4 @@ private: // device type definition DECLARE_DEVICE_TYPE(VECTOR, vector_device) -#define MCFG_VECTOR_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, VECTOR, 0) - #endif // MAME_VIDEO_VECTOR_H diff --git a/src/devices/video/vic4567.h b/src/devices/video/vic4567.h index e680a3ff0cf..ecadbfe19d9 100644 --- a/src/devices/video/vic4567.h +++ b/src/devices/video/vic4567.h @@ -110,16 +110,16 @@ public: vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } + template <typename T> void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } void set_vic3_type(vic3_type type) { m_type = type; } - template <class Object> devcb_base &set_dma_read_callback(Object &&cb) { return m_dma_read_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_dma_read_color_callback(Object &&cb) { return m_dma_read_color_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_interrupt_callback(Object &&cb) { return m_interrupt_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_port_changed_callback(Object &&cb) { return m_port_changed_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_lightpen_button_callback(Object &&cb) { return m_lightpen_button_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_lightpen_x_callback(Object &&cb) { return m_lightpen_x_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_lightpen_y_callback(Object &&cb) { return m_lightpen_y_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_c64_mem_r_callback(Object &&cb) { return m_c64_mem_r_cb.set_callback(std::forward<Object>(cb)); } + auto dma_read_callback() { return m_dma_read_cb.bind(); } + auto dma_read_color_callback() { return m_dma_read_color_cb.bind(); } + auto interrupt_callback() { return m_interrupt_cb.bind(); } + auto port_changed_callback() { return m_port_changed_cb.bind(); } + auto lightpen_button_callback() { return m_lightpen_button_cb.bind(); } + auto lightpen_x_callback() { return m_lightpen_x_cb.bind(); } + auto lightpen_y_callback() { return m_lightpen_y_cb.bind(); } + auto c64_mem_r_callback() { return m_c64_mem_r_cb.bind(); } DECLARE_WRITE8_MEMBER(port_w); DECLARE_WRITE8_MEMBER(palette_w); @@ -236,35 +236,4 @@ private: DECLARE_DEVICE_TYPE(VIC3, vic3_device) - -#define MCFG_VIC3_CPU(tag) \ - downcast<vic3_device &>(*device).set_cpu_tag(tag); - -#define MCFG_VIC3_TYPE(type) \ - downcast<vic3_device &>(*device).set_vic3_type((vic3_device::vic3_type::type)); - -#define MCFG_VIC3_DMA_READ_CB(cb) \ - downcast<vic3_device &>(*device).set_dma_read_callback((DEVCB_##cb)); - -#define MCFG_VIC3_DMA_READ_COLOR_CB(cb) \ - downcast<vic3_device &>(*device).set_dma_read_color_callback((DEVCB_##cb)); - -#define MCFG_VIC3_INTERRUPT_CB(cb) \ - downcast<vic3_device &>(*device).set_interrupt_callback((DEVCB_##cb)); - -#define MCFG_VIC3_PORT_CHANGED_CB(cb) \ - downcast<vic3_device &>(*device).set_port_changed_callback((DEVCB_##cb)); - -#define MCFG_VIC3_LIGHTPEN_BUTTON_CB(cb) \ - downcast<vic3_device &>(*device).set_lightpen_button_callback((DEVCB_##cb)); - -#define MCFG_VIC3_LIGHTPEN_X_CB(cb) \ - downcast<vic3_device &>(*device).set_lightpen_x_callback((DEVCB_##cb)); - -#define MCFG_VIC3_LIGHTPEN_Y_CB(cb) \ - downcast<vic3_device &>(*device).set_lightpen_y_callback((DEVCB_##cb)); - -#define MCFG_VIC3_C64_MEM_R_CB(cb) \ - downcast<vic3_device &>(*device).set_c64_mem_r_callback((DEVCB_##cb)); - #endif // MAME_VIDEO_VIC4567_H diff --git a/src/devices/video/voodoo.h b/src/devices/video/voodoo.h index 5c39e867d85..26475f527de 100644 --- a/src/devices/video/voodoo.h +++ b/src/devices/video/voodoo.h @@ -1429,32 +1429,6 @@ enum #define STD_VOODOO_3_CLOCK 132000000 - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_VOODOO_FBMEM(_value) \ - downcast<voodoo_device &>(*device).set_fbmem(_value); - -#define MCFG_VOODOO_TMUMEM(_value1, _value2) \ - downcast<voodoo_device &>(*device).set_tmumem(_value1, _value2); - -#define MCFG_VOODOO_SCREEN_TAG(_tag) \ - downcast<voodoo_device &>(*device).set_screen_tag(_tag); - -#define MCFG_VOODOO_CPU_TAG(_tag) \ - downcast<voodoo_device &>(*device).set_cpu_tag(_tag); - -#define MCFG_VOODOO_VBLANK_CB(_devcb) \ - downcast<voodoo_device &>(*device).set_vblank_callback(DEVCB_##_devcb); - -#define MCFG_VOODOO_STALL_CB(_devcb) \ - downcast<voodoo_device &>(*device).set_stall_callback(DEVCB_##_devcb); - -#define MCFG_VOODOO_PCIINT_CB(_devcb) \ - downcast<voodoo_device &>(*device).set_pciint_callback(DEVCB_##_devcb); - /*************************************************************************** FUNCTION PROTOTYPES ***************************************************************************/ @@ -1470,9 +1444,6 @@ public: void set_tmumem(int value1, int value2) { m_tmumem0 = value1; m_tmumem1 = value2; } template <typename T> void set_screen_tag(T &&tag) { m_screen_finder.set_tag(std::forward<T>(tag)); } template <typename T> void set_cpu_tag(T &&tag) { m_cpu_finder.set_tag(std::forward<T>(tag)); } - template <class Object> devcb_base &set_vblank_callback(Object &&cb) { return m_vblank.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_stall_callback(Object &&cb) { return m_stall.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_pciint_callback(Object &&cb) { return m_pciint.set_callback(std::forward<Object>(cb)); } auto vblank_callback() { return m_vblank.bind(); } auto stall_callback() { return m_stall.bind(); } auto pciint_callback() { return m_pciint.bind(); } diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp index 82fc89aaa9a..5a78099e01a 100644 --- a/src/devices/video/voodoo_pci.cpp +++ b/src/devices/video/voodoo_pci.cpp @@ -6,27 +6,31 @@ #include "screen.h" -MACHINE_CONFIG_START(voodoo_1_pci_device::device_add_mconfig) - MCFG_DEVICE_ADD("voodoo", VOODOO_1, STD_VOODOO_1_CLOCK) - MCFG_VOODOO_FBMEM(4) - MCFG_VOODOO_TMUMEM(1, 0) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(voodoo_2_pci_device::device_add_mconfig) - MCFG_DEVICE_ADD("voodoo", VOODOO_2, STD_VOODOO_2_CLOCK) - MCFG_VOODOO_FBMEM(4) - MCFG_VOODOO_TMUMEM(1, 0) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(voodoo_banshee_pci_device::device_add_mconfig) - MCFG_DEVICE_ADD("voodoo", VOODOO_BANSHEE, STD_VOODOO_BANSHEE_CLOCK) - MCFG_VOODOO_FBMEM(16) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(voodoo_3_pci_device::device_add_mconfig) - MCFG_DEVICE_ADD("voodoo", VOODOO_3, STD_VOODOO_3_CLOCK) - MCFG_VOODOO_FBMEM(16) -MACHINE_CONFIG_END +void voodoo_1_pci_device::device_add_mconfig(machine_config &config) +{ + VOODOO_1(config, m_voodoo, STD_VOODOO_1_CLOCK); + m_voodoo->set_fbmem(4); + m_voodoo->set_tmumem(1, 0); +} + +void voodoo_2_pci_device::device_add_mconfig(machine_config &config) +{ + VOODOO_2(config, m_voodoo, STD_VOODOO_2_CLOCK); + m_voodoo->set_fbmem(4); + m_voodoo->set_tmumem(1, 0); +} + +void voodoo_banshee_pci_device::device_add_mconfig(machine_config &config) +{ + VOODOO_BANSHEE(config, m_voodoo, STD_VOODOO_BANSHEE_CLOCK); + m_voodoo->set_fbmem(16); +} + +void voodoo_3_pci_device::device_add_mconfig(machine_config &config) +{ + VOODOO_3(config, m_voodoo, STD_VOODOO_3_CLOCK); + m_voodoo->set_fbmem(16); +} DEFINE_DEVICE_TYPE(VOODOO_1_PCI, voodoo_1_pci_device, "voodoo_1_pci", "Voodoo 1 PCI") DEFINE_DEVICE_TYPE(VOODOO_2_PCI, voodoo_2_pci_device, "voodoo_2_pci", "Voodoo 2 PCI") @@ -42,22 +46,22 @@ void voodoo_pci_device::config_map(address_map &map) // VOODOO_1 & VOODOO_2 map void voodoo_pci_device::voodoo_reg_map(address_map &map) { - map(0x0, 0x00ffffff).rw("voodoo", FUNC(voodoo_device::voodoo_r), FUNC(voodoo_device::voodoo_w)); + map(0x0, 0x00ffffff).rw(m_voodoo, FUNC(voodoo_device::voodoo_r), FUNC(voodoo_device::voodoo_w)); } // VOODOO_BANSHEE and VOODOO_3 maps void voodoo_pci_device::banshee_reg_map(address_map &map) { - map(0x0, 0x01ffffff).rw("voodoo", FUNC(voodoo_banshee_device::banshee_r), FUNC(voodoo_banshee_device::banshee_w)); + map(0x0, 0x01ffffff).rw(m_voodoo, FUNC(voodoo_banshee_device::banshee_r), FUNC(voodoo_banshee_device::banshee_w)); } void voodoo_pci_device::lfb_map(address_map &map) { - map(0x0, 0x01ffffff).rw("voodoo", FUNC(voodoo_banshee_device::banshee_fb_r), FUNC(voodoo_banshee_device::banshee_fb_w)); + map(0x0, 0x01ffffff).rw(m_voodoo, FUNC(voodoo_banshee_device::banshee_fb_r), FUNC(voodoo_banshee_device::banshee_fb_w)); } void voodoo_pci_device::io_map(address_map &map) { - map(0x000, 0x0ff).rw("voodoo", FUNC(voodoo_banshee_device::banshee_io_r), FUNC(voodoo_banshee_device::banshee_io_w)); + map(0x000, 0x0ff).rw(m_voodoo, FUNC(voodoo_banshee_device::banshee_io_r), FUNC(voodoo_banshee_device::banshee_io_w)); } voodoo_pci_device::voodoo_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp index 7ee243ec4e2..6cf0076734b 100644 --- a/src/frontend/mame/ui/videoopt.cpp +++ b/src/frontend/mame/ui/videoopt.cpp @@ -75,7 +75,7 @@ void menu_video_options::handle() const event *menu_event = process(0); if (menu_event != nullptr && menu_event->itemref != nullptr) { - switch ((uintptr_t)menu_event->itemref) + switch ((intptr_t)menu_event->itemref) { /* rotate adds rotation depending on the direction */ case VIDEO_ITEM_ROTATE: diff --git a/src/lib/formats/apridisk.h b/src/lib/formats/apridisk.h index 81db4b41105..1155a0b4a9a 100644 --- a/src/lib/formats/apridisk.h +++ b/src/lib/formats/apridisk.h @@ -33,7 +33,7 @@ private: static const int APR_HEADER_SIZE = 128; // sector types - enum + enum : uint32_t { APR_DELETED = 0xe31d0000, APR_SECTOR = 0xe31d0001, diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 807ddbd6c7a..8c7a4bc59b5 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -92,6 +92,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_7485.o \ $(NLOBJ)/devices/nld_7490.o \ $(NLOBJ)/devices/nld_7493.o \ + $(NLOBJ)/devices/nld_7497.o \ $(NLOBJ)/devices/nld_74107.o \ $(NLOBJ)/devices/nld_74123.o \ $(NLOBJ)/devices/nld_74153.o \ diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index e0f0277daac..30ddf3af84c 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -74,6 +74,7 @@ namespace netlist ENTRYX(7485, TTL_7485, "+A0,+A1,+A2,+A3,+B0,+B1,+B2,+B3,+LTIN,+EQIN,+GTIN") ENTRYX(7490, TTL_7490, "+A,+B,+R1,+R2,+R91,+R92") ENTRYX(7493, TTL_7493, "+CLKA,+CLKB,+R1,+R2") + ENTRYX(7497, TTL_7497, "+CLK,+STRB,+EN,+UNITY,+CLR,+B0,+B1,+B2,+B3,+B4,+B5") ENTRYX(74107, TTL_74107, "+CLK,+J,+K,+CLRQ") ENTRYX(74107A, TTL_74107A, "+CLK,+J,+K,+CLRQ") ENTRYX(74123, TTL_74123, "") @@ -126,6 +127,7 @@ namespace netlist ENTRYX(7485_dip, TTL_7485_DIP, "") ENTRYX(7490_dip, TTL_7490_DIP, "") ENTRYX(7493_dip, TTL_7493_DIP, "") + ENTRYX(7497_dip, TTL_7497_DIP, "") ENTRYX(74107_dip, TTL_74107_DIP, "") ENTRYX(74123_dip, TTL_74123_DIP, "") ENTRYX(74153_dip, TTL_74153_DIP, "") diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index 4dead624fc2..4809f330c6b 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -47,6 +47,7 @@ #include "nld_7485.h" #include "nld_7490.h" #include "nld_7493.h" +#include "nld_7497.h" #include "nld_74107.h" #include "nld_74123.h" #include "nld_74153.h" diff --git a/src/lib/netlist/devices/nld_7474.cpp b/src/lib/netlist/devices/nld_7474.cpp index 0ad063386d2..37646925ae4 100644 --- a/src/lib/netlist/devices/nld_7474.cpp +++ b/src/lib/netlist/devices/nld_7474.cpp @@ -12,54 +12,36 @@ namespace netlist { namespace devices { - NETLIB_OBJECT(7474sub) - { - NETLIB_CONSTRUCTOR(7474sub) - , m_CLK(*this, "CLK") - , m_Q(*this, "Q") - , m_QQ(*this, "QQ") - , m_nextD(*this, "m_nextD", 0) - { - } - - NETLIB_RESETI(); - NETLIB_UPDATEI(); - - public: - logic_input_t m_CLK; - logic_output_t m_Q; - logic_output_t m_QQ; - state_var<netlist_sig_t> m_nextD; - - inline void newstate(const netlist_sig_t stateQ, const netlist_sig_t stateQQ); - - private: - - }; NETLIB_OBJECT(7474) { NETLIB_CONSTRUCTOR(7474) - , sub(*this, "sub") , m_D(*this, "D") , m_CLRQ(*this, "CLRQ") , m_PREQ(*this, "PREQ") + , m_CLK(*this, "CLK", NETLIB_DELEGATE(7474, clk)) + , m_Q(*this, "Q") + , m_QQ(*this, "QQ") + , m_nextD(*this, "m_nextD", 0) { - register_subalias("CLK", sub.m_CLK); - - register_subalias("Q", sub.m_Q); - register_subalias("QQ", sub.m_QQ); } NETLIB_RESETI(); NETLIB_UPDATEI(); + NETLIB_HANDLERI(clk); public: - NETLIB_SUB(7474sub) sub; - logic_input_t m_D; logic_input_t m_CLRQ; logic_input_t m_PREQ; + logic_input_t m_CLK; + logic_output_t m_Q; + logic_output_t m_QQ; + + private: + state_var<netlist_sig_t> m_nextD; + + inline void newstate(const netlist_sig_t stateQ, const netlist_sig_t stateQQ); }; NETLIB_OBJECT(7474_dip) @@ -70,16 +52,16 @@ namespace netlist { register_subalias("1", m_1.m_CLRQ); register_subalias("2", m_1.m_D); - register_subalias("3", m_1.sub.m_CLK); + register_subalias("3", m_1.m_CLK); register_subalias("4", m_1.m_PREQ); - register_subalias("5", m_1.sub.m_Q); - register_subalias("6", m_1.sub.m_QQ); + register_subalias("5", m_1.m_Q); + register_subalias("6", m_1.m_QQ); // register_subalias("7", ); ==> GND - register_subalias("8", m_2.sub.m_QQ); - register_subalias("9", m_2.sub.m_Q); + register_subalias("8", m_2.m_QQ); + register_subalias("9", m_2.m_Q); register_subalias("10", m_2.m_PREQ); - register_subalias("11", m_2.sub.m_CLK); + register_subalias("11", m_2.m_CLK); register_subalias("12", m_2.m_D); register_subalias("13", m_2.m_CLRQ); // register_subalias("14", ); ==> VCC @@ -92,15 +74,15 @@ namespace netlist NETLIB_SUB(7474) m_2; }; - inline void NETLIB_NAME(7474sub)::newstate(const netlist_sig_t stateQ, const netlist_sig_t stateQQ) + inline void NETLIB_NAME(7474)::newstate(const netlist_sig_t stateQ, const netlist_sig_t stateQQ) { // 0: High-to-low 40 ns, 1: Low-to-high 25 ns - const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + static constexpr const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; m_Q.push(stateQ, delay[stateQ]); m_QQ.push(stateQQ, delay[stateQQ]); } - NETLIB_UPDATE(7474sub) + NETLIB_HANDLER(7474, clk) { //if (INP_LH(m_CLK)) { @@ -111,54 +93,34 @@ namespace netlist NETLIB_UPDATE(7474) { - if (m_PREQ() && m_CLRQ()) + const auto preq(m_PREQ()); + const auto clrq(m_CLRQ()); + if (preq & clrq) { m_D.activate(); - sub.m_nextD = m_D(); - sub.m_CLK.activate_lh(); - } - else if (!m_PREQ()) - { - sub.newstate(1, 0); - sub.m_CLK.inactivate(); - m_D.inactivate(); - } - else if (!m_CLRQ()) - { - sub.newstate(0, 1); - sub.m_CLK.inactivate(); - m_D.inactivate(); + m_nextD = m_D(); + m_CLK.activate_lh(); } else { - sub.newstate(1, 1); - sub.m_CLK.inactivate(); + newstate(preq ^ 1, clrq ^ 1); + m_CLK.inactivate(); m_D.inactivate(); } } NETLIB_RESET(7474) { - sub.do_reset(); - } - - NETLIB_RESET(7474sub) - { - m_CLK.set_state(logic_t::STATE_INP_LH); - + m_CLK.activate_lh(); m_nextD = 0; } NETLIB_RESET(7474_dip) { - // m_1.do_reset(); - //m_2.do_reset(); } NETLIB_UPDATE(7474_dip) { - //m_1.update_dev(); - //m_2.update_dev(); } NETLIB_DEVICE_IMPL(7474) diff --git a/src/lib/netlist/devices/nld_7493.cpp b/src/lib/netlist/devices/nld_7493.cpp index 2ac3d557c57..a7a20635729 100644 --- a/src/lib/netlist/devices/nld_7493.cpp +++ b/src/lib/netlist/devices/nld_7493.cpp @@ -40,7 +40,7 @@ namespace netlist NETLIB_HANDLERI(updA) { - if (m_reset) + //if (m_reset) { m_a ^= 1; m_QA.push(m_a, out_delay); @@ -49,7 +49,7 @@ namespace netlist NETLIB_HANDLERI(updB) { - if (m_reset) + //if (m_reset) { ++m_bcd &= static_cast<std::uint8_t>(0x07); m_QD.push((m_bcd >> 2) & 1, out_delay3); @@ -101,8 +101,8 @@ namespace netlist { m_reset = 1; m_a = m_bcd = 0; - m_CLKA.set_state(logic_t::STATE_INP_HL); - m_CLKB.set_state(logic_t::STATE_INP_HL); + m_CLKA.activate_hl(); + m_CLKB.activate_hl(); } NETLIB_UPDATE(7493) diff --git a/src/lib/netlist/devices/nld_7497.cpp b/src/lib/netlist/devices/nld_7497.cpp new file mode 100644 index 00000000000..074a59d02f2 --- /dev/null +++ b/src/lib/netlist/devices/nld_7497.cpp @@ -0,0 +1,174 @@ +// license:GPL-2.0+ +// copyright-holders:Sergey Svishchev +/* + * nld_7497.cpp + * + * To do: + * + * - STRB and EN + * - Timing + */ + +#include "nld_7497.h" +#include "../nl_base.h" + +namespace netlist +{ + namespace devices + { + + static constexpr netlist_time out_delay_CLK_Y[2] = { NLTIME_FROM_NS(20), NLTIME_FROM_NS(26) }; // tPHL, tPLH + static constexpr netlist_time out_delay_CLK_Z[2] = { NLTIME_FROM_NS(17), NLTIME_FROM_NS(12) }; + + NETLIB_OBJECT(7497) + { + NETLIB_CONSTRUCTOR(7497) + , m_B(*this, {{"B5", "B4", "B3", "B2", "B1", "B0"}}) + , m_CLK(*this, "CLK", NETLIB_DELEGATE(7497, clk_strb)) + , m_STRBQ(*this, "STRBQ", NETLIB_DELEGATE(7497, clk_strb)) + , m_ENQ(*this, "ENQ") + , m_UNITYQ(*this, "UNITYQ", NETLIB_DELEGATE(7497, unity)) + , m_CLR(*this, "CLR", NETLIB_DELEGATE(7497, clr)) + , m_Y(*this, "Y") + , m_ZQ(*this, "ZQ") + , m_ENOUTQ(*this, "ENOUTQ") + , m_cnt(*this, "_m_cnt", 0) + , m_rate(*this, "_m_rate", 0) + , m_state(*this, "_m_state", 0) + , m_lastclock(*this, "_m_lastclock", 0) + { + } + + private: + NETLIB_RESETI(); + NETLIB_UPDATEI(); + + NETLIB_HANDLERI(noop) { } + NETLIB_HANDLERI(unity); + NETLIB_HANDLERI(clr); + NETLIB_HANDLERI(clk_strb); + + protected: + object_array_t<logic_input_t, 6> m_B; + logic_input_t m_CLK; + logic_input_t m_STRBQ; + logic_input_t m_ENQ; + logic_input_t m_UNITYQ; + logic_input_t m_CLR; + + logic_output_t m_Y; + logic_output_t m_ZQ; + logic_output_t m_ENOUTQ; + + state_var_u8 m_cnt; + state_var_u8 m_rate; + state_var_sig m_state; + state_var_sig m_lastclock; + + void newstate(const netlist_sig_t state) + { + m_state = state; + m_ZQ.push(state, out_delay_CLK_Z[state]); + //netlist_sig_t y = (state ^ 1) | (m_UNITY() ^ 1); // OR with negated inputs == NAND + netlist_sig_t y = (state & m_UNITYQ()) ^ 1; // OR with negated inputs == NAND + m_Y.push(y, out_delay_CLK_Y[y]); + } + + int rate() + { + int a = 0; + + for (std::size_t i = 0; i < 6; i++) + a |= (m_B[i]() << i); + + return a; + } + }; + + NETLIB_RESET(7497) + { + m_cnt = 0; + m_rate = 0; + m_lastclock = 0; + } + + NETLIB_UPDATE(7497) + { + m_rate = rate(); + clk_strb(); + } + + NETLIB_HANDLER(7497, unity) + { + newstate (m_state); + } + + NETLIB_HANDLER(7497, clr) + { + m_cnt = 0; + clk_strb(); + } + + NETLIB_HANDLER(7497, clk_strb) + { + netlist_sig_t clk = m_CLK(); + + if (!m_lastclock && clk && !m_ENQ() && !m_CLR()) + { + m_cnt++; + m_cnt &= 63; + } + m_lastclock = clk; + + const netlist_sig_t clk_strb = (clk ^ 1) & (m_STRBQ() ^ 1); + + const netlist_sig_t cntQ = m_cnt; + + // NOR GATE + netlist_sig_t p1 = ((cntQ & 63) == 31 && (m_rate & 32)) || + ((cntQ & 31) == 15 && (m_rate & 16)) || + ((cntQ & 15) == 7 && (m_rate & 8)) || + ((cntQ & 7) == 3 && (m_rate & 4)) || + ((cntQ & 3) == 1 && (m_rate & 2)) || + ((cntQ & 1) == 0 && (m_rate & 1)); + + p1 = (p1 & clk_strb) ^ 1; + + newstate(p1); + + // NAND gate + if ((m_cnt == 63) && !m_ENQ()) + m_ENOUTQ.push(0, out_delay_CLK_Y[0]); // XXX timing + else + m_ENOUTQ.push(1, out_delay_CLK_Y[1]); + + } + + NETLIB_OBJECT_DERIVED(7497_dip, 7497) + { + NETLIB_CONSTRUCTOR_DERIVED(7497_dip, 7497) + { + register_subalias("1", m_B[4]); // B0 + register_subalias("2", m_B[1]); // B4 + register_subalias("3", m_B[0]); // B5 + register_subalias("4", m_B[5]); // B0 + register_subalias("5", m_ZQ); + register_subalias("6", m_Y); + register_subalias("7", m_ENOUTQ); + + register_subalias("9", m_CLK); + register_subalias("10", m_STRBQ); + register_subalias("11", m_UNITYQ); + register_subalias("12", m_ENQ); + register_subalias("13", m_CLR); + register_subalias("14", m_B[3]); // B2 + register_subalias("15", m_B[2]); // B3 + } + }; + + + NETLIB_DEVICE_IMPL(7497) + NETLIB_DEVICE_IMPL(7497_dip) + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_7497.h b/src/lib/netlist/devices/nld_7497.h new file mode 100644 index 00000000000..6db9a4d3538 --- /dev/null +++ b/src/lib/netlist/devices/nld_7497.h @@ -0,0 +1,57 @@ +// license:GPL-2.0+ +// copyright-holders:Sergey Svishchev +/* + * nld_7497.h + * + * SN7497: Synchronous 6-Bit Binary Rate Multiplier + * + * +--------------+ + * B1 |1 16| VCC + * B4 |2 15| B3 + * B5 |3 14| B2 + * B0 |4 7497 13| CLR + * Z |5 12| UNITY/CAS + * Y |6 11| ENin (EN) + * ENout |7 10| STRB + * GND |8 9| CLK + * +--------------+ + * + * Naming conventions follow TI datasheet + * + * The counter is enabled when the clear, strobe, and enable inputs are low. + * + * When the rate input is binary 0 (all rate inputs low), Z remains high [and Y low]. + * + * The unity/cascade input, when connected to the clock input, passes + * clock frequency (inverted) to the Y output when the rate input/decoding + * gates are inhibited by the strobe. + * + * When CLR is H, states of CLK and STRB can affect Y and Z. Default are + * Y L, Z H, ENout H. + * + * Unity/cascade is used to inhibit output Y (UNITY L -> Y H) + */ + +#ifndef NLD_7497_H_ +#define NLD_7497_H_ + +#include "../nl_setup.h" + +#define TTL_7497(name, cCLK, cSTRB, cEN, cUNITY, cCLR, cB0, cB1, cB2, cB3, cB4, cB5) \ + NET_REGISTER_DEV(TTL_7497, name) \ + NET_CONNECT(name, CLK, cCLK) \ + NET_CONNECT(name, STRBQ, cSTRB) \ + NET_CONNECT(name, ENQ, cEN) \ + NET_CONNECT(name, UNITYQ,cUNITY) \ + NET_CONNECT(name, CLR, cCLR) \ + NET_CONNECT(name, B0, cB0) \ + NET_CONNECT(name, B1, cB1) \ + NET_CONNECT(name, B2, cB2) \ + NET_CONNECT(name, B3, cB3) \ + NET_CONNECT(name, B4, cB4) \ + NET_CONNECT(name, B5, cB5) + +#define TTL_7497_DIP(name) \ + NET_REGISTER_DEV(TTL_7497_DIP, name) + +#endif /* NLD_7497_H_ */ diff --git a/src/lib/netlist/devices/nld_9316.cpp b/src/lib/netlist/devices/nld_9316.cpp index 7c478fd4b05..ba3b4a58167 100644 --- a/src/lib/netlist/devices/nld_9316.cpp +++ b/src/lib/netlist/devices/nld_9316.cpp @@ -24,12 +24,13 @@ namespace netlist , m_cnt(*this, "m_cnt", 0) , m_ENP(*this, "ENP") , m_CLRQ(*this, "CLRQ") - , m_A(*this, "A", NETLIB_DELEGATE(9316, noop)) - , m_B(*this, "B", NETLIB_DELEGATE(9316, noop)) - , m_C(*this, "C", NETLIB_DELEGATE(9316, noop)) - , m_D(*this, "D", NETLIB_DELEGATE(9316, noop)) + , m_A(*this, "A", NETLIB_DELEGATE(9316, abcd)) + , m_B(*this, "B", NETLIB_DELEGATE(9316, abcd)) + , m_C(*this, "C", NETLIB_DELEGATE(9316, abcd)) + , m_D(*this, "D", NETLIB_DELEGATE(9316, abcd)) , m_Q(*this, {{ "QA", "QB", "QC", "QD" }}) , m_RC(*this, "RC") + , m_abcd(*this, "m_abcd", 0) { } @@ -37,14 +38,17 @@ namespace netlist NETLIB_RESETI(); NETLIB_UPDATEI(); NETLIB_HANDLERI(clk); - NETLIB_HANDLERI(noop) { } + NETLIB_HANDLERI(abcd) + { + m_abcd = (m_D() << 3) | (m_C() << 2) | (m_B() << 1) | (m_A() << 0); + } logic_input_t m_CLK; logic_input_t m_ENT; logic_input_t m_LOADQ; - state_var<unsigned> m_cnt; + state_var_u8 m_cnt; logic_input_t m_ENP; logic_input_t m_CLRQ; @@ -56,7 +60,7 @@ namespace netlist object_array_t<logic_output_t, 4> m_Q; logic_output_t m_RC; - + state_var_u8 m_abcd; private: //inline void update_outputs_all(const unsigned &cnt, const netlist_time &out_delay) noexcept @@ -95,8 +99,9 @@ namespace netlist NETLIB_RESET(9316) { - m_CLK.set_state(logic_t::STATE_INP_LH); + m_CLK.activate_lh(); m_cnt = 0; + m_abcd = 0; } NETLIB_HANDLER(9316, clk) @@ -105,6 +110,7 @@ namespace netlist { ++m_cnt &= MAXCNT; //m_RC.push(m_ENT() && (m_cnt == MAXCNT), NLTIME_FROM_NS(27)); +#if 0 if (m_cnt == MAXCNT) { m_RC.push(m_ENT(), NLTIME_FROM_NS(27)); @@ -117,10 +123,24 @@ namespace netlist } else update_outputs_all(m_cnt, NLTIME_FROM_NS(20)); +#else + if (m_cnt > 0 && m_cnt < MAXCNT) + update_outputs_all(m_cnt, NLTIME_FROM_NS(20)); + else if (m_cnt == 0) + { + m_RC.push(0, NLTIME_FROM_NS(27)); + update_outputs_all(0, NLTIME_FROM_NS(20)); + } + else + { + m_RC.push(m_ENT(), NLTIME_FROM_NS(27)); + update_outputs_all(MAXCNT, NLTIME_FROM_NS(20)); + } +#endif } else { - m_cnt = (m_D() << 3) | (m_C() << 2) | (m_B() << 1) | (m_A() << 0); + m_cnt = m_abcd; m_RC.push(m_ENT() && (m_cnt == MAXCNT), NLTIME_FROM_NS(27)); update_outputs_all(m_cnt, NLTIME_FROM_NS(22)); } diff --git a/src/lib/netlist/devices/nld_log.h b/src/lib/netlist/devices/nld_log.h index 6364022cea2..a2ccaf66ad6 100644 --- a/src/lib/netlist/devices/nld_log.h +++ b/src/lib/netlist/devices/nld_log.h @@ -21,7 +21,7 @@ #include "../nl_setup.h" #define LOG(name, cI) \ - NET_REGISTER_DEV(??PG, name) \ + NET_REGISTER_DEV(LOG, name) \ NET_CONNECT(name, I, cI) #define LOGD(name, cI, cI2) \ diff --git a/src/lib/netlist/macro/nlm_base.cpp b/src/lib/netlist/macro/nlm_base.cpp index 8ea6f148864..47a314f45ec 100644 --- a/src/lib/netlist/macro/nlm_base.cpp +++ b/src/lib/netlist/macro/nlm_base.cpp @@ -15,6 +15,9 @@ static NETLIST_START(diode_models) NET_MODEL("1N4001 D(Is=14.11n N=1.984 Rs=33.89m Ikf=94.81 Xti=3 Eg=1.11 Cjo=25.89p M=.44 Vj=.3245 Fc=.5 Bv=75 Ibv=10u Tt=5.7u Iave=1 Vpk=50 mfg=GI type=silicon)") NET_MODEL("1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)") NET_MODEL("1S1588 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75)") + + NET_MODEL("1N34A D( Bv=75 Cjo=0.5e-12 Eg=0.67 Ibv=18e-3 Is=2e-7 Rs=7 N=1.3 Vj=0.1 M=0.27 type=germanium)") + NET_MODEL("LedRed D(IS=93.2p RS=42M N=3.73 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)") NET_MODEL("LedGreen D(IS=93.2p RS=42M N=4.61 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)") NET_MODEL("LedBlue D(IS=93.2p RS=42M N=7.47 BV=5 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=5 type=LED)") diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index 168ec65ebc3..5b132ebd554 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -158,7 +158,7 @@ detail::queue_t::queue_t(netlist_t &nl) void detail::queue_t::register_state(plib::state_manager_t &manager, const pstring &module) { - netlist().log().debug("register_state\n"); + //netlist().log().debug("register_state\n"); manager.save_item(this, m_qsize, module + "." + "qsize"); manager.save_item(this, &m_times[0], module + "." + "times", m_times.size()); manager.save_item(this, &m_net_ids[0], module + "." + "names", m_net_ids.size()); @@ -506,6 +506,7 @@ void netlist_t::reset() break; case 1: // brute force backward { + log().verbose("Using brute force backward startup strategy"); std::size_t i = m_devices.size(); while (i>0) m_devices[--i]->update_dev(); @@ -513,6 +514,7 @@ void netlist_t::reset() break; case 2: // brute force forward { + log().verbose("Using brute force forward startup strategy"); for (auto &d : m_devices) d->update_dev(); } @@ -886,16 +888,15 @@ void detail::net_t::reset() if (p != nullptr) p->m_cur_Analog = 0.0; - /* rebuild m_list */ + /* rebuild m_list and reset terminals to active or analog out state */ m_list_active.clear(); for (core_terminal_t *ct : m_core_terms) + { + ct->reset(); if (ct->state() != logic_t::STATE_INP_PASSIVE) m_list_active.push_back(ct); - - for (core_terminal_t *ct : m_core_terms) - ct->reset(); - + } } void detail::net_t::add_terminal(detail::core_terminal_t &terminal) diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 16043eb8728..c61b09d7089 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -653,7 +653,7 @@ namespace netlist nldelegate delegate = nldelegate()); virtual ~logic_input_t(); - inline netlist_sig_t operator()() const NL_NOEXCEPT + const netlist_sig_t &operator()() const NL_NOEXCEPT { return Q(); } @@ -663,7 +663,7 @@ namespace netlist void activate_hl() NL_NOEXCEPT; void activate_lh() NL_NOEXCEPT; private: - netlist_sig_t Q() const NL_NOEXCEPT; + const netlist_sig_t &Q() const NL_NOEXCEPT; }; // ----------------------------------------------------------------------------- @@ -778,10 +778,10 @@ namespace netlist logic_net_t(netlist_t &nl, const pstring &aname, detail::core_terminal_t *mr = nullptr); virtual ~logic_net_t(); - inline netlist_sig_t Q() const NL_NOEXCEPT { return m_cur_Q; } + inline const netlist_sig_t & Q() const NL_NOEXCEPT { return m_cur_Q; } void initial(const netlist_sig_t val) NL_NOEXCEPT { m_cur_Q = m_new_Q = val; } - void set_Q_and_push(const netlist_sig_t newQ, const netlist_time &delay) NL_NOEXCEPT + inline void set_Q_and_push(const netlist_sig_t newQ, const netlist_time &delay) NL_NOEXCEPT { if (newQ != m_new_Q ) { @@ -789,7 +789,7 @@ namespace netlist push_to_queue(delay); } } - void set_Q_and_push_force(const netlist_sig_t newQ, const netlist_time &delay) NL_NOEXCEPT + inline void set_Q_and_push_force(const netlist_sig_t newQ, const netlist_time &delay) NL_NOEXCEPT { if (newQ != m_new_Q || is_queued()) { @@ -798,7 +798,7 @@ namespace netlist } } - void set_Q_time(const netlist_sig_t newQ, const netlist_time &at) NL_NOEXCEPT + inline void set_Q_time(const netlist_sig_t newQ, const netlist_time &at) NL_NOEXCEPT { if (newQ != m_new_Q) { @@ -1462,7 +1462,7 @@ namespace netlist return static_cast<const logic_net_t &>(core_terminal_t::net()); } - inline netlist_sig_t logic_input_t::Q() const NL_NOEXCEPT + inline const netlist_sig_t & logic_input_t::Q() const NL_NOEXCEPT { nl_assert(state() != STATE_INP_PASSIVE); return net().Q(); diff --git a/src/lib/netlist/plib/palloc.cpp b/src/lib/netlist/plib/palloc.cpp index e4d31985b23..fa87c1cf94f 100644 --- a/src/lib/netlist/plib/palloc.cpp +++ b/src/lib/netlist/plib/palloc.cpp @@ -25,24 +25,24 @@ mempool::~mempool() { for (auto & b : m_blocks) { - if (b.m_num_alloc != 0) + if (b->m_num_alloc != 0) { - fprintf(stderr, "Found block with %d dangling allocations\n", static_cast<int>(b.m_num_alloc)); + fprintf(stderr, "Found block with %d dangling allocations\n", static_cast<int>(b->m_num_alloc)); } - ::operator delete(b.data); + ::operator delete(b->data); } m_blocks.clear(); } -size_t mempool::new_block() +mempool::block * mempool::new_block() { - block b; - b.data = static_cast<char *>(::operator new(m_min_alloc)); - b.cur_ptr = b.data; - b.m_free = m_min_alloc; - b.m_num_alloc = 0; + block *b = new block(); + b->data = static_cast<char *>(::operator new(m_min_alloc)); + b->cur_ptr = b->data; + b->m_free = m_min_alloc; + b->m_num_alloc = 0; m_blocks.push_back(b); - return m_blocks.size() - 1; + return b; } size_t mempool::mininfosize() @@ -59,29 +59,27 @@ size_t mempool::mininfosize() void *mempool::alloc(size_t size) { size_t rs = (size + mininfosize() + m_min_align - 1) & ~(m_min_align - 1); - for (size_t bn=0; bn < m_blocks.size(); bn++) + for (auto &b : m_blocks) { - auto &b = m_blocks[bn]; - if (b.m_free > rs) + if (b->m_free > rs) { - b.m_free -= rs; - b.m_num_alloc++; - auto i = reinterpret_cast<info *>(b.cur_ptr); - i->m_block = bn; - auto ret = reinterpret_cast<void *>(b.cur_ptr + mininfosize()); - b.cur_ptr += rs; + b->m_free -= rs; + b->m_num_alloc++; + auto i = reinterpret_cast<info *>(b->cur_ptr); + i->m_block = b; + auto ret = reinterpret_cast<void *>(b->cur_ptr + mininfosize()); + b->cur_ptr += rs; return ret; } } { - size_t bn = new_block(); - auto &b = m_blocks[bn]; - b.m_num_alloc = 1; - b.m_free = m_min_alloc - rs; - auto i = reinterpret_cast<info *>(b.cur_ptr); - i->m_block = bn; - auto ret = reinterpret_cast<void *>(b.cur_ptr + mininfosize()); - b.cur_ptr += rs; + block *b = new_block(); + b->m_num_alloc = 1; + b->m_free = m_min_alloc - rs; + auto i = reinterpret_cast<info *>(b->cur_ptr); + i->m_block = b; + auto ret = reinterpret_cast<void *>(b->cur_ptr + mininfosize()); + b->cur_ptr += rs; return ret; } } @@ -91,7 +89,7 @@ void mempool::free(void *ptr) auto p = reinterpret_cast<char *>(ptr); auto i = reinterpret_cast<info *>(p - mininfosize()); - block *b = &m_blocks[i->m_block]; + block *b = i->m_block; if (b->m_num_alloc == 0) fprintf(stderr, "Argh .. double free\n"); else diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index 3759d5819de..264cc656bbf 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -153,19 +153,19 @@ private: char *data; }; - size_t new_block(); + block * new_block(); size_t mininfosize(); struct info { - info() : m_block(0) { } - size_t m_block; + info() : m_block(nullptr) { } + block * m_block; }; size_t m_min_alloc; size_t m_min_align; - std::vector<block> m_blocks; + std::vector<block *> m_blocks; public: mempool(size_t min_alloc, size_t min_align); diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp index 91c9776e2ff..256a4a00031 100644 --- a/src/mame/drivers/aristmk5.cpp +++ b/src/mame/drivers/aristmk5.cpp @@ -1381,15 +1381,7 @@ static INPUT_PORTS_START( aristmk5_usa ) PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_COIN1) PORT_CHANGED_MEMBER(DEVICE_SELF, aristmk5_state, coin_start, nullptr) INPUT_PORTS_END -static INPUT_PORTS_START( aristmk5 ) // TODO: Remove ROM swap code as it is not needed for non-US hardware - /* This simulates the ROM swap */ - PORT_START("ROM_LOAD") - PORT_CONFNAME( 0x07, 0x04, "System Mode" ) - PORT_CONFSETTING( 0x00, "USA Set Chip v4.04.09 Mode" ) - PORT_CONFSETTING( 0x01, "USA Set Chip v4.04.08 Mode" ) - PORT_CONFSETTING( 0x02, "USA Set Chip v4.04.00 Mode" ) - PORT_CONFSETTING( 0x03, "USA Set Chip v4.02.04 Mode" ) - PORT_CONFSETTING( 0x04, "Game Mode" ) +static INPUT_PORTS_START( aristmk5 ) PORT_START("P1") PORT_BIT(0x00000100, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CODE(KEYCODE_Q) PORT_NAME("Collect") @@ -2242,21 +2234,23 @@ void aristmk5_state::machine_reset() m_ioc_regs[IRQ_STATUS_B] |= 0x40; //hack, set keyboard irq empty to be ON - /* load the roms according to what the operator wants */ { + /* for US sets, load the roms according to what the operator wants */ uint8_t *ROM = memregion("maincpu")->base(); - uint8_t *PRG;// = memregion("prg_code")->base(); - int i; - uint8_t op_mode; - static const char *const rom_region[] = { "set_4.04.09", "set_4.04.08", "set_4.04.00", "set_4.02.04", "game_prg" }; + uint8_t *PRG; - op_mode = ioport("ROM_LOAD")->read(); + if (ioport("ROM_LOAD") != nullptr) + { + static const char *const rom_region[] = { "set_4.04.09", "set_4.04.08", "set_4.04.00", "set_4.02.04", "game_prg" }; - PRG = memregion(rom_region[op_mode & 7])->base(); + uint8_t op_mode = ioport("ROM_LOAD")->read(); - if(PRG != nullptr) + PRG = memregion(rom_region[op_mode & 7])->base(); + } + else // non-US sets don't have set chips + PRG = memregion("game_prg")->base(); - for(i = 0; i < 0x400000; i++) + for(int i = 0; i < 0x400000; i++) ROM[i] = PRG[i]; } @@ -2367,7 +2361,7 @@ void aristmk5_state::aristmk5_usa_touch(machine_config &config) microtouch.stx().set("uart_0a", FUNC(ins8250_uart_device::rx_w)); } -#define ARISTOCRAT_MK5_BIOS \ +#define ARISTOCRAT_MK5_USA_SETCHIPS \ ROM_REGION( 0x400000, "set_4.04.09", ROMREGION_ERASEFF ) /* setchip v4.04.09 4meg */ \ ROM_LOAD32_WORD( "setchip v4.04.09.u7", 0x000000, 0x80000, CRC(e8e8dc75) SHA1(201fe95256459ce34fdb6f7498135ab5016d07f3) ) \ ROM_LOAD32_WORD( "setchip v4.04.09.u11", 0x000002, 0x80000, CRC(ff7a9035) SHA1(4352c4336e61947c555fdc80c61f944076f64b64) ) \ @@ -2379,37 +2373,23 @@ void aristmk5_state::aristmk5_usa_touch(machine_config &config) ROM_LOAD32_WORD( "setchip v4.04.00.u11", 0x000002, 0x80000, CRC(82dfa12a) SHA1(86fd0f0ad8d5d1bc503392a40bbcdadb055b2765) ) \ ROM_REGION( 0x400000, "set_4.02.04", ROMREGION_ERASEFF ) /* setchip v4.02.04 */ \ ROM_LOAD32_WORD( "setchip v4.02.04.u7", 0x000000, 0x80000, CRC(5a254b22) SHA1(8444f237b392df2a3cb42ea349e7af32f47dd544) ) \ - ROM_LOAD32_WORD( "setchip v4.02.04.u11", 0x000002, 0x80000, CRC(def36617) SHA1(c7ba5b08e884a8fb36c9fb51c08e243e32c81f89) ) \ - /* GALs */ \ - ROM_REGION( 0x600, "gals", 0 ) \ - ROM_LOAD( "a562837.u36", 0x000000, 0x000157, CRC(1f269234) SHA1(29940dd50fb55c632935f62ff44ca724379c7a43) ) \ - ROM_LOAD( "a562838.u65", 0x000200, 0x000157, CRC(f2f3c40a) SHA1(b795dfa5cc4e8127c3f3a0906664910d1325ec92) ) \ - ROM_LOAD( "a562840.u22", 0x000400, 0x000157, CRC(941d4cdb) SHA1(1ca091fba69e92f262dbb3d40f515703c8981793) ) \ - ROM_REGION16_BE( 0x100, "eeprom0", ROMREGION_ERASEFF ) \ - ROM_REGION16_BE( 0x100, "eeprom1", ROMREGION_ERASEFF ) \ + ROM_LOAD32_WORD( "setchip v4.02.04.u11", 0x000002, 0x80000, CRC(def36617) SHA1(c7ba5b08e884a8fb36c9fb51c08e243e32c81f89) ) -#define ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS \ - ROM_REGION( 0x400000, "set_4.04.09", ROMREGION_ERASEFF ) /* setchip v4.04.09 4meg */ \ - ROM_LOAD32_WORD( "setchip v4.04.09.u7", 0x000000, 0x80000, CRC(e8e8dc75) SHA1(201fe95256459ce34fdb6f7498135ab5016d07f3) ) \ - ROM_LOAD32_WORD( "setchip v4.04.09.u11", 0x000002, 0x80000, CRC(ff7a9035) SHA1(4352c4336e61947c555fdc80c61f944076f64b64) ) \ - ROM_REGION( 0x400000, "set_4.04.08", ROMREGION_ERASEFF ) /* setchip v4.04.08 4meg */ \ - ROM_LOAD32_WORD( "setchip v4.04.08.u7", 0x000000, 0x80000, CRC(7c4b7fe4) SHA1(39dd39c794c0cb6abc1b7503650643a8131468d1) ) \ - ROM_LOAD32_WORD( "setchip v4.04.08.u11", 0x000002, 0x80000, CRC(d3234a28) SHA1(8ff112ee4aadf1d359ca8ffe0cfa9c7400aa0595) ) \ - ROM_REGION( 0x400000, "set_4.04.00", ROMREGION_ERASEFF ) /* setchip v4.04.00 4meg 42pin */ \ - ROM_LOAD32_WORD( "setchip v4.04.00.u7", 0x000000, 0x80000, CRC(2453137e) SHA1(b59998e75ae3924da16faf47b9cfe9afd60d810c) ) \ - ROM_LOAD32_WORD( "setchip v4.04.00.u11", 0x000002, 0x80000, CRC(82dfa12a) SHA1(86fd0f0ad8d5d1bc503392a40bbcdadb055b2765) ) \ - ROM_REGION( 0x400000, "set_4.02.04", ROMREGION_ERASEFF ) /* setchip v4.02.04 */ \ - ROM_LOAD32_WORD( "setchip v4.02.04.u7", 0x000000, 0x80000, CRC(5a254b22) SHA1(8444f237b392df2a3cb42ea349e7af32f47dd544) ) \ - ROM_LOAD32_WORD( "setchip v4.02.04.u11", 0x000002, 0x80000, CRC(def36617) SHA1(c7ba5b08e884a8fb36c9fb51c08e243e32c81f89) ) \ - /* GALs */ \ +#define ARISTOCRAT_MK5_GALS \ ROM_REGION( 0x600, "gals", 0 ) \ ROM_LOAD( "a562837.u36", 0x000000, 0x000157, CRC(1f269234) SHA1(29940dd50fb55c632935f62ff44ca724379c7a43) ) \ ROM_LOAD( "a562838.u65", 0x000200, 0x000157, CRC(f2f3c40a) SHA1(b795dfa5cc4e8127c3f3a0906664910d1325ec92) ) \ - ROM_LOAD( "a562840.u22", 0x000400, 0x000157, CRC(941d4cdb) SHA1(1ca091fba69e92f262dbb3d40f515703c8981793) ) \ + ROM_LOAD( "a562840.u22", 0x000400, 0x000157, CRC(941d4cdb) SHA1(1ca091fba69e92f262dbb3d40f515703c8981793) ) + +#define ARISTOCRAT_MK5_EEPROM \ + ROM_REGION16_BE( 0x100, "eeprom0", ROMREGION_ERASEFF ) \ + ROM_REGION16_BE( 0x100, "eeprom1", ROMREGION_ERASEFF ) ROM_START( aristmk5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) @@ -2424,7 +2404,8 @@ ROM_END // 0200751V / 602/9 / 10 Credit Multiplier / 20 Line Multiline // ADONIS / NSW/ACT / A - 25/05/98 ROM_START( adonis ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x05eb1b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2448,7 +2429,8 @@ ROM_END // 0100751V / 602/9 / 10 Credit Multiplier / 20 Line Multiline // ADONIS / NSW/ACT / A - 25/05/98 ROM_START( adonisa ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x05cdc3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2473,7 +2455,9 @@ ROM_END // ADONIS / Export / B - 31/07/01 // Requires set chips 4.04.xx ROM_START( adonisu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e8a7b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2498,7 +2482,9 @@ ROM_END // ADONIS / NSW/ACT / C - 06/07/99 // Cash Express Hyperlink game ROM_START( adonisce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000c44 @@ -2526,7 +2512,8 @@ ROM_END // Venezuela is spelled as 'Venezuila' in the ROM // Game is in Spanish, however audit mode is in English ROM_START( alchemst ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb8 0x000000-0x08e937 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2552,7 +2539,8 @@ ROM_END // 0200428V / 386/56 / CARD POKER // BAD DOG POKER / NSW HOTEL / A 17/12/96 ROM_START( baddog ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae4 0x000000-0x056f3f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2578,7 +2566,8 @@ ROM_END // 0200818V / 594/1 / 3 Credit Multiplier/3 Line Multiline // Black Panther / Victoria / A - 30/07/96 ROM_START( blackpnt ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb0 0x000000-0x056d8b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2603,7 +2592,8 @@ ROM_END // 0100812V / 616/1 / 25 Credit Multiplier/20 Line Multiline // Boot Scootin' 500cm / NSW/ACT / B - 11/12/98 ROM_START( bootsctn ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* 0x000000-0x06c177 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) Expected Checksum 0xb0980753 @@ -2633,7 +2623,9 @@ ROM_END // Marked as GHG101202 and 92.767% // No set chips required ROM_START( bootsctnu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0941ab is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2661,7 +2653,9 @@ ROM_END // GHG1008-03 / MV4098/1 / 10 Credit Multiplier/20 Line Multiline // BOOT SCOOTIN' / Export / A - 27/07/99 ROM_START( bootsctnua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0944bf is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2689,7 +2683,9 @@ ROM_END // BOOT SCOOTIN' / Export / B - 22/03/01 // Requires set chip version: 4.04.xx ROM_START( bootsctnub ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f47a7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2719,7 +2715,9 @@ ROM_END // Touchscreen game // Game requires set chip version: 4.01.xx ROM_START( bparty ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0a693f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2747,7 +2745,9 @@ ROM_END // Bachelorette Party / Export / B - 25/08/2000 // Touchscreen game ROM_START( bpartya ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1579.u7", 0x000000, 0x7f01b, BAD_DUMP CRC(da30ade2) SHA1(0a19181ae3968134a5731aa9eadde8c7a12798c1) ) @@ -2768,7 +2768,8 @@ ROM_END // 0200510V / 593 / 10 Credit Multiplier / 9 Line Multiline // Bumble Bugs / Local / D - 5/07/96 ROM_START( bumblbug ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05b94b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2789,7 +2790,8 @@ ROM_END // 0200546V / 593 / 10 Credit Multiplier / 9 Line Multiline // Bumble Bugs / QLD CLUB & HOTEL / D - 05/07/96 ROM_START( bumblbugql ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ac8 0x000000-0x05554b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2816,7 +2818,9 @@ ROM_END // Marked as CHG047903 and 92.691% // No set chips required ROM_START( bumblbugu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b1f47 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2844,7 +2848,9 @@ ROM_END // Variation (% and NO): 87.006% 99 // No set chips required ROM_START( bumblbugua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b1f47 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2868,7 +2874,8 @@ ROM_END // 0200143V / 571/4 / 10 Credit Multiplier/9 Line Multiline // Butterfly Delight / Local / A - 19/12/95 ROM_START( buttdeli ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x04477f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2892,7 +2899,9 @@ ROM_END // AHG1463 / 603(a) / 3,5,10,25,50 Credit Multiplier / 20 Line Multiline // Canyon Rose 100cm / Export / B - 06/12/96 ROM_START( canrose ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1463.u7", 0x000000, 0x7f06d, CRC(d866097c) SHA1(2bd2c6200986b27a35329aa0c43e5afd22becbfc) ) @@ -2909,7 +2918,8 @@ ROM_END // 0100676V / 614/3 / 10 Credit Multiplier/20 Line Multiline // Cash Cat 200cm / NSW/ACT / A - 3/04/98 ROM_START( cashcat ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000b68 @@ -2933,7 +2943,8 @@ ROM_END // 0100557V / 614/1 / 10 Credit Multiplier/9 Line Multiline // Cash Cat 90cm / NSW/ACT / B - 1/12/97 ROM_START( cashcata ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000b68 @@ -2957,7 +2968,8 @@ ROM_END // 0300863V / MV4089 / 5 Credit Multiplier/9 Line Multiline // Cash Cat / New Zealand / A- 4/1/99 ROM_START( cashcatnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) // checksum code not found (uses different startup sequence) ROM_LOAD32_WORD( "0300863v.u7", 0x000000, 0x80000, CRC(de0f0202) SHA1(994f6c47b1e2e0e133853dc69b189752104486e4) ) @@ -2974,7 +2986,8 @@ ROM_END // 0100438V / 603/1 / 25 Credit Multiplier / 20 Line Multiline // Cash Chameleon / NSW/ACT / C - 15/4/97 ROM_START( cashcham ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x055f83 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2998,7 +3011,8 @@ ROM_END // 0200437V / 603(a) / 5 Credit Multiplier / 20 Line Multiline // Cash Chameleon 100cm / NSW/ACT / D - 18/02/98 ROM_START( cashchama ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b00 0x000000-0x05ca1b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3022,7 +3036,8 @@ ROM_END // 0300781V / MV4067 / 5 Credit Multiplier/20 Line Multiline // Cash Chameleon / New Zealand / A - 31/08/98 ROM_START( cashchamnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300781v.u7", 0x000000, 0x80000, CRC(009e109e) SHA1(b912b474a226af17bef554f4db6fade7cd2e558f) ) @@ -3041,7 +3056,9 @@ ROM_END // Marked as DHG4078. // Game requires set chip version: 4.00.xx ROM_START( cashchamu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x09b413 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3065,7 +3082,8 @@ ROM_END // 0300467V / 607 / 10 Credit Multiplier/20 Line Multiline // Cash Crop / Local / C - 14/07/97 ROM_START( cashcra5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x06076b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3089,7 +3107,8 @@ ROM_END // 0300447V / 607/2 / 10 Credit Multiplier/9 Line Multiline // Cash Crop / Local / C - 29/08/97 ROM_START( cashcra5a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300447v.u7", 0x000000, 0x7f992, BAD_DUMP CRC(421ac2af) SHA1(552e98a0d3f969d702dd0aafcb4cb8f697a56b47) ) @@ -3106,7 +3125,8 @@ ROM_END // 0100787V / 630/1 / 10 Credit Multiplier / 20 Line Multiline // The Chariot Challenge / NSW/ACT / A - 10/08/98 ROM_START( chariotc ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x0603fb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3132,7 +3152,8 @@ ROM_END // ROM contains unaltered NSW/ACT region string and date, but game is for the Venezuelan market // Game is in Spanish, however audit mode is in English ROM_START( chariotcv ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x07dbb7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3157,7 +3178,8 @@ ROM_END // Ckeckmate / NSW/ACT / B - 06/07/01 // Checkmate is misspelled as 'Ckeckmate' in the ROM ROM_START( checkma5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000c38 0x000000-0x071847 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3183,7 +3205,8 @@ ROM_END // 0100351V / 596 / 10 Credit Multiplier/9 Line Multiline // Chicken / Local / A - 27/08/96 ROM_START( chickna5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x053fb7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3208,7 +3231,8 @@ ROM_END // 0200530V / 596 / 10 Credit Multiplier/9 Line Multiline // Chicken / QLD Club & Hotels / C - 23/02/98 ROM_START( chickna5ql ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ac8 0x000000-0x05f193 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3242,7 +3266,9 @@ ROM_END // No set chips required // Variation (% and NO): 92.588% 03 ROM_START( chickna5u ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0a6917 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3273,7 +3299,9 @@ ROM_END // No set chips required // All devices are 27c4002 instead of 27c4096. ROM_START( chickna5ua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0a6917 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3302,7 +3330,8 @@ ROM_END // ROM contains unaltered NSW/ACT "Local" region string, but game is for the Venezuelan market // Game is in Spanish, however audit mode is in English ROM_START( chickna5v ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x07c3e7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3328,7 +3357,8 @@ ROM_END // 0100919V / 577/7 / 25 Credit Multiplier/20 Line Multiline // Coral Riches II / Local / A - 29/12/98 ROM_START( coralrc2 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000be8 0x000000-0x05ba63 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3352,7 +3382,8 @@ ROM_END // 0200753V / 615/1 / 10 Credit Multiplier / 20 Line Multiline // Cuckoo / Local / D - 03/07/98 ROM_START( cuckoo ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b10 0x000000-0x05f63f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3379,7 +3410,8 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // Requires set chips 4.01.xx ROM_START( cuckoou ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d18 0x000000-0x0a588b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3415,7 +3447,8 @@ ROM_END // 0300111V / 577/2 / 20 Credit Multiplier/9 Line Multiline // Desert Bloom / Local / A - 12/10/95 ROM_START( dstbloom ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x044573 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3440,7 +3473,8 @@ ROM_END // Desert Bloom / Local / A - 12/10/95 // Same strings as dstbloom but earlier version ROM_START( dstblooma ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x0431d3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3464,7 +3498,9 @@ ROM_END // AHG1533 / MV4115_5 / 5, 10, 25, 50 Credit Multiplier / 20 Line Multiline // Diamond Destiny / Export / A - 09/05/2000 ROM_START( diamdest ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1533.u7", 0x000000, 0x7efb1, BAD_DUMP CRC(b228ed66) SHA1(a92e403b4df2054693787f48e988613843731f9e) ) @@ -3484,7 +3520,8 @@ ROM_END // Diamond Dove / NSW/ACT / B - 19/05/99 // ROM says '9 Credit Multiplier' but game has a 3 credit multiplier ROM_START( diamdove ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b78 0x000000-0x063a9f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3510,7 +3547,8 @@ ROM_END // 0200302V / 483/7 / 3 Credit Multiplier/3 Line Multiline // Diamond Fever / Local / E - 05/09/96 ROM_START( dmdfever ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ad8 0x000000-0x054f3f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3532,7 +3570,8 @@ ROM_END // Diamond Touch / Local / E - 30/06/97 // Touchscreen game ROM_START( dimtouch ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400433v.u7", 0x000000, 0x80000, CRC(71b19365) SHA1(5a8ba1806af544d33e9acbcbbc0555805b4074e6) ) @@ -3549,7 +3588,8 @@ ROM_END // 0200424V / 602/1 / 10 Credit Multiplier / 20 Line Multiline // Dolphin Treasure / NSW/ACT / B - 06/12/96 ROM_START( dolphntr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b08 0x000000-0x05c367 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3571,7 +3611,8 @@ ROM_END // Dolphin Treasure / NSW/ACT / B - 06/12/96 // Same strings as dolphntr but earlier version ROM_START( dolphntra ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b08 0x000000-0x053897 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3595,7 +3636,8 @@ ROM_END // 0100388V / 602 / 10 Credit Multiplier / 9 Line Multiline // Dolphin Treasure / NSW/ACT / B - 10/12/96 ROM_START( dolphntrb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b20 0x000000-0x0536c3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3622,7 +3664,9 @@ ROM_END // ROM says '9 & 20 Line Multiline' but game only has 20 lines with a 5, 10, 25 or 50 credit multiplier // Requires set chips 4.04.xx ROM_START( dolphntrce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f24a3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3652,7 +3696,9 @@ ROM_END // ROM says '9 & 20 Line Multiline' but game only has 9 lines with a 5, 10 or 20 credit multiplier // Requires set chips 4.04.xx ROM_START( dolphntrcea ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f2307 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3682,7 +3728,9 @@ ROM_END // ROM says '9 & 20 Line Multiline' but game only has 20 lines // Requires set chips 4.04.xx ROM_START( dolphntrceb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0eeb03 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3711,7 +3759,8 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( dolphntru ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x08ec8b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3748,7 +3797,8 @@ ROM_END // Dragon's Eye / Local / A - 09/05/97 // ROM says '10 Line Multiline' but game only has 9 lines ROM_START( drgneye ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000af8 0x000000-0x05891b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3770,7 +3820,8 @@ ROM_END // Dream Weaver / Local / A- 20/06/97 // Touchscreen game ROM_START( dreamwv ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200586v.u7", 0x000000, 0x80000, CRC(6d52fcd1) SHA1(136cb89037a96bf6824ed5754fc67167f0287684) ) @@ -3787,7 +3838,8 @@ ROM_END // 01J00081 / JB004 / Multi credit / Multi line // Dynamite Jack / NSW/ACT / A - 12/07/2000 ROM_START( dynajack ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b78 0x000000-0x07031b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3813,7 +3865,9 @@ ROM_END // CHG1562 / US002 / 5,10,20, Credit Multiplier / 9 Line Multiline // Dynamite Jack / Export / A - 11/07/01 ROM_START( dynajacku ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 4 files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1562.u7", 0x000000, 0x7f023, BAD_DUMP CRC(c69c989c) SHA1(6eeadf185a38944c6c0c32777c006f27505eaa73) ) @@ -3832,7 +3886,8 @@ ROM_END // 0100652V / 623 / 8 Credit Multiplier / 25 Credit Multiway // El Dorado / Local / B - 24/03/98 ROM_START( eldorda5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x06328b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3853,7 +3908,8 @@ ROM_END // 0400122V / 570/3 / 10 Credit Multiplier/9 Line Multiline // Enchanted Forest / Local / E - 23/06/95 ROM_START( eforsta5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae4 0x000000-0x045da3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3875,7 +3931,9 @@ ROM_END // Enchanted Forest / Export / C - 17/01/00 // Cash Express Hyperlink game, but can also run standalone without progressive jackpot ROM_START( eforsta5ce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 6 files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1536.u7", 0x000000, 0x7efd4, BAD_DUMP CRC(d29185cc) SHA1(26154f3d99907461cff4a44fe02929fae66e6963) ) @@ -3900,7 +3958,9 @@ ROM_END // Cash Express Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.04.xx ROM_START( eforsta5cea ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f29e7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3930,7 +3990,9 @@ ROM_END // All devices are 27c4002 instead of 27c4096. // No set chips required ROM_START( eforsta5u ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0a5233 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3957,7 +4019,9 @@ ROM_END // All devices are 27c4002 instead of 27c4096. // No set chips required ROM_START( eforsta5ua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0a5233 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -3981,7 +4045,8 @@ ROM_END // 0100651V / 624 / 3 Credit Multiplier / 3 Line Multiline // Fast Fortune / Local / D - 07/05/98 ROM_START( fastfort ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x05c0e7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4005,7 +4070,8 @@ ROM_END // 01J00131 / JB006 / Multi credit / Multi line // Fortune Teller / NSW/ACT / D - 24/11/2000 ROM_START( fortellr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b78 0x000000-0x07038b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4033,7 +4099,9 @@ ROM_END // BHG1566 / MV4122/2 / 9 Line Multiline / 5, 10, 20 Credit Multiplier // Fortune Fever / Export / A - 13/05/01 ROM_START( fortfvr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, 7 out of 8 files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1566.u7", 0x000000, 0x7f050, BAD_DUMP CRC(07c896ae) SHA1(5d275f3759253d2aa3eeef4d6ce973e9a3b5e421) ) @@ -4057,7 +4125,9 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( gambler ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x08f46b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4082,7 +4152,8 @@ ROM_END // Geisha / New Zealand / A- 05/03/01 // This game is downported from the MK6 version for the New Zealand market only, no other MK5 version exists ROM_START( geisha ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101408v.u7", 0x000000, 0x80000, CRC(ebdde248) SHA1(83f4f4deb5c6f5b33ae066d50e043a24cb0cbfe0) ) @@ -4102,7 +4173,8 @@ ROM_END // Genie Magic / Local / C- 15/02/99 // Touchscreen game ROM_START( genmagi ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200894v.u7", 0x000000, 0x80000, CRC(20ec3b50) SHA1(400ad7f86077184fee63690060fe2a51ba888e1b) ) @@ -4125,7 +4197,9 @@ ROM_END // Requires set chip version: 4.04.xx // Cash Express Hyperlink game, but can also run standalone without progressive jackpot ROM_START( glizrdce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f19bf is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4152,7 +4226,8 @@ ROM_END // 0100767V / 625 / 10 Credit Multiplier/20 Line Multiline // Gnome Around The World 200cm / NSW/ACT / C - 18/12/98 ROM_START( gnomeatw ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05ebcb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4179,7 +4254,9 @@ ROM_END // Marked as AHG1205-03, Golden Pyramids, and 94.941% // No set chips required ROM_START( goldpyr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x08ec83 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4206,7 +4283,9 @@ ROM_END // Marked as AHG1206-99, Golden Pyramids, and 87.928% // No set chips required ROM_START( goldpyra ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x08ef13 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4232,7 +4311,8 @@ ROM_END // ROM says 'Golden Pyramid' with three trailing spaces, artwork says 'Golden Pyramids' // Original casino BIOS is not dumped, using New Zealand 0700474V BIOS until an Australian version is dumped ROM_START( goldpyrb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* note, this actually contains a 2nd checksum for the game, this is the base/bios check only. @@ -4261,7 +4341,8 @@ ROM_END // 0101164V / 661 / 50 Credit Multiplier / 20 Line Multiline // Golden Ra / NSW/ACT / A - 10/04/00 ROM_START( goldenra ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b98 0x000000-0x068297 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4287,7 +4368,8 @@ ROM_END // 03J00241 / JB008 / Multi credit / Multi line // Honey Pot / NSW/ACT / A - 21/11/2000 ROM_START( honeypot ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb8 0x000000-0x06f02b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4317,7 +4399,9 @@ ROM_END // Variation (% and NO) // The game shares reel graphics with Boot Scootin', but the game plays identically to Penguin Pays therefore it doesn't have the double wild feature. ROM_START( hnktonku ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ed4ff is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4342,7 +4426,8 @@ ROM_END // 0100872V / 631/3 B / 25 Credit Multiplier / 20 Line Multiline // INCA SUN / NSW/ACT / B- 03/05/99 ROM_START( incasun ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x05f56b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4368,7 +4453,8 @@ ROM_END // INCA SUN / NSW/ACT / B- 03/05/99 // SHOW PROGRAM ROM_START( incasunsp ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000bf8 @@ -4393,7 +4479,8 @@ ROM_END // 0101108V / MV4113 / 5 Credit Multiplier/20 Line Multiline // Inca Sun / New Zealand / A- 6/3/00 ROM_START( incasunnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101108v.u7", 0x000000, 0x80000, CRC(1e7be5ca) SHA1(333b7665fab8f60fb60e9d3b44de96725763ca17) ) @@ -4413,7 +4500,8 @@ ROM_END // Inca Sun / Export / A - 05/09/00 // Requires set chips 4.03.xx ROM_START( incasunu ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d18 0x000000-0x0e847f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4452,7 +4540,9 @@ ROM_END // Same strings as incasunu but different version // Requires set chips 4.04.xx ROM_START( incasunua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ec3a7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4478,7 +4568,8 @@ ROM_END // INCA SUN / VENEZUELA / B- 03/05/99 // Game is in Spanish, however audit mode is in English ROM_START( incasunv ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000c10 0x000000-0x082163 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4503,7 +4594,8 @@ ROM_END // 0100845V / 628/1 / 25 Credit Multiway / 20 Credit Multiplier // Indian Dreaming / Local / B - 15/12/98 ROM_START( indrema5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x06323f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4527,7 +4619,8 @@ ROM_END // 0100161V / 586/2 / 10 Credit Multiplier/9 Line Multiline // Jumping Beans / Local / A - 25/1/96 ROM_START( jumpbean ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100161v.u7", 0x000000, 0x7fa4c, BAD_DUMP CRC(6994c968) SHA1(7896a93aeec9c2d815c49d203ca594644e5df8a6) ) @@ -4544,7 +4637,8 @@ ROM_END // 0100383V / 586/6 / 25 Credit Multiplier / 20 Line Multiline // JUMPIN' JOEY 500cm / NSW/ACT / C - 13/11/96 ROM_START( jumpjoey ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae8 0x000000-0x0562cb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4569,7 +4663,8 @@ ROM_END // Jungle Juice / Crown / F - 06/03/96 // ROM says 'Crown' as region (Crown Casino), but game was from Dunedin Casino with New Zealand base chips ROM_START( jungjuic ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* note, this actually contains a 2nd checksum for the game, this is the base/bios check only. @@ -4597,7 +4692,8 @@ ROM_END // King Galah / Local / A - 21/07/95 // ROM says 1995 but artwork says 1997; game has a 1998+ style denomination sign ROM_START( kgalah ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b28 0x000000-0x05af27 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4622,7 +4718,8 @@ ROM_END // King Galah / Local / A - 21/07/95 // ROM says 1995 but artwork says 1997; game has the newer style music introduced in 1997 ROM_START( kgalaha ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b28 0x000000-0x058863 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4649,7 +4746,9 @@ ROM_END // Variation (% and NO): // Cash Express Hyperlink game, but can also run standalone without progressive jackpot ROM_START( kgalahce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f19b3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4676,7 +4775,8 @@ ROM_END // 0200024V / 540/3 / 10 Credit Multiplier/5 Line Multiline // K. G. Bird / Local / D - 10/10/94 ROM_START( kgbirda5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x0435af is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4701,7 +4801,9 @@ ROM_END // Koala Mint / Export / A - 12/09/01 // Requires set chips 4.04.xx ROM_START( koalamnt ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ec32b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4728,7 +4830,8 @@ ROM_END // 0100677V / 614/2 / 10 Credit Multiplier/20 Line Multiline // Kooka Bucks 200cm / NSW/ACT / A - 03/04/98 ROM_START( kookabuk ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x061857 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4755,7 +4858,9 @@ ROM_END // Variation (% and NO) // Touchscreen game ROM_START( kyhatonu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0a6927 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4782,7 +4887,8 @@ ROM_END // 0100473V / 599/3 / 25 Credit Multiplier / 20 Line Multiline // Loco Loot / Local / C - 17/06/97 ROM_START( locoloot ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b20 0x000000-0x05633b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4803,7 +4909,8 @@ ROM_END // 0100472V / 599/2 / 20 Credit Multiplier / 9 Line Multiline // Loco Loot / Local / C - 17/06/97 ROM_START( locoloota ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b20 0x000000-0x055e93 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4824,7 +4931,8 @@ ROM_END // 0600725V / MV4064 / 5 Credit Multiplier / 20 Line Multiline // Loco Loot / New Zealand / A - 8/7/98 ROM_START( locolootnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0600725v.u7", 0x000000, 0x80000, CRC(164dd049) SHA1(c99c56af72cb1eb69591cb8f7bacbd06bdb6494d) ) @@ -4842,7 +4950,9 @@ ROM_END // Loco Loot / Export / A - 30/07/01 // Requires set chips 4.04.xx ROM_START( locolootu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e94fb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4866,7 +4976,8 @@ ROM_END // 0100587V / 621 / 3 Credit Multiplier/3 Line Multiline // Lone Wolf / Local / A - 29/10/97 ROM_START( lonewolf ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b48 0x000000-0x0580f3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4887,7 +4998,8 @@ ROM_END // 0300109V / 570/6 / 20 Credit Multiplier/9 Line Multiline // Lucky Clover / Local / A - 12/10/95 ROM_START( luckyclo ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae8 0x000000-0x055e07 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4910,7 +5022,9 @@ ROM_END // Marked as AHG1211 and 88.26% // No set chips required ROM_START( mgarden ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0a522b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4936,7 +5050,9 @@ ROM_END // Requires set chips 4.04.xx // Touchscreen game ROM_START( magimask ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e95fb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4962,7 +5078,8 @@ ROM_END // Requires set chips 4.04.xx // Touchscreen game ROM_START( magimaska ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d18 0x000000-0x0e9597 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5002,7 +5119,8 @@ ROM_END // Requires set chips 4.03.xx // Touchscreen game ROM_START( magimaskb ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d18 0x000000-0x0e8527 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5039,7 +5157,8 @@ ROM_END // Magic Touch / Local / A- 06/03/97 // Touchscreen game ROM_START( magtcha5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300455v.u7", 0x000000, 0x80000, CRC(a1568e3b) SHA1(842c1aa3f9765f7ba9f2587cb94b6ef03c74e8b9) ) @@ -5060,7 +5179,8 @@ ROM_END // Same strings as magtcha5 but earlier version // Touchscreen game ROM_START( magtcha5a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200455v.u7", 0x000000, 0x80000, CRC(9fa3ee86) SHA1(ce7546b8d1dbf90eb8f4f8d3255dc1c215c966a7) ) @@ -5079,7 +5199,8 @@ ROM_END // 0100425V / 595/5 / 10 Credit Multiplier/20 Line Multiline // Mammoth Money / Local / D - 07/04/97 ROM_START( mammothm ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x053623 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5103,7 +5224,8 @@ ROM_END // 01J00101 / JB005 / Multi credit / Multi line // Margarita Magic / NSW/ACT / A - 07/07/2000 ROM_START( marmagic ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b78 0x000000-0x06d93b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5131,7 +5253,9 @@ ROM_END // ROM has NSW/ACT strings but it is for US platform // Requires set chips 4.04.xx ROM_START( marmagicu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ed9f3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5160,7 +5284,9 @@ ROM_END // ROM has NSW/ACT strings but it is for US platform // Requires set chips 4.04.xx ROM_START( marmagicua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0eda53 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5188,7 +5314,8 @@ ROM_END // 0400115V / 559/2 / 10 Credit Multiplier/9 Line Multiline // Mine, Mine, Mine / Local / D - 16/01/96 ROM_START( minemine ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x0446e3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5214,7 +5341,8 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( minemineu ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d10 0x000000-0x0a7203 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5253,7 +5381,9 @@ ROM_END // All eproms are 27C4002. // No set chips required ROM_START( minemineua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d10 0x000000-0x0a7183 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5277,7 +5407,8 @@ ROM_END // 0400469V / 607/1 / 25 Credit Multiplier/20 Line Multiline // Money Mouse / Local / B - 08/04/97 ROM_START( monmouse ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x066077 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5302,7 +5433,8 @@ ROM_END // Money Mouse / Local / B - 08/04/97 // Same strings as monmouse but earlier version ROM_START( monmousea ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x05dc0b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5326,7 +5458,8 @@ ROM_END // 0201397V / MV4126 / 12 Credit Multiplier/20 Line Multiline // Money Tree / New Zealand / C- 12/04/01 ROM_START( montree ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201397v.u7", 0x000000, 0x80000, CRC(982a0078) SHA1(163c15aebd2be623c0f2c7641360336399bc1f4f) ) @@ -5345,7 +5478,8 @@ ROM_END // 0100294V / 595/3 / 50 Credit Multiplier/20 Line Multiline // Mountain Money / Local / B - 11/06/96 ROM_START( mountmon ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae4 0x000000-0x04ee9b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5366,7 +5500,8 @@ ROM_END // 0100289V / 595/2 / 5 Credit Multiplier/20 Line Multiline // Mountain Money / Local / C - 11/06/96 ROM_START( mountmona ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae4 0x000000-0x04eea3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5388,7 +5523,9 @@ ROM_END // Mountain Money / Export / A - 10/03/01 // Cash Express Hyperlink game, but can also run standalone without progressive jackpot ROM_START( mountmonce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files except U10 are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1629.u7", 0x000000, 0x7efa7, BAD_DUMP CRC(8e5b5354) SHA1(519c5af995d75c3035c0a3832956d94a989163de) ) @@ -5409,7 +5546,9 @@ ROM_END // BHG1465 / MV4108/5 / 5,10,25,50 Credit Multiplier / 20 Line Multiline // Mountain Money / Export / A - 10/03/01 ROM_START( mountmonu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 6 files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1465.u7", 0x000000, 0x7f026, BAD_DUMP CRC(9a176a6b) SHA1(a86213020f6cf0c99271ae4e5768453578ade4c3) ) @@ -5432,7 +5571,9 @@ ROM_END // Requires set chip version: 4.04.xx // Variation (% and NO): ROM_START( mountmonua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e8e57 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5459,7 +5600,8 @@ ROM_END // 0200956V / 386/64 / 200 Credits per Draw / 3 Draws(1 cent) / 2 Credits per Draw / 3 Draws ($1.00) // MULTIDRAW - FREE GAMES / NSW/ACT / E - 08/05/00 ROM_START( multidrw ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b98 0x000000-0x07477f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5485,7 +5627,8 @@ ROM_END // 0100275V / 595/1 / 5 Credit Multiplier/20 Line Multiline // Mystic Garden / Local / B - 11/06/96 ROM_START( mystgard ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae4 0x000000-0x04eea7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5506,7 +5649,8 @@ ROM_END // 0101503V / MV4141 / 6 Credit Multiplier/20 Line Multiline // One For All / New Zealand / A- 28/05/01 ROM_START( one4all ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101503v.u7", 0x000000, 0x80000, CRC(edf50554) SHA1(302737220c4b7d60db77074429d6f360c55494a6) ) @@ -5526,7 +5670,8 @@ ROM_END // Orchid Mist 500cm / Local / C - 03/02/99 // ROM says '10 Credit Multiplier' but game has a 50 credit multiplier ROM_START( orchidms ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b20 0x000000-0x0677c7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5552,7 +5697,8 @@ ROM_END // Same strings as orchidms but earlier version // ROM says '10 Credit Multiplier' but game has a 50 credit multiplier ROM_START( orchidmsa ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b08 0x000000-0x05f753 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5576,7 +5722,8 @@ ROM_END // 0101241V / MV4118 / 25 Credit Multiplier/10 Line Multiline // Orchid Mist / New Zealand / A- 3/7/00 ROM_START( orchidmsnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101241v.u7", 0x000000, 0x80000, CRC(e4183d54) SHA1(c5829448450dff212e76b5571fc1bf0ba681afdf) ) @@ -5593,7 +5740,8 @@ ROM_END // 0200348V / 593/2 / 10 Credit Multiplier / 9 Line Multiline // Oscar / Local / C - 20/09/96 ROM_START( oscara5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x05d187 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5615,7 +5763,8 @@ ROM_END // Oscar / Local / C - 20/09/96 // Same strings as oscara5 but earlier version ROM_START( oscara5a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x054093 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5639,7 +5788,8 @@ ROM_END // 0101046V / 594/7 / 10 Credit Multiplier/9 && 20 Line Multiline // Panther Magic / NSW/ACT / A - 06/10/99 ROM_START( pantmag ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x06d1ff is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5663,7 +5813,8 @@ ROM_END // 0100716V / 594/4 / 2 Credit Multiplier/5 Line Multiline // Panther Magic / Local / A - 13/05/98 ROM_START( pantmaga ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000c00 0x000000-0x0583f7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5691,7 +5842,8 @@ ROM_END // Requires set chips 4.04.xx // Touchscreen game ROM_START( partygrs ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d18 0x000000-0x0e9b47 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5729,7 +5881,9 @@ ROM_END // Requires set chips 4.01.xx // Touchscreen game ROM_START( partygrsa ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0a69d3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5754,7 +5908,9 @@ ROM_END // Party Gras / Export / A - 10/11/2001 // Touchscreen game ROM_START( partygrsb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1568.u7", 0x000000, 0x7efb7, BAD_DUMP CRC(69ab6487) SHA1(d7147f78dc098d142e857687e6cbdb8a8762371a) ) @@ -5771,7 +5927,8 @@ ROM_END // 02J00011 / JB001 / 25 Credit Multiplier / 20 Line Multiline // Peacock Flutter / NSW/ACT / A - 10/03/00 ROM_START( peaflut ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b98 0x000000-0x0638d3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5795,7 +5952,8 @@ ROM_END // 0200460V / 586/4(a) / 5 Credit Multiplier / 20 Line Multiline // Penguin Pays 100cm / NSW/ACT / D - 03/06/97 ROM_START( pengpay ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05c71f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5819,7 +5977,8 @@ ROM_END // 0200357V / 586/4 / 5 Credit Multiplier / 20 Line Multiline // Penguin Pays 100cm / NSW/ACT / C - 12/11/96 ROM_START( pengpaya ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b60 0x000000-0x05644f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5844,7 +6003,8 @@ ROM_END // Penguin Pays 90cm / NSW/ACT / D - 03/06/97 // ROM says '100 Credit Multiplier' but game has a 10 credit multiplier ROM_START( pengpayb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05d7b7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5868,7 +6028,8 @@ ROM_END // 0200113V / 586 / 20 Credit Multiplier/9 Line Multiline // Penguin Pays / Local / A - 12/10/95 ROM_START( pengpayc ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x0537d7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5892,7 +6053,8 @@ ROM_END // 0300113V / 586 / 20 Credit Multiplier/9 Line Multiline // Penguin Pays 180cm / NSW/ACT / A - 12/10/95 ROM_START( pengpayd ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300113v.u7", 0x000000, 0x7f909, BAD_DUMP CRC(30c6c635) SHA1(9a31f99c8a7fb0a909b101b2c5767f39930934e9) ) @@ -5912,7 +6074,8 @@ ROM_END // marked as 92.130% // No set chips required ROM_START( pengpayu ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x0cd21b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5951,7 +6114,8 @@ ROM_END // marked as 92.130% // No set chips required ROM_START( pengpayua ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x0a898f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -5978,7 +6142,8 @@ ROM_END // marked as 90.45% // No set chips required ROM_START( pengpayub ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x0a898f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6006,7 +6171,9 @@ ROM_END // Cash Express Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.04.xx ROM_START( pengpayce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f368f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6035,7 +6202,9 @@ ROM_END // Penguin Pucks Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.03.xx ROM_START( pengpuck ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f29ef is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6062,7 +6231,8 @@ ROM_END // 0100674V / 619/1 / 10 Credit Multiplier/20 Line Multiline // Penguin Pirate 200cm / NSW/ACT / A - 31/03/98 ROM_START( penpir ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05d27b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6086,7 +6256,8 @@ ROM_END // 0200578V / 619 / 10 Credit Multiplier/9 Line Multiline // Penguin Pirate 90cm / NSW/ACT / C - 27/02/98 ROM_START( penpira ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05feeb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6112,7 +6283,8 @@ ROM_END // ROM says 'Penguin Pirate 2', artwork says 'Penguin Pirate II' // Original casino BIOS is not dumped, using New Zealand 0700474V BIOS until an Australian version is dumped ROM_START( penpir2 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* note, this actually contains a 2nd checksum for the game, this is the base/bios check only. @@ -6142,7 +6314,8 @@ ROM_END // 0100731V / 618/1 / 10 Credit Multiplier / 20 Line Multiline // Pet Shop / Local / A - 17/04/98 ROM_START( petshop ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x05f127 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6165,7 +6338,8 @@ ROM_END // 0100679V / 618 / 10 Credit Multiplier / 9 Line Multiline // Pet Shop / Local / A - 09/03/98 ROM_START( petshopa ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to bad ROMs, all 4 ROMs have stuck bits (0x20) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100679v.u7", 0x000000, 0x80000, BAD_DUMP CRC(cf4a24fa) SHA1(b510de9199d16ba7319e1b692d7c6c09fcb735dc) ) @@ -6182,7 +6356,8 @@ ROM_END // 0500005V / 570/1 / 10 Credit Multiplier/9 Line Multiline // Phantom Pays / Local / E - 12/09/95 ROM_START( phantpay ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x044713 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6206,7 +6381,8 @@ ROM_END // 0100299V / 578/4 / 3 Credit Multiplier/3 Line Multiline // Prize Fight / Local / B - 08/08/96 ROM_START( przfight ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b48 0x000000-0x053def is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6232,7 +6408,8 @@ ROM_END // 0100706V / 603/6 / 10 Credit Multiplier / 20 Line Multiline // Queens of Cash / NSW/ACT / C - 23/07/98 ROM_START( qcash ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000af4 0x000000-0x05d55b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6257,7 +6434,8 @@ ROM_END // QUEEN OF THE NILE / NSW/ACT / B - 13/05/97 // EPROM labels have "Golden Pyramid 500" (no trailing 's') and 2001 for the year ROM_START( qnile ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x062913 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6282,7 +6460,8 @@ ROM_END // QUEEN OF THE NILE / NSW/ACT / B - 13/05/97 // Same strings as qnile but earlier version ROM_START( qnilea ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x059dff is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6307,7 +6486,8 @@ ROM_END // QUEEN OF THE NILE / NSW/ACT / B - 13/05/97 // Same strings as qnile and qnilea but earlier version ROM_START( qnileb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x055c83 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6334,7 +6514,8 @@ ROM_END // 3 = Nine, 4 = Ten, 5 = Jack, 6 = Queen, 7 = King, 8 = Ace // Game and BIOS are in Portuguese ROM_START( qnilebr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* note, this actually contains a 2nd checksum for the game, this is the base/bios check only. @@ -6364,7 +6545,8 @@ ROM_END // 0300440V / 602/3 / 20 Credit Multiplier / 9 Line Multiline // QUEEN OF THE NILE / NSW/ACT / B - 13/05/97 ROM_START( qnilec ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x064c4b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6390,7 +6572,9 @@ ROM_END // Cash Express Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.04.xx ROM_START( qnilece ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f2453 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6420,7 +6604,9 @@ ROM_END // Cash Express Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.04.xx ROM_START( qnilecea ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ee84f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6451,7 +6637,9 @@ ROM_END // Cash Express Hyperlink game, but can also run standalone without progressive jackpot // Requires set chips 4.04.xx ROM_START( qnileceb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0f237f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6478,7 +6666,8 @@ ROM_END // 0101139V / 602/16 / 3 Credit Multiplier / 3 Line Multiline // QUEEN OF THE NILE / NSW/ACT / A - 11/10/99 ROM_START( qniled ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b78 0x000000-0x068183 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6505,7 +6694,8 @@ ROM_END // QUEEN OF THE NILE / NSW/ACT / D - 18/06/99 // Maximillions Hyperlink game ROM_START( qnilemax ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb8 0x000000-0x06fd6f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6532,7 +6722,8 @@ ROM_END // 0301059V / 602/5 / 10 Credit Multiplier / 9 Line Multiline // QUEEN OF THE NILE / HOLLAND / G - 10/04/00 ROM_START( qnilenl ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x00104c 0x000000-0x05d1cb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6557,7 +6748,8 @@ ROM_END // Queen of the nile / New Zealand / A- 31/8/98 // ROM has "nile" in lowercase ROM_START( qnilenz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300785v.u7", 0x000000, 0x80000, CRC(c327d801) SHA1(4721d87a7a759bd437d0d93dc6c415e7a8e60ea5) ) @@ -6579,7 +6771,8 @@ ROM_END // ROM contains unaltered NSW/ACT region string and date, but game is for the US platform // No set chips required ROM_START( qnileu ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x08ec87 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6620,7 +6813,9 @@ ROM_END // Note: The game has GHG4090-03 in the stickers, but the strings inside are GHG4091-03 instead. Also the base is GHG4091. // No set chips required ROM_START( qnileua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x08ec87 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6646,7 +6841,8 @@ ROM_END // ROM contains unaltered NSW/ACT region string and date, but game is for the Venezuelan market // Game is in Spanish, however audit mode is in English ROM_START( qnilev ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x081a0b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6670,7 +6866,8 @@ ROM_END // 0500009V / 581 / 5 Credit Multiplier/9 Line Multiline // Q.T. Bird / Local / A - 27/10/94 ROM_START( qtbird ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x0454af is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6695,7 +6892,8 @@ ROM_END // Rainbow Warriors / NSW/ACT / B - 02/03/00 // Cash Express Hyperlink game ROM_START( rainwrce ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x06bb13 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6723,7 +6921,8 @@ ROM_END // 0100400V / 598/2 / 20 Credit Multiplier / 25 Credit Multiway // Reel Power / Local / A - 01/11/96 ROM_START( reelpwr ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x059d1b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6748,7 +6947,8 @@ ROM_END // Reelin'n Rockin / Local / A - 13/07/98 // ROM says 'Reelin'n Rockin', artwork says 'Reelin-n-Rockin' ROM_START( reelrock ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x062f6f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6772,7 +6972,8 @@ ROM_END // 0400549V / 608 / 3 Credit Multiplier/3 Line Multiline // Return of the Samurai / Local / A - 17/04/97 ROM_START( retrsam ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x06445b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6797,7 +6998,8 @@ ROM_END // Return of the Samurai / Local / A - 17/04/97 // Same strings as retrsam but earlier version ROM_START( retrsama ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x0590b7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6818,7 +7020,8 @@ ROM_END // 0200506V / 608/1 / 10 Credit Multiplier/9 Line Multiline // Return of the Samurai / Local / A - 28/04/97 ROM_START( retrsamb ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x05889b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6840,7 +7043,8 @@ ROM_END // Rushin Rooster / Local / C - 25/06/97 // ROM says '10 Credit Multiplier' but game has a 5 credit multiplier ROM_START( rushrst ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05a0c3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6866,7 +7070,8 @@ ROM_END // SUPER BUCKS II / NSW/ACT / G 26/07/99 // Sound data is damaged due to bad u8 ROM ROM_START( sbuk2 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b98 0x000000-0x06ab7f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6891,7 +7096,8 @@ ROM_END // No combination data due to missing u11 ROM // This version had Superman-style reel symbols, whereas sbuk2 has similar graphics to Super Bucks III ROM_START( sbuk2a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to missing ROMs ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300006v.u7", 0x000000, 0x80000, CRC(d1833c73) SHA1(1576a7877877569438571a16c51fdd56a172c60d) ) @@ -6908,7 +7114,8 @@ ROM_END // 0200711V / 626 / 3 Credit Multiplier / 3 Line Multiline // Super Bucks III / NSW/ACT / A-22/04/98 ROM_START( sbuk3 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x05ead3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6933,7 +7140,8 @@ ROM_END // Super Bucks III / NSW/ACT / A-22/04/98 // Same strings as sbuk3 but earlier version ROM_START( sbuk3a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x05eaff is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6958,7 +7166,9 @@ ROM_END // Sweet Liberty Deluxe / Export / A - 11/02/01 // Requires set chips 4.04.xx ROM_START( sldeluxe ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ec207 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -6985,7 +7195,8 @@ ROM_END // 0100673V / 621/2 / 10 Credit Multiplier // Silver Wolf / Local / A - 23/03/98 ROM_START( slvrwolf ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ba8 0x000000-0x05bd47 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7009,7 +7220,8 @@ ROM_END // 0100405V / 599 / 10 Credit Multiplier / 9 Line Multiline // Snow Cat / Local / B - 23/12/96 ROM_START( snowcat ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b80 0x000000-0x0553db is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7030,7 +7242,8 @@ ROM_END // 0200606V / 622 / 10 Credit Multiplier / 9 Line Multiline // Sumo Spins / Local / A - 08/12/97 ROM_START( sumospin ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x05d92b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7054,7 +7267,8 @@ ROM_END // 0200465V / 577/1 / 10 Credit Multiplier/9 Line Multiline // Sweethearts II / Local / C - 07/09/95 ROM_START( swhr2 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05b507 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7076,7 +7290,8 @@ ROM_END // Sweethearts II / Local / C - 07/09/95 // Same strings as swhr2 but earlier version ROM_START( swhr2a ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x041803 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7100,7 +7315,9 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( swhr2u ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b31cb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7125,7 +7342,8 @@ ROM_END // Sweethearts II / VENEZUELA / C - 07/09/95 // Game is in Spanish, however audit mode is in English ROM_START( swhr2v ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x07a763 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7146,7 +7364,8 @@ ROM_END // 0200319V / 569/12 / 25 Credit Multiplier / 20 Line Multiline // Thor / Local / B - 14/08/96 ROM_START( thor ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x052b07 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7170,7 +7389,8 @@ ROM_END // 0200333V / 570/9 / 10 Credit Multiplier/9 Line Multiline // Thunder Heart / Local / A - 14/08/96 ROM_START( thndh ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x054c6f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7194,7 +7414,8 @@ ROM_END // 0200334V / 597/1 / 3 Credit Multiplier/3 Line Multiline // Thunder Heart / Local / A - 14/08/96 ROM_START( thndha ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b38 0x000000-0x053c2b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7218,7 +7439,8 @@ ROM_END // 0100550V / 594/3 / 3 Credit Multiplier/3 Line Multiline // Top Banana / Local / A - 18/08/97 ROM_START( topbana ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05851f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7239,7 +7461,8 @@ ROM_END // 0100782V / 616/1 / 10 Credit Multiplier/20 Line Multiline // Toucan Tango 200cm / NSW/ACT / A - 17/06/98 ROM_START( toutango ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x06766b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7267,7 +7490,8 @@ ROM_END // 0301388V / 616 / 10 Credit Multiplier / 9 Line Multiline // Toucan Tango 90cm / Holland / C - 11/05/99 ROM_START( toutangonl ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x00104c 0x000000-0x060dbf is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7294,7 +7518,8 @@ ROM_END // 01J00161 / JB001/3 / 25 Credit Multiplier / 20 Line Multiline // TREASURE TROVE / NSW/ACT / A - 5/10/00 ROM_START( trstrove ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b98 0x000000-0x0638d7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7318,7 +7543,8 @@ ROM_END // 0201692V / 692 / 10 or 25 Credit Multiplier/9 or 20 Line Multiline // Triple Treat / NSW/ACT / A - 17/05/02 ROM_START( tritreat ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x07089b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7344,7 +7570,8 @@ ROM_END // 01J00851 / JB001/5 / Multi credit / Multi line // TROJAN HORSE / NSW/ACT / A - 30/10/01 ROM_START( trojhors ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb8 0x000000-0x06e9f7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7370,7 +7597,8 @@ ROM_END // 0100269V / 577/3 / 10 Credit Multiplier/9 Line Multiline // Tropical Delight / Local / B - 15/05/96 ROM_START( trpdlght ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x04ea87 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7397,7 +7625,9 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( trpdlghtu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b2d1f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7421,7 +7651,8 @@ ROM_END // 0100791V / 631/1 A / 10 Credit Multiplier / 20 Line Multiline // UNICORN DREAMING / NSW/ACT / A - 31/08/98 ROM_START( unicornd ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x05f36f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7445,7 +7676,8 @@ ROM_END // 0100813V / 631 A / 10 Credit Multiplier / 9 Line Multiline // UNICORN DREAMING / NSW/ACT / A - 02/09/98 ROM_START( unicornda ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bf8 0x000000-0x05f087 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7469,7 +7701,8 @@ ROM_END // 0101228V / MV4113/1 / 10 Credit Multiplier/20 Line Multiline // Unicorn Dreaming / New Zealand / A- 5/4/00 ROM_START( unicorndnz ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101228v.u7", 0x000000, 0x80000, CRC(54d55ecb) SHA1(0afb2d6489f01ae55563030e228e1d5443738af1) ) @@ -7487,7 +7720,9 @@ ROM_END // Unicorn Dreaming / Export / C - 10/17/01 // Requires set chips 4.04.xx ROM_START( unicorndu ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0ec547 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7514,7 +7749,8 @@ ROM_END // Venezuela is spelled as 'Venezuila' in the ROM // Game is in Spanish, however audit mode is in English ROM_START( venicea5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code needs to be done */ @@ -7539,7 +7775,9 @@ ROM_END // All devices are 27c4096 // Requires set chips 4.04.xx ROM_START( wafricau ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e77e7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7563,7 +7801,8 @@ ROM_END // 0200507V / 506/8 / 3 Credit Multiplier/3 Line Multiline // Wild Amazon / Local / A - 10/10/96 ROM_START( wamazon ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x05c043 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7584,7 +7823,8 @@ ROM_END // 0200285V / 506/6 / 10 Credit Multiplier // Wild Amazon / Local / A - 7/5/96 ROM_START( wamazona ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x052b8b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7609,7 +7849,8 @@ ROM_END // Wild Amazon / VENEZUELA / A - 10/10/96 // Game is in Spanish, however audit mode is in English ROM_START( wamazonv ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b68 0x000000-0x07b2f3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7633,7 +7874,8 @@ ROM_END // 0100553V / 609 / 4 Credit Multiplier / 25 Credit Multiway // Wicked Winnings / Local / B - 01/07/97 ROM_START( wikwin ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x07237f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7657,7 +7899,8 @@ ROM_END // 0100297V / 543/8 / 3 Credit Multiplier/3 Line Multiline // Wild Bill / Local / C - 15/08/96 ROM_START( wildbill ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ad8 0x000000-0x054e6b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7678,7 +7921,8 @@ ROM_END // 0100167V / 569/9 / 20 Credit Multiplier / 9 Line Multiline // Wild Cougar / Local / B - 27/2/96 ROM_START( wcougar ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000adc 0x000000-0x043573 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7704,7 +7948,8 @@ ROM_END // All devices are 27c4002 instead of 27c4096 // No set chips required ROM_START( wcougaru ) - ARISTOCRAT_MK5_BIOS_HAVE_EEPROMS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS /* Checksum code found at 0x000d08 0x000000-0x0b0d5b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7743,7 +7988,9 @@ ROM_END // All devices are 27C4002 instead of 27C4096 // No set chips required ROM_START( wcougarua ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b0d5b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7769,7 +8016,9 @@ ROM_END // Variation (% and NO): 87,836% 99 // No set chips required ROM_START( wcougarub ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0b0d5b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7796,7 +8045,9 @@ ROM_END // ROM says '5 Line / 10 Credit Multiplier' but this game has 9 lines with a 5, 10 or 20 credit multiplier // Requires set chips 4.04.xx ROM_START( wcougaruc ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d18 0x000000-0x0e783b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7820,7 +8071,9 @@ ROM_END // AHG1515 / MV4134 / 5,10,25,50 Credit Multiplier / 20 Line Multiline // Wild Coyote / Export / A - 30/07/01 ROM_START( wcoyote ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1515.u7", 0x000000, 0x7f070, BAD_DUMP CRC(045858cd) SHA1(232a9631bcdbbd2e60970eca62bdc540e537e1f2) ) @@ -7838,7 +8091,8 @@ ROM_END // Wizard Ways / Local / A - 04/11/96 // ROM says 1996 but game has newer style music and a 1998+ style denomination sign ROM_START( wizways ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b88 0x000000-0x05ee9b is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7862,7 +8116,8 @@ ROM_END // 0100337V / 600 / 10 Credit Multiplier/9 Line Multiline // Wild Angels / Local / B - 24/09/96 ROM_START( wldangel ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000ae0 0x000000-0x05259f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7887,7 +8142,9 @@ ROM_END // Winning Post / Export / G - 11/02/97 // No set chips required ROM_START( wnpost ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_USA_SETCHIPS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d08 0x000000-0x0c3697 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7911,7 +8168,8 @@ ROM_END // 0101158V / 608/4 / 3 Credit Multiplier/3 Line Multiline // Wild Thing / NSW/ACT / B - 14/12/99 ROM_START( wthing ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000b74 0x000000-0x0673cb is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7935,7 +8193,8 @@ ROM_END // 0201176V / 608/5 / 25 Credit Multiplier/20 Line Multiline // Wild Thing / NSW/ACT / B - 25/02/00 ROM_START( wthinga ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201176v.u7", 0x000000, 0x7f44a, BAD_DUMP CRC(e2632da7) SHA1(ff53d87d8f45c3bcece358d0ecfa89e6912e1ccf) ) @@ -7954,7 +8213,8 @@ ROM_END // 0200954V / 638/1 / 10 Credit Multiplier / 20 Line Multiline // White Tiger Classic / NSW/ACT / B - 08/07/99 ROM_START( wtiger ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000d30 0x000000-0x060227 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -7975,7 +8235,8 @@ ROM_END // 03J00191 / JB005/1 / Multi credit / Multi line // Yukon Gold / NSW/ACT / A - 30/10/2000 ROM_START( yukongl5 ) - ARISTOCRAT_MK5_BIOS + ARISTOCRAT_MK5_GALS + ARISTOCRAT_MK5_EEPROM /* Checksum code found at 0x000bb8 0x000000-0x06dbc3 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) diff --git a/src/mame/drivers/aristmk6.cpp b/src/mame/drivers/aristmk6.cpp index e78eda78a1c..02c70a6e269 100644 --- a/src/mame/drivers/aristmk6.cpp +++ b/src/mame/drivers/aristmk6.cpp @@ -442,63 +442,66 @@ typically at around 0x3100-0x3200, 0x3600-0x3700 for Left/Right BIOS dumps (2 fi ROM_SYSTEM_BIOS( 16, "bios16", "Aristocrat MK6 Base (15011025, Malaysia)" ) \ ROM_LOAD32_WORD_BIOS( 16, "15011025_right.u83", 0x0000000, 0x0200000, CRC(bf21a975) SHA1(a251b1a7342387300689cd50fe4ce7975b903ac5) ) \ ROM_LOAD32_WORD_BIOS( 16, "15011025_left.u70", 0x0000002, 0x0200000, CRC(c02e14b0) SHA1(6bf98927813519dfe60e582dbe5be3ccd87f7c91) ) \ - ROM_SYSTEM_BIOS( 17, "bios17", "Aristocrat MK6 Base (20012605, Queensland)" ) \ - ROM_LOAD32_WORD_BIOS( 17, "20012605_right.u83", 0x0000000, 0x0200000, CRC(045b82ad) SHA1(b8e4f9f826970d83ae5fd2f2898de12ad1bf2d24) ) \ - ROM_LOAD32_WORD_BIOS( 17, "20012605_left.u70", 0x0000002, 0x0200000, CRC(87331111) SHA1(6cdc2d81f68de23af18a975a6f27ddec246be405) ) \ - ROM_SYSTEM_BIOS( 18, "bios18", "Aristocrat MK6 Base (04041205, Queensland)" ) \ - ROM_LOAD32_WORD_BIOS( 18, "04041205_right.u83", 0x0000000, 0x0100000, CRC(ca6bc86c) SHA1(69fe7fc35694e4cd7f861bff4ec3a6165a81df6e) ) \ - ROM_LOAD32_WORD_BIOS( 18, "04041205_left.u70", 0x0000002, 0x0100000, CRC(dfb9a119) SHA1(814a5a7877392aec4e4871d7f0e19d2fbd717409) ) \ - ROM_SYSTEM_BIOS( 19, "bios19", "Aristocrat MK6 Base (01.02.08, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 19, "01.02.08_right.u2", 0x0000000, 0x0100000, CRC(aaaeac8c) SHA1(a565e5fcb4f55f31e7d36be40eec234248a66efd) ) \ - ROM_LOAD32_WORD_BIOS( 19, "01.02.08_left.u3", 0x0000002, 0x0100000, CRC(f29fd1bf) SHA1(33e043d2616e10a1c7a0936c3d208f9bcc2ca6f3) ) \ - ROM_SYSTEM_BIOS( 20, "bios20", "Aristocrat MK6 Base (01.03.03a, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 20, "01.03.03a_right.u83", 0x0000000, 0x0200000, CRC(253415f4) SHA1(50dc77ad87bc6be1932dda2fd4865602c8c49729) ) \ - ROM_LOAD32_WORD_BIOS( 20, "01.03.03a_left.u70", 0x0000002, 0x0200000, CRC(4ab5dd40) SHA1(a6812cc624e6a98ea7b0697e2797fe10ba8e303e) ) \ - ROM_SYSTEM_BIOS( 21, "bios21", "Aristocrat MK6 Base (01.03.03e, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 21, "01.03.03e_right.u83", 0x0000000, 0x0200000, CRC(2255e263) SHA1(5e9e093aaa17172f47a14c3baf7f6f0f73b19398) ) \ - ROM_LOAD32_WORD_BIOS( 21, "01.03.03e_left.u70", 0x0000002, 0x0200000, CRC(ea50729a) SHA1(14b5a71bfb91ac366ddcb5f77fb54127808f8163) ) \ - ROM_SYSTEM_BIOS( 22, "bios22", "Aristocrat MK6 Base (01.03.05, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 22, "01.03.05_right.u83", 0x0000000, 0x0200000, CRC(2c7f1ec3) SHA1(d03167f43ed6f9596080d91472695829378cef0a) ) \ - ROM_LOAD32_WORD_BIOS( 22, "01.03.05_left.u70", 0x0000002, 0x0200000, CRC(0095e3f9) SHA1(d2e8786158b1ab0a614aab21cf1d14cbc04754af) ) \ - ROM_SYSTEM_BIOS( 23, "bios23", "Aristocrat MK6 Base (01.03.06, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 23, "01.03.06_right.u83", 0x0000000, 0x0200000, CRC(bd48ca55) SHA1(8fb1576cbeb1c64c358880714740195d2e73e03e) ) /* From Diamond Eyes US */ \ - ROM_LOAD32_WORD_BIOS( 23, "01.03.06_left.u70", 0x0000002, 0x0200000, CRC(2f9d9a29) SHA1(fdebfaca9a579d7249379f19aef22fbfd66bf943) ) \ - ROM_SYSTEM_BIOS( 24, "bios24", "Aristocrat MK6 Base (01.03.07, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 24, "01.03.07_right.u83", 0x0000000, 0x0200000, CRC(2ebccc4e) SHA1(9342724e4451e9ab24ceae208284b50abd4f0be3) ) \ - ROM_LOAD32_WORD_BIOS( 24, "01.03.07_left.u70", 0x0000002, 0x0200000, CRC(a3632da4) SHA1(1c96a88e86095b81801ab88e36a4cdfa4b893265) ) \ - ROM_SYSTEM_BIOS( 25, "bios25", "Aristocrat MK6 Base (01.03.14, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 25, "01.03.14_right.u83", 0x0000000, 0x0200000, CRC(889ffd82) SHA1(9c98c9cdcf5f7d05095f11006418133029e9f0f8) ) /* From 5 Dragons US */ \ - ROM_LOAD32_WORD_BIOS( 25, "01.03.14_left.u70", 0x0000002, 0x0200000, CRC(7138fec4) SHA1(f81331d1875ac574d3e6c98be218ff25c6c7be5a) ) \ - ROM_SYSTEM_BIOS( 26, "bios26", "Aristocrat MK6 Base (01.03.17, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 26, "01.03.17_right.u83", 0x0000000, 0x0200000, CRC(1582714b) SHA1(92d0a15314ffe526159bef9a364898dd1ebdfde7) ) \ - ROM_LOAD32_WORD_BIOS( 26, "01.03.17_left.u70", 0x0000002, 0x0200000, CRC(a88193dc) SHA1(c9e1d483edaecd318d2e5fc8a54e84516c93e0ca) ) \ - ROM_SYSTEM_BIOS( 27, "bios27", "Aristocrat MK6 Base (01.04.14, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 27, "01.04.04_right.u83", 0x0000000, 0x0200000, CRC(e57ba02d) SHA1(8e29403e6b619eeab41dc171221720bc7820ccdc) ) \ - ROM_LOAD32_WORD_BIOS( 27, "01.04.04_left.u70", 0x0000002, 0x0200000, CRC(b984a92c) SHA1(90f7a61302caee40195c08565bdac856a3234c1d) ) \ - ROM_SYSTEM_BIOS( 28, "bios28", "Aristocrat MK6 Base (01.04.07, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 28, "01.04.07_right.u83", 0x0000000, 0x0200000, CRC(23c28e22) SHA1(98f24a1f86232b6c2c288a61ec7d60c867f192e5) ) \ - ROM_LOAD32_WORD_BIOS( 28, "01.04.07_left.u70", 0x0000002, 0x0200000, CRC(acfb0fe0) SHA1(b1a772d7978e6ff4406a5bb39a71cb3f89608e72) ) \ - ROM_SYSTEM_BIOS( 29, "bios29", "Aristocrat MK6 Base (01.04.08, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 29, "01.04.08_right.u83", 0x0000000, 0x0200000, CRC(95333304) SHA1(7afe49d6c5e4d6820f349778557daa88c5366a51) ) /* From Bob and Dolly, also u20 on EPROM expansion board */ \ - ROM_LOAD32_WORD_BIOS( 29, "01.04.08_left.u70", 0x0000002, 0x0200000, CRC(0dfcad10) SHA1(53798be000304aed38909f5fd8470a68bedd8229) ) /* also u10 on EPROM expansion board */ \ - ROM_SYSTEM_BIOS( 30, "bios30", "Aristocrat MK6 Base (01.04.10, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 30, "01.04.10_right.u83", 0x0000000, 0x0200000, CRC(82ce2fcc) SHA1(4c8fb3db084a67e99d1420b3f895a06ce9ef5ec2) ) \ - ROM_LOAD32_WORD_BIOS( 30, "01.04.10_left.u70", 0x0000002, 0x0200000, CRC(9d9d52c1) SHA1(b957220cdbedd516c219d1bfc28807ce466df93f) ) \ - ROM_SYSTEM_BIOS( 31, "bios31", "Aristocrat MK6 Base (01.04.11, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 31, "01.04.11_right.u83", 0x0000000, 0x0200000, CRC(2dae8ca0) SHA1(7a0fb38b4c1ac7195d15bdab6f0cfb16c78430f0) ) \ - ROM_LOAD32_WORD_BIOS( 31, "01.04.11_left.u70", 0x0000002, 0x0200000, CRC(787f2b07) SHA1(2548289e44f4b935346b759afb5383bdbac04c3e) ) \ - ROM_SYSTEM_BIOS( 32, "bios32", "Aristocrat MK6 Set Chips (06.02.04, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 32, "06.02.04_right.u2", 0x0000000, 0x0100000, CRC(1cf5a853) SHA1(64d17efcce702df7a0b0e151293199478e25226d) ) \ - ROM_LOAD32_WORD_BIOS( 32, "06.02.04_left.u3", 0x0000002, 0x0100000, CRC(117b75f2) SHA1(2129286853d3c50b8a943b71334d4ef6b98adc05) ) \ - ROM_SYSTEM_BIOS( 33, "bios33", "Aristocrat MK6 Set Chips (06.02.20, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 33, "06.02.20_right.u83", 0x0000000, 0x0100000, CRC(e4001f60) SHA1(5da34efb1ac0f7c84a48e09363d20cfecda4bcf1) ) \ - ROM_LOAD32_WORD_BIOS( 33, "06.02.20_left.u70", 0x0000002, 0x0100000, CRC(199ed3b9) SHA1(e3ee81ffd713f09e35a10c38e4f59282e2c5cd30) ) \ - ROM_SYSTEM_BIOS( 34, "bios34", "Aristocrat MK6 Set Chips (06.03.03, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 34, "06.03.03_right.u2", 0x0000000, 0x0100000, CRC(98763498) SHA1(246e95cc12eb34f946b2f4938c59217718f6d841) ) \ - ROM_LOAD32_WORD_BIOS( 34, "06.03.03_left.u3", 0x0000002, 0x0100000, CRC(a6924238) SHA1(b71ab39bf9c1fdbab556028138749e8c040ec83c) ) \ - ROM_SYSTEM_BIOS( 35, "bios35", "Aristocrat MK6 Set Chips (06.03.04, USA)" ) \ - ROM_LOAD32_WORD_BIOS( 35, "06.03.04_right.u2", 0x0000000, 0x0100000, CRC(6f5f5ef1) SHA1(70a43fba4de47ed8dcf38b25eafd5873f3428e72) ) \ - ROM_LOAD32_WORD_BIOS( 35, "06.03.04_left.u3", 0x0000002, 0x0100000, CRC(7034f26b) SHA1(7be78f23bec38d05240cdfe1186ec0c8291f5a1c) ) + ROM_SYSTEM_BIOS( 17, "bios17", "Aristocrat MK6 Base (14011605, Queensland))" ) \ + ROM_LOAD32_WORD_BIOS( 17, "14011605_right.u83", 0x0000000, 0x0200000, CRC(2bec5b74) SHA1(854733cada75e632f01f7096d4740ed4941a3d5b) ) /* From Moon Fire - Jackpot Carnival */ \ + ROM_LOAD32_WORD_BIOS( 17, "14011605_left.u70", 0x0000002, 0x0200000, CRC(cd26d4f0) SHA1(40822714abf08aeb08d827dbd8cd099f86803754) ) \ + ROM_SYSTEM_BIOS( 18, "bios18", "Aristocrat MK6 Base (20012605, Queensland)" ) \ + ROM_LOAD32_WORD_BIOS( 18, "20012605_right.u83", 0x0000000, 0x0200000, CRC(045b82ad) SHA1(b8e4f9f826970d83ae5fd2f2898de12ad1bf2d24) ) \ + ROM_LOAD32_WORD_BIOS( 18, "20012605_left.u70", 0x0000002, 0x0200000, CRC(87331111) SHA1(6cdc2d81f68de23af18a975a6f27ddec246be405) ) \ + ROM_SYSTEM_BIOS( 19, "bios19", "Aristocrat MK6 Base (04041205, Queensland)" ) \ + ROM_LOAD32_WORD_BIOS( 19, "04041205_right.u83", 0x0000000, 0x0100000, CRC(ca6bc86c) SHA1(69fe7fc35694e4cd7f861bff4ec3a6165a81df6e) ) \ + ROM_LOAD32_WORD_BIOS( 19, "04041205_left.u70", 0x0000002, 0x0100000, CRC(dfb9a119) SHA1(814a5a7877392aec4e4871d7f0e19d2fbd717409) ) \ + ROM_SYSTEM_BIOS( 20, "bios20", "Aristocrat MK6 Base (01.02.08, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 20, "01.02.08_right.u2", 0x0000000, 0x0100000, CRC(aaaeac8c) SHA1(a565e5fcb4f55f31e7d36be40eec234248a66efd) ) \ + ROM_LOAD32_WORD_BIOS( 20, "01.02.08_left.u3", 0x0000002, 0x0100000, CRC(f29fd1bf) SHA1(33e043d2616e10a1c7a0936c3d208f9bcc2ca6f3) ) \ + ROM_SYSTEM_BIOS( 21, "bios21", "Aristocrat MK6 Base (01.03.03a, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 21, "01.03.03a_right.u83", 0x0000000, 0x0200000, CRC(253415f4) SHA1(50dc77ad87bc6be1932dda2fd4865602c8c49729) ) \ + ROM_LOAD32_WORD_BIOS( 21, "01.03.03a_left.u70", 0x0000002, 0x0200000, CRC(4ab5dd40) SHA1(a6812cc624e6a98ea7b0697e2797fe10ba8e303e) ) \ + ROM_SYSTEM_BIOS( 22, "bios22", "Aristocrat MK6 Base (01.03.03e, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 22, "01.03.03e_right.u83", 0x0000000, 0x0200000, CRC(2255e263) SHA1(5e9e093aaa17172f47a14c3baf7f6f0f73b19398) ) \ + ROM_LOAD32_WORD_BIOS( 22, "01.03.03e_left.u70", 0x0000002, 0x0200000, CRC(ea50729a) SHA1(14b5a71bfb91ac366ddcb5f77fb54127808f8163) ) \ + ROM_SYSTEM_BIOS( 23, "bios23", "Aristocrat MK6 Base (01.03.05, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 23, "01.03.05_right.u83", 0x0000000, 0x0200000, CRC(2c7f1ec3) SHA1(d03167f43ed6f9596080d91472695829378cef0a) ) \ + ROM_LOAD32_WORD_BIOS( 23, "01.03.05_left.u70", 0x0000002, 0x0200000, CRC(0095e3f9) SHA1(d2e8786158b1ab0a614aab21cf1d14cbc04754af) ) \ + ROM_SYSTEM_BIOS( 24, "bios24", "Aristocrat MK6 Base (01.03.06, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 24, "01.03.06_right.u83", 0x0000000, 0x0200000, CRC(bd48ca55) SHA1(8fb1576cbeb1c64c358880714740195d2e73e03e) ) /* From Diamond Eyes US */ \ + ROM_LOAD32_WORD_BIOS( 24, "01.03.06_left.u70", 0x0000002, 0x0200000, CRC(2f9d9a29) SHA1(fdebfaca9a579d7249379f19aef22fbfd66bf943) ) \ + ROM_SYSTEM_BIOS( 25, "bios25", "Aristocrat MK6 Base (01.03.07, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 25, "01.03.07_right.u83", 0x0000000, 0x0200000, CRC(2ebccc4e) SHA1(9342724e4451e9ab24ceae208284b50abd4f0be3) ) \ + ROM_LOAD32_WORD_BIOS( 25, "01.03.07_left.u70", 0x0000002, 0x0200000, CRC(a3632da4) SHA1(1c96a88e86095b81801ab88e36a4cdfa4b893265) ) \ + ROM_SYSTEM_BIOS( 26, "bios26", "Aristocrat MK6 Base (01.03.14, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 26, "01.03.14_right.u83", 0x0000000, 0x0200000, CRC(889ffd82) SHA1(9c98c9cdcf5f7d05095f11006418133029e9f0f8) ) /* From 5 Dragons US */ \ + ROM_LOAD32_WORD_BIOS( 26, "01.03.14_left.u70", 0x0000002, 0x0200000, CRC(7138fec4) SHA1(f81331d1875ac574d3e6c98be218ff25c6c7be5a) ) \ + ROM_SYSTEM_BIOS( 27, "bios27", "Aristocrat MK6 Base (01.03.17, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 27, "01.03.17_right.u83", 0x0000000, 0x0200000, CRC(1582714b) SHA1(92d0a15314ffe526159bef9a364898dd1ebdfde7) ) \ + ROM_LOAD32_WORD_BIOS( 27, "01.03.17_left.u70", 0x0000002, 0x0200000, CRC(a88193dc) SHA1(c9e1d483edaecd318d2e5fc8a54e84516c93e0ca) ) \ + ROM_SYSTEM_BIOS( 28, "bios28", "Aristocrat MK6 Base (01.04.14, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 28, "01.04.04_right.u83", 0x0000000, 0x0200000, CRC(e57ba02d) SHA1(8e29403e6b619eeab41dc171221720bc7820ccdc) ) \ + ROM_LOAD32_WORD_BIOS( 28, "01.04.04_left.u70", 0x0000002, 0x0200000, CRC(b984a92c) SHA1(90f7a61302caee40195c08565bdac856a3234c1d) ) \ + ROM_SYSTEM_BIOS( 29, "bios29", "Aristocrat MK6 Base (01.04.07, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 29, "01.04.07_right.u83", 0x0000000, 0x0200000, CRC(23c28e22) SHA1(98f24a1f86232b6c2c288a61ec7d60c867f192e5) ) \ + ROM_LOAD32_WORD_BIOS( 29, "01.04.07_left.u70", 0x0000002, 0x0200000, CRC(acfb0fe0) SHA1(b1a772d7978e6ff4406a5bb39a71cb3f89608e72) ) \ + ROM_SYSTEM_BIOS( 30, "bios30", "Aristocrat MK6 Base (01.04.08, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 30, "01.04.08_right.u83", 0x0000000, 0x0200000, CRC(95333304) SHA1(7afe49d6c5e4d6820f349778557daa88c5366a51) ) /* From Bob and Dolly, also u20 on EPROM expansion board */ \ + ROM_LOAD32_WORD_BIOS( 30, "01.04.08_left.u70", 0x0000002, 0x0200000, CRC(0dfcad10) SHA1(53798be000304aed38909f5fd8470a68bedd8229) ) /* also u10 on EPROM expansion board */ \ + ROM_SYSTEM_BIOS( 31, "bios31", "Aristocrat MK6 Base (01.04.10, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 31, "01.04.10_right.u83", 0x0000000, 0x0200000, CRC(82ce2fcc) SHA1(4c8fb3db084a67e99d1420b3f895a06ce9ef5ec2) ) \ + ROM_LOAD32_WORD_BIOS( 31, "01.04.10_left.u70", 0x0000002, 0x0200000, CRC(9d9d52c1) SHA1(b957220cdbedd516c219d1bfc28807ce466df93f) ) \ + ROM_SYSTEM_BIOS( 32, "bios32", "Aristocrat MK6 Base (01.04.11, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 32, "01.04.11_right.u83", 0x0000000, 0x0200000, CRC(2dae8ca0) SHA1(7a0fb38b4c1ac7195d15bdab6f0cfb16c78430f0) ) \ + ROM_LOAD32_WORD_BIOS( 32, "01.04.11_left.u70", 0x0000002, 0x0200000, CRC(787f2b07) SHA1(2548289e44f4b935346b759afb5383bdbac04c3e) ) \ + ROM_SYSTEM_BIOS( 33, "bios33", "Aristocrat MK6 Set Chips (06.02.04, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 33, "06.02.04_right.u2", 0x0000000, 0x0100000, CRC(1cf5a853) SHA1(64d17efcce702df7a0b0e151293199478e25226d) ) \ + ROM_LOAD32_WORD_BIOS( 33, "06.02.04_left.u3", 0x0000002, 0x0100000, CRC(117b75f2) SHA1(2129286853d3c50b8a943b71334d4ef6b98adc05) ) \ + ROM_SYSTEM_BIOS( 34, "bios34", "Aristocrat MK6 Set Chips (06.02.20, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 34, "06.02.20_right.u83", 0x0000000, 0x0100000, CRC(e4001f60) SHA1(5da34efb1ac0f7c84a48e09363d20cfecda4bcf1) ) \ + ROM_LOAD32_WORD_BIOS( 34, "06.02.20_left.u70", 0x0000002, 0x0100000, CRC(199ed3b9) SHA1(e3ee81ffd713f09e35a10c38e4f59282e2c5cd30) ) \ + ROM_SYSTEM_BIOS( 35, "bios35", "Aristocrat MK6 Set Chips (06.03.03, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 35, "06.03.03_right.u2", 0x0000000, 0x0100000, CRC(98763498) SHA1(246e95cc12eb34f946b2f4938c59217718f6d841) ) \ + ROM_LOAD32_WORD_BIOS( 35, "06.03.03_left.u3", 0x0000002, 0x0100000, CRC(a6924238) SHA1(b71ab39bf9c1fdbab556028138749e8c040ec83c) ) \ + ROM_SYSTEM_BIOS( 36, "bios36", "Aristocrat MK6 Set Chips (06.03.04, USA)" ) \ + ROM_LOAD32_WORD_BIOS( 36, "06.03.04_right.u2", 0x0000000, 0x0100000, CRC(6f5f5ef1) SHA1(70a43fba4de47ed8dcf38b25eafd5873f3428e72) ) \ + ROM_LOAD32_WORD_BIOS( 36, "06.03.04_left.u3", 0x0000002, 0x0100000, CRC(7034f26b) SHA1(7be78f23bec38d05240cdfe1186ec0c8291f5a1c) ) ROM_START( aristmk6 ) ARISTMK6_BIOS @@ -1973,6 +1976,16 @@ ROM_START( mnytree ) ROM_END +ROM_START( moonfire ) + ARISTMK6_BIOS + ROM_REGION( 0x4000000, "game_rom", ROMREGION_ERASEFF) + ROM_LOAD32_WORD("30164211.u86", 0x0000000, 0x0400000, CRC(9d60754d) SHA1(ab62e0f92191821b8e76dbaf3bd37303cb94187e) ) + ROM_LOAD32_WORD("30164211.u73", 0x0000002, 0x0400000, CRC(56a5ea19) SHA1(2f89527fe3dfdcab088cd3a7ab51a26816fe14dc) ) + ROM_LOAD32_WORD("30164211.u85", 0x0800000, 0x0400000, CRC(01d1f670) SHA1(efca261e4810f683084baa1cac03304cdd233ef9) ) + ROM_LOAD32_WORD("30164211.u72", 0x0800002, 0x0400000, CRC(21ebecc5) SHA1(dfd69f1ebea56b5cf49d67a437c7016410ea65c4) ) +ROM_END + + ROM_START( moonwalt ) ARISTMK6_BIOS ROM_REGION( 0x4000000, "game_rom", ROMREGION_ERASEFF) @@ -3006,6 +3019,17 @@ ROM_START( wheregldm ) ROM_END +ROM_START( wheregldq ) + ARISTMK6_BIOS + + ROM_REGION( 0x4000000, "game_rom", ROMREGION_ERASEFF) + ROM_LOAD32_WORD("20184811.u86", 0x0000000, 0x0400000, CRC(95da579c) SHA1(230a18b76e72f09ea74543bd6a7a31ae51bf651e) ) + ROM_LOAD32_WORD("20184811.u73", 0x0000002, 0x0400000, CRC(c35095ec) SHA1(637c5cfbb985716140a0e123c23ba13bffc2e734) ) + ROM_LOAD32_WORD("20184811.u85", 0x0800000, 0x0400000, CRC(1520539c) SHA1(9f3503bfcadc74f9e12ea7300b3356e9efb00b5a) ) + ROM_LOAD32_WORD("20184811.u72", 0x0800002, 0x0400000, CRC(50ed1445) SHA1(6b623965b95352d7f79700a075eaf4eb2019dee8) ) +ROM_END + + ROM_START( whtwater ) ARISTMK6_BIOS ROM_REGION( 0x4000000, "game_rom", ROMREGION_ERASEFF) @@ -3334,6 +3358,7 @@ GAME( 2007, metestrm, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init GAME( 2007, milkin, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Milkin' It (10251911, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 816, B - 13/08/07 GAME( 2005, mskitty, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Miss Kitty (10216611, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 778, C - 18/04/05 GAME( 2000, mnytree, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Money Tree (10001211, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 657, E - 06/11/00 +GAME( 2004, moonfire, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Moon Fire - Jackpot Carnival (30164211, Queensland)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 628/3, E - 27/01/04 GAME( 2007, moonwalt, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Moonlight Waltz (10227611, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 814/1, B - 11/01/07 GAME( 2008, mchilli, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "More Chilli (20248711, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 844, B - 21/01/08 GAME( 2010, mchilliq, mchilli, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "More Chilli (20289311, Queensland)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 844/2, B - 14/12/10 @@ -3432,6 +3457,7 @@ GAME( 2005, whalecshua, whalecsh, aristmk6, aristmk6, aristmk6_state, empty_init GAME( 2004, wheregld, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Where's The Gold (10124811, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 756, B - 26/02/04 GAME( 2004, wheregldsp, wheregld, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Where's The Gold (10124811, NSW/ACT, Show Program)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 756, B - 26/02/04 GAME( 2004, wheregldm, wheregld, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Where's the Gold (20177111, Malaysia)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 756, C - 17/06/04 +GAME( 2005, wheregldq, wheregld, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Where's the Gold (20184811, Queensland)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 756, D - 21/06/05 GAME( 2003, whtwater, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "White Water (0151075, US)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // US054, A - 4/11/03 GAME( 2006, wikwin2, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Wicked Winnings II - Power Pay (10214011, NSW/ACT)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // 796, A - 28/02/06 GAME( 2002, wldafr, aristmk6, aristmk6, aristmk6, aristmk6_state, empty_init, ROT0, "Aristocrat", "Wild Africa - Millioniser (0351083, US)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // MV4076, D - 5/08/02 diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp index 65c7b55bf3d..da409f107cc 100644 --- a/src/mame/drivers/artmagic.cpp +++ b/src/mame/drivers/artmagic.cpp @@ -827,7 +827,7 @@ MACHINE_CONFIG_START(artmagic_state::artmagic) EEPROM_2816(config, "eeprom").write_time(attotime::from_usec(1)); // FIXME: false-readback polling should make this unnecessary /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_40MHz/6, 428, 0, 320, 313, 0, 256) diff --git a/src/mame/drivers/aztarac.cpp b/src/mame/drivers/aztarac.cpp index 083fb952962..3da54644eb7 100644 --- a/src/mame/drivers/aztarac.cpp +++ b/src/mame/drivers/aztarac.cpp @@ -166,7 +166,7 @@ MACHINE_CONFIG_START(aztarac_state::aztarac) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, m_vector, 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(40) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/bionicc.cpp b/src/mame/drivers/bionicc.cpp index 35c0fa36d9d..1c80379e0a9 100644 --- a/src/mame/drivers/bionicc.cpp +++ b/src/mame/drivers/bionicc.cpp @@ -573,6 +573,50 @@ ROM_START( bionicc2 ) /* "Not for use outside of USA or Canada" 1st release */ ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */ ROM_END +ROM_START( topsecrt2 ) /* "Not for use in any other country but Japan" */ + ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ + ROM_LOAD16_BYTE( "ts_02b.1a", 0x00000, 0x10000, CRC(0b84497f) SHA1(f7e9412d37a1e4b7a437d3f7bc5dc448c8a22079) ) /* 68000 code */ + ROM_LOAD16_BYTE( "ts_04b.1b", 0x00001, 0x10000, CRC(9ab6de8d) SHA1(04445bc183364ebb6a8833a147b694234b509634) ) /* 68000 code */ + ROM_LOAD16_BYTE( "ts_03b.2a", 0x20000, 0x10000, CRC(1b3f8a82) SHA1(2f9cad83b7bd10617bbd5172a1d31f41b194d3ac) ) /* 68000 code */ + ROM_LOAD16_BYTE( "ts_05b.2b", 0x20001, 0x10000, CRC(962a89d8) SHA1(4aa5b0fd68a59ff74716253b0ba4c1933e92855b) ) /* 68000 code */ + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "ts_01b.4e", 0x00000, 0x8000, CRC(a9a6cafa) SHA1(55e0a0e6ca11e8e73339d5b4604e130031211291) ) + + ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */ + ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */ + + ROM_REGION( 0x08000, "gfx1", 0 ) + ROM_LOAD( "ts_08.8l", 0x00000, 0x8000, CRC(96ad379e) SHA1(accd3a560b259c186bc28cdc004ed8de0b12f9d5) ) /* VIDEORAM (text layer) tiles */ + + ROM_REGION( 0x10000, "gfx2", 0 ) + ROM_LOAD( "ts_07.5l", 0x00000, 0x8000, CRC(25cdf8b2) SHA1(316f6acc46878682dabeab12722e6a64504d23bd) ) /* SCROLL2 Layer Tiles */ + ROM_LOAD( "ts_06.4l", 0x08000, 0x8000, CRC(314fb12d) SHA1(dab0519a49b64fe7a837b3c6383f6147e1ab6ffd) ) + + ROM_REGION( 0x40000, "gfx3", 0 ) + ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */ + ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) ) + ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) ) + ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) ) + ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) ) + ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) ) + ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) ) + ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) ) + + ROM_REGION( 0x40000, "gfx4", 0 ) + ROM_LOAD( "ts_10.13f", 0x00000, 0x8000, CRC(c3587d05) SHA1(ad0898a5d4cf110783ef092bf8e65b6ef31a8ae0) ) /* Sprites */ + ROM_LOAD( "ts_09.11f", 0x08000, 0x8000, CRC(6b63eef2) SHA1(5d1580db7f49c5994c2a08a36c2d05f3e246930d) ) + ROM_LOAD( "ts_15.13g", 0x10000, 0x8000, CRC(db8cebb0) SHA1(1cc9eac14851cde95fb2d69d6f5ffb08bc9c0d93) ) + ROM_LOAD( "ts_14.11g", 0x18000, 0x8000, CRC(e2e41abf) SHA1(d002d0d8fdbb9ec3e2eac218f6338f733953ca82) ) + ROM_LOAD( "ts_20.13j", 0x20000, 0x8000, CRC(bfd1a695) SHA1(bf93486b96bfa1a1d5015189043b07e6130e6df1) ) + ROM_LOAD( "ts_19.11j", 0x28000, 0x8000, CRC(928b669e) SHA1(98ea9d23a46b0700490fd2fa7ab4fb0988dd5ca6) ) + ROM_LOAD( "ts_22.17j", 0x30000, 0x8000, CRC(3fe05d9a) SHA1(32e28ef03fb82785019d1ae8b3859215b5368c2b) ) + ROM_LOAD( "ts_21.15j", 0x38000, 0x8000, CRC(27a9bb7c) SHA1(bb60332c0ecde4d7797960dec39c1079498175c3) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */ +ROM_END + ROM_START( topsecrt ) /* "Not for use in any other country but Japan" */ ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_BYTE( "ts_02.1a", 0x00000, 0x10000, CRC(b2fe1ddb) SHA1(892f19124993add96edabdba3aafeecc6668c5d9) ) /* 68000 code */ @@ -712,7 +756,8 @@ GAME( 1987, bionicc, 0, bionicc, bionicc, bionicc_state, empty_init, RO GAME( 1987, bionicc1, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Bionic Commando (US set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, bionicc2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Bionic Commando (US set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, topsecrt, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Top Secret (Japan, old revision)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, topsecrt2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Top Secret (Japan, revision B)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, bioniccbl, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "bootleg", "Bionic Commandos (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, bioniccbl2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "bootleg", "Bionic Commandos (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) -// there's also an undumped JP new revision on which there are no extra lives after 1 million points, plus other bug-fixes / changes +// there's also an undumped JP new revision on which there are no extra lives after 1 million points, plus other bug-fixes / changes (possibly topsecrt2 set?) diff --git a/src/mame/drivers/btoads.cpp b/src/mame/drivers/btoads.cpp index f9b9ad9b1cf..dffa36f88b9 100644 --- a/src/mame/drivers/btoads.cpp +++ b/src/mame/drivers/btoads.cpp @@ -322,7 +322,7 @@ MACHINE_CONFIG_START(btoads_state::btoads) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 257, 0, 224) diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp index 3cb71a0c334..70d8d85dda0 100644 --- a/src/mame/drivers/bwidow.cpp +++ b/src/mame/drivers/bwidow.cpp @@ -773,7 +773,7 @@ MACHINE_CONFIG_START(bwidow_state::bwidow) MCFG_DEVICE_ADD("earom", ER2055) /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(CLOCK_3KHZ / 12 / 4) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp index 903a49048f2..63a46128e03 100644 --- a/src/mame/drivers/by17.cpp +++ b/src/mame/drivers/by17.cpp @@ -837,7 +837,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer ) -+ +---+ */ - m_display_refresh_timer->adjust(attotime::from_msec(2.85)); + m_display_refresh_timer->adjust(attotime::from_usec(2850)); m_u11_ca1 = true; m_pia_u11->ca1_w(m_u11_ca1); diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp index 90a62545b98..4b4cb22de01 100644 --- a/src/mame/drivers/by35.cpp +++ b/src/mame/drivers/by35.cpp @@ -898,7 +898,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer ) -+ +---+ */ - m_display_refresh_timer->adjust(attotime::from_msec(2.85)); + m_display_refresh_timer->adjust(attotime::from_usec(2850)); m_u11_ca1 = true; m_pia_u11->ca1_w(m_u11_ca1); diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp index 5628573257c..119977a7291 100644 --- a/src/mame/drivers/capbowl.cpp +++ b/src/mame/drivers/capbowl.cpp @@ -341,10 +341,10 @@ MACHINE_CONFIG_START(capbowl_state::capbowl) MCFG_SCREEN_REFRESH_RATE(57) MCFG_SCREEN_UPDATE_DRIVER(capbowl_state, screen_update) - MCFG_DEVICE_ADD("tms34061", TMS34061, 0) - MCFG_TMS34061_ROWSHIFT(8) /* VRAM address is (row << rowshift) | col */ - MCFG_TMS34061_VRAM_SIZE(0x10000) /* size of video RAM */ - MCFG_TMS34061_INTERRUPT_CB(INPUTLINE("maincpu", M6809_FIRQ_LINE)) /* interrupt gen callback */ + TMS34061(config, m_tms34061, 0); + m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */ + m_tms34061->set_vram_size(0x10000); + m_tms34061->int_callback().set_inputline("maincpu", M6809_FIRQ_LINE); /* sound hardware */ SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp index 31fc3f6c001..e238d3d1e82 100644 --- a/src/mame/drivers/cchasm.cpp +++ b/src/mame/drivers/cchasm.cpp @@ -165,7 +165,7 @@ MACHINE_CONFIG_START(cchasm_state::cchasm) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, m_vector, 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(40) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/clickstart.cpp b/src/mame/drivers/clickstart.cpp index 9b0edd2fe42..70eb2b2d1c7 100644 --- a/src/mame/drivers/clickstart.cpp +++ b/src/mame/drivers/clickstart.cpp @@ -6,8 +6,6 @@ Status: - Calls to unmapped space - Some games have Checksums listed in the header area that appear to be like the byte checksums on the Radica games in vii.cpp, however the calculation doesn't add up correctly. There is also a checksum in @@ -44,12 +42,29 @@ public: , m_spg(*this, "spg") , m_cart(*this, "cartslot") , m_system_region(*this, "maincpu") + , m_io_mouse_x(*this, "MOUSEX") + , m_io_mouse_y(*this, "MOUSEY") , m_cart_region(nullptr) + , m_mouse_x(0) + , m_mouse_y(0) + , m_mouse_dx(0) + , m_mouse_dy(0) + , m_uart_tx_fifo_start(0) + , m_uart_tx_fifo_end(0) + , m_uart_tx_fifo_count(0) + , m_uart_tx_timer(nullptr) + , m_unk_portc_toggle(0) { } void clickstart(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(mouse_update); + private: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + + static const device_timer_id TIMER_UART_TX = 0; + virtual void machine_start() override; virtual void machine_reset() override; @@ -68,17 +83,35 @@ private: DECLARE_WRITE8_MEMBER(chip_sel_w); + void handle_uart_tx(); + void uart_tx_fifo_push(uint8_t value); + + void update_mouse_buffer(); + required_device<cpu_device> m_maincpu; required_device<screen_device> m_screen; required_device<spg2xx_device> m_spg; required_device<generic_slot_device> m_cart; required_memory_region m_system_region; + required_ioport m_io_mouse_x; + required_ioport m_io_mouse_y; memory_region *m_cart_region; + uint16_t m_mouse_x; + uint16_t m_mouse_y; + int16_t m_mouse_dx; + int16_t m_mouse_dy; + uint8_t m_mouse_buffer[16]; + + uint8_t m_uart_tx_fifo[32]; // arbitrary size + uint8_t m_uart_tx_fifo_start; + uint8_t m_uart_tx_fifo_end; + uint8_t m_uart_tx_fifo_count; + emu_timer *m_uart_tx_timer; + uint16_t m_unk_portc_toggle; }; - void clickstart_state::machine_start() { // if there's a cart, override the standard mapping @@ -88,11 +121,37 @@ void clickstart_state::machine_start() m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); } + save_item(NAME(m_mouse_x)); + save_item(NAME(m_mouse_y)); + save_item(NAME(m_mouse_dx)); + save_item(NAME(m_mouse_dy)); + save_item(NAME(m_mouse_buffer)); + + save_item(NAME(m_uart_tx_fifo)); + save_item(NAME(m_uart_tx_fifo_start)); + save_item(NAME(m_uart_tx_fifo_end)); + save_item(NAME(m_uart_tx_fifo_count)); + save_item(NAME(m_unk_portc_toggle)); + + m_uart_tx_timer = timer_alloc(TIMER_UART_TX); + m_uart_tx_timer->adjust(attotime::never); } void clickstart_state::machine_reset() { + m_mouse_x = 0xffff; + m_mouse_y = 0xffff; + m_mouse_dx = 0; + m_mouse_dy = 0; + memset(m_mouse_buffer, 0, ARRAY_LENGTH(m_mouse_buffer)); + + memset(m_uart_tx_fifo, 0, ARRAY_LENGTH(m_uart_tx_fifo)); + m_uart_tx_fifo_start = 0; + m_uart_tx_fifo_end = 0; + m_uart_tx_fifo_count = 0; + m_uart_tx_timer->adjust(attotime::from_hz(3200/10), 0, attotime::from_hz(3200/10)); + m_unk_portc_toggle = 0; } @@ -106,6 +165,95 @@ DEVICE_IMAGE_LOAD_MEMBER(clickstart_state, cart) return image_init_result::PASS; } +void clickstart_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + if (id == TIMER_UART_TX) + { + handle_uart_tx(); + } +} + +void clickstart_state::handle_uart_tx() +{ + if (m_uart_tx_fifo_count == 0) + return; + + m_spg->uart_rx(m_uart_tx_fifo[m_uart_tx_fifo_start]); + m_uart_tx_fifo_start = (m_uart_tx_fifo_start + 1) % ARRAY_LENGTH(m_uart_tx_fifo); + m_uart_tx_fifo_count--; +} + +void clickstart_state::uart_tx_fifo_push(uint8_t value) +{ + if (m_uart_tx_fifo_count >= ARRAY_LENGTH(m_uart_tx_fifo)) + { + logerror("Warning: Trying to push too much data onto the mouse Tx FIFO, data will be lost.\n"); + } + + m_uart_tx_fifo[m_uart_tx_fifo_end] = value; + m_uart_tx_fifo_end = (m_uart_tx_fifo_end + 1) % ARRAY_LENGTH(m_uart_tx_fifo); + m_uart_tx_fifo_count++; +} + +INPUT_CHANGED_MEMBER(clickstart_state::mouse_update) +{ + uint16_t x = m_io_mouse_x->read(); + uint16_t y = m_io_mouse_y->read(); + uint16_t old_mouse_x = m_mouse_x; + uint16_t old_mouse_y = m_mouse_y; + + if (m_mouse_x == 0xffff) + { + old_mouse_x = x; + old_mouse_y = y; + } + + m_mouse_x = x; + m_mouse_y = y; + + m_mouse_dx += (m_mouse_x - old_mouse_x); + m_mouse_dy += (m_mouse_y - old_mouse_y); + + if (m_mouse_dx < -63) + m_mouse_dx = -63; + else if (m_mouse_dx > 62) + m_mouse_dx = 62; + + if (m_mouse_dy < -63) + m_mouse_dy = -63; + else if (m_mouse_dy > 62) + m_mouse_dy = 62; + + update_mouse_buffer(); + + m_mouse_dx = 0; + m_mouse_dy = 0; +} + +void clickstart_state::update_mouse_buffer() +{ + if (m_mouse_dx == 0 && m_mouse_dy == 0) + return; + + m_mouse_buffer[0] = 0x03; + m_mouse_buffer[1] = (m_mouse_x + 1) & 0x3f; + m_mouse_buffer[2] = (m_mouse_y + 1) & 0x3f; + m_mouse_buffer[3] = (m_mouse_dx + 1) & 0x3f; + m_mouse_buffer[4] = (m_mouse_dy + 1) & 0x3f; + + //printf("Queueing: "); + uint16_t sum = 0; + for (int i = 0; i < 5; i++) + { + uart_tx_fifo_push(m_mouse_buffer[i] ^ 0xff); + sum += m_mouse_buffer[i]; + //printf("%02x ", m_mouse_buffer[i] ^ 0xff); + } + sum = (sum & 0xff) ^ 0xff; + uart_tx_fifo_push((uint8_t)sum); + //printf("%02x\n", (uint8_t)sum); +} + READ16_MEMBER(clickstart_state::rom_r) { if (offset < 0x400000 / 2) @@ -123,7 +271,7 @@ READ16_MEMBER(clickstart_state::rom_r) WRITE16_MEMBER(clickstart_state::porta_w) { - logerror("%s: porta_w: %04x & %04x\n", machine().describe_context(), data, mem_mask); + //logerror("%s: porta_w: %04x & %04x\n", machine().describe_context(), data, mem_mask); } WRITE16_MEMBER(clickstart_state::portb_w) @@ -138,8 +286,8 @@ WRITE16_MEMBER(clickstart_state::portc_w) READ16_MEMBER(clickstart_state::porta_r) { - uint16_t data = 0x5000; - logerror("%s: porta_r: %04x & %04x\n", machine().describe_context(), data, mem_mask); + uint16_t data = 0x4000; + //logerror("%s: porta_r: %04x & %04x\n", machine().describe_context(), data, mem_mask); return data; } @@ -169,6 +317,11 @@ void clickstart_state::mem_map(address_map &map) } static INPUT_PORTS_START( clickstart ) + PORT_START("MOUSEX") + PORT_BIT(0x3e, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0) + + PORT_START("MOUSEY") + PORT_BIT(0x3e, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CHANGED_MEMBER(DEVICE_SELF, clickstart_state, mouse_update, 0) INPUT_PORTS_END // There is a SEEPROM on the motherboard (type?) @@ -188,7 +341,7 @@ void clickstart_state::clickstart(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen); + SPG28X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen); m_spg->porta_out().set(FUNC(clickstart_state::porta_w)); m_spg->portb_out().set(FUNC(clickstart_state::portb_w)); m_spg->portc_out().set(FUNC(clickstart_state::portc_w)); diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp index 945c12246f9..555e1a7f5b7 100644 --- a/src/mame/drivers/coolpool.cpp +++ b/src/mame/drivers/coolpool.cpp @@ -788,7 +788,7 @@ MACHINE_CONFIG_START(coolpool_state::coolpool) MCFG_TIMER_DRIVER_ADD(m_nvram_timer, coolpool_state, nvram_write_timeout) /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL(40'000'000)/6, 424, 0, 320, 262, 0, 240) diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp index 84a2fa439cb..c551b14ef94 100644 --- a/src/mame/drivers/fcrash.cpp +++ b/src/mame/drivers/fcrash.cpp @@ -494,6 +494,37 @@ WRITE16_MEMBER(cps_state::sf2mdta_layer_w) } } +WRITE16_MEMBER(cps_state::sf2b_layer_w) +{ + switch (offset) + { + case 0x06: + m_cps_a_regs[0x0c / 2] = data + 0xffbe; /* scroll 1x */ + break; + case 0x07: + m_cps_a_regs[0x0e / 2] = data; /* scroll 1y */ + break; + case 0x08: + m_cps_a_regs[0x14 / 2] = data + 0xffce; /* scroll 3x */ + break; + case 0x09: + m_cps_a_regs[0x12 / 2] = data; /* scroll 2y */ + m_cps_a_regs[CPS1_ROWSCROLL_OFFS] = data; /* row scroll start */ + break; + case 0x0a: + m_cps_a_regs[0x10 / 2] = data + 0xffce; /* scroll 2x */ + break; + case 0x0b: + m_cps_a_regs[0x16 / 2] = data; /* scroll 3y */ + break; + case 0x26: + m_cps_b_regs[m_layer_enable_reg / 2] = data; + break; + default: + printf("%X:%X ",offset,data); + } +} + WRITE16_MEMBER(cps_state::slampic_layer_w) { switch (offset) @@ -725,7 +756,7 @@ void cps_state::knightsb_map(address_map &map) map(0x900000, 0x93ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); map(0x980000, 0x98002f).w(FUNC(cps_state::knightsb_layer_w)); map(0x990000, 0x990001).nopw(); // same as 880000 - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::dinopic_map(address_map &map) @@ -745,7 +776,7 @@ void cps_state::dinopic_map(address_map &map) map(0xf1c000, 0xf1c001).portr("IN2"); /* Player 3 controls (later games) */ map(0xf1c004, 0xf1c005).w(FUNC(cps_state::cpsq_coinctrl2_w)); /* Coin control2 (later games) */ map(0xf1c006, 0xf1c007).portr("EEPROMIN").portw("EEPROMOUT"); - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::fcrash_map(address_map &map) @@ -759,7 +790,7 @@ void cps_state::fcrash_map(address_map &map) map(0x880008, 0x88000f).r(FUNC(cps_state::cps1_dsw_r)); /* System input ports / Dip Switches */ map(0x890000, 0x890001).nopw(); // palette related? map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::mtwinsb_map(address_map &map) @@ -810,7 +841,7 @@ void cps_state::sf2m1_map(address_map &map) map(0x900000, 0x93ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); map(0x980000, 0x9801ff).w(FUNC(cps_state::sf2m1_layer_w)); map(0x990000, 0x990001).nopw(); // same as 880000 - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::sf2mdt_map(address_map &map) @@ -832,7 +863,7 @@ void cps_state::sf2mdt_map(address_map &map) void cps_state::sf2b_map(address_map &map) { map(0x000000, 0x3fffff).rom(); - map(0x708100, 0x7081ff).w(FUNC(cps_state::sf2mdta_layer_w)); + map(0x708100, 0x7081ff).w(FUNC(cps_state::sf2b_layer_w)); map(0x70c000, 0x70c001).portr("IN1"); map(0x70c008, 0x70c009).portr("IN2"); map(0x70c018, 0x70c01f).r(FUNC(cps_state::cps1_hack_dsw_r)); @@ -842,7 +873,7 @@ void cps_state::sf2b_map(address_map &map) map(0x800100, 0x80013f).ram().share("cps_a_regs"); /* CPS-A custom */ map(0x800140, 0x80017f).rw(FUNC(cps_state::cps1_cps_b_r), FUNC(cps_state::cps1_cps_b_w)).share("cps_b_regs"); /* CPS-B custom */ map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::sgyxz_map(address_map &map) @@ -876,7 +907,7 @@ void cps_state::wofabl_map(address_map &map) map(0x900000, 0x92ffff).ram().w(FUNC(cps_state::cps1_gfxram_w)).share("gfxram"); map(0xf1c004, 0xf1c005).w(FUNC(cps_state::cpsq_coinctrl2_w)); /* Coin control2 (later games) */ map(0xf1c006, 0xf1c007).portr("EEPROMIN").portw("EEPROMOUT"); - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::slampic_map(address_map &map) @@ -897,7 +928,7 @@ void cps_state::slampic_map(address_map &map) map(0xf1c004, 0xf1c005).w(FUNC(cps_state::cpsq_coinctrl2_w)); /* Coin control2 (later games) */ map(0xf1c006, 0xf1c007).portr("EEPROMIN").portw("EEPROMOUT"); map(0xf1f000, 0xf1ffff).noprw(); // writes 0 to range, then reads F1F6EC - map(0xff0000, 0xffffff).ram(); + map(0xff0000, 0xffffff).ram().share("mainram"); } void cps_state::sound_map(address_map &map) diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp index a44fae46407..91da29c3c24 100644 --- a/src/mame/drivers/funkball.cpp +++ b/src/mame/drivers/funkball.cpp @@ -781,11 +781,11 @@ MACHINE_CONFIG_START(funkball_state::funkball) ADDRESS_MAP_BANK(config, "flashbank").set_map(&funkball_state::flashbank_map).set_options(ENDIANNESS_LITTLE, 32, 32, 0x10000); /* video hardware */ - MCFG_DEVICE_ADD("voodoo_0", VOODOO_1, STD_VOODOO_1_CLOCK) - MCFG_VOODOO_FBMEM(2) - MCFG_VOODOO_TMUMEM(4,0) - MCFG_VOODOO_SCREEN_TAG("screen") - MCFG_VOODOO_CPU_TAG("maincpu") + VOODOO_1(config, m_voodoo, STD_VOODOO_1_CLOCK); + m_voodoo->set_fbmem(2); + m_voodoo->set_tmumem(4, 0); + m_voodoo->set_screen_tag("screen"); + m_voodoo->set_cpu_tag(m_maincpu); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index e4ce7a960d4..1050ea7783d 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -7276,7 +7276,7 @@ GAME( 199?, mongolnw, 0, royalcd1, royalcrd, funworld_state, init_mong GAME( 199?, soccernw, 0, royalcd1, royalcrd, funworld_state, init_soccernw, ROT0, "<unknown>", "Soccer New (Italian)", MACHINE_UNEMULATED_PROTECTION ) // Other games... -GAME( 198?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World / Oehlinger", "Fun World Quiz (Austrian)", 0 ) +GAME( 198?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (Austrian)", 0 ) GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic","Novo Play Multi Card / Club Card", 0, layout_novoplay ) GAME( 1991, intrgmes, 0, intrgmes, funworld, funworld_state, empty_init, ROT0, "Inter Games", "unknown Inter Games poker", MACHINE_NOT_WORKING ) GAMEL( 1985, fw_a7_11, 0, fw_brick_2, funworld, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 8610c36b809..974a3716f0f 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -2333,6 +2333,7 @@ void gnw_smb_state::gnw_smb(machine_config &config) /*************************************************************************** Nintendo Game & Watch: Climber (model: see below) + * PCB label DR-106 * Sharp SM511 label DR-106 9038B (new wide screen version) (no decap) * lcd screen with custom segments, 1-bit sound @@ -6746,32 +6747,31 @@ void tgoldeye_state::tgoldeye(machine_config &config) /*************************************************************************** - Tiger Independence Day (model 78-???) - * Sharp SM510 under epoxy (die label 10 16) + Tiger Space Jam (model 78-621) + * Sharp SM510 under epoxy (die label KMS10, 23) * lcd screen with custom segments, 1-bit sound ***************************************************************************/ -class tinday_state : public hh_sm510_state +class tsjam_state : public hh_sm510_state { public: - tinday_state(const machine_config &mconfig, device_type type, const char *tag) + tsjam_state(const machine_config &mconfig, device_type type, const char *tag) : hh_sm510_state(mconfig, type, tag) { m_inp_lines = 5; m_inp_fixed = 5; } - void tinday(machine_config &config); + void tsjam(machine_config &config); }; // config -static INPUT_PORTS_START( tinday ) +static INPUT_PORTS_START( tsjam ) PORT_START("IN.0") // S1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Shield") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Fire") - PORT_BIT( 0x0a, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) + PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.1") // S2 PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) @@ -6779,12 +6779,13 @@ static INPUT_PORTS_START( tinday ) PORT_BIT( 0x09, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.2") // S3 - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Alert") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.3") // S4 - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Velocity") - PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Shoot/Block") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Tune/Steal") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.4") // S5 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Pause") @@ -6804,10 +6805,10 @@ static INPUT_PORTS_START( tinday ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, acl_button, nullptr) PORT_NAME("ACL") INPUT_PORTS_END -void tinday_state::tinday(machine_config &config) +void tsjam_state::tsjam(machine_config &config) { /* basic machine hardware */ - SM510(config, m_maincpu); + SM510(config, m_maincpu); // no external XTAL m_maincpu->set_r_mask_option(sm510_base_device::RMASK_DIRECT); m_maincpu->write_segs().set(FUNC(hh_sm510_state::sm510_lcd_segment_w)); m_maincpu->read_k().set(FUNC(hh_sm510_state::input_r)); @@ -6820,8 +6821,8 @@ void tinday_state::tinday(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); screen.set_svg_region("svg"); screen.set_refresh_hz(50); - screen.set_size(1463, 1080); - screen.set_visarea(0, 1463-1, 0, 1080-1); + screen.set_size(1421, 1080); + screen.set_visarea(0, 1421-1, 0, 1080-1); TIMER(config, "display_decay").configure_periodic(FUNC(hh_sm510_state::display_decay_tick), attotime::from_msec(1)); @@ -6837,31 +6838,32 @@ void tinday_state::tinday(machine_config &config) /*************************************************************************** - Tiger Space Jam (model 78-621) - * Sharp SM510 under epoxy (die label KMS10, 23) + Tiger Independence Day (model 78-624) + * Sharp SM510 under epoxy (die label 10 16) * lcd screen with custom segments, 1-bit sound ***************************************************************************/ -class tsjam_state : public hh_sm510_state +class tinday_state : public hh_sm510_state { public: - tsjam_state(const machine_config &mconfig, device_type type, const char *tag) + tinday_state(const machine_config &mconfig, device_type type, const char *tag) : hh_sm510_state(mconfig, type, tag) { m_inp_lines = 5; m_inp_fixed = 5; } - void tsjam(machine_config &config); + void tinday(machine_config &config); }; // config -static INPUT_PORTS_START( tsjam ) +static INPUT_PORTS_START( tinday ) PORT_START("IN.0") // S1 - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) - PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Shield") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Fire") + PORT_BIT( 0x0a, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.1") // S2 PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) @@ -6869,13 +6871,12 @@ static INPUT_PORTS_START( tsjam ) PORT_BIT( 0x09, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.2") // S3 - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Alert") PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.3") // S4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Shoot/Block") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Tune/Steal") - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Velocity") + PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.4") // S5 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Pause") @@ -6895,10 +6896,10 @@ static INPUT_PORTS_START( tsjam ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, acl_button, nullptr) PORT_NAME("ACL") INPUT_PORTS_END -void tsjam_state::tsjam(machine_config &config) +void tinday_state::tinday(machine_config &config) { /* basic machine hardware */ - SM510(config, m_maincpu); // no external XTAL + SM510(config, m_maincpu); m_maincpu->set_r_mask_option(sm510_base_device::RMASK_DIRECT); m_maincpu->write_segs().set(FUNC(hh_sm510_state::sm510_lcd_segment_w)); m_maincpu->read_k().set(FUNC(hh_sm510_state::input_r)); @@ -6911,8 +6912,8 @@ void tsjam_state::tsjam(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); screen.set_svg_region("svg"); screen.set_refresh_hz(50); - screen.set_size(1421, 1080); - screen.set_visarea(0, 1421-1, 0, 1080-1); + screen.set_size(1463, 1080); + screen.set_visarea(0, 1463-1, 0, 1080-1); TIMER(config, "display_decay").configure_periodic(FUNC(hh_sm510_state::display_decay_tick), attotime::from_msec(1)); @@ -7983,21 +7984,21 @@ ROM_START( tgoldeye ) ROM_END -ROM_START( tinday ) +ROM_START( tsjam ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "10_16", 0x0000, 0x1000, CRC(77c2c2f7) SHA1(06326b26d0f6757180724ba0bdeb4110cc7e29d6) ) + ROM_LOAD( "10_23", 0x0000, 0x1000, CRC(6eaabfbd) SHA1(f0ecbd6f65fe72ce2d8a452685be2e77a63fc9f0) ) - ROM_REGION( 1162672, "svg", 0) - ROM_LOAD( "tinday.svg", 0, 1162672, CRC(9b9a8047) SHA1(2aeaa71a54cf897d2a5d91133c733613ca229aae) ) + ROM_REGION( 1046147, "svg", 0) + ROM_LOAD( "tsjam.svg", 0, 1046147, CRC(6d24e1c9) SHA1(ddbfbd85f70ec964c68f982a8ee8070e3786a85e) ) ROM_END -ROM_START( tsjam ) +ROM_START( tinday ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "10_23", 0x0000, 0x1000, CRC(6eaabfbd) SHA1(f0ecbd6f65fe72ce2d8a452685be2e77a63fc9f0) ) + ROM_LOAD( "10_16", 0x0000, 0x1000, CRC(77c2c2f7) SHA1(06326b26d0f6757180724ba0bdeb4110cc7e29d6) ) - ROM_REGION( 1046147, "svg", 0) - ROM_LOAD( "tsjam.svg", 0, 1046147, CRC(6d24e1c9) SHA1(ddbfbd85f70ec964c68f982a8ee8070e3786a85e) ) + ROM_REGION( 1162672, "svg", 0) + ROM_LOAD( "tinday.svg", 0, 1162672, CRC(9b9a8047) SHA1(2aeaa71a54cf897d2a5d91133c733613ca229aae) ) ROM_END @@ -8124,8 +8125,8 @@ CONS( 1995, tbatfor, 0, 0, tbatfor, tbatfor, tbatfor_state, CONS( 1995, tjdredd, 0, 0, tjdredd, tjdredd, tjdredd_state, empty_init, "Tiger Electronics", "Judge Dredd (handheld)", MACHINE_SUPPORTS_SAVE ) CONS( 1995, tapollo13, 0, 0, tapollo13, tapollo13, tapollo13_state, empty_init, "Tiger Electronics", "Apollo 13 (handheld)", MACHINE_SUPPORTS_SAVE ) CONS( 1995, tgoldeye, 0, 0, tgoldeye, tgoldeye, tgoldeye_state, empty_init, "Tiger Electronics", "007: GoldenEye (handheld)", MACHINE_SUPPORTS_SAVE ) -CONS( 1996, tinday, 0, 0, tinday, tinday, tinday_state, empty_init, "Tiger Electronics", "Independence Day (handheld)", MACHINE_SUPPORTS_SAVE ) CONS( 1996, tsjam, 0, 0, tsjam, tsjam, tsjam_state, empty_init, "Tiger Electronics", "Space Jam (handheld)", MACHINE_SUPPORTS_SAVE ) +CONS( 1996, tinday, 0, 0, tinday, tinday, tinday_state, empty_init, "Tiger Electronics", "Independence Day (handheld)", MACHINE_SUPPORTS_SAVE ) // Tiger 72-xxx models CONS( 1992, tbatmana, 0, 0, tbatmana, tbatmana, tbatmana_state, empty_init, "Tiger Electronics", "Batman: The Animated Series (handheld)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/jpmsys5.cpp b/src/mame/drivers/jpmsys5.cpp index ffc85d91c77..9235db40b6a 100644 --- a/src/mame/drivers/jpmsys5.cpp +++ b/src/mame/drivers/jpmsys5.cpp @@ -617,10 +617,10 @@ MACHINE_CONFIG_START(jpmsys5v_state::jpmsys5v) MCFG_SCREEN_RAW_PARAMS(XTAL(40'000'000) / 4, 676, 20*4, 147*4, 256, 0, 254) MCFG_SCREEN_UPDATE_DRIVER(jpmsys5v_state, screen_update_jpmsys5v) - MCFG_DEVICE_ADD("tms34061", TMS34061, 0) - MCFG_TMS34061_ROWSHIFT(8) /* VRAM address is (row << rowshift) | col */ - MCFG_TMS34061_VRAM_SIZE(0x40000) /* size of video RAM */ - MCFG_TMS34061_INTERRUPT_CB(WRITELINE(*this, jpmsys5v_state, generate_tms34061_interrupt)) /* interrupt gen callback */ + TMS34061(config, m_tms34061, 0); + m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */ + m_tms34061->set_vram_size(0x40000); + m_tms34061->int_callback().set(FUNC(jpmsys5v_state::generate_tms34061_interrupt)); MCFG_PALETTE_ADD("palette", 16) diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp index 9a749b09e5b..7c0ace88055 100644 --- a/src/mame/drivers/magictg.cpp +++ b/src/mame/drivers/magictg.cpp @@ -936,17 +936,17 @@ MACHINE_CONFIG_START(magictg_state::magictg) #endif MCFG_PCI_BUS_LEGACY_DEVICE(9, DEVICE_SELF, magictg_state, zr36120_pci_r, zr36120_pci_w) // TODO: ZR36120 device - MCFG_DEVICE_ADD("voodoo_0", VOODOO_1, STD_VOODOO_1_CLOCK) - MCFG_VOODOO_FBMEM(2) - MCFG_VOODOO_TMUMEM(4,0) - MCFG_VOODOO_SCREEN_TAG("screen") - MCFG_VOODOO_CPU_TAG("mips") - - MCFG_DEVICE_ADD("voodoo_1", VOODOO_1, STD_VOODOO_1_CLOCK) - MCFG_VOODOO_FBMEM(2) - MCFG_VOODOO_TMUMEM(4,0) - MCFG_VOODOO_SCREEN_TAG("screen") - MCFG_VOODOO_CPU_TAG("mips") + VOODOO_1(config, m_voodoo[0], STD_VOODOO_1_CLOCK); + m_voodoo[0]->set_fbmem(2); + m_voodoo[0]->set_tmumem(4,0); + m_voodoo[0]->set_screen_tag("screen"); + m_voodoo[0]->set_cpu_tag(m_mips); + + VOODOO_1(config, m_voodoo[1], STD_VOODOO_1_CLOCK); + m_voodoo[1]->set_fbmem(2); + m_voodoo[1]->set_tmumem(4,0); + m_voodoo[1]->set_screen_tag("screen"); + m_voodoo[1]->set_cpu_tag(m_mips); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp index 38067a4ca1f..53e5e445c26 100644 --- a/src/mame/drivers/mappy.cpp +++ b/src/mame/drivers/mappy.cpp @@ -1513,7 +1513,7 @@ void mappy_state::mappy_common(machine_config &config) /* video hardware */ GFXDECODE(config, m_gfxdecode, m_palette, gfx_mappy); - PALETTE(config, m_palette, FUNC(mappy_state::mappy_palette), 64*4+16*4, 32); + PALETTE(config, m_palette, FUNC(mappy_state::mappy_palette), 64*4+16*16, 32); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp index 5ccac260c7e..2e9d272a2c8 100644 --- a/src/mame/drivers/mazerbla.cpp +++ b/src/mame/drivers/mazerbla.cpp @@ -996,9 +996,9 @@ MACHINE_CONFIG_START(mazerbla_state::mazerbla) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold) /* synchronization forced on the fly */ - MCFG_DEVICE_ADD("vcu", MB_VCU, SOUND_CLOCK/4) - MCFG_MB_VCU_CPU("sub2") - MCFG_MB_VCU_PALETTE("palette") + MB_VCU(config, m_vcu, SOUND_CLOCK/4); + m_vcu->set_cpu_tag("sub2"); + m_vcu->set_palette_tag("palette"); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -1038,9 +1038,9 @@ MACHINE_CONFIG_START(mazerbla_state::greatgun) */ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold) - MCFG_DEVICE_ADD("vcu", MB_VCU, SOUND_CLOCK/4) - MCFG_MB_VCU_CPU("sub2") - MCFG_MB_VCU_PALETTE("palette") + MB_VCU(config, m_vcu, SOUND_CLOCK/4); + m_vcu->set_cpu_tag("sub2"); + m_vcu->set_palette_tag("palette"); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/mips.cpp b/src/mame/drivers/mips.cpp index 545cc6aec3c..1c97b1cb165 100644 --- a/src/mame/drivers/mips.cpp +++ b/src/mame/drivers/mips.cpp @@ -410,7 +410,7 @@ void rx2030_state::rx2030_map(address_map &map) case 19: // keyboard LOGMASKED(LOG_IOCB, "iocb %s command 0x%04x data 0x%02x (%s)\n", iop_commands[iocb], iop_cmd, - m_ram->read(0x1000 + iocb_cmdparam + 6), + m_ram->read(0x1000 + iocb_cmdparam + 7), machine().describe_context()); break; @@ -548,33 +548,24 @@ void rx2030_state::rx2030(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", "35hd", FLOPPY_35_HD, true, mips_floppy_formats).enable_sound(false); // scsi bus and devices - NSCSI_BUS(config, m_scsibus, 0); - - nscsi_connector &harddisk(NSCSI_CONNECTOR(config, "scsi:0", 0)); - mips_scsi_devices(harddisk); - harddisk.set_default_option("harddisk"); - - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:1", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:2", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:3", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:4", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:5", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:6", 0)); - - // scsi host adapter - nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7", 0)); - adapter.option_add_internal("aic6250", AIC6250); - adapter.set_default_option("aic6250"); - adapter.set_fixed(true); - adapter.set_option_machine_config("aic6250", [this](device_t *device) - { - aic6250_device &adapter = downcast<aic6250_device &>(*device); - - adapter.set_clock(10_MHz_XTAL); // clock assumed + NSCSI_BUS(config, m_scsibus); + NSCSI_CONNECTOR(config, "scsi:0", mips_scsi_devices, "harddisk"); + NSCSI_CONNECTOR(config, "scsi:1", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", mips_scsi_devices, nullptr); + + // scsi host adapter (clock assumed) + NSCSI_CONNECTOR(config, "scsi:7").option_set("aic6250", AIC6250).clock(10_MHz_XTAL).machine_config( + [this](device_t *device) + { + aic6250_device &adapter = downcast<aic6250_device &>(*device); - adapter.int_cb().set_inputline(m_iop, INPUT_LINE_IRQ7).invert(); - adapter.breq_cb().set(m_iop, FUNC(v50_device::dreq_w<1>)); - }); + adapter.int_cb().set_inputline(m_iop, INPUT_LINE_IRQ7).invert(); + adapter.breq_cb().set(m_iop, FUNC(v50_device::dreq_w<1>)); + }); // ethernet AM7990(config, m_net); @@ -757,8 +748,7 @@ void rx3230_state::rx3230(machine_config &config) { R3000A(config, m_cpu, 50_MHz_XTAL / 2, 32768, 32768); m_cpu->set_addrmap(AS_PROGRAM, &rx3230_state::rx3230_map); - // TODO: FPU disabled until properly emulated - //m_cpu->set_fpurev(mips1_device_base::MIPS_R3010A); + m_cpu->set_fpurev(mips1_device_base::MIPS_R3010A); m_cpu->in_brcond<0>().set([]() { return 1; }); // writeback complete // 32 SIMM slots, 8-128MB memory, banks of 8 1MB or 4MB SIMMs @@ -773,37 +763,29 @@ void rx3230_state::rx3230(machine_config &config) m_rambo->parity_out().set_inputline(m_cpu, INPUT_LINE_IRQ5); //m_rambo->buzzer_out().set(m_buzzer, FUNC(speaker_sound_device::level_w)); m_rambo->set_ram(m_ram); - m_rambo->dma_r<0>().set("scsi:7:ncr53c94", FUNC(ncr53c94_device::dma_r)); - m_rambo->dma_w<0>().set("scsi:7:ncr53c94", FUNC(ncr53c94_device::dma_w)); + m_rambo->dma_r<0>().set("scsi:7:ncr53c94", FUNC(ncr53c94_device::dma16_r)); + m_rambo->dma_w<0>().set("scsi:7:ncr53c94", FUNC(ncr53c94_device::dma16_w)); // scsi bus and devices - NSCSI_BUS(config, m_scsibus, 0); - - nscsi_connector &harddisk(NSCSI_CONNECTOR(config, "scsi:0", 0)); - mips_scsi_devices(harddisk); - harddisk.set_default_option("harddisk"); - - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:1", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:2", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:3", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:4", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:5", 0)); - mips_scsi_devices(NSCSI_CONNECTOR(config, "scsi:6", 0)); + NSCSI_BUS(config, m_scsibus); + NSCSI_CONNECTOR(config, "scsi:0", mips_scsi_devices, "harddisk"); + NSCSI_CONNECTOR(config, "scsi:1", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", mips_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", mips_scsi_devices, nullptr); // scsi host adapter - nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7", 0)); - adapter.option_add_internal("ncr53c94", NCR53C94); - adapter.set_default_option("ncr53c94"); - adapter.set_fixed(true); - adapter.set_option_machine_config("ncr53c94", [this](device_t *device) - { - ncr53c94_device &adapter = downcast<ncr53c94_device &>(*device); - - adapter.set_clock(24_MHz_XTAL); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c94", NCR53C94).clock(24_MHz_XTAL).machine_config( + [this](device_t *device) + { + ncr53c94_device &adapter = downcast<ncr53c94_device &>(*device); - adapter.irq_handler_cb().set(*this, FUNC(rx3230_state::irq_w<INT_SCSI>)).invert(); - adapter.drq_handler_cb().set(m_rambo, FUNC(mips_rambo_device::drq_w<0>)); - }); + adapter.set_busmd(ncr53c94_device::busmd_t::BUSMD_1); + adapter.irq_handler_cb().set(*this, FUNC(rx3230_state::irq_w<INT_SCSI>)).invert(); + adapter.drq_handler_cb().set(m_rambo, FUNC(mips_rambo_device::drq_w<0>)); + }); // ethernet AM7990(config, m_net); diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp index 319740f4b94..68045925368 100644 --- a/src/mame/drivers/nforcepc.cpp +++ b/src/mame/drivers/nforcepc.cpp @@ -4,7 +4,7 @@ /* Computer based on a motherboard utilizing the nForce chipset (also known as CRUSH11 or CRUSH12) - Start with the following compoents: + Start with the following components: - An Asus A7N266-C motherboard using: - nForce 415-D northbridge - nForce MCP-D southbridge (with integrated APU) @@ -259,9 +259,9 @@ void nforcepc_state::nforcepc(machine_config &config) ROM_START(nforcepc) ROM_REGION32_LE(0x40000, ":pci:00.0", 0) /* PC bios */ ROM_SYSTEM_BIOS(0, "a7n266c", "a7n266c") // Motherboard dump. Chip: SST49LF020 Package: PLCC32 Label had 3 lines of text: "A7NC3" "1001.D" "GSQ98" - ROMX_LOAD("a7n266c.bin", 0, 0x40000, CRC(F4F0E4FC) SHA1(87f11545db178914623e41fb51e328da479a2efc), ROM_BIOS(0)) - ROM_SYSTEM_BIOS(1, "a7n266c1001d", "a7n266c1001d") // bios version 1001.D dwonloaded from Asus website - ROMX_LOAD("a7nc101d.awd", 0, 0x40000, CRC(EAD1147C) SHA1(27227df98e0c5fb9fecdb4bb6ef72df19766c330), ROM_BIOS(1)) + ROMX_LOAD("a7n266c.bin", 0, 0x40000, CRC(f4f0e4fc) SHA1(87f11545db178914623e41fb51e328da479a2efc), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "a7n266c1001d", "a7n266c1001d") // bios version 1001.D downloaded from Asus website + ROMX_LOAD("a7nc101d.awd", 0, 0x40000, CRC(ead1147c) SHA1(27227df98e0c5fb9fecdb4bb6ef72df19766c330), ROM_BIOS(1)) ROM_END static INPUT_PORTS_START(nforcepc) diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp index 6e1440b4a66..1c37a4757e0 100644 --- a/src/mame/drivers/nightgal.cpp +++ b/src/mame/drivers/nightgal.cpp @@ -801,7 +801,7 @@ MACHINE_CONFIG_START(nightgal_state::royalqn) MCFG_QUANTUM_PERFECT_CPU("maincpu") - MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4) + JANGOU_BLITTER(config, m_blitter, MASTER_CLOCK/4); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/nokia_3310.cpp b/src/mame/drivers/nokia_3310.cpp index 86cbbd2d2b8..2d0cb615762 100644 --- a/src/mame/drivers/nokia_3310.cpp +++ b/src/mame/drivers/nokia_3310.cpp @@ -262,7 +262,7 @@ void noki3310_state::machine_reset() m_timer_fiq8->adjust(attotime::from_hz(1000), 0, attotime::from_hz(1000)); // simulate power-on input - if (machine().system().name && (machine().system().name[4] == '8' || machine().system().name[4] == '5')) + if (machine().system().name[4] == '8' || machine().system().name[4] == '5') m_power_on = ~0x10; else m_power_on = ~0x02; diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp index a9cbe0c208c..f048b4cdc93 100644 --- a/src/mame/drivers/omegrace.cpp +++ b/src/mame/drivers/omegrace.cpp @@ -539,7 +539,7 @@ MACHINE_CONFIG_START(omegrace_state::omegrace) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(40) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/rad_eu3a14.cpp b/src/mame/drivers/rad_eu3a14.cpp index cece1f5f525..badd83c39f4 100644 --- a/src/mame/drivers/rad_eu3a14.cpp +++ b/src/mame/drivers/rad_eu3a14.cpp @@ -268,12 +268,21 @@ void radica_eu3a14_state::draw_background(screen_device &screen, bitmap_ind16 &b int xscroll = m_scrollregs[0] | (m_scrollregs[1] << 8); int yscroll = m_scrollregs[2] | (m_scrollregs[3] << 8); - int size = 16; - // or 0x10? + int size; + // or 0x80? if (m_tilecfg[0] & 0x10) { size = 8; + m_pagewidth = 32; + m_pageheight = 28; } + else + { + size = 16; + m_pagewidth = 16; + m_pageheight = 14; + } + // normal draw_page(screen, bitmap, cliprect, 0, 0 - xscroll, 0 - yscroll, size); @@ -965,8 +974,6 @@ void radica_eu3a14_state::init_rad_gtg() // must be registers to control this m_tilerambase = 0x0a00 - 0x200; m_spriterambase = 0x0220 - 0x200; - m_pagewidth = 16; - m_pageheight = 14; } void radica_eu3a14_state::init_rad_foot() @@ -974,9 +981,6 @@ void radica_eu3a14_state::init_rad_foot() // must be registers to control this m_tilerambase = 0x0200 - 0x200; m_spriterambase = 0x2800 - 0x200; - // this is ok for the game, but secret test mode also uses a weird 8x8 mode with different tile addressing - m_pagewidth = 16; - m_pageheight = 14; } @@ -985,9 +989,6 @@ void radica_eu3a14_state::init_rad_hnt3() // must be registers to control this m_tilerambase = 0x0200 - 0x200; m_spriterambase = 0x1800 - 0x200; - // uses an 8x8 mode, could depend on that, but other 8x8 use case above is different - m_pagewidth = 32; - m_pageheight = 28; } diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp index 183f9d1a550..84101f08d1f 100644 --- a/src/mame/drivers/savquest.cpp +++ b/src/mame/drivers/savquest.cpp @@ -842,12 +842,12 @@ MACHINE_CONFIG_START(savquest_state::savquest) /* video hardware */ pcvideo_s3_vga(config); - MCFG_DEVICE_ADD("voodoo", VOODOO_2, STD_VOODOO_2_CLOCK) - MCFG_VOODOO_FBMEM(4) - MCFG_VOODOO_TMUMEM(4,4) /* this is the 12Mb card */ - MCFG_VOODOO_SCREEN_TAG("screen") - MCFG_VOODOO_CPU_TAG("maincpu") - MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, savquest_state,vblank_assert)) + VOODOO_2(config, m_voodoo, STD_VOODOO_2_CLOCK); + m_voodoo->set_fbmem(4); + m_voodoo->set_tmumem(4, 4); /* this is the 12Mb card */ + m_voodoo->set_screen_tag("screen"); + m_voodoo->set_cpu_tag(m_maincpu); + m_voodoo->vblank_callback().set(FUNC(savquest_state::vblank_assert)); MACHINE_CONFIG_END ROM_START( savquest ) diff --git a/src/mame/drivers/sfcbox.cpp b/src/mame/drivers/sfcbox.cpp index da8365da7c6..a40cede34f1 100644 --- a/src/mame/drivers/sfcbox.cpp +++ b/src/mame/drivers/sfcbox.cpp @@ -473,7 +473,7 @@ MACHINE_CONFIG_START(sfcbox_state::sfcbox) MCFG_DEVICE_PROGRAM_MAP(sfcbox_map) MCFG_DEVICE_IO_MAP(sfcbox_io) - MCFG_MB90082_ADD("mb90082",XTAL(12'000'000) / 2) /* TODO: correct clock */ + MB90082(config, m_mb90082, XTAL(12'000'000) / 2); /* TODO: correct clock */ S3520CF(config, m_s3520cf); /* RTC */ /* sound hardware */ diff --git a/src/mame/drivers/srmp6.cpp b/src/mame/drivers/srmp6.cpp index dac779fcbc1..2643a5ee1b6 100644 --- a/src/mame/drivers/srmp6.cpp +++ b/src/mame/drivers/srmp6.cpp @@ -26,6 +26,8 @@ TODO: - fix DMA operations - fix video emulation +Video reference : https://youtu.be/wNm3tu1iGvM + Are there other games on this 'System S12' hardware ??? ---------------- dump infos ---------------- diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp index 04995349634..54a5954f21e 100644 --- a/src/mame/drivers/starwars.cpp +++ b/src/mame/drivers/starwars.cpp @@ -335,7 +335,7 @@ MACHINE_CONFIG_START(starwars_state::starwars) outlatch.q_out_cb<7>().set(FUNC(starwars_state::recall_w)); // NVRAM array recall /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(CLOCK_3KHZ / 12 / 6) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/tek405x.cpp b/src/mame/drivers/tek405x.cpp index 162aba98841..3500adf4d2f 100644 --- a/src/mame/drivers/tek405x.cpp +++ b/src/mame/drivers/tek405x.cpp @@ -1006,7 +1006,7 @@ MACHINE_CONFIG_START(tek4051_state::tek4051) MCFG_DEVICE_PROGRAM_MAP(tek4051_mem) // video hardware - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green()) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate @@ -1111,7 +1111,7 @@ MACHINE_CONFIG_START(tek4052_state::tek4052) MCFG_DEVICE_PROGRAM_MAP(tek4052_mem) // video hardware - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, VECTOR, rgb_t::green()) MCFG_SCREEN_REFRESH_RATE(50) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate diff --git a/src/mame/drivers/testpat.cpp b/src/mame/drivers/testpat.cpp new file mode 100644 index 00000000000..421c12ee58c --- /dev/null +++ b/src/mame/drivers/testpat.cpp @@ -0,0 +1,143 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev +/*************************************************************************** + +TV test pattern generators + +Radio, 1983, N5 + http://radioway.ru/1983/05/generator_telesignalov.html + http://radioway.ru/1984/04/generator_telesignalov.html + +Radio, 1985, N6 + http://radioway.ru/1985/06/generator_ispytatelnyh_signalov.html + +***************************************************************************/ + +#include "emu.h" + +#include "machine/netlist.h" + +#include "video/fixfreq.h" + +#include "netlist/devices/net_lib.h" + +#include "machine/nl_tp1983.h" +#include "machine/nl_tp1985.h" + +#include "screen.h" + +#include <cmath> + + +#define MASTER_CLOCK (4000000) +#define V_TOTAL_PONG 315 +#define H_TOTAL_PONG 256 // tbc + +class tp1983_state : public driver_device +{ +public: + tp1983_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_video(*this, "fixfreq") + { + } + + // devices + required_device<netlist_mame_device> m_maincpu; + required_device<fixedfreq_device> m_video; + + void tp1983(machine_config &config); + +protected: + // driver_device overrides + virtual void machine_start() override { }; + virtual void machine_reset() override { }; + + virtual void video_start() override { }; + +private: +}; + + +class tp1985_state : public driver_device +{ +public: + tp1985_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_video(*this, "fixfreq") + { + } + + // devices + required_device<netlist_mame_device> m_maincpu; + required_device<fixedfreq_device> m_video; + + void tp1985(machine_config &config); + +protected: + // driver_device overrides + virtual void machine_start() override { }; + virtual void machine_reset() override { }; + + virtual void video_start() override { }; + +private: + NETDEV_ANALOG_CALLBACK_MEMBER(video_out_cb); +}; + +NETDEV_ANALOG_CALLBACK_MEMBER(tp1985_state::video_out_cb) +{ + m_video->update_composite_monochrome(4.0 - data, time); +} + + +static INPUT_PORTS_START(tp1983) +INPUT_PORTS_END + +static INPUT_PORTS_START(tp1985) +INPUT_PORTS_END + + +MACHINE_CONFIG_START(tp1983_state::tp1983) + MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK) + MCFG_NETLIST_SETUP(tp1983) + + MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_composite_monochrome, "fixfreq") + + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL_PONG-64,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL_PONG-19,V_TOTAL_PONG-16,V_TOTAL_PONG-12,V_TOTAL_PONG) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(1) + MCFG_FIXFREQ_GAIN(0.36) +MACHINE_CONFIG_END + +MACHINE_CONFIG_START(tp1985_state::tp1985) + MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK) + MCFG_NETLIST_SETUP(tp1985) + + MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", tp1985_state, video_out_cb, "") + + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL_PONG-64,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL_PONG-19,V_TOTAL_PONG-16,V_TOTAL_PONG-12,V_TOTAL_PONG) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(1) + MCFG_FIXFREQ_GAIN(0.36) +MACHINE_CONFIG_END + + +ROM_START( tp1983 ) /* dummy to satisfy game entry*/ + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) +ROM_END + +ROM_START( tp1985 ) /* dummy to satisfy game entry*/ + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) +ROM_END + +GAME( 1983, tp1983, 0, tp1983, tp1983, tp1983_state, empty_init, ROT0, "Radio", "TV Test Pattern Generator 1983", MACHINE_NO_SOUND_HW) +GAME( 1985, tp1985, 0, tp1985, tp1985, tp1985_state, empty_init, ROT0, "Radio", "TV Test Pattern Generator 1985", MACHINE_NO_SOUND_HW) diff --git a/src/mame/drivers/tickee.cpp b/src/mame/drivers/tickee.cpp index 3329389d6a3..267bb2bad2c 100644 --- a/src/mame/drivers/tickee.cpp +++ b/src/mame/drivers/tickee.cpp @@ -775,7 +775,7 @@ MACHINE_CONFIG_START(tickee_state::tickee) MCFG_TICKET_DISPENSER_ADD("ticket2", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH) /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_VIDEO_START_OVERRIDE(tickee_state,tickee) @@ -825,7 +825,7 @@ MACHINE_CONFIG_START(tickee_state::rapidfir) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_VIDEO_START_OVERRIDE(tickee_state,tickee) @@ -858,7 +858,7 @@ MACHINE_CONFIG_START(tickee_state::mouseatk) MCFG_TICKET_DISPENSER_ADD("ticket2", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH) /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200) diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp index c419a32565b..5ff67755fe9 100644 --- a/src/mame/drivers/tomcat.cpp +++ b/src/mame/drivers/tomcat.cpp @@ -360,7 +360,7 @@ MACHINE_CONFIG_START(tomcat_state::tomcat) MCFG_DEVICE_ADD("m48t02", M48T02, 0) - MCFG_VECTOR_ADD("vector") + VECTOR(config, "vector", 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(40) //MCFG_SCREEN_REFRESH_RATE((double)XTAL(12'000'000) / 16 / 16 / 16 / 12 / 5 ) diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp index 4d43ed814ce..c3b9d09b7f9 100644 --- a/src/mame/drivers/truco.cpp +++ b/src/mame/drivers/truco.cpp @@ -424,7 +424,7 @@ MACHINE_CONFIG_START(truco_state::truco) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", truco_state, interrupt) - WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_seconds(1.6)); /* 1.6 seconds */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); /* 1.6 seconds */ pia6821_device &pia(PIA6821(config, "pia0", 0)); pia.readpa_handler().set_ioport("P1"); diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp index f7845584db5..f64ad6f90fa 100644 --- a/src/mame/drivers/univac.cpp +++ b/src/mame/drivers/univac.cpp @@ -94,7 +94,10 @@ After entering the characters, press FCTN and CTRL PAGE keys again to save the s ****************************************************************************/ #include "emu.h" +#include "bus/rs232/rs232.h" +#include "bus/uts_kbd/uts_kbd.h" #include "cpu/z80/z80.h" +#include "machine/74259.h" #include "machine/z80daisy.h" #include "machine/clock.h" #include "machine/nvram.h" @@ -108,11 +111,13 @@ After entering the characters, press FCTN and CTRL PAGE keys again to save the s #define LOG_GENERAL (1U << 0) #define LOG_PARITY (1U << 1) +#define LOG_NVRAM (1U << 2) -//#define VERBOSE (LOG_GENERAL | LOG_PARITY) +//#define VERBOSE (LOG_GENERAL | LOG_PARITY | LOG_NVRAM) #include "logmacro.h" #define LOGPARITY(...) LOGMASKED(LOG_PARITY, __VA_ARGS__) +#define LOGNVRAM(...) LOGMASKED(LOG_NVRAM, __VA_ARGS__) class univac_state : public driver_device @@ -123,45 +128,72 @@ public: , m_maincpu(*this, "maincpu") , m_nvram(*this, "nvram") , m_ctc(*this, "ctc") - , m_uart(*this, "uart") + , m_keybclk(*this, "keybclk") + , m_sio(*this, "sio") , m_beep(*this, "beeper") + , m_screen(*this, "screen") + , m_keyboard(*this, "keyboard") + , m_printer(*this, "printer") , m_p_chargen(*this, "chargen") , m_p_videoram(*this, "videoram") , m_p_nvram(*this, "nvram") , m_bank_mask(0) - , m_parity_check(0) - , m_parity_poison(0) + , m_parity_poison(false) + , m_display_enable(false) , m_framecnt(0) + , m_nvram_protect(false) + , m_loopback_control(false) + , m_comm_rxd(true) + , m_sio_txda(true) + , m_aux_rxd(true) + , m_sio_txdb(true) + , m_sio_rtsb(true) + , m_aux_dsr(true) + , m_sio_wrdyb(true) { } void uts10(machine_config &config); void uts20(machine_config &config); private: - DECLARE_READ8_MEMBER(ram_r); - DECLARE_READ8_MEMBER(bank_r); - DECLARE_WRITE8_MEMBER(ram_w); - DECLARE_WRITE8_MEMBER(bank_w); - DECLARE_WRITE8_MEMBER(nvram_w); - - DECLARE_WRITE8_MEMBER(port43_w); - DECLARE_WRITE8_MEMBER(portc4_w); - DECLARE_WRITE8_MEMBER(porte6_w); + u8 ram_r(offs_t offset); + u8 bank_r(offs_t offset); + void ram_w(offs_t offset, u8 data); + void bank_w(offs_t offset, u8 data); + void nvram_w(offs_t offset, u8 data); + + DECLARE_WRITE_LINE_MEMBER(nvram_protect_w); + DECLARE_WRITE_LINE_MEMBER(ram_control_w); + DECLARE_WRITE_LINE_MEMBER(parity_poison_w); + DECLARE_WRITE_LINE_MEMBER(display_enable_w); + DECLARE_WRITE_LINE_MEMBER(sio_loopback_w); + DECLARE_WRITE_LINE_MEMBER(sio_txda_w); + DECLARE_WRITE_LINE_MEMBER(sio_txdb_w); + DECLARE_WRITE_LINE_MEMBER(aux_rxd_w); + DECLARE_WRITE_LINE_MEMBER(sio_rtsb_w); + DECLARE_WRITE_LINE_MEMBER(sio_wrdyb_w); + DECLARE_WRITE_LINE_MEMBER(aux_dsr_w); + DECLARE_WRITE_LINE_MEMBER(loopback_rxcb_w); + DECLARE_WRITE_LINE_MEMBER(porte6_w); u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void mem_map(address_map &map); + void uts10_io_map(address_map &map); void uts10_map(address_map &map); virtual void machine_start() override; - virtual void machine_reset() override; - virtual void device_post_load() override; required_device<z80_device> m_maincpu; required_device<nvram_device> m_nvram; required_device<z80ctc_device> m_ctc; - required_device<z80sio_device> m_uart; + optional_device<clock_device> m_keybclk; + required_device<z80sio_device> m_sio; required_device<beep_device> m_beep; + required_device<screen_device> m_screen; + + required_device<uts_keyboard_port_device> m_keyboard; + required_device<rs232_port_device> m_printer; required_region_ptr<u8> m_p_chargen; required_shared_ptr<u8> m_p_videoram; @@ -169,14 +201,24 @@ private: std::unique_ptr<u8 []> m_p_parity; u16 m_bank_mask; - u8 m_parity_check; - u8 m_parity_poison; + bool m_parity_poison; + bool m_display_enable; u8 m_framecnt; + bool m_nvram_protect; + + bool m_loopback_control; + bool m_comm_rxd; + bool m_sio_txda; + bool m_aux_rxd; + bool m_sio_txdb; + bool m_sio_rtsb; + bool m_aux_dsr; + bool m_sio_wrdyb; }; -READ8_MEMBER( univac_state::ram_r ) +u8 univac_state::ram_r(offs_t offset) { if (BIT(m_p_parity[offset >> 3], offset & 0x07) && !machine().side_effects_disabled()) { @@ -186,12 +228,12 @@ READ8_MEMBER( univac_state::ram_r ) return m_p_videoram[offset]; } -READ8_MEMBER( univac_state::bank_r ) +u8 univac_state::bank_r(offs_t offset) { - return space.read_byte((0xc000 | offset) ^ m_bank_mask); + return ram_r(offset ^ m_bank_mask); } -WRITE8_MEMBER( univac_state::ram_w ) +void univac_state::ram_w(offs_t offset, u8 data) { if (m_parity_poison) { @@ -205,48 +247,140 @@ WRITE8_MEMBER( univac_state::ram_w ) m_p_videoram[offset] = data; } -WRITE8_MEMBER( univac_state::bank_w ) +void univac_state::bank_w(offs_t offset, u8 data) { - space.write_byte((0xc000 | offset) ^ m_bank_mask, data); + ram_w(offset ^ m_bank_mask, data); } -WRITE8_MEMBER( univac_state::nvram_w ) +void univac_state::nvram_w(offs_t offset, u8 data) { // NVRAM is four bits wide, accessed in the low nybble // It's simplest to hack it when writing to make the upper bits read back high on the open bus - m_p_nvram[offset] = data | 0xf0; + // (But is it all open bus? Bit 4 is specifically tested in a few places...) + if (m_nvram_protect) + LOGNVRAM("%s: NVRAM write suppressed (address %02X, data %02X)\n", machine().describe_context(), offset + 0x80, data); + else + m_p_nvram[offset] = data | 0xf0; +} + +WRITE_LINE_MEMBER(univac_state::nvram_protect_w) +{ + // There seems to be some timing-based write protection related to the CTC's TRG0 input. + // The present implementation is a crude approximation of a wild guess. + if (state) + m_nvram_protect = m_screen->vpos() < 10; +} + +WRITE_LINE_MEMBER(univac_state::ram_control_w) +{ + m_bank_mask = state ? 0x2000 : 0x0000; } -WRITE8_MEMBER( univac_state::port43_w ) +WRITE_LINE_MEMBER(univac_state::parity_poison_w) { - m_bank_mask = BIT(data, 0) ? 0x2000 : 0x0000; + m_parity_poison = state; } -WRITE8_MEMBER( univac_state::portc4_w ) +WRITE_LINE_MEMBER(univac_state::display_enable_w) { - m_parity_poison = BIT(data, 0); - u8 const check = BIT(data, 1); - if (check != m_parity_check) + m_display_enable = state; +} + +WRITE_LINE_MEMBER(univac_state::sio_loopback_w) +{ + if (state) { - m_parity_check = check; - address_space &space(m_maincpu->space(AS_PROGRAM)); - space.unmap_read(0xc000, 0xffff); - if (check) - { - LOGPARITY("parity check enabled\n"); - space.install_read_handler(0xc000, 0xffff, read8_delegate(FUNC(univac_state::ram_r), this)); - } - else - { - LOGPARITY("parity check disabled\n"); - space.install_rom(0xc000, 0xffff, &m_p_videoram[0]); - } + m_sio->rxa_w(m_sio_txda); + m_sio->rxb_w(m_sio_txdb); + m_sio->dcdb_w(m_sio_wrdyb); + m_sio->ctsb_w(m_sio_wrdyb); + m_sio->syncb_w(!m_sio_rtsb); + m_printer->write_txd(1); + m_printer->write_rts(1); + m_keyboard->ready_w(0); + if (m_keybclk.found()) + m_keybclk->set_clock_scale(0.0); + } + else + { + m_sio->rxa_w(m_comm_rxd); + m_sio->rxb_w(m_aux_rxd); + m_sio->dcdb_w(m_aux_dsr); + m_sio->ctsb_w(m_aux_dsr); // likely ignored + m_sio->syncb_w(1); + m_printer->write_txd(m_sio_txdb); + m_printer->write_rts(m_sio_rtsb); + m_keyboard->ready_w(m_sio_wrdyb); + if (m_keybclk.found()) + m_keybclk->set_clock_scale(1.0); } + + m_loopback_control = state; +} + +WRITE_LINE_MEMBER(univac_state::sio_txda_w) +{ + m_sio_txda = state; + if (m_loopback_control) + m_sio->rxa_w(state); +} + +WRITE_LINE_MEMBER(univac_state::sio_txdb_w) +{ + m_sio_txdb = state; + if (m_loopback_control) + m_sio->rxb_w(state); + else + m_printer->write_txd(state); } -WRITE8_MEMBER( univac_state::porte6_w ) +WRITE_LINE_MEMBER(univac_state::aux_rxd_w) { - //m_beep->set_state(BIT(data, 0)); // not sure what belongs here, but it isn't the beeper + m_aux_rxd = state; + if (!m_loopback_control) + m_sio->rxb_w(state); +} + +WRITE_LINE_MEMBER(univac_state::sio_rtsb_w) +{ + m_sio_rtsb = state; + if (m_loopback_control) + m_sio->syncb_w(!state); + else + m_printer->write_rts(state); +} + +WRITE_LINE_MEMBER(univac_state::sio_wrdyb_w) +{ + m_sio_wrdyb = state; + if (m_loopback_control) + { + m_sio->dcdb_w(state); + m_sio->ctsb_w(state); + } + else + m_keyboard->ready_w(state); +} + +WRITE_LINE_MEMBER(univac_state::aux_dsr_w) +{ + m_aux_dsr = state; + if (!m_loopback_control) + { + m_sio->dcdb_w(state); + m_sio->ctsb_w(state); + } +} + +WRITE_LINE_MEMBER(univac_state::loopback_rxcb_w) +{ + if (m_loopback_control) + m_sio->rxcb_w(state); +} + +WRITE_LINE_MEMBER(univac_state::porte6_w) +{ + //m_beep->set_state(state); // not sure what belongs here, but it isn't the beeper } @@ -255,7 +389,7 @@ void univac_state::mem_map(address_map &map) map.unmap_value_high(); map(0x0000, 0x4fff).rom().region("roms", 0); map(0x8000, 0xbfff).rw(FUNC(univac_state::bank_r), FUNC(univac_state::bank_w)); - map(0xc000, 0xffff).ram().w(FUNC(univac_state::ram_w)).share("videoram"); + map(0xc000, 0xffff).rw(FUNC(univac_state::ram_r), FUNC(univac_state::ram_w)).share("videoram"); } void univac_state::uts10_map(address_map &map) @@ -263,19 +397,26 @@ void univac_state::uts10_map(address_map &map) map.unmap_value_high(); map(0x0000, 0x4fff).rom().region("roms", 0); map(0x8000, 0x9fff).mirror(0x2000).rw(FUNC(univac_state::bank_r), FUNC(univac_state::bank_w)); - map(0xc000, 0xffff).ram().w(FUNC(univac_state::ram_w)).share("videoram"); + map(0xc000, 0xffff).rw(FUNC(univac_state::ram_r), FUNC(univac_state::ram_w)).share("videoram"); } -void univac_state::io_map(address_map &map) +void univac_state::uts10_io_map(address_map &map) { map.global_mask(0xff); map.unmap_value_high(); - map(0x00, 0x03).rw(m_uart, FUNC(z80sio_device::cd_ba_r), FUNC(z80sio_device::cd_ba_w)); + map(0x00, 0x03).rw(m_sio, FUNC(z80sio_device::cd_ba_r), FUNC(z80sio_device::cd_ba_w)); map(0x20, 0x23).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); - map(0x43, 0x43).w(FUNC(univac_state::port43_w)); + map(0x60, 0x60).nopw(); // values written here may or may not matter map(0x80, 0xbf).ram().w(FUNC(univac_state::nvram_w)).share("nvram"); - map(0xc4, 0xc4).w(FUNC(univac_state::portc4_w)); - map(0xe6, 0xe6).w(FUNC(univac_state::porte6_w)); + map(0xc0, 0xc7).w("latch_c0", FUNC(ls259_device::write_d0)); + map(0xe0, 0xe7).w("latch_e0", FUNC(ls259_device::write_d0)); +} + +void univac_state::io_map(address_map &map) +{ + uts10_io_map(map); + map(0x40, 0x40).nopr(); // read only once, during self-test; result is discarded + map(0x40, 0x47).w("latch_40", FUNC(ls259_device::write_d0)); } /* Input ports */ @@ -293,33 +434,28 @@ void univac_state::machine_start() save_pointer(NAME(m_p_parity), parity_bytes); save_item(NAME(m_bank_mask)); - save_item(NAME(m_parity_check)); save_item(NAME(m_parity_poison)); + save_item(NAME(m_display_enable)); save_item(NAME(m_framecnt)); + save_item(NAME(m_loopback_control)); + save_item(NAME(m_comm_rxd)); + save_item(NAME(m_sio_txda)); + save_item(NAME(m_aux_rxd)); + save_item(NAME(m_sio_txdb)); + save_item(NAME(m_sio_rtsb)); + save_item(NAME(m_aux_dsr)); + save_item(NAME(m_sio_wrdyb)); } -void univac_state::machine_reset() -{ - m_beep->set_state(0); - - m_bank_mask = 0x0000; - m_parity_check = 0; - m_parity_poison = 0; -} - -void univac_state::device_post_load() +uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - if (m_parity_check) + if (!m_display_enable) { - address_space &space(m_maincpu->space(AS_PROGRAM)); - space.unmap_read(0xc000, 0xffff); - space.install_read_handler(0xc000, 0xffff, read8_delegate(FUNC(univac_state::ram_r), this)); + bitmap.fill(0, cliprect); + return 0; } -} -uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - uint8_t y,ra,chr; + u8 y,ra,chr; uint16_t sy=0,x,ma=0,gfx; //m_bank_mask; (it isn't port43 that selects the screen) m_framecnt++; @@ -386,7 +522,7 @@ GFXDECODE_END static const z80_daisy_config daisy_chain[] = { - { "uart" }, + { "sio" }, { "ctc" }, { nullptr } }; @@ -399,6 +535,19 @@ MACHINE_CONFIG_START(univac_state::uts20) m_maincpu->set_addrmap(AS_IO, &univac_state::io_map); m_maincpu->set_daisy_config(daisy_chain); + ls259_device &latch_40(LS259(config, "latch_40")); // actual type and location unknown + latch_40.q_out_cb<3>().set(FUNC(univac_state::ram_control_w)); + + ls259_device &latch_c0(LS259(config, "latch_c0")); // actual type and location unknown + latch_c0.q_out_cb<3>().set(FUNC(univac_state::display_enable_w)); + latch_c0.q_out_cb<4>().set(FUNC(univac_state::parity_poison_w)); + latch_c0.q_out_cb<6>().set(FUNC(univac_state::sio_loopback_w)); + + ls259_device &latch_e0(LS259(config, "latch_e0")); // actual type and location unknown + //latch_e0.q_out_cb<2>().set(FUNC(univac_state::reverse_video_w)); + latch_e0.q_out_cb<5>().set("crtc", FUNC(dp835x_device::refresh_control)).invert(); + latch_e0.q_out_cb<6>().set(FUNC(univac_state::porte6_w)); + /* video hardware */ MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green()) MCFG_SCREEN_UPDATE_DRIVER(univac_state, screen_update) @@ -417,27 +566,46 @@ MACHINE_CONFIG_START(univac_state::uts20) m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->set_clk<1>(18.432_MHz_XTAL / 12); m_ctc->set_clk<2>(18.432_MHz_XTAL / 12); - m_ctc->zc_callback<1>().set(m_uart, FUNC(z80sio_device::txca_w)); - m_ctc->zc_callback<1>().append(m_uart, FUNC(z80sio_device::rxca_w)); - m_ctc->zc_callback<2>().set(m_uart, FUNC(z80sio_device::rxtxcb_w)); - - Z80SIO(config, m_uart, 18.432_MHz_XTAL / 6); - m_uart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - m_uart->out_txda_callback().set(m_uart, FUNC(z80sio_device::rxa_w)); // FIXME: hacked in permanent loopback to pass test - m_uart->out_txdb_callback().set(m_uart, FUNC(z80sio_device::rxb_w)); // FIXME: hacked in permanent loopback to pass test - m_uart->out_wrdyb_callback().set(m_uart, FUNC(z80sio_device::dcdb_w)); // FIXME: hacked in permanent loopback to pass test - m_uart->out_wrdyb_callback().append(m_uart, FUNC(z80sio_device::ctsb_w)); // FIXME: hacked in permanent loopback to pass test + m_ctc->zc_callback<0>().set(FUNC(univac_state::nvram_protect_w)); + m_ctc->zc_callback<1>().set(m_sio, FUNC(z80sio_device::txca_w)); + m_ctc->zc_callback<1>().append(m_sio, FUNC(z80sio_device::rxca_w)); + m_ctc->zc_callback<2>().set(m_sio, FUNC(z80sio_device::txcb_w)); + m_ctc->zc_callback<2>().append(FUNC(univac_state::loopback_rxcb_w)); + + CLOCK(config, m_keybclk, 18.432_MHz_XTAL / 60); + m_keybclk->signal_handler().set(m_sio, FUNC(z80sio_device::rxcb_w)); + + Z80SIO(config, m_sio, 18.432_MHz_XTAL / 6); + m_sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + m_sio->out_txda_callback().set(FUNC(univac_state::sio_txda_w)); + m_sio->out_txdb_callback().set(FUNC(univac_state::sio_txdb_w)); + m_sio->out_rtsb_callback().set(FUNC(univac_state::sio_rtsb_w)); + m_sio->out_wrdyb_callback().set(FUNC(univac_state::sio_wrdyb_w)); /* Sound */ SPEAKER(config, "mono").front_center(); MCFG_DEVICE_ADD("beeper", BEEP, 950) // guess MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05) + + UTS_KEYBOARD(config, m_keyboard, uts_keyboards, "extw"); + m_keyboard->rxd_callback().set(FUNC(univac_state::aux_rxd_w)); + + RS232_PORT(config, m_printer, default_rs232_devices, nullptr); + m_printer->dcd_handler().set(FUNC(univac_state::aux_dsr_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(univac_state::uts10) uts20(config); MCFG_DEVICE_MODIFY( "maincpu" ) MCFG_DEVICE_PROGRAM_MAP(uts10_map) + MCFG_DEVICE_IO_MAP(uts10_io_map) + + config.device_remove("keybclk"); + m_ctc->zc_callback<2>().set(m_sio, FUNC(z80sio_device::rxtxcb_w)); + + config.device_remove("latch_40"); + subdevice<ls259_device>("latch_c0")->q_out_cb<6>().set_nop(); + subdevice<ls259_device>("latch_e0")->q_out_cb<7>().set(FUNC(univac_state::sio_loopback_w)).invert(); MACHINE_CONFIG_END @@ -453,9 +621,6 @@ ROM_START( uts10 ) ROM_REGION( 0x0800, "chargen", 0 ) // possibly some bitrot, see h,m,n in F4 displayer ROM_LOAD( "chr_5565.bin", 0x0000, 0x0800, CRC(7d99744f) SHA1(2db330ca94a91f7b2ac2ac088ae9255f5bb0a7b4) ) - - ROM_REGION( 0x0800, "keyboard", 0 ) - ROM_LOAD( "2716264.bin", 0x0000, 0x0800, CRC(75e188aa) SHA1(a6486576525f7eec617fd7f9db469063f8c357fc) ) ROM_END ROM_START( uts20 ) @@ -469,14 +634,10 @@ ROM_START( uts20 ) // character generator not dumped, using the one from 'UTS10' for now ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD( "chr_5565.bin", 0x0000, 0x0800, BAD_DUMP CRC(7d99744f) SHA1(2db330ca94a91f7b2ac2ac088ae9255f5bb0a7b4) ) - - // keyboard not dumped, using the one from 'UTS10' for now. The keyboard looks the same, and is most likely identical. - ROM_REGION( 0x0800, "keyboard", 0 ) - ROM_LOAD( "2716264.bin", 0x0000, 0x0800, BAD_DUMP CRC(75e188aa) SHA1(a6486576525f7eec617fd7f9db469063f8c357fc) ) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1979?, uts10, uts20, 0, uts10, uts20, univac_state, empty_init, "Sperry Univac", "UTS-10", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1981, uts10, uts20, 0, uts10, uts20, univac_state, empty_init, "Sperry Univac", "UTS-10", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) COMP( 1980, uts20, 0, 0, uts20, uts20, univac_state, empty_init, "Sperry Univac", "UTS-20", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vcombat.cpp b/src/mame/drivers/vcombat.cpp index 8bea4d4a40e..58bbb483d81 100644 --- a/src/mame/drivers/vcombat.cpp +++ b/src/mame/drivers/vcombat.cpp @@ -587,7 +587,7 @@ MACHINE_CONFIG_START(vcombat_state::vcombat) MCFG_QUANTUM_PERFECT_CPU("maincpu") #endif - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); /* Disabled for now as it can't handle multiple screens */ // MC6845(config, m_crtc, 6000000 / 16); @@ -625,7 +625,7 @@ MACHINE_CONFIG_START(vcombat_state::shadfgtr) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); MCFG_MACHINE_RESET_OVERRIDE(vcombat_state,shadfgtr) - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MC6845(config, m_crtc, XTAL(20'000'000) / 4 / 16); m_crtc->set_screen("screen"); diff --git a/src/mame/drivers/vertigo.cpp b/src/mame/drivers/vertigo.cpp index 1dd61368b7a..9315e3662ee 100644 --- a/src/mame/drivers/vertigo.cpp +++ b/src/mame/drivers/vertigo.cpp @@ -143,7 +143,7 @@ MACHINE_CONFIG_START(vertigo_state::vertigo) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ - MCFG_VECTOR_ADD("vector") + VECTOR(config, m_vector, 0); MCFG_SCREEN_ADD("screen", VECTOR) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(400, 300) diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp index a893e9ea1f4..f903d880d88 100644 --- a/src/mame/drivers/vii.cpp +++ b/src/mame/drivers/vii.cpp @@ -5,9 +5,9 @@ Short Description: Systems which run on the SPG243 SoC - - ( die markings show "SunPlus QL8041" on JAKKS WWE / Fantastic 4 / Justice League ) - + + ( die markings show "SunPlus QL8041" on JAKKS WWE / Fantastic 4 / Justice League, Dora the Explorer, Mattel Classic Sports ) + Status: Mostly working @@ -133,6 +133,27 @@ protected: optional_device<nvram_device> m_nvram; }; +class jakks_gkr_state : public spg2xx_game_state +{ +public: + jakks_gkr_state(const machine_config &mconfig, device_type type, const char *tag) + : spg2xx_game_state(mconfig, type, tag) + , m_cart(*this, "cartslot") + , m_cart_region(nullptr) + { } + + void jakks_gkr(machine_config &config); + void jakks_gkr_nk(machine_config &config); + +private: + virtual void machine_start() override; + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gamekey_cart); + + required_device<generic_slot_device> m_cart; + memory_region *m_cart_region; +}; + class vii_state : public spg2xx_game_state { public: @@ -340,7 +361,7 @@ static INPUT_PORTS_START( jak_gkr ) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON4 ) - + PORT_START("C") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spg2xx_game_state,i2c_r, nullptr) PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) @@ -539,6 +560,158 @@ static INPUT_PORTS_START( rad_sktv ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( mattelcs ) // TODO: inputs once it boots (this is just for debug) + PORT_START("P1") + PORT_DIPNAME( 0x0001, 0x0001, "IN0" ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_START("P2") + PORT_DIPNAME( 0x0001, 0x0001, "IN1" ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_START("P3") + PORT_DIPNAME( 0x0001, 0x0001, "IN2" ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) +INPUT_PORTS_END + /* hold 'Console Down' while powering up to get the test menu, including input tests the ball (Wired) and bat (IR) are read some other way as they don't seem to appear in the ports. */ static INPUT_PORTS_START( rad_crik ) @@ -738,6 +911,49 @@ void spg2xx_game_state::jakks(machine_config &config) I2CMEM(config, m_i2cmem, 0).set_data_size(0x200); } + +void jakks_gkr_state::machine_start() +{ + spg2xx_game_state::machine_start(); + + // if there's a cart, override the standard banking + if (m_cart && m_cart->exists()) + { + std::string region_tag; + m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); + m_bank->configure_entries(0, (m_cart_region->bytes() + 0x7fffff) / 0x800000, m_cart_region->base(), 0x800000); + m_bank->set_entry(0); + } +} + +DEVICE_IMAGE_LOAD_MEMBER(jakks_gkr_state, gamekey_cart) +{ + uint32_t size = m_cart->common_get_size("rom"); + + m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_LITTLE); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + + return image_init_result::PASS; +} + +void jakks_gkr_state::jakks_gkr(machine_config &config) +{ + walle(config); + + GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "jakks_gamekey"); + m_cart->set_width(GENERIC_ROM16_WIDTH); + m_cart->set_device_load(device_image_load_delegate(&jakks_gkr_state::device_image_load_gamekey_cart, this)); + +} + +void jakks_gkr_state::jakks_gkr_nk(machine_config &config) +{ + jakks_gkr(config); + + SOFTWARE_LIST(config, "jakks_gamekey_nk").set_original("jakks_gamekey_nk"); +} + + void spg2xx_game_state::walle(machine_config &config) { jakks(config); @@ -812,6 +1028,12 @@ ROM_START( jak_just ) ROM_LOAD16_WORD_SWAP( "jakksjlagkr.bin", 0x000000, 0x200000, CRC(182989f0) SHA1(799229c537d6fe629ba9e1e4051d1bb9ca445d44) ) ROM_END +ROM_START( jak_dora ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "jakksdoragkr.bin", 0x000000, 0x200000, CRC(bcaa132d) SHA1(3894b980fbc4144731b2a7a94acebb29e30de67c) ) +ROM_END + + @@ -861,6 +1083,12 @@ ROM_START( rad_crik ) // only released in EU? ROM_LOAD16_WORD_SWAP( "cricket.bin", 0x000000, 0x200000, CRC(6fa0aaa9) SHA1(210d2d4f542181f59127ce2f516d0408dc6de7a8) ) ROM_END + +ROM_START( mattelcs ) + ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "mattelclassicsports.bin", 0x000000, 0x100000, CRC(e633e7ad) SHA1(bf3e325a930cf645a7e32195939f3c79c6d35dac) ) +ROM_END + /* Wireless Air 60 (info provided with dump) @@ -1001,18 +1229,18 @@ CONS( 2004, jak_batm, 0, 0, jakks, batman, spg2xx_game_state, empty_init, "JAKKS CONS( 2008, jak_wall, 0, 0, walle, walle, spg2xx_game_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "Wall-E (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // 'Game-Key-Ready' JAKKS games (these can also take per-game specific expansion cartridges, although not all games had them released) -CONS( 2005, jak_wwe, 0, 0, walle, jak_gkr,spg2xx_game_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released) -CONS( 2005, jak_fan4, 0, 0, walle, jak_gkr,spg2xx_game_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released) -CONS( 2005, jak_just, 0, 0, walle, jak_gkr,spg2xx_game_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released) +CONS( 2005, jak_wwe, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / HotGen Ltd", "WWE (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // WW (no game-keys released) +CONS( 2005, jak_fan4, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Digital Eclipse", "Fantastic Four (JAKKS Pacific TV Game)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // F4 (no game-keys released) +CONS( 2005, jak_just, 0, 0, jakks_gkr, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Taniko", "Justice League (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // DC (no game-keys released) +CONS( 2005, jak_dora, 0, 0, jakks_gkr_nk, jak_gkr,jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Handheld Games", "Dora the Explorer (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // uses NK keys (same as Nicktoons & Spongebob) (3+ released) // Other Game-Key-Ready systems (not all releases of them?, only Sunplus SPG240 [Sunplus PAC300] versions?) +// Nicktoons NK (3? keys available) (same keys as Dora the Explorer) +// SpongeBob SquarePants: The Fry Cook Games NK (3? keys available) ^^ // Namco Ms. Pac-Man NM (3 keys available [Dig Dug, New Rally-X], [Rally-X, Pac-Man, Bosconian], [Pac-Man, Bosconian]) // Star Wars SW (1 key available) -// Nicktoons NK (3 keys available) // Disney DY (3? keys available) // Disney Princess DP (? keys available) // Spider-Man MV (1? key available) -// SpongeBob SquarePants: The Fry Cook Games ?? (1? key available) -// Dora the Explorer ?? (1? key available) // no keys released for the following, some were in development but cancelled // Dragon Ball Z DB (no game-keys released) // Capcom 3-in-1 CC (no game-keys released) @@ -1028,9 +1256,15 @@ CONS( 2006, rad_crik, 0, 0, rad_crik, rad_crik, spg2xx_game_state, ini CONS( 2007, rad_sktv, 0, 0, rad_skat, rad_sktv, spg2xx_game_state, init_crc, "Radica", "Skannerz TV", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) CONS( 2007, rad_fb2, 0, 0, rad_skat, rad_fb2, spg2xx_game_state, init_crc, "Radica", "Play TV Football 2", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +// Mattel games +CONS( 2005, mattelcs, 0, 0, rad_skat, mattelcs, spg2xx_game_state, empty_init, "Mattel", "Mattel Classic Sports", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) + // might not fit here. First 0x8000 bytes are blank (not too uncommon for these) then rest of rom looks like it's probably encrypted at least +// could be later model VT based instead? even after decrypting (simple word xor) the vectors have a different format and are at a different location to the SunPlus titles CONS( 2009, zone40, 0, 0, non_spg_base, wirels60, spg2xx_game_state, empty_init, "Jungle Soft / Ultimate Products (HK) Ltd", "Zone 40", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -// NAND dumps w/ internal bootstrap. Almost certainly do not fit in this driver, as the SPG2xx can only address up to 4Mwords. -CONS( 2010, wlsair60, 0, 0, non_spg_base, wirels60, spg2xx_game_state, empty_init, "Jungle Soft / Kids Station Toys Inc", "Wireless Air 60", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +// valid looking code, but extended periperhal area (twice the size?) makes use of unemulated opcode 0xfe00 ? CONS( 2011, wrlshunt, 0, 0, non_spg_base, wirels60, spg2xx_game_state, empty_init, "Hamy / Kids Station Toys Inc", "Wireless Hunting Video Game System", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) + +// NAND dumps w/ internal bootstrap. Almost certainly do not fit in this driver, as the SPG2xx can only address up to 4Mwords. These are 'GeneralPlus' instead? +CONS( 2010, wlsair60, 0, 0, non_spg_base, wirels60, spg2xx_game_state, empty_init, "Jungle Soft / Kids Station Toys Inc", "Wireless Air 60", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp index ff1c7fc7f1d..a1a8000ac27 100644 --- a/src/mame/drivers/xavix.cpp +++ b/src/mame/drivers/xavix.cpp @@ -65,7 +65,7 @@ 13 STAR WARS Light Saber Battle /TOMY/Japan - - - - - - - 14 Jala Jaland /atlus/Japan - - - - - - - 15 Star Wars Lightsaber Battle Game /Hasbro/USA SWSA x8 48 8M 24C02 SSD 2000 NEC 85605-621 dumped - 16 Gururin World /EPOCH/Japan - - - - - - - + 16 Gururin World /EPOCH/Japan - x8 - - - SSD 98 PL7351-181 dumped 17 Toinohgi Onmyo-daisenki /BANDAI/Japan - - - - - - - 2004 1 Accessory cartridge for Super TV computer "Double mouse party"/EPOCH/Japan - - - - - - - 2 Printer for TV computer /EPOCH/Japan - - - - - - - @@ -73,12 +73,12 @@ 4 Accessory cartridge for Super TV computer "Doraemon"/EPOCH/Japan - - - - - - - 5 Accessory cartridge for Super TV computer "Hamutaro"/EPOCH/Japan - - - - - - - 6 Super TV computer /EPOCH/Japan - - - - - - - - 7 Super Dash ball /EPOCH/Japan - - - - - - - + 7 Super Dash ball /EPOCH/Japan - x8 - - - SSD 2000 NEC 85605-621 dumped 8 Exciting sports Tennis X Fitness /EPOCH/Japan - - - - - - - 9 Accessory memory mascot for TV mail Pc mail cot 2 characters (Putchi, Petchi) /EPOCH/Japan - - - - - - - 10 Accessory memory mascot for TV mail Pc mail cot 2 characters (Charuru, Kurau) /EPOCH/Japan - - - - - - - 11 The Lord of the Rings Warrior of Middle Earth /Hasbro/USA LORA x8 48 8M 24C02 SSD 2000 NEC 85605-621 dumped - 12 Beyblade Arcade Challenge 5-in-1 /Hasbro/USA - - - - - - - + 12 Beyblade Arcade Challenge 5-in-1 /Hasbro/USA - - - - - - have 13 All star Festival Quize /EPOCH/Japan - - - - - - - 14 e-kara mix /TAKARA/Japan - - - - - - - 15 Jumping Popira /TAKARA/Japan - - - - - - - @@ -98,7 +98,7 @@ 5 Exciting stadium DX, Hansin Tigers version /EPOCH/Japan - - - - - - - 6 Dragon Quest /SQUARE ENIX/Japan - - - 8M - SSD 2000? dumped 7 Croquette! Win a medal! /EPOCH/Japan - - - - - - - - 8 Taiko Popira /TAKARA/Japan - - - - - - - + 8 Taiko Popira /TAKARA/Japan - - - - - - dumped 9 Together Minimoni, Dancing' Stage! plus /EPOCH/Japan - - - - - - - 10 Evio /TOMY/Japan - - - - - - - 11 Together Minimoni,Jumping Party! /EPOCH/Japan - - - - - - - @@ -347,7 +347,10 @@ void xavix_state::xavix_lowbus_map(address_map &map) map(0x7a81, 0x7a81).rw(FUNC(xavix_state::ioevent_irqstate_r), FUNC(xavix_state::ioevent_irqack_w)); // Mouse? - map(0x7b00, 0x7b00).w(FUNC(xavix_state::adc_7b00_w)); // rad_snow (not often, why?) + map(0x7b00, 0x7b00).rw(FUNC(xavix_state::mouse_7b00_r), FUNC(xavix_state::mouse_7b00_w)); + map(0x7b01, 0x7b01).rw(FUNC(xavix_state::mouse_7b01_r), FUNC(xavix_state::mouse_7b01_w)); + map(0x7b10, 0x7b10).rw(FUNC(xavix_state::mouse_7b10_r), FUNC(xavix_state::mouse_7b10_w)); + map(0x7b11, 0x7b11).rw(FUNC(xavix_state::mouse_7b11_r), FUNC(xavix_state::mouse_7b11_w)); // Lightgun / pen 2 control //map(0x7b18, 0x7b1b) @@ -366,7 +369,7 @@ void xavix_state::xavix_lowbus_map(address_map &map) map(0x7c03, 0x7c03).r(FUNC(xavix_state::timer_curval_r)); // Barrel Shifter registers - // map(0x7ff0, 0x7ff1) + map(0x7ff0, 0x7ff1).rw(FUNC(xavix_state::barrel_r), FUNC(xavix_state::barrel_w)); // Multiply / Divide registers map(0x7ff2, 0x7ff4).rw(FUNC(xavix_state::mult_param_r), FUNC(xavix_state::mult_param_w)); @@ -463,6 +466,15 @@ static INPUT_PORTS_START( xavix ) PORT_START("AN7") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("MOUSE0X") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("MOUSE0Y") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("MOUSE1X") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("MOUSE1Y") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("REGION") // PAL/NTSC flag PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) INPUT_PORTS_END @@ -489,6 +501,27 @@ static INPUT_PORTS_START( xavix_an ) PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) INPUT_PORTS_END + +static INPUT_PORTS_START( epo_sdb ) + PORT_INCLUDE(xavix) + + PORT_MODIFY("MOUSE0X") + PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1) + PORT_MODIFY("MOUSE0Y") + PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1) + PORT_MODIFY("MOUSE1X") + PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(2) + PORT_MODIFY("MOUSE1Y") + PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(2) + + PORT_MODIFY("IN0") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) +INPUT_PORTS_END + + // left + right drums together = select / forward (needed on initial screen). left drum = left in menus right drum = right in menus // analog reading depends heavily on timers, they're too fast right now so drum hits are too hard and register multiple times static INPUT_PORTS_START( taikodp ) @@ -1013,6 +1046,13 @@ void xavix_state::xavix2000(machine_config &config) m_palette->set_entries(512); } +void xavix_state::xavix2000_nv(machine_config &config) +{ + xavix2000(config); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); +} + void xavix_i2c_state::xavix2000_i2c_24c04(machine_config &config) { xavix2000(config); @@ -1231,6 +1271,12 @@ ROM_START( epo_efdx ) ROM_LOAD("excitefishing.bin", 0x000000, 0x400000, CRC(9c85b261) SHA1(6a363faed2ec89c5176e46554a98ca1e20132579) ) ROM_END +ROM_START( epo_guru ) + ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) + ROM_LOAD("gururinworld.bin", 0x000000, 0x400000, CRC(e5ae4523) SHA1(0e39ef8f94203d34e49422081667805f50a339a1) ) +ROM_END + + ROM_START( rad_rh ) ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) ROM_LOAD("rescueheroes.bin", 0x000000, 0x200000, CRC(38c391a7) SHA1(120334d4ce89d98438c2a35bf7e53af5096cc878) ) @@ -1264,6 +1310,15 @@ ROM_START( ekaraj ) ROM_RELOAD(0x000000, 0x100000) ROM_END +ROM_START( ekaraphs ) + ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) + ROM_LOAD( "ekaraheadset.bin", 0x600000, 0x200000, CRC(dd9b3cd7) SHA1(baaf35d56fa45b6f995b8466331bb30f0035f734) ) + ROM_RELOAD(0x000000, 0x200000) +ROM_END + + + + ROM_START( ddrfammt ) ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) ROM_LOAD( "ekara_ddr_ha010_81947.bin", 0x600000, 0x200000, CRC(737d5d1a) SHA1(a1043047056dd27bca69767ee2044461ec549465) ) @@ -1325,6 +1380,8 @@ CONS( 200?, rad_rh, 0, 0, xavix, rad_rh, xavix_state, CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_epo_efdx, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, epo_guru, 0, 0, xavix, xavix, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + CONS( 200?, has_wamg, 0, 0, xavix, xavix, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) @@ -1335,7 +1392,8 @@ CONS( 200?, has_wamg, 0, 0, xavix, xavix, xavix_state, CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turn it on" without cart CONS( 2000, ekaraa, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turning on e-kara" without cart CONS( 2000, ekaraj, ekara, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows Japanese message without cart -// there appear to be later e-kara releases for each region with 3 built in songs too +// the 'e-kara pro headset' has 3 songs built in for the US release. The Japanese release of this appears to be called 'e-kara H.S.' and it is unclear if it also has built in songs. The Canadian box says 'cartridge contains' instead of 'songs included' but is likely a printing error. +CONS( 2002, ekaraphs, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD", "e-kara Pro Headset (US, includes 3 songs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) CONS( 2001, ddrfammt, 0, 0, xavix_cart_ddrfammt,ddrfammt, xavix_cart_state, init_xavix, "Takara / Konami / SSD Company LTD", "Dance Dance Revolution Family Mat (Japan)", MACHINE_IMPERFECT_SOUND/*|MACHINE_IS_BIOS_ROOT*/ ) @@ -1346,7 +1404,12 @@ CONS( 2000, popira, 0, 0, xavix_cart_popira,popira, xavix_cart_st CONS( 2003, taikodp, 0, 0, xavix_i2c_taiko, taikodp, xavix_i2c_cart_state, init_xavix, "Takara / SSD Company LTD", "Taiko De Popira (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*|MACHINE_IS_BIOS_ROOT*/ ) // inputs? are the drums analog? -/* SuperXaviX hardware titles */ +/* SuperXaviX (XaviX 2000 type CPU) hardware titles */ + +ROM_START( epo_sdb ) + ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) + ROM_LOAD("superdashball.bin", 0x000000, 0x400000, CRC(a004a764) SHA1(47a96822d4d7d6a0f6be5cd729c3747dbab65979) ) +ROM_END ROM_START( ttv_sw ) ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) @@ -1368,15 +1431,21 @@ ROM_START( drgqst ) ROM_LOAD( "dragonquest.bin", 0x000000, 0x800000, CRC(3d24413f) SHA1(1677e81cedcf349de7bf091a232dc82c6424efba) ) ROM_END -CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2005, ttv_lotr, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2005, ttv_mx, 0, 0, xavix2000_i2c_24c04, ttv_mx, xavix_i2c_state, init_xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2004, epo_sdb, 0, 0, xavix2000_nv, epo_sdb, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Super Dash Ball (Japan)", MACHINE_IMPERFECT_SOUND ) + +CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, ttv_lotr, 0, 0, xavix2000_i2c_24c02, xavix, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, ttv_mx, 0, 0, xavix2000_i2c_24c04, ttv_mx, xavix_i2c_state, init_xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c02, xavix , xavix_i2c_lotr_state, init_xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + +/* SuperXaviX (XaviX 2002 type CPU) hardware titles */ /* The 'XaviXPORT' isn't a real console, more of a TV adapter, all the actual hardware (CPU including video hw, sound hw) is in the cartridges and controllers and can vary between games, see notes at top of driver. */ +// SSD 2002 NEC 85054-611 CPU uses 16-bit ROMs + ROM_START( xavtenni ) ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) ROM_LOAD( "xavixtennis.bin", 0x000000, 0x800000, CRC(23a1d918) SHA1(2241c59e8ea8328013e55952ebf9060ea0a4675b) ) diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp index 736da7a8b7d..663a8395e38 100644 --- a/src/mame/drivers/xtheball.cpp +++ b/src/mame/drivers/xtheball.cpp @@ -323,7 +323,7 @@ MACHINE_CONFIG_START(xtheball_state::xtheball) WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ - MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) + TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(10000000, 640, 114, 626, 257, 24, 248) diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index 8134893c5e4..2edf51d21d3 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -236,6 +236,7 @@ public: DECLARE_WRITE16_MEMBER(punipic_layer_w); DECLARE_WRITE16_MEMBER(sf2mdt_layer_w); DECLARE_WRITE16_MEMBER(sf2mdta_layer_w); + DECLARE_WRITE16_MEMBER(sf2b_layer_w); DECLARE_WRITE16_MEMBER(slampic_layer_w); DECLARE_WRITE16_MEMBER(fcrash_soundlatch_w); DECLARE_WRITE8_MEMBER(fcrash_snd_bankswitch_w); diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h index 5a7ec3760d9..79de6f56b43 100644 --- a/src/mame/includes/thomson.h +++ b/src/mame/includes/thomson.h @@ -181,6 +181,7 @@ public: void overlay_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlayhalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlay3_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap16alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void to770_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); @@ -196,6 +197,7 @@ public: void overlay_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlayhalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlay3_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void bitmap16alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); private: DECLARE_FLOPPY_FORMATS(cd90_640_formats); @@ -690,7 +692,8 @@ private: #define THOM_VMODE_BITMAP4_ALT_HALF 12 #define THOM_VMODE_MO5_ALT 13 #define THOM_VMODE_OVERLAY_HALF 14 -#define THOM_VMODE_NB 15 +#define THOM_VMODE_BITMAP16_ALT 15 +#define THOM_VMODE_NB 16 class to7_io_line_device : public device_t diff --git a/src/mame/includes/xavix.h b/src/mame/includes/xavix.h index 11646e1c113..8df1bb782b1 100644 --- a/src/mame/includes/xavix.h +++ b/src/mame/includes/xavix.h @@ -71,6 +71,10 @@ public: m_in0(*this, "IN0"), m_in1(*this, "IN1"), m_an_in(*this, "AN%u", 0U), + m_mouse0x(*this, "MOUSE0X"), + m_mouse0y(*this, "MOUSE0Y"), + m_mouse1x(*this, "MOUSE1X"), + m_mouse1y(*this, "MOUSE1Y"), m_maincpu(*this, "maincpu"), m_nvram(*this, "nvram"), m_screen(*this, "screen"), @@ -102,6 +106,7 @@ public: void xavixp(machine_config &config); void xavix2000(machine_config &config); void xavix_nv(machine_config &config); + void xavix2000_nv(machine_config &config); void init_xavix(); @@ -169,6 +174,10 @@ protected: required_ioport m_in0; required_ioport m_in1; required_ioport_array<8> m_an_in; + optional_ioport m_mouse0x; + optional_ioport m_mouse0y; + optional_ioport m_mouse1x; + optional_ioport m_mouse1y; required_device<xavix_device> m_maincpu; optional_device<nvram_device> m_nvram; required_device<screen_device> m_screen; @@ -258,7 +267,16 @@ private: uint8_t m_ioevent_active; void process_ioevent(uint8_t bits); - DECLARE_WRITE8_MEMBER(adc_7b00_w); + DECLARE_READ8_MEMBER(mouse_7b00_r); + DECLARE_READ8_MEMBER(mouse_7b01_r); + DECLARE_READ8_MEMBER(mouse_7b10_r); + DECLARE_READ8_MEMBER(mouse_7b11_r); + + DECLARE_WRITE8_MEMBER(mouse_7b00_w); + DECLARE_WRITE8_MEMBER(mouse_7b01_w); + DECLARE_WRITE8_MEMBER(mouse_7b10_w); + DECLARE_WRITE8_MEMBER(mouse_7b11_w); + DECLARE_READ8_MEMBER(adc_7b80_r); DECLARE_WRITE8_MEMBER(adc_7b80_w); DECLARE_READ8_MEMBER(adc_7b81_r); @@ -445,6 +463,12 @@ private: DECLARE_READ8_MEMBER(mult_param_r); DECLARE_WRITE8_MEMBER(mult_param_w); + uint8_t m_barrel_params[2]; + + DECLARE_READ8_MEMBER(barrel_r); + DECLARE_WRITE8_MEMBER(barrel_w); + + void update_irqs(); uint8_t m_irqsource; diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp index 59b51327211..4ee92a6a68c 100644 --- a/src/mame/machine/cuda.cpp +++ b/src/mame/machine/cuda.cpp @@ -297,10 +297,10 @@ WRITE8_MEMBER( cuda_device::timer_ctrl_w ) { static const attotime rates[4][5] = { - { attotime::from_seconds(1), attotime::from_msec(31.3f), attotime::from_msec(15.6f), attotime::from_msec(7.8f), attotime::from_msec(3.9f) }, - { attotime::from_seconds(2), attotime::from_msec(62.5f), attotime::from_msec(31.3f), attotime::from_msec(15.6f), attotime::from_msec(7.8f) }, - { attotime::from_seconds(4), attotime::from_msec(125.0f), attotime::from_msec(62.5f), attotime::from_msec(31.3f), attotime::from_msec(15.6f) }, - { attotime::from_seconds(8), attotime::from_msec(250.0f), attotime::from_msec(125.1f), attotime::from_msec(62.5f), attotime::from_msec(31.3f) }, + { attotime::from_seconds(1), attotime::from_usec(31300), attotime::from_usec(15600), attotime::from_usec(7800), attotime::from_usec(3900) }, + { attotime::from_seconds(2), attotime::from_usec(62500), attotime::from_usec(31300), attotime::from_usec(15600), attotime::from_usec(7800) }, + { attotime::from_seconds(4), attotime::from_usec(125000), attotime::from_usec(62500), attotime::from_usec(31300), attotime::from_usec(15600) }, + { attotime::from_seconds(8), attotime::from_usec(250000), attotime::from_usec(125100), attotime::from_usec(62500), attotime::from_usec(31300) }, }; // printf("%02x to timer control (PC=%x)\n", data, m_maincpu->pc()); diff --git a/src/mame/machine/hpc3.cpp b/src/mame/machine/hpc3.cpp index b39c6bc9b07..fdb9724c4e8 100644 --- a/src/mame/machine/hpc3.cpp +++ b/src/mame/machine/hpc3.cpp @@ -266,7 +266,6 @@ WRITE32_MEMBER(hpc3_device::hd_enet_w) break; case 0x1004/4: LOGMASKED(LOG_SCSI, "%s: HPC3 SCSI0 DMA Control Write: %08x\n", machine().describe_context(), data); - printf("HPC3 SCSI0 DMA Control Write: %08x\n", data); m_scsi_dma[0].m_ctrl = data; m_scsi_dma[0].m_to_device = (m_scsi_dma[0].m_ctrl & HPC3_DMACTRL_DIR); m_scsi_dma[0].m_big_endian = (m_scsi_dma[0].m_ctrl & HPC3_DMACTRL_ENDIAN); @@ -683,7 +682,7 @@ void hpc3_device::scsi_drq(bool state, int channel) void hpc3_device::do_scsi_dma(int channel) { scsi_dma_t &dma = m_scsi_dma[channel]; - + if (dma.m_to_device) m_wd33c93->dma_w(m_cpu_space->read_byte(dma.m_big_endian ? BYTE4_XOR_BE(dma.m_addr) : BYTE4_XOR_LE(dma.m_addr))); else diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp index 1744942fd77..dad2c5fa7c6 100644 --- a/src/mame/machine/midwayic.cpp +++ b/src/mame/machine/midwayic.cpp @@ -28,6 +28,33 @@ /************************************* * + * Serial number input kludge + * + *************************************/ + +static INPUT_PORTS_START( pic_serial_adjust ) + PORT_START("SERIAL_DIGIT") + PORT_DIPNAME( 0x0f, 0x06, "Serial Low Digit") + PORT_DIPSETTING( 0x00, "0") + PORT_DIPSETTING( 0x01, "1") + PORT_DIPSETTING( 0x02, "2") + PORT_DIPSETTING( 0x03, "3") + PORT_DIPSETTING( 0x04, "4") + PORT_DIPSETTING( 0x05, "5") + PORT_DIPSETTING( 0x06, "6") + PORT_DIPSETTING( 0x07, "7") + PORT_DIPSETTING( 0x08, "8") + PORT_DIPSETTING( 0x09, "9") + PORT_BIT( 0xf0, 0x00, IPT_UNUSED ) +INPUT_PORTS_END + +ioport_constructor midway_serial_pic_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(pic_serial_adjust); +} + +/************************************* + * * Serial number encoding * *************************************/ @@ -38,8 +65,9 @@ void midway_serial_pic_device::generate_serial_data(int upper) uint32_t serial_number, temp; uint8_t serial_digit[9]; - serial_number = 123456; + serial_number = 123450; serial_number += upper * 1000000; + serial_number += m_io_serial_digit->read() & 0x0f; serial_digit[0] = (serial_number / 100000000) % 10; serial_digit[1] = (serial_number / 10000000) % 10; @@ -119,6 +147,7 @@ midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock), + m_io_serial_digit(*this, "SERIAL_DIGIT"), m_upper(0), m_buff(0), m_idx(0), @@ -136,9 +165,12 @@ midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig void midway_serial_pic_device::device_start() { serial_register_state(); - generate_serial_data(m_upper); } +void midway_serial_pic_device::device_reset() +{ + generate_serial_data(m_upper); +} WRITE_LINE_MEMBER(midway_serial_pic_device::reset_w) { diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h index e5a422782b5..420d131d9c8 100644 --- a/src/mame/machine/midwayic.h +++ b/src/mame/machine/midwayic.h @@ -35,12 +35,17 @@ protected: // device-level overrides virtual void device_start() override; + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; void generate_serial_data(int upper); void serial_register_state(); + required_ioport m_io_serial_digit; + uint8_t m_data[16]; // reused by other devices int m_upper; + private: uint8_t m_buff; uint8_t m_idx; diff --git a/src/mame/machine/mips_rambo.cpp b/src/mame/machine/mips_rambo.cpp index 2d6bd16e17c..53023cce5a7 100644 --- a/src/mame/machine/mips_rambo.cpp +++ b/src/mame/machine/mips_rambo.cpp @@ -9,8 +9,9 @@ * https://github.com/NetBSD/src/blob/trunk/sys/arch/mipsco/obio/rambo.h * * TODO - * - interrupts * - buzzer + * - dma reload + * - save state */ #include "emu.h" @@ -18,6 +19,7 @@ #define LOG_GENERAL (1U << 0) #define LOG_REG (1U << 1) +#define LOG_DMA (1U << 2) //#define VERBOSE (LOG_GENERAL|LOG_REG) #include "logmacro.h" @@ -32,10 +34,8 @@ mips_rambo_device::mips_rambo_device(const machine_config &mconfig, const char * , m_timer_out_cb(*this) , m_buzzer_out_cb(*this) , m_channel{{ 0,0,0,0,0,0, false, *this, *this }, { 0,0,0,0,0,0, false, *this, *this }} - , m_irq_out_state(0) , m_buzzer_out_state(0) { - (void)m_irq_out_state; } void mips_rambo_device::map(address_map &map) @@ -74,23 +74,59 @@ void mips_rambo_device::device_start() } m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips_rambo_device::timer), this)); - m_buzzer_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips_rambo_device::buzzer_toggle), this)); - + m_dma = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips_rambo_device::dma), this)); + m_buzzer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips_rambo_device::buzzer), this)); } void mips_rambo_device::device_reset() { - // TODO: update interrupts - m_tcount = machine().time(); + + for (dma_t &channel : m_channel) + { + if (channel.mode & MODE_DMA_INTR) + m_irq_out_cb(0); + + channel.load_address = 0; + channel.diag = 0; + channel.mode = 0; + channel.block_count = 0; + channel.reload_count = 0; + channel.current_address = 0; + } + + m_buzzer->enable(false); + if (m_buzzer_out_state) + { + m_buzzer_out_state = 0; + m_buzzer_out_cb(m_buzzer_out_state); + } +} + +template <unsigned Channel> u16 mips_rambo_device::fifo_r() +{ + if (m_fifo[Channel].empty()) + m_dma->adjust(attotime::zero, Channel); + + return m_fifo[Channel].dequeue(); +} + +template <unsigned Channel> READ32_MEMBER(mips_rambo_device::mode_r) +{ + u32 data = m_channel[Channel].mode | m_fifo[Channel].queue_length(); + + if (m_fifo[Channel].full()) + data |= MODE_FIFO_FULL; + else if (m_fifo[Channel].empty()) + data |= MODE_FIFO_EMPTY; + + return data; } READ32_MEMBER(mips_rambo_device::tcount_r) { u32 const data = attotime_to_clocks(machine().time() - m_tcount); - LOGMASKED(LOG_REG, "tcount_r 0x%08x (%s)\n", data, machine().describe_context()); - return data; } @@ -115,7 +151,7 @@ WRITE32_MEMBER(mips_rambo_device::control_w) LOGMASKED(LOG_REG, "control_w 0x%08x (%s)\n", data, machine().describe_context()); // stop the buzzer - m_buzzer_timer->enable(false); + m_buzzer->enable(false); m_buzzer_out_state = 0; m_buzzer_out_cb(m_buzzer_out_state); @@ -124,7 +160,7 @@ WRITE32_MEMBER(mips_rambo_device::control_w) { attotime const period = attotime::from_ticks(1 << ((data & CONTROL_BUZZMASK) >> 4), 1524_Hz_XTAL); - m_buzzer_timer->adjust(period, 0, period); + m_buzzer->adjust(period, 0, period); } } @@ -135,28 +171,55 @@ template <unsigned Channel> WRITE32_MEMBER(mips_rambo_device::load_address_w) COMBINE_DATA(&m_channel[Channel].load_address); } -template <unsigned Channel> WRITE16_MEMBER(mips_rambo_device::fifo_w) +template <unsigned Channel> void mips_rambo_device::fifo_w(u16 data) { LOGMASKED(LOG_REG, "fifo_w<%d> 0x%04x (%s)\n", Channel, data, machine().describe_context()); + + m_fifo[Channel].enqueue(data); + + if (m_fifo[Channel].full()) + m_dma->adjust(attotime::zero, Channel); } template <unsigned Channel> WRITE32_MEMBER(mips_rambo_device::mode_w) { LOGMASKED(LOG_REG, "mode_w<%d> 0x%08x (%s)\n", Channel, data, machine().describe_context()); + dma_t &channel = m_channel[Channel]; + if (data & MODE_CHANNEL_EN) - m_channel[Channel].current_address = m_channel[Channel].load_address; + channel.current_address = channel.load_address; + + if (data & MODE_FLUSH_FIFO) + m_fifo[Channel].clear(); mem_mask &= MODE_WRITE_MASK; - COMBINE_DATA(&m_channel[Channel].mode); + COMBINE_DATA(&channel.mode); + + // schedule dma transfer + if (channel.drq_asserted && (channel.block_count || !m_fifo[Channel].empty())) + m_dma->adjust(attotime::zero, Channel); } template <unsigned Channel> WRITE16_MEMBER(mips_rambo_device::block_count_w) { LOGMASKED(LOG_REG, "block_count_w<%d> 0x%04x (%s)\n", Channel, data, machine().describe_context()); - COMBINE_DATA(&m_channel[Channel].block_count); - COMBINE_DATA(&m_channel[Channel].reload_count); + dma_t &channel = m_channel[Channel]; + + COMBINE_DATA(&channel.block_count); + COMBINE_DATA(&channel.reload_count); + + // FIXME: do this here? + if (channel.mode & MODE_DMA_INTR) + { + channel.mode &= ~MODE_DMA_INTR; + m_irq_out_cb(0); + } + + // schedule dma transfer + if (channel.drq_asserted && (channel.block_count || !m_fifo[Channel].empty())) + m_dma->adjust(attotime::zero, Channel); } TIMER_CALLBACK_MEMBER(mips_rambo_device::timer) @@ -166,7 +229,89 @@ TIMER_CALLBACK_MEMBER(mips_rambo_device::timer) m_timer_out_cb(CLEAR_LINE); } -TIMER_CALLBACK_MEMBER(mips_rambo_device::buzzer_toggle) +TIMER_CALLBACK_MEMBER(mips_rambo_device::dma) +{ + dma_t &channel = m_channel[param]; + + // check channel enabled + if (!(channel.mode & MODE_CHANNEL_EN)) + return; + + if (channel.mode & MODE_TO_MEMORY) + { + // fill fifo from device + while (channel.drq_asserted && !m_fifo[param].full()) + { + u16 const data = channel.read_cb(); + + m_fifo[param].enqueue(data); + } + + // empty fifo to memory + if (m_fifo[param].full() && channel.block_count) + { + LOGMASKED(LOG_DMA, "dma transfer to memory 0x%08x\n", channel.current_address); + while (!m_fifo[param].empty()) + { + u16 const data = m_fifo[param].dequeue(); + + m_ram->write(BYTE4_XOR_BE(channel.current_address++), data >> 8); + m_ram->write(BYTE4_XOR_BE(channel.current_address++), data); + } + + channel.block_count--; + } + } + else + { + if (m_fifo[param].empty() && channel.block_count) + { + LOGMASKED(LOG_DMA, "dma transfer from memory 0x%08x\n", channel.current_address); + + // fill fifo from memory + while (!m_fifo[param].full()) + { + u8 const hi = m_ram->read(BYTE4_XOR_BE(channel.current_address++)); + u8 const lo = m_ram->read(BYTE4_XOR_BE(channel.current_address++)); + + m_fifo[param].enqueue((hi << 8) | lo); + } + + channel.block_count--; + } + + // empty fifo to device + while (channel.drq_asserted && !m_fifo[param].empty()) + { + u16 const data = m_fifo[param].dequeue(); + + channel.write_cb(data); + } + } + + if (m_fifo[param].empty()) + { + if (channel.block_count == 0) + { + LOGMASKED(LOG_DMA, "dma transfer complete\n"); + + // trigger interrupt + if ((channel.mode & MODE_INTR_EN) && !(channel.mode & MODE_DMA_INTR)) + { + channel.mode |= MODE_DMA_INTR; + m_irq_out_cb(1); + } + + // TODO: reload + if (channel.mode & MODE_AUTO_RELOAD) + logerror("auto reload not supported\n"); + } + else if (channel.drq_asserted) + m_dma->adjust(attotime::zero, param); + } +} + +TIMER_CALLBACK_MEMBER(mips_rambo_device::buzzer) { m_buzzer_out_state = !m_buzzer_out_state; m_buzzer_out_cb(m_buzzer_out_state); @@ -174,22 +319,24 @@ TIMER_CALLBACK_MEMBER(mips_rambo_device::buzzer_toggle) u32 mips_rambo_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { + dma_t &channel = m_channel[1]; + // check if dma channel is configured u32 const blocks_required = (screen.visible_area().height() * screen.visible_area().width()) >> 9; - if (!(m_channel[1].mode & MODE_CHANNEL_EN) || (m_channel[1].reload_count != blocks_required)) + if (!(channel.mode & MODE_CHANNEL_EN) || (channel.reload_count != blocks_required)) return 1; // screen is blanked unless auto reload is enabled - if (!(m_channel[1].mode & MODE_AUTO_RELOAD)) + if (!(channel.mode & MODE_AUTO_RELOAD)) { - m_channel[1].block_count = 0; + channel.block_count = 0; return 0; } else - m_channel[1].block_count = m_channel[1].reload_count; + channel.block_count = channel.reload_count; - u32 address = m_channel[1].load_address; + u32 address = channel.load_address; for (int y = screen.visible_area().min_y; y <= screen.visible_area().max_y; y++) for (int x = screen.visible_area().min_x; x <= screen.visible_area().max_x; x += 8) { @@ -215,29 +362,11 @@ template WRITE_LINE_MEMBER(mips_rambo_device::drq_w<1>); template <unsigned Channel> WRITE_LINE_MEMBER(mips_rambo_device::drq_w) { - m_channel[Channel].drq_asserted = bool(state == ASSERT_LINE); + dma_t &channel = m_channel[Channel]; - while (m_channel[Channel].drq_asserted) - { - // check channel enabled - if (!(m_channel[Channel].mode & MODE_CHANNEL_EN)) - break; + channel.drq_asserted = bool(state == ASSERT_LINE); - // TODO: check data remaining - - // FIXME: 16 bit dma - if (m_channel[Channel].mode & MODE_TO_MEMORY) - { - u8 const data = m_channel[Channel].read_cb(); - - m_ram->write(BYTE4_XOR_BE(m_channel[Channel].current_address), data); - } - else - { - u8 const data = m_ram->read(BYTE4_XOR_BE(m_channel[Channel].current_address)); - m_channel[Channel].write_cb(data); - } - - m_channel[Channel].current_address++; - } + // schedule dma transfer + if (channel.drq_asserted && (channel.block_count || !m_fifo[Channel].empty())) + m_dma->adjust(attotime::zero, Channel); } diff --git a/src/mame/machine/mips_rambo.h b/src/mame/machine/mips_rambo.h index f3703cbabc3..fb57b6fff0a 100644 --- a/src/mame/machine/mips_rambo.h +++ b/src/mame/machine/mips_rambo.h @@ -25,7 +25,6 @@ public: template <unsigned Channel> auto dma_w() { return m_channel[Channel].write_cb.bind(); } // input lines - template <unsigned Interrupt> DECLARE_WRITE_LINE_MEMBER(irq_w) {} template <unsigned Channel> DECLARE_WRITE_LINE_MEMBER(drq_w); void map(address_map &map); @@ -38,12 +37,12 @@ protected: template <unsigned Channel> DECLARE_READ32_MEMBER(load_address_r) { return m_channel[Channel].load_address; } template <unsigned Channel> DECLARE_READ32_MEMBER(diag_r) { return 0; } - template <unsigned Channel> DECLARE_READ16_MEMBER(fifo_r) { return 0; } - template <unsigned Channel> DECLARE_READ32_MEMBER(mode_r) { return m_channel[Channel].mode; } + template <unsigned Channel> u16 fifo_r(); + template <unsigned Channel> DECLARE_READ32_MEMBER(mode_r); template <unsigned Channel> DECLARE_READ16_MEMBER(block_count_r) { if ((Channel == 0) || !(m_channel[Channel].mode & MODE_CHANNEL_EN)) - return m_channel[0].block_count; + return m_channel[Channel].block_count; /* * HACK: The RISC/os boot sequence tests the dma channel 1 block count @@ -65,7 +64,7 @@ protected: DECLARE_READ32_MEMBER(control_r) { return 0; } template <unsigned Channel> DECLARE_WRITE32_MEMBER(load_address_w); - template <unsigned Channel> DECLARE_WRITE16_MEMBER(fifo_w); + template <unsigned Channel> void fifo_w(u16 data); template <unsigned Channel> DECLARE_WRITE32_MEMBER(mode_w); template <unsigned Channel> DECLARE_WRITE16_MEMBER(block_count_w); @@ -74,7 +73,8 @@ protected: DECLARE_WRITE32_MEMBER(control_w); TIMER_CALLBACK_MEMBER(timer); - TIMER_CALLBACK_MEMBER(buzzer_toggle); + TIMER_CALLBACK_MEMBER(dma); + TIMER_CALLBACK_MEMBER(buzzer); private: enum mode_mask : u32 @@ -92,7 +92,7 @@ private: MODE_FIFO_EMPTY = 0x00000400, // fifo empty state MODE_DMA_ERROR = 0x00000200, // parity error during transfer MODE_DMA_INTR = 0x00000100, // channel interrupt pending - MODE_COUNT_MASK = 0x000000ff, // halfword count bits + MODE_COUNT_MASK = 0x000000ff, // fifo queue length MODE_WRITE_MASK = 0xff000000, }; @@ -124,16 +124,18 @@ private: bool drq_asserted; - // FIXME: 16 bit dma - devcb_read8 read_cb; - devcb_write8 write_cb; + devcb_read16 read_cb; + devcb_write16 write_cb; } m_channel[2]; + // FIXME: move this into dma_t + util::fifo<u16, 32> m_fifo[2]; + emu_timer *m_timer; - emu_timer *m_buzzer_timer; + emu_timer *m_dma; + emu_timer *m_buzzer; - int m_irq_out_state; int m_buzzer_out_state; attotime m_tcount; diff --git a/src/mame/machine/nl_tp1983.cpp b/src/mame/machine/nl_tp1983.cpp new file mode 100644 index 00000000000..1626e727f6b --- /dev/null +++ b/src/mame/machine/nl_tp1983.cpp @@ -0,0 +1,123 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev + +/*************************************************************************** + + Netlist (tp1983) included from testpat.cpp + +***************************************************************************/ + +#ifndef __PLIB_PREPROCESSOR__ + #define NL_PROHIBIT_BASEH_INCLUDE 1 + #include "netlist/devices/net_lib.h" +#endif + +// gray scale +#define SB3 0 +// vertical stripes +#define SB4 1 +// vertical lines +#define SB5 0 +// horizontal stripes +#define SB6 0 +// horizontal lines +#define SB7 0 +// "M" +#define SB8 1 +// inverse +//efine SB9 0 + +NETLIST_START(tp1983) + + SOLVER(Solver, 480000) +// PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers + PARAM(Solver.ACCURACY, 1e-5) // ??? +// PARAM(Solver.LTE, 1e-4) // Default is not enough for paddle control if using LTE + PARAM(NETLIST.USE_DEACTIVATE, 1) + + ANALOG_INPUT(V5, 5) + + TTL_INPUT(high, 1) + TTL_INPUT(low, 0) + + // skipping D7.1 D7.2 D8.2 clock generator circuit + MAINCLOCK(clk, 250000.0) + +// vsync generator + +#define _C6 0 + + CAP(C6, CAP_P(11)) + RES(R19, RES_K(30)) + +#if _C6 + NET_C(V5, C6.1) +#else + NET_C(DD6_2.Q, C6.1) +#endif + NET_C(C6.2, R19.1) + //NET_C(R19.2, GND) + NET_C(R19.2, V5) + + // CLK, STROBE, ENABLE, UNITY, CLR, Bx [9, 10, 11, 12, 13, ...] + TTL_7497(DD4, clk, low, low, low, DD5.Y, high, vsync, low, vsync, vsync, low) +#if 1 + TTL_7497(DD5, DD4.ZQ, DD6_2.QQ, low, DD5.ENOUTQ, DD5.Y, high, DD6_1.QQ, low, low, low, low) +#else + TTL_7497(DD5, DD4.Z, low, low, DD5.ENOUT, DD5.Y, high, DD6_1.QQ, low, low, low, low) +#endif + + // CLK, D, CLRQ, PREQ [3, 2, 1, 4] +#if 1 + TTL_7474(DD6_1, DD5.Y, DD6_2.Q, C6.2, high) + TTL_7474(DD6_2, DD5.Y, DD6_1.QQ, C6.2, high) +#else + TTL_7474(DD6_1, DD5.Y, DD6_2.Q, low, high) + TTL_7474(DD6_2, DD5.Y, DD6_1.QQ, low, high) +#endif + + ALIAS(vsync, DD6_1.Q) + +// hsync generator + +#if 0 + CAP(C1, CAP_P(330)) + CAP(C2, CAP_P(3300)) // XXX tunable 3300 + RES(R2, RES_K(30)) + RES(R3, 1200) + + // A, B, C, D, CLEAR, LOADQ, CU, CD [15, 1, 10, 9, 14, 11, 5, 4] + TTL_74193(DD1, low, low, low, low, low, high, clk, high) + NET_C(DD1.CARRYQ, C1.1) + NET_C(R2.2, GND) + + TTL_7400_NAND(DD2_1, hsync, C1.2) + NET_C(C1.2, R2.1) + NET_C(DD2_1.Q, C2.1) + NET_C(vsync, R3.1) + NET_C(R3.2, C2.2) + + TTL_7400_NAND(DD2_2, C2.2, C2.2) + TTL_7400_NAND(DD2_3, hsync, hsync) + + ALIAS(hsync, DD2_2.Q) + +// video mixer + + RES(R10, 820) + NET_C(hsync, R10.1) + + ALIAS(videomix, R10.2) +#else + ALIAS(videomix, vsync) +#endif + + //LOG(log_V0, vsync) + //LOG(log_V1, DD6_2.Q) + +#if 1 + HINT(clk, NO_DEACTIVATE) +#endif + +NETLIST_END() + diff --git a/src/mame/machine/nl_tp1983.h b/src/mame/machine/nl_tp1983.h new file mode 100644 index 00000000000..e7ef3dcac1e --- /dev/null +++ b/src/mame/machine/nl_tp1983.h @@ -0,0 +1,4 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev + +NETLIST_EXTERNAL(tp1983) diff --git a/src/mame/machine/nl_tp1985.cpp b/src/mame/machine/nl_tp1985.cpp new file mode 100644 index 00000000000..89d9b58f62c --- /dev/null +++ b/src/mame/machine/nl_tp1985.cpp @@ -0,0 +1,246 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev + +/*************************************************************************** + + Netlist (tp1985) included from testpat.cpp + +***************************************************************************/ + +#ifndef __PLIB_PREPROCESSOR__ + #define NL_PROHIBIT_BASEH_INCLUDE 1 + #include "netlist/devices/net_lib.h" +#endif + +// gray scale +#define SB3 0 +// vertical stripes +#define SB4 1 +// vertical lines +#define SB5 0 +// horizontal stripes +#define SB6 0 +// horizontal lines +#define SB7 0 +// "M" +#define SB8 1 +// inverse +//efine SB9 0 + +// +#define _R19 0 +// +#define _VD4 0 +// +#define _DD4 1 + +NETLIST_START(tp1985) + + SOLVER(Solver, 48000) +// PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers + PARAM(Solver.ACCURACY, 1e-5) // ??? +// PARAM(Solver.LTE, 1e-4) // Default is not enough for paddle control if using LTE + PARAM(NETLIST.USE_DEACTIVATE, 0) + + ANALOG_INPUT(V5, 5) + + TTL_INPUT(high, 1) + TTL_INPUT(low, 0) + + MAINCLOCK(clk, 4000000.0) + +// raster generator: DD1-DD4, DD5.3, DD5.4, DD6-DD7 + + RES(R1, 1000) + NET_C(R1.1, V5) + + // A, B, C, D, CLEAR, LOADQ, CU, CD [15, 1, 10, 9, 14, 11, 5, 4] + TTL_74193(DD1, low, low, low, low, GND, R1.2, DD2.CARRYQ, R1.2) + TTL_74193(DD2, low, low, low, low, GND, R1.2, clk, R1.2) + + ALIAS(F250K, DD2.CARRYQ) + ALIAS(F15625, DD1.CARRYQ) + + RES(R2, 2000) + RES(R3, 1000) + RES(R4, 510) + RES(R5, 240) + RES(R6, 510) + RES(R7, 510) + RES(R8, 240) + DIODE(VD1, "1N34A") // XXX actually D9B + DIODE(VD2, "1N34A") // XXX actually D9B +#if SB3 + DIODE(VD6, "1N34A") // XXX actually D9B +#endif + + NET_C(DD1.QA, R2.1, R6.1) + NET_C(DD1.QB, R3.1, VD1.A) + NET_C(DD1.QC, R4.1) + NET_C(DD1.QD, R5.1) + + NET_C(DD2.QC, R7.1) + NET_C(DD2.QD, R8.1) + NET_C(R6.2, DD3_2.D) + + // and to SB1.1, SB4.2, SB3... +#if SB3 +#if SB4 + NET_C(R2.2, R3.2, R4.2, R5.2) + NET_C(GND, VD6.A) +#else + NET_C(R2.2, R3.2, R4.2, R5.2, VD6.A) +#endif +#else + NET_C(R2.2, R3.2, R4.2, R5.2) +#endif + + // and to SB6.2 + NET_C(R7.2, R8.2, VD2.A) + + // CLK, D, CLRQ, PREQ [3, 2, 1, 4] + TTL_7474(DD3_1, DD1.QA, DD1.QB, DD1.CARRYQ, DD3_1.QQ) +// TTL_7474(DD3_2, VD1.K, DD2.QD, high, DD3_1.QQ) // per book, produces one pulse, shifted too far. +#if _DD4 + TTL_7474(DD3_2, DD2.QD, VD1.K, DD4.Y, DD3_1.QQ) // per journal, produces two pulse, shifted correctly. +#else + TTL_7474(DD3_2, DD2.QD, VD1.K, high, DD3_1.QQ) // per journal, produces two pulse, shifted correctly. +#endif + /* + * verified: + * + * DD3.1 = hblank generator, 12 us @ 75% + * DD3.2 = hsync generator, 4 us @ 100%, shifted 2 us after hblank + * hsync period = 64us (15625 Hz) + */ + +#if _DD4 + RES(R12, 2000) + RES(R13, 2000) + CAP(C2, CAP_P(1000)) + + NET_C(V5, R13.1) + NET_C(GND, R12.1) + NET_C(C2.2, R13.2) + NET_C(R13.2, R12.2) + NET_C(DD6.QD, C2.1) + + // CLK, STROBE, ENABLE, UNITY, CLR, Bx + // + // STRB, ENin are tied to GND + TTL_7497(DD4, DD3_1.QQ, low, low, DD5_3.Q, DD5_4.Q, low, DD4.Y, low, DD5_3.Q, low, low) +// TTL_7497(DD4, DD3_1.QQ, low, low, low, DD5_4.Q, low, DD4.Y, low, DD5_3.Q, low, low) +// TTL_7497(DD4, DD3_1.QQ, low, low, low, DD5_4.Q, low, DD4.Y, low, low, low, low) + TTL_7400_NAND(DD5_3, R13.2, DD4.Y) +// TTL_7400_NAND(DD5_3, high, DD4.Y) + TTL_7400_NAND(DD5_4, DD4.ENOUTQ, DD4.ENOUTQ) + TTL_7493(DD6, DD4.ZQ, DD4.ENOUTQ, DD6.QD, DD6.QB) // CLK1, CLK2, R1, R2 [14, 1, 2, 3] +#else + TTL_7497(DD4, DD3_1.QQ, low, low, low, low, low, high, low, low, low, low) +// TTL_7493(DDx, DD3_1.QQ, DD3_1.QQ, low, low) + TTL_7493(DDx, DD3_1.QQ, DD3_1.QQ, DDx.QD, DDx.QB) +#endif + +// pattern selector + + RES(R10, 1000) + RES(R11, 240) + RES(R14, 510) + RES(R15, 1000) + RES(R16, 510) + DIODE(VD3, "1N34A") // XXX actually D9B +#if _VD4 + DIODE(VD4, "1N34A") // XXX actually D9B +#endif + DIODE(VD5, "1N34A") // XXX actually D9B + +#if SB4 + ALIAS(hpatsource, DD1.QA) +#endif +#if SB5 + ALIAS(hpatsource, DD2.CARRYQ) +#endif +#if !(SB4+SB5) + ALIAS(hpatsource, R11.2) +#endif + +#if SB6 + ALIAS(vpatsource, DD6.QA) +#endif +#if SB7 + ALIAS(vpatsource, DD4.Z) +#endif +#if !(SB6+SB7) + ALIAS(vpatsource, R11.2) +#endif + + NET_C(V5, R10.1) + NET_C(V5, R11.1) + NET_C(V5, R15.1) + NET_C(R11.2, VD3.A) + NET_C(hpatsource, R14.1) + NET_C(R14.2, DD7_2.A) + + TTL_7400_NAND(DD7_1, hpatsource, vpatsource) +#if !SB8 + TTL_7400_NAND(DD7_2, VD3.K, R15.2) + NET_C(VD2.K, DD7_2.B) +#else + TTL_7400_NAND(DD7_2, VD3.K, DD7_1.Q) + NET_C(R15.2, GND) + NET_C(VD2.K, GND) +#endif + +#if _VD4 + NET_C(DD7_2.Q, VD4.K) + NET_C(VD4.A, R16.2) +#else + NET_C(DD7_2.Q, R16.2) +#endif + NET_C(DD3_1.Q, R16.1) + + TTL_7400_NAND(DD7_3, DD7_2.Q, R10.2) + TTL_7400_NAND(DD7_4, R16.1, DD7_3.Q) + + NET_C(DD7_4.Q, VD5.A) + NET_C(VD5.K, R17.1) +#if SB3 + NET_C(VD6.K, R17.1) +#endif + +// video mixer + +#ifdef VD7 + DIODE(VD7, "1N34A") // XXX actually D9B +#endif + RES(R17, 10) // XXX actually 470 ohm POT + RES(R18, 430) +#if _R19 + RES(R19, 430) + CAP(C3, CAP_U(50)) +#endif + +#ifdef VD7 + NET_C(DD3_2.QQ, VD7.A) + NET_C(VD7.K, R18.1) +#else + NET_C(DD3_2.QQ, R18.1) +#endif + NET_C(R17.2, R18.2) // XXX + +#if _R19 + NET_C(GND, R19.1) + NET_C(R18.2, C3.2) + NET_C(R19.2, C3.2) + ALIAS(videomix, C3.1) +#else + ALIAS(videomix, R18.2) + //LOG(logV, R18.2) +#endif + +#if 0 + HINT(clk, NO_DEACTIVATE) +#endif + +NETLIST_END() + diff --git a/src/mame/machine/nl_tp1985.h b/src/mame/machine/nl_tp1985.h new file mode 100644 index 00000000000..908a18211cc --- /dev/null +++ b/src/mame/machine/nl_tp1985.h @@ -0,0 +1,4 @@ +// license:BSD-3-Clause +// copyright-holders:Sergey Svishchev + +NETLIST_EXTERNAL(tp1985) diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp index 873b15765fd..a64fe99c480 100644 --- a/src/mame/machine/thomson.cpp +++ b/src/mame/machine/thomson.cpp @@ -1714,7 +1714,7 @@ void thomson_state::to9_set_video_mode( uint8_t data, int style ) break; // undocumented, but tested on a real TO8D - case 0x20: thom_set_video_mode( THOM_VMODE_MO5_ALT ); break; + case 0x20: thom_set_video_mode( THOM_VMODE_MO5_ALT ); break; case 0x21: thom_set_video_mode( THOM_VMODE_BITMAP4 ); break; @@ -1743,6 +1743,9 @@ void thomson_state::to9_set_video_mode( uint8_t data, int style ) case 0x3f: thom_set_video_mode( THOM_VMODE_OVERLAY3 ); break; + // undocumented variant enconding for bitmap16 + case 0x5b: thom_set_video_mode( THOM_VMODE_BITMAP16_ALT ); break; + default: logerror( "to9_set_video_mode: unknown mode $%02X tr=%i phi=%i mod=%i\n", data, (data >> 5) & 3, (data >> 3) & 2, data & 7 ); } diff --git a/src/mame/machine/xavix.cpp b/src/mame/machine/xavix.cpp index dc4058f861f..5f783570354 100644 --- a/src/mame/machine/xavix.cpp +++ b/src/mame/machine/xavix.cpp @@ -245,13 +245,71 @@ WRITE8_MEMBER(xavix_state::ioevent_irqack_w) update_irqs(); } +READ8_MEMBER(xavix_state::mouse_7b00_r) +{ + if (m_mouse0x) + { + uint8_t retval = m_mouse0x->read(); + return retval ^ 0x7f; + } + + return 0x00; +} + +READ8_MEMBER(xavix_state::mouse_7b01_r) +{ + if (m_mouse0y) + { + uint8_t retval = m_mouse0y->read(); + return retval ^ 0x7f; + } + return 0x00; +} + +READ8_MEMBER(xavix_state::mouse_7b10_r) +{ + if (m_mouse1x) + { + uint8_t retval = m_mouse1x->read(); + return retval ^ 0x7f; + } + + return 0x00; +} + +READ8_MEMBER(xavix_state::mouse_7b11_r) +{ + if (m_mouse1y) + { + uint8_t retval = m_mouse1y->read(); + return retval ^ 0x7f; + } + + return 0x00; +} +WRITE8_MEMBER(xavix_state::mouse_7b00_w) +{ + LOG("%s: mouse_7b00_w %02x\n", machine().describe_context(), data); +} + +WRITE8_MEMBER(xavix_state::mouse_7b01_w) +{ + LOG("%s: mouse_7b01_w %02x\n", machine().describe_context(), data); +} + +WRITE8_MEMBER(xavix_state::mouse_7b10_w) +{ + LOG("%s: mouse_7b10_w %02x\n", machine().describe_context(), data); +} -WRITE8_MEMBER(xavix_state::adc_7b00_w) +WRITE8_MEMBER(xavix_state::mouse_7b11_w) { - LOG("%s: adc_7b00_w %02x\n", machine().describe_context(), data); + LOG("%s: mouse_7b11_w %02x\n", machine().describe_context(), data); } + + READ8_MEMBER(xavix_state::adc_7b80_r) { LOG("%s: adc_7b80_r\n", machine().describe_context()); @@ -366,7 +424,23 @@ WRITE8_MEMBER(xavix_state::dispctrl_6ff8_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } + uint8_t old_vid = m_video_ctrl; + m_video_ctrl = data & 0x3f; + + // epo_guru needs something like this, otherwise raster IRQ ends up blocking all other IRQs forever + if ((old_vid & 0x10) != (m_video_ctrl & 0x10)) + { + if (!(m_video_ctrl & 0x10)) + { + //printf("callback on scanline %d %d with IRQ enabled\n", m_screen->vpos(), m_screen->hpos()); + m_video_ctrl &= ~0x40; + m_irqsource &= ~0x40; + update_irqs(); + } + } + + // printf("%s: dispctrl_6ff8_w %02x\n", machine().describe_context(), data); } @@ -799,6 +873,49 @@ TIMER_CALLBACK_MEMBER(xavix_state::adc_timer_done) //update_irqs(); } +// epo_guru uses this for ground movement in 3d stages (and other places) +READ8_MEMBER(xavix_state::barrel_r) +{ + if (offset == 0) + { + // or upper bits of result? + logerror("%s: reading shift trigger?!\n", machine().describe_context()); + return 0x00; + } + else + { + uint8_t retdata = m_barrel_params[1]; + logerror("%s: reading shift results/data %02x\n", machine().describe_context(), retdata); + return retdata; + } +} + +WRITE8_MEMBER(xavix_state::barrel_w) +{ + m_barrel_params[offset] = data; + + if (offset == 0) + { + int shift_data = m_barrel_params[1]; + int shift_amount = data & 0x0f; + int shift_param = (data & 0xf0)>>4; + + // this can't be right, shift amount would allow us to shift 16 places this way, this is an 8-bit register, uneless it can shift in and out of a private register? + + if (shift_param & 0x8) + { + m_barrel_params[1] = shift_data >> shift_amount; + } + else + { + m_barrel_params[1] = shift_data << shift_amount; + } + + // offset 0 = trigger + logerror("%s: shifting value %02x by %01x with params %01x\n", machine().describe_context(), shift_data, shift_amount, shift_param); + } +} + READ8_MEMBER(xavix_state::mult_r) @@ -958,6 +1075,7 @@ void xavix_state::machine_start() save_item(NAME(m_sndtimer)); save_item(NAME(m_timer_baseval)); save_item(NAME(m_spritereg)); + save_item(NAME(m_barrel_params)); } void xavix_state::machine_reset() @@ -1033,6 +1151,9 @@ void xavix_state::machine_reset() m_extbusctrl[1] = 0x00; m_extbusctrl[2] = 0x00; + m_barrel_params[0] = 0x00; + m_barrel_params[1] = 0x00; + } typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index e97fdef1162..ca2663aa7d1 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -1837,13 +1837,14 @@ luigibal // (c) 2007 lucky88 // (c) 2007 magforst // (c) 2005 magmerm // (c) 2003 +mchilli // (c) 2008 +mchilliq // (c) 2010 metestrm // (c) 2007 milkin // (c) 2007 mskitty // (c) 2005 mnytree // (c) 2000 +moonfire // (c) 2004 moonwalt // (c) 2007 -mchilli // (c) 2008 -mchilliq // (c) 2010 mrwoo // (c) 200? mystarr // (c) 2002 mysteycm // (c) 2001 @@ -1939,6 +1940,7 @@ whalecshua // (c) 2005 wheregld // (c) 2004 wheregldsp // (c) 2004 wheregldm // (c) 2004 +wheregldq // (c) 2005 whtwater // (c) 2003 wikwin2 // (c) 2006 wldafr // (c) 2002 @@ -8823,6 +8825,7 @@ bionicc2 // 3/1987 (c) 1987 (US) bioniccbl // bootleg bioniccbl2 // bootleg topsecrt // 3/1987 (c) 1987 (Japan) +topsecrt2 // 3/1987 (c) 1987 (Japan) @source:bishi.cpp bishi // GX575 (c) 1996 (Japan) @@ -38548,6 +38551,7 @@ jak_wall // jak_wwe // jak_fan4 // jak_just // +jak_dora // vii // KenSingTon / Jungle Soft / Siatronics Vii wrlshunt // Wireless: Hunting Video Game System wirels60 // Wireless 60 @@ -38559,6 +38563,7 @@ rad_skatp // rad_sktv // rad_crik // rad_fb2 // +mattelcs // @source:vsmile.cpp vsmile // @@ -39703,11 +39708,14 @@ rad_snowp // rad_madf // rad_fb // epo_efdx // +epo_sdb // +epo_guru // rad_rh // has_wamg // ekara // ekaraa // ekaraj // +ekaraphs // ddrfammt // popira // taikodp // @@ -40117,6 +40125,10 @@ zx80 // 1980 Sinclair ZX-80 zx81 // 1981 Sinclair ZX-81 zx97 // +@source:testpat.cpp +tp1983 +tp1985 + @source:vgmplay.cpp vgmplay diff --git a/src/mame/video/3dom2_te.cpp b/src/mame/video/3dom2_te.cpp index bd95c0fac86..d39836a40ec 100644 --- a/src/mame/video/3dom2_te.cpp +++ b/src/mame/video/3dom2_te.cpp @@ -3053,9 +3053,9 @@ uint8_t m2_te_device::alu_calc(uint16_t a, uint16_t b) switch (j) { case 0: cinv |= (cntl & 1); break; - case 1: cinv |= (cntl & 2) && 1; break; - case 2: cinv |= (cntl & 4) && 1; break; - case 3: cinv |= (cntl & 8) && 1; break; + case 1: cinv |= ((cntl & 2) != 0); break; + case 2: cinv |= ((cntl & 4) != 0); break; + case 3: cinv |= ((cntl & 8) != 0); break; } cinv <<= 1; diff --git a/src/mame/video/thomson.cpp b/src/mame/video/thomson.cpp index ff72cbfe2d6..377b5a48c4e 100644 --- a/src/mame/video/thomson.cpp +++ b/src/mame/video/thomson.cpp @@ -568,6 +568,42 @@ UPDATE_LOW( bitmap16 ) END_UPDATE +/* 160x200, 16-colors, no constraint, alternate encoding, undocumented, tested */ + +static const unsigned tbl_bit16[4][4] = { + { 0, 2, 8, 10 }, + { 1, 3, 9, 11 }, + { 4, 6, 12, 14 }, + { 5, 7, 13, 15 } +}; + +UPDATE_HI( bitmap16alt ) +{ + unsigned p0 = tbl_bit16[ramb >> 6][rama >> 6]; + unsigned p1 = tbl_bit16[(ramb >> 4) & 3][(rama >> 4) & 3]; + unsigned p2 = tbl_bit16[(ramb >> 2) & 3][(rama >> 2) & 3]; + unsigned p3 = tbl_bit16[ramb & 3][rama & 3]; + dst[ 0] = dst[ 1] = dst[ 2] = dst[ 3] = pal[ p0 ]; + dst[ 4] = dst[ 5] = dst[ 6] = dst[ 7] = pal[ p1 ]; + dst[ 8] = dst[ 9] = dst[10] = dst[11] = pal[ p2 ]; + dst[12] = dst[13] = dst[14] = dst[15] = pal[ p3 ]; +} +END_UPDATE + +UPDATE_LOW( bitmap16alt ) +{ + unsigned p0 = tbl_bit16[ramb >> 6][rama >> 6]; + unsigned p1 = tbl_bit16[(ramb >> 4) & 3][(rama >> 4) & 3]; + unsigned p2 = tbl_bit16[(ramb >> 2) & 3][(rama >> 2) & 3]; + unsigned p3 = tbl_bit16[ramb & 3][rama & 3]; + dst[0] = dst[1] = pal[ p0 ]; + dst[2] = dst[3] = pal[ p1 ]; + dst[4] = dst[5] = pal[ p2 ]; + dst[6] = dst[7] = pal[ p3 ]; +} +END_UPDATE + + /* 640x200 (80 text column), 2-colors, no constraint */ @@ -785,7 +821,8 @@ static const thom_scandraw thom_scandraw_funcs[THOM_VMODE_NB][2] = FUN(to770), FUN(mo5), FUN(bitmap4), FUN(bitmap4alt), FUN(mode80), FUN(bitmap16), FUN(page1), FUN(page2), FUN(overlay), FUN(overlay3), FUN(to9), FUN(mode80_to9), - FUN(bitmap4althalf), FUN(mo5alt), FUN(overlayhalf), + FUN(bitmap4althalf), FUN(mo5alt), FUN(overlayhalf), + FUN(bitmap16alt) }; |