From 692d1f70699cbb65ab423631faed3e1c78c47dcb Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 24 Aug 2024 19:09:13 +0200 Subject: [PATCH 01/44] s14001a: level triggered 1-bit handler does not make sense, sg1000a: small note update --- src/devices/sound/s14001a.cpp | 4 ++-- src/mame/sega/sg1000a.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/devices/sound/s14001a.cpp b/src/devices/sound/s14001a.cpp index 0c54622e46d..a27ae2210da 100644 --- a/src/devices/sound/s14001a.cpp +++ b/src/devices/sound/s14001a.cpp @@ -333,9 +333,9 @@ void s14001a_device::data_w(u8 data) void s14001a_device::start_w(int state) { m_stream->update(); - m_bStart = (state != 0); - if (m_bStart) + if (state && !m_bStart) m_uStateP1 = states::WORDWAIT; + m_bStart = (state != 0); } void s14001a_device::set_clock(u32 clock) diff --git a/src/mame/sega/sg1000a.cpp b/src/mame/sega/sg1000a.cpp index 9f98d03f096..17bd6185a89 100644 --- a/src/mame/sega/sg1000a.cpp +++ b/src/mame/sega/sg1000a.cpp @@ -1,9 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Tomasz Slanina /********************************************************* -Sega hardware based on their SG-1000 console -Driver by Tomasz Slanina +Sega arcade hardware based on their SG-1000 console +Driver by Tomasz Slanina Supported games : - Champion Boxing @@ -285,10 +285,11 @@ namespace { class sg1000a_state : public driver_device { public: - sg1000a_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + sg1000a_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_decrypted_opcodes(*this, "decrypted_opcodes") { } + m_decrypted_opcodes(*this, "decrypted_opcodes") + { } void sderbys(machine_config &config); void sderby2s(machine_config &config); @@ -521,6 +522,7 @@ void sg1000a_state::sderbys(machine_config &config) sderby2s(config); m_maincpu->set_addrmap(AS_OPCODES, &sg1000a_state::decrypted_opcodes_map); } + /************************************* * * ROM definitions From 3a817b47da27087f441e8bb6d7dcd7ba9d9b51a3 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 24 Aug 2024 19:16:09 +0200 Subject: [PATCH 02/44] osd/input_common: increase event queue size, input_rawinput/win32: empty event queue on resets, input_raw: set RIDEV_INPUTSINK flag because of missed keyup events, causing stuck inputs (MT8789) --- src/osd/modules/input/input_common.h | 10 ++++++++-- src/osd/modules/input/input_rawinput.cpp | 11 ++++------- src/osd/modules/input/input_win32.cpp | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/osd/modules/input/input_common.h b/src/osd/modules/input/input_common.h index 28e53fb0ccb..73ddd2bf936 100644 --- a/src/osd/modules/input/input_common.h +++ b/src/osd/modules/input/input_common.h @@ -91,7 +91,7 @@ template class event_based_device : public device_info { private: - static inline constexpr unsigned DEFAULT_EVENT_QUEUE_SIZE = 20; + static inline constexpr unsigned DEFAULT_EVENT_QUEUE_SIZE = 64; std::queue m_event_queue; @@ -117,7 +117,7 @@ class event_based_device : public device_info m_event_queue.pop(); } - void virtual poll(bool relative_reset) override + virtual void poll(bool relative_reset) override { std::lock_guard scope_lock(m_device_lock); @@ -128,6 +128,12 @@ class event_based_device : public device_info m_event_queue.pop(); } } + + virtual void reset() override + { + std::lock_guard scope_lock(m_device_lock); + std::queue().swap(m_event_queue); + } }; diff --git a/src/osd/modules/input/input_rawinput.cpp b/src/osd/modules/input/input_rawinput.cpp index 1bcbb38f781..5b6813dcd59 100644 --- a/src/osd/modules/input/input_rawinput.cpp +++ b/src/osd/modules/input/input_rawinput.cpp @@ -317,6 +317,7 @@ class rawinput_keyboard_device : public rawinput_device virtual void reset() override { + rawinput_device::reset(); m_pause_pressed = std::chrono::steady_clock::time_point::min(); memset(&m_keyboard, 0, sizeof(m_keyboard)); m_e1 = 0xffff; @@ -325,7 +326,6 @@ class rawinput_keyboard_device : public rawinput_device virtual void poll(bool relative_reset) override { rawinput_device::poll(relative_reset); - if (m_keyboard.state[0x80 | 0x45] && (std::chrono::steady_clock::now() > (m_pause_pressed + std::chrono::milliseconds(30)))) m_keyboard.state[0x80 | 0x45] = 0x00; } @@ -452,6 +452,7 @@ class rawinput_mouse_device : public rawinput_device virtual void reset() override { + rawinput_device::reset(); memset(&m_mouse, 0, sizeof(m_mouse)); m_x = m_y = m_v = m_h = 0; } @@ -498,11 +499,9 @@ class rawinput_mouse_device : public rawinput_device virtual void process_event(RAWINPUT const &rawinput) override { - // If this data was intended for a rawinput mouse if (rawinput.data.mouse.usFlags == MOUSE_MOVE_RELATIVE) { - m_x += rawinput.data.mouse.lLastX * input_device::RELATIVE_PER_PIXEL; m_y += rawinput.data.mouse.lLastY * input_device::RELATIVE_PER_PIXEL; @@ -559,6 +558,7 @@ class rawinput_lightgun_device : public rawinput_device virtual void reset() override { + rawinput_device::reset(); memset(&m_lightgun, 0, sizeof(m_lightgun)); m_v = 0; m_h = 0; @@ -608,7 +608,6 @@ class rawinput_lightgun_device : public rawinput_device // If this data was intended for a rawinput lightgun if (rawinput.data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE) { - // update the X/Y positions m_lightgun.lX = normalize_absolute_axis(rawinput.data.mouse.lLastX, 0, input_device::ABSOLUTE_MAX); m_lightgun.lY = normalize_absolute_axis(rawinput.data.mouse.lLastY, 0, input_device::ABSOLUTE_MAX); @@ -703,9 +702,7 @@ class rawinput_module : public wininput_module RAWINPUTDEVICE registration; registration.usUsagePage = usagepage(); registration.usUsage = usage(); - registration.dwFlags = RIDEV_DEVNOTIFY; - if (background_input()) - registration.dwFlags |= RIDEV_INPUTSINK; + registration.dwFlags = RIDEV_DEVNOTIFY | RIDEV_INPUTSINK; registration.hwndTarget = dynamic_cast(*osd_common_t::window_list().front()).platform_window(); // register the device diff --git a/src/osd/modules/input/input_win32.cpp b/src/osd/modules/input/input_win32.cpp index a6740979c16..921c902ad31 100644 --- a/src/osd/modules/input/input_win32.cpp +++ b/src/osd/modules/input/input_win32.cpp @@ -46,6 +46,7 @@ class win32_keyboard_device : public event_based_device virtual void reset() override { + event_based_device::reset(); memset(&m_keyboard, 0, sizeof(m_keyboard)); } @@ -219,6 +220,7 @@ class win32_mouse_device : public event_based_device virtual void reset() override { + event_based_device::reset(); memset(&m_mouse, 0, sizeof(m_mouse)); memset(&m_win32_mouse, 0, sizeof(m_win32_mouse)); m_vscroll = m_hscroll = 0; @@ -303,6 +305,7 @@ class win32_lightgun_device_base : public event_based_device Date: Sun, 25 Aug 2024 08:03:48 +0200 Subject: [PATCH 03/44] igs/igs_m027_link.cpp: renamed Manguan Caishen to Manguan Caishen 2, notes on how to get it to show the wait link screen --- src/mame/igs/igs_m027_link.cpp | 46 ++++++++++++++++++---------------- src/mame/mame.lst | 4 +-- src/mame/seibu/seibuspi.cpp | 4 +-- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/mame/igs/igs_m027_link.cpp b/src/mame/igs/igs_m027_link.cpp index 4d52674988c..a8bd4731db5 100644 --- a/src/mame/igs/igs_m027_link.cpp +++ b/src/mame/igs/igs_m027_link.cpp @@ -5,12 +5,16 @@ IGS ARM7 (IGS027A) based mahjong / gambling platform(s) with link support Keeping them separate from igs_m027.cpp and igs017.cpp for now. -NOTE: linking between mgcsh and mgcsl has been verified on real hw, while linking +NOTE: linking between mgcs2h and mgcs2l has been verified on real hw, while linking between cjslh and cjsll doesn't work on real hw for some reason. +The two dumped extension games are really similar to mgdh in igs017.cpp code-wise, +you can get them to the wait link screen just by implementing the mgdh's IGS MUX +stuff. + ********************************************************************************* -Manguan Caishen, HOST PCB (IGS 1999) +Manguan Caishen 2, HOST PCB (IGS 1999) Cai Jin Shen Long, HOST PCB (IGS 1999) These boards are housed in a metal box. @@ -30,7 +34,7 @@ The PCB has a 62-way connector on it but it not accessible to the outside of the PCB Layout ---------- -IGS PCB 0219-04 (Manguan Caishen, HOST) +IGS PCB 0219-04 (Manguan Caishen 2, HOST) IGS PCB 0219-1 (Cai Jin Shen Long, HOST) |------------------------------------------------------------------| |DIN5 DB9 DB25 | @@ -53,7 +57,7 @@ IGS PCB 0219-1 (Cai Jin Shen Long, HOST) |---------------------------------------| |-----------------| |----| Notes: * - On Cai Jin Shen Long, the V3021 and 32.768kHz crystal are replaced with a ST M48T08 NVRAM (the battery is dead and holds no data). -EPROM.U13 - Manguan Caishen - labelled 'V206CMMBOX' +EPROM.U13 - Manguan Caishen 2 - labelled 'V206CMMBOX' - Cai Jin Shen Long - labelled 'V-106CSM' T518B - Reset IC JP10/11 - 2 pins (each) that get tied together when the key switches on the side of the metal box are locked @@ -61,16 +65,16 @@ EPROM.U13 - Manguan Caishen - labelled 'V206CMMBOX' 62256 - 32kx8-bit SRAM SW1 - 8-position DIP Switch V3021 - NVRAM Battery Supervisor IC - IGS025 - Manguan Caishen - labelled 'S8' + IGS025 - Manguan Caishen 2 - labelled 'S8' - Cai Jin Shen Long - labelled 'S2' - IGS027A - Manguan Caishen - labelled 'Y7' + IGS027A - Manguan Caishen 2 - labelled 'Y7' - Cai Jin Shen Long - labelled 'S2' ********************************************************************************* ********************************************************************************* -Manguan Caishen (Link Version, Extension), IGS 1999 +Manguan Caishen 2 (Link Version, Extension), IGS 1999 Cai Jin Shen Long (Link Version, Extension), IGS 1999 These boards connect to the HOST board running the same game. @@ -162,10 +166,10 @@ class extension_state : public driver_device { } void cjsll(machine_config &config); - void mgcsl(machine_config &config); + void mgcs2l(machine_config &config); void init_cjsll(); - void init_mgcsl(); + void init_mgcs2l(); protected: virtual void video_start() override; @@ -178,7 +182,7 @@ class extension_state : public driver_device TIMER_DEVICE_CALLBACK_MEMBER(interrupt); void cjsll_map(address_map &map); - void mgcsl_map(address_map &map); + void mgcs2l_map(address_map &map); void decrypt(); }; @@ -210,7 +214,7 @@ void extension_state::cjsll_map(address_map &map) //map(0xa12001, 0xa12001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); } -void extension_state::mgcsl_map(address_map &map) +void extension_state::mgcs2l_map(address_map &map) { map(0x000000, 0x07ffff).rom(); map(0x600000, 0x603fff).ram(); @@ -352,15 +356,15 @@ void extension_state::cjsll(machine_config &config) OKIM6295(config, "oki", 22_MHz_XTAL / 22, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); } -void extension_state::mgcsl(machine_config &config) +void extension_state::mgcs2l(machine_config &config) { cjsll(config), - m_maincpu->set_addrmap(AS_PROGRAM, &extension_state::mgcsl_map); + m_maincpu->set_addrmap(AS_PROGRAM, &extension_state::mgcs2l_map); } -ROM_START( mgcsh ) +ROM_START( mgcs2h ) ROM_REGION( 0x04000, "maincpu", 0 ) // Internal ROM of IGS027A type G ARM based MCU ROM_LOAD( "y7_027a.bin", 0x00000, 0x4000, CRC(3e726eeb) SHA1(41b4e5f8a9d35b82b1a62029b34c1e19e188a3bc) ) @@ -378,7 +382,7 @@ ROM_START( cjslh ) ROM_LOAD( "v-106csm.u13", 0x00000, 0x10000, CRC(5b3f3446) SHA1(1d5b9523ac7f221eb7cc2e5db90cc859c640cc18) ) ROM_END -ROM_START( mgcsl ) +ROM_START( mgcs2l ) ROM_REGION( 0x80000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "p2000.u19", 0x00000, 0x80000, CRC(05a065e8) SHA1(5302fcb272c1561380bce57d840ddb5cc45b9497) ) @@ -462,7 +466,7 @@ void extension_state::decrypt() rom[i] = x; } - // TODO: tiles don't seem scrambled, sprites to be verified + // TODO: tiles are scrambled in a different way from what's already supported, sprites to be verified } void extension_state::init_cjsll() @@ -475,7 +479,7 @@ void extension_state::init_cjsll() rom[0x3a994 / 2] = 0x4e71; } -void extension_state::init_mgcsl() +void extension_state::init_mgcs2l() { decrypt(); @@ -489,9 +493,9 @@ void extension_state::init_mgcsl() // hosts -GAME( 1999, mgcsh, 0, host, host, host_state, empty_init, ROT0, "IGS", "Manguan Caishen (link version, host)", MACHINE_IS_SKELETON ) -GAME( 1999, cjslh, 0, host, host, host_state, empty_init, ROT0, "IGS", "Cai Jin Shen Long (link version, host)", MACHINE_IS_SKELETON ) +GAME( 1999, mgcs2h, 0, host, host, host_state, empty_init, ROT0, "IGS", "Manguan Caishen 2 (link version, host)", MACHINE_IS_SKELETON ) +GAME( 1999, cjslh, 0, host, host, host_state, empty_init, ROT0, "IGS", "Cai Jin Shen Long (link version, host)", MACHINE_IS_SKELETON ) // extensions -GAME( 1999, mgcsl, 0, mgcsl, extension, extension_state, init_mgcsl, ROT0, "IGS", "Manguan Caishen (link version, extension, S110CN)", MACHINE_IS_SKELETON ) -GAME( 1999, cjsll, 0, cjsll, extension, extension_state, init_cjsll, ROT0, "IGS", "Cai Jin Shen Long (link version, extension, S111CN)", MACHINE_IS_SKELETON ) +GAME( 1999, mgcs2l, 0, mgcs2l, extension, extension_state, init_mgcs2l, ROT0, "IGS", "Manguan Caishen 2 (link version, extension, S110CN)", MACHINE_IS_SKELETON ) +GAME( 1999, cjsll, 0, cjsll, extension, extension_state, init_cjsll, ROT0, "IGS", "Cai Jin Shen Long (link version, extension, S111CN)", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f33810924ba..44d5e4867e0 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -20254,8 +20254,8 @@ zhongguo // (c) 2000 @source:igs/igs_m027_link.cpp cjslh cjsll -mgcsh -mgcsl +mgcs2h +mgcs2l @source:igs/igs_m027xa.cpp crzybugs // (c) 2009 diff --git a/src/mame/seibu/seibuspi.cpp b/src/mame/seibu/seibuspi.cpp index 4e3415828b4..f2be8e221e3 100644 --- a/src/mame/seibu/seibuspi.cpp +++ b/src/mame/seibu/seibuspi.cpp @@ -554,9 +554,9 @@ SXX2C ROM SUB10 (C)1998 ------------------------------------- Notes: * : These ROMs are surface mounted -61256 : 32k x8 SRAM (x2) +61256 : 32k x8 SRAM (x2). These are tied to the RISE11 chip with RAM A11-A14 tied to vcc/gnd so + these RAMs are configured as 2kB each and the RISE11 has a total of 4kB connected to it. RISE11: SEIBU custom stamped 'RISE11' (QFP240) - A11-A14 are tied to vcc/gnd so the RAM connected to the RISE11 is configured as 2kB. PAL1 : PALCE 16V8 stamped 'SPI ROM 10-2' PAL2 : PALCE 16V8 stamped 'SPI ROM 10-1' From bf2e3484a441494378595ba946985c57db0c5098 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sun, 25 Aug 2024 09:45:16 +0200 Subject: [PATCH 04/44] epson/qx10.cpp: reinstate visible area check for 7220 text --- src/mame/epson/qx10.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mame/epson/qx10.cpp b/src/mame/epson/qx10.cpp index e98790a30a1..755c108ef30 100644 --- a/src/mame/epson/qx10.cpp +++ b/src/mame/epson/qx10.cpp @@ -256,7 +256,8 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( qx10_state::hgdc_draw_text ) int tile = m_video_ram[((addr+x)*2) >> 1] & 0xff; int attr = m_video_ram[((addr+x)*2) >> 1] >> 8; - uint8_t color = (m_color_mode) ? 1 : (attr & 4) ? 2 : 1; /* TODO: color mode */ + // TODO: color mode support + uint8_t color = (m_color_mode) ? 1 : (attr & 4) ? 2 : 1; for (int yi = 0; yi < lr; yi++) { @@ -265,10 +266,11 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( qx10_state::hgdc_draw_text ) if(attr & 8) tile_data^=0xff; - if(cursor_on && cursor_addr == addr+x) //TODO + if(cursor_on && cursor_addr == addr+x) tile_data^=0xff; - if(attr & 0x80 && m_screen->frame_number() & 0x10) //TODO: check for blinking interval + //TODO: check for blinking interval + if(attr & 0x80 && m_screen->frame_number() & 0x10) tile_data=0; for (int xi = 0; xi < 8; xi++) @@ -276,6 +278,10 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( qx10_state::hgdc_draw_text ) int res_x = ((x * 8) + xi); int res_y = y + yi; + // TODO: cpm22mf:flop2 display random character test will go out of bounds here + if(!m_screen->visible_area().contains(res_x, res_y)) + continue; + uint8_t pen; if(yi >= 16) pen = 0; @@ -294,6 +300,7 @@ uint32_t qx10_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, m_bitmap.fill(m_palette->black_pen(), cliprect); m_hgdc->screen_update(screen, m_bitmap, cliprect); + // cpm22mf:flop2 will test this under Zoom Test const u32 pixel_size = 0x10000 / (m_zoom+1); copyrozbitmap( bitmap, cliprect, m_bitmap, From b989286652053a75f60aa71b3807c88f45d194dd Mon Sep 17 00:00:00 2001 From: as-tb-dev <178102874+as-tb-dev@users.noreply.github.com> Date: Sun, 25 Aug 2024 09:32:30 -0400 Subject: [PATCH 05/44] a2bus: Add support for Wico Trackball, Wico Command Control Joystick Adapter, and 4 paddles connected to the Sirius JoyPort to the Apple ][/][+ (#12666) --- scripts/src/bus.lua | 6 + src/devices/bus/a2bus/a2wico_trackball.cpp | 248 +++++++++++++++++++ src/devices/bus/a2bus/a2wico_trackball.h | 20 ++ src/devices/bus/a2bus/cards.cpp | 4 + src/devices/bus/a2gameio/gameio.cpp | 4 + src/devices/bus/a2gameio/joyport_paddles.cpp | 133 ++++++++++ src/devices/bus/a2gameio/joyport_paddles.h | 19 ++ src/devices/bus/a2gameio/wico_joystick.cpp | 128 ++++++++++ src/devices/bus/a2gameio/wico_joystick.h | 20 ++ 9 files changed, 582 insertions(+) create mode 100644 src/devices/bus/a2bus/a2wico_trackball.cpp create mode 100644 src/devices/bus/a2bus/a2wico_trackball.h create mode 100644 src/devices/bus/a2gameio/joyport_paddles.cpp create mode 100644 src/devices/bus/a2gameio/joyport_paddles.h create mode 100644 src/devices/bus/a2gameio/wico_joystick.cpp create mode 100644 src/devices/bus/a2gameio/wico_joystick.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 37db2a904a8..c6d4b7f1cb5 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -3027,6 +3027,8 @@ if (BUSES["A2BUS"]~=null) then MAME_DIR .. "src/devices/bus/a2bus/a2videoterm.h", MAME_DIR .. "src/devices/bus/a2bus/a2vulcan.cpp", MAME_DIR .. "src/devices/bus/a2bus/a2vulcan.h", + MAME_DIR .. "src/devices/bus/a2bus/a2wico_trackball.cpp", + MAME_DIR .. "src/devices/bus/a2bus/a2wico_trackball.h", MAME_DIR .. "src/devices/bus/a2bus/a2zipdrive.cpp", MAME_DIR .. "src/devices/bus/a2bus/a2zipdrive.h", MAME_DIR .. "src/devices/bus/a2bus/ace2x00.cpp", @@ -3129,10 +3131,14 @@ if (BUSES["A2GAMEIO"]~=null) then MAME_DIR .. "src/devices/bus/a2gameio/joystick.h", MAME_DIR .. "src/devices/bus/a2gameio/joyport.cpp", MAME_DIR .. "src/devices/bus/a2gameio/joyport.h", + MAME_DIR .. "src/devices/bus/a2gameio/joyport_paddles.cpp", + MAME_DIR .. "src/devices/bus/a2gameio/joyport_paddles.h", MAME_DIR .. "src/devices/bus/a2gameio/paddles.cpp", MAME_DIR .. "src/devices/bus/a2gameio/paddles.h", MAME_DIR .. "src/devices/bus/a2gameio/gizmo.cpp", MAME_DIR .. "src/devices/bus/a2gameio/gizmo.h", + MAME_DIR .. "src/devices/bus/a2gameio/wico_joystick.cpp", + MAME_DIR .. "src/devices/bus/a2gameio/wico_joystick.h", } end diff --git a/src/devices/bus/a2bus/a2wico_trackball.cpp b/src/devices/bus/a2bus/a2wico_trackball.cpp new file mode 100644 index 00000000000..29b3f7ccbec --- /dev/null +++ b/src/devices/bus/a2bus/a2wico_trackball.cpp @@ -0,0 +1,248 @@ +// license:BSD-3-Clause +/********************************************************************* + + a2wicotrackball.cpp + + Implemention of the Wico Trackball + + Wico Trackball Interface PCB + Wico 1983 + + This is a trackball interface for the Apple II + + For API information, see: + Track Balls, Bill Morgan, Apple Assembly Line, Vol. 3, Iss. 9, June 1983 + +*********************************************************************/ + +#include "emu.h" +#include "a2wico_trackball.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class a2bus_wicotrackball_device: + public device_t, + public device_a2bus_card_interface +{ +public: + // construction/destruction + a2bus_wicotrackball_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // optional information overrides + virtual ioport_constructor device_input_ports() const override; + +protected: + a2bus_wicotrackball_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; + virtual void device_reset() override; + + // overrides of standard a2bus slot functions + virtual uint8_t read_c0nx(uint8_t offset) override; + virtual void write_c0nx(uint8_t offset, uint8_t data) override; + + required_ioport m_wicotrackballb; + required_ioport_array<2> m_wicotrackballxy; + +private: + bool m_speed[2]; + uint8_t m_buttons; + bool m_wraparound; + uint8_t m_axis[2]; + uint32_t m_last_pos[2]; + uint8_t read_position(int axis); +}; + +/*************************************************************************** + CONSTANTS +***************************************************************************/ + +#define WICOTRACKBALL_BUTTONS_TAG "a2wicotrackball_buttons" +#define WICOTRACKBALL_XAXIS_TAG "a2wicotrackball_x" +#define WICOTRACKBALL_YAXIS_TAG "a2wicotrackball_y" + +#define WICOTRACKBALL_POS_UNINIT 0xffffffff /* default out-of-range position */ + +/*************************************************************************** + GLOBAL VARIABLES +***************************************************************************/ + +DEFINE_DEVICE_TYPE_PRIVATE(A2BUS_WICOTRACKBALL, device_a2bus_card_interface, a2bus_wicotrackball_device, "a2wicotrackball", "Apple II Wico Trackball Card") + +static INPUT_PORTS_START( wicotrackball ) + PORT_START(WICOTRACKBALL_BUTTONS_TAG) /* Trackball - buttons */ + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Trackball Button 1") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Trackball Button 2") PORT_CODE(MOUSECODE_BUTTON2) + + PORT_START(WICOTRACKBALL_XAXIS_TAG) /* Trackball - X AXIS */ + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_PLAYER(1) + + PORT_START(WICOTRACKBALL_YAXIS_TAG) /* Trackball - Y AXIS */ + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(40) PORT_KEYDELTA(0) PORT_PLAYER(1) +INPUT_PORTS_END + + +/*************************************************************************** + DEVICE CONFIGURATION +***************************************************************************/ + +/*------------------------------------------------- + input_ports - device-specific input ports +-------------------------------------------------*/ + +ioport_constructor a2bus_wicotrackball_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(wicotrackball); +} + +/*------------------------------------------------- + device_add_mconfig - device-specific + machine configurations +-------------------------------------------------*/ + +void a2bus_wicotrackball_device::device_add_mconfig(machine_config &config) +{ +} + +/*************************************************************************** + LIVE DEVICE +***************************************************************************/ + +a2bus_wicotrackball_device::a2bus_wicotrackball_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), + device_a2bus_card_interface(mconfig, *this), + m_wicotrackballb(*this, WICOTRACKBALL_BUTTONS_TAG), m_wicotrackballxy(*this, { WICOTRACKBALL_XAXIS_TAG, WICOTRACKBALL_YAXIS_TAG }), + m_speed{ false, false }, m_buttons{ 0 }, m_wraparound{false}, m_axis{ 0, 0 }, + m_last_pos{ WICOTRACKBALL_POS_UNINIT, WICOTRACKBALL_POS_UNINIT } +{ +} + +a2bus_wicotrackball_device::a2bus_wicotrackball_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + a2bus_wicotrackball_device(mconfig, A2BUS_WICOTRACKBALL, tag, owner, clock) +{ +} + +/*------------------------------------------------- + device_start - device-specific startup +-------------------------------------------------*/ + +void a2bus_wicotrackball_device::device_start() +{ + // register save state variables + save_item(NAME(m_speed)); + save_item(NAME(m_wraparound)); + save_item(NAME(m_buttons)); + save_item(NAME(m_axis)); + save_item(NAME(m_last_pos)); +} + +void a2bus_wicotrackball_device::device_reset() +{ + m_speed[0] = m_speed[1] = false; + m_wraparound = false; + m_buttons = 0; + m_axis[0] = m_axis[1] = 0; +} + +uint8_t a2bus_wicotrackball_device::read_position(int axis) +{ + int speed_scale = (1 << m_speed[0]) << (m_speed[1] * 2); + uint8_t temp_axis = 0; + int diff_pos = 0; + int cur_pos = m_wicotrackballxy[axis]->read(); + + if (m_last_pos[axis] == WICOTRACKBALL_POS_UNINIT) { + m_last_pos[axis] = cur_pos; + } + diff_pos = cur_pos - m_last_pos[axis]; + // wrap-around the positoin + if (diff_pos > 0x7f) { + diff_pos -= 0x100; + } else if (diff_pos < -0x80) { + diff_pos += 0x100; + } + + if (m_wraparound) { + temp_axis = m_axis[axis] + diff_pos / speed_scale;; + } else { + if ((m_axis[axis] + diff_pos / speed_scale) < 0) { + temp_axis = 0; + } else if ((m_axis[axis] + diff_pos / speed_scale) > 0xff) { + temp_axis = 0xff; + } else { + temp_axis = m_axis[axis] + diff_pos / speed_scale; + } + } + m_last_pos[axis] = cur_pos; + m_axis[axis] = temp_axis; + + return m_axis[axis]; +} + +/*------------------------------------------------- + read_c0nx - called for reads from this card's c0nx space +-------------------------------------------------*/ + +uint8_t a2bus_wicotrackball_device::read_c0nx(uint8_t offset) +{ + uint8_t data = 0; + + switch (offset) { + case 0x0: /* read X-position */ + data = read_position(0); + break; + case 0x1: /* read Y-position */ + data = read_position(1); + break; + case 0x2: /* set Bounded/Wraparound Soft Switch to Bounded */ + m_wraparound = false; + break; + case 0x3: /* set Bounded/Wraparound Soft Switch to Wraparound */ + m_wraparound = true; + break; + case 0x6: /* read buttons */ + data = m_buttons = m_wicotrackballb->read(); + break; + + } + return data; +} + +/*------------------------------------------------- + write_c0nx - called for writes to this card's c0nx space +-------------------------------------------------*/ + +void a2bus_wicotrackball_device::write_c0nx(uint8_t offset, uint8_t data) +{ + switch (offset) { + case 0x0: /* set X-position */ + m_last_pos[0] = m_wicotrackballxy[0]->read(); + m_axis[0] = data; + break; + case 0x1: /* set Y-position */ + m_last_pos[1] = m_wicotrackballxy[1]->read(); + m_axis[1] = data; + break; + case 0x2: /* set Bounded/Wraparound Soft Switch to Bounded */ + m_wraparound = false; + break; + case 0x3: /* set Bounded/Wraparound Soft Switch to Wraparound */ + m_wraparound = true; + break; + case 0x4: /* set Speed 1/2 Soft Switch to Speed 1 */ + m_speed[0] = false; + break; + case 0x5: /* set Speed 1/2 Soft Switch to Speed 2 */ + m_speed[0] = true; + break; + case 0x6: /* set Speed 3/4 Soft Switch to Speed 3 */ + m_speed[1] = false; + break; + case 0x7: /* set Speed 3/4 Soft Switch to Speed 4 */ + m_speed[1] = true; + break; + } +} diff --git a/src/devices/bus/a2bus/a2wico_trackball.h b/src/devices/bus/a2bus/a2wico_trackball.h new file mode 100644 index 00000000000..9fb689bfe8f --- /dev/null +++ b/src/devices/bus/a2bus/a2wico_trackball.h @@ -0,0 +1,20 @@ +// license:BSD-3-Clause +/********************************************************************* + + a2wicotrackball.h + + Implemention of the Wico Apple II Trackball + +*********************************************************************/ + +#ifndef MAME_DEVICES_A2BUS_A2WICO_TRACKBALL_H +#define MAME_DEVICES_A2BUS_A2WICO_TRACKBALL_H + +#pragma once + +#include "a2bus.h" + +// device type definition +DECLARE_DEVICE_TYPE(A2BUS_WICOTRACKBALL, device_a2bus_card_interface) + +#endif // MAME_DEVICES_A2BUS_A2WICO_TRACKBALL_H diff --git a/src/devices/bus/a2bus/cards.cpp b/src/devices/bus/a2bus/cards.cpp index 5ab855ddf5e..c4c76a421ca 100644 --- a/src/devices/bus/a2bus/cards.cpp +++ b/src/devices/bus/a2bus/cards.cpp @@ -73,6 +73,7 @@ #include "uniprint.h" #include "uthernet.h" #include "vistaa800.h" +#include "a2wico_trackball.h" void apple2_slot0_cards(device_slot_interface &device) @@ -153,6 +154,7 @@ void apple2_cards(device_slot_interface &device) device.option_add("grafex", A2BUS_GRAFEX); // Grafex card (uPD7220 graphics) device.option_add("excel9", A2BUS_EXCEL9); // Excel-9 (6809 coprocessor) device.option_add("vistaa800", A2BUS_VISTAA800); // Vista A800 8" Disk Controller Card + device.option_add("wicotrackball", A2BUS_WICOTRACKBALL); // Wico Trackball } void apple2e_cards(device_slot_interface &device) @@ -234,6 +236,7 @@ void apple2e_cards(device_slot_interface &device) device.option_add("pdromdrive", A2BUS_PRODOSROMDRIVE); // ProDOS ROM Drive device.option_add("superdrive", A2BUS_SUPERDRIVE); // Apple II 3.5" Disk Controller device.option_add("vistaa800", A2BUS_VISTAA800); // Vista A800 8" Disk Controller Card + device.option_add("wicotrackball", A2BUS_WICOTRACKBALL); // Wico Trackball } void apple2gs_cards(device_slot_interface &device) @@ -309,6 +312,7 @@ void apple2gs_cards(device_slot_interface &device) device.option_add("grafex", A2BUS_GRAFEX); // Grafex card (uPD7220 graphics) device.option_add("pdromdrive", A2BUS_PRODOSROMDRIVE); // ProDOS ROM Drive device.option_add("superdrive", A2BUS_SUPERDRIVE); // Apple II 3.5" Disk Controller + device.option_add("wicotrackball", A2BUS_WICOTRACKBALL); // Wico Trackball } void apple3_cards(device_slot_interface &device) diff --git a/src/devices/bus/a2gameio/gameio.cpp b/src/devices/bus/a2gameio/gameio.cpp index 6645458f523..e0eb1405530 100644 --- a/src/devices/bus/a2gameio/gameio.cpp +++ b/src/devices/bus/a2gameio/gameio.cpp @@ -52,9 +52,11 @@ #include "bus/a2gameio/gameio.h" #include "bus/a2gameio/joystick.h" #include "bus/a2gameio/joyport.h" +#include "bus/a2gameio/joyport_paddles.h" #include "bus/a2gameio/computereyes.h" #include "bus/a2gameio/paddles.h" #include "bus/a2gameio/gizmo.h" +#include "bus/a2gameio/wico_joystick.h" //************************************************************************** // CONNECTOR DEVICE IMPLEMENTATION @@ -76,8 +78,10 @@ void apple2_gameio_device::iiandplus_options(device_slot_interface &slot) slot.option_add("joy", APPLE2_JOYSTICK); slot.option_add("paddles", APPLE2_PADDLES); slot.option_add("joyport", APPLE2_JOYPORT); + slot.option_add("joyport_paddles", APPLE2_JOYPORT_PADDLES); slot.option_add("gizmo", APPLE2_GIZMO); slot.option_add("compeyes", APPLE2_COMPUTEREYES); + slot.option_add("wicojoy", APPLE2_WICO_JOYSTICK); } void apple2_gameio_device::default_options(device_slot_interface &slot) diff --git a/src/devices/bus/a2gameio/joyport_paddles.cpp b/src/devices/bus/a2gameio/joyport_paddles.cpp new file mode 100644 index 00000000000..c23889dd230 --- /dev/null +++ b/src/devices/bus/a2gameio/joyport_paddles.cpp @@ -0,0 +1,133 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/********************************************************************* + + Sirius JoyPort with 4 Apple II paddles connected + +*********************************************************************/ + +#include "emu.h" +#include "bus/a2gameio/joyport_paddles.h" + + +namespace { + +// ======================> apple2_joyport_paddles_device + +class apple2_joyport_paddles_device : public device_t, public device_a2gameio_interface +{ +public: + // construction/destruction + apple2_joyport_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + + // device_a2gameio_interface overrides + virtual u8 pdl0_r() override; + virtual u8 pdl1_r() override; + virtual u8 pdl2_r() override; + virtual u8 pdl3_r() override; + virtual int sw0_r() override; + virtual int sw1_r() override; + virtual void an0_w(int state) override; + +private: + // input ports + required_ioport_array<4> m_pdl; + required_ioport m_buttons; + int m_an0; +}; + +//************************************************************************** +// INPUT PORTS +//************************************************************************** + +static INPUT_PORTS_START( apple2_joyport_paddles ) + PORT_START("paddle_1") + PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_PLAYER(1) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0, 255) + + PORT_START("paddle_2") + PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_PLAYER(2) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0, 255) + + PORT_START("paddle_3") + PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_PLAYER(3) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0, 255) + + PORT_START("paddle_4") + PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_PLAYER(4) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0, 255) + + PORT_START("paddle_buttons") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(3) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(4) +INPUT_PORTS_END + +//************************************************************************** +// DEVICE IMPLEMENTATION +//************************************************************************** + +apple2_joyport_paddles_device::apple2_joyport_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, APPLE2_JOYPORT_PADDLES, tag, owner, clock) + , device_a2gameio_interface(mconfig, *this) + , m_pdl(*this, "paddle_%u", 1U) + , m_buttons(*this, "paddle_buttons") +{ +} + +ioport_constructor apple2_joyport_paddles_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(apple2_joyport_paddles); +} + +void apple2_joyport_paddles_device::device_start() +{ + save_item(NAME(m_an0)); +} + +u8 apple2_joyport_paddles_device::pdl0_r() +{ + return m_pdl[0]->read(); +} + +u8 apple2_joyport_paddles_device::pdl1_r() +{ + return m_pdl[1]->read(); +} + +u8 apple2_joyport_paddles_device::pdl2_r() +{ + return m_pdl[2]->read(); +} + +u8 apple2_joyport_paddles_device::pdl3_r() +{ + return m_pdl[3]->read(); +} + +int apple2_joyport_paddles_device::sw0_r() +{ + return m_an0 ? BIT(m_buttons->read(), 6) : BIT(m_buttons->read(), 4); +} + +int apple2_joyport_paddles_device::sw1_r() +{ + return m_an0 ? BIT(m_buttons->read(), 7) : BIT(m_buttons->read(), 5); +} + +void apple2_joyport_paddles_device::an0_w(int state) +{ + m_an0 = state; +} + +} // anonymous namespace + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE_PRIVATE(APPLE2_JOYPORT_PADDLES, device_a2gameio_interface, apple2_joyport_paddles_device, "a2joyprtpdls", "Sirius JoyPort with Apple II paddles") diff --git a/src/devices/bus/a2gameio/joyport_paddles.h b/src/devices/bus/a2gameio/joyport_paddles.h new file mode 100644 index 00000000000..01380a6198c --- /dev/null +++ b/src/devices/bus/a2gameio/joyport_paddles.h @@ -0,0 +1,19 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/********************************************************************* + + Sirius JoyPort with 4 Apple II paddles connected + +*********************************************************************/ + +#ifndef MAME_BUS_A2GAMEIO_JOYPORT_PADDLES_H +#define MAME_BUS_A2GAMEIO_JOYPORT_PADDLES_H + +#pragma once + +#include "bus/a2gameio/gameio.h" + +// device type declaration +DECLARE_DEVICE_TYPE(APPLE2_JOYPORT_PADDLES, device_a2gameio_interface) + +#endif // MAME_BUS_A2GAMEIO_JOYPORT_PADDLES_H diff --git a/src/devices/bus/a2gameio/wico_joystick.cpp b/src/devices/bus/a2gameio/wico_joystick.cpp new file mode 100644 index 00000000000..b7122f678f0 --- /dev/null +++ b/src/devices/bus/a2gameio/wico_joystick.cpp @@ -0,0 +1,128 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/********************************************************************* + + Apple II Wico Command Control Joystick Adapter for Atari-style + digital joysticks + +*********************************************************************/ + +#include "emu.h" +#include "bus/a2gameio/wico_joystick.h" + +namespace { + +// ======================> apple2_wico_joystick_device + +class apple2_wico_joystick_device : public device_t, public device_a2gameio_interface +{ +public: + // construction/destruction + apple2_wico_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + + // device_a2gameio_interface overrides + virtual u8 pdl0_r() override; + virtual u8 pdl1_r() override; + virtual u8 pdl2_r() override; + virtual u8 pdl3_r() override; + virtual int sw0_r() override; + virtual int sw1_r() override; + +private: + // input ports + required_ioport m_player1, m_player2; +}; + +//************************************************************************** +// PARAMETERS +//************************************************************************** + +#define JOYSTICK_DELTA 80 +#define JOYSTICK_SENSITIVITY 50 +#define JOYSTICK_AUTOCENTER 80 + +//************************************************************************** +// INPUT PORTS +//************************************************************************** + +static INPUT_PORTS_START( apple2_wico_joystick ) + PORT_START("joystick_p1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) + + PORT_START("joystick_p2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) +INPUT_PORTS_END + +//************************************************************************** +// DEVICE IMPLEMENTATION +//************************************************************************** + +apple2_wico_joystick_device::apple2_wico_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, APPLE2_WICO_JOYSTICK, tag, owner, clock) + , device_a2gameio_interface(mconfig, *this) + , m_player1(*this, "joystick_p1") + , m_player2(*this, "joystick_p2") +{ +} + +ioport_constructor apple2_wico_joystick_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(apple2_wico_joystick); +} + +void apple2_wico_joystick_device::device_start() +{ +} + +u8 apple2_wico_joystick_device::pdl0_r() +{ + return !BIT(m_player1->read(), 3) ? 0x00 : !BIT(m_player1->read(), 1) ? 0xff : 0x80; +} + +u8 apple2_wico_joystick_device::pdl1_r() +{ + return !BIT(m_player1->read(), 0) ? 0x00 : !BIT(m_player1->read(), 2) ? 0xff : 0x80; +} + +u8 apple2_wico_joystick_device::pdl2_r() +{ + return !BIT(m_player2->read(), 3) ? 0x00 : !BIT(m_player2->read(), 1) ? 0xff : 0x80; +} + +u8 apple2_wico_joystick_device::pdl3_r() +{ + return !BIT(m_player2->read(), 0) ? 0x00 : !BIT(m_player2->read(), 2) ? 0xff : 0x80; +} + +int apple2_wico_joystick_device::sw0_r() +{ + return !BIT(m_player1->read(), 4); +} + +int apple2_wico_joystick_device::sw1_r() +{ + return !BIT(m_player2->read(), 4); +} + +} // anonymous namespace + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE_PRIVATE(APPLE2_WICO_JOYSTICK, device_a2gameio_interface, apple2_wico_joystick_device, "a2wicojoy", "Wico Command Control Joystick Adapter") diff --git a/src/devices/bus/a2gameio/wico_joystick.h b/src/devices/bus/a2gameio/wico_joystick.h new file mode 100644 index 00000000000..4c7203a3175 --- /dev/null +++ b/src/devices/bus/a2gameio/wico_joystick.h @@ -0,0 +1,20 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/********************************************************************* + + Apple II Wico Command Control Joystick Adapter for Atari-style + digital joysticks + +*********************************************************************/ + +#ifndef MAME_BUS_A2GAMEIO_WICO_JOYSTICK_H +#define MAME_BUS_A2GAMEIO_WICO_JOYSTICK_H + +#pragma once + +#include "bus/a2gameio/gameio.h" + +// device type declaration +DECLARE_DEVICE_TYPE(APPLE2_WICO_JOYSTICK, device_a2gameio_interface) + +#endif // MAME_BUS_A2GAMEIO_WICO_JOYSTICK_H From 1ddd1c5481107ce011dd9db144f857edcfc908a0 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 15:51:52 +0200 Subject: [PATCH 06/44] segas32: update some osc info [Guru] --- src/mame/sega/segas32.cpp | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/mame/sega/segas32.cpp b/src/mame/sega/segas32.cpp index 3b4837a9a1f..bcfb86fb4dc 100644 --- a/src/mame/sega/segas32.cpp +++ b/src/mame/sega/segas32.cpp @@ -485,7 +485,6 @@ JP1234 - Four 2-pin jumpers. JP3 is shorted, the others are not shorted ********************************************************************************************* - On "Super Visual Football: European Sega Cup" and "JLEAGUE" : JLEAGUE was the original code developed and released in early @@ -692,10 +691,8 @@ void segas32_state::update_irq_state() void segas32_state::signal_v60_irq(int which) { - int i; - /* see if this interrupt input is mapped to any vectors; if so, mark them */ - for (i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) if (m_v60_irq_control[i] == which) m_v60_irq_control[7] |= 1 << i; update_irq_state(); @@ -2232,7 +2229,6 @@ GFXDECODE_END - /************************************* * * Machine driver @@ -2250,7 +2246,7 @@ void segas32_state::device_add_mconfig(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &segas32_state::system32_sound_map); m_soundcpu->set_addrmap(AS_IO, &segas32_state::system32_sound_portmap); - sega_315_5296_device &io_chip(SEGA_315_5296(config, "io_chip", 0)); // unknown clock + sega_315_5296_device &io_chip(SEGA_315_5296(config, "io_chip", MASTER_CLOCK/4)); io_chip.in_pa_callback().set_ioport("P1_A"); io_chip.in_pb_callback().set_ioport("P2_A"); io_chip.in_pc_callback().set_ioport("PORTC_A"); @@ -2310,8 +2306,6 @@ segas32_regular_state::segas32_regular_state(const machine_config &mconfig, cons - - void segas32_state::system32_analog_map(address_map &map) { map.unmap_value_high(); @@ -2346,8 +2340,6 @@ segas32_analog_state::segas32_analog_state(const machine_config &mconfig, device - - void segas32_trackball_state::system32_trackball_map(address_map &map) { map.unmap_value_high(); @@ -2388,8 +2380,6 @@ segas32_trackball_state::segas32_trackball_state(const machine_config &mconfig, - - void segas32_state::system32_4player_map(address_map &map) { map.unmap_value_high(); @@ -2423,8 +2413,6 @@ segas32_4player_state::segas32_4player_state(const machine_config &mconfig, devi - - void segas32_state::ga2_main_map(address_map &map) { map.unmap_value_high(); @@ -2454,21 +2442,20 @@ segas32_v25_state::segas32_v25_state(const machine_config &mconfig, const char * - - void segas32_upd7725_state::device_add_mconfig(machine_config &config) { segas32_analog_state::device_add_mconfig(config); - /* add a upd7725; this is on the 837-8341 daughterboard which plugs into the socket on the master pcb's ROM board where an fd1149 could go */ - upd7725_device &dsp(UPD7725(config, "dsp", 8000000)); // TODO: Find real clock speed for the upd7725; this is a canned oscillator on the 837-8341 pcb + // add a upd7725; this is on the 837-8341 daughterboard which plugs into the socket on the master pcb's ROM board where an fd1149 could go + upd7725_device &dsp(UPD7725(config, "dsp", 16_MHz_XTAL/2)); dsp.set_addrmap(AS_PROGRAM, &segas32_upd7725_state::upd7725_prg_map); dsp.set_addrmap(AS_DATA, &segas32_upd7725_state::upd7725_data_map); dsp.set_disable(); // TODO: disable for now, needs DMA pins and interrupts implemented in upd7725 core + // TODO: find /INT source for upd7725 // TODO: figure out how the p0 and p1 lines from the upd7725 affect the mainboard; do they select one of four (or 8) latches to/from the mainboard? // TODO: trace out the 837-8341 pcb - // See HLE of this dsp in /src/mame/machine/segas32.cpp : arescue_dsp_r and arescue_dsp_w + // See HLE of this dsp in segas32_m.cpp: arescue_dsp_r and arescue_dsp_w } DEFINE_DEVICE_TYPE(SEGA_S32_UPD7725_DEVICE, segas32_upd7725_state, "segas32_pcb_upd7725", "Sega System 32 uPD7725 PCB") @@ -2480,7 +2467,6 @@ segas32_upd7725_state::segas32_upd7725_state(const machine_config &mconfig, cons - void segas32_cd_state::lamps1_w(uint8_t data) { for (int i = 0; i < 8; i++) @@ -2573,7 +2559,7 @@ void sega_multi32_state::device_add_mconfig(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &sega_multi32_state::multi32_sound_map); m_soundcpu->set_addrmap(AS_IO, &sega_multi32_state::multi32_sound_portmap); - sega_315_5296_device &io_chip_0(SEGA_315_5296(config, "io_chip_0", 0)); // unknown clock + sega_315_5296_device &io_chip_0(SEGA_315_5296(config, "io_chip_0", MASTER_CLOCK/4)); io_chip_0.in_pa_callback().set_ioport("P1_A"); io_chip_0.in_pb_callback().set_ioport("P2_A"); io_chip_0.in_pc_callback().set_ioport("PORTC_A"); @@ -2585,7 +2571,7 @@ void sega_multi32_state::device_add_mconfig(machine_config &config) io_chip_0.out_cnt1_callback().set(FUNC(segas32_state::display_enable_w<0>)); io_chip_0.out_cnt2_callback().set_inputline(m_soundcpu, INPUT_LINE_RESET).invert(); - sega_315_5296_device &io_chip_1(SEGA_315_5296(config, "io_chip_1", 0)); // unknown clock + sega_315_5296_device &io_chip_1(SEGA_315_5296(config, "io_chip_1", MASTER_CLOCK/4)); io_chip_1.in_pa_callback().set_ioport("P1_B"); io_chip_1.in_pb_callback().set_ioport("P2_B"); io_chip_1.in_pc_callback().set_ioport("PORTC_B"); @@ -2852,13 +2838,13 @@ void segas32_new_state::sega_multi32_6p(machine_config &config) SEGA_MULTI32_6PLAYER_DEVICE(config, "mainpcb", 0); } + /************************************* * * ROM definition(s) * *************************************/ - #define ROM_LOAD_x2(name, base, length, crc) \ ROM_LOAD( name, base + 0 * length, length, crc ) \ ROM_RELOAD( base + 1 * length, length ) From 546bf269bc565302d947c2866196737a2aaef457 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 16:23:29 +0200 Subject: [PATCH 07/44] xtal: add 32.2159_MHz_XTAL --- src/emu/xtal.cpp | 3 ++- src/mame/sega/segas32.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 25b0e4aa5d2..1b40ecd382c 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -417,7 +417,8 @@ const double XTAL::known_xtals[] = { 31'948'800, /* 31.9488_MHz_XTAL NEC PC-88xx, PC-98xx */ 32'000'000, /* 32_MHz_XTAL - */ 32'147'000, /* 32.147_MHz_XTAL Ampex 210+ 132-column display clock */ - 32'220'000, /* 32.22_MHz_XTAL Typically used on 90's Data East PCBs (close to 9x NTSC subcarrier which is 32.215905Mhz */ + 32'215'900, /* 32.2159_MHz_XTAL Sega Master System, Sega System 32 (close to 9x NTSC subcarrier which is 32.215905Mhz */ + 32'220'000, /* 32.22_MHz_XTAL Typically used on 90's Data East PCBs */ 32'256'000, /* 32.256_MHz_XTAL Hitachi MB-6890 */ 32'317'400, /* 32.3174_MHz_XTAL DEC VT330, VT340 */ 32'530'470, /* 32.53047_MHz_XTAL Seta 2 */ diff --git a/src/mame/sega/segas32.cpp b/src/mame/sega/segas32.cpp index bcfb86fb4dc..69d747937a8 100644 --- a/src/mame/sega/segas32.cpp +++ b/src/mame/sega/segas32.cpp @@ -605,9 +605,9 @@ segas32_state::segas32_state(const machine_config &mconfig, device_type type, co * *************************************/ -#define MASTER_CLOCK 32215900 -#define RFC_CLOCK XTAL(50'000'000) -#define MULTI32_CLOCK XTAL(40'000'000) +#define MASTER_CLOCK 32.2159_MHz_XTAL +#define RFC_CLOCK 50_MHz_XTAL +#define MULTI32_CLOCK 40_MHz_XTAL #define TIMER_0_CLOCK ((MASTER_CLOCK/2)/2048) /* confirmed */ #define TIMER_1_CLOCK ((RFC_CLOCK/16)/256) /* confirmed */ From 8edd5dbf59b13ff27f64edcd7ad5d77e854a5537 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 18:31:45 +0200 Subject: [PATCH 08/44] segas32: multi 32 master clock is 32MHz [Guru], also got rid of clock defines, it gets messy with MASTER_CLOCK_S32 and MASTER_CLOCK_M32, and especially 2 defines for the timer0 clock --- src/emu/xtal.cpp | 2 +- src/mame/sega/segas32.cpp | 43 ++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 1b40ecd382c..5c8d50d3760 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -417,7 +417,7 @@ const double XTAL::known_xtals[] = { 31'948'800, /* 31.9488_MHz_XTAL NEC PC-88xx, PC-98xx */ 32'000'000, /* 32_MHz_XTAL - */ 32'147'000, /* 32.147_MHz_XTAL Ampex 210+ 132-column display clock */ - 32'215'900, /* 32.2159_MHz_XTAL Sega Master System, Sega System 32 (close to 9x NTSC subcarrier which is 32.215905Mhz */ + 32'215'900, /* 32.2159_MHz_XTAL Sega System 32, Sega Game Gear (close to 9x NTSC subcarrier which is 32.215905Mhz */ 32'220'000, /* 32.22_MHz_XTAL Typically used on 90's Data East PCBs */ 32'256'000, /* 32.256_MHz_XTAL Hitachi MB-6890 */ 32'317'400, /* 32.3174_MHz_XTAL DEC VT330, VT340 */ diff --git a/src/mame/sega/segas32.cpp b/src/mame/sega/segas32.cpp index 69d747937a8..356e53d40ec 100644 --- a/src/mame/sega/segas32.cpp +++ b/src/mame/sega/segas32.cpp @@ -61,13 +61,13 @@ PCB Layout | 93C46 D42264 | |CNB SW2 D42264 | | SW1 D42264 | -| CNA DSW1 32MHz 50MHz D42264 | +| CNA DSW1 32.2159MHz 50MHz D42264 | |-------------------------------------------------------------------------------------------| Notes: - V60 CPU running at 16.00MHz [32/2] - Z80 CPU running at 8.000MHz [32/4] - YM3438 running at 8.000MHz [32/4] + V60 CPU running at 16.108MHz [32.2159/2] + Z80 CPU running at 8.054MHz [32.2159/4] + YM3438 running at 8.054MHz [32.2159/4] CNE/F/I - Multi-pin connectors for connection of ROM Board CND - 4 pin connector for 2nd Speaker for Stereo Output CNA - 30 pin connector for extra controls PCB @@ -211,7 +211,7 @@ PCB Layout V70 CPU running at 20.00MHz [40/2] Z80 CPU running at 8.000MHz [32/4] YM3438 running at 8.000MHz [32/4] - 315-5560 running at 8.000MHz [32/4] + 315-5560 running at 10.000MHz [40/4] CND/E/F/H: Multi-pin connectors for connection of ROM Board CNC : 4 pin connector for 2nd Speaker for Stereo Output CNJ : 32 pin connector (purpose unknown) @@ -605,13 +605,6 @@ segas32_state::segas32_state(const machine_config &mconfig, device_type type, co * *************************************/ -#define MASTER_CLOCK 32.2159_MHz_XTAL -#define RFC_CLOCK 50_MHz_XTAL -#define MULTI32_CLOCK 40_MHz_XTAL - -#define TIMER_0_CLOCK ((MASTER_CLOCK/2)/2048) /* confirmed */ -#define TIMER_1_CLOCK ((RFC_CLOCK/16)/256) /* confirmed */ - #define MAIN_IRQ_VBSTART 0 #define MAIN_IRQ_VBSTOP 1 #define MAIN_IRQ_SOUND 2 @@ -725,8 +718,6 @@ uint8_t segas32_state::int_control_r(offs_t offset) void segas32_state::int_control_w(offs_t offset, uint8_t data) { - int duration; - // logerror("%06X:int_control_w(%X) = %02X\n", m_maincpu->pc(), offset, data); switch (offset) { @@ -754,25 +745,30 @@ void segas32_state::int_control_w(offs_t offset, uint8_t data) case 8: case 9: /* timer 0 count */ + { m_v60_irq_control[offset] = data; - duration = m_v60_irq_control[8] + ((m_v60_irq_control[9] << 8) & 0xf00); + uint16_t duration = m_v60_irq_control[8] | ((m_v60_irq_control[9] << 8) & 0xf00); if (duration) { - attotime period = attotime::from_hz(TIMER_0_CLOCK) * duration; + const XTAL xtal = m_is_multi32 ? 32_MHz_XTAL : 32.2159_MHz_XTAL; + attotime period = attotime::from_ticks(0x800 * duration, xtal / 2); m_v60_irq_timer[0]->adjust(period, MAIN_IRQ_TIMER0); } break; + } case 10: case 11: /* timer 1 count */ + { m_v60_irq_control[offset] = data; - duration = m_v60_irq_control[10] + ((m_v60_irq_control[11] << 8) & 0xf00); + uint16_t duration = m_v60_irq_control[10] | ((m_v60_irq_control[11] << 8) & 0xf00); if (duration) { - attotime period = attotime::from_hz(TIMER_1_CLOCK) * duration; + attotime period = attotime::from_ticks(0x100 * duration, 50_MHz_XTAL / 16); m_v60_irq_timer[1]->adjust(period, MAIN_IRQ_TIMER1); } break; + } case 12: case 13: @@ -2237,6 +2233,8 @@ GFXDECODE_END void segas32_state::device_add_mconfig(machine_config &config) { + constexpr XTAL MASTER_CLOCK = 32.2159_MHz_XTAL; + /* basic machine hardware */ V60(config, m_maincpu, MASTER_CLOCK/2); m_maincpu->set_addrmap(AS_PROGRAM, &segas32_state::system32_map); @@ -2289,7 +2287,7 @@ void segas32_state::device_add_mconfig(machine_config &config) ym2.add_route(0, "lspeaker", 0.40); ym2.add_route(1, "rspeaker", 0.40); - rf5c68_device &rfsnd(RF5C68(config, "rfsnd", RFC_CLOCK/4)); // ASSP (RF)5C105 or Sega 315-5476A + rf5c68_device &rfsnd(RF5C68(config, "rfsnd", 50_MHz_XTAL/4)); // ASSP (RF)5C105 or Sega 315-5476A rfsnd.add_route(0, "lspeaker", 0.55); rfsnd.add_route(1, "rspeaker", 0.55); rfsnd.set_addrmap(0, &segas32_state::rf5c68_map); @@ -2550,6 +2548,9 @@ segas32_cd_state::segas32_cd_state(const machine_config &mconfig, const char *ta void sega_multi32_state::device_add_mconfig(machine_config &config) { + constexpr XTAL MASTER_CLOCK = 32_MHz_XTAL; + constexpr XTAL MULTI32_CLOCK = 40_MHz_XTAL; + /* basic machine hardware */ V70(config, m_maincpu, MULTI32_CLOCK/2); m_maincpu->set_addrmap(AS_PROGRAM, &sega_multi32_state::multi32_map); @@ -5833,8 +5834,8 @@ void segas32_state::init_jpark() segas32_common_init(); - pROM[0xC15A8/2] = 0xCD70; - pROM[0xC15AA/2] = 0xD8CD; + pROM[0xc15a8/2] = 0xcd70; + pROM[0xc15aa/2] = 0xd8cd; m_sw1_output = &segas32_state::jpark_sw1_output; } From 8bf710c6906547532f9fa859906c0491d4ba4f1e Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 26 Aug 2024 03:50:05 +1000 Subject: [PATCH 09/44] bus/a2bus/a2wico_trackball.cpp: Suppress side effects for debugger reads. --- src/devices/bus/a2bus/a2wico_trackball.cpp | 91 ++++++++++---------- src/devices/bus/a2bus/cards.cpp | 2 +- src/devices/bus/a2gameio/joyport_paddles.cpp | 4 +- src/devices/bus/a2gameio/wico_joystick.cpp | 4 +- 4 files changed, 49 insertions(+), 52 deletions(-) diff --git a/src/devices/bus/a2bus/a2wico_trackball.cpp b/src/devices/bus/a2bus/a2wico_trackball.cpp index 29b3f7ccbec..c74edac917b 100644 --- a/src/devices/bus/a2bus/a2wico_trackball.cpp +++ b/src/devices/bus/a2bus/a2wico_trackball.cpp @@ -18,6 +18,8 @@ #include "emu.h" #include "a2wico_trackball.h" +namespace { + //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -36,7 +38,6 @@ class a2bus_wicotrackball_device: protected: a2bus_wicotrackball_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; virtual void device_reset() override; @@ -44,16 +45,17 @@ class a2bus_wicotrackball_device: virtual uint8_t read_c0nx(uint8_t offset) override; virtual void write_c0nx(uint8_t offset, uint8_t data) override; +private: + uint8_t read_position(int axis); + required_ioport m_wicotrackballb; required_ioport_array<2> m_wicotrackballxy; -private: bool m_speed[2]; uint8_t m_buttons; bool m_wraparound; uint8_t m_axis[2]; uint32_t m_last_pos[2]; - uint8_t read_position(int axis); }; /*************************************************************************** @@ -66,12 +68,6 @@ class a2bus_wicotrackball_device: #define WICOTRACKBALL_POS_UNINIT 0xffffffff /* default out-of-range position */ -/*************************************************************************** - GLOBAL VARIABLES -***************************************************************************/ - -DEFINE_DEVICE_TYPE_PRIVATE(A2BUS_WICOTRACKBALL, device_a2bus_card_interface, a2bus_wicotrackball_device, "a2wicotrackball", "Apple II Wico Trackball Card") - static INPUT_PORTS_START( wicotrackball ) PORT_START(WICOTRACKBALL_BUTTONS_TAG) /* Trackball - buttons */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Trackball Button 1") PORT_CODE(MOUSECODE_BUTTON1) @@ -98,15 +94,6 @@ ioport_constructor a2bus_wicotrackball_device::device_input_ports() const return INPUT_PORTS_NAME(wicotrackball); } -/*------------------------------------------------- - device_add_mconfig - device-specific - machine configurations --------------------------------------------------*/ - -void a2bus_wicotrackball_device::device_add_mconfig(machine_config &config) -{ -} - /*************************************************************************** LIVE DEVICE ***************************************************************************/ @@ -149,37 +136,35 @@ void a2bus_wicotrackball_device::device_reset() uint8_t a2bus_wicotrackball_device::read_position(int axis) { - int speed_scale = (1 << m_speed[0]) << (m_speed[1] * 2); - uint8_t temp_axis = 0; - int diff_pos = 0; - int cur_pos = m_wicotrackballxy[axis]->read(); - - if (m_last_pos[axis] == WICOTRACKBALL_POS_UNINIT) { - m_last_pos[axis] = cur_pos; - } - diff_pos = cur_pos - m_last_pos[axis]; - // wrap-around the positoin - if (diff_pos > 0x7f) { - diff_pos -= 0x100; - } else if (diff_pos < -0x80) { - diff_pos += 0x100; - } + int const speed_scale = 1 << (m_speed[0] + m_speed[1] * 2); + int const cur_pos = m_wicotrackballxy[axis]->read(); + + uint8_t result = 0; + if (m_last_pos[axis] != WICOTRACKBALL_POS_UNINIT) { + int diff_pos = cur_pos - m_last_pos[axis]; + + // wrap-around the positoin + if (diff_pos > 0x7f) { + diff_pos -= 0x100; + } else if (diff_pos < -0x80) { + diff_pos += 0x100; + } - if (m_wraparound) { - temp_axis = m_axis[axis] + diff_pos / speed_scale;; - } else { - if ((m_axis[axis] + diff_pos / speed_scale) < 0) { - temp_axis = 0; - } else if ((m_axis[axis] + diff_pos / speed_scale) > 0xff) { - temp_axis = 0xff; + int const updated_axis = int(unsigned(m_axis[axis])) + diff_pos / speed_scale;; + if (m_wraparound) { + result = unsigned(updated_axis); } else { - temp_axis = m_axis[axis] + diff_pos / speed_scale; + result = unsigned(std::clamp(updated_axis, 0, 0xff)); + } + if (!machine().side_effects_disabled()) { + m_axis[axis] = result; } } - m_last_pos[axis] = cur_pos; - m_axis[axis] = temp_axis; + if (!machine().side_effects_disabled()) { + m_last_pos[axis] = cur_pos; + } - return m_axis[axis]; + return result; } /*------------------------------------------------- @@ -198,15 +183,18 @@ uint8_t a2bus_wicotrackball_device::read_c0nx(uint8_t offset) data = read_position(1); break; case 0x2: /* set Bounded/Wraparound Soft Switch to Bounded */ - m_wraparound = false; + if (!machine().side_effects_disabled()) { + m_wraparound = false; + } break; case 0x3: /* set Bounded/Wraparound Soft Switch to Wraparound */ - m_wraparound = true; + if (!machine().side_effects_disabled()) { + m_wraparound = true; + } break; case 0x6: /* read buttons */ data = m_buttons = m_wicotrackballb->read(); break; - } return data; } @@ -246,3 +234,12 @@ void a2bus_wicotrackball_device::write_c0nx(uint8_t offset, uint8_t data) break; } } + +} // anonymous namespace + + +/*************************************************************************** + GLOBAL VARIABLES +***************************************************************************/ + +DEFINE_DEVICE_TYPE_PRIVATE(A2BUS_WICOTRACKBALL, device_a2bus_card_interface, a2bus_wicotrackball_device, "a2wicotrackball", "Apple II Wico Trackball Card") diff --git a/src/devices/bus/a2bus/cards.cpp b/src/devices/bus/a2bus/cards.cpp index c4c76a421ca..cc2380fd455 100644 --- a/src/devices/bus/a2bus/cards.cpp +++ b/src/devices/bus/a2bus/cards.cpp @@ -41,6 +41,7 @@ #include "a2ultraterm.h" #include "a2videoterm.h" #include "a2vulcan.h" +#include "a2wico_trackball.h" #include "a2zipdrive.h" #include "booti.h" #include "byte8251.h" @@ -73,7 +74,6 @@ #include "uniprint.h" #include "uthernet.h" #include "vistaa800.h" -#include "a2wico_trackball.h" void apple2_slot0_cards(device_slot_interface &device) diff --git a/src/devices/bus/a2gameio/joyport_paddles.cpp b/src/devices/bus/a2gameio/joyport_paddles.cpp index c23889dd230..92fbe9083cf 100644 --- a/src/devices/bus/a2gameio/joyport_paddles.cpp +++ b/src/devices/bus/a2gameio/joyport_paddles.cpp @@ -21,11 +21,11 @@ class apple2_joyport_paddles_device : public device_t, public device_a2gameio_in apple2_joyport_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: - // device-level overrides + // device_t implementation virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; - // device_a2gameio_interface overrides + // device_a2gameio_interface implementation virtual u8 pdl0_r() override; virtual u8 pdl1_r() override; virtual u8 pdl2_r() override; diff --git a/src/devices/bus/a2gameio/wico_joystick.cpp b/src/devices/bus/a2gameio/wico_joystick.cpp index b7122f678f0..85612d2c7a7 100644 --- a/src/devices/bus/a2gameio/wico_joystick.cpp +++ b/src/devices/bus/a2gameio/wico_joystick.cpp @@ -21,11 +21,11 @@ class apple2_wico_joystick_device : public device_t, public device_a2gameio_inte apple2_wico_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: - // device-level overrides + // device_t implementation virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; - // device_a2gameio_interface overrides + // device_a2gameio_interface implementation virtual u8 pdl0_r() override; virtual u8 pdl1_r() override; virtual u8 pdl2_r() override; From b8c7d45a0a5e018c52785c6d5046bb29344e57aa Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 20:07:46 +0200 Subject: [PATCH 10/44] segas32_m: small cleanup to code style consistency --- src/mame/sega/segas32.h | 2 -- src/mame/sega/segas32_m.cpp | 68 ++++++++++++++++++------------------- src/mame/sega/segas32_v.cpp | 2 +- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/src/mame/sega/segas32.h b/src/mame/sega/segas32.h index 21f7194a741..c062d828395 100644 --- a/src/mame/sega/segas32.h +++ b/src/mame/sega/segas32.h @@ -18,8 +18,6 @@ #include "tilemap.h" - - class segas32_state : public device_t { public: diff --git a/src/mame/sega/segas32_m.cpp b/src/mame/sega/segas32_m.cpp index b78e0d912b1..f20189ebb82 100644 --- a/src/mame/sega/segas32_m.cpp +++ b/src/mame/sega/segas32_m.cpp @@ -37,7 +37,6 @@ const uint8_t segas32_v25_state::ga2_opcode_table[256] = { void segas32_v25_state::decrypt_protrom() { - int i; uint8_t *rom = memregion("mcu")->base(); std::vector temp(0x100000); @@ -45,7 +44,7 @@ void segas32_v25_state::decrypt_protrom() memcpy(&temp[0], rom, 0x10000); // unscramble the address lines - for(i = 0; i < 0x10000; i++) + for (int i = 0; i < 0x10000; i++) rom[i] = temp[bitswap<16>(i, 14, 11, 15, 12, 13, 4, 3, 7, 5, 10, 2, 8, 9, 6, 1, 0)]; } @@ -87,31 +86,32 @@ uint16_t segas32_state::ga2_wakeup_protection_r(offs_t offset) // arcade revision C, allowing the game to run correctly. #define CLEARED_LEVELS 0xE5C4 #define CURRENT_LEVEL 0xF06E -#define CURRENT_LEVEL_STATUS 0xF0BC +#define CURRENT_LEVEL_STATUS 0xF0BC #define LEVEL_ORDER_ARRAY 0x263A void segas32_state::sonic_level_load_protection(offs_t offset, uint16_t data, uint16_t mem_mask) { uint16_t level; -//Perform write + + // Perform write COMBINE_DATA(&m_system32_workram[CLEARED_LEVELS / 2]); -//Refresh current level - if (m_system32_workram[CLEARED_LEVELS / 2] == 0) - { - level = 0x0007; - } - else - { - const uint8_t *ROM = m_maincpu_region->base(); - level = *((ROM + LEVEL_ORDER_ARRAY) + (m_system32_workram[CLEARED_LEVELS / 2] * 2) - 1); - level |= *((ROM + LEVEL_ORDER_ARRAY) + (m_system32_workram[CLEARED_LEVELS / 2] * 2) - 2) << 8; - } - m_system32_workram[CURRENT_LEVEL / 2] = level; + // Refresh current level + if (m_system32_workram[CLEARED_LEVELS / 2] == 0) + { + level = 0x0007; + } + else + { + const uint8_t *ROM = m_maincpu_region->base(); + level = *((ROM + LEVEL_ORDER_ARRAY) + (m_system32_workram[CLEARED_LEVELS / 2] * 2) - 1); + level |= *((ROM + LEVEL_ORDER_ARRAY) + (m_system32_workram[CLEARED_LEVELS / 2] * 2) - 2) << 8; + } + m_system32_workram[CURRENT_LEVEL / 2] = level; -//Reset level status - m_system32_workram[CURRENT_LEVEL_STATUS / 2] = 0x0000; - m_system32_workram[(CURRENT_LEVEL_STATUS + 2) / 2] = 0x0000; + // Reset level status + m_system32_workram[CURRENT_LEVEL_STATUS / 2] = 0x0000; + m_system32_workram[(CURRENT_LEVEL_STATUS + 2) / 2] = 0x0000; } @@ -202,11 +202,11 @@ void segas32_state::darkedge_fd1149_vblank() space.write_word(0x20f072, 0); space.write_word(0x20f082, 0); - if( space.read_byte(0x20a12c) != 0 ) + if (space.read_byte(0x20a12c) != 0) { - space.write_byte(0x20a12c, space.read_byte(0x20a12c)-1 ); + space.write_byte(0x20a12c, space.read_byte(0x20a12c)-1); - if( space.read_byte(0x20a12c) == 0 ) + if (space.read_byte(0x20a12c) == 0) space.write_byte(0x20a12e, 1); } } @@ -235,12 +235,12 @@ void segas32_state::f1lap_fd1149_vblank() { address_space &space = m_maincpu->space(AS_PROGRAM); - space.write_byte(0x20F7C6, 0); + space.write_byte(0x20f7c6, 0); // needed to start a game - uint8_t val = space.read_byte(0x20EE81); - if (val == 0xff) space.write_byte(0x20EE81,0); - + uint8_t val = space.read_byte(0x20ee81); + if (val == 0xff) + space.write_byte(0x20ee81,0); } @@ -253,7 +253,7 @@ void segas32_state::f1lap_fd1149_vblank() void segas32_state::dbzvrvs_protection_w(address_space &space, uint16_t data) { - space.write_word( 0x2080c8, space.read_word( 0x200044 ) ); + space.write_word(0x2080c8, space.read_word(0x200044)); } @@ -333,19 +333,19 @@ uint16_t segas32_state::arf_wakeup_protection_r(offs_t offset) ******************************************************************************/ void segas32_state::jleague_protection_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { - COMBINE_DATA( &m_system32_workram[0xf700/2 + offset ] ); + COMBINE_DATA(&m_system32_workram[0xf700/2 + offset]); - switch( offset ) + switch (offset) { // Map team browser selection to opponent browser selection // using same lookup table that V60 uses for sound sample mapping. case 0: - space.write_byte( 0x20f708, space.read_word( 0x7bbc0 + data*2 ) ); + space.write_byte(0x20f708, space.read_word(0x7bbc0 + data*2)); break; // move on to team browser case 4/2: - space.write_byte( 0x200016, data & 0xff ); + space.write_byte(0x200016, data & 0xff); break; default: @@ -376,9 +376,9 @@ void segas32_state::jleague_protection_w(address_space &space, offs_t offset, ui uint16_t segas32_state::arescue_dsp_r(offs_t offset) { - if( offset == 4/2 ) + if (offset == 4/2) { - switch( m_arescue_dsp_io[0] ) + switch (m_arescue_dsp_io[0]) { case 0: case 1: @@ -395,7 +395,7 @@ uint16_t segas32_state::arescue_dsp_r(offs_t offset) break; default: - logerror("Unhandled DSP cmd %04x (%04x).\n", m_arescue_dsp_io[0], m_arescue_dsp_io[1] ); + logerror("Unhandled DSP cmd %04x (%04x).\n", m_arescue_dsp_io[0], m_arescue_dsp_io[1]); break; } } diff --git a/src/mame/sega/segas32_v.cpp b/src/mame/sega/segas32_v.cpp index 92dca067e6b..7b921596f66 100644 --- a/src/mame/sega/segas32_v.cpp +++ b/src/mame/sega/segas32_v.cpp @@ -289,7 +289,7 @@ void segas32_state::device_start() memset(m_videoram, 0x00, 0x20000); m_videoram[0x1ff00/2] = 0x8000; - memset(m_mixer_control, 0xff, sizeof(m_mixer_control[0][0]) * 0x80 ); + memset(m_mixer_control, 0xff, sizeof(m_mixer_control[0][0]) * 0x80); /* needs to be initialized to 0xff, otherwise f1en has bad sound (MT04531) */ if (m_soundram) From 8f8c63013c1bdb9951e101a4d12ca213912e1b93 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 20:22:25 +0200 Subject: [PATCH 11/44] xtal: c++ style comments, remove list of xtals that could be purchased via digikey in 2008 --- src/emu/xtal.cpp | 1278 +++++++++++++++++----------------------------- 1 file changed, 456 insertions(+), 822 deletions(-) diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 5c8d50d3760..1f92d960822 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -57,462 +57,462 @@ const double XTAL::known_xtals[] = { /* Frequency Sugarvassed Examples ----------- ---------------------- ---------------------------------------- */ - 32'768, /* 32.768_kHz_XTAL Used to drive RTC chips */ - 38'400, /* 38.4_kHz_XTAL Resonator */ - 384'000, /* 384_kHz_XTAL Resonator - Commonly used for driving OKI MSM5205 */ - 400'000, /* 400_kHz_XTAL Resonator - OKI MSM5205 on Great Swordman h/w */ - 430'000, /* 430_kHz_XTAL Resonator */ - 455'000, /* 455_kHz_XTAL Resonator - OKI MSM5205 on Gladiator h/w */ - 500'000, /* 500_kHz_XTAL Resonator - MIDI clock on various synthesizers (31250 * 16) */ - 512'000, /* 512_kHz_XTAL Resonator - Toshiba TC8830F */ - 600'000, /* 600_kHz_XTAL - */ - 640'000, /* 640_kHz_XTAL Resonator - NEC UPD7759, Texas Instruments Speech Chips @ 8khz */ - 960'000, /* 960_kHz_XTAL Resonator - Xerox Notetaker Keyboard UART */ - 1'000'000, /* 1_MHz_XTAL Used to drive OKI M6295 chips */ - 1'008'000, /* 1.008_MHz_XTAL Acorn Microcomputer (System 1) */ - 1'056'000, /* 1.056_MHz_XTAL Resonator - OKI M6295 on Trio The Punch h/w */ - 1'294'400, /* 1.2944_MHz_XTAL BBN BitGraph PSG */ - 1'600'000, /* 1.6_MHz_XTAL Resonator - Roland TR-707 */ - 1'689'600, /* 1.6896_MHz_XTAL Diablo 1355WP Printer */ - 1'750'000, /* 1.75_MHz_XTAL RCA CDP1861 */ - 1'797'100, /* 1.7971_MHz_XTAL SWTPC 6800 (with MIKBUG) */ - 1'843'200, /* 1.8432_MHz_XTAL Bondwell 12/14 */ - 2'000'000, /* 2_MHz_XTAL - */ - 2'012'160, /* 2.01216_MHz_XTAL Cidelsa Draco sound board */ - 2'097'152, /* 2.097152_MHz_XTAL Icatel 1995 - Brazilian public payphone */ - 2'250'000, /* 2.25_MHz_XTAL Resonator - YM2154 on Yamaha PSR-60 & PSR-70 */ - 2'376'000, /* 2.376_MHz_XTAL CIT-101 keyboard */ - 2'457'600, /* 2.4576_MHz_XTAL Atari ST MFP */ - 2'500'000, /* 2.5_MHz_XTAL Janken Man units */ - 2'600'000, /* 2.6_MHz_XTAL Sharp PC-1500 */ - 2'700'000, /* 2.7_MHz_XTAL Resonator - YM2154 on Yamaha RX15 */ - 2'950'000, /* 2.95_MHz_XTAL Playmatic MPU-C, MPU-III & Sound-3 */ - 3'000'000, /* 3_MHz_XTAL Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */ - 3'072'000, /* 3.072_MHz_XTAL INS 8520 input clock rate */ - 3'120'000, /* 3.12_MHz_XTAL SP0250 clock on Gottlieb games */ - 3'276'800, /* 3.2768_MHz_XTAL SP0256 clock in Speech Synthesis for Dragon 32 */ - 3'300'000, /* 3.3_MHz_XTAL LC 80 (export) */ - 3'521'280, /* 3.52128_MHz_XTAL RCA COSMAC VIP */ - 3'546'800, /* 3.5468_MHz_XTAL Atari 400 PAL */ - 3'546'894, /* 3.546894_MHz_XTAL Atari 2600 PAL */ - 3'547'000, /* 3.547_MHz_XTAL Philips G7200, Philips C7240 */ - 3'562'500, /* 3.5625_MHz_XTAL Jopac JO7400 */ - 3'570'000, /* 3.57_MHz_XTAL Telmac TMC-600 */ - 3'578'640, /* 3.57864_MHz_XTAL Atari Portfolio PCD3311T */ - 3'579'000, /* 3.579_MHz_XTAL BeebOPL */ - 3'579'545, /* 3.579545_MHz_XTAL NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */ - 3'579'575, /* 3.579575_MHz_XTAL Atari 2600 NTSC */ - 3'680'000, /* 3.68_MHz_XTAL Resonator - Baud rate clock for the 6551 in the MTU-130 */ - 3'686'400, /* 3.6864_MHz_XTAL Baud rate clock for MC68681 and similar UARTs */ - 3'840'000, /* 3.84_MHz_XTAL Fairlight CMI Alphanumeric Keyboard */ - 3'900'000, /* 3.9_MHz_XTAL Resonator - Used on some Fidelity boards */ - 3'932'160, /* 3.93216_MHz_XTAL Apple Lisa COP421 (197-0016A) */ - 4'000'000, /* 4_MHz_XTAL - */ - 4'028'000, /* 4.028_MHz_XTAL Sony SMC-777 */ - 4'032'000, /* 4.032_MHz_XTAL GRiD Compass modem board */ - 4'096'000, /* 4.096_MHz_XTAL Used to drive OKI M9810 chips */ - 4'194'304, /* 4.194304_MHz_XTAL Used to drive MC146818 / Nintendo Game Boy */ - 4'220'000, /* 4.220_MHz_XTAL Used to drive OKI M6295 chips on some Namco boards, usually with /4 divider */ - 4'224'000, /* 4.224_MHz_XTAL Used to drive OKI M6295 chips, usually with /4 divider */ - 4'410'000, /* 4.41_MHz_XTAL Pioneer PR-8210 ldplayer */ - 4'433'610, /* 4.43361_MHz_XTAL Cidelsa Draco */ - 4'433'619, /* 4.433619_MHz_XTAL PAL color subcarrier (technically 4.43361875mhz)*/ - 4'608'000, /* 4.608_MHz_XTAL Luxor ABC-77 keyboard (Keytronic custom part #48-300-107 is equivalent) */ - 4'915'200, /* 4.9152_MHz_XTAL - */ - 4'952'000, /* 4.952_MHz_XTAL IGS M036 based mahjong games, for TT5665 sound chip */ - 5'000'000, /* 5_MHz_XTAL Mutant Night */ - 5'068'800, /* 5.0688_MHz_XTAL Usually used as MC2661 or COM8116 baud rate clock */ - 5'185'000, /* 5.185_MHz_XTAL Intel INTELLEC® 4 */ - 5'370'000, /* 5.37_MHz_XTAL HP 95LX */ - 5'460'000, /* 5.46_MHz_XTAL ec1840 and ec1841 keyboard */ - 5'500'000, /* 5.5_MHz_XTAL Yamaha PSS-480 */ - 5'529'600, /* 5.5296_MHz_XTAL Kontron PSI98 keyboard */ - 5'626'000, /* 5.626_MHz_XTAL RCA CDP1869 PAL dot clock */ - 5'659'200, /* 5.6592_MHz_XTAL Digilog 320 dot clock */ - 5'670'000, /* 5.67_MHz_XTAL RCA CDP1869 NTSC dot clock */ - 5'714'300, /* 5.7143_MHz_XTAL Cidelsa Destroyer, TeleVideo serial keyboards */ - 5'856'000, /* 5.856_MHz_XTAL HP 3478A Multimeter */ - 5'911'000, /* 5.911_MHz_XTAL Philips Videopac Plus G7400 */ - 5'990'400, /* 5.9904_MHz_XTAL Luxor ABC 800 keyboard (Keytronic custom part #48-300-008 is equivalent) */ - 6'000'000, /* 6_MHz_XTAL American Poker II, Taito SJ System */ - 6'048'000, /* 6.048_MHz_XTAL Hektor II */ - 6'144'000, /* 6.144_MHz_XTAL Used on Alpha Denshi early 80's games sound board, Casio FP-200 and Namco Universal System 16 */ - 6'400'000, /* 6.4_MHz_XTAL Textel Compact */ - 6'500'000, /* 6.5_MHz_XTAL Jupiter Ace, Roland QDD interface */ - 6'880'000, /* 6.88_MHz_XTAL Barcrest MPU4 */ - 6'900'000, /* 6.9_MHz_XTAL BBN BitGraph CPU */ - 7'000'000, /* 7_MHz_XTAL Jaleco Mega System PCBs */ - 7'056'000, /* 7.056_MHz_XTAL Alesis QS FXCHIP (LCM of 44.1 kHz and 48 kHz) */ - 7'159'090, /* 7.15909_MHz_XTAL Blood Bros (2x NTSC subcarrier) */ - 7'200'000, /* 7.2_MHz_XTAL Novag Constellation (later models, with /2 divider), Kawai K1 keyscan IC */ - 7'372'800, /* 7.3728_MHz_XTAL - */ - 7'680'000, /* 7.68_MHz_XTAL Psion Series 3 */ - 7'864'300, /* 7.8643_MHz_XTAL Used on InterFlip games as video clock */ - 7'987'000, /* 7.987_MHz_XTAL PC9801-86 YM2608 clock */ - 7'995'500, /* 7.9955_MHz_XTAL Used on Electronic Devices Italy Galaxy Gunners sound board */ - 8'000'000, /* 8_MHz_XTAL Extremely common, used on 100's of PCBs */ - 8'200'000, /* 8.2_MHz_XTAL Universal Mr. Do - Model 8021 PCB */ - 8'388'000, /* 8.388_MHz_XTAL Nintendo Game Boy Color */ - 8'448'000, /* 8.448_MHz_XTAL Banpresto's Note Chance - Used to drive OKI M6295 chips, usually with /8 divider */ - 8'467'200, /* 8.4672_MHz_XTAL Subsino's Ying Hua Lian */ - 8'664'000, /* 8.664_MHz_XTAL Touchmaster */ - 8'700'000, /* 8.7_MHz_XTAL Tandberg TDV 2324 */ - 8'860'000, /* 8.86_MHz_XTAL AlphaTantel */ - 8'867'000, /* 8.867_MHz_XTAL Philips G7400 (~2x PAL subcarrier) */ - 8'867'236, /* 8.867236_MHz_XTAL RCA CDP1869 PAL color clock (~2x PAL subcarrier) */ - 8'867'238, /* 8.867238_MHz_XTAL ETI-660 (~2x PAL subcarrier) */ - 8'945'000, /* 8.945_MHz_XTAL Hit Me */ - 8'960'000, /* 8.96_MHz_XTAL Casio CZ-101 (divided by 2 for Music LSI) */ - 9'000'000, /* 9_MHz_XTAL Homedata PCBs */ - 9'216'000, /* 9.216_MHz_XTAL Univac UTS 20 */ - 9'263'750, /* 9.263750_MHz_XTAL Sai Yu Gou Ma Roku bootleg */ - 9'400'000, /* 9.4_MHz_XTAL Yamaha MU-5 and TG-100 */ - 9'426'500, /* 9.4265_MHz_XTAL Yamaha DX7, and DX9 */ - 9'600'000, /* 9.6_MHz_XTAL WD37C65 second clock (for 300 KB/sec rate) */ - 9'732'000, /* 9.732_MHz_XTAL CTA Invader */ - 9'828'000, /* 9.828_MHz_XTAL Universal PCBs */ - 9'830'400, /* 9.8304_MHz_XTAL Epson PX-8 */ - 9'832'000, /* 9.832_MHz_XTAL Robotron A7150 */ - 9'877'680, /* 9.87768_MHz_XTAL Microterm 420 */ - 9'987'000, /* 9.987_MHz_XTAL Crazy Balloon */ - 10'000'000, /* 10_MHz_XTAL - */ - 10'137'600, /* 10.1376_MHz_XTAL Wyse WY-100 */ - 10'240'000, /* 10.240_MHz_XTAL Stella 8085 based fruit machines */ - 10'245'000, /* 10.245_MHz_XTAL PES Speech box */ - 10'380'000, /* 10.38_MHz_XTAL Fairlight Q219 Lightpen/Graphics Card */ - 10'480'000, /* 10.48_MHz_XTAL System-80 (50 Hz) */ - 10'500'000, /* 10.5_MHz_XTAL Agat-7 */ - 10'595'000, /* 10.595_MHz_XTAL Mad Alien */ - 10'644'000, /* 10.644_MHz_XTAL Northwest Digitial Systems GP-19 */ - 10'644'500, /* 10.6445_MHz_XTAL TRS-80 Model I */ - 10'687'500, /* 10.6875_MHz_XTAL BBC Bridge Companion */ - 10'694'250, /* 10.69425_MHz_XTAL Xerox 820 */ - 10'717'200, /* 10.7172_MHz_XTAL Eltec EurocomII */ - 10'730'000, /* 10.73_MHz_XTAL Ruleta RE-900 VDP Clock */ - 10'733'000, /* 10.733_MHz_XTAL The Fairyland Story */ - 10'738'000, /* 10.738_MHz_XTAL Pokerout (poker+breakout) TMS9129 VDP Clock */ - 10'738'635, /* 10.738635_MHz_XTAL TMS9918 family (3x NTSC subcarrier) */ - 10'816'000, /* 10.816_MHz_XTAL Universal 1979-1980 (Cosmic Alien, etc) */ - 10'886'400, /* 10.8864_MHz_XTAL Systel System 100 */ - 10'920'000, /* 10.92_MHz_XTAL ADDS Viewpoint 60, Viewpoint A2 */ - 11'000'000, /* 11_MHz_XTAL Mario I8039 sound */ - 11'004'000, /* 11.004_MHz_XTAL TI 911 VDT */ - 11'059'200, /* 11.0592_MHz_XTAL Used with MCS-51 to generate common baud rates */ - 11'200'000, /* 11.2_MHz_XTAL New York, New York */ - 11'289'000, /* 11.289_MHz_XTAL Vanguard */ - 11'289'600, /* 11.2896_MHz_XTAL Frantic Fred */ - 11'400'000, /* 11.4_MHz_XTAL HP 9845 */ - 11'668'800, /* 11.6688_MHz_XTAL Gameplan pixel clock */ - 11'730'000, /* 11.73_MHz_XTAL Irem M-11 */ - 11'800'000, /* 11.8_MHz_XTAL IBM PC Music Feature Card */ - 11'980'800, /* 11.9808_MHz_XTAL Luxor ABC 80 */ - 12'000'000, /* 12_MHz_XTAL Extremely common, used on 100's of PCBs */ - 12'057'600, /* 12.0576_MHz_XTAL Poly 1 (38400 * 314) */ - 12'096'000, /* 12.096_MHz_XTAL Some early 80's Atari games */ - 12'288'000, /* 12.288_MHz_XTAL Sega Model 3 digital audio board */ - 12'292'000, /* 12.292_MHz_XTAL Northwest Digitial Systems GP-19 */ - 12'324'000, /* 12.324_MHz_XTAL Otrona Attache */ - 12'335'600, /* 12.3356_MHz_XTAL RasterOps ColorBoard 264 (~784x NTSC line rate) */ - 12'472'500, /* 12.4725_MHz_XTAL Bonanza's Mini Boy 7 */ - 12'480'000, /* 12.48_MHz_XTAL TRS-80 Model II */ - 12'500'000, /* 12.5_MHz_XTAL Red Alert audio board */ - 12'638'000, /* 12.638_MHz_XTAL Exidy Sorcerer */ - 12'672'000, /* 12.672_MHz_XTAL TRS-80 Model 4 80*24 video */ - 12'800'000, /* 12.8_MHz_XTAL Cave CV1000 */ - 12'854'400, /* 12.8544_MHz_XTAL Alphatronic P3 */ - 12'936'000, /* 12.936_MHz_XTAL CDC 721 */ - 12'979'200, /* 12.9792_MHz_XTAL Exidy 440 */ - 13'000'000, /* 13_MHz_XTAL STM Pied Piper dot clock */ - 13'300'000, /* 13.3_MHz_XTAL BMC bowling */ - 13'330'560, /* 13.33056_MHz_XTAL Taito L */ - 13'333'000, /* 13.333_MHz_XTAL Ojanko High School */ - 13'400'000, /* 13.4_MHz_XTAL TNK3, Ikari Warriors h/w */ - 13'478'400, /* 13.4784_MHz_XTAL TeleVideo 970 80-column display clock */ - 13'495'200, /* 13.4952_MHz_XTAL Used on Shadow Force pcb and maybe other Technos pcbs? */ - 13'500'000, /* 13.5_MHz_XTAL Microbee */ - 13'516'800, /* 13.5168_MHz_XTAL Kontron KDT6 */ - 13'560'000, /* 13.560_MHz_XTAL Tong Zi Maque */ - 13'608'000, /* 13.608_MHz_XTAL TeleVideo 910 & 925 */ - 13'824'000, /* 13.824_MHz_XTAL Robotron PC-1715 display circuit */ - 13'977'600, /* 13.9776_MHz_XTAL Kaypro II dot clock */ - 14'000'000, /* 14_MHz_XTAL - */ - 14'112'000, /* 14.112_MHz_XTAL Timex/Sinclair TS2068 */ - 14'192'640, /* 14.19264_MHz_XTAL Central Data 2650 */ - 14'218'000, /* 14.218_MHz_XTAL Dragon */ - 14'250'450, /* 14.25045_MHz_XTAL Apple II Europlus */ - 14'300'000, /* 14.3_MHz_XTAL Agat-7 */ - 14'314'000, /* 14.314_MHz_XTAL Taito TTL Board */ - 14'318'181, /* 14.318181_MHz_XTAL Extremely common, used on 100's of PCBs (4x NTSC subcarrier) */ - 14'349'600, /* 14.3496_MHz_XTAL Roland S-50 VDP */ - 14'469'000, /* 14.469_MHz_XTAL Esprit Systems Executive 10/102 */ - 14'580'000, /* 14.58_MHz_XTAL Fortune 32:16 Video Controller */ - 14'705'882, /* 14.705882_MHz_XTAL Aleck64 */ - 14'728'000, /* 14.728_MHz_XTAL ADM 36 */ - 14'742'800, /* 14.7428_MHz_XTAL ADM 23 */ - 14'745'000, /* 14.745_MHz_XTAL Synertek KTM-3 */ - 14'745'600, /* 14.7456_MHz_XTAL Namco System 12 & System Super 22/23 for JVS */ - 14'746'000, /* 14.746_MHz_XTAL Namco System 10 MGEXIO */ - 14'784'000, /* 14.784_MHz_XTAL Zenith Z-29 */ - 14'916'000, /* 14.916_MHz_XTAL ADDS Viewpoint 122 */ - 14'976'000, /* 14.976_MHz_XTAL CIT-101 80-column display clock */ - 15'000'000, /* 15_MHz_XTAL Sinclair QL, Amusco Poker */ - 15'148'800, /* 15.1488_MHz_XTAL Zentec 9002/9003 */ - 15'206'400, /* 15.2064_MHz_XTAL Falco TS-1 */ - 15'288'000, /* 15.288_MHz_XTAL DEC VT220 80-column display clock */ - 15'300'720, /* 15.30072_MHz_XTAL Microterm 420 */ - 15'360'000, /* 15.36_MHz_XTAL Visual 1050 */ - 15'400'000, /* 15.4_MHz_XTAL DVK KSM */ - 15'468'480, /* 15.46848_MHz_XTAL Bank Panic h/w, Sega G80 */ - 15'582'000, /* 15.582_MHz_XTAL Zentec Zephyr */ - 15'625'000, /* 15.625_MHz_XTAL Zaccaria The Invaders */ - 15'667'200, /* 15.6672_MHz_XTAL Apple Macintosh */ - 15'700'000, /* 15.7_MHz_XTAL Motogonki */ - 15'741'000, /* 15.741_MHz_XTAL DECmate II 80-column display clock */ - 15'897'600, /* 15.8976_MHz_XTAL IAI Swyft */ - 15'920'000, /* 15.92_MHz_XTAL HP Integral PC */ - 15'930'000, /* 15.93_MHz_XTAL ADM 12 */ - 15'974'400, /* 15.9744_MHz_XTAL Osborne 1 (9600 * 52 * 32) */ - 16'000'000, /* 16_MHz_XTAL Extremely common, used on 100's of PCBs */ - 16'097'280, /* 16.09728_MHz_XTAL DEC VT240 (1024 * 262 * 60) */ - 16'128'000, /* 16.128_MHz_XTAL Fujitsu FM-7 */ - 16'200'000, /* 16.2_MHz_XTAL Debut */ - 16'257'000, /* 16.257_MHz_XTAL IBM PC MDA & EGA */ - 16'313'000, /* 16.313_MHz_XTAL Micro-Term ERGO 201 */ - 16'364'000, /* 16.364_MHz_XTAL Corvus Concept */ - 16'384'000, /* 16.384_MHz_XTAL - */ - 16'400'000, /* 16.4_MHz_XTAL MS 6102 */ - 16'537'000, /* 16.537_MHz_XTAL Falco terminals 80-column clock */ - 16'572'000, /* 16.572_MHz_XTAL Micro-Term ACT-5A */ - 16'588'800, /* 16.5888_MHz_XTAL SM 7238 */ - 16'666'600, /* 16.6666_MHz_XTAL Firebeat GCU */ - 16'667'000, /* 16.667_MHz_XTAL Visual XDS-19P */ - 16'669'800, /* 16.6698_MHz_XTAL Qume QVT-102 */ - 16'670'000, /* 16.67_MHz_XTAL - */ - 16'777'216, /* 16.777216_MHz_XTAL Nintendo Game Boy Advance */ - 16'934'400, /* 16.9344_MHz_XTAL Usually used to drive 90's Yamaha OPL/FM chips (44100 * 384) */ - 16'960'000, /* 16.960_MHz_XTAL Esprit Systems Executive 10/102 */ - 17'010'000, /* 17.01_MHz_XTAL Epic 14E */ - 17'064'000, /* 17.064_MHz_XTAL Memorex 1377 */ - 17'074'800, /* 17.0748_MHz_XTAL SWTPC 8212 */ - 17'320'000, /* 17.320_MHz_XTAL Visual 50 */ - 17'350'000, /* 17.35_MHz_XTAL ITT Courier 1700 */ - 17'360'000, /* 17.36_MHz_XTAL OMTI Series 10 SCSI controller */ - 17'430'000, /* 17.43_MHz_XTAL Videx Videoterm */ - 17'550'000, /* 17.55_MHz_XTAL HP 264x display clock (50 Hz configuration) */ - 17'600'000, /* 17.6_MHz_XTAL LSI Octopus */ - 17'734'470, /* 17.73447_MHz_XTAL 4x PAL subcarrier */ - 17'734'472, /* 17.734472_MHz_XTAL 4x PAL subcarrier - All of these exist, exact 4x PAL is actually 17'734'475 */ - 17'734'475, /* 17.734475_MHz_XTAL 4x PAL subcarrier - " */ - 17'734'476, /* 17.734476_MHz_XTAL 4x PAL subcarrier - " */ - 17'812'000, /* 17.812_MHz_XTAL Videopac C52 */ - 17'971'200, /* 17.9712_MHz_XTAL Compucolor II, Hazeltine Esprit III */ - 18'000'000, /* 18_MHz_XTAL S.A.R, Ikari Warriors 3 */ - 18'414'000, /* 18.414_MHz_XTAL Ann Arbor Ambassador */ - 18'432'000, /* 18.432_MHz_XTAL Extremely common, used on 100's of PCBs (48000 * 384) */ - 18'480'000, /* 18.48_MHz_XTAL Wyse WY-100 video */ - 18'575'000, /* 18.575_MHz_XTAL Visual 102, Visual 220 */ - 18'600'000, /* 18.6_MHz_XTAL Teleray Model 10 */ - 18'720'000, /* 18.72_MHz_XTAL Nokia MikroMikko 1 */ - 18'867'000, /* 18.867_MHz_XTAL Decision Data IS-482 */ - 18'869'600, /* 18.8696_MHz_XTAL Memorex 2178 */ - 19'170'000, /* 19.17_MHz_XTAL Ericsson ISA8 Monochrome HR Graphics Board */ - 19'339'600, /* 19.3396_MHz_XTAL TeleVideo TVI-955 80-column display clock */ - 19'584'000, /* 19.584_MHz_XTAL ADM-42 */ - 19'600'000, /* 19.6_MHz_XTAL Universal Mr. Do - Model 8021 PCB */ - 19'602'000, /* 19.602_MHz_XTAL Ampex 210+ 80-column display clock */ - 19'660'800, /* 19.6608_MHz_XTAL Euro League (bootleg), labeled as "UKI 19.6608 20PF" */ - 19'661'400, /* 19.6614_MHz_XTAL Wyse WY-30 */ - 19'718'400, /* 19.7184_MHz_XTAL Informer 207/100 */ - 19'923'000, /* 19.923_MHz_XTAL Cinematronics vectors */ - 19'968'000, /* 19.968_MHz_XTAL Used mostly by some Taito games */ - 20'000'000, /* 20_MHz_XTAL - */ - 20'160'000, /* 20.16_MHz_XTAL Nintendo 8080 */ - 20'275'200, /* 20.2752_MHz_XTAL TRS-80 Model III */ - 20'282'000, /* 20.282_MHz_XTAL Northwest Digitial Systems GP-19 */ - 20'375'040, /* 20.37504_MHz_XTAL Apple Lisa dot clock (197-0019A) */ - 20'625'000, /* 20.625_MHz_XTAL SM 7238 */ - 20'790'000, /* 20.79_MHz_XTAL Blockade-hardware Gremlin games */ - 21'000'000, /* 21_MHz_XTAL Lock-On pixel clock */ - 21'052'600, /* 21.0526_MHz_XTAL NEC PC-98xx pixel clock */ - 21'060'000, /* 21.06_MHz_XTAL HP 264x display clock (60 Hz configuration) */ - 21'254'400, /* 21.2544_MHz_XTAL TeleVideo 970 132-column display clock */ - 21'281'370, /* 21.28137_MHz_XTAL Radica Tetris (PAL) */ - 21'300'000, /* 21.3_MHz_XTAL - */ - 21'328'100, /* 21.3281_MHz_XTAL Philips NMS8245 */ - 21'477'272, /* 21.477272_MHz_XTAL BMC bowling, some Data East 90's games, Vtech Socrates; (6x NTSC subcarrier) */ - 21'667'500, /* 21.6675_MHz_XTAL AT&T 610 80-column display clock */ - 21'756'600, /* 21.7566_MHz_XTAL Tab Products E-22 80-column display clock */ - 22'000'000, /* 22_MHz_XTAL - */ - 22'032'000, /* 22.032_MHz_XTAL Intellec Series II I/O controller */ - 22'096'000, /* 22.096_MHz_XTAL ADDS Viewpoint 122 */ - 22'118'400, /* 22.1184_MHz_XTAL Amusco Poker */ - 22'168'000, /* 22.168_MHz_XTAL Sony HB-10P VDP (5x PAL subcarrier) */ - 22'248'000, /* 22.248_MHz_XTAL Quantel DPB-7000 */ - 22'321'000, /* 22.321_MHz_XTAL Apple LaserWriter II NT */ - 22'464'000, /* 22.464_MHz_XTAL CIT-101 132-column display clock */ - 22'579'000, /* 22.579_MHz_XTAL Sega System H1 SCSP clock */ - 22'579'200, /* 22.5792_MHz_XTAL Enhanced Apple Digital Sound Chip clock (44100 * 512) */ - 22'656'000, /* 22.656_MHz_XTAL Super Pinball Action (~1440x NTSC line rate) */ - 22'680'000, /* 22.680_MHz_XTAL HDS200 80-columns display clock */ - 22'896'000, /* 22.896_MHz_XTAL DEC VT220 132-column display clock */ - 23'200'000, /* 23.2_MHz_XTAL Roland JV-80 & JV-880 PCM clock */ - 23'814'000, /* 23.814_MHz_XTAL TeleVideo TVI-912, 920 & 950 */ - 23'961'600, /* 23.9616_MHz_XTAL Osborne 4 (Vixen) */ - 24'000'000, /* 24_MHz_XTAL Mario, 80's Data East games, 80's Konami games */ - 24'073'400, /* 24.0734_MHz_XTAL DEC Rainbow 100 */ - 24'167'829, /* 24.167829_MHz_XTAL Neo Geo AES rev. 3-3 and later (~1536x NTSC line rate) */ - 24'270'000, /* 24.27_MHz_XTAL CIT-101XL */ - 24'300'000, /* 24.3_MHz_XTAL ADM 36 132-column display clock */ - 24'576'000, /* 24.576_MHz_XTAL Pole Position h/w, Model 3 CPU board */ - 24'883'200, /* 24.8832_MHz_XTAL DEC VT100 */ - 25'000'000, /* 25_MHz_XTAL Namco System 22, Taito GNET, Dogyuun h/w */ - 25'174'800, /* 25.1748_MHz_XTAL Sega System 16A/16B (1600x NTSC line rate) */ - 25'175'000, /* 25.175_MHz_XTAL IBM MCGA/VGA 320/640-pixel graphics */ - 25'200'000, /* 25.2_MHz_XTAL Tektronix 4404 video clock */ - 25'398'360, /* 25.39836_MHz_XTAL Tandberg TDV 2324 */ - 25'400'000, /* 25.4_MHz_XTAL PC9801-86 PCM base clock */ - 25'447'000, /* 25.447_MHz_XTAL Namco EVA3A (Funcube2) */ - 25'771'500, /* 25.7715_MHz_XTAL HP-2622A */ - 25'920'000, /* 25.92_MHz_XTAL ADDS Viewpoint 60 */ - 26'000'000, /* 26_MHz_XTAL Gaelco PCBs */ - 26'195'000, /* 26.195_MHz_XTAL Roland JD-800 */ - 26'366'000, /* 26.366_MHz_XTAL DEC VT320 */ - 26'580'000, /* 26.58_MHz_XTAL Wyse WY-60 80-column display clock */ - 26'590'906, /* 26.590906_MHz_XTAL Atari Jaguar NTSC */ - 26'593'900, /* 26.5939_MHz_XTAL Atari Jaguar PAL */ - 26'601'712, /* 26.601712_MHz_XTAL Astro Corp.'s Show Hand, PAL Vtech/Yeno Socrates (6x PAL subcarrier) */ - 26'666'000, /* 26.666_MHz_XTAL Imagetek I4220/I4300 */ - 26'666'666, /* 26.666666_MHz_XTAL Irem M92 but most use 27MHz */ - 26'670'000, /* 26.670_MHz_XTAL Namco EVA */ - 26'686'000, /* 26.686_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips */ - 26'824'000, /* 26.824_MHz_XTAL Astro Corp.'s Zoo */ - 26'880'000, /* 26.88_MHz_XTAL Roland RF5C36/SA-16 clock (30000 * 896) */ - 26'989'200, /* 26.9892_MHz_XTAL TeleVideo 965 */ - 27'000'000, /* 27_MHz_XTAL Some Banpresto games macrossp, Irem M92 and 90's Toaplan games */ - 27'164'000, /* 27.164_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips */ - 27'210'900, /* 27.2109_MHz_XTAL LA Girl */ - 27'562'000, /* 27.562_MHz_XTAL Visual 220 */ - 27'720'000, /* 27.72_MHz_XTAL AT&T 610 132-column display clock */ - 27'956'000, /* 27.956_MHz_XTAL CIT-101e 132-column display clock */ - 28'000'000, /* 28_MHz_XTAL Sega System H1 SH2 clock, Kyukyoku Tiger / Twin Cobra */ - 28'224'000, /* 28.224_MHz_XTAL Roland JD-800 */ - 28'322'000, /* 28.322_MHz_XTAL Saitek RISC 2500, Mephisto Montreux */ - 28'375'160, /* 28.37516_MHz_XTAL Amiga PAL systems */ - 28'475'000, /* 28.475_MHz_XTAL CoCo 3 PAL */ - 28'480'000, /* 28.48_MHz_XTAL Chromatics CGC-7900 */ - 28'636'000, /* 28.636_MHz_XTAL Super Kaneko Nova System */ - 28'636'363, /* 28.636363_MHz_XTAL Later Leland games and Atari GT, Amiga NTSC, Raiden2 h/w (8x NTSC subcarrier), NEC PC-88xx */ - 28'640'000, /* 28.64_MHz_XTAL Fuuki FG-1c AI AM-2 PCB */ - 28'700'000, /* 28.7_MHz_XTAL - */ - 29'376'000, /* 29.376_MHz_XTAL Qume QVT-103 */ - 29'491'200, /* 29.4912_MHz_XTAL Xerox Alto-II system clock (tagged 29.4MHz in the schematics) */ - 30'000'000, /* 30_MHz_XTAL Impera Magic Card */ - 30'209'800, /* 30.2098_MHz_XTAL Philips CD-i NTSC (1920x NTSC line rate) */ - 30'240'000, /* 30.24_MHz_XTAL Macintosh IIci RBV, 12- or 13-inch display */ - 30'476'180, /* 30.47618_MHz_XTAL Taito F3, JC, Under Fire */ - 30'800'000, /* 30.8_MHz_XTAL 15IE-00-013 */ - 31'279'500, /* 31.2795_MHz_XTAL Wyse WY-30+ */ - 31'334'400, /* 31.3344_MHz_XTAL Macintosh II */ - 31'684'000, /* 31.684_MHz_XTAL TeleVideo TVI-955 132-column display clock */ - 31'948'800, /* 31.9488_MHz_XTAL NEC PC-88xx, PC-98xx */ - 32'000'000, /* 32_MHz_XTAL - */ - 32'147'000, /* 32.147_MHz_XTAL Ampex 210+ 132-column display clock */ - 32'215'900, /* 32.2159_MHz_XTAL Sega System 32, Sega Game Gear (close to 9x NTSC subcarrier which is 32.215905Mhz */ - 32'220'000, /* 32.22_MHz_XTAL Typically used on 90's Data East PCBs */ - 32'256'000, /* 32.256_MHz_XTAL Hitachi MB-6890 */ - 32'317'400, /* 32.3174_MHz_XTAL DEC VT330, VT340 */ - 32'530'470, /* 32.53047_MHz_XTAL Seta 2 */ - 32'640'000, /* 32.64_MHz_XTAL Vector 4 */ - 32'768'000, /* 32.768_MHz_XTAL Roland D-50 audio clock */ - 33'000'000, /* 33_MHz_XTAL Sega Model 3 video board */ - 33'264'000, /* 33.264_MHz_XTAL Hazeltine 1500 terminal */ - 33'330'000, /* 33.33_MHz_XTAL Sharp X68000 XVI */ - 33'333'000, /* 33.333_MHz_XTAL Sega Model 3 CPU board, Vegas */ - 33'333'333, /* 33.333333_MHz_XTAL Super Kaneko Nova System Sound clock with /2 divider */ - 33'833'000, /* 33.833_MHz_XTAL - */ - 33'868'800, /* 33.8688_MHz_XTAL Usually used to drive 90's Yamaha OPL/FM chips with /2 divider */ - 34'000'000, /* 34_MHz_XTAL Gaelco PCBs */ - 34'291'712, /* 34.291712_MHz_XTAL Fairlight CMI master card */ - 34'846'000, /* 34.846_MHz_XTAL Visual 550 */ - 35'452'500, /* 35.4525_MHz_XTAL Nokia MikroMikko 2 */ - 35'469'000, /* 35.469_MHz_XTAL ZX Spectrum +2/+3 (~8x PAL subcarrier) */ - 35'640'000, /* 35.640_MHz_XTAL HDS200 132-column display clock */ - 35'834'400, /* 35.8344_MHz_XTAL Tab Products E-22 132-column display clock */ - 35'840'000, /* 35.84_MHz_XTAL Akai MPC 60 voice PCB */ - 35'904'000, /* 35.904_MHz_XTAL Used on HP98543 graphics board */ - 36'000'000, /* 36_MHz_XTAL Sega Model 1 video board */ - 36'864'000, /* 36.864_MHz_XTAL Unidesa Cirsa Rock 'n' Roll */ - 37'980'000, /* 37.98_MHz_XTAL Falco 5220 */ - 38'769'220, /* 38.76922_MHz_XTAL Namco System 21 video board */ - 38'863'630, /* 38.86363_MHz_XTAL Sharp X68000 15.98kHz video */ - 39'321'600, /* 39.3216_MHz_XTAL Sun 2/120 */ - 39'710'000, /* 39.71_MHz_XTAL Wyse WY-60 132-column display clock */ - 40'000'000, /* 40_MHz_XTAL - */ - 40'210'000, /* 40.21_MHz_XTAL Fairlight CMI IIx */ - 41'539'000, /* 41.539_MHz_XTAL IBM PS/2 132-column text mode */ - 42'000'000, /* 42_MHz_XTAL BMC A-00211 - Popo Bear */ - 42'105'200, /* 42.1052_MHz_XTAL NEC PC-88xx */ - 42'954'545, /* 42.954545_MHz_XTAL CPS3 (12x NTSC subcarrier)*/ - 43'320'000, /* 43.32_MHz_XTAL DEC VT420 */ - 44'100'000, /* 44.1_MHz_XTAL Subsino's Bishou Jan */ - 44'236'800, /* 44.2368_MHz_XTAL ReCo6502, Fortune 32:16 */ - 44'452'800, /* 44.4528_MHz_XTAL TeleVideo 965 */ - 44'900'000, /* 44.9_MHz_XTAL IBM 8514 1024x768 43.5Hz graphics */ - 45'000'000, /* 45_MHz_XTAL Eolith with Hyperstone CPUs */ - 45'158'400, /* 45.1584_MHz_XTAL Philips CD-i CDIC, Sega Model 2A video, Sega Model 3 CPU */ - 45'619'200, /* 45.6192_MHz_XTAL DEC VK100 */ - 45'830'400, /* 45.8304_MHz_XTAL Microterm 5510 */ - 46'615'120, /* 46.61512_MHz_XTAL Soundblaster 16 PCM base clock */ - 47'736'000, /* 47.736_MHz_XTAL Visual 100 */ - 48'000'000, /* 48_MHz_XTAL Williams/Midway Y/Z-unit system / SSV board */ - 48'384'000, /* 48.384_MHz_XTAL Namco NB-1 */ - 48'556'800, /* 48.5568_MHz_XTAL Wyse WY-85 */ - 48'654'000, /* 48.654_MHz_XTAL Qume QVT-201 */ - 48'660'000, /* 48.66_MHz_XTAL Zaxxon */ - 49'152'000, /* 49.152_MHz_XTAL Used on some Namco PCBs, Baraduke h/w, System 21, Super System 22 */ - 49'423'500, /* 49.4235_MHz_XTAL Wyse WY-185 */ - 50'000'000, /* 50_MHz_XTAL Williams/Midway T/W/V-unit system */ - 50'113'000, /* 50.113_MHz_XTAL Namco NA-1 (14x NTSC subcarrier)*/ - 50'349'000, /* 50.349_MHz_XTAL Sega System 18 (~3200x NTSC line rate) */ - 50'350'000, /* 50.35_MHz_XTAL Sharp X68030 video */ - 51'200'000, /* 51.2_MHz_XTAL Namco Super System 22 video clock */ - 52'000'000, /* 52_MHz_XTAL Cojag */ - 52'832'000, /* 52.832_MHz_XTAL Wang PC TIG video controller */ - 52'867'000, /* 52.867_MHz_XTAL Atlus Print Club (Sega C2 PCB) */ - 53'203'424, /* 53.203424_MHz_XTAL Master System, Mega Drive PAL (12x PAL subcarrier) */ - 53'693'175, /* 53.693175_MHz_XTAL PSX-based h/w, Sony ZN1-2-based (15x NTSC subcarrier) */ - 54'000'000, /* 54_MHz_XTAL Taito JC */ - 55'000'000, /* 55_MHz_XTAL Eolith Vega */ - 57'272'727, /* 57.272727_MHz_XTAL Psikyo SH2 with /2 divider (16x NTSC subcarrier)*/ - 57'283'200, /* 57.2832_MHz_XTAL Macintosh IIci RBV, 15-inch portrait display */ - 58'000'000, /* 58_MHz_XTAL Magic Reel (Play System) */ - 58'982'400, /* 58.9824_MHz_XTAL Wyse WY-65 */ - 59'292'000, /* 59.292_MHz_XTAL Data General D461 */ - 60'000'000, /* 60_MHz_XTAL ARM610 */ - 61'440'000, /* 61.44_MHz_XTAL Donkey Kong */ - 64'000'000, /* 64_MHz_XTAL BattleToads */ - 64'108'800, /* 64.1088_MHz_XTAL HP Topcat high-res */ - 66'000'000, /* 66_MHz_XTAL - */ - 66'666'700, /* 66.6667_MHz_XTAL Later Midway games */ - 67'737'600, /* 67.7376_MHz_XTAL PSX-based h/w, Sony ZN1-2-based */ - 68'850'000, /* 68.85_MHz_XTAL Wyse WY-50 */ - 69'551'990, /* 69.55199_MHz_XTAL Sharp X68000 31.5kHz video */ - 72'000'000, /* 72_MHz_XTAL Aristocrat MKV */ - 72'576'000, /* 72.576_MHz_XTAL Centipede, Millipede, Missile Command, Let's Go Bowling "Multipede" */ - 73'728'000, /* 73.728_MHz_XTAL Ms. Pac-Man/Galaga 20th Anniversary */ - 75'000'000, /* 75_MHz_XTAL Sony NEWS NWS-5000X */ - 77'414'400, /* 77.4144_MHz_XTAL NCD17c */ - 80'000'000, /* 80_MHz_XTAL ARM710 */ - 87'183'360, /* 87.18336_MHz_XTAL AT&T 630 MTG */ - 92'940'500, /* 92.9405_MHz_XTAL Sun cgthree */ - 96'000'000, /* 96_MHz_XTAL Acorn A680 */ - 99'522'000, /* 99.522_MHz_XTAL Radius Two Page Display */ - 100'000'000, /* 100_MHz_XTAL PSX-based Namco System 12, Vegas, Sony ZN1-2-based */ - 101'491'200, /* 101.4912_MHz_XTAL PSX-based Namco System 10 */ - 105'561'000, /* 105.561_MHz_XTAL Sun cgsix */ - 108'108'000, /* 108.108_MHz_XTAL HP 98550 high-res color card */ - 120'000'000, /* 120_MHz_XTAL Astro Corp.'s Stone Age */ - 200'000'000 /* 200_MHz_XTAL Base SH4 CPU (Naomi, Hikaru etc.) */ + 32'768, // 32.768_kHz_XTAL Used to drive RTC chips + 38'400, // 38.4_kHz_XTAL Resonator + 384'000, // 384_kHz_XTAL Resonator - Commonly used for driving OKI MSM5205 + 400'000, // 400_kHz_XTAL Resonator - OKI MSM5205 on Great Swordman h/w + 430'000, // 430_kHz_XTAL Resonator + 455'000, // 455_kHz_XTAL Resonator - OKI MSM5205 on Gladiator h/w + 500'000, // 500_kHz_XTAL Resonator - MIDI clock on various synthesizers (31250 * 16) + 512'000, // 512_kHz_XTAL Resonator - Toshiba TC8830F + 600'000, // 600_kHz_XTAL - + 640'000, // 640_kHz_XTAL Resonator - NEC UPD7759, Texas Instruments Speech Chips @ 8khz + 960'000, // 960_kHz_XTAL Resonator - Xerox Notetaker Keyboard UART + 1'000'000, // 1_MHz_XTAL Used to drive OKI M6295 chips + 1'008'000, // 1.008_MHz_XTAL Acorn Microcomputer (System 1) + 1'056'000, // 1.056_MHz_XTAL Resonator - OKI M6295 on Trio The Punch h/w + 1'294'400, // 1.2944_MHz_XTAL BBN BitGraph PSG + 1'600'000, // 1.6_MHz_XTAL Resonator - Roland TR-707 + 1'689'600, // 1.6896_MHz_XTAL Diablo 1355WP Printer + 1'750'000, // 1.75_MHz_XTAL RCA CDP1861 + 1'797'100, // 1.7971_MHz_XTAL SWTPC 6800 (with MIKBUG) + 1'843'200, // 1.8432_MHz_XTAL Bondwell 12/14 + 2'000'000, // 2_MHz_XTAL - + 2'012'160, // 2.01216_MHz_XTAL Cidelsa Draco sound board + 2'097'152, // 2.097152_MHz_XTAL Icatel 1995 - Brazilian public payphone + 2'250'000, // 2.25_MHz_XTAL Resonator - YM2154 on Yamaha PSR-60 & PSR-70 + 2'376'000, // 2.376_MHz_XTAL CIT-101 keyboard + 2'457'600, // 2.4576_MHz_XTAL Atari ST MFP + 2'500'000, // 2.5_MHz_XTAL Janken Man units + 2'600'000, // 2.6_MHz_XTAL Sharp PC-1500 + 2'700'000, // 2.7_MHz_XTAL Resonator - YM2154 on Yamaha RX15 + 2'950'000, // 2.95_MHz_XTAL Playmatic MPU-C, MPU-III & Sound-3 + 3'000'000, // 3_MHz_XTAL Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs + 3'072'000, // 3.072_MHz_XTAL INS 8520 input clock rate + 3'120'000, // 3.12_MHz_XTAL SP0250 clock on Gottlieb games + 3'276'800, // 3.2768_MHz_XTAL SP0256 clock in Speech Synthesis for Dragon 32 + 3'300'000, // 3.3_MHz_XTAL LC 80 (export) + 3'521'280, // 3.52128_MHz_XTAL RCA COSMAC VIP + 3'546'800, // 3.5468_MHz_XTAL Atari 400 PAL + 3'546'894, // 3.546894_MHz_XTAL Atari 2600 PAL + 3'547'000, // 3.547_MHz_XTAL Philips G7200, Philips C7240 + 3'562'500, // 3.5625_MHz_XTAL Jopac JO7400 + 3'570'000, // 3.57_MHz_XTAL Telmac TMC-600 + 3'578'640, // 3.57864_MHz_XTAL Atari Portfolio PCD3311T + 3'579'000, // 3.579_MHz_XTAL BeebOPL + 3'579'545, // 3.579545_MHz_XTAL NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) + 3'579'575, // 3.579575_MHz_XTAL Atari 2600 NTSC + 3'680'000, // 3.68_MHz_XTAL Resonator - Baud rate clock for the 6551 in the MTU-130 + 3'686'400, // 3.6864_MHz_XTAL Baud rate clock for MC68681 and similar UARTs + 3'840'000, // 3.84_MHz_XTAL Fairlight CMI Alphanumeric Keyboard + 3'900'000, // 3.9_MHz_XTAL Resonator - Used on some Fidelity boards + 3'932'160, // 3.93216_MHz_XTAL Apple Lisa COP421 (197-0016A) + 4'000'000, // 4_MHz_XTAL - + 4'028'000, // 4.028_MHz_XTAL Sony SMC-777 + 4'032'000, // 4.032_MHz_XTAL GRiD Compass modem board + 4'096'000, // 4.096_MHz_XTAL Used to drive OKI M9810 chips + 4'194'304, // 4.194304_MHz_XTAL Used to drive MC146818 / Nintendo Game Boy + 4'220'000, // 4.220_MHz_XTAL Used to drive OKI M6295 chips on some Namco boards, usually with /4 divider + 4'224'000, // 4.224_MHz_XTAL Used to drive OKI M6295 chips, usually with /4 divider + 4'410'000, // 4.41_MHz_XTAL Pioneer PR-8210 ldplayer + 4'433'610, // 4.43361_MHz_XTAL Cidelsa Draco + 4'433'619, // 4.433619_MHz_XTAL PAL color subcarrier (technically 4.43361875mhz) + 4'608'000, // 4.608_MHz_XTAL Luxor ABC-77 keyboard (Keytronic custom part #48-300-107 is equivalent) + 4'915'200, // 4.9152_MHz_XTAL - + 4'952'000, // 4.952_MHz_XTAL IGS M036 based mahjong games, for TT5665 sound chip + 5'000'000, // 5_MHz_XTAL Mutant Night + 5'068'800, // 5.0688_MHz_XTAL Usually used as MC2661 or COM8116 baud rate clock + 5'185'000, // 5.185_MHz_XTAL Intel INTELLEC® 4 + 5'370'000, // 5.37_MHz_XTAL HP 95LX + 5'460'000, // 5.46_MHz_XTAL ec1840 and ec1841 keyboard + 5'500'000, // 5.5_MHz_XTAL Yamaha PSS-480 + 5'529'600, // 5.5296_MHz_XTAL Kontron PSI98 keyboard + 5'626'000, // 5.626_MHz_XTAL RCA CDP1869 PAL dot clock + 5'659'200, // 5.6592_MHz_XTAL Digilog 320 dot clock + 5'670'000, // 5.67_MHz_XTAL RCA CDP1869 NTSC dot clock + 5'714'300, // 5.7143_MHz_XTAL Cidelsa Destroyer, TeleVideo serial keyboards + 5'856'000, // 5.856_MHz_XTAL HP 3478A Multimeter + 5'911'000, // 5.911_MHz_XTAL Philips Videopac Plus G7400 + 5'990'400, // 5.9904_MHz_XTAL Luxor ABC 800 keyboard (Keytronic custom part #48-300-008 is equivalent) + 6'000'000, // 6_MHz_XTAL American Poker II, Taito SJ System + 6'048'000, // 6.048_MHz_XTAL Hektor II + 6'144'000, // 6.144_MHz_XTAL Used on Alpha Denshi early 80's games sound board, Casio FP-200 and Namco Universal System 16 + 6'400'000, // 6.4_MHz_XTAL Textel Compact + 6'500'000, // 6.5_MHz_XTAL Jupiter Ace, Roland QDD interface + 6'880'000, // 6.88_MHz_XTAL Barcrest MPU4 + 6'900'000, // 6.9_MHz_XTAL BBN BitGraph CPU + 7'000'000, // 7_MHz_XTAL Jaleco Mega System PCBs + 7'056'000, // 7.056_MHz_XTAL Alesis QS FXCHIP (LCM of 44.1 kHz and 48 kHz) + 7'159'090, // 7.15909_MHz_XTAL Blood Bros (2x NTSC subcarrier) + 7'200'000, // 7.2_MHz_XTAL Novag Constellation (later models, with /2 divider), Kawai K1 keyscan IC + 7'372'800, // 7.3728_MHz_XTAL - + 7'680'000, // 7.68_MHz_XTAL Psion Series 3 + 7'864'300, // 7.8643_MHz_XTAL Used on InterFlip games as video clock + 7'987'000, // 7.987_MHz_XTAL PC9801-86 YM2608 clock + 7'995'500, // 7.9955_MHz_XTAL Used on Electronic Devices Italy Galaxy Gunners sound board + 8'000'000, // 8_MHz_XTAL Extremely common, used on 100's of PCBs + 8'200'000, // 8.2_MHz_XTAL Universal Mr. Do - Model 8021 PCB + 8'388'000, // 8.388_MHz_XTAL Nintendo Game Boy Color + 8'448'000, // 8.448_MHz_XTAL Banpresto's Note Chance - Used to drive OKI M6295 chips, usually with /8 divider + 8'467'200, // 8.4672_MHz_XTAL Subsino's Ying Hua Lian + 8'664'000, // 8.664_MHz_XTAL Touchmaster + 8'700'000, // 8.7_MHz_XTAL Tandberg TDV 2324 + 8'860'000, // 8.86_MHz_XTAL AlphaTantel + 8'867'000, // 8.867_MHz_XTAL Philips G7400 (~2x PAL subcarrier) + 8'867'236, // 8.867236_MHz_XTAL RCA CDP1869 PAL color clock (~2x PAL subcarrier) + 8'867'238, // 8.867238_MHz_XTAL ETI-660 (~2x PAL subcarrier) + 8'945'000, // 8.945_MHz_XTAL Hit Me + 8'960'000, // 8.96_MHz_XTAL Casio CZ-101 (divided by 2 for Music LSI) + 9'000'000, // 9_MHz_XTAL Homedata PCBs + 9'216'000, // 9.216_MHz_XTAL Univac UTS 20 + 9'263'750, // 9.263750_MHz_XTAL Sai Yu Gou Ma Roku bootleg + 9'400'000, // 9.4_MHz_XTAL Yamaha MU-5 and TG-100 + 9'426'500, // 9.4265_MHz_XTAL Yamaha DX7, and DX9 + 9'600'000, // 9.6_MHz_XTAL WD37C65 second clock (for 300 KB/sec rate) + 9'732'000, // 9.732_MHz_XTAL CTA Invader + 9'828'000, // 9.828_MHz_XTAL Universal PCBs + 9'830'400, // 9.8304_MHz_XTAL Epson PX-8 + 9'832'000, // 9.832_MHz_XTAL Robotron A7150 + 9'877'680, // 9.87768_MHz_XTAL Microterm 420 + 9'987'000, // 9.987_MHz_XTAL Crazy Balloon + 10'000'000, // 10_MHz_XTAL - + 10'137'600, // 10.1376_MHz_XTAL Wyse WY-100 + 10'240'000, // 10.240_MHz_XTAL Stella 8085 based fruit machines + 10'245'000, // 10.245_MHz_XTAL PES Speech box + 10'380'000, // 10.38_MHz_XTAL Fairlight Q219 Lightpen/Graphics Card + 10'480'000, // 10.48_MHz_XTAL System-80 (50 Hz) + 10'500'000, // 10.5_MHz_XTAL Agat-7 + 10'595'000, // 10.595_MHz_XTAL Mad Alien + 10'644'000, // 10.644_MHz_XTAL Northwest Digitial Systems GP-19 + 10'644'500, // 10.6445_MHz_XTAL TRS-80 Model I + 10'687'500, // 10.6875_MHz_XTAL BBC Bridge Companion + 10'694'250, // 10.69425_MHz_XTAL Xerox 820 + 10'717'200, // 10.7172_MHz_XTAL Eltec EurocomII + 10'730'000, // 10.73_MHz_XTAL Ruleta RE-900 VDP Clock + 10'733'000, // 10.733_MHz_XTAL The Fairyland Story + 10'738'000, // 10.738_MHz_XTAL Pokerout (poker+breakout) TMS9129 VDP Clock + 10'738'635, // 10.738635_MHz_XTAL TMS9918 family (3x NTSC subcarrier) + 10'816'000, // 10.816_MHz_XTAL Universal 1979-1980 (Cosmic Alien, etc) + 10'886'400, // 10.8864_MHz_XTAL Systel System 100 + 10'920'000, // 10.92_MHz_XTAL ADDS Viewpoint 60, Viewpoint A2 + 11'000'000, // 11_MHz_XTAL Mario I8039 sound + 11'004'000, // 11.004_MHz_XTAL TI 911 VDT + 11'059'200, // 11.0592_MHz_XTAL Used with MCS-51 to generate common baud rates + 11'200'000, // 11.2_MHz_XTAL New York, New York + 11'289'000, // 11.289_MHz_XTAL Vanguard + 11'289'600, // 11.2896_MHz_XTAL Frantic Fred + 11'400'000, // 11.4_MHz_XTAL HP 9845 + 11'668'800, // 11.6688_MHz_XTAL Gameplan pixel clock + 11'730'000, // 11.73_MHz_XTAL Irem M-11 + 11'800'000, // 11.8_MHz_XTAL IBM PC Music Feature Card + 11'980'800, // 11.9808_MHz_XTAL Luxor ABC 80 + 12'000'000, // 12_MHz_XTAL Extremely common, used on 100's of PCBs + 12'057'600, // 12.0576_MHz_XTAL Poly 1 (38400 * 314) + 12'096'000, // 12.096_MHz_XTAL Some early 80's Atari games + 12'288'000, // 12.288_MHz_XTAL Sega Model 3 digital audio board + 12'292'000, // 12.292_MHz_XTAL Northwest Digitial Systems GP-19 + 12'324'000, // 12.324_MHz_XTAL Otrona Attache + 12'335'600, // 12.3356_MHz_XTAL RasterOps ColorBoard 264 (~784x NTSC line rate) + 12'472'500, // 12.4725_MHz_XTAL Bonanza's Mini Boy 7 + 12'480'000, // 12.48_MHz_XTAL TRS-80 Model II + 12'500'000, // 12.5_MHz_XTAL Red Alert audio board + 12'638'000, // 12.638_MHz_XTAL Exidy Sorcerer + 12'672'000, // 12.672_MHz_XTAL TRS-80 Model 4 80*24 video + 12'800'000, // 12.8_MHz_XTAL Cave CV1000 + 12'854'400, // 12.8544_MHz_XTAL Alphatronic P3 + 12'936'000, // 12.936_MHz_XTAL CDC 721 + 12'979'200, // 12.9792_MHz_XTAL Exidy 440 + 13'000'000, // 13_MHz_XTAL STM Pied Piper dot clock + 13'300'000, // 13.3_MHz_XTAL BMC bowling + 13'330'560, // 13.33056_MHz_XTAL Taito L + 13'333'000, // 13.333_MHz_XTAL Ojanko High School + 13'400'000, // 13.4_MHz_XTAL TNK3, Ikari Warriors h/w + 13'478'400, // 13.4784_MHz_XTAL TeleVideo 970 80-column display clock + 13'495'200, // 13.4952_MHz_XTAL Used on Shadow Force pcb and maybe other Technos pcbs? + 13'500'000, // 13.5_MHz_XTAL Microbee + 13'516'800, // 13.5168_MHz_XTAL Kontron KDT6 + 13'560'000, // 13.560_MHz_XTAL Tong Zi Maque + 13'608'000, // 13.608_MHz_XTAL TeleVideo 910 & 925 + 13'824'000, // 13.824_MHz_XTAL Robotron PC-1715 display circuit + 13'977'600, // 13.9776_MHz_XTAL Kaypro II dot clock + 14'000'000, // 14_MHz_XTAL - + 14'112'000, // 14.112_MHz_XTAL Timex/Sinclair TS2068 + 14'192'640, // 14.19264_MHz_XTAL Central Data 2650 + 14'218'000, // 14.218_MHz_XTAL Dragon + 14'250'450, // 14.25045_MHz_XTAL Apple II Europlus + 14'300'000, // 14.3_MHz_XTAL Agat-7 + 14'314'000, // 14.314_MHz_XTAL Taito TTL Board + 14'318'181, // 14.318181_MHz_XTAL Extremely common, used on 100's of PCBs (4x NTSC subcarrier) + 14'349'600, // 14.3496_MHz_XTAL Roland S-50 VDP + 14'469'000, // 14.469_MHz_XTAL Esprit Systems Executive 10/102 + 14'580'000, // 14.58_MHz_XTAL Fortune 32:16 Video Controller + 14'705'882, // 14.705882_MHz_XTAL Aleck64 + 14'728'000, // 14.728_MHz_XTAL ADM 36 + 14'742'800, // 14.7428_MHz_XTAL ADM 23 + 14'745'000, // 14.745_MHz_XTAL Synertek KTM-3 + 14'745'600, // 14.7456_MHz_XTAL Namco System 12 & System Super 22/23 for JVS + 14'746'000, // 14.746_MHz_XTAL Namco System 10 MGEXIO + 14'784'000, // 14.784_MHz_XTAL Zenith Z-29 + 14'916'000, // 14.916_MHz_XTAL ADDS Viewpoint 122 + 14'976'000, // 14.976_MHz_XTAL CIT-101 80-column display clock + 15'000'000, // 15_MHz_XTAL Sinclair QL, Amusco Poker + 15'148'800, // 15.1488_MHz_XTAL Zentec 9002/9003 + 15'206'400, // 15.2064_MHz_XTAL Falco TS-1 + 15'288'000, // 15.288_MHz_XTAL DEC VT220 80-column display clock + 15'300'720, // 15.30072_MHz_XTAL Microterm 420 + 15'360'000, // 15.36_MHz_XTAL Visual 1050 + 15'400'000, // 15.4_MHz_XTAL DVK KSM + 15'468'480, // 15.46848_MHz_XTAL Bank Panic h/w, Sega G80 + 15'582'000, // 15.582_MHz_XTAL Zentec Zephyr + 15'625'000, // 15.625_MHz_XTAL Zaccaria The Invaders + 15'667'200, // 15.6672_MHz_XTAL Apple Macintosh + 15'700'000, // 15.7_MHz_XTAL Motogonki + 15'741'000, // 15.741_MHz_XTAL DECmate II 80-column display clock + 15'897'600, // 15.8976_MHz_XTAL IAI Swyft + 15'920'000, // 15.92_MHz_XTAL HP Integral PC + 15'930'000, // 15.93_MHz_XTAL ADM 12 + 15'974'400, // 15.9744_MHz_XTAL Osborne 1 (9600 * 52 * 32) + 16'000'000, // 16_MHz_XTAL Extremely common, used on 100's of PCBs + 16'097'280, // 16.09728_MHz_XTAL DEC VT240 (1024 * 262 * 60) + 16'128'000, // 16.128_MHz_XTAL Fujitsu FM-7 + 16'200'000, // 16.2_MHz_XTAL Debut + 16'257'000, // 16.257_MHz_XTAL IBM PC MDA & EGA + 16'313'000, // 16.313_MHz_XTAL Micro-Term ERGO 201 + 16'364'000, // 16.364_MHz_XTAL Corvus Concept + 16'384'000, // 16.384_MHz_XTAL - + 16'400'000, // 16.4_MHz_XTAL MS 6102 + 16'537'000, // 16.537_MHz_XTAL Falco terminals 80-column clock + 16'572'000, // 16.572_MHz_XTAL Micro-Term ACT-5A + 16'588'800, // 16.5888_MHz_XTAL SM 7238 + 16'666'600, // 16.6666_MHz_XTAL Firebeat GCU + 16'667'000, // 16.667_MHz_XTAL Visual XDS-19P + 16'669'800, // 16.6698_MHz_XTAL Qume QVT-102 + 16'670'000, // 16.67_MHz_XTAL - + 16'777'216, // 16.777216_MHz_XTAL Nintendo Game Boy Advance + 16'934'400, // 16.9344_MHz_XTAL Usually used to drive 90's Yamaha OPL/FM chips (44100 * 384) + 16'960'000, // 16.960_MHz_XTAL Esprit Systems Executive 10/102 + 17'010'000, // 17.01_MHz_XTAL Epic 14E + 17'064'000, // 17.064_MHz_XTAL Memorex 1377 + 17'074'800, // 17.0748_MHz_XTAL SWTPC 8212 + 17'320'000, // 17.320_MHz_XTAL Visual 50 + 17'350'000, // 17.35_MHz_XTAL ITT Courier 1700 + 17'360'000, // 17.36_MHz_XTAL OMTI Series 10 SCSI controller + 17'430'000, // 17.43_MHz_XTAL Videx Videoterm + 17'550'000, // 17.55_MHz_XTAL HP 264x display clock (50 Hz configuration) + 17'600'000, // 17.6_MHz_XTAL LSI Octopus + 17'734'470, // 17.73447_MHz_XTAL 4x PAL subcarrier + 17'734'472, // 17.734472_MHz_XTAL 4x PAL subcarrier - All of these exist, exact 4x PAL is actually 17'734'475 + 17'734'475, // 17.734475_MHz_XTAL 4x PAL subcarrier - " + 17'734'476, // 17.734476_MHz_XTAL 4x PAL subcarrier - " + 17'812'000, // 17.812_MHz_XTAL Videopac C52 + 17'971'200, // 17.9712_MHz_XTAL Compucolor II, Hazeltine Esprit III + 18'000'000, // 18_MHz_XTAL S.A.R, Ikari Warriors 3 + 18'414'000, // 18.414_MHz_XTAL Ann Arbor Ambassador + 18'432'000, // 18.432_MHz_XTAL Extremely common, used on 100's of PCBs (48000 * 384) + 18'480'000, // 18.48_MHz_XTAL Wyse WY-100 video + 18'575'000, // 18.575_MHz_XTAL Visual 102, Visual 220 + 18'600'000, // 18.6_MHz_XTAL Teleray Model 10 + 18'720'000, // 18.72_MHz_XTAL Nokia MikroMikko 1 + 18'867'000, // 18.867_MHz_XTAL Decision Data IS-482 + 18'869'600, // 18.8696_MHz_XTAL Memorex 2178 + 19'170'000, // 19.17_MHz_XTAL Ericsson ISA8 Monochrome HR Graphics Board + 19'339'600, // 19.3396_MHz_XTAL TeleVideo TVI-955 80-column display clock + 19'584'000, // 19.584_MHz_XTAL ADM-42 + 19'600'000, // 19.6_MHz_XTAL Universal Mr. Do - Model 8021 PCB + 19'602'000, // 19.602_MHz_XTAL Ampex 210+ 80-column display clock + 19'660'800, // 19.6608_MHz_XTAL Euro League (bootleg), labeled as "UKI 19.6608 20PF" + 19'661'400, // 19.6614_MHz_XTAL Wyse WY-30 + 19'718'400, // 19.7184_MHz_XTAL Informer 207/100 + 19'923'000, // 19.923_MHz_XTAL Cinematronics vectors + 19'968'000, // 19.968_MHz_XTAL Used mostly by some Taito games + 20'000'000, // 20_MHz_XTAL - + 20'160'000, // 20.16_MHz_XTAL Nintendo 8080 + 20'275'200, // 20.2752_MHz_XTAL TRS-80 Model III + 20'282'000, // 20.282_MHz_XTAL Northwest Digitial Systems GP-19 + 20'375'040, // 20.37504_MHz_XTAL Apple Lisa dot clock (197-0019A) + 20'625'000, // 20.625_MHz_XTAL SM 7238 + 20'790'000, // 20.79_MHz_XTAL Blockade-hardware Gremlin games + 21'000'000, // 21_MHz_XTAL Lock-On pixel clock + 21'052'600, // 21.0526_MHz_XTAL NEC PC-98xx pixel clock + 21'060'000, // 21.06_MHz_XTAL HP 264x display clock (60 Hz configuration) + 21'254'400, // 21.2544_MHz_XTAL TeleVideo 970 132-column display clock + 21'281'370, // 21.28137_MHz_XTAL Radica Tetris (PAL) + 21'300'000, // 21.3_MHz_XTAL - + 21'328'100, // 21.3281_MHz_XTAL Philips NMS8245 + 21'477'272, // 21.477272_MHz_XTAL BMC bowling, some Data East 90's games, Vtech Socrates; (6x NTSC subcarrier) + 21'667'500, // 21.6675_MHz_XTAL AT&T 610 80-column display clock + 21'756'600, // 21.7566_MHz_XTAL Tab Products E-22 80-column display clock + 22'000'000, // 22_MHz_XTAL - + 22'032'000, // 22.032_MHz_XTAL Intellec Series II I/O controller + 22'096'000, // 22.096_MHz_XTAL ADDS Viewpoint 122 + 22'118'400, // 22.1184_MHz_XTAL Amusco Poker + 22'168'000, // 22.168_MHz_XTAL Sony HB-10P VDP (5x PAL subcarrier) + 22'248'000, // 22.248_MHz_XTAL Quantel DPB-7000 + 22'321'000, // 22.321_MHz_XTAL Apple LaserWriter II NT + 22'464'000, // 22.464_MHz_XTAL CIT-101 132-column display clock + 22'579'000, // 22.579_MHz_XTAL Sega System H1 SCSP clock + 22'579'200, // 22.5792_MHz_XTAL Enhanced Apple Digital Sound Chip clock (44100 * 512) + 22'656'000, // 22.656_MHz_XTAL Super Pinball Action (~1440x NTSC line rate) + 22'680'000, // 22.680_MHz_XTAL HDS200 80-columns display clock + 22'896'000, // 22.896_MHz_XTAL DEC VT220 132-column display clock + 23'200'000, // 23.2_MHz_XTAL Roland JV-80 & JV-880 PCM clock + 23'814'000, // 23.814_MHz_XTAL TeleVideo TVI-912, 920 & 950 + 23'961'600, // 23.9616_MHz_XTAL Osborne 4 (Vixen) + 24'000'000, // 24_MHz_XTAL Mario, 80's Data East games, 80's Konami games + 24'073'400, // 24.0734_MHz_XTAL DEC Rainbow 100 + 24'167'829, // 24.167829_MHz_XTAL Neo Geo AES rev. 3-3 and later (~1536x NTSC line rate) + 24'270'000, // 24.27_MHz_XTAL CIT-101XL + 24'300'000, // 24.3_MHz_XTAL ADM 36 132-column display clock + 24'576'000, // 24.576_MHz_XTAL Pole Position h/w, Model 3 CPU board + 24'883'200, // 24.8832_MHz_XTAL DEC VT100 + 25'000'000, // 25_MHz_XTAL Namco System 22, Taito GNET, Dogyuun h/w + 25'174'800, // 25.1748_MHz_XTAL Sega System 16A/16B (1600x NTSC line rate) + 25'175'000, // 25.175_MHz_XTAL IBM MCGA/VGA 320/640-pixel graphics + 25'200'000, // 25.2_MHz_XTAL Tektronix 4404 video clock + 25'398'360, // 25.39836_MHz_XTAL Tandberg TDV 2324 + 25'400'000, // 25.4_MHz_XTAL PC9801-86 PCM base clock + 25'447'000, // 25.447_MHz_XTAL Namco EVA3A (Funcube2) + 25'771'500, // 25.7715_MHz_XTAL HP-2622A + 25'920'000, // 25.92_MHz_XTAL ADDS Viewpoint 60 + 26'000'000, // 26_MHz_XTAL Gaelco PCBs + 26'195'000, // 26.195_MHz_XTAL Roland JD-800 + 26'366'000, // 26.366_MHz_XTAL DEC VT320 + 26'580'000, // 26.58_MHz_XTAL Wyse WY-60 80-column display clock + 26'590'906, // 26.590906_MHz_XTAL Atari Jaguar NTSC + 26'593'900, // 26.5939_MHz_XTAL Atari Jaguar PAL + 26'601'712, // 26.601712_MHz_XTAL Astro Corp.'s Show Hand, PAL Vtech/Yeno Socrates (6x PAL subcarrier) + 26'666'000, // 26.666_MHz_XTAL Imagetek I4220/I4300 + 26'666'666, // 26.666666_MHz_XTAL Irem M92 but most use 27MHz + 26'670'000, // 26.670_MHz_XTAL Namco EVA + 26'686'000, // 26.686_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips + 26'824'000, // 26.824_MHz_XTAL Astro Corp.'s Zoo + 26'880'000, // 26.88_MHz_XTAL Roland RF5C36/SA-16 clock (30000 * 896) + 26'989'200, // 26.9892_MHz_XTAL TeleVideo 965 + 27'000'000, // 27_MHz_XTAL Some Banpresto games macrossp, Irem M92 and 90's Toaplan games + 27'164'000, // 27.164_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips + 27'210'900, // 27.2109_MHz_XTAL LA Girl + 27'562'000, // 27.562_MHz_XTAL Visual 220 + 27'720'000, // 27.72_MHz_XTAL AT&T 610 132-column display clock + 27'956'000, // 27.956_MHz_XTAL CIT-101e 132-column display clock + 28'000'000, // 28_MHz_XTAL Sega System H1 SH2 clock, Kyukyoku Tiger / Twin Cobra + 28'224'000, // 28.224_MHz_XTAL Roland JD-800 + 28'322'000, // 28.322_MHz_XTAL Saitek RISC 2500, Mephisto Montreux + 28'375'160, // 28.37516_MHz_XTAL Amiga PAL systems + 28'475'000, // 28.475_MHz_XTAL CoCo 3 PAL + 28'480'000, // 28.48_MHz_XTAL Chromatics CGC-7900 + 28'636'000, // 28.636_MHz_XTAL Super Kaneko Nova System + 28'636'363, // 28.636363_MHz_XTAL Later Leland games and Atari GT, Amiga NTSC, Raiden2 h/w (8x NTSC subcarrier), NEC PC-88xx + 28'640'000, // 28.64_MHz_XTAL Fuuki FG-1c AI AM-2 PCB + 28'700'000, // 28.7_MHz_XTAL - + 29'376'000, // 29.376_MHz_XTAL Qume QVT-103 + 29'491'200, // 29.4912_MHz_XTAL Xerox Alto-II system clock (tagged 29.4MHz in the schematics) + 30'000'000, // 30_MHz_XTAL Impera Magic Card + 30'209'800, // 30.2098_MHz_XTAL Philips CD-i NTSC (1920x NTSC line rate) + 30'240'000, // 30.24_MHz_XTAL Macintosh IIci RBV, 12- or 13-inch display + 30'476'180, // 30.47618_MHz_XTAL Taito F3, JC, Under Fire + 30'800'000, // 30.8_MHz_XTAL 15IE-00-013 + 31'279'500, // 31.2795_MHz_XTAL Wyse WY-30+ + 31'334'400, // 31.3344_MHz_XTAL Macintosh II + 31'684'000, // 31.684_MHz_XTAL TeleVideo TVI-955 132-column display clock + 31'948'800, // 31.9488_MHz_XTAL NEC PC-88xx, PC-98xx + 32'000'000, // 32_MHz_XTAL - + 32'147'000, // 32.147_MHz_XTAL Ampex 210+ 132-column display clock + 32'215'900, // 32.2159_MHz_XTAL Sega System 32, Sega Game Gear (close to 9x NTSC subcarrier which is 32.215905Mhz + 32'220'000, // 32.22_MHz_XTAL Typically used on 90's Data East PCBs + 32'256'000, // 32.256_MHz_XTAL Hitachi MB-6890 + 32'317'400, // 32.3174_MHz_XTAL DEC VT330, VT340 + 32'530'470, // 32.53047_MHz_XTAL Seta 2 + 32'640'000, // 32.64_MHz_XTAL Vector 4 + 32'768'000, // 32.768_MHz_XTAL Roland D-50 audio clock + 33'000'000, // 33_MHz_XTAL Sega Model 3 video board + 33'264'000, // 33.264_MHz_XTAL Hazeltine 1500 terminal + 33'330'000, // 33.33_MHz_XTAL Sharp X68000 XVI + 33'333'000, // 33.333_MHz_XTAL Sega Model 3 CPU board, Vegas + 33'333'333, // 33.333333_MHz_XTAL Super Kaneko Nova System Sound clock with /2 divider + 33'833'000, // 33.833_MHz_XTAL - + 33'868'800, // 33.8688_MHz_XTAL Usually used to drive 90's Yamaha OPL/FM chips with /2 divider + 34'000'000, // 34_MHz_XTAL Gaelco PCBs + 34'291'712, // 34.291712_MHz_XTAL Fairlight CMI master card + 34'846'000, // 34.846_MHz_XTAL Visual 550 + 35'452'500, // 35.4525_MHz_XTAL Nokia MikroMikko 2 + 35'469'000, // 35.469_MHz_XTAL ZX Spectrum +2/+3 (~8x PAL subcarrier) + 35'640'000, // 35.640_MHz_XTAL HDS200 132-column display clock + 35'834'400, // 35.8344_MHz_XTAL Tab Products E-22 132-column display clock + 35'840'000, // 35.84_MHz_XTAL Akai MPC 60 voice PCB + 35'904'000, // 35.904_MHz_XTAL Used on HP98543 graphics board + 36'000'000, // 36_MHz_XTAL Sega Model 1 video board + 36'864'000, // 36.864_MHz_XTAL Unidesa Cirsa Rock 'n' Roll + 37'980'000, // 37.98_MHz_XTAL Falco 5220 + 38'769'220, // 38.76922_MHz_XTAL Namco System 21 video board + 38'863'630, // 38.86363_MHz_XTAL Sharp X68000 15.98kHz video + 39'321'600, // 39.3216_MHz_XTAL Sun 2/120 + 39'710'000, // 39.71_MHz_XTAL Wyse WY-60 132-column display clock + 40'000'000, // 40_MHz_XTAL - + 40'210'000, // 40.21_MHz_XTAL Fairlight CMI IIx + 41'539'000, // 41.539_MHz_XTAL IBM PS/2 132-column text mode + 42'000'000, // 42_MHz_XTAL BMC A-00211 - Popo Bear + 42'105'200, // 42.1052_MHz_XTAL NEC PC-88xx + 42'954'545, // 42.954545_MHz_XTAL CPS3 (12x NTSC subcarrier) + 43'320'000, // 43.32_MHz_XTAL DEC VT420 + 44'100'000, // 44.1_MHz_XTAL Subsino's Bishou Jan + 44'236'800, // 44.2368_MHz_XTAL ReCo6502, Fortune 32:16 + 44'452'800, // 44.4528_MHz_XTAL TeleVideo 965 + 44'900'000, // 44.9_MHz_XTAL IBM 8514 1024x768 43.5Hz graphics + 45'000'000, // 45_MHz_XTAL Eolith with Hyperstone CPUs + 45'158'400, // 45.1584_MHz_XTAL Philips CD-i CDIC, Sega Model 2A video, Sega Model 3 CPU + 45'619'200, // 45.6192_MHz_XTAL DEC VK100 + 45'830'400, // 45.8304_MHz_XTAL Microterm 5510 + 46'615'120, // 46.61512_MHz_XTAL Soundblaster 16 PCM base clock + 47'736'000, // 47.736_MHz_XTAL Visual 100 + 48'000'000, // 48_MHz_XTAL Williams/Midway Y/Z-unit system / SSV board + 48'384'000, // 48.384_MHz_XTAL Namco NB-1 + 48'556'800, // 48.5568_MHz_XTAL Wyse WY-85 + 48'654'000, // 48.654_MHz_XTAL Qume QVT-201 + 48'660'000, // 48.66_MHz_XTAL Zaxxon + 49'152'000, // 49.152_MHz_XTAL Used on some Namco PCBs, Baraduke h/w, System 21, Super System 22 + 49'423'500, // 49.4235_MHz_XTAL Wyse WY-185 + 50'000'000, // 50_MHz_XTAL Williams/Midway T/W/V-unit system + 50'113'000, // 50.113_MHz_XTAL Namco NA-1 (14x NTSC subcarrier) + 50'349'000, // 50.349_MHz_XTAL Sega System 18 (~3200x NTSC line rate) + 50'350'000, // 50.35_MHz_XTAL Sharp X68030 video + 51'200'000, // 51.2_MHz_XTAL Namco Super System 22 video clock + 52'000'000, // 52_MHz_XTAL Cojag + 52'832'000, // 52.832_MHz_XTAL Wang PC TIG video controller + 52'867'000, // 52.867_MHz_XTAL Atlus Print Club (Sega C2 PCB) + 53'203'424, // 53.203424_MHz_XTAL Master System, Mega Drive PAL (12x PAL subcarrier) + 53'693'175, // 53.693175_MHz_XTAL PSX-based h/w, Sony ZN1-2-based (15x NTSC subcarrier) + 54'000'000, // 54_MHz_XTAL Taito JC + 55'000'000, // 55_MHz_XTAL Eolith Vega + 57'272'727, // 57.272727_MHz_XTAL Psikyo SH2 with /2 divider (16x NTSC subcarrier) + 57'283'200, // 57.2832_MHz_XTAL Macintosh IIci RBV, 15-inch portrait display + 58'000'000, // 58_MHz_XTAL Magic Reel (Play System) + 58'982'400, // 58.9824_MHz_XTAL Wyse WY-65 + 59'292'000, // 59.292_MHz_XTAL Data General D461 + 60'000'000, // 60_MHz_XTAL ARM610 + 61'440'000, // 61.44_MHz_XTAL Donkey Kong + 64'000'000, // 64_MHz_XTAL BattleToads + 64'108'800, // 64.1088_MHz_XTAL HP Topcat high-res + 66'000'000, // 66_MHz_XTAL - + 66'666'700, // 66.6667_MHz_XTAL Later Midway games + 67'737'600, // 67.7376_MHz_XTAL PSX-based h/w, Sony ZN1-2-based + 68'850'000, // 68.85_MHz_XTAL Wyse WY-50 + 69'551'990, // 69.55199_MHz_XTAL Sharp X68000 31.5kHz video + 72'000'000, // 72_MHz_XTAL Aristocrat MKV + 72'576'000, // 72.576_MHz_XTAL Centipede, Millipede, Missile Command, Let's Go Bowling "Multipede" + 73'728'000, // 73.728_MHz_XTAL Ms. Pac-Man/Galaga 20th Anniversary + 75'000'000, // 75_MHz_XTAL Sony NEWS NWS-5000X + 77'414'400, // 77.4144_MHz_XTAL NCD17c + 80'000'000, // 80_MHz_XTAL ARM710 + 87'183'360, // 87.18336_MHz_XTAL AT&T 630 MTG + 92'940'500, // 92.9405_MHz_XTAL Sun cgthree + 96'000'000, // 96_MHz_XTAL Acorn A680 + 99'522'000, // 99.522_MHz_XTAL Radius Two Page Display + 100'000'000, // 100_MHz_XTAL PSX-based Namco System 12, Vegas, Sony ZN1-2-based + 101'491'200, // 101.4912_MHz_XTAL PSX-based Namco System 10 + 105'561'000, // 105.561_MHz_XTAL Sun cgsix + 108'108'000, // 108.108_MHz_XTAL HP 98550 high-res color card + 120'000'000, // 120_MHz_XTAL Astro Corp.'s Stone Age + 200'000'000 // 200_MHz_XTAL Base SH4 CPU (Naomi, Hikaru etc.) }; double XTAL::last_correct_value = -1; @@ -595,369 +595,3 @@ void XTAL::fail(double base_clock, const std::string &message) full_message += util::string_format(" Context: %s\n", message); fatalerror("%s\n", full_message); } - -/* - -For further reference: - -A search at http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=852333;keywords=cry -reveals the following shipping frequencies as of 1/1/2008: - -20kHz -25.600kHz -26.667kHz -28kHz - -30kHz -30.720kHz -30.76kHz -31.2kHz -31.25kHz -31.5kHz -32.000kHz -32.56kHz -32.768kHz -32.919kHz -34kHz -36kHz -38kHz -38.4kHz -39.500kHz - -40kHz -44.100kHz -46.604kHz -46.6084kHz - -50kHz -59.787kHz - -60.000kHz -60.002kHz -60.005kHz -65.535kHz -65.536kHz -69kHz - -70kHz -71kHz -72kHz -73kHz -74kHz -74.3kHz -74.4kHz -75kHz -76kHz -76.79kHz -76.8kHz -76.81kHz -77kHz -77.204kHz -77.287kHz -77.500kHz -77.503kHz -77.504kHz -78kHz -79kHz - -83kHz - -96kHz -96.006kHz - -100kHz -111kHz -117.72kHz -120kHz -120.8475kHz -125kHz -131.072kHz -149.475kHz -153.600kHz - -200kHz - -307.2kHz - -1.000MHz -1.8432MHz - -2.000MHz -2.048MHz -2.097152MHz -2.4576MHz -2.5MHz -2.560MHz -2.949120MHz - -3.000MHz -3.276MHz -3.2768MHz -3.579MHz -3.579545MHz -3.640MHz -3.6864MHz -3.700MHz -3.859MHz -3.93216MHz - -4.000MHz -4.032MHz -4.096MHz -4.09625MHz -4.194MHz -4.194304MHz -4.332MHz -4.433MHz -4.433616MHz -4.433618MHz -4.433619MHz -4.74687MHz -4.800MHz -4.8970MHz -4.90625MHz -4.915MHz -4.9152MHz - -5.000MHz -5.0688MHz -5.120MHz -5.223438MHz -5.5MHz -5.5296MHz -5.9904MHz - -6.000MHz -6.14MHz -6.144MHz -6.1760MHz -6.400 MHz -6.49830MHz -6.5MHz -6.5536MHz -6.612813MHz -6.7458MHz -6.757MHz -6.76438MHz - -7.1505MHz -7.15909 MHz -7.2MHz -7.3728MHz -7.68MHz -7.94888MHz - -8.000MHz -8.000156MHz -8.192MHz -8.388608MHz -8.432MHz -8.5MHz -8.6432MHz - -9.000MHz -9.216MHz -9.509375MHz -9.545MHz -9.6MHz -9.7941MHz -9.830MHz -9.8304MHz -9.84375MHz -9.8438MHz - -10.000MHz -10.240MHz -10.245MHz -10.6244MHz -10.738635MHz -10.73865MHz - -11.000MHz -11.046MHz -11.0592MHz -11.228MHz -11.2896MHz -11.520MHz -11.981350MHz - -12.000MHz -12.000393MHz -12.096MHz -12.1875MHz -12.288MHz -12.352MHz -12.500MHz -12.688MHz -12.800MHz -12.96MHz - -13.000MHz -13.0625MHz -13.225MHz -13.2256MHz -13.500MHz -13.5168MHz -13.56MHz -13.605MHz -13.824MHz -13.94916MHz - -14.00MHz -14.318MHz -14.31818MHz -14.3359MHz -14.3594MHz -14.4MHz -14.5MHz -14.69MHz -14.7456MHz -14.850MHz - -15MHz -15.360MHz - -16.000MHz -16.000312MHz -16.128MHz -16.257MHz -16.3676MHz -16.368MHz -16.384MHz -16.576MHz -16.6660MHz -16.667MHz -16.670MHz -16.800MHz -16.934MHz -16.9344MHz - -17.734475MHz - -18.000MHz -18.432MHz -18.869MHz - -19.200MHz -19.440MHz -19.660MHz -19.6608MHz -19.68MHz -19.800MHz - -20.000MHz -20.35625MHz -20.3563MHz -20.480MHz - -21.47727MHz - -22.000MHz -22.118MHz -22.1184MHz -22.400MHz -22.5MHz -22.5792MHz -22.6278MHz - -23MHz -23.2643MHz -23.5MHz -23.5122MHz -23.592MHz - -24.000MHz -24.00014MHz -24.5MHz -24.545454 MHz -24.5535MHz -24.576MHz -24.704MHz -24.7456MHz - -25.000MHz -25MHz -25.175MHz -25.2235MHz -25.4563MHz -25.5MHz - -26.000MHz -26.45125MHz -26.4513MHz -26.5MHz -26.5971MHz -26.800MHz - -27.000MHz -27.1344MHz -27.3067MHz -27.4688MHz - -28.000MHz -28.224MHz -28.259375MHz -28.2594MHz -28.322MHz -28.375MHz -28.5938MHz -28.636MHz -28.6363MHz -28.63636MHz - -29.4912MHz -29.498928MHz -29.500MHz - -30.000MHz -32.000MHz -32.514MHz -32.768MHz -33.000MHz -33.333MHz -33.3333MHz -33.8688MHz -35.2512MHz -35.3280MHz -36.000MHz -38.000MHz -38.00053MHz -38.400MHz -38.880MHz -39MHz - -40.000MHz -40.320MHz -40.960 MHz -42.000MHz -44.000MHz -44.2368MHz -44.545MHz -44.736MHz -44.800MHz -44.900MHz -45.000MHz -46.000MHz -48.000MHz -49.152MHz -49.86MHz - -50.000MHz -53.125MHz -55.000MHz - -60.000MHz -64.000MHz -66.000MHz -66.666MHz -66.6666MHz - -73.66979MHz -75.957292MHz -76.121875MHz - -80.000MHz - -100.00MHz - -*/ From 082795deac0e365372f6ba305b0e681d72e1e0c4 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 25 Aug 2024 20:25:53 +0200 Subject: [PATCH 12/44] xtal: small correction to indentation (IIRC srcclean in the past did that) --- src/emu/xtal.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 1f92d960822..51baa14ea27 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -57,17 +57,17 @@ const double XTAL::known_xtals[] = { /* Frequency Sugarvassed Examples ----------- ---------------------- ---------------------------------------- */ - 32'768, // 32.768_kHz_XTAL Used to drive RTC chips - 38'400, // 38.4_kHz_XTAL Resonator - 384'000, // 384_kHz_XTAL Resonator - Commonly used for driving OKI MSM5205 - 400'000, // 400_kHz_XTAL Resonator - OKI MSM5205 on Great Swordman h/w - 430'000, // 430_kHz_XTAL Resonator - 455'000, // 455_kHz_XTAL Resonator - OKI MSM5205 on Gladiator h/w - 500'000, // 500_kHz_XTAL Resonator - MIDI clock on various synthesizers (31250 * 16) - 512'000, // 512_kHz_XTAL Resonator - Toshiba TC8830F - 600'000, // 600_kHz_XTAL - - 640'000, // 640_kHz_XTAL Resonator - NEC UPD7759, Texas Instruments Speech Chips @ 8khz - 960'000, // 960_kHz_XTAL Resonator - Xerox Notetaker Keyboard UART + 32'768, // 32.768_kHz_XTAL Used to drive RTC chips + 38'400, // 38.4_kHz_XTAL Resonator + 384'000, // 384_kHz_XTAL Resonator - Commonly used for driving OKI MSM5205 + 400'000, // 400_kHz_XTAL Resonator - OKI MSM5205 on Great Swordman h/w + 430'000, // 430_kHz_XTAL Resonator + 455'000, // 455_kHz_XTAL Resonator - OKI MSM5205 on Gladiator h/w + 500'000, // 500_kHz_XTAL Resonator - MIDI clock on various synthesizers (31250 * 16) + 512'000, // 512_kHz_XTAL Resonator - Toshiba TC8830F + 600'000, // 600_kHz_XTAL - + 640'000, // 640_kHz_XTAL Resonator - NEC UPD7759, Texas Instruments Speech Chips @ 8khz + 960'000, // 960_kHz_XTAL Resonator - Xerox Notetaker Keyboard UART 1'000'000, // 1_MHz_XTAL Used to drive OKI M6295 chips 1'008'000, // 1.008_MHz_XTAL Acorn Microcomputer (System 1) 1'056'000, // 1.056_MHz_XTAL Resonator - OKI M6295 on Trio The Punch h/w From 9769cd25b1896e14e63415c11b1e4c1e37882694 Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 27 Aug 2024 09:15:02 +0200 Subject: [PATCH 13/44] pc/pcxt.cpp: split to filetto.cpp and tetriskr.cpp * pc/filetto.cpp: fine tune um5100 pitch frequency --- src/mame/mame.lst | 10 +- src/mame/pc/filetto.cpp | 423 ++++++++++++++++++++++++++ src/mame/pc/pcxt.cpp | 625 --------------------------------------- src/mame/pc/tetriskr.cpp | 281 ++++++++++++++++++ 4 files changed, 710 insertions(+), 629 deletions(-) create mode 100644 src/mame/pc/filetto.cpp delete mode 100644 src/mame/pc/pcxt.cpp create mode 100644 src/mame/pc/tetriskr.cpp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 44d5e4867e0..ec8fdb98942 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35943,6 +35943,9 @@ europc // 1988 Schneider Euro PC (CGA or Hercules) europc2 // 1989 Schneider Euro PC II euroxt // Schneider Euro XT +@source:pc/filetto.cpp +filetto // (c) 1990 Novamatic + @source:pc/fruitpc.cpp fruitpc // ??? @@ -36093,10 +36096,6 @@ so30h // SOYO 30H motherboard (486) so4saw2 // SOYO SY-4SAW2 motherboard (486) zito4dps // ZIDA Tomato board 4DPS (486) -@source:pc/pcxt.cpp -filetto // (c) 1990 Novamatic -tetriskr // (c) 1988? bootleg - @source:pc/poisk1.cpp poisk1 // @@ -36140,6 +36139,9 @@ t1000tx // 1987 Tandy 1000 TX @source:pc/teradrive.cpp teradrive +@source:pc/tetriskr.cpp +tetriskr // (c) 1988? bootleg + @source:pc/tosh1000.cpp tosh1000 diff --git a/src/mame/pc/filetto.cpp b/src/mame/pc/filetto.cpp new file mode 100644 index 00000000000..dbc30a0bd12 --- /dev/null +++ b/src/mame/pc/filetto.cpp @@ -0,0 +1,423 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, Chris Hardy +/************************************************************************************************** + +Filetto (c) 1990 Novarmatic + +TODO: +- Add a proper FDC device; +- UM5100 sample clock; +- buzzer sound; + +=================================================================================================== +The PCB is a un-modified IBM-PC with a CGA adapter & a prototyping card that controls the +interface between the pc and the Jamma connectors.Additionally there's also a UM5100 sound +chip for the sound. +PCB Part Number: S/N 90289764 NOVARXT +PCB Contents: +1x UMC 8923S-UM5100 voice processor (upper board) +1x MMI PAL16L8ACN-940CRK9 (upper board) +1x AMD AMPAL16R8APC-8804DM (upper board) +1x AMD P8088-1 main processor 8.000MHz (lower board) +1x Proton PT8010AF PLCC 28.636MHz (lower board) +1x UMC 8928LP-UM8272A floppy disk controller (lower board) +1x UMC 8935CS-UM82C11 Printer Adapter Interface (lower board) +1x UMC 8936CS-UM8250B Programmable asynchronous communications element (lower board) +1x UMC 8937NS-UM82C8167 Real Time Clock (lower board) +1x Yamaha V6363 CMDC QFP (lower board) +There isn't any keyboard found connected to the pcb. + +=================================================================================================== +The software of this game can be extracted with a normal Windows program extractor. +The files names are: +-command.com (1) +-ibmbio.com (1) +-ibmdos.com (1) +-ansi.sys (1) +-config.sys (2) +-autoexec.bat (3) +-x.exe (4) +(1)This is an old Italian version of MS-DOS (v3.30 18th March 1987). +(2)Contains "device=ansi.sys",it's an hook-up for the graphics used by the BIOS. +(3)It has an Echo off (as you can notice from the game itself) and then the loading of the +main program (x.exe). +(4)The main program,done in plain Basic with several Italian comments in it.The date of +the main program is 9th October 1990. + +**************************************************************************************************/ + +#include "emu.h" +#include "bus/isa/cga.h" +#include "cpu/i86/i86.h" +#include "machine/bankdev.h" +#include "machine/genpc.h" +#include "sound/hc55516.h" + +class isa8_cga_filetto_device : public isa8_cga_device +{ +public: + // construction/destruction + isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual const tiny_rom_entry *device_rom_region() const override; +}; + +DEFINE_DEVICE_TYPE(ISA8_CGA_FILETTO, isa8_cga_filetto_device, "filetto_cga", "ISA8_CGA_FILETTO") + +//------------------------------------------------- +// isa8_cga_filetto_device - constructor +//------------------------------------------------- + +isa8_cga_filetto_device::isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + isa8_cga_device(mconfig, ISA8_CGA_FILETTO, tag, owner, clock) +{ +} + +ROM_START( filetto_cga ) + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD("u67.bin", 0x0000, 0x2000, CRC(09710122) SHA1(de84bdd9245df287bbd3bb808f0c3531d13a3545) ) +ROM_END + +const tiny_rom_entry *isa8_cga_filetto_device::device_rom_region() const +{ + return ROM_NAME( filetto_cga ); +} + +namespace { + +class filetto_state : public driver_device +{ +public: + filetto_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_mb(*this, "mb"), + m_bank(*this, "bank"), + m_cvsd(*this, "voice"), + m_samples(*this, "samples"){ } + + void filetto(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + + TIMER_CALLBACK_MEMBER(sample_tick); + +private: + int m_lastvalue; + uint8_t m_disk_data[2]; + uint8_t m_port_b_data; + uint8_t m_status; + uint8_t m_clr_status; + uint8_t m_voice, m_bit; + uint32_t m_vaddr; + emu_timer *m_sample; + + uint8_t disk_iobank_r(offs_t offset); + void disk_iobank_w(offs_t offset, uint8_t data); + uint8_t fdc765_status_r(); + uint8_t fdc765_data_r(); + void fdc765_data_w(uint8_t data); + void fdc_dor_w(uint8_t data); + uint8_t port_a_r(); + uint8_t port_b_r(); + uint8_t port_c_r(); + void port_b_w(uint8_t data); + void voice_start_w(uint8_t data); + + required_device m_maincpu; + required_device m_mb; + required_device m_bank; + required_device m_cvsd; + required_memory_region m_samples; + void bank_map(address_map &map); + void filetto_io(address_map &map); + void filetto_map(address_map &map); +}; + + +uint8_t filetto_state::disk_iobank_r(offs_t offset) +{ + //printf("Read Prototyping card [%02x] @ PC=%05x\n",offset,m_maincpu->pc()); + //if(offset == 0) return ioport("DSW")->read(); + if(offset == 1) return ioport("IN1")->read(); + + return m_disk_data[offset]; +} + +void filetto_state::disk_iobank_w(offs_t offset, uint8_t data) +{ +/* + BIOS does a single out $0310,$F0 on reset + + Then does 2 outs to set the bank.. + + X1 X2 + + $F0 $F2 = m0 + $F1 $F2 = m1 + $F0 $F3 = m2 + $F1 $F3 = m3 + + The sequence of + + out $0310,X1 + out $0310,X2 + + sets the selected rom that appears in $C0000-$CFFFF + +*/ + int bank = 0; + +// printf("bank %d set to %02X\n", offset,data); + + if (data == 0xF0) + { + bank = 0; + } + else + { + if((m_lastvalue == 0xF0) && (data == 0xF2)) + bank = 0; + else if ((m_lastvalue == 0xF1) && (data == 0xF2)) + bank = 1; + else if ((m_lastvalue == 0xF0) && (data == 0xF3)) + bank = 2; + else if ((m_lastvalue == 0xF1) && (data == 0xF3)) + bank = 3; + } + + if (!(data & 0xf0)) + { + int bit = (data >> 1) - 2; + m_voice &= ~(1 << bit); + m_voice |= BIT(data, 0) << bit; + } + + m_bank->set_bank(bank); + + m_lastvalue = data; + + m_disk_data[offset] = data; +} + +uint8_t filetto_state::port_a_r() +{ + return 0xaa;//harmless keyboard error occurs without this +} + +uint8_t filetto_state::port_b_r() +{ + return m_port_b_data; +} + +uint8_t filetto_state::port_c_r() +{ + return 0x00;// DIPS? +} + +// Filetto uses this for either beep and um5100 sound routing,probably there's a I/O select somewhere ... +void filetto_state::port_b_w(uint8_t data) +{ + m_mb->m_pit8253->write_gate2(BIT(data, 0)); + m_mb->pc_speaker_set_spkrdata(BIT(data, 1)); + m_port_b_data = data; +// m_cvsd->digit_w(data); +} + +/*Floppy Disk Controller 765 device*/ +/*Currently we only emulate it at a point that the BIOS will pass the checks*/ + +#define FDC_BUSY 0x10 +#define FDC_WRITE 0x40 +#define FDC_READ 0x00 /*~0x40*/ + +uint8_t filetto_state::fdc765_status_r() +{ + uint8_t tmp; + tmp = m_status | 0x80; + m_clr_status++; + if(m_clr_status == 0x10) + { + m_status = 0; + m_clr_status = 0; + } + return tmp; +} + +uint8_t filetto_state::fdc765_data_r() +{ + m_status = (FDC_READ); + m_mb->m_pic8259->ir6_w(0); + return 0xc0; +} + +void filetto_state::fdc765_data_w(uint8_t data) +{ + m_status = (FDC_WRITE); +} + + +void filetto_state::fdc_dor_w(uint8_t data) +{ + m_mb->m_pic8259->ir6_w(1); +} + +// TODO: move to a real um5100 device +void filetto_state::voice_start_w(uint8_t data) +{ + // TODO: accurate pitch frequency + m_sample->adjust(attotime::zero, 0, attotime::from_hz(44150)); + m_bit = 7; + m_vaddr = ((m_voice & 0xf / 5) | (BIT(m_voice, 4) << 2)) * 0x8000; + logerror("%x %x\n",m_voice,m_vaddr); +} + +void filetto_state::filetto_map(address_map &map) +{ + map(0xc0000, 0xcffff).m(m_bank, FUNC(address_map_bank_device::amap8)); + map(0xf0000, 0xfffff).rom().region("bios", 0); +} + +void filetto_state::filetto_io(address_map &map) +{ + map.global_mask(0x3ff); + map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); + map(0x0060, 0x0060).r(FUNC(filetto_state::port_a_r)); //not a real 8255 + map(0x0061, 0x0061).rw(FUNC(filetto_state::port_b_r), FUNC(filetto_state::port_b_w)); + map(0x0062, 0x0062).r(FUNC(filetto_state::port_c_r)); + map(0x0201, 0x0201).portr("COIN"); // game port + map(0x0310, 0x0311).rw(FUNC(filetto_state::disk_iobank_r), FUNC(filetto_state::disk_iobank_w)); //Prototyping card + map(0x0312, 0x0312).portr("IN0"); // Prototyping card, r/o + map(0x0313, 0x0313).w(FUNC(filetto_state::voice_start_w)); + map(0x03f2, 0x03f2).w(FUNC(filetto_state::fdc_dor_w)); + map(0x03f4, 0x03f4).r(FUNC(filetto_state::fdc765_status_r)); //765 Floppy Disk Controller (FDC) Status + map(0x03f5, 0x03f5).rw(FUNC(filetto_state::fdc765_data_r), FUNC(filetto_state::fdc765_data_w));//FDC Data +} + + +void filetto_state::bank_map(address_map &map) +{ + map(0x00000, 0x3ffff).rom().region("game_prg", 0); +} + +static INPUT_PORTS_START( filetto ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + + PORT_START("IN1") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, "Extra Play" ) + PORT_DIPSETTING( 0x04, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, "Play at 6th match reached" ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("COIN") + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START( "pcvideo_cga_config" ) + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +TIMER_CALLBACK_MEMBER(filetto_state::sample_tick) +{ + m_cvsd->digit_w(BIT(m_samples->as_u8(m_vaddr), m_bit)); + m_cvsd->clock_w(1); + m_cvsd->clock_w(0); + if (m_bit == 0) + { + m_vaddr++; + m_bit = 8; + if (!(m_vaddr % 0x8000)) + m_sample->adjust(attotime::never); + } + m_bit--; +} + +void filetto_state::machine_start() +{ + m_sample = timer_alloc(FUNC(filetto_state::sample_tick), this); + + m_status = 0; + m_clr_status = 0; +} + +void filetto_state::machine_reset() +{ + m_lastvalue = -1; + m_voice = 0; +} + +static void filetto_isa8_cards(device_slot_interface &device) +{ + device.option_add_internal("filetto", ISA8_CGA_FILETTO); +} + + +void filetto_state::filetto(machine_config &config) +{ + I8088(config, m_maincpu, XTAL(14'318'181)/3); + m_maincpu->set_addrmap(AS_PROGRAM, &filetto_state::filetto_map); + m_maincpu->set_addrmap(AS_IO, &filetto_state::filetto_io); + m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); + + PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + m_mb->int_callback().set_inputline(m_maincpu, 0); + m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); + + ISA8_SLOT(config, "isa1", 0, "mb:isa", filetto_isa8_cards, "filetto", true); // FIXME: determine ISA bus clock + + HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, "mb:mono", 0.60); //8923S-UM5100 is a HC55536 with ROM hook-up + + RAM(config, RAM_TAG).set_default_size("640K"); + + ADDRESS_MAP_BANK(config, m_bank).set_map(&filetto_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); +} + +ROM_START( filetto ) + ROM_REGION( 0x10000, "bios", 0 ) + ROM_LOAD("u49.bin", 0xc000, 0x2000, CRC(1be6948a) SHA1(9c433f63d347c211ee4663f133e8417221bc4bf0)) + ROM_RELOAD( 0x8000, 0x2000 ) + ROM_RELOAD( 0x4000, 0x2000 ) + ROM_RELOAD( 0x0000, 0x2000 ) + ROM_LOAD("u55.bin", 0xe000, 0x2000, CRC(1e455ed7) SHA1(786d18ce0ab1af45fc538a2300853e497488f0d4) ) + ROM_RELOAD( 0xa000, 0x2000 ) + ROM_RELOAD( 0x6000, 0x2000 ) + ROM_RELOAD( 0x2000, 0x2000 ) + + ROM_REGION( 0x40000, "game_prg", 0 ) // program data + ROM_LOAD( "m0.u1", 0x00000, 0x10000, CRC(2408289d) SHA1(eafc144a557a79b58bcb48545cb9c9778e61fcd3) ) + ROM_LOAD( "m1.u2", 0x10000, 0x10000, CRC(5b623114) SHA1(0d9a14e6b7f57ce4fa09762343b610a973910f58) ) + ROM_LOAD( "m2.u3", 0x20000, 0x10000, CRC(abc64869) SHA1(564fc9d90d241a7b7776160b3fd036fb08037355) ) + ROM_LOAD( "m3.u4", 0x30000, 0x10000, CRC(0c1e8a67) SHA1(f1b9280c65fcfcb5ec481cae48eb6f52d6cdbc9d) ) + + ROM_REGION( 0x40000, "samples", 0 ) // UM5100 sample roms? + ROM_LOAD("v1.u15", 0x00000, 0x20000, CRC(613ddd07) SHA1(ebda3d559315879819cb7034b5696f8e7861fe42) ) + ROM_LOAD("v2.u14", 0x20000, 0x20000, CRC(427e012e) SHA1(50514a6307e63078fe7444a96e39d834684db7df) ) +ROM_END + + +} // anonymous namespace + + +GAME( 1990, filetto, 0, filetto, filetto, filetto_state, empty_init, ROT0, "Novarmatic", "Filetto (v1.05 901009)", MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/pc/pcxt.cpp b/src/mame/pc/pcxt.cpp deleted file mode 100644 index 5f8714854ae..00000000000 --- a/src/mame/pc/pcxt.cpp +++ /dev/null @@ -1,625 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Angelo Salese, Chris Hardy, David Haywood, Tomasz Slanina -/****************************************************************************************** - -PC-XT (c) 1987 IBM - -(Actually Arcade games running on more or less modified PC-XT HW) - -driver by Angelo Salese & Chris Hardy -original tetriunk.c by David Haywood & Tomasz Slanina - -Notes: -- The Korean Tetris is a blantant rip-off of the Mirrorsoft/Andromeda Software Tetris PC - version; - -TODO: -- 02851: tetriskr: Corrupt game graphics after some time of gameplay, caused by a wrong - reading of the i/o $3c8 bit 1. (seems fixed?) -- tetriskr can store inputs read during the timer irq. If ds is 0x40 when the irq is taken - it will corrupt the BIOS data area which can lead to corrupt graphics -- Add a proper FDC device. -- buzzer sound has issues in both games - -******************************************************************************************** -Filetto HW notes: -The PCB is a un-modified IBM-PC with a CGA adapter & a prototyping card that controls the -interface between the pc and the Jamma connectors.Additionally there's also a UM5100 sound -chip for the sound. -PCB Part Number: S/N 90289764 NOVARXT -PCB Contents: -1x UMC 8923S-UM5100 voice processor (upper board) -1x MMI PAL16L8ACN-940CRK9 (upper board) -1x AMD AMPAL16R8APC-8804DM (upper board) -1x AMD P8088-1 main processor 8.000MHz (lower board) -1x Proton PT8010AF PLCC 28.636MHz (lower board) -1x UMC 8928LP-UM8272A floppy disk controller (lower board) -1x UMC 8935CS-UM82C11 Printer Adapter Interface (lower board) -1x UMC 8936CS-UM8250B Programmable asynchronous communications element (lower board) -1x UMC 8937NS-UM82C8167 Real Time Clock (lower board) -1x Yamaha V6363 CMDC QFP (lower board) -There isn't any keyboard found connected to the pcb. -******************************************************************************************** -Filetto SW notes: -The software of this game can be extracted with a normal Windows program extractor. -The files names are: --command.com (1) --ibmbio.com (1) --ibmdos.com (1) --ansi.sys (1) --config.sys (2) --autoexec.bat (3) --x.exe (4) -(1)This is an old Italian version of MS-DOS (v3.30 18th March 1987). -(2)Contains "device=ansi.sys",it's an hook-up for the graphics used by the BIOS. -(3)It has an Echo off (as you can notice from the game itself) and then the loading of the -main program (x.exe). -(4)The main program,done in plain Basic with several Italian comments in it.The date of -the main program is 9th October 1990. - -******************************************************************************************/ - -#include "emu.h" -#include "bus/isa/cga.h" -#include "cpu/i86/i86.h" -#include "sound/hc55516.h" -#include "machine/bankdev.h" -#include "machine/genpc.h" - - -class isa8_cga_filetto_device : public isa8_cga_device -{ -public: - // construction/destruction - isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - virtual const tiny_rom_entry *device_rom_region() const override; -}; - -DEFINE_DEVICE_TYPE(ISA8_CGA_FILETTO, isa8_cga_filetto_device, "filetto_cga", "ISA8_CGA_FILETTO") - -//------------------------------------------------- -// isa8_cga_filetto_device - constructor -//------------------------------------------------- - -isa8_cga_filetto_device::isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_device(mconfig, ISA8_CGA_FILETTO, tag, owner, clock) -{ -} - -ROM_START( filetto_cga ) - ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD("u67.bin", 0x0000, 0x2000, CRC(09710122) SHA1(de84bdd9245df287bbd3bb808f0c3531d13a3545) ) -ROM_END - -const tiny_rom_entry *isa8_cga_filetto_device::device_rom_region() const -{ - return ROM_NAME( filetto_cga ); -} - - - -class isa8_cga_tetriskr_device : public isa8_cga_superimpose_device -{ -public: - // construction/destruction - isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; - virtual void device_start() override; - virtual const tiny_rom_entry *device_rom_region() const override; - - uint8_t bg_bank_r(); - void bg_bank_w(uint8_t data); -private: - required_region_ptr m_bg; - uint8_t m_bg_bank = 0; -}; - - -/* for superimposing CGA over a different source video (i.e. tetriskr) */ -DEFINE_DEVICE_TYPE(ISA8_CGA_TETRISKR, isa8_cga_tetriskr_device, "tetriskr_cga", "ISA8_CGA_TETRISKR") - -//------------------------------------------------- -// isa8_cga_tetriskr_device - constructor -//------------------------------------------------- - -isa8_cga_tetriskr_device::isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - isa8_cga_superimpose_device(mconfig, ISA8_CGA_TETRISKR, tag, owner, clock), - m_bg(*this, "gfx2") -{ -} - - -void isa8_cga_tetriskr_device::device_start() -{ - m_bg_bank = 0; - isa8_cga_superimpose_device::device_start(); - m_isa->install_device(0x3c0, 0x3c0, read8smo_delegate(*this, FUNC(isa8_cga_tetriskr_device::bg_bank_r)), write8smo_delegate(*this, FUNC(isa8_cga_tetriskr_device::bg_bank_w))); -} - -void isa8_cga_tetriskr_device::bg_bank_w(uint8_t data) -{ - m_bg_bank = (data & 0x0f) ^ 8; -} - -uint8_t isa8_cga_tetriskr_device::bg_bank_r() -{ - return 0xff; -} - - -uint32_t isa8_cga_tetriskr_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - //popmessage("%04x",m_start_offs); - - bitmap.fill(rgb_t::black(), cliprect); - - for(int y=cliprect.min_y;y<=cliprect.max_y;y++) - { - int yi = y % 8; - int yj = y / 8; - for(int x=cliprect.min_x;x<=cliprect.max_x;x++) - { - int xi = x % 8; - int xj = x / 8; - uint8_t color = 0; - /* TODO: first byte seems bogus? */ - for(int pen_i = 0;pen_i<4;pen_i++) - color |= ((m_bg[yj*320/8+xj+(pen_i*0x20000)+yi*0x400+m_bg_bank*0x2000+1] >> (7-xi)) & 1) << pen_i; - - bitmap.pix(y, x) = m_palette->pen(color); - } - } - - isa8_cga_device::screen_update(screen, bitmap, cliprect); - return 0; -} - -ROM_START( tetriskr_cga ) - ROM_REGION( 0x2000, "gfx1",ROMREGION_ERASE00 ) /* gfx - 1bpp font*/ - ROM_LOAD( "b-3.u36", 0x1800, 0x0800, CRC(1a636f9a) SHA1(a356cc57914d0c9b9127670b55d1f340e64b1ac9) ) - ROM_IGNORE( 0x1800 ) - - ROM_REGION( 0x80000+1, "gfx2",ROMREGION_INVERT | ROMREGION_ERASEFF ) - ROM_LOAD( "b-1.u59", 0x00000, 0x10000, CRC(4719d986) SHA1(6e0499944b968d96fbbfa3ead6237d69c769d634)) - ROM_LOAD( "b-2.u58", 0x10000, 0x10000, CRC(599e1154) SHA1(14d99f90b4fedeab0ac24ffa9b1fd9ad0f0ba699)) - ROM_LOAD( "b-4.u54", 0x20000, 0x10000, CRC(e112c450) SHA1(dfdecfc6bd617ec520b7563b7caf44b79d498bd3)) - ROM_LOAD( "b-5.u53", 0x30000, 0x10000, CRC(050b7650) SHA1(5981dda4ed43b6e81fbe48bfba90a8775d5ecddf)) - ROM_LOAD( "b-6.u49", 0x40000, 0x10000, CRC(d596ceb0) SHA1(8c82fb638688971ef11159a6b240253e63f0949d)) - ROM_LOAD( "b-7.u48", 0x50000, 0x10000, CRC(79336b6c) SHA1(7a95875f3071bdc3ee25c0e6a5a3c00ef02dc977)) - ROM_LOAD( "b-8.u44", 0x60000, 0x10000, CRC(1f82121a) SHA1(106da0f39f1260d0761217ed0a24c1611bfd7f05)) - ROM_LOAD( "b-9.u43", 0x70000, 0x10000, CRC(4ea22349) SHA1(14dfd3dbd51f8bd6f3290293b8ea1c165e8cf7fd)) -ROM_END - -const tiny_rom_entry *isa8_cga_tetriskr_device::device_rom_region() const -{ - return ROM_NAME( tetriskr_cga ); -} - - -namespace { - -class pcxt_state : public driver_device -{ -public: - pcxt_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_mb(*this, "mb"), - m_bank(*this, "bank"), - m_cvsd(*this, "voice"), - m_samples(*this, "samples"){ } - - void tetriskr(machine_config &config); - void filetto(machine_config &config); - -protected: - virtual void machine_start() override; - virtual void machine_reset() override; - - TIMER_CALLBACK_MEMBER(sample_tick); - -private: - int m_lastvalue; - uint8_t m_disk_data[2]; - uint8_t m_port_b_data; - uint8_t m_status; - uint8_t m_clr_status; - uint8_t m_voice, m_bit; - uint32_t m_vaddr; - emu_timer *m_sample; - - uint8_t disk_iobank_r(offs_t offset); - void disk_iobank_w(offs_t offset, uint8_t data); - uint8_t fdc765_status_r(); - uint8_t fdc765_data_r(); - void fdc765_data_w(uint8_t data); - void fdc_dor_w(uint8_t data); - uint8_t port_a_r(); - uint8_t port_b_r(); - uint8_t port_c_r(); - void port_b_w(uint8_t data); - void voice_start_w(uint8_t data); - - required_device m_maincpu; - required_device m_mb; - optional_device m_bank; - optional_device m_cvsd; - optional_memory_region m_samples; - void bank_map(address_map &map); - void filetto_io(address_map &map); - void filetto_map(address_map &map); - void tetriskr_io(address_map &map); - void tetriskr_map(address_map &map); -}; - - -uint8_t pcxt_state::disk_iobank_r(offs_t offset) -{ - //printf("Read Prototyping card [%02x] @ PC=%05x\n",offset,m_maincpu->pc()); - //if(offset == 0) return ioport("DSW")->read(); - if(offset == 1) return ioport("IN1")->read(); - - return m_disk_data[offset]; -} - -void pcxt_state::disk_iobank_w(offs_t offset, uint8_t data) -{ -/* - BIOS does a single out $0310,$F0 on reset - - Then does 2 outs to set the bank.. - - X1 X2 - - $F0 $F2 = m0 - $F1 $F2 = m1 - $F0 $F3 = m2 - $F1 $F3 = m3 - - The sequence of - - out $0310,X1 - out $0310,X2 - - sets the selected rom that appears in $C0000-$CFFFF - -*/ - int bank = 0; - -// printf("bank %d set to %02X\n", offset,data); - - if (data == 0xF0) - { - bank = 0; - } - else - { - if((m_lastvalue == 0xF0) && (data == 0xF2)) - bank = 0; - else if ((m_lastvalue == 0xF1) && (data == 0xF2)) - bank = 1; - else if ((m_lastvalue == 0xF0) && (data == 0xF3)) - bank = 2; - else if ((m_lastvalue == 0xF1) && (data == 0xF3)) - bank = 3; - } - - if (!(data & 0xf0)) - { - int bit = (data >> 1) - 2; - m_voice &= ~(1 << bit); - m_voice |= BIT(data, 0) << bit; - } - - m_bank->set_bank(bank); - - m_lastvalue = data; - - m_disk_data[offset] = data; -} - -uint8_t pcxt_state::port_a_r() -{ - return 0xaa;//harmless keyboard error occurs without this -} - -uint8_t pcxt_state::port_b_r() -{ - return m_port_b_data; -} - -uint8_t pcxt_state::port_c_r() -{ - return 0x00;// DIPS? -} - -/*'buzzer' sound routes here*/ -/* Filetto uses this for either beep and um5100 sound routing,probably there's a mux somewhere.*/ -/* The Korean Tetris uses it as a regular buzzer,probably the sound is all in there...*/ -void pcxt_state::port_b_w(uint8_t data) -{ - m_mb->m_pit8253->write_gate2(BIT(data, 0)); - m_mb->pc_speaker_set_spkrdata(BIT(data, 1)); - m_port_b_data = data; -// m_cvsd->digit_w(data); -} - -/*Floppy Disk Controller 765 device*/ -/*Currently we only emulate it at a point that the BIOS will pass the checks*/ - -#define FDC_BUSY 0x10 -#define FDC_WRITE 0x40 -#define FDC_READ 0x00 /*~0x40*/ - -uint8_t pcxt_state::fdc765_status_r() -{ - uint8_t tmp; - tmp = m_status | 0x80; - m_clr_status++; - if(m_clr_status == 0x10) - { - m_status = 0; - m_clr_status = 0; - } - return tmp; -} - -uint8_t pcxt_state::fdc765_data_r() -{ - m_status = (FDC_READ); - m_mb->m_pic8259->ir6_w(0); - return 0xc0; -} - -void pcxt_state::fdc765_data_w(uint8_t data) -{ - m_status = (FDC_WRITE); -} - - -void pcxt_state::fdc_dor_w(uint8_t data) -{ - m_mb->m_pic8259->ir6_w(1); -} - -// TODO: um5100 device; the actual codec may be sightly different -void pcxt_state::voice_start_w(uint8_t data) -{ - m_sample->adjust(attotime::zero, 0, attotime::from_hz(28000)); - m_bit = 7; - m_vaddr = ((m_voice & 0xf / 5) | (BIT(m_voice, 4) << 2)) * 0x8000; - logerror("%x %x\n",m_voice,m_vaddr); -} - -void pcxt_state::filetto_map(address_map &map) -{ - map(0xc0000, 0xcffff).m(m_bank, FUNC(address_map_bank_device::amap8)); - map(0xf0000, 0xfffff).rom().region("bios", 0); -} - -void pcxt_state::filetto_io(address_map &map) -{ - map.global_mask(0x3ff); - map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); - map(0x0060, 0x0060).r(FUNC(pcxt_state::port_a_r)); //not a real 8255 - map(0x0061, 0x0061).rw(FUNC(pcxt_state::port_b_r), FUNC(pcxt_state::port_b_w)); - map(0x0062, 0x0062).r(FUNC(pcxt_state::port_c_r)); - map(0x0201, 0x0201).portr("COIN"); //game port - map(0x0310, 0x0311).rw(FUNC(pcxt_state::disk_iobank_r), FUNC(pcxt_state::disk_iobank_w)); //Prototyping card - map(0x0312, 0x0312).portr("IN0"); //Prototyping card,read only - map(0x0313, 0x0313).w(FUNC(pcxt_state::voice_start_w)); - map(0x03f2, 0x03f2).w(FUNC(pcxt_state::fdc_dor_w)); - map(0x03f4, 0x03f4).r(FUNC(pcxt_state::fdc765_status_r)); //765 Floppy Disk Controller (FDC) Status - map(0x03f5, 0x03f5).rw(FUNC(pcxt_state::fdc765_data_r), FUNC(pcxt_state::fdc765_data_w));//FDC Data -} - -void pcxt_state::tetriskr_map(address_map &map) -{ - map(0xf0000, 0xfffff).rom().region("bios", 0); -} - -void pcxt_state::tetriskr_io(address_map &map) -{ - map.global_mask(0x3ff); - map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); - map(0x0060, 0x0060).r(FUNC(pcxt_state::port_a_r)); //not a real 8255 - map(0x0061, 0x0061).rw(FUNC(pcxt_state::port_b_r), FUNC(pcxt_state::port_b_w)); - map(0x0062, 0x0062).r(FUNC(pcxt_state::port_c_r)); - map(0x03c8, 0x03c8).portr("IN0"); - map(0x03c9, 0x03c9).portr("IN1"); -// map(0x03ce, 0x03ce).portr("IN1"); //read then discarded? -} - -void pcxt_state::bank_map(address_map &map) -{ - map(0x00000, 0x3ffff).rom().region("game_prg", 0); -} - -static INPUT_PORTS_START( filetto ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - - PORT_START("IN1") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "Extra Play" ) - PORT_DIPSETTING( 0x04, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, "Play at 6th match reached" ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("COIN") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START( "pcvideo_cga_config" ) - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) -INPUT_PORTS_END - -static INPUT_PORTS_START( tetriskr ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) //probably unused - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - PORT_START("IN1") //dip-switches - PORT_DIPNAME( 0x03, 0x03, "Starting Level" ) - PORT_DIPSETTING( 0x03, "0" ) - PORT_DIPSETTING( 0x02, "2" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x00, "6" ) - PORT_DIPNAME( 0x04, 0x04, "Starting Bomb" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coinage ) ) -// PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) duplicate - PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) - - PORT_START( "pcvideo_cga_config" ) - PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) -INPUT_PORTS_END - -TIMER_CALLBACK_MEMBER(pcxt_state::sample_tick) -{ - m_cvsd->digit_w(BIT(m_samples->as_u8(m_vaddr), m_bit)); - m_cvsd->clock_w(1); - m_cvsd->clock_w(0); - if (m_bit == 0) - { - m_vaddr++; - m_bit = 8; - if (!(m_vaddr % 0x8000)) - m_sample->adjust(attotime::never); - } - m_bit--; -} - -void pcxt_state::machine_start() -{ - m_sample = timer_alloc(FUNC(pcxt_state::sample_tick), this); - - m_status = 0; - m_clr_status = 0; -} - -void pcxt_state::machine_reset() -{ - m_lastvalue = -1; - m_voice = 0; -} - -static void filetto_isa8_cards(device_slot_interface &device) -{ - device.option_add_internal("filetto", ISA8_CGA_FILETTO); - device.option_add_internal("tetriskr", ISA8_CGA_TETRISKR); -} - - -void pcxt_state::filetto(machine_config &config) -{ - I8088(config, m_maincpu, XTAL(14'318'181)/3); - m_maincpu->set_addrmap(AS_PROGRAM, &pcxt_state::filetto_map); - m_maincpu->set_addrmap(AS_IO, &pcxt_state::filetto_io); - m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); - m_mb->int_callback().set_inputline(m_maincpu, 0); - m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - - ISA8_SLOT(config, "isa1", 0, "mb:isa", filetto_isa8_cards, "filetto", true); // FIXME: determine ISA bus clock - - HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, "mb:mono", 0.60); //8923S-UM5100 is a HC55536 with ROM hook-up - - RAM(config, RAM_TAG).set_default_size("640K"); - - ADDRESS_MAP_BANK(config, m_bank).set_map(&pcxt_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); -} - -void pcxt_state::tetriskr(machine_config &config) -{ - I8088(config, m_maincpu, XTAL(14'318'181)/3); - m_maincpu->set_addrmap(AS_PROGRAM, &pcxt_state::tetriskr_map); - m_maincpu->set_addrmap(AS_IO, &pcxt_state::tetriskr_io); - m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); - m_mb->int_callback().set_inputline(m_maincpu, 0); - m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - - ISA8_SLOT(config, "isa1", 0, "mb:isa", filetto_isa8_cards, "tetriskr", true); // FIXME: determine ISA bus clock - - RAM(config, RAM_TAG).set_default_size("64K"); -} - -ROM_START( filetto ) - ROM_REGION( 0x10000, "bios", 0 ) - ROM_LOAD("u49.bin", 0xc000, 0x2000, CRC(1be6948a) SHA1(9c433f63d347c211ee4663f133e8417221bc4bf0)) - ROM_RELOAD( 0x8000, 0x2000 ) - ROM_RELOAD( 0x4000, 0x2000 ) - ROM_RELOAD( 0x0000, 0x2000 ) - ROM_LOAD("u55.bin", 0xe000, 0x2000, CRC(1e455ed7) SHA1(786d18ce0ab1af45fc538a2300853e497488f0d4) ) - ROM_RELOAD( 0xa000, 0x2000 ) - ROM_RELOAD( 0x6000, 0x2000 ) - ROM_RELOAD( 0x2000, 0x2000 ) - - ROM_REGION( 0x40000, "game_prg", 0 ) // program data - ROM_LOAD( "m0.u1", 0x00000, 0x10000, CRC(2408289d) SHA1(eafc144a557a79b58bcb48545cb9c9778e61fcd3) ) - ROM_LOAD( "m1.u2", 0x10000, 0x10000, CRC(5b623114) SHA1(0d9a14e6b7f57ce4fa09762343b610a973910f58) ) - ROM_LOAD( "m2.u3", 0x20000, 0x10000, CRC(abc64869) SHA1(564fc9d90d241a7b7776160b3fd036fb08037355) ) - ROM_LOAD( "m3.u4", 0x30000, 0x10000, CRC(0c1e8a67) SHA1(f1b9280c65fcfcb5ec481cae48eb6f52d6cdbc9d) ) - - ROM_REGION( 0x40000, "samples", 0 ) // UM5100 sample roms? - ROM_LOAD("v1.u15", 0x00000, 0x20000, CRC(613ddd07) SHA1(ebda3d559315879819cb7034b5696f8e7861fe42) ) - ROM_LOAD("v2.u14", 0x20000, 0x20000, CRC(427e012e) SHA1(50514a6307e63078fe7444a96e39d834684db7df) ) -ROM_END - -ROM_START( tetriskr ) - ROM_REGION( 0x10000, "bios", 0 ) /* code */ - ROM_LOAD( "b-10.u10", 0x0000, 0x10000, CRC(efc2a0f6) SHA1(5f0f1e90237bee9b78184035a32055b059a91eb3) ) - ROM_FILL( 0x1bdb, 1, 0xba ) // patch to work around input bug mentioned above - ROM_FILL( 0x1bdc, 1, 0x00 ) - ROM_FILL( 0x1bdd, 1, 0x01 ) - ROM_FILL( 0x1bde, 1, 0x8e ) - ROM_FILL( 0x1bdf, 1, 0xda ) -ROM_END - -} // anonymous namespace - - -GAME( 1990, filetto, 0, filetto, filetto, pcxt_state, empty_init, ROT0, "Novarmatic", "Filetto (v1.05 901009)", MACHINE_IMPERFECT_SOUND ) -GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, pcxt_state, empty_init, ROT0, "bootleg", "Tetris (Korean bootleg of Mirrorsoft PC-XT Tetris)", MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/pc/tetriskr.cpp b/src/mame/pc/tetriskr.cpp new file mode 100644 index 00000000000..34899a98e58 --- /dev/null +++ b/src/mame/pc/tetriskr.cpp @@ -0,0 +1,281 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, David Haywood, Tomasz Slanina +/****************************************************************************************** + +Korean Tetris Arcade game +(blantant rip-off of the Mirrorsoft/Andromeda Software Tetris PC-XT) + +original tetriunk.c by David Haywood & Tomasz Slanina + + +TODO: +- 02851: tetriskr: Corrupt game graphics after some time of gameplay, caused by a wrong + reading of the i/o $3c8 bit 1. (seems fixed?) +- tetriskr can store inputs read during the timer irq. If ds is 0x40 when the irq is taken + it will corrupt the BIOS data area which can lead to corrupt graphics +- DC offsetted buzzer sound; + +******************************************************************************************/ + +#include "emu.h" +#include "bus/isa/cga.h" +#include "cpu/i86/i86.h" +#include "machine/genpc.h" + +class isa8_cga_tetriskr_device : public isa8_cga_superimpose_device +{ +public: + // construction/destruction + isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; + virtual void device_start() override; + virtual const tiny_rom_entry *device_rom_region() const override; + + uint8_t bg_bank_r(); + void bg_bank_w(uint8_t data); +private: + required_region_ptr m_bg; + uint8_t m_bg_bank = 0; +}; + + +/* for superimposing CGA over a different source video (i.e. tetriskr) */ +DEFINE_DEVICE_TYPE(ISA8_CGA_TETRISKR, isa8_cga_tetriskr_device, "tetriskr_cga", "ISA8_CGA_TETRISKR") + +//------------------------------------------------- +// isa8_cga_tetriskr_device - constructor +//------------------------------------------------- + +isa8_cga_tetriskr_device::isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + isa8_cga_superimpose_device(mconfig, ISA8_CGA_TETRISKR, tag, owner, clock), + m_bg(*this, "gfx2") +{ +} + + +void isa8_cga_tetriskr_device::device_start() +{ + m_bg_bank = 0; + isa8_cga_superimpose_device::device_start(); + m_isa->install_device(0x3c0, 0x3c0, read8smo_delegate(*this, FUNC(isa8_cga_tetriskr_device::bg_bank_r)), write8smo_delegate(*this, FUNC(isa8_cga_tetriskr_device::bg_bank_w))); +} + +void isa8_cga_tetriskr_device::bg_bank_w(uint8_t data) +{ + m_bg_bank = (data & 0x0f) ^ 8; +} + +uint8_t isa8_cga_tetriskr_device::bg_bank_r() +{ + return 0xff; +} + + +uint32_t isa8_cga_tetriskr_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + //popmessage("%04x",m_start_offs); + + bitmap.fill(rgb_t::black(), cliprect); + + for(int y=cliprect.min_y;y<=cliprect.max_y;y++) + { + int yi = y % 8; + int yj = y / 8; + for(int x=cliprect.min_x;x<=cliprect.max_x;x++) + { + int xi = x % 8; + int xj = x / 8; + uint8_t color = 0; + /* TODO: first byte seems bogus? */ + for(int pen_i = 0;pen_i<4;pen_i++) + color |= ((m_bg[yj*320/8+xj+(pen_i*0x20000)+yi*0x400+m_bg_bank*0x2000+1] >> (7-xi)) & 1) << pen_i; + + bitmap.pix(y, x) = m_palette->pen(color); + } + } + + isa8_cga_device::screen_update(screen, bitmap, cliprect); + return 0; +} + +ROM_START( tetriskr_cga ) + ROM_REGION( 0x2000, "gfx1",ROMREGION_ERASE00 ) /* gfx - 1bpp font*/ + ROM_LOAD( "b-3.u36", 0x1800, 0x0800, CRC(1a636f9a) SHA1(a356cc57914d0c9b9127670b55d1f340e64b1ac9) ) + ROM_IGNORE( 0x1800 ) + + ROM_REGION( 0x80000+1, "gfx2",ROMREGION_INVERT | ROMREGION_ERASEFF ) + ROM_LOAD( "b-1.u59", 0x00000, 0x10000, CRC(4719d986) SHA1(6e0499944b968d96fbbfa3ead6237d69c769d634)) + ROM_LOAD( "b-2.u58", 0x10000, 0x10000, CRC(599e1154) SHA1(14d99f90b4fedeab0ac24ffa9b1fd9ad0f0ba699)) + ROM_LOAD( "b-4.u54", 0x20000, 0x10000, CRC(e112c450) SHA1(dfdecfc6bd617ec520b7563b7caf44b79d498bd3)) + ROM_LOAD( "b-5.u53", 0x30000, 0x10000, CRC(050b7650) SHA1(5981dda4ed43b6e81fbe48bfba90a8775d5ecddf)) + ROM_LOAD( "b-6.u49", 0x40000, 0x10000, CRC(d596ceb0) SHA1(8c82fb638688971ef11159a6b240253e63f0949d)) + ROM_LOAD( "b-7.u48", 0x50000, 0x10000, CRC(79336b6c) SHA1(7a95875f3071bdc3ee25c0e6a5a3c00ef02dc977)) + ROM_LOAD( "b-8.u44", 0x60000, 0x10000, CRC(1f82121a) SHA1(106da0f39f1260d0761217ed0a24c1611bfd7f05)) + ROM_LOAD( "b-9.u43", 0x70000, 0x10000, CRC(4ea22349) SHA1(14dfd3dbd51f8bd6f3290293b8ea1c165e8cf7fd)) +ROM_END + +const tiny_rom_entry *isa8_cga_tetriskr_device::device_rom_region() const +{ + return ROM_NAME( tetriskr_cga ); +} + + +namespace { + +class tetriskr_state : public driver_device +{ +public: + tetriskr_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_mb(*this, "mb") + { } + + void tetriskr(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + + TIMER_CALLBACK_MEMBER(sample_tick); + +private: + uint8_t m_port_b_data; + + uint8_t port_a_r(); + uint8_t port_b_r(); + uint8_t port_c_r(); + void port_b_w(uint8_t data); + + required_device m_maincpu; + required_device m_mb; + void tetriskr_io(address_map &map); + void tetriskr_map(address_map &map); +}; + +uint8_t tetriskr_state::port_a_r() +{ + //harmless keyboard error occurs without this + return 0xaa; +} + +uint8_t tetriskr_state::port_b_r() +{ + return m_port_b_data; +} + +uint8_t tetriskr_state::port_c_r() +{ + return 0x00;// DIPS? +} + +void tetriskr_state::port_b_w(uint8_t data) +{ + m_mb->m_pit8253->write_gate2(BIT(data, 0)); + m_mb->pc_speaker_set_spkrdata(BIT(data, 1)); + m_port_b_data = data; +// m_cvsd->digit_w(data); +} + +void tetriskr_state::tetriskr_map(address_map &map) +{ + map(0xf0000, 0xfffff).rom().region("bios", 0); +} + +void tetriskr_state::tetriskr_io(address_map &map) +{ + map.global_mask(0x3ff); + map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); + map(0x0060, 0x0060).r(FUNC(tetriskr_state::port_a_r)); //not a real 8255 + map(0x0061, 0x0061).rw(FUNC(tetriskr_state::port_b_r), FUNC(tetriskr_state::port_b_w)); + map(0x0062, 0x0062).r(FUNC(tetriskr_state::port_c_r)); + map(0x03c8, 0x03c8).portr("IN0"); + map(0x03c9, 0x03c9).portr("IN1"); +// map(0x03ce, 0x03ce).portr("IN1"); //read then discarded? +} + +static INPUT_PORTS_START( tetriskr ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) //probably unused + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + PORT_START("IN1") //dip-switches + PORT_DIPNAME( 0x03, 0x03, "Starting Level" ) + PORT_DIPSETTING( 0x03, "0" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x00, "6" ) + PORT_DIPNAME( 0x04, 0x04, "Starting Bomb" ) + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coinage ) ) +// PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) duplicate + PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) + + PORT_START( "pcvideo_cga_config" ) + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +void tetriskr_state::machine_start() +{ +} + +void tetriskr_state::machine_reset() +{ +} + +static void tetriskr_isa8_cards(device_slot_interface &device) +{ + device.option_add_internal("tetriskr", ISA8_CGA_TETRISKR); +} + + +void tetriskr_state::tetriskr(machine_config &config) +{ + I8088(config, m_maincpu, XTAL(14'318'181)/3); + m_maincpu->set_addrmap(AS_PROGRAM, &tetriskr_state::tetriskr_map); + m_maincpu->set_addrmap(AS_IO, &tetriskr_state::tetriskr_io); + m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); + + PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + m_mb->int_callback().set_inputline(m_maincpu, 0); + m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); + + ISA8_SLOT(config, "isa1", 0, "mb:isa", tetriskr_isa8_cards, "tetriskr", true); // FIXME: determine ISA bus clock + + RAM(config, RAM_TAG).set_default_size("64K"); +} + +ROM_START( tetriskr ) + ROM_REGION( 0x10000, "bios", 0 ) /* code */ + ROM_LOAD( "b-10.u10", 0x0000, 0x10000, CRC(efc2a0f6) SHA1(5f0f1e90237bee9b78184035a32055b059a91eb3) ) + ROM_FILL( 0x1bdb, 1, 0xba ) // patch to work around input bug mentioned above + ROM_FILL( 0x1bdc, 1, 0x00 ) + ROM_FILL( 0x1bdd, 1, 0x01 ) + ROM_FILL( 0x1bde, 1, 0x8e ) + ROM_FILL( 0x1bdf, 1, 0xda ) +ROM_END + +} // anonymous namespace + + +GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, tetriskr_state, empty_init, ROT0, "bootleg", "Tetris (Korean bootleg of Mirrorsoft PC-XT Tetris)", MACHINE_IMPERFECT_SOUND ) From ceb464818db464fad552dd8bedd1d6c358ce00bb Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 27 Aug 2024 10:25:39 +0200 Subject: [PATCH 14/44] New systems marked not working ------------------------------ Countertop Champ II [Siftware] --- src/mame/mame.lst | 3 + src/mame/pc/champ2.cpp | 147 +++++++++++++++++++++++++++++++++++++++ src/mame/pc/filetto.cpp | 17 ++--- src/mame/pc/tetriskr.cpp | 4 +- 4 files changed, 161 insertions(+), 10 deletions(-) create mode 100644 src/mame/pc/champ2.cpp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ec8fdb98942..aa7b667086a 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35916,6 +35916,9 @@ calchase // (c) 1999 The Game Room eggsplc // (c) 2002 The Game Room hostinv // (c) 1998 The Game Room +@source:pc/champ2.cpp +champ2 // (c) 1993 US Games + @source:pc/compc.cpp compc10 // 1984 Commodore PC-10, PC-20 and PC-30 pc10iii // 1987 Commodore PC-10 III diff --git a/src/mame/pc/champ2.cpp b/src/mame/pc/champ2.cpp new file mode 100644 index 00000000000..810beec4975 --- /dev/null +++ b/src/mame/pc/champ2.cpp @@ -0,0 +1,147 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/************************************************************************************************** + +Countertop Champ II? (c) 1993 U.S. Games + +Dump contains a MS-DOS 3.3 ROM disk, presumably for a bartop style multigame/quiz/fortune teller. + +TODO: +- Host MB unknown, may be an higher CPU socket; +- Jumps in unpopulated RAM area as soon as it banks (PC=ca029 -> 0000:36AF), area may be +multibanked instead; + +**************************************************************************************************/ + +#include "emu.h" +#include "cpu/i86/i86.h" +#include "machine/bankdev.h" +#include "machine/genpc.h" + + +namespace { + +class champ2_state : public driver_device +{ +public: + champ2_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_mb(*this, "mb") + , m_bank(*this, "bank") + { } + + void champ2(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + uint8_t m_port_b_data; + + uint8_t port_a_r(); + uint8_t port_b_r(); + uint8_t port_c_r(); + void port_b_w(uint8_t data); + + required_device m_maincpu; + required_device m_mb; + required_device m_bank; + void bank_map(address_map &map); + void main_io(address_map &map); + void main_map(address_map &map); +}; + +void champ2_state::main_map(address_map &map) +{ + // Selectable thru jumpers (0xc800, 0xd000, 0xd800, 0xe000) + map(0xc8000, 0xcffff).m(m_bank, FUNC(address_map_bank_device::amap8)); + // writes to $+2000 then $+0000, same value (0x03) + map(0xca000, 0xca000).lw8( + NAME([this] (offs_t offset, u8 data) { + m_bank->set_bank(data & 0x1f); + }) + ); + map(0xfe000, 0xfffff).rom().region("bios", 0); +} + +void champ2_state::main_io(address_map &map) +{ + map.global_mask(0x3ff); + map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); + map(0x0060, 0x0060).lr8(NAME([] (offs_t offset) { return 0xaa; })); +// map(0x0061, 0x0061).rw(FUNC(champ2_state::port_b_r), FUNC(champ2_state::port_b_w)); +// map(0x0062, 0x0062).r(FUNC(champ2_state::port_c_r)); +// map(0x0201, 0x0201).portr("COIN"); // game port +// map(0x0310, 0x0311).rw(FUNC(champ2_state::disk_iobank_r), FUNC(champ2_state::disk_iobank_w)); //Prototyping card +// map(0x0312, 0x0312).portr("IN0"); // Prototyping card, r/o +// map(0x0313, 0x0313).w(FUNC(champ2_state::voice_start_w)); +// map(0x03f2, 0x03f2).w(FUNC(champ2_state::fdc_dor_w)); +// map(0x03f4, 0x03f4).r(FUNC(champ2_state::fdc765_status_r)); //765 Floppy Disk Controller (FDC) Status +// map(0x03f5, 0x03f5).rw(FUNC(champ2_state::fdc765_data_r), FUNC(champ2_state::fdc765_data_w));//FDC Data +} + + +void champ2_state::bank_map(address_map &map) +{ + map(0x00000, 0xfffff).rom().region("game_prg", 0); +} + +static INPUT_PORTS_START( champ2 ) +INPUT_PORTS_END + +void champ2_state::machine_start() +{ +} + +void champ2_state::machine_reset() +{ + m_bank->set_bank(0); +} + + +void champ2_state::champ2(machine_config &config) +{ + I8088(config, m_maincpu, XTAL(14'318'181)/3); + m_maincpu->set_addrmap(AS_PROGRAM, &champ2_state::main_map); + m_maincpu->set_addrmap(AS_IO, &champ2_state::main_io); + m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); + + PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + m_mb->int_callback().set_inputline(m_maincpu, 0); + m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); + + // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "vga", false); +// ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); +// ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); +// ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); +// ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "adlib", false); +// ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); + + RAM(config, RAM_TAG).set_default_size("640K"); + + ADDRESS_MAP_BANK(config, m_bank).set_map(&champ2_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 20, 0x8000); +} + + +ROM_START( champ2 ) + ROM_REGION( 0x2000, "bios", 0 ) + // borrowed from pc/genpc.cpp + ROM_LOAD("pcxt.rom", 0x0000, 0x02000, BAD_DUMP CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f) ) + + ROM_REGION( 0x100000, "game_prg", 0 ) + ROM_LOAD( "champ2.u2", 0x00000, 0x80000, CRC(058bd1a4) SHA1(e4c0db329cda0cdcab7c7b4d130f1c38fa32385f) ) + ROM_LOAD( "champ2.u3", 0x80000, 0x80000, CRC(3bb1951f) SHA1(8057327285f57787cc7da678427767ee7f979a64) ) + + ROM_REGION( 0x1caf, "pal", 0 ) + ROM_LOAD("champ2.u7", 0x00000, 0x1caf, BAD_DUMP CRC(bd70e89b) SHA1(3567d22057e366a439ffce2dd35180f5df80d47c) ) +ROM_END + + +} // anonymous namespace + + +GAME( 1993, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champ II (ver 2.11)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) + diff --git a/src/mame/pc/filetto.cpp b/src/mame/pc/filetto.cpp index dbc30a0bd12..a3944e9c3e4 100644 --- a/src/mame/pc/filetto.cpp +++ b/src/mame/pc/filetto.cpp @@ -89,12 +89,13 @@ class filetto_state : public driver_device { public: filetto_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_mb(*this, "mb"), - m_bank(*this, "bank"), - m_cvsd(*this, "voice"), - m_samples(*this, "samples"){ } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_mb(*this, "mb") + , m_bank(*this, "bank") + , m_cvsd(*this, "voice") + , m_samples(*this, "samples") + { } void filetto(machine_config &config); @@ -267,7 +268,7 @@ void filetto_state::fdc_dor_w(uint8_t data) // TODO: move to a real um5100 device void filetto_state::voice_start_w(uint8_t data) { - // TODO: accurate pitch frequency + // TODO: accurate pitch frequency m_sample->adjust(attotime::zero, 0, attotime::from_hz(44150)); m_bit = 7; m_vaddr = ((m_voice & 0xf / 5) | (BIT(m_voice, 4) << 2)) * 0x8000; @@ -411,7 +412,7 @@ ROM_START( filetto ) ROM_LOAD( "m2.u3", 0x20000, 0x10000, CRC(abc64869) SHA1(564fc9d90d241a7b7776160b3fd036fb08037355) ) ROM_LOAD( "m3.u4", 0x30000, 0x10000, CRC(0c1e8a67) SHA1(f1b9280c65fcfcb5ec481cae48eb6f52d6cdbc9d) ) - ROM_REGION( 0x40000, "samples", 0 ) // UM5100 sample roms? + ROM_REGION( 0x40000, "samples", 0 ) // UM5100 sample roms ROM_LOAD("v1.u15", 0x00000, 0x20000, CRC(613ddd07) SHA1(ebda3d559315879819cb7034b5696f8e7861fe42) ) ROM_LOAD("v2.u14", 0x20000, 0x20000, CRC(427e012e) SHA1(50514a6307e63078fe7444a96e39d834684db7df) ) ROM_END diff --git a/src/mame/pc/tetriskr.cpp b/src/mame/pc/tetriskr.cpp index 34899a98e58..f43e543ff1b 100644 --- a/src/mame/pc/tetriskr.cpp +++ b/src/mame/pc/tetriskr.cpp @@ -130,7 +130,7 @@ class tetriskr_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_mb(*this, "mb") - { } + { } void tetriskr(machine_config &config); @@ -156,7 +156,7 @@ class tetriskr_state : public driver_device uint8_t tetriskr_state::port_a_r() { - //harmless keyboard error occurs without this + //harmless keyboard error occurs without this return 0xaa; } From 528a7927ba5554d9b1e7ba8c7f749ee66b06e92e Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 27 Aug 2024 10:38:14 +0200 Subject: [PATCH 15/44] pc/champ2.cpp: fix gamename --- src/mame/pc/champ2.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mame/pc/champ2.cpp b/src/mame/pc/champ2.cpp index 810beec4975..1a0ea864acb 100644 --- a/src/mame/pc/champ2.cpp +++ b/src/mame/pc/champ2.cpp @@ -40,10 +40,10 @@ class champ2_state : public driver_device private: uint8_t m_port_b_data; - uint8_t port_a_r(); - uint8_t port_b_r(); - uint8_t port_c_r(); - void port_b_w(uint8_t data); +// uint8_t port_a_r(); +// uint8_t port_b_r(); +// uint8_t port_c_r(); +// void port_b_w(uint8_t data); required_device m_maincpu; required_device m_mb; @@ -129,19 +129,21 @@ void champ2_state::champ2(machine_config &config) ROM_START( champ2 ) ROM_REGION( 0x2000, "bios", 0 ) // borrowed from pc/genpc.cpp - ROM_LOAD("pcxt.rom", 0x0000, 0x02000, BAD_DUMP CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f) ) + ROM_LOAD( "pcxt.rom", 0x0000, 0x02000, BAD_DUMP CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f) ) ROM_REGION( 0x100000, "game_prg", 0 ) ROM_LOAD( "champ2.u2", 0x00000, 0x80000, CRC(058bd1a4) SHA1(e4c0db329cda0cdcab7c7b4d130f1c38fa32385f) ) ROM_LOAD( "champ2.u3", 0x80000, 0x80000, CRC(3bb1951f) SHA1(8057327285f57787cc7da678427767ee7f979a64) ) ROM_REGION( 0x1caf, "pal", 0 ) - ROM_LOAD("champ2.u7", 0x00000, 0x1caf, BAD_DUMP CRC(bd70e89b) SHA1(3567d22057e366a439ffce2dd35180f5df80d47c) ) + ROM_LOAD( "champ2.u7", 0x00000, 0x1caf, BAD_DUMP CRC(bd70e89b) SHA1(3567d22057e366a439ffce2dd35180f5df80d47c) ) ROM_END } // anonymous namespace -GAME( 1993, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champ II (ver 2.11)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +// Title assumed by "Champ II" ROM labels +GAME( 1994, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champion 2 (ver 2.11)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +//GAME( 1993, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champion", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) From 0c9a31c5e1d8cdd92f7e61ec1f11e9163c5ecd42 Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 27 Aug 2024 17:28:42 +0200 Subject: [PATCH 16/44] pc/champ2.cpp: convert to pt319a motherboard --- src/mame/mame.lst | 2 +- src/mame/pc/champ2.cpp | 123 +++++++++++++++++++++++++---------------- 2 files changed, 77 insertions(+), 48 deletions(-) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index aa7b667086a..7464eac3ebd 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35676,7 +35676,7 @@ pcd3nsl // Siemens-Nixdorf PCD-3Nsl pcd3nsx // Siemens-Nixdorf PCD-3Nsx php3239 // Philips P3239 ppm3333p // DTK Computer PPM-3333P -pt319a // Pint PT-319A motherboard (386sx) +pt319a // Pine PT-319A motherboard (386sx) scamp386sx // motherboards using the SCAMPSX chipset (386sx) scsxaio // Peacock 386sx Ver. 2.0 motherboard SCsxAIO (386sx) sh386sx20 // Shuttle 386SX REV 2.0A motherboard (386sx) diff --git a/src/mame/pc/champ2.cpp b/src/mame/pc/champ2.cpp index 1a0ea864acb..c079906a30e 100644 --- a/src/mame/pc/champ2.cpp +++ b/src/mame/pc/champ2.cpp @@ -4,19 +4,26 @@ Countertop Champ II? (c) 1993 U.S. Games -Dump contains a MS-DOS 3.3 ROM disk, presumably for a bartop style multigame/quiz/fortune teller. +Bartop style multigame/quiz/fortune teller +Dump contains a MS-DOS 3.3 ROM disk, ebay auction shows a Pine Technology PT-319A +(SARC RC2016A5 chipset) + 2 other populated ISA16 cards out of 6. TODO: -- Host MB unknown, may be an higher CPU socket; - Jumps in unpopulated RAM area as soon as it banks (PC=ca029 -> 0000:36AF), area may be multibanked instead; **************************************************************************************************/ #include "emu.h" -#include "cpu/i86/i86.h" +#include "bus/isa/isa_cards.h" +#include "bus/pc_kbd/keyboards.h" +#include "bus/pc_kbd/pc_kbdc.h" +#include "cpu/i386/i386.h" +#include "machine/at.h" #include "machine/bankdev.h" -#include "machine/genpc.h" +#include "machine/ds128x.h" +#include "machine/nvram.h" +#include "machine/ram.h" namespace { @@ -28,58 +35,57 @@ class champ2_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_mb(*this, "mb") + , m_ram(*this, "ram") , m_bank(*this, "bank") { } void champ2(machine_config &config); + void init_at(); protected: virtual void machine_start() override; virtual void machine_reset() override; + void init_at_common(int xmsbase); private: - uint8_t m_port_b_data; - -// uint8_t port_a_r(); -// uint8_t port_b_r(); -// uint8_t port_c_r(); -// void port_b_w(uint8_t data); - - required_device m_maincpu; - required_device m_mb; + required_device m_maincpu; + required_device m_mb; + required_device m_ram; required_device m_bank; void bank_map(address_map &map); void main_io(address_map &map); void main_map(address_map &map); + + bool m_unlock_bank = false; }; + void champ2_state::main_map(address_map &map) { + map(0x000000, 0x09ffff).bankrw("bank10"); // Selectable thru jumpers (0xc800, 0xd000, 0xd800, 0xe000) - map(0xc8000, 0xcffff).m(m_bank, FUNC(address_map_bank_device::amap8)); - // writes to $+2000 then $+0000, same value (0x03) - map(0xca000, 0xca000).lw8( + map(0x0c8000, 0x0cffff).m(m_bank, FUNC(address_map_bank_device::amap8)); + // writes to $+2000 then $+0000, same value (0x03) at POST, + // then writes 0 to $+2000 and N to $+0000 + map(0x0c8000, 0x0c8000).lw8( NAME([this] (offs_t offset, u8 data) { - m_bank->set_bank(data & 0x1f); + if (m_unlock_bank) + m_bank->set_bank(data & 0x1f); }) ); - map(0xfe000, 0xfffff).rom().region("bios", 0); + map(0x0ca000, 0x0ca000).lw8( + NAME([this] (offs_t offset, u8 data) { + m_unlock_bank = data == 0; + }) + ); + map(0x0e0000, 0x0fffff).rom().region("bios", 0); + map(0xfe0000, 0xffffff).rom().region("bios", 0); } void champ2_state::main_io(address_map &map) { map.global_mask(0x3ff); - map(0x0000, 0x00ff).m(m_mb, FUNC(pc_noppi_mb_device::map)); - map(0x0060, 0x0060).lr8(NAME([] (offs_t offset) { return 0xaa; })); -// map(0x0061, 0x0061).rw(FUNC(champ2_state::port_b_r), FUNC(champ2_state::port_b_w)); -// map(0x0062, 0x0062).r(FUNC(champ2_state::port_c_r)); -// map(0x0201, 0x0201).portr("COIN"); // game port -// map(0x0310, 0x0311).rw(FUNC(champ2_state::disk_iobank_r), FUNC(champ2_state::disk_iobank_w)); //Prototyping card -// map(0x0312, 0x0312).portr("IN0"); // Prototyping card, r/o -// map(0x0313, 0x0313).w(FUNC(champ2_state::voice_start_w)); -// map(0x03f2, 0x03f2).w(FUNC(champ2_state::fdc_dor_w)); -// map(0x03f4, 0x03f4).r(FUNC(champ2_state::fdc765_status_r)); //765 Floppy Disk Controller (FDC) Status -// map(0x03f5, 0x03f5).rw(FUNC(champ2_state::fdc765_data_r), FUNC(champ2_state::fdc765_data_w));//FDC Data + map(0x0000, 0x00ff).m(m_mb, FUNC(at_mb_device::map)); } @@ -98,38 +104,44 @@ void champ2_state::machine_start() void champ2_state::machine_reset() { m_bank->set_bank(0); + m_unlock_bank = false; } void champ2_state::champ2(machine_config &config) { - I8088(config, m_maincpu, XTAL(14'318'181)/3); + I386SX(config, m_maincpu, 16'000'000); m_maincpu->set_addrmap(AS_PROGRAM, &champ2_state::main_map); m_maincpu->set_addrmap(AS_IO, &champ2_state::main_io); - m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); + m_maincpu->set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); +// m_maincpu->shutdown_callback().set("mb", FUNC(at_mb_device::shutdown)); + + AT_MB(config, m_mb).at_softlists(config); + m_mb->kbd_clk().set("kbd", FUNC(pc_kbdc_device::clock_write_from_mb)); + m_mb->kbd_data().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); - m_mb->int_callback().set_inputline(m_maincpu, 0); - m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); + pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); + pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); + pc_kbdc.out_data_cb().set(m_mb, FUNC(at_mb_device::kbd_data_w)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "vga", false); -// ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); -// ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); -// ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); -// ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "adlib", false); -// ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "vga", false); + ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa6", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - RAM(config, RAM_TAG).set_default_size("640K"); + RAM(config, m_ram).set_default_size("15M").set_extra_options("640K,1024K,1664K,2M,4M,8M,15M"); ADDRESS_MAP_BANK(config, m_bank).set_map(&champ2_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 20, 0x8000); } ROM_START( champ2 ) - ROM_REGION( 0x2000, "bios", 0 ) - // borrowed from pc/genpc.cpp - ROM_LOAD( "pcxt.rom", 0x0000, 0x02000, BAD_DUMP CRC(031aafad) SHA1(a641b505bbac97b8775f91fe9b83d9afdf4d038f) ) + ROM_REGION16_LE(0x20000, "bios", 0) + // borrowed from pc/at.cpp pt319a + ROM_LOAD( "3sam001.bin", 0x10000, 0x10000, BAD_DUMP CRC(cad22030) SHA1(85bb6027579a87bfe7ea0f7df3676fdaa64920ac)) ROM_REGION( 0x100000, "game_prg", 0 ) ROM_LOAD( "champ2.u2", 0x00000, 0x80000, CRC(058bd1a4) SHA1(e4c0db329cda0cdcab7c7b4d130f1c38fa32385f) ) @@ -139,11 +151,28 @@ ROM_START( champ2 ) ROM_LOAD( "champ2.u7", 0x00000, 0x1caf, BAD_DUMP CRC(bd70e89b) SHA1(3567d22057e366a439ffce2dd35180f5df80d47c) ) ROM_END +void champ2_state::init_at_common(int xmsbase) +{ + address_space& space = m_maincpu->space(AS_PROGRAM); + + /* managed RAM */ + membank("bank10")->set_base(m_ram->pointer()); + + if (m_ram->size() > xmsbase) + { + offs_t ram_limit = 0x100000 + m_ram->size() - xmsbase; + space.install_ram(0x100000, ram_limit - 1, m_ram->pointer() + xmsbase); + } +} + +void champ2_state::init_at() +{ + init_at_common(0xa0000); +} } // anonymous namespace +//GAME( 1993, champ, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champion", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // Title assumed by "Champ II" ROM labels -GAME( 1994, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champion 2 (ver 2.11)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -//GAME( 1993, champ2, 0, champ2, champ2, champ2_state, empty_init, ROT0, "U.S. Games", "Countertop Champion", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) - +GAME( 1994, champ2, 0, champ2, champ2, champ2_state, init_at, ROT0, "U.S. Games", "Countertop Champion 2 (ver 2.11)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) From 5ba8a869a04da63d1d2dbe4a7a2690400d686106 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Tue, 27 Aug 2024 20:35:42 +0300 Subject: [PATCH 17/44] cpu/tms34010: Implemented TMS34020 cvdxyl_b instruction. (#12670) Used by Atronic gambling systems. --- src/devices/cpu/tms34010/34010ops.hxx | 40 +++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/devices/cpu/tms34010/34010ops.hxx b/src/devices/cpu/tms34010/34010ops.hxx index bb4791d9d76..4aa88eb300d 100644 --- a/src/devices/cpu/tms34010/34010ops.hxx +++ b/src/devices/cpu/tms34010/34010ops.hxx @@ -180,6 +180,7 @@ void tms340x0_device::cmp_xy_b(uint16_t op) { CMP_XY(B); } void tms340x0_device::cpw_a(uint16_t op) { CPW(A); } void tms340x0_device::cpw_b(uint16_t op) { CPW(B); } +// TODO: Handle cycles properly, currently we assume power of two #define CVXYL(R) \ { \ R##REG(DSTREG(op)) = DXYTOL(R##REG_XY(SRCREG(op))); \ @@ -2117,7 +2118,7 @@ void tms34020_device::clip(uint16_t op) bool is_b = wend.y > daddr.y; if (!(is_l || is_r || is_t || is_b)) { - // ...no itersection, set flags and return + // ...no intersection, set flags and return m_st |= STBIT_Z | STBIT_V; // TODO: manual does not specify cycles, only states that this is complex instruction COUNT_CYCLES(3); @@ -2245,7 +2246,34 @@ void tms34020_device::cvdxyl_a(uint16_t op) void tms34020_device::cvdxyl_b(uint16_t op) { - logerror("020:cvdxyl_b\n"); + // Convert destination XY address to linear + // (Y half of Rd x DPTCH) + (X half of Rd x PSIZE) + (A4 or B4) -> Rd + const XY rd = BREG_XY(DSTREG(op)); + const off_t dptch = DPTCH(); + const off_t offset = BREG(4); + + const off_t result = (rd.y * dptch) + (rd.x << m_pixelshift) + offset; + // logerror("020:cvdxyl_b: PC=0x%08x: DADDR=%x, x=%x, y=%x, DPTCH=%d, PIXELSIZE=%d, OFFSET=%d, result: %x\n", + // m_pc, rd, rd.x, rd.y, dptch, m_pixelshift, offset, result); + + DADDR() = result; + + // Handle cycles related to pitch: + switch (population_count_32(dptch)) + { + // power of 2: 2 clocks + case 1: + COUNT_CYCLES(2); + break; + // 2 powers of 2: 3 clocks + case 2: + COUNT_CYCLES(3); + break; + // arbitrary: 14 clocks + default: + COUNT_CYCLES(14); + break; + } } void tms34020_device::cvmxyl_a(uint16_t op) @@ -2413,7 +2441,7 @@ void tms34020_device::setcdp(uint16_t op) // Check whether we're dealing with an even number if ((dptch & 1) == 0) { - switch(population_count_32(dptch)) + switch (population_count_32(dptch)) { // .. only single bit set, pitch is power of two! case 1: @@ -2472,15 +2500,21 @@ void tms34020_device::trapl(uint16_t op) void tms34020_device::vblt_b_l(uint16_t op) { + // Linear VRAM pixel block transfer + // logerror("020:vblt_b_l: SADDR=0x%x, SPTCH=%d, DADDR=0x%x, DPTCH=%d, DYDX=(%dx%d), TEMP=%x\n", SADDR(), SPTCH(), DADDR(), DPTCH(), DYDX_X(), DYDX_Y(), TEMP()); logerror("020:vblt_b_l\n"); } void tms34020_device::vfill_l(uint16_t op) { + // Linear VRAM fast fill + // logerror("020:vfill_l: DADDR=0x%x, DPTCH=%d, DYDX=(%dx%d)\n", DADDR(), DPTCH(), DYDX_X(), DYDX_Y()); logerror("020:vfill_l\n"); } void tms34020_device::vlcol(uint16_t op) { + // Latch COLOR1 into the VRAM color registers + //logerror("020:vlcol: COLOR1=%x\n", COLOR1()); logerror("020:vlcol\n"); } From 79276770bcc3e1c7dbb8dec2c6737cb95ba4a2f0 Mon Sep 17 00:00:00 2001 From: cam900 Date: Wed, 28 Aug 2024 02:52:40 +0900 Subject: [PATCH 18/44] nintendo/vsnes.cpp: Fixed some save state and debugger issues. (#12693) * Use fixed size types for more data members, register more data members for save states. * Suppress side effects for debugger reads. * Use conventional read/write handler naming, made some variables const. --- src/mame/nintendo/vsnes.cpp | 176 +++++++++++++++++++++++------------- 1 file changed, 112 insertions(+), 64 deletions(-) diff --git a/src/mame/nintendo/vsnes.cpp b/src/mame/nintendo/vsnes.cpp index 6c4679cafbb..ebaf27d2ba6 100644 --- a/src/mame/nintendo/vsnes.cpp +++ b/src/mame/nintendo/vsnes.cpp @@ -184,6 +184,7 @@ class vs_base_state : public driver_device { } + virtual void machine_start() override; virtual void machine_reset() override; template void vsnes_coin_counter_w(offs_t offset, u8 data); @@ -217,11 +218,11 @@ class vs_base_state : public driver_device memory_bank_array_creator<4> m_prg_banks; memory_view m_prg_view; - int m_prg_chunks = 0; + u32 m_prg_chunks = 0; memory_bank_array_creator<8> m_chr_banks; memory_view m_chr_view; - int m_chr_chunks = 0; + u32 m_chr_chunks = 0; bool m_has_gun = false; @@ -232,9 +233,9 @@ class vs_base_state : public driver_device optional_ioport m_gunx; optional_ioport m_guny; - int m_coin = 0; - int m_input_latch[4]{}; - int m_input_strobe[2]{}; + u8 m_coin = 0; + u32 m_input_latch[4]{}; + u8 m_input_strobe[2]{}; }; class vs_uni_state : public vs_base_state @@ -269,32 +270,32 @@ class vs_uni_state : public vs_base_state virtual void machine_start() override; private: - void vsnormal_vrom_banking(u8 data); - void vskonami_rom_banking(offs_t offset, u8 data); + void vsnormal_vrom_banking_w(u8 data); + void vskonami_rom_banking_w(offs_t offset, u8 data); void vsgshoe_gun_in0_w(u8 data); - void drmario_rom_banking(offs_t offset, u8 data); - void vsvram_rom_banking(u8 data); - void vs108_rom_banking(offs_t offset, u8 data); + void drmario_rom_banking_w(offs_t offset, u8 data); + void vsvram_rom_banking_w(u8 data); + void vs108_rom_banking_w(offs_t offset, u8 data); u8 rbibb_prot_r(offs_t offset); u8 supxevs_prot_1_r(); u8 supxevs_prot_2_r(); u8 supxevs_prot_3_r(); u8 supxevs_prot_4_r(); u8 tkoboxng_prot_r(offs_t offset); - void sunsoft3_rom_banking(offs_t offset, u8 data); + void sunsoft3_rom_banking_w(offs_t offset, u8 data); void set_bnglngby_irq_w(u8 data); u8 set_bnglngby_irq_r(); void v_set_videorom_bank(int start, int count, int vrom_start_bank); - int m_mmc1_shiftreg = 0; - int m_mmc1_shiftcount = 0; - int m_mmc1_prg16k = 0; - int m_mmc1_switchlow = 0; - int m_mmc1_chr4k = 0; - int m_108_reg = 0; - int m_prot_index = 0; - int m_ret = 0; + u8 m_mmc1_shiftreg = 0; + u8 m_mmc1_shiftcount = 0; + bool m_mmc1_prg16k = false; + u8 m_mmc1_switchlow = 0; + bool m_mmc1_chr4k = false; + u8 m_108_reg = 0; + u8 m_prot_index = 0; + u8 m_ret = 0; }; class vs_dual_state : public vs_base_state @@ -312,7 +313,7 @@ class vs_dual_state : public vs_base_state virtual void machine_start() override; private: - template void vsdual_vrom_banking(u8 data); + template void vsdual_vrom_banking_w(u8 data); }; class vs_smbbl_state : public vs_base_state @@ -347,7 +348,7 @@ class vs_smbbl_state : public vs_base_state u8 m_bootleg_sound_offset = 0; u8 m_bootleg_sound_data = 0; - int m_bootleg_latched_scanline = 0; + s32 m_bootleg_latched_scanline = 0; }; @@ -369,7 +370,8 @@ template u8 vs_base_state::vsnes_coin_counter_r(offs_t offset) { // reads effectively write MSB of address (via open bus) to coin counter - machine().bookkeeping().coin_counter_w(Side, BIT(offset, 8)); + if (!machine().side_effects_disabled()) + machine().bookkeeping().coin_counter_w(Side, BIT(offset, 8)); // only for platoon return m_coin; @@ -382,8 +384,8 @@ void vs_base_state::vsnes_in0_w(u8 data) if (m_input_strobe[Side] & ~data & 1) { // load up the latches - int p1 = 2 * Side; - int p2 = p1 + 1; + const u8 p1 = 2 * Side; + const u8 p2 = p1 + 1; m_input_latch[p1] = m_in[p1]->read(); m_input_latch[p2] = m_in[p2]->read(); @@ -397,17 +399,21 @@ void vs_base_state::vsnes_in0_w(u8 data) template u8 vs_base_state::vsnes_in0_r() { - int p1 = 2 * Side; + const u8 p1 = 2 * Side; - if (m_input_strobe[Side] & 1) + if (!machine().side_effects_disabled()) { - m_input_latch[p1] = m_in[p1]->read(); - if (m_has_gun && m_sensor->detect_light(m_gunx->read(), m_guny->read())) - m_input_latch[p1] |= 0x40; + if (m_input_strobe[Side] & 1) + { + m_input_latch[p1] = m_in[p1]->read(); + if (m_has_gun && m_sensor->detect_light(m_gunx->read(), m_guny->read())) + m_input_latch[p1] |= 0x40; + } } - int ret = m_input_latch[p1] & 1; - m_input_latch[p1] >>= 1; + u8 ret = m_input_latch[p1] & 1; + if (!machine().side_effects_disabled()) + m_input_latch[p1] >>= 1; // FIXME: UniSystem's wiring harness connects S Coin 2 to S Coin 1 edge hardness // This should mean games that don't check Coin 2 inputs respond on UniSys, but on DualSys they'd miss the Coin 2 inserts as all 4 inputs are separate? @@ -423,16 +429,23 @@ u8 vs_base_state::vsnes_in1_r() { // Only the Sub side CPU can kick the watchdog, which it must do by periodically reading $4017. // This is one reason UniSystem games too must be installed on the Sub side. - if (m_watchdog && Side == SUB) - m_watchdog->watchdog_reset(); + if (!machine().side_effects_disabled()) + { + if (m_watchdog && Side == SUB) + m_watchdog->watchdog_reset(); + } - int p2 = 2 * Side + 1; + const u8 p2 = 2 * Side + 1; - if (m_input_strobe[Side] & 1) - m_input_latch[p2] = m_in[p2]->read(); + if (!machine().side_effects_disabled()) + { + if (m_input_strobe[Side] & 1) + m_input_latch[p2] = m_in[p2]->read(); + } - int ret = m_input_latch[p2] & 1; - m_input_latch[p2] >>= 1; + u8 ret = m_input_latch[p2] & 1; + if (!machine().side_effects_disabled()) + m_input_latch[p2] >>= 1; ret |= m_dsw[Side]->read() & ~3; // merge the rest of the dipswitches @@ -508,8 +521,17 @@ void vs_uni_state::v_set_videorom_bank(int start, int count, int vrom_start_bank m_chr_banks[i + start]->set_entry(vrom_start_bank + i); } +void vs_base_state::machine_start() +{ + save_item(NAME(m_coin)); + save_item(NAME(m_input_latch)); + save_item(NAME(m_input_strobe)); +} + void vs_uni_state::machine_start() { + vs_base_state::machine_start(); + // establish chr banks // DRIVER_INIT is called first - means we can handle this different for VRAM games! if (m_gfx1_rom != nullptr) @@ -526,15 +548,26 @@ void vs_uni_state::machine_start() } else m_chr_view.select(0); + + save_item(NAME(m_mmc1_shiftreg)); + save_item(NAME(m_mmc1_shiftcount)); + save_item(NAME(m_mmc1_prg16k)); + save_item(NAME(m_mmc1_switchlow)); + save_item(NAME(m_mmc1_chr4k)); + save_item(NAME(m_108_reg)); + save_item(NAME(m_prot_index)); + save_item(NAME(m_ret)); } void vs_dual_state::machine_start() { + vs_base_state::machine_start(); + for (int i = 0; i < 2; i++) { const char *region = i ? "gfx2" : "gfx1"; u8 *base = memregion(region)->base(); - int entries = memregion(region)->bytes() / 0x2000; + const u32 entries = memregion(region)->bytes() / 0x2000; m_chr_banks[i]->configure_entries(0, entries, base, 0x2000); m_chr_banks[i]->set_entry(0); } @@ -542,12 +575,18 @@ void vs_dual_state::machine_start() void vs_smbbl_state::machine_start() { + vs_base_state::machine_start(); + m_ppu1->set_scanline_callback(*this, FUNC(vs_smbbl_state::smbbl_scanline_cb)); u8 *base = m_gfx1_rom->base(); - int entries = m_gfx1_rom->bytes() / 0x2000; + const u32 entries = m_gfx1_rom->bytes() / 0x2000; m_chr_banks[0]->configure_entries(0, entries, base, 0x2000); m_chr_banks[0]->set_entry(0); + + save_item(NAME(m_bootleg_sound_offset)); + save_item(NAME(m_bootleg_sound_data)); + save_item(NAME(m_bootleg_latched_scanline)); } /********************************************************************************** @@ -559,7 +598,7 @@ void vs_smbbl_state::machine_start() //********************************************************************************** // Most games: VROM Banking in controller 0 write -void vs_uni_state::vsnormal_vrom_banking(u8 data) +void vs_uni_state::vsnormal_vrom_banking_w(u8 data) { // switch vrom v_set_videorom_bank(0, 8, (data & 4) ? 8 : 0); @@ -573,7 +612,7 @@ void vs_uni_state::vsnormal_vrom_banking(u8 data) void vs_uni_state::init_vsnormal() { // vrom switching is enabled with bit 2 of $4016 - m_maincpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_uni_state::vsnormal_vrom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_uni_state::vsnormal_vrom_banking_w))); } //********************************************************************************** @@ -588,7 +627,7 @@ void vs_uni_state::init_vsgun() //********************************************************************************** // Konami VRC1 games: ROM banking at $8000-$ffff -void vs_uni_state::vskonami_rom_banking(offs_t offset, u8 data) +void vs_uni_state::vskonami_rom_banking_w(offs_t offset, u8 data) { int reg = BIT(offset, 12, 3); @@ -616,7 +655,7 @@ void vs_uni_state::init_vskonami() init_prg_banking(); // banking is done with writes to the $8000-$ffff area - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::vskonami_rom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::vskonami_rom_banking_w))); } //********************************************************************************** @@ -628,7 +667,7 @@ void vs_uni_state::vsgshoe_gun_in0_w(u8 data) m_prg_banks[0]->set_entry(BIT(data, 2)); // otherwise do normal CHR banking and IO write - vsnormal_vrom_banking(data); + vsnormal_vrom_banking_w(data); } void vs_uni_state::init_vsgshoe() @@ -645,13 +684,13 @@ void vs_uni_state::init_vsgshoe() //********************************************************************************** // MMC1 (Dr Mario): ROM banking at $8000-$ffff -void vs_uni_state::drmario_rom_banking(offs_t offset, u8 data) +void vs_uni_state::drmario_rom_banking_w(offs_t offset, u8 data) { // reset mapper if (data & 0x80) { m_mmc1_shiftcount = 0; - m_mmc1_prg16k = 1; + m_mmc1_prg16k = true; m_mmc1_switchlow = 1; return; @@ -702,7 +741,7 @@ void vs_uni_state::init_drmario() init_prg_banking(); // MMC1 mapper at $8000-$ffff - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::drmario_rom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::drmario_rom_banking_w))); m_mmc1_shiftreg = 0; m_mmc1_shiftcount = 0; @@ -711,7 +750,7 @@ void vs_uni_state::init_drmario() //********************************************************************************** // (UNROM) Games with VRAM instead of graphics ROMs: ROM banking at $8000-$ffff -void vs_uni_state::vsvram_rom_banking(u8 data) +void vs_uni_state::vsvram_rom_banking_w(u8 data) { prg16(0, data); } @@ -722,13 +761,13 @@ void vs_uni_state::init_vsvram() init_prg_banking(); // banking is done with writes to the $8000-$ffff area - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8smo_delegate(*this, FUNC(vs_uni_state::vsvram_rom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8smo_delegate(*this, FUNC(vs_uni_state::vsvram_rom_banking_w))); } //********************************************************************************** // (Namco) 108 (MMC3 predecessor) games -void vs_uni_state::vs108_rom_banking(offs_t offset, u8 data) +void vs_uni_state::vs108_rom_banking_w(offs_t offset, u8 data) { switch (offset & 0x6001) { @@ -752,7 +791,7 @@ void vs_uni_state::vs108_rom_banking(offs_t offset, u8 data) break; default: - logerror("vs108_rom_banking uncaught: %04x value: %02x\n", offset + 0x8000, data); + logerror("vs108_rom_banking_w uncaught: %04x value: %02x\n", offset + 0x8000, data); break; } } @@ -767,7 +806,7 @@ void vs_uni_state::init_vs108() m_108_reg = 0; // 108 chip at $8000-$9fff - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::vs108_rom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::vs108_rom_banking_w))); } // Vs. RBI Baseball @@ -785,11 +824,15 @@ u8 vs_uni_state::rbibb_prot_r(offs_t offset) if (offset == 0) { - m_prot_index = 0; + if (!machine().side_effects_disabled()) + m_prot_index = 0; return 0; } - return prot_data[m_prot_index++ & 0x1f]; + const u8 prot_index = m_prot_index; + if (!machine().side_effects_disabled()) + m_prot_index++; + return prot_data[prot_index & 0x1f]; } void vs_uni_state::init_rbibb() @@ -805,7 +848,8 @@ void vs_uni_state::init_rbibb() u8 vs_uni_state::supxevs_prot_1_r() { - m_prot_index ^= 1; + if (!machine().side_effects_disabled()) + m_prot_index ^= 1; return 0x05; } @@ -850,11 +894,15 @@ u8 vs_uni_state::tkoboxng_prot_r(offs_t offset) if (offset == 0) { - m_prot_index = 0; + if (!machine().side_effects_disabled()) + m_prot_index = 0; return 0; } - return prot_data[m_prot_index++ & 0x1f]; + const u8 prot_index = m_prot_index; + if (!machine().side_effects_disabled()) + m_prot_index++; + return prot_data[prot_index & 0x1f]; } void vs_uni_state::init_tkoboxng() @@ -876,7 +924,7 @@ void vs_uni_state::init_vsfdf() //********************************************************************************** // Sunsoft-3 (Platoon) rom banking -void vs_uni_state::sunsoft3_rom_banking(offs_t offset, u8 data) +void vs_uni_state::sunsoft3_rom_banking_w(offs_t offset, u8 data) { switch (offset & 0x7800) { @@ -899,7 +947,7 @@ void vs_uni_state::init_platoon() // point program banks to last 32K init_prg_banking(); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::sunsoft3_rom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8sm_delegate(*this, FUNC(vs_uni_state::sunsoft3_rom_banking_w))); } //********************************************************************************** @@ -934,7 +982,7 @@ void vs_uni_state::init_bnglngby() // VS DualSystem template -void vs_dual_state::vsdual_vrom_banking(u8 data) +void vs_dual_state::vsdual_vrom_banking_w(u8 data) { // switch vrom m_chr_banks[Side]->set_entry(BIT(data, 2)); @@ -950,8 +998,8 @@ void vs_dual_state::vsdual_vrom_banking(u8 data) void vs_dual_state::init_vsdual() { // vrom switching is enabled with bit 2 of $4016 - m_maincpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_dual_state::vsdual_vrom_banking
))); - m_subcpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_dual_state::vsdual_vrom_banking))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_dual_state::vsdual_vrom_banking_w
))); + m_subcpu->space(AS_PROGRAM).install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(vs_dual_state::vsdual_vrom_banking_w))); } //********************************************************************************** @@ -972,7 +1020,7 @@ u8 vs_smbbl_state::smbbl_ppu_data_r() { // CPU always reads higher CHR ROM banks from $2007, PPU always reads lower ones m_chr_banks[0]->set_entry(1); - u8 data = m_ppu1->read(0x2007); + const u8 data = m_ppu1->read(0x2007); m_chr_banks[0]->set_entry(0); return data; From 6d1970f5f1085436550ed93167df685c0d581679 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 28 Aug 2024 05:56:16 +1000 Subject: [PATCH 19/44] Bumped version to 0.269 --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- docs/source/conf.py | 4 ++-- makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index 37320df98a9..fda98bb687e 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/docs/source/conf.py b/docs/source/conf.py index 63dd0bfed6a..fbdcc2a0926 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,9 +63,9 @@ # built documents. # # The short X.Y version. -version = '0.268' +version = '0.269' # The full version, including alpha/beta/rc tags. -release = '0.268' +release = '0.269' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/makefile b/makefile index 7af7a7c8020..97227bd2f4e 100644 --- a/makefile +++ b/makefile @@ -1578,7 +1578,7 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.268"' > $@ + @echo '#define BARE_BUILD_VERSION "0.269"' > $@ @echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char bare_vcs_revision[];' >> $@ @@ -1588,7 +1588,7 @@ $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) @echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@ else $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo #define BARE_BUILD_VERSION "0.268" > $@ + @echo #define BARE_BUILD_VERSION "0.269" > $@ @echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char bare_vcs_revision[]; >> $@ From d029420fbe2c64c80a1ba71ea2bf3c5a76253138 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 28 Aug 2024 13:09:32 +0200 Subject: [PATCH 20/44] s14001a: remove overloaded set_clock, vcc: update notes --- src/devices/sound/s14001a.cpp | 32 +++++++++++--------------- src/devices/sound/s14001a.h | 6 ++--- src/mame/fidelity/card.cpp | 12 +++++----- src/mame/fidelity/csc.cpp | 4 ++-- src/mame/fidelity/vcc.cpp | 42 +++++++++++++++++++++++------------ src/mame/fidelity/vsc.cpp | 28 +++++++++++------------ src/mame/pinball/st_mp200.cpp | 2 +- src/mame/stern/berzerk.cpp | 2 +- 8 files changed, 67 insertions(+), 61 deletions(-) diff --git a/src/devices/sound/s14001a.cpp b/src/devices/sound/s14001a.cpp index a27ae2210da..64e23033206 100644 --- a/src/devices/sound/s14001a.cpp +++ b/src/devices/sound/s14001a.cpp @@ -247,7 +247,7 @@ void s14001a_device::device_start() m_bPPQCarryP2 = false; m_bRepeatCarryP2 = false; m_bLengthCarryP2 = false; - m_RomAddrP1 = 0; + m_uRomAddrP1 = 0; m_uRomAddrP2 = 0; m_bBusyP1 = false; m_bStart = false; @@ -283,7 +283,7 @@ void s14001a_device::device_start() save_item(NAME(m_bPPQCarryP2)); save_item(NAME(m_bRepeatCarryP2)); save_item(NAME(m_bLengthCarryP2)); - save_item(NAME(m_RomAddrP1)); + save_item(NAME(m_uRomAddrP1)); save_item(NAME(m_uOutputP2)); save_item(NAME(m_uRomAddrP2)); @@ -338,12 +338,6 @@ void s14001a_device::start_w(int state) m_bStart = (state != 0); } -void s14001a_device::set_clock(u32 clock) -{ - m_stream->update(); - m_stream->set_sample_rate(clock); -} - /************************************************************************** Device emulation @@ -385,7 +379,7 @@ bool s14001a_device::Clock() m_uDeltaOldP2 = m_uDeltaOldP1; m_uOutputP2 = m_uOutputP1; - m_uRomAddrP2 = m_RomAddrP1; + m_uRomAddrP2 = m_uRomAddrP1; // setup carries from phase 2 values m_bDAR04To00CarryP2 = m_uDAR04To00P2 == 0x1f; @@ -415,7 +409,7 @@ bool s14001a_device::Clock() // all other bits forced to 0. 04 to 08 makes a multiply by two. m_uDAR13To05P1 = (m_uWord & 0x3c) >> 2; m_uDAR04To00P1 = (m_uWord & 0x03) << 3; - m_RomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits + m_uRomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits m_uOutputP1 = 7; m_uStateP1 = m_bStart ? states::WORDWAIT : states::CWARMSB; @@ -434,7 +428,7 @@ bool s14001a_device::Clock() m_uDAR04To00P1 += 4; if (m_uDAR04To00P1 >= 32) m_uDAR04To00P1 = 0; // emulate 5 bit counter - m_RomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits + m_uRomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits m_uOutputP1 = 7; m_uStateP1 = m_bStart ? states::WORDWAIT : states::CWARLSB; @@ -442,7 +436,7 @@ bool s14001a_device::Clock() case states::CWARLSB: m_uCWARP1 = m_uCWARP2 | (ReadMem(m_uRomAddrP2, m_bPhase1) >> 4); // setup in previous state - m_RomAddrP1 = m_uCWARP1; + m_uRomAddrP1 = m_uCWARP1; m_uOutputP1 = 7; m_uStateP1 = m_bStart ? states::WORDWAIT : states::DARMSB; @@ -452,7 +446,7 @@ bool s14001a_device::Clock() m_uDAR13To05P1 = ReadMem(m_uRomAddrP2, m_bPhase1) << 1; // 9 bit counter, 8 MSBs from ROM, lsb zeroed m_uDAR04To00P1 = 0; m_uCWARP1++; - m_RomAddrP1 = m_uCWARP1; + m_uRomAddrP1 = m_uCWARP1; m_uOutputP1 = 7; m_uStateP1 = m_bStart ? states::WORDWAIT : states::CTRLBITS; @@ -469,7 +463,7 @@ bool s14001a_device::Clock() m_uLengthP1 = (data & 0x1f) << 2; // includes external length and repeat m_uDAR04To00P1 = 0; m_uCWARP1++; // gets ready for next DARMSB - m_RomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits + m_uRomAddrP1 = (m_uDAR13To05P1 << 3) | (m_uDAR04To00P1 >> 2); // remove lower two bits m_uOutputP1 = 7; m_uStateP1 = m_bStart ? states::WORDWAIT : states::PLAY; @@ -540,11 +534,11 @@ bool s14001a_device::Clock() m_uDAR13To05P1 = 0; // emulate 9 bit counter } - // construct m_RomAddrP1 - m_RomAddrP1 = m_uDAR04To00P1; + // construct m_uRomAddrP1 + m_uRomAddrP1 = m_uDAR04To00P1; if (m_bVoicedP2 && m_uLengthP1 & 0x1) // mirroring - m_RomAddrP1 ^= 0x1f; // count backwards - m_RomAddrP1 = (m_uDAR13To05P1 << 3) | m_RomAddrP1 >> 2; + m_uRomAddrP1 ^= 0x1f; // count backwards + m_uRomAddrP1 = (m_uDAR13To05P1 << 3) | m_uRomAddrP1 >> 2; // next state if (m_bStart) @@ -554,7 +548,7 @@ bool s14001a_device::Clock() else if (m_bLengthCarryP2) { m_uStateP1 = states::DARMSB; - m_RomAddrP1 = m_uCWARP1; // output correct address + m_uRomAddrP1 = m_uCWARP1; // output correct address } else m_uStateP1 = states::PLAY; diff --git a/src/devices/sound/s14001a.h b/src/devices/sound/s14001a.h index 151d62de2b1..44fe973cfeb 100644 --- a/src/devices/sound/s14001a.h +++ b/src/devices/sound/s14001a.h @@ -25,12 +25,10 @@ class s14001a_device : public device_t, public device_sound_interface, public de void start_w(int state); // START (pin 10) void data_w(u8 data); // 6-bit word - void set_clock(u32 clock); // set new CLK frequency - void set_clock(const XTAL &xtal) { set_clock(xtal.value()); } - protected: // device-level overrides virtual void device_start() override; + virtual void device_clock_changed() override { m_stream->update(); m_stream->set_sample_rate(clock()); } virtual void rom_bank_pre_change() override { m_stream->update(); } // sound stream update overrides @@ -96,7 +94,7 @@ class s14001a_device : public device_t, public device_sound_interface, public de bool m_bPPQCarryP2; bool m_bRepeatCarryP2; bool m_bLengthCarryP2; - u16 m_RomAddrP1; // rom address + u16 m_uRomAddrP1; // rom address // output pins u8 m_uOutputP2; // output changes on phase2 diff --git a/src/mame/fidelity/card.cpp b/src/mame/fidelity/card.cpp index 85ef5fe7ad4..3d03ae9a34e 100644 --- a/src/mame/fidelity/card.cpp +++ b/src/mame/fidelity/card.cpp @@ -41,7 +41,7 @@ added. RE notes by Kevin Horton This unit is similar in construction kinda to the chess challengers, however it -has an 8041 which does ALL of the system I/O. The Z80 has NO IO AT ALL other than +has an 8041 which does ALL of the system I/O. The Z80 has NO IO AT ALL other than what is performed through the 8041! The main CPU is a Z80 running at 2.5MHz @@ -61,10 +61,10 @@ Memory Map: 8000-DFFF: unused E000-FFFF: write to TSI chip -NOTE: when the TSI chip is written to, the CPU IS STOPPED. The CPU will run again -when the word is done being spoken. This is because D0-D5 run to the TSI chip directly. +NOTE: when the TSI chip is written to, the CPU IS STOPPED. The CPU will run again +when the word is done being spoken. This is because D0-D5 run to the TSI chip directly. -The TSI chip's ROM is 4K, and is marked 101-32118. The clock is the same as the Chess +The TSI chip's ROM is 4K, and is marked 101-32118. The clock is the same as the Chess Challengers- 470K/100pf which gives a frequency around 25KHz or so. Port Map: @@ -115,7 +115,7 @@ P6.1 - segment B P6.2 - segment F P6.3 - segment G -P7.0 - LED enable (high = LEDs can be lit. low = LEDs will not light) +P7.0 - LED enable (high = LEDs can be lit. low = LEDs will not light) P7.1 - goes through inverter, to pads that are not used P7.2 - segment C P7.3 - segment H @@ -155,7 +155,7 @@ E* * * * *C D The digits of the display are numbered left to right, 0 through 7 and are controlled -by the grids. hi = grid on, hi = segment on. +by the grids. hi = grid on, hi = segment on. A detailed description of the hardware can be found also in the patent 4,373,719. diff --git a/src/mame/fidelity/csc.cpp b/src/mame/fidelity/csc.cpp index 8d07839fa2f..5266844c44a 100644 --- a/src/mame/fidelity/csc.cpp +++ b/src/mame/fidelity/csc.cpp @@ -506,7 +506,7 @@ void csc_state::csce_map(address_map &map) map.unmap_value_high(); map(0x0000, 0x0fff).ram(); map(0x1000, 0x1003).rw(m_pia[1], FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x1800, 0x1803).w(m_pia[0], FUNC(pia6821_device::write)).r(FUNC(csc_state::pia0_read)); + map(0x1800, 0x1803).rw(FUNC(csc_state::pia0_read), FUNC(csc_state::pia0_write)); map(0x2000, 0x3fff).rom(); map(0xa000, 0xffff).rom(); } @@ -515,7 +515,7 @@ void csc_state::rsc_map(address_map &map) { map.unmap_value_high(); map(0x0000, 0x03ff).ram(); - map(0x2000, 0x2003).w(m_pia[0], FUNC(pia6821_device::write)).r(FUNC(csc_state::pia0_read)); + map(0x2000, 0x2003).rw(FUNC(csc_state::pia0_read), FUNC(csc_state::pia0_write)); map(0xf000, 0xffff).rom(); } diff --git a/src/mame/fidelity/vcc.cpp b/src/mame/fidelity/vcc.cpp index 789654af630..eaad46376cc 100644 --- a/src/mame/fidelity/vcc.cpp +++ b/src/mame/fidelity/vcc.cpp @@ -12,22 +12,36 @@ Grandmaster and FCC are verified to be the same PCB + ROMs as UVC. So even thoug they have a large wooden chessboard attached instead of a small plastic one, from MAME's perspective there's nothing to emulate on top of UVC. +TODO: +- add low-pass filters to sound? but when using flt_rc, it does not sound like + recordings from a real VCC, maybe use a netlist or is it overkill? (same goes + for newer Fidelity chess computers with this speech chip) + +BTANB: +- with the English voice ROM, the letter D is barely distinguishable from E, + Fidelity never updated the ROM later, and it sounds fine with other languages + ================================================================================ RE notes by Kevin Horton -The CPU is a Z80 running at 4MHz. The TSI chip runs at around 25KHz, using a -470K / 100pf RC network. This system is very very basic, and is composed of just +The CPU is a Z80 running at 4MHz. The TSI chip runs at around 25KHz, using a +470K / 100pf RC network. This system is very very basic, and is composed of just the Z80, 4 ROMs, the TSI chip, and an 8255. The Z80's interrupt inputs are all pulled to VCC, so no interrupts are used. Reset is connected to a power-on reset circuit and a button on the keypad (marked RE). -The TSI chip connects to a 4K ROM. All of the 'Voiced' Chess Challengers -use this same ROM (three or four). The later chess boards use a slightly different +The TSI chip connects to a 4K ROM. All of the 'Voiced' Chess Challengers +use this same ROM (three or four). The later chess boards use a slightly different part number, but the contents are identical. +The speech chip analog out (pin 11) goes to a PNP transistor, followed by two +cascaded low-pass filters (18K+5nf and 18K+20nf), an LM386N amplifier, and a +speaker. Newer Fidelity chess computers with this chip have a similar configuration, +with an additional volume filter before the LM386N. + Memory map (VCC): ----------------- 0000-0FFF: 4K 2332 ROM VCC1 or 101-32013 @@ -79,26 +93,26 @@ PC.7 - button column D (W) Language jumpers: ----------------- -When PB.6 is pulled low, the language jumpers can be read. There are four. -They connect to the button rows. When enabled, the row(s) will read low if -the jumper is present. English only VCC's do not have the 367 or any pads stuffed. +When PB.6 is pulled low, the language jumpers can be read. There are four. +They connect to the button rows. When enabled, the row(s) will read low if +the jumper is present. English only VCC's do not have the 367 or any pads stuffed. The jumpers are labeled: French, German, Spanish, and special. Language latch: --------------- -There's an unstuffed 7474 on the board that connects to PA.6 and PA.7. It allows -one to latch the state of A12 to the speech ROM. The English version has the chip -missing, and a jumper pulling "A12" to ground. This line is really a negative +There's an unstuffed 7474 on the board that connects to PA.6 and PA.7. It allows +one to latch the state of A12 to the speech ROM. The English version has the chip +missing, and a jumper pulling "A12" to ground. This line is really a negative enable. To make the VCC multi-language, one would install the 74367 (note: it must be a 74367 -or possibly a 74LS367. A 74HC367 would not work since they rely on the input current +or possibly a 74LS367. A 74HC367 would not work since they rely on the input current to keep the inputs pulled up), solder a piggybacked ROM to the existing English speech ROM, and finally install a 7474 dual flipflop. -This way, the game can then detect which secondary language is present, and then it can -automatically select the correct ROM(s). I have to test whether it will do automatic -determination and give you a language option on power up or something. +This way, the game can then detect which secondary language is present, and then +it can automatically select the correct ROM(s). I have to test whether it will do +automatic determination and give you a language option on power up or something. *******************************************************************************/ diff --git a/src/mame/fidelity/vsc.cpp b/src/mame/fidelity/vsc.cpp index fa2db85aea9..d7cfcdaa623 100644 --- a/src/mame/fidelity/vsc.cpp +++ b/src/mame/fidelity/vsc.cpp @@ -7,7 +7,7 @@ Fidelity Voice Sensory Chess Challenger (VSC) RE notes by Kevin Horton The display/button/LED/speech technology is identical to Fidelity CSC. -Only the CPU board was changed. As such, it works the same but is interfaced +Only the CPU board was changed. As such, it works the same but is interfaced to different port chips this time. Hardware: @@ -19,11 +19,11 @@ I/O is composed of an 8255 triple port adaptor, and a Z80A PIO parallel I/O interface. There's the usual TSI S14001A speech synth with its requisite 4K ROM which is the -same as on the other talking chess boards. The TSI chip is running at 26.37KHz. +same as on the other talking chess boards. The TSI chip is running at 26.37KHz. It uses a 470K resistor and a 100pf capacitor. The "perfect" clock would be 1/RC most likely (actually this will be skewed a tad by -duty cycle of the oscillator) which with those parts values gives 21.27KHz. The +duty cycle of the oscillator) which with those parts values gives 21.27KHz. The formula is probably more likely to be 1/1.2RC or so. Rounding out the hardware are three driver chips for the LEDs, a 7404 inverter to @@ -59,13 +59,13 @@ So to enable only the 8255, you'd write/read to 08-0Bh for example To enable only the PIO, you'd write/read to 04-07h for example. writing to 00-03h will enable and write to BOTH chips, and reading 00-03h -will return data from BOTH chips (and cause a bus conflict). The code probably +will return data from BOTH chips (and cause a bus conflict). The code probably never does either of these things. Likewise, writing/reading to 0Ch-0Fh will result in open bus, because neither chip's enable line will be low. -This sequence repeats every 16 addresses. So to recap: +This sequence repeats every 16 addresses. So to recap: 00-03: both chips enabled (probably not used) 04-07: PIO enabled @@ -75,7 +75,7 @@ This sequence repeats every 16 addresses. So to recap: 10-FF: mirrors of 00-0F. Refer to the Sensory Champ. Chess Chall. for explanations of the below -I/O names and labels. It's the same. +I/O names and labels. It's the same. 8255: ----- @@ -128,20 +128,20 @@ PB.7 - TSI ROM A12 line Selection jumpers: ------------------ -These act like another row of buttons. It is composed of two diode locations, -so there's up to 4 possible configurations. My board does not have either diode -stuffed, so this most likely is "English". I suspect it selects which language to use -for the speech synth. Of course you need the other speech ROMs for this to function -properly. +These act like another row of buttons. It is composed of two diode locations, +so there's up to 4 possible configurations. My board does not have either diode +stuffed, so this most likely is "English". I suspect it selects which language +to use for the speech synth. Of course you need the other speech ROMs for this +to function properly. Anyways, the two jumpers are connected to button columns A and B and the common -connects to Z80A PIO PB.5, which basically makes a 10th button row. I would +connects to Z80A PIO PB.5, which basically makes a 10th button row. I would expect that the software reads these once on startup only. Printer: -------- -This is the 1st Fidelity chess computer with a printer port. Many later Fidelity chess -computers also have support for it. Two models were released: +This is the 1st Fidelity chess computer with a printer port. Many later Fidelity +chess computers also have support for it. Two models were released: FP: Challenger Printer - thermal printer, MCU=D8048C243 IFP: Impact Printer - also compatible with C64 apparently. diff --git a/src/mame/pinball/st_mp200.cpp b/src/mame/pinball/st_mp200.cpp index 48a1309548e..5c5338f97bf 100644 --- a/src/mame/pinball/st_mp200.cpp +++ b/src/mame/pinball/st_mp200.cpp @@ -426,7 +426,7 @@ void st_mp200_state::u11_ca2_w(int state) m_s14001a->set_output_gain(0, ((m_u10a >> 3 & 0xf) + 1) / 16.0); u8 clock_divisor = 16 - (m_u10a & 0x07); - m_s14001a->set_clock(S14001_CLOCK / clock_divisor / 8); + m_s14001a->set_unscaled_clock(S14001_CLOCK / clock_divisor / 8); } } } diff --git a/src/mame/stern/berzerk.cpp b/src/mame/stern/berzerk.cpp index 69008fed939..63dc11d4793 100644 --- a/src/mame/stern/berzerk.cpp +++ b/src/mame/stern/berzerk.cpp @@ -607,7 +607,7 @@ void berzerk_state::audio_w(offs_t offset, uint8_t data) /* clock control - the first LS161 divides the clock by 9 to 16, the 2nd by 8, giving a final clock from 19.5kHz to 34.7kHz */ int clock_divisor = 16 - (data & 0x07); - m_s14001a->set_clock(S14001_CLOCK / clock_divisor / 8); + m_s14001a->set_unscaled_clock(S14001_CLOCK / clock_divisor / 8); break; } From 1419b2f96427a0975befebde0eeb435d827aed68 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 28 Aug 2024 17:59:34 +0200 Subject: [PATCH 21/44] New systems marked not working ------------------------------ Magical Kengo [Ioannis Bampoulas] Reel Magic Turbo Play [Ioannis Bampoulas] New working clones ------------------ Lunar Rescue (Artic bootleg) [Guru] --- src/mame/bmc/popobear.cpp | 176 ++++++++++++---------- src/mame/igs/igs_m027_link.cpp | 3 +- src/mame/mame.lst | 3 + src/mame/midw8080/8080bw.cpp | 22 +++ src/mame/misc/hitpoker.cpp | 258 ++++++++++++++++++++++----------- 5 files changed, 301 insertions(+), 161 deletions(-) diff --git a/src/mame/bmc/popobear.cpp b/src/mame/bmc/popobear.cpp index c553d00a430..8da87c00561 100644 --- a/src/mame/bmc/popobear.cpp +++ b/src/mame/bmc/popobear.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese, David Haywood +// copyright-holders: Angelo Salese, David Haywood + /************************************************************************************************** Popo Bear (c) 2000 BMC @@ -10,6 +11,8 @@ Popo Bear (c) 2000 BMC - complete I/Os; - Identify what's on $600000 & $620000; - Uses tas opcode to sync to irq, from VDP? +- magkengo: doesn't boot, same as popobear would do without the 0x620000 work-around, but it doesn't + read there. =================================================================================================== @@ -72,10 +75,12 @@ Component Side A B Solder Side **************************************************************************************************/ #include "emu.h" + #include "cpu/m68000/m68000.h" #include "machine/timer.h" #include "sound/okim6295.h" #include "sound/ymopl.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -105,6 +110,9 @@ class popobear_state : public driver_device void popobear(machine_config &config); +protected: + virtual void video_start() override; + private: required_device m_maincpu; required_device m_screen; @@ -124,9 +132,8 @@ class popobear_state : public driver_device void irq_ack_w(uint8_t data); void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb); @@ -149,9 +156,9 @@ void popobear_state::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask) ); COMBINE_DATA(&m_vram_rearranged[swapped_offset]); - m_gfxdecode->gfx(0)->mark_dirty((swapped_offset)/32); + m_gfxdecode->gfx(0)->mark_dirty((swapped_offset) / 32); - // unfortunately tilemaps and tilegfx share the same ram so we're always dirty if we write to RAM + // unfortunately tilemaps and tilegfx share the same RAM so we're always dirty if we write to RAM m_bg_tilemap[0]->mark_all_dirty(); m_bg_tilemap[1]->mark_all_dirty(); m_bg_tilemap[2]->mark_all_dirty(); @@ -175,9 +182,9 @@ GFXDECODE_END template TILE_GET_INFO_MEMBER(popobear_state::get_tile_info) { - int base = m_tilemap_base[N]; - int tileno = m_vram[base / 2 + tile_index]; - int flipyx = (tileno >> 14); + int const base = m_tilemap_base[N]; + int const tileno = m_vram[base / 2 + tile_index]; + int const flipyx = (tileno >> 14); tileinfo.set(0, tileno & 0x3fff, 0, TILE_FLIPYX(flipyx)); } @@ -218,42 +225,40 @@ void popobear_state::video_start() * ---- ---- ---- --x- NOT set on the enemy character / characters in your line * ---- ---- ---- ---x set on opposite to above? */ -void popobear_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) +void popobear_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { uint8_t* vram = reinterpret_cast(m_spriteram.target()); - int i; - - for (int drawpri = 0xf;drawpri>=0x0;drawpri--) + for (int drawpri = 0xf; drawpri >= 0x0; drawpri--) { - /* 0x106 = 8 x 8 */ - /* 0x*29 = 32 x 32 */ - for(i = 0x800-8;i >= 0; i-=8) + // 0x106 = 8 x 8 + // 0x*29 = 32 x 32 + for (int i = 0x800 - 8; i >= 0; i -= 8) { uint16_t *sprdata = &m_spriteram[(0x7f800 + i) / 2]; - int param = sprdata[0]; - int pri = (param & 0x0f00)>>8; + int const param = sprdata[0]; + int const pri = (param & 0x0f00) >> 8; // we do this because it's sprite<->sprite priority, - if (pri!=drawpri) + if (pri != drawpri) continue; int y = sprdata[1]; int x = sprdata[2]; int spr_num = sprdata[3]; - int width = 8 << ((param & 0x30)>>4); - int height = width; // sprites are always square? + int const width = 8 << ((param & 0x30) >> 4); + int const height = width; // sprites are always square? - int color_bank = ((param & 0xc)>>2); - int x_dir = param & 0x40; - int y_dir = param & 0x80; + int color_bank = ((param & 0xc) >> 2); + int const x_dir = param & 0x40; + int const y_dir = param & 0x80; - if (x&0x8000) x-= 0x10000; - if (y&0x8000) y-= 0x10000; + if (x & 0x8000) x -= 0x10000; + if (y & 0x8000) y -= 0x10000; - if (param&0xf000) color_bank = (machine().rand() & 0x3); + if (param & 0xf000) color_bank = (machine().rand() & 0x3); @@ -269,46 +274,46 @@ void popobear_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect case 0x1: // butterflies in intro, enemy characters, line of characters, stage start text //color_bank = (machine().rand() & 0x3); - add_it = color_bank*0x40; + add_it = color_bank * 0x40; break; case 0x2: // characters in intro, main player, powerups, timer, large dancing chars between levels (0x3f?) //color_bank = (machine().rand() & 0x3); - add_it = color_bank*0x40; + add_it = color_bank * 0x40; break; case 0x3: // letters on GAME OVER need this.. - add_it = color_bank*0x40; + add_it = color_bank * 0x40; add_it += 0x20; break; } - if(param == 0) + if (param == 0) continue; spr_num <<= 3; - for(int yi=0;yipen(((pix+(add_it))&0xff)+0x100); + bitmap.pix(y_draw, x_draw) = m_palette->pen(((pix + (add_it)) & 0xff) + 0x100); } } @@ -322,13 +327,9 @@ void popobear_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(0, cliprect); - int line; - rectangle clip; - int scrollbase; - int scrollbase2; const rectangle &visarea = screen.visible_area(); - clip = visarea; + rectangle clip = visarea; //popmessage("%04x",m_vregs[0/2]); uint16_t* vreg = m_vregs; @@ -338,7 +339,7 @@ uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitm // vreg[0x00] also looks like it could be some enable registers // 0x82ff - BMC logo // 0x8aff - some attract scenes (no sprites) - // 0x8bff - game attract scense etc. (sprites) + // 0x8bff - game attract scenes etc. (sprites) // vreg[0x01] is always // 0xfefb @@ -347,10 +348,10 @@ uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitm // these are more than just enable, they get written with 0x0d and 0x1f (and 0x00 when a layer is off) // seems to be related to the linescroll mode at least? maybe sizes? - int enable0 = (m_vregs[0x0c] & 0xff00)>>8; - int enable1 = (m_vregs[0x0c] & 0x00ff)>>0; - int enable2 = (m_vregs[0x0d] & 0xff00)>>8; - int enable3 = (m_vregs[0x0d] & 0x00ff)>>0; + int const enable0 = (m_vregs[0x0c] & 0xff00) >> 8; + int const enable1 = (m_vregs[0x0c] & 0x00ff) >> 0; + int const enable2 = (m_vregs[0x0d] & 0xff00) >> 8; + int const enable3 = (m_vregs[0x0d] & 0x00ff) >> 0; if ((enable0 != 0x00) && (enable0 != 0x0d) && (enable0 != 0x1f)) popmessage("unknown enable0 value %02x", enable0); if ((enable1 != 0x00) && (enable1 != 0x0d) && (enable1 != 0x1f)) popmessage("unknown enable1 value %02x", enable1); @@ -370,20 +371,23 @@ uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitm // the upper 2 tilemaps have a lineselect / linescroll logic + int scrollbase; + int scrollbase2; + if (enable1 == 0x1f) { scrollbase = 0xdf600; scrollbase2 = 0xdf800; - for (line = 0; line < 240;line++) + for (int line = 0; line < 240; line++) { - uint16_t val = m_vram[scrollbase/2 + line]; - uint16_t upper = (m_vram[scrollbase2/2 + line]&0xff00)>>8; + uint16_t const val = m_vram[scrollbase / 2 + line]; + uint16_t const upper = (m_vram[scrollbase2 / 2 + line] & 0xff00) >> 8; clip.sety(line, line); - m_bg_tilemap[1]->set_scrollx(0,(val&0x00ff) | (upper << 8)); - m_bg_tilemap[1]->set_scrolly(0,((val&0xff00)>>8)-line); + m_bg_tilemap[1]->set_scrollx(0, (val & 0x00ff) | (upper << 8)); + m_bg_tilemap[1]->set_scrolly(0, ((val & 0xff00) >> 8) - line); m_bg_tilemap[1]->draw(screen, bitmap, clip, 0, 0); } @@ -400,15 +404,15 @@ uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitm scrollbase = 0xdf400; scrollbase2 = 0xdf800; - for (line = 0; line < 240;line++) + for (int line = 0; line < 240; line++) { - uint16_t val = m_vram[scrollbase/2 + line]; - uint16_t upper = (m_vram[scrollbase2/2 + line]&0x00ff)>>0; + uint16_t const val = m_vram[scrollbase / 2 + line]; + uint16_t const upper = (m_vram[scrollbase2 / 2 + line] & 0x00ff) >> 0; clip.sety(line, line); - m_bg_tilemap[0]->set_scrollx(0,(val&0x00ff) | (upper << 8)); - m_bg_tilemap[0]->set_scrolly(0,((val&0xff00)>>8)-line); + m_bg_tilemap[0]->set_scrollx(0, (val & 0x00ff) | (upper << 8)); + m_bg_tilemap[0]->set_scrolly(0, ((val & 0xff00) >> 8) - line); m_bg_tilemap[0]->draw(screen, bitmap, clip, 0, 0); } @@ -420,16 +424,16 @@ uint32_t popobear_state::screen_update(screen_device &screen, bitmap_ind16 &bitm m_bg_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0); } - draw_sprites(bitmap,cliprect); + draw_sprites(bitmap, cliprect); return 0; } void popobear_state::irq_ack_w(uint8_t data) { - for(int i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { - if(BIT(data, i)) + if (BIT(data, i)) m_maincpu->set_input_line(i, CLEAR_LINE); } } @@ -439,11 +443,11 @@ void popobear_state::main_map(address_map &map) map.unmap_value_high(); map(0x000000, 0x03ffff).rom(); map(0x210000, 0x21ffff).ram(); - map(0x280000, 0x2fffff).ram().share("spriteram"); // unknown boundaries - map(0x300000, 0x3fffff).ram().w(FUNC(popobear_state::vram_w)).share("vram"); // tile definitions + tilemaps + map(0x280000, 0x2fffff).ram().share(m_spriteram); // unknown boundaries + map(0x300000, 0x3fffff).ram().w(FUNC(popobear_state::vram_w)).share(m_vram); // tile definitions + tilemaps // TODO: is the 48xxxx block entirely from AIA90423? - map(0x480000, 0x48001f).ram().share("vregs"); + map(0x480000, 0x48001f).ram().share(m_vregs); map(0x480031, 0x480031).w(FUNC(popobear_state::irq_ack_w)); map(0x480034, 0x480035).nopr(); // uses bset/bclr to write, which causes a read (ignored) map(0x480035, 0x480035).lw8( @@ -566,32 +570,32 @@ INPUT_PORTS_END TIMER_DEVICE_CALLBACK_MEMBER(popobear_state::scanline_cb) { - int scanline = param; + int const scanline = param; // vblank-in // Order is trusted, 5 as vblank-in makes title mosaic-esque rotation to draw incorrectly - if(scanline == 240) + if (scanline == 240) m_maincpu->set_input_line(3, ASSERT_LINE); // vblank-out - if(scanline == 0) + if (scanline == 0) m_maincpu->set_input_line(5, ASSERT_LINE); - /* TODO: actually a timer irq, tied with YM2413 sound chip (controls BGM tempo) */ - /* the YM2413 doesn't have interrupts? */ - if(scanline == 64 || scanline == 192) + // TODO: actually a timer irq, tied with YM2413 sound chip (controls BGM tempo) + // the YM2413 doesn't have interrupts? + if (scanline == 64 || scanline == 192) m_maincpu->set_input_line(2, ASSERT_LINE); } void popobear_state::popobear(machine_config &config) { - M68000(config, m_maincpu, XTAL(42'000'000)/4); // divisor guessed + M68000(config, m_maincpu, XTAL(42'000'000) / 4); // divisor guessed m_maincpu->set_addrmap(AS_PROGRAM, &popobear_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(popobear_state::scanline_cb), "screen", 0, 1); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate m_screen->set_screen_update(FUNC(popobear_state::screen_update)); m_screen->set_palette(m_palette); m_screen->set_size(128*8, 32*8); @@ -603,9 +607,9 @@ void popobear_state::popobear(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_popobear); - YM2413(config, "ymsnd", XTAL(42'000'000)/16).add_route(ALL_OUTPUTS, "mono", 1.0); // divisor guessed + YM2413(config, "ymsnd", XTAL(42'000'000) / 16).add_route(ALL_OUTPUTS, "mono", 1.0); // divisor guessed - OKIM6295(config, "oki", XTAL(42'000'000)/32, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // divisor guessed + OKIM6295(config, "oki", XTAL(42'000'000) / 32, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // divisor guessed } @@ -624,7 +628,25 @@ ROM_START( popobear ) ROM_LOAD( "popobear_ta-a-901.u9", 0x00000, 0x40000, CRC(f1e94926) SHA1(f4d6f5b5811d90d0069f6efbb44d725ff0d07e1c) ) ROM_END +// HERBHOME 20A23-1 PCB. Mostly same components as popobear's (BMC AIA90423, BMC AIA90610, OKI6295, 42 MHz XTAL, etc.), different layout. +// Has a Altera MAX EPM7064SLC84-10 and only 1 8-DIP bank +// Has Herb Home 2003 copyright in ROM but stickers have 2005. TODO: Verify date on title screen when it boots. +ROM_START( magkengo ) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "magical_kengo_2005_l1_a_201_u27.u27", 0x000000, 0x020000, CRC(eddfd8b1) SHA1(9eaeff2c0798b2b6b727ad6f3749cc427a52db41) ) // M27C1001 + ROM_LOAD16_BYTE( "magical_kengo_2005_l1_a_101_u26.u26", 0x000001, 0x020000, CRC(449ad8ab) SHA1(625bd2491eb95aa8e39f75db0d0cd01ec649f5b8) ) // M27C1001 + + ROM_REGION16_BE( 0x400000, "gfx_data", ROMREGION_ERASE00 ) + ROM_LOAD16_BYTE( "magical_kengo_2005_l8_a_401_u6.u6", 0x000000, 0x100000, CRC(857e34e6) SHA1(17681a684f451c92f577d6cb3443a3801b192df3) ) // M27C801 + ROM_LOAD16_BYTE( "magical_kengo_2005_l8_a_301_u5.u5", 0x000001, 0x100000, CRC(ca03b9fd) SHA1(b9fb407760ed1fc276f42a6dd326edbf97c1660d) ) // M27C801 + // u3 and u4 empty not populated + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "magical_kengo_2005_l4_a_701_u20.u20", 0x00000, 0x80000, CRC(a2c563a7) SHA1(ce33e95887cdf76cb4c5f944bbdd219de1b2c7c0) ) // AMD AM27C040 +ROM_END + } // anonymous namespace -GAME( 2000, popobear, 0, popobear, popobear, popobear_state, empty_init, ROT0, "BMC", "PoPo Bear", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_SUPPORTS_SAVE ) +GAME( 2000, popobear, 0, popobear, popobear, popobear_state, empty_init, ROT0, "BMC", "PoPo Bear", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_SUPPORTS_SAVE ) +GAME( 2005, magkengo, 0, popobear, popobear, popobear_state, empty_init, ROT0, "Herb Home", "Magical Kengo", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/igs/igs_m027_link.cpp b/src/mame/igs/igs_m027_link.cpp index a8bd4731db5..d06a51b8f29 100644 --- a/src/mame/igs/igs_m027_link.cpp +++ b/src/mame/igs/igs_m027_link.cpp @@ -5,8 +5,7 @@ IGS ARM7 (IGS027A) based mahjong / gambling platform(s) with link support Keeping them separate from igs_m027.cpp and igs017.cpp for now. -NOTE: linking between mgcs2h and mgcs2l has been verified on real hw, while linking -between cjslh and cjsll doesn't work on real hw for some reason. +Linking has been verified to work fine on real hardware for both games. The two dumped extension games are really similar to mgdh in igs017.cpp code-wise, you can get them to the wait link screen just by implementing the mgdh's IGS MUX diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7464eac3ebd..d2c547a19b9 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15034,6 +15034,7 @@ jxzh // (c) 1996 BMC koftball // (c) 1995 BMC @source:bmc/popobear.cpp +magkengo // (c) 2005 Herb Home popobear // (c) 2000 BMC @source:bondwell/bw12.cpp @@ -27422,6 +27423,7 @@ jspecter // (c) 1979 Jatre jspecter2 // (c) 1979 Jatre laser // (c) 1980 Leisure Time Electronics Inc. lrescue // LR (c) 1979 Taito +lrescueabl // Artic bootleg lrescuem // Model Racing bootleg set 1 lrescuem2 // Model Racing bootleg set 2 lupin3 // LP (c) 1980 Taito @@ -30566,6 +30568,7 @@ zoomaniaa @source:misc/hitpoker.cpp hitpoker // (c) 1997 +reelmtp // (c) 1999 @source:misc/hobbyplay.cpp unkhpslt // diff --git a/src/mame/midw8080/8080bw.cpp b/src/mame/midw8080/8080bw.cpp index 52432706bd6..a7133066eec 100644 --- a/src/mame/midw8080/8080bw.cpp +++ b/src/mame/midw8080/8080bw.cpp @@ -5158,6 +5158,27 @@ ROM_START( lrescuem2 ) ROM_LOAD( "cv02-7643.1c", 0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) ) ROM_END +// still shows Taito copyright, but on Artic PCB +ROM_START( lrescueabl ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2708_1.1", 0x0000, 0x0400, CRC(e3796dec) SHA1(454558672f6959b8efe7d52e26796ad8c0b0da6c) ) + ROM_LOAD( "2708_2.2", 0x0400, 0x0400, CRC(8067c036) SHA1(a9dd756c44ee80d5e6d646f1f48e9341297751cf) ) + ROM_LOAD( "2708_3.3", 0x0800, 0x0400, CRC(90179fee) SHA1(35059f7399229b8d9588d34f79073fa4d3301614) ) + ROM_LOAD( "2708_4.4", 0x0c00, 0x0400, CRC(1d197d87) SHA1(21e049f9c2a0fe1c0403d9d1a2dc695c4ee764f9) ) + ROM_LOAD( "2708_5.5", 0x1000, 0x0400, CRC(4326d338) SHA1(ac31645bdf292f28dfcfcb9d5e158e5df7a6f95d) ) + ROM_LOAD( "2708_6.6", 0x1400, 0x0400, CRC(3b272372) SHA1(39b807c810d093d7a34b102eec16f3d9baeb21f1) ) + ROM_LOAD( "2708_7.7", 0x1800, 0x0400, CRC(06fc1ecc) SHA1(b5b04b32f3bd122329d0282628db197b0c39c8cb) ) + ROM_LOAD( "2708_8.8", 0x1c00, 0x0400, CRC(b3a3f24e) SHA1(c084e7d891c76b9f6949490d48288df0da8c2af7) ) + ROM_LOAD( "2708_9.9", 0x4000, 0x0400, CRC(3398798f) SHA1(d7dd9e65a1048df8edd217f4206b19cd01f143f4) ) + ROM_LOAD( "2708_10.10", 0x4400, 0x0400, CRC(37c5bfc6) SHA1(b0aec85e6f979cdf7a3a985830c8530302804837) ) + ROM_LOAD( "2708_11.11", 0x4800, 0x0400, CRC(1b7a5644) SHA1(d26530ea11ada86f7c99b11d6faf4416a8f5a9eb) ) + ROM_LOAD( "2708_12.12", 0x4c00, 0x0400, CRC(c342b907) SHA1(327da029420c4eedabc2a0534199a008a3f341b8) ) + + ROM_REGION( 0x0800, "proms", 0 ) // not dumped for this set, but present + ROM_LOAD( "cv01-7643.2c", 0x0000, 0x0400, BAD_DUMP CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) ) + ROM_LOAD( "cv02-7643.1c", 0x0400, 0x0400, BAD_DUMP CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) ) +ROM_END + /* Cosmo @@ -6003,6 +6024,7 @@ GAME( 1979, grescue, lrescue, lrescue, lrescue, _8080bw_state, empty_i GAME( 1980, mlander, lrescue, lrescue, lrescue, _8080bw_state, empty_init, ROT270, "bootleg (Leisure Time Electronics)", "Moon Lander (bootleg of Lunar Rescue)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, lrescuem, lrescue, lrescue, lrescue, _8080bw_state, empty_init, ROT270, "bootleg (Model Racing)", "Lunar Rescue (Model Racing bootleg, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) GAME( 1979, lrescuem2, lrescue, lrescuem2, lrescue, _8080bw_state, empty_init, ROT270, "bootleg (Model Racing)", "Lunar Rescue (Model Racing bootleg, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1979, lrescueabl, lrescue, lrescue, lrescue, _8080bw_state, empty_init, ROT270, "bootleg (Artic)", "Lunar Rescue (Artic bootleg)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) GAME( 1979, desterth, lrescue, lrescue, lrescue, _8080bw_state, empty_init, ROT270, "bootleg", "Destination Earth (bootleg of Lunar Rescue)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) GAMEL(1980, escmars, lrescue, escmars, lrescue, _8080bw_state, empty_init, ROT270, "bootleg", "Escape from Mars (bootleg of Lunar Rescue)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_escmars ) GAMEL(1980, resclunar, lrescue, escmars, lrescue, _8080bw_state, empty_init, ROT270, "bootleg (Niemer S.A.)", "Rescate Lunar (Spanish bootleg of Lunar Rescue)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_escmars ) diff --git a/src/mame/misc/hitpoker.cpp b/src/mame/misc/hitpoker.cpp index 84e11965d2f..68bffb39347 100644 --- a/src/mame/misc/hitpoker.cpp +++ b/src/mame/misc/hitpoker.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood, Angelo Salese +// copyright-holders: David Haywood, Angelo Salese + /****************************************************************************** Hit Poker (c) 1997 Accept LTD @@ -15,6 +16,8 @@ Many thanks to Olivier Galibert for the CPU identify effort ;-) - 24Khz monitor isn't supported, it changes the resolution to 648 x 480 and changes the register 9 (raster lines x character lines) from 7 to 0xf. - sound (I've heard something reasonable during tests, so it could be OK); +- convert to memory_view; +- convert to tilemap system. ================================================================================ @@ -44,10 +47,12 @@ Some debug tricks (let's test this CPU as more as possible): #include "emu.h" + #include "cpu/mc68hc11/mc68hc11.h" #include "machine/ds17x85.h" #include "sound/ay8910.h" #include "video/mc6845.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -62,126 +67,133 @@ class hitpoker_state : public driver_device : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_videoram(*this, "videoram", 0x3600, ENDIANNESS_BIG), + m_paletteram(*this, "paletteram", 0x1000, ENDIANNESS_BIG), + m_colorram(*this, "colorram", 0x2000, ENDIANNESS_BIG) { } void hitpoker(machine_config &config); + void reelmtp(machine_config &config); void init_hitpoker(); -private: - uint8_t m_pic_data = 0; - std::unique_ptr m_videoram; - std::unique_ptr m_paletteram; - std::unique_ptr m_colorram; - - uint8_t hitpoker_vram_r(offs_t offset); - void hitpoker_vram_w(offs_t offset, uint8_t data); - uint8_t hitpoker_cram_r(offs_t offset); - void hitpoker_cram_w(offs_t offset, uint8_t data); - uint8_t hitpoker_paletteram_r(offs_t offset); - void hitpoker_paletteram_w(offs_t offset, uint8_t data); - uint8_t hitpoker_pic_r(); - void hitpoker_pic_w(uint8_t data); +protected: + virtual void machine_start() override; virtual void video_start() override; - uint32_t screen_update_hitpoker(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +private: required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; + + memory_share_creator m_videoram; + memory_share_creator m_paletteram; + memory_share_creator m_colorram; + + uint8_t m_pic_data = 0; + + [[maybe_unused]] uint8_t test_r(); + uint8_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint8_t data); + uint8_t cram_r(offs_t offset); + void cram_w(offs_t offset, uint8_t data); + uint8_t paletteram_r(offs_t offset); + void paletteram_w(offs_t offset, uint8_t data); + uint8_t hitpoker_pic_r(); + uint8_t reelmtp_pic_r(); + void pic_w(uint8_t data); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void hitpoker_map(address_map &map); + void reelmtp_map(address_map &map); }; -#define CRTC_CLOCK XTAL(3'579'545) +void hitpoker_state::machine_start() +{ + save_item(NAME(m_pic_data)); +} void hitpoker_state::video_start() { - m_videoram = make_unique_clear(0x3600); - m_paletteram = make_unique_clear(0x1000); - m_colorram = make_unique_clear(0x2000); + // TODO: convert to tilemaps } -uint32_t hitpoker_state::screen_update_hitpoker(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +uint32_t hitpoker_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { int count = 0; - int y,x; bitmap.fill(rgb_t::black(), cliprect); - for (y=0;y<31;y++) + for (int y = 0; y < 31; y++) { - for (x=0;x<81;x++) //it's probably 80 + 1 global line attribute at the start of each line + for (int x = 0; x < 81; x++) // it's probably 80 + 1 global line attribute at the start of each line { - int tile,color,gfx_bpp; + int const tile = (((m_videoram[count] << 8)|(m_videoram[count + 1])) & 0x3fff); + int const gfx_bpp = (m_colorram[count] & 0x80) >> 7; // flag between 4 and 8 bpp + int const color = gfx_bpp ? ((m_colorram[count] & 0x70) >> 4) : (m_colorram[count] & 0xf); - tile = (((m_videoram[count]<<8)|(m_videoram[count+1])) & 0x3fff); - gfx_bpp = (m_colorram[count] & 0x80)>>7; //flag between 4 and 8 bpp - color = gfx_bpp ? ((m_colorram[count] & 0x70)>>4) : (m_colorram[count] & 0xf); + m_gfxdecode->gfx(gfx_bpp)->opaque(bitmap, cliprect, tile, color, 0, 0, x * 8, y * 8); - m_gfxdecode->gfx(gfx_bpp)->opaque(bitmap,cliprect,tile,color,0,0,x*8,y*8); - - count+=2; + count += 2; } } return 0; } -uint8_t hitpoker_state::hitpoker_vram_r(offs_t offset) +uint8_t hitpoker_state::vram_r(offs_t offset) { uint8_t *ROM = memregion("maincpu")->base(); - if(m_pic_data & 0x10) + if (m_pic_data & 0x10) return m_videoram[offset]; else - return ROM[offset+0x8000]; + return ROM[offset + 0x8000]; } -void hitpoker_state::hitpoker_vram_w(offs_t offset, uint8_t data) +void hitpoker_state::vram_w(offs_t offset, uint8_t data) { -// uint8_t *ROM = memregion("maincpu")->base(); - -// if(m_sys_regs[0x00] & 0x10) m_videoram[offset] = data; } -uint8_t hitpoker_state::hitpoker_cram_r(offs_t offset) +uint8_t hitpoker_state::cram_r(offs_t offset) { uint8_t *ROM = memregion("maincpu")->base(); - if(m_pic_data & 0x10) + if (m_pic_data & 0x10) return m_colorram[offset]; else - return ROM[offset+0xc000]; + return ROM[offset + 0xc000]; } -void hitpoker_state::hitpoker_cram_w(offs_t offset, uint8_t data) +void hitpoker_state::cram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; } -uint8_t hitpoker_state::hitpoker_paletteram_r(offs_t offset) +uint8_t hitpoker_state::paletteram_r(offs_t offset) { uint8_t *ROM = memregion("maincpu")->base(); - if(m_pic_data & 0x10) + if (m_pic_data & 0x10) return m_paletteram[offset]; else - return ROM[offset+0xe000]; + return ROM[offset + 0xe000]; } -void hitpoker_state::hitpoker_paletteram_w(offs_t offset, uint8_t data) +void hitpoker_state::paletteram_w(offs_t offset, uint8_t data) { - int r,g,b,datax; m_paletteram[offset] = data; - offset>>=1; - datax=256*m_paletteram[offset*2]+m_paletteram[offset*2+1]; + offset >>= 1; + int const datax = 256 * m_paletteram[offset * 2] + m_paletteram[offset * 2 + 1]; - /* RGB565 */ - b = ((datax)&0xf800)>>11; - g = ((datax)&0x07e0)>>5; - r = ((datax)&0x001f)>>0; + // RGB565 + int const b = (datax & 0xf800) >> 11; + int const g = (datax & 0x07e0) >> 5; + int const r = (datax & 0x001f) >> 0; m_palette->set_pen_color(offset, pal5bit(r), pal6bit(g), pal5bit(b)); } @@ -189,9 +201,9 @@ void hitpoker_state::hitpoker_paletteram_w(offs_t offset, uint8_t data) uint8_t hitpoker_state::hitpoker_pic_r() { -// logerror("R\n"); + // logerror("%s PIC R\n", machine().describe_context()); - if(m_maincpu->pc() == 0x3143 || + if (m_maincpu->pc() == 0x3143 || m_maincpu->pc() == 0x314e || m_maincpu->pc() == 0x3164 || m_maincpu->pc() == 0x3179) @@ -200,26 +212,39 @@ uint8_t hitpoker_state::hitpoker_pic_r() return (m_pic_data & 0x7f) | (m_pic_data & 0x40 ? 0x80 : 0x00); } -void hitpoker_state::hitpoker_pic_w(uint8_t data) +uint8_t hitpoker_state::reelmtp_pic_r() // TODO: is this really a PIC or is it internal to the custom MCU? +{ + // logerror("%s PIC R\n", machine().describe_context()); + + // TODO: + + if (m_maincpu->pc() == 0x471d || + m_maincpu->pc() == 0x4728 || + m_maincpu->pc() == 0x473e || + m_maincpu->pc() == 0x4753) + return m_pic_data; + + return (m_pic_data & 0x7f) | (m_pic_data & 0x40 ? 0x80 : 0x00); +} + +void hitpoker_state::pic_w(uint8_t data) { - m_pic_data = (data & 0xff);// | (data & 0x40) ? 0x80 : 0x00; -// logerror("%02x W\n",data); + m_pic_data = data; // | (data & 0x40) ? 0x80 : 0x00; + // logerror("%02x PIC W\n", data); } -#if 0 uint8_t hitpoker_state::test_r() { return machine().rand(); } -#endif -/* overlap empty rom addresses */ +// overlap empty ROM addresses void hitpoker_state::hitpoker_map(address_map &map) { map(0x0000, 0xb5ff).rom(); map(0xbf00, 0xffff).rom(); - map(0x8000, 0xb5ff).rw(FUNC(hitpoker_state::hitpoker_vram_r), FUNC(hitpoker_state::hitpoker_vram_w)); + map(0x8000, 0xb5ff).rw(FUNC(hitpoker_state::vram_r), FUNC(hitpoker_state::vram_w)); map(0xb800, 0xbdff).ram(); map(0xbe00, 0xbe7f).rw("rtc", FUNC(ds17x85_device::read_direct), FUNC(ds17x85_device::write_direct)); map(0xbe80, 0xbe80).w("crtc", FUNC(mc6845_device::address_w)); @@ -227,8 +252,26 @@ void hitpoker_state::hitpoker_map(address_map &map) map(0xbe90, 0xbe91).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); map(0xbea0, 0xbea0).portr("VBLANK"); //probably other bits as well // map(0xbe00, 0xbeff).r(FUNC(hitpoker_state::test_r)); - map(0xc000, 0xdfff).rw(FUNC(hitpoker_state::hitpoker_cram_r), FUNC(hitpoker_state::hitpoker_cram_w)); - map(0xe000, 0xefff).rw(FUNC(hitpoker_state::hitpoker_paletteram_r), FUNC(hitpoker_state::hitpoker_paletteram_w)); + map(0xc000, 0xdfff).rw(FUNC(hitpoker_state::cram_r), FUNC(hitpoker_state::cram_w)); + map(0xe000, 0xefff).rw(FUNC(hitpoker_state::paletteram_r), FUNC(hitpoker_state::paletteram_w)); +} + +void hitpoker_state::reelmtp_map(address_map &map) +{ + map(0x0100, 0x07ff).ram(); + map(0x0800, 0xb7ff).rom(); + map(0xb900, 0xffff).rom(); + + map(0x8000, 0xb5ff).rw(FUNC(hitpoker_state::vram_r), FUNC(hitpoker_state::vram_w)); + map(0xb800, 0xb87f).rw("rtc", FUNC(ds17x85_device::read_direct), FUNC(ds17x85_device::write_direct)); + map(0xb880, 0xb880).w("crtc", FUNC(mc6845_device::address_w)); + map(0xb881, 0xb881).w("crtc", FUNC(mc6845_device::register_w)); + map(0xb890, 0xb891).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); + map(0xb8a0, 0xb8a0).portr("VBLANK"); + //map(0xb8c1, 0xb8c1).w // TODO + //map(0xb8e1, 0xb8e1).w // TODO + map(0xc000, 0xdfff).rw(FUNC(hitpoker_state::cram_r), FUNC(hitpoker_state::cram_w)); + //map(0xe000, 0xefff).rw(FUNC(hitpoker_state::paletteram_r), FUNC(hitpoker_state::paletteram_w)); } static INPUT_PORTS_START( hitpoker ) @@ -236,22 +279,22 @@ static INPUT_PORTS_START( hitpoker ) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) //resets the game? + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) // resets the game? PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) //"permanent ram initialized" if combined with the reset switch + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) // "permanent ram initialized" if combined with the reset switch PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "H-Blank" ) //scanline counter probably + PORT_DIPNAME( 0x20, 0x20, "H-Blank" ) // scanline counter probably PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Monitor" ) //a JP probably + PORT_DIPNAME( 0x40, 0x40, "Monitor" ) // a JP probably PORT_DIPSETTING( 0x40, "15KHz" ) PORT_DIPSETTING( 0x00, "24KHz" ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") @@ -309,6 +352,16 @@ static INPUT_PORTS_START( hitpoker ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END +// TODO: complete, currently just the bare minimum to make it show something +static INPUT_PORTS_START( reelmtp ) + PORT_INCLUDE( hitpoker ) + + PORT_MODIFY("VBLANK") // these 2 seem inverted wrt hitpoker + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") + PORT_DIPNAME( 0x80, 0x80, "H-Blank" ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END static const gfx_layout hitpoker_layout_4bpp = { @@ -333,8 +386,8 @@ static const gfx_layout hitpoker_layout_8bpp = }; static GFXDECODE_START( gfx_hitpoker ) - GFXDECODE_ENTRY( "gfx1", 0, hitpoker_layout_4bpp, 0, 0x100 ) - GFXDECODE_ENTRY( "gfx1", 0, hitpoker_layout_8bpp, 0, 8 ) + GFXDECODE_ENTRY( "tiles", 0, hitpoker_layout_4bpp, 0, 0x100 ) + GFXDECODE_ENTRY( "tiles", 0, hitpoker_layout_8bpp, 0, 8 ) GFXDECODE_END void hitpoker_state::hitpoker(machine_config &config) @@ -342,47 +395,58 @@ void hitpoker_state::hitpoker(machine_config &config) MC68HC11A1(config, m_maincpu, 8'000'000); m_maincpu->set_addrmap(AS_PROGRAM, &hitpoker_state::hitpoker_map); m_maincpu->in_pa_callback().set(FUNC(hitpoker_state::hitpoker_pic_r)); - m_maincpu->out_pa_callback().set(FUNC(hitpoker_state::hitpoker_pic_w)); + m_maincpu->out_pa_callback().set(FUNC(hitpoker_state::pic_w)); m_maincpu->in_pe_callback().set_constant(0); ds17x85_device &rtc(DS17487(config, "rtc", 32768)); rtc.irq().set_inputline(m_maincpu, MC68HC11_IRQ_LINE); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate - screen.set_size(648, 480); //setted by the CRTC + screen.set_size(648, 480); // set by the CRTC screen.set_visarea(0, 648-1, 0, 240-1); - screen.set_screen_update(FUNC(hitpoker_state::screen_update_hitpoker)); + screen.set_screen_update(FUNC(hitpoker_state::screen_update)); - hd6845s_device &crtc(HD6845S(config, "crtc", CRTC_CLOCK/2)); /* hand tuned to get ~60 fps */ + hd6845s_device &crtc(HD6845S(config, "crtc", XTAL(3'579'545) / 2)); // hand tuned to get ~60 FPS crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); - //crtc.out_vsync_callback().set(FUNC(hitpoker_state::hitpoker_irq)); + //crtc.out_vsync_callback().set(FUNC(hitpoker_state::irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_hitpoker); PALETTE(config, m_palette).set_entries(0x800); SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 1500000)); + ym2149_device &aysnd(YM2149(config, "aysnd", 1'500'000)); aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); } +void hitpoker_state::reelmtp(machine_config &config) +{ + hitpoker(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &hitpoker_state::reelmtp_map); + m_maincpu->in_pa_callback().set(FUNC(hitpoker_state::reelmtp_pic_r)); + // TODO: there's only one 25.175 MHz XTAL. Adjust clocks + + // TODO: RAMDAC +} + void hitpoker_state::init_hitpoker() { uint8_t *ROM = memregion("maincpu")->base(); - ROM[0x1220] = 0x01; //patch eeprom write? + ROM[0x1220] = 0x01; // patch EEPROM write? ROM[0x1221] = 0x01; ROM[0x1222] = 0x01; ROM[0x10c6] = 0x01; - ROM[0x10c7] = 0x01; //patch the checksum routine + ROM[0x10c7] = 0x01; // patch the checksum routine // must match RTC serial number } @@ -401,14 +465,44 @@ ROM_START( hitpoker ) ROM_REGION( 0x10000, "pic", 0 ) ROM_LOAD( "pic", 0x00000, 0x1000, NO_DUMP ) // unknown type - ROM_REGION( 0x100000, "gfx1", 0 ) // tile 0x4c8 seems to contain something non-gfx related, could be tilemap / colour data, check! + ROM_REGION( 0x100000, "tiles", 0 ) // tile 0x4c8 seems to contain something non-gfx related, could be tilemap / colour data, check! ROM_LOAD16_BYTE( "u42.bin", 0x00001, 0x40000, CRC(cbe56fec) SHA1(129bfd10243eaa7fb6a087f96de90228e6030353) ) ROM_LOAD16_BYTE( "u43.bin", 0x00000, 0x40000, CRC(6c0d4283) SHA1(04a4fd82f5cc0ed9f548e490ac67d287227073c3) ) ROM_LOAD16_BYTE( "u44.bin", 0x80001, 0x40000, CRC(e23d5f30) SHA1(ca8855301528aa4eeff40cb820943b4268f8596e) ) // the 'adult images' are 8bpp ROM_LOAD16_BYTE( "u45.bin", 0x80000, 0x40000, CRC(e65b3e52) SHA1(c0c1a360a4a1823bf71c0a4105ff41f4102862e8) ) // the first part of these 2 is almost empty as the standard gfx are 4bpp ROM_END +// PCB features Motorola SC80566FN (custom MC68HC11 based MCU), 25.175 MHz XTAL, YM2149F, DS17487-5 RTC, MC6845P CRTC, ADV471KP50E RAMDAC, 1 4-DIP bank +// Can't spot any PIC. +ROM_START( reelmtp ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "u12.bin", 0x00000, 0x10000, CRC(b613a0e1) SHA1(071f36b88261a44d82ef0322ddf12502ffacf998) ) // 27C512 + + ROM_REGION( 0x200, "maincpu:eeprom", ROMREGION_ERASEFF ) + // must match RTC serial number. TODO! + ROM_FILL( 0x003, 1, 0x4d ) + ROM_FILL( 0x002, 1, 0x41 ) + ROM_FILL( 0x001, 1, 0x4d ) + ROM_FILL( 0x000, 1, 0x45 ) + + // TODO: bigger than what MAME expects for this RTC model? + ROM_REGION( 0x1100, "rtc_dump", 0 ) + ROM_LOAD( "ds17487-5.u14", 0x0000, 0x1100, CRC(bffb8967) SHA1(28276f01c114c477a0c022b17d250c4952922625) ) + + ROM_REGION( 0x180000, "tiles", 0 ) // TODO: wrong loading / decode + ROM_LOAD( "u40.bin", 0x000000, 0x40000, CRC(cbac4a12) SHA1(01133620ba5b3bb02712d30356d003b748315258) ) // M27C2001 + // 0x40000 - 07ffff? + ROM_LOAD( "u41.bin", 0x080000, 0x80000, CRC(17c57221) SHA1(1a3cd5a5a3d7736fc50d605da98667a3efa7cd3c) ) // 27C040 + ROM_LOAD( "u42.bin", 0x100000, 0x80000, CRC(30f31d9e) SHA1(4637e04e647ae3fc6b93093ae7468fefdcc355cc) ) // 27C040 + + ROM_REGION( 0x600, "plds", ROMREGION_ERASE00 ) + ROM_LOAD( "palce16v8h.u10", 0x000, 0x117, CRC(75ab49ba) SHA1(9060d59e92df0c6ed7b5041a98bb4ab5759e7d62) ) + ROM_LOAD( "palce16v8h.2", 0x200, 0x117, NO_DUMP ) // U location no readable, but just over the above one + ROM_LOAD( "pal.u26", 0x400, 0x117, NO_DUMP ) // scratched, can't read type +ROM_END + } // anonymous namespace -GAME( 1997, hitpoker, 0, hitpoker, hitpoker, hitpoker_state, init_hitpoker, ROT0, "Accept Ltd.", "Hit Poker (Bulgaria)", MACHINE_NOT_WORKING ) +GAME( 1997, hitpoker, 0, hitpoker, hitpoker, hitpoker_state, init_hitpoker, ROT0, "Accept Ltd.", "Hit Poker (Bulgaria)", MACHINE_NOT_WORKING ) +GAME( 1999, reelmtp, 0, reelmtp, reelmtp, hitpoker_state, empty_init, ROT0, "Accept Ltd.", "Reel Magic Turbo Play", MACHINE_NOT_WORKING ) From c7819060c5defb16bddfababd4cf7d01bfcebd7c Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 28 Aug 2024 18:05:46 +0200 Subject: [PATCH 22/44] pc/ct486.cpp: remove unnecessary palette_device --- src/mame/pc/README.md | 4 ++-- src/mame/pc/ct486.cpp | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mame/pc/README.md b/src/mame/pc/README.md index ea9e4fcc428..50997452708 100644 --- a/src/mame/pc/README.md +++ b/src/mame/pc/README.md @@ -1,3 +1,3 @@ -# **src/mame/pc** # +# **src/mame/pc** -Generic folder with MAME drivers for IBM PC, PC compatibles, or PC-based arcade hardware. \ No newline at end of file +Generic folder with MAME drivers for IBM PC, PC compatibles, or PC-based arcade hardware. diff --git a/src/mame/pc/ct486.cpp b/src/mame/pc/ct486.cpp index 77dd93dd360..501b5b11882 100644 --- a/src/mame/pc/ct486.cpp +++ b/src/mame/pc/ct486.cpp @@ -182,9 +182,6 @@ void ct486_state::ct486(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - // video hardware - PALETTE(config, "palette").set_entries(256); // todo: really needed? - /* software lists */ SOFTWARE_LIST(config, "pc_disk_list").set_original("ibm5150"); SOFTWARE_LIST(config, "at_disk_list").set_original("ibm5170"); From f37e830fc2b5a497e5efb9b54abb01610e643975 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 28 Aug 2024 18:07:04 +0200 Subject: [PATCH 23/44] pc/champ2.cpp: correct ROM disk bank granularity --- src/mame/pc/champ2.cpp | 55 ++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/src/mame/pc/champ2.cpp b/src/mame/pc/champ2.cpp index c079906a30e..7f93c60e403 100644 --- a/src/mame/pc/champ2.cpp +++ b/src/mame/pc/champ2.cpp @@ -9,8 +9,8 @@ Dump contains a MS-DOS 3.3 ROM disk, ebay auction shows a Pine Technology PT-319 (SARC RC2016A5 chipset) + 2 other populated ISA16 cards out of 6. TODO: -- Jumps in unpopulated RAM area as soon as it banks (PC=ca029 -> 0000:36AF), area may be -multibanked instead; +- Does extensive checks to COM1, towards what it claims to be `mtv1` (MicroTouch?) +- ROM disk banking incomplete, meaning of $ca000 writes unknown; **************************************************************************************************/ @@ -36,7 +36,7 @@ class champ2_state : public driver_device , m_maincpu(*this, "maincpu") , m_mb(*this, "mb") , m_ram(*this, "ram") - , m_bank(*this, "bank") + , m_bank(*this, "bank%u", 0U) { } void champ2(machine_config &config); @@ -51,12 +51,10 @@ class champ2_state : public driver_device required_device m_maincpu; required_device m_mb; required_device m_ram; - required_device m_bank; + required_device_array m_bank; void bank_map(address_map &map); void main_io(address_map &map); void main_map(address_map &map); - - bool m_unlock_bank = false; }; @@ -64,18 +62,20 @@ void champ2_state::main_map(address_map &map) { map(0x000000, 0x09ffff).bankrw("bank10"); // Selectable thru jumpers (0xc800, 0xd000, 0xd800, 0xe000) - map(0x0c8000, 0x0cffff).m(m_bank, FUNC(address_map_bank_device::amap8)); + map(0x0c8000, 0x0c9fff).m(m_bank[0], FUNC(address_map_bank_device::amap8)); + map(0x0ca000, 0x0cbfff).m(m_bank[1], FUNC(address_map_bank_device::amap8)); // writes to $+2000 then $+0000, same value (0x03) at POST, // then writes 0 to $+2000 and N to $+0000 map(0x0c8000, 0x0c8000).lw8( NAME([this] (offs_t offset, u8 data) { - if (m_unlock_bank) - m_bank->set_bank(data & 0x1f); + logerror("$c8000 bank %02x\n", data); + m_bank[1]->set_bank(data & 0x7f); }) ); map(0x0ca000, 0x0ca000).lw8( NAME([this] (offs_t offset, u8 data) { - m_unlock_bank = data == 0; + logerror("$ca000 bank %02x\n", data); + //m_bank[0]->set_bank(data & 0x7f); }) ); map(0x0e0000, 0x0fffff).rom().region("bios", 0); @@ -86,6 +86,7 @@ void champ2_state::main_io(address_map &map) { map.global_mask(0x3ff); map(0x0000, 0x00ff).m(m_mb, FUNC(at_mb_device::map)); + map(0x0200, 0x0201).portr("GAME"); } @@ -95,6 +96,33 @@ void champ2_state::bank_map(address_map &map) } static INPUT_PORTS_START( champ2 ) + PORT_START("GAME") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x0100, 0x0100, "GAME" ) + 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 ) ) + // punts with "terminated - illegal" if any of these two are low + 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 void champ2_state::machine_start() @@ -103,8 +131,8 @@ void champ2_state::machine_start() void champ2_state::machine_reset() { - m_bank->set_bank(0); - m_unlock_bank = false; + m_bank[0]->set_bank(0); + m_bank[1]->set_bank(0); } @@ -134,7 +162,8 @@ void champ2_state::champ2(machine_config &config) RAM(config, m_ram).set_default_size("15M").set_extra_options("640K,1024K,1664K,2M,4M,8M,15M"); - ADDRESS_MAP_BANK(config, m_bank).set_map(&champ2_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 20, 0x8000); + for (auto bank : m_bank) + ADDRESS_MAP_BANK(config, bank).set_map(&champ2_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 20, 0x2000); } From 10ec939ff3422774b1cd63a7c94da3383ae3c812 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 29 Aug 2024 02:39:11 +1000 Subject: [PATCH 24/44] bus/nubus/nubus_specpdq.cpp: Added comment about issue with Apple RGB monitor. Also tidied up a few things. --- src/devices/bus/a2bus/a2wico_trackball.cpp | 6 +++--- src/devices/bus/nubus/nubus_specpdq.cpp | 14 +++++++++----- src/mame/hp/hp98x6.cpp | 14 +++++++------- src/mame/hp/hp98x6_optrom.cpp | 19 +++++++++++-------- src/mame/konami/k052109.cpp | 10 +++++----- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/devices/bus/a2bus/a2wico_trackball.cpp b/src/devices/bus/a2bus/a2wico_trackball.cpp index c74edac917b..b2c266149e7 100644 --- a/src/devices/bus/a2bus/a2wico_trackball.cpp +++ b/src/devices/bus/a2bus/a2wico_trackball.cpp @@ -137,7 +137,7 @@ void a2bus_wicotrackball_device::device_reset() uint8_t a2bus_wicotrackball_device::read_position(int axis) { int const speed_scale = 1 << (m_speed[0] + m_speed[1] * 2); - int const cur_pos = m_wicotrackballxy[axis]->read(); + int const cur_pos = m_wicotrackballxy[axis]->read(); uint8_t result = 0; if (m_last_pos[axis] != WICOTRACKBALL_POS_UNINIT) { @@ -195,7 +195,7 @@ uint8_t a2bus_wicotrackball_device::read_c0nx(uint8_t offset) case 0x6: /* read buttons */ data = m_buttons = m_wicotrackballb->read(); break; - } + } return data; } @@ -232,7 +232,7 @@ void a2bus_wicotrackball_device::write_c0nx(uint8_t offset, uint8_t data) case 0x7: /* set Speed 3/4 Soft Switch to Speed 4 */ m_speed[1] = true; break; - } + } } } // anonymous namespace diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index bdd4d0df38c..6b06faa1b4b 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -327,11 +327,15 @@ void nubus_specpdq_device::update_crtc() // for some reason you temporarily get invalid screen parameters - ignore them if (m_crtc.valid(*this)) { - rectangle active( - m_crtc.h_start(16) + (m_hdelay * 4), - m_crtc.h_end(16) - (m_hadjust - (m_hdelay * 4)) - 1, - m_crtc.v_start(), - m_crtc.v_end() - 1); + // FIXME: there's still something missing in the active width calculation + // With the Apple RGB (640*480) monitor selected, the active width is 16 pixels + // too wide in black and white mode, and 16 pixels too narrow in greyscale or + // colour modes. + rectangle const active( + m_crtc.h_start(16) + (m_hdelay * 4), + m_crtc.h_end(16) + (m_hdelay * 4) - m_hadjust - 1, + m_crtc.v_start(), + m_crtc.v_end() - 1); screen().configure( m_crtc.h_total(16), diff --git a/src/mame/hp/hp98x6.cpp b/src/mame/hp/hp98x6.cpp index c1f04569d50..0408bcd7bef 100644 --- a/src/mame/hp/hp98x6.cpp +++ b/src/mame/hp/hp98x6.cpp @@ -185,7 +185,7 @@ void hp98x6_base_state::machine_start() space->install_ram(0x1000000 - m_ram->size(), 0xffffff, m_ram->pointer()); - for (auto& finder : m_rom_drawers) { + for (auto &finder : m_rom_drawers) { finder->install_handlers(space); } } @@ -241,7 +241,7 @@ void hp98x6_base_state::hp98x6_base(machine_config &config, unsigned dot_clock, IEEE488_SLOT(config, "ieee_rem", 0, remote488_devices, nullptr); // Optional ROM slots - for (auto& finder : m_rom_drawers) { + for (auto &finder : m_rom_drawers) { HP98X6_OPTROM(config, finder); } @@ -2069,8 +2069,8 @@ ROM_END } // anonymous namespace -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP(1982, hp9816a, 0, 0, hp9816, hp9816, hp9816_state,empty_init, "Hewlett-Packard", "HP 9816A", 0) -COMP(1981, hp9826a, 0, 0, hp9826, hp9826_36,hp9826_state,empty_init,"Hewlett-Packard","HP 9826A", 0) -COMP(1981, hp9836a, 0, 0, hp9836, hp9836, hp9836_state,empty_init, "Hewlett-Packard", "HP 9836A", 0) -COMP(1983, hp9836c, 0, 0, hp9836c,hp9836, hp9836c_state,empty_init,"Hewlett-Packard", "HP 9836C", 0) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP(1982, hp9816a, 0, 0, hp9816, hp9816, hp9816_state,empty_init, "Hewlett-Packard", "HP 9816A", 0) +COMP(1981, hp9826a, 0, 0, hp9826, hp9826_36,hp9826_state,empty_init, "Hewlett-Packard", "HP 9826A", 0) +COMP(1981, hp9836a, 0, 0, hp9836, hp9836, hp9836_state,empty_init, "Hewlett-Packard", "HP 9836A", 0) +COMP(1983, hp9836c, 0, 0, hp9836c,hp9836, hp9836c_state,empty_init,"Hewlett-Packard", "HP 9836C", 0) diff --git a/src/mame/hp/hp98x6_optrom.cpp b/src/mame/hp/hp98x6_optrom.cpp index 6bc6ac06385..7d11aa2bbbe 100644 --- a/src/mame/hp/hp98x6_optrom.cpp +++ b/src/mame/hp/hp98x6_optrom.cpp @@ -16,18 +16,21 @@ #define VERBOSE 0 #include "logmacro.h" -DEFINE_DEVICE_TYPE(HP98X6_OPTROM, hp98x6_optrom_device, "hp98x6_optrom", "HP98x6 optional ROM") +namespace { struct optrom_region { offs_t m_start; const char *m_tag; }; -constexpr std::array region_tab = - {{ - { 0x100000, "rom100000" }, - { 0x80000, "rom80000" } - }}; +constexpr std::array region_tab = {{ + { 0x100000, "rom100000" }, + { 0x080000, "rom80000" } +}}; + +} // anonymous namespace + +DEFINE_DEVICE_TYPE(HP98X6_OPTROM, hp98x6_optrom_device, "hp98x6_optrom", "HP98x6 optional ROM") // +--------------------+ // |hp98x6_optrom_device| @@ -52,7 +55,7 @@ void hp98x6_optrom_device::install_handlers(address_space *space_r) { m_space_r = space_r; - for (const struct optrom_region& reg : region_tab) { + for (const struct optrom_region ® : region_tab) { uint8_t *ptr = get_software_region(reg.m_tag); if (ptr != nullptr) { auto len = get_software_region_length(reg.m_tag); @@ -80,7 +83,7 @@ void hp98x6_optrom_device::call_unload() { LOG("hp98x6_optrom: call_unload\n"); if (m_space_r != nullptr) { - for (const struct optrom_region& reg : region_tab) { + for (const struct optrom_region ® : region_tab) { auto len = get_software_region_length(reg.m_tag); if (len != 0) { m_space_r->unmap_read(reg.m_start , reg.m_start + len - 1); diff --git a/src/mame/konami/k052109.cpp b/src/mame/konami/k052109.cpp index 607d396ad11..e45e9e264d9 100644 --- a/src/mame/konami/k052109.cpp +++ b/src/mame/konami/k052109.cpp @@ -516,11 +516,11 @@ void k052109_device::tilemap_update( ) #if 0 popmessage("%x %x %x %x", - m_charrombank[0], - m_charrombank[1], - m_charrombank[2], - m_charrombank[3]); - // popmessage("%x",m_addrmap); + m_charrombank[0], + m_charrombank[1], + m_charrombank[2], + m_charrombank[3]); + //popmessage("%x",m_addrmap); #endif // note: this chip can do both per-column and per-row scroll in the same time, currently not emulated. From 3b4b6eee1cdb8124eba2fa06841df8e7ca306a8c Mon Sep 17 00:00:00 2001 From: Michael Sanborn <95501796+mikehyrus@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:45:28 -0600 Subject: [PATCH 25/44] Fixed a number of places where comments said "complaint" when they meant "compliant". (#12697) --- src/devices/bus/pci/pdc20262.cpp | 2 +- src/devices/machine/sis7018_audio.cpp | 2 +- src/devices/machine/sis950_lpc.cpp | 2 +- src/mame/konami/viper.cpp | 4 ++-- src/mame/nec/pce_cd.cpp | 2 +- src/mame/pc/sis630.cpp | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/devices/bus/pci/pdc20262.cpp b/src/devices/bus/pci/pdc20262.cpp index f2655815a74..83e051684c3 100644 --- a/src/devices/bus/pci/pdc20262.cpp +++ b/src/devices/bus/pci/pdc20262.cpp @@ -4,7 +4,7 @@ Promise PDC20262 FastTrak66/UDMA66 IDE controller -No documentation, ATA4 complaint +No documentation, ATA4 compliant TODO: - how it sets compatible/native modes? Subvendor ID list suggests it can switch at will; diff --git a/src/devices/machine/sis7018_audio.cpp b/src/devices/machine/sis7018_audio.cpp index afcbfb13efd..67ac73597c5 100644 --- a/src/devices/machine/sis7018_audio.cpp +++ b/src/devices/machine/sis7018_audio.cpp @@ -2,7 +2,7 @@ // copyright-holders: Angelo Salese /************************************************************************************************** -SiS 7018 Audio device (AC97 complaint) +SiS 7018 Audio device (AC97 compliant) TODO: - Stub interface, to be improved; diff --git a/src/devices/machine/sis950_lpc.cpp b/src/devices/machine/sis950_lpc.cpp index 2cac38194fa..3bc81dd9b2d 100644 --- a/src/devices/machine/sis950_lpc.cpp +++ b/src/devices/machine/sis950_lpc.cpp @@ -430,7 +430,7 @@ void sis950_lpc_device::io_map(address_map &map) map(0x0060, 0x0060).rw(m_keybc, FUNC(ps2_keyboard_controller_device::data_r), FUNC(ps2_keyboard_controller_device::data_w)); // map(0x0061, 0x0061) NMI Status Register map(0x0061, 0x0061).rw(FUNC(sis950_lpc_device::nmi_status_r), FUNC(sis950_lpc_device::nmi_control_w)); - // undocumented but read, assume LPC complaint + // undocumented but read, assume LPC compliant map(0x0064, 0x0064).rw(m_keybc, FUNC(ps2_keyboard_controller_device::status_r), FUNC(ps2_keyboard_controller_device::command_w)); // map(0x0070, 0x0070) CMOS and NMI Mask map(0x0070, 0x0070).w(FUNC(sis950_lpc_device::rtc_index_w)); diff --git a/src/mame/konami/viper.cpp b/src/mame/konami/viper.cpp index e4c9771e86a..727a203bff8 100644 --- a/src/mame/konami/viper.cpp +++ b/src/mame/konami/viper.cpp @@ -82,9 +82,9 @@ ds2430. - Voodoo 3 has issues with LOD minimums, cfr. mocapglf where card check don't display a bar near the percentage; - - convert i2c to be a real i2c-complaint device; + - convert i2c to be a real i2c-compliant device; - hookup adc0838, reads from i2c; - - convert epic to be a device, make it input_merger/irq_callback complaint; + - convert epic to be a device, make it input_merger/irq_callback compliant; - (more intermediate steps for proper PCI conversions here) - jpark3: attract mode demo play acts weird, the dinosaur gets submerged and camera doesn't really know what to do, CPU core bug? diff --git a/src/mame/nec/pce_cd.cpp b/src/mame/nec/pce_cd.cpp index 87ec67f3018..f62b8861664 100644 --- a/src/mame/nec/pce_cd.cpp +++ b/src/mame/nec/pce_cd.cpp @@ -23,7 +23,7 @@ PC Engine CD HW sub-portion: - Audio CD player rewind/fast forward don't work properly \- never go past 1 minute mark, underflows; - Fader feature is sketchy and unchecked against real HW; -- Implement proper check condition errors (non-SCSI complaint); +- Implement proper check condition errors (non-SCSI compliant); **************************************************************************************************/ diff --git a/src/mame/pc/sis630.cpp b/src/mame/pc/sis630.cpp index 8772064370a..eb2640baef1 100644 --- a/src/mame/pc/sis630.cpp +++ b/src/mame/pc/sis630.cpp @@ -10,8 +10,8 @@ TODO (main): \- fan monitor, cfr. I/O $294 reads in shutms11 BIOS fan tests; \- FDC doesn't work, moans on first boot; - '900 Ethernet PXE (missing ROM dump); -- USB controllers (OpenHCI complaint); -- ACPI is not fully lpc-acpi complaint; +- USB controllers (OpenHCI compliant); +- ACPI is not fully lpc-acpi compliant; - EISA slots; - SMBus; - PS/2 mouse is unstable, worked around by disabling and using a serial mouse instead. @@ -316,7 +316,7 @@ void sis630_state::sis630(machine_config &config) serport1.ri_handler().set("superio:it8705f", FUNC(it8705f_device::nri2_w)); serport1.cts_handler().set("superio:it8705f", FUNC(it8705f_device::ncts2_w)); - // TODO: AMR (Audio/modem riser) + UPT (Panel Link-TV out), assume [E]ISA complaint, needs specific slot options + // TODO: AMR (Audio/modem riser) + UPT (Panel Link-TV out), assume [E]ISA compliant, needs specific slot options // ISA16_SLOT(config, "isa1", 0, "pci:01.0:isabus", pc_isa16_cards, nullptr, false); // ISA16_SLOT(config, "isa2", 0, "pci:01.0:isabus", pc_isa16_cards, nullptr, false); } From 8e9c32288ed83f69c37f8943658cc4fab00b276a Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 28 Aug 2024 18:54:14 +0200 Subject: [PATCH 26/44] New systems marked not working ------------------------------ Fever 13 (v1.3) [hammy] --- src/mame/excellent/lastbank.cpp | 87 ++++++++++++++++++++++++--------- src/mame/mame.lst | 1 + 2 files changed, 64 insertions(+), 24 deletions(-) diff --git a/src/mame/excellent/lastbank.cpp b/src/mame/excellent/lastbank.cpp index 0f80c608bac..855b0d502fe 100644 --- a/src/mame/excellent/lastbank.cpp +++ b/src/mame/excellent/lastbank.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:Angelo Salese +// copyright-holders: Angelo Salese + /*************************************************************************** Last Bank (c) 1994 Excellent System @@ -15,25 +16,29 @@ * Miracle Seven - Heaven's Gate Turbo * Ukiyo Box + + TODO: + fever13: inputs / dips once the GFX ROM is dumped. Dips are helpfully + shown at startup ***************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" -#include "sound/es8712.h" -#include "sound/okim6295.h" -#include "sound/ymopn.h" #include "machine/gen_latch.h" #include "machine/nvram.h" #include "machine/tc009xlvc.h" #include "machine/timer.h" +#include "sound/es8712.h" +#include "sound/okim6295.h" +#include "sound/ymopn.h" + #include "screen.h" #include "speaker.h" namespace { -#define MASTER_CLOCK XTAL(14'318'181) - class lastbank_state : public driver_device { public: @@ -45,6 +50,7 @@ class lastbank_state : public driver_device { } void lastbank(machine_config &config); + void fever13(machine_config &config); DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); @@ -56,11 +62,11 @@ class lastbank_state : public driver_device required_device m_oki; required_device m_essnd; - void screen_vblank(int state); - uint8_t m_mux_data = 0; uint8_t m_sound_flags = 0; + void screen_vblank(int state); + void output_w(offs_t offset, uint8_t data); uint8_t mux_0_r(); @@ -69,8 +75,9 @@ class lastbank_state : public driver_device TIMER_DEVICE_CALLBACK_MEMBER(irq_scanline); void lastbank_audio_io(address_map &map); - void lastbank_audio_map(address_map &map); - void lastbank_map(address_map &map); + void fever13_audio_io(address_map &map); + void audio_program_map(address_map &map); + void main_program_map(address_map &map); void tc0091lvc_map(address_map &map); }; @@ -156,7 +163,7 @@ void lastbank_state::tc0091lvc_map(address_map &map) map(0xff08, 0xff08).rw(m_maincpu, FUNC(tc0091lvc_device::rom_bank_r), FUNC(tc0091lvc_device::rom_bank_w)); } -void lastbank_state::lastbank_map(address_map &map) +void lastbank_state::main_program_map(address_map &map) { tc0091lvc_map(map); map(0xa000, 0xa00d).noprw(); // MSM62X42B or equivalent probably read from here @@ -175,7 +182,7 @@ void lastbank_state::lastbank_map(address_map &map) map(0xa81f, 0xa81f).portr("DSW3"); } -void lastbank_state::lastbank_audio_map(address_map &map) +void lastbank_state::audio_program_map(address_map &map) { map(0x0000, 0xbfff).rom(); map(0xc000, 0xdfff).ram(); @@ -187,11 +194,18 @@ void lastbank_state::lastbank_audio_io(address_map &map) map.global_mask(0xff); map(0x00, 0x06).rw(m_essnd, FUNC(es8712_device::read), FUNC(es8712_device::write)); map(0x40, 0x40).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x80, 0x80).w(FUNC(lastbank_state::sound_flags_w)); - map(0x80, 0x80).r("soundlatch1", FUNC(generic_latch_8_device::read)); + map(0x80, 0x80).r("soundlatch1", FUNC(generic_latch_8_device::read)).w(FUNC(lastbank_state::sound_flags_w)); map(0xc0, 0xc0).r("soundlatch2", FUNC(generic_latch_8_device::read)); } +void lastbank_state::fever13_audio_io(address_map &map) +{ + lastbank_audio_io(map); + + map(0x80, 0x80).r("soundlatch2", FUNC(generic_latch_8_device::read)); + map(0xc0, 0xc0).r("soundlatch1", FUNC(generic_latch_8_device::read)).w(FUNC(lastbank_state::sound_flags_w)); +} + static INPUT_PORTS_START( lastbank ) PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CODE(KEYCODE_M) @@ -391,23 +405,23 @@ TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline) void lastbank_state::lastbank(machine_config &config) { - /* basic machine hardware */ - TC0091LVC(config, m_maincpu, MASTER_CLOCK/4); //!!! TC0091LVC !!! - m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::lastbank_map); + // basic machine hardware + TC0091LVC(config, m_maincpu, XTAL(14'318'181) / 4); //!!! TC0091LVC !!! + m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::main_program_map); m_maincpu->set_tilemap_xoffs(0,192); // TODO: correct? TIMER(config, "scantimer").configure_scanline(FUNC(lastbank_state::irq_scanline), "screen", 0, 1); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - z80_device &audiocpu(Z80(config, "audiocpu", MASTER_CLOCK/4)); - audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::lastbank_audio_map); + z80_device &audiocpu(Z80(config, "audiocpu", XTAL(14'318'181) / 4)); + audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::audio_program_map); audiocpu.set_addrmap(AS_IO, &lastbank_state::lastbank_audio_io); // yes, we have no interrupts config.set_perfect_quantum(m_maincpu); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -417,19 +431,19 @@ void lastbank_state::lastbank(machine_config &config) screen.screen_vblank().set(FUNC(lastbank_state::screen_vblank)); screen.set_palette("maincpu:palette"); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch1"); GENERIC_LATCH_8(config, "soundlatch2"); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); + OKIM6295(config, m_oki, 1'000'000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); ES8712(config, m_essnd, 0); m_essnd->msm_write_handler().set("msm", FUNC(msm6585_device::data_w)); m_essnd->set_msm_tag("msm"); - msm6585_device &msm(MSM6585(config, "msm", 640_kHz_XTAL)); /* Not verified, It's actually MSM6585? */ + msm6585_device &msm(MSM6585(config, "msm", 640_kHz_XTAL)); msm.vck_legacy_callback().set("essnd", FUNC(es8712_device::msm_int)); msm.set_prescaler_selector(msm6585_device::S40); /* Not verified */ msm.add_route(ALL_OUTPUTS, "mono", 0.50); @@ -439,6 +453,13 @@ void lastbank_state::lastbank(machine_config &config) // is also absent from some other games on the same hardware. } +void lastbank_state::fever13(machine_config &config) +{ + lastbank(config); + + subdevice("audiocpu")->set_addrmap(AS_IO, &lastbank_state::fever13_audio_io); +} + /*************************************************************************** Game driver(s) @@ -459,11 +480,29 @@ ROM_START( lastbank ) ROM_REGION( 0x40000, "oki", 0 ) ROM_LOAD( "6.u55", 0x00000, 0x40000, CRC(9e78e234) SHA1(031f93e4bc338d0257fa673da7ce656bb1cda5fb) ) - ROM_REGION( 0x80000, "essnd", 0 ) /* Samples */ + ROM_REGION( 0x80000, "essnd", 0 ) // Samples ROM_LOAD( "7.u60", 0x00000, 0x80000, CRC(41be7146) SHA1(00f1c0d5809efccf888e27518a2a5876c4b633d8) ) ROM_END +ROM_START( fever13 ) // ES-9410 PCB (TC0090LVC marked ES9402LA, Z80, ES8712,14'318'181 MHz XTAL, OKI M6295 with 1000J resonator, MSM6585 with 640J resonator) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "9.u9", 0x00000, 0x40000, CRC(a17a6a9c) SHA1(b2bff250d1ea879bcdd9bea92537975a168babc8) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "4.u48", 0x00000, 0x10000, CRC(33cba6b2) SHA1(cf7d1c7c6215b2f83c9266f92f46d3cfc0242afc) ) + + ROM_REGION( 0x120000, "maincpu:gfx", 0 ) + ROM_LOAD( "u11", 0x000000, 0x100000, BAD_DUMP CRC(2588d82d) SHA1(426f6821862d54123e53410e2776586ddf6b21e7) ) // not dumped yet, using lastbank's for now + + ROM_REGION( 0x40000, "oki", 0 ) + ROM_LOAD( "es-9410.u55", 0x00000, 0x40000, CRC(09b5e4d6) SHA1(cf0235e9cf0577bf932beda7e4fb1b84410a3e0c) ) // 1xxxxxxxxxxxxxxxxx = 0xFF + + ROM_REGION( 0x80000, "essnd", 0 ) // Samples + ROM_LOAD( "2.u60", 0x00000, 0x80000, CRC(4e0da568) SHA1(6cd4d3facf8f05747d6cff03617bdfc91b5e9d67) ) +ROM_END + } // Anonymous namespace GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, fever13, 0, fever13, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Fever 13 (v1.3)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // missing GFX dump diff --git a/src/mame/mame.lst b/src/mame/mame.lst index d2c547a19b9..1b76dbf39ab 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -17834,6 +17834,7 @@ gcpinbal // (c) 1994 Excellent System pwrflip // (c) 1994 Excellent System @source:excellent/lastbank.cpp +fever13 // (c) 1995 Excellent System lastbank // (c) 1994 Excellent System @source:excellent/witch.cpp From 9c6d0d509d85fd63eef4014b0176fbe224f67008 Mon Sep 17 00:00:00 2001 From: mamehaze <140764005+mamehaze@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:55:03 +0100 Subject: [PATCH 27/44] Added three TV games (not working) and three e-kara cartridges. (#12698) Also added cartridge pinout and notes about Korean releases to comments to ekara_cart.xml. New systems marked not working --------------------------- Konami Teleshibai (Japan) [David Haywood, TeamEurope] Konami Teleshibai - Purple Version (Japan) [David Haywood, TeamEurope] TV Mahjong Game (VTxx hardware) [David Haywood, TeamEurope] New working software list items (ekara_cart.xml) ---------------------- Kids' Song Volume 4 (Yuuki Rinrin, Osakana Tengoku, etc.) (Japan) (DC0007-KID) [David Haywood, TeamEurope] Kids' Song Mini Volume 6 (Japan) (MC0017-KSM) [David Haywood, TeamEurope] e-kara Web cartridge 8M (used, with 8 songs) (Japan) [David Haywood, TeamEurope] --- hash/ekara_cart.xml | 163 +++++++++++++++++++++++----- src/mame/mame.lst | 3 + src/mame/nintendo/nes_vt02_vt03.cpp | 9 ++ src/mame/tvgames/trkfldch.cpp | 147 ++++++++++++++++++++++++- 4 files changed, 289 insertions(+), 33 deletions(-) diff --git a/hash/ekara_cart.xml b/hash/ekara_cart.xml index 86f9698d508..25f8f456281 100644 --- a/hash/ekara_cart.xml +++ b/hash/ekara_cart.xml @@ -9,6 +9,55 @@ license:CC0-1.0 + + + + + + + + + + + Dream Cartridge: Best Artist Vol.7 (Japan) (DC0008-BAT) @@ -2493,7 +2570,19 @@ license:CC0-1.0 - + + Kids' Song Mini Volume 6 (Japan) (MC0017-KSM) + 2003 + Takara + + + + + + + + + @@ -3099,7 +3188,27 @@ license:CC0-1.0 - + + + e-kara Web cartridge 8M (used, with 8 songs) (Japan) + 2003 + Takara + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 1b76dbf39ab..76f343f6414 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -34565,6 +34565,7 @@ sudopptv techni4 timetp36 timetp7 +tvmjfc vdogdeme vdogdemo vfootbal @@ -45625,6 +45626,8 @@ abl4play lexitvsprt my1stddr // (c) 2006 Konami shtscore +teleshi +teleship trkfldch // (c) 2007 Konami @source:tvgames/tvgame.cpp diff --git a/src/mame/nintendo/nes_vt02_vt03.cpp b/src/mame/nintendo/nes_vt02_vt03.cpp index bc6604f7dc6..90f3e454043 100644 --- a/src/mame/nintendo/nes_vt02_vt03.cpp +++ b/src/mame/nintendo/nes_vt02_vt03.cpp @@ -1382,6 +1382,12 @@ ROM_START( gamezn2 ) ROM_LOAD16_WORD_SWAP( "gamezone2.bin", 0x00000, 0x400000, CRC(f7b2d609) SHA1(7d2d8f6e822c4e6b97e9accaa524b7910c6b97bf) ) // byteswapped as protection? ROM_END +ROM_START( tvmjfc ) + ROM_REGION( 0x200000, "mainrom", 0 ) + ROM_LOAD( "s29al016m90tfir2_tsop48.bin", 0x00000, 0x200000, CRC(28ef6219) SHA1(7ac2592f2a88532f537629660074ebae08efab82) ) +ROM_END + + void nes_vt_state::init_protpp() @@ -1594,3 +1600,6 @@ CONS( 201?, ppgc200g, 0, 0, nes_vt_pal_8mb, nes_vt, nes_vt_state, emp // unknown tech level, it's most likely a vt09 or vt369 but isn't using any of the extended features CONS( 201?, dgun2869, 0, 0, nes_vt_16mb, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "My Arcade Retro Micro Controller - 220 Built-In Video Games (DGUN-2869)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 201?, dgun2959, 0, 0, nes_vt_pal_16mb, nes_vt, nes_vt_state, empty_init, "dreamGEAR", "My Arcade Plug And Play 220 Game Retro Controller (DGUN-2959)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) + +// needs inputs - unit is a Mahjong controller. This is said to be a hack(?) of a Famicom game (unless it was licensed by the original developer) +CONS( 200?, tvmjfc, 0, 0, nes_vt_2mb, nes_vt, nes_vt_state, empty_init, "bootleg?", "TV Mahjong Game (VTxx hardware)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/tvgames/trkfldch.cpp b/src/mame/tvgames/trkfldch.cpp index 00eb59bff29..0cdb0b10132 100644 --- a/src/mame/tvgames/trkfldch.cpp +++ b/src/mame/tvgames/trkfldch.cpp @@ -795,7 +795,7 @@ void trkfldch_state::trkfldch_map(address_map &map) map(0x007870, 0x0078ff).rw(FUNC(trkfldch_state::unkregs_r), FUNC(trkfldch_state::unkregs_w)); - map(0x008000, 0x7fffff).rom().region("maincpu", 0x000000); // good for code mapped at 008000 and 050000 at least + map(0x008000, 0xffffff).rom().region("maincpu", 0x000000); // good for code mapped at 008000 and 050000 at least } void trkfldch_state::vectors_map(address_map &map) @@ -935,6 +935,53 @@ static INPUT_PORTS_START( trkfldch ) PORT_START("IN3") INPUT_PORTS_END +static INPUT_PORTS_START( konsb ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN1") + PORT_DIPNAME( 0x01, 0x01, "IN1" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN2") + PORT_START("IN3") +INPUT_PORTS_END + static INPUT_PORTS_START( my1stddr ) PORT_START("IN0") PORT_DIPNAME( 0x01, 0x01, "IN0" ) @@ -1557,30 +1604,114 @@ void trkfldch_state::trkfldch(machine_config &config) } ROM_START( trkfldch ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "trackandfield.bin", 0x000000, 0x400000, CRC(f4f1959d) SHA1(344dbfe8df1897adf77da6e5ca0435c4d47d6842) ) ROM_END ROM_START( my1stddr ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "myfirstddr.bin", 0x000000, 0x400000, CRC(2ef57bfc) SHA1(9feea5adb9de8fe17e915f3a037e8ddd70e58ae7) ) ROM_END ROM_START( abl4play ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "abl4play.bin", 0x000000, 0x800000, CRC(5d57fb70) SHA1(34cdf80dc8cb08e5cd98c724268e4c5f483780d7) ) ROM_END ROM_START( shtscore ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "shootnscore.bin", 0x000000, 0x400000, CRC(37aa16bd) SHA1(609d0191301480c51ec1188c67101a4e88a5170f) ) ROM_END ROM_START( lexitvsprt ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "29l3211.u2a", 0x000000, 0x400000, CRC(65e5223c) SHA1(13eae6e34100fb9761335e87a3cf728bb31e860f) ) ROM_END +/* +Included with Orange model + + しあわせのおうじ (イギリス民話) + Shiawase no Ouji (English minwa) + ほしのぎんか (グリム童話) + Hoshi no Ginka (Grimm douwa) + おやゆびひめ (アンデルセン) + Oyayubi-hime (Anderson) + こびととくつや (グリム童話) + Kobi to Toku Tsuya (Grimm douwa) + みっつのねがい (日本昔話) + Mittsu no Negai (Nippon mukashi banashi) + うらしまたろう (日本昔話) + Urashima Tarou (Nippon mukashi banashi) + アフロンとがまじいの ちきゅうにやさしく (オリジナル) + Afuron to Gamajii no Chikyuu ni Yasashiku (Original) + かさこじぞう (日本昔話) + Kasakojizo (Nippon mukashi banashi) + きんのがちょう (グリム童話) + Kin no Gachou (Grimm douwa) + あそんでまなぼう (オリジナル) + Asonde Manabou (Original) +*/ +ROM_START( teleshi ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "s29gl128n90tfir.bin", 0x000000, 0x1000000, CRC(8c032142) SHA1(7dff151ea1abd5911e753f0708b0b4f66599791f) ) +ROM_END + +/* +Included with Purple model + + ももたろう (日本昔話) + Momotarou (Nippon mukashi banashi) + あかずきん (グリム童話) + Aka Zukin (Grimm douwa) + きたかぜのくれたテーブルかけ (ノルウェー民話) + Kita Kaze no Kureta Table Kake (Norway minwa) + いっすんぼうし (日本昔話) + Issun-boushi (Nippon mukashi banashi) + おおきなかぶ (ロシア民話) + Ookina Kabu (Russia minwa) + ありときりぎりす (イソップ童話) + Ari to Kirigirisu (Aesop douwa) + マッチうりのしょうじょ (アンデルセン) + Match Uri no Shoujo (Anderson) + かさこじぞう (日本昔話) + Kasa Jizou (Nippon mukashi banashi) + きんのがちょう (グリム童話) + Kin no Gachou (Grimm douwa) + あそんでまなぼう2 (オリジナル) + Asonde Manabou 2 (Original) +*/ +ROM_START( teleship ) + ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "s29gl128n90tfir2.bin", 0x000000, 0x1000000, CRC(28c12a48) SHA1(68557849e2b6f3669de76540de841ca99119ec58) ) +ROM_END + +/* +The following were also available (via the Download service?) + +世界のお話 (ナレーション入り) [Sekai no Ohanashi (Narration-iri)] + + ブレーメンのおんがくたい (グリム童話) + Bremen no Ongakutai (Grimm douwa) + みにくいあひるのこ (アンデルセン) + Minikui Ahiru no Ko (Andersen) + てぶくろ (ウクライナ民話) + Tebukuro (Ukraine minwa) + はちかつぎひめ (日本昔話) + Hachi Katsugi-hime (Nippon mukashi banashi) + +遊んで学ぼう・お歌で遊ぼう [Asonde Manabu - Outa de Asobou] + + あそんでまなぼう (オリジナル) + Asonde Manabou (Original) + あそんでまなぼう2 (オリジナル) + Asonde Manabou 2 (Original) + おうたであそぼう3 (オリジナル) + Asonde Manabou 3 (Original) + おうたであそぼう4 (オリジナル) + Asonde Manabou 4 (Original) +*/ + } // anonymous namespace @@ -1590,3 +1721,7 @@ CONS( 2006, my1stddr, 0, 0, trkfldch, my1stddr,trkfldch_state, e CONS( 200?, abl4play, 0, 0, trkfldch, abl4play,trkfldch_state, empty_init, "Advance Bright Ltd", "4 Player System - 10 in 1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) CONS( 200?, shtscore, 0, 0, trkfldch, shtscore,trkfldch_state, empty_init, "Halsall / time4toys.com / Electronic Games", "Shoot n' Score", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) CONS( 200?, lexitvsprt,0, 0, trkfldch, lexi, trkfldch_lexi_state, empty_init, "Lexibook", "TV Sports Plug & Play 5-in-1 (JG7000)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) + +// additional online content could be downloaded onto these if they were connected to a PC via USB +CONS( 2008, teleshi, 0, 0, trkfldch, konsb, trkfldch_state, empty_init, "Konami", "Teleshibai (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // テレしばい - this one is orange +CONS( 2008, teleship, 0, 0, trkfldch, konsb, trkfldch_state, empty_init, "Konami", "Teleshibai - Purple Version (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // テレしばい (パープルバージョン) - this has Purple Version as part of the name on the box From 063d5cdc1e0a033628a8ee0053726540646cd036 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Wed, 28 Aug 2024 20:33:18 +0200 Subject: [PATCH 28/44] Add an Automat (Robocop bootleg) set for Modular System (#12695) New clones marked not working ----------------------------- Automat (bootleg of Robocop, Modular System) [Darksoft] --- src/mame/dataeast/ffantasy_ms.cpp | 162 ++++++++++++++++++++---------- src/mame/mame.lst | 1 + 2 files changed, 111 insertions(+), 52 deletions(-) diff --git a/src/mame/dataeast/ffantasy_ms.cpp b/src/mame/dataeast/ffantasy_ms.cpp index 7498c0eaccc..6c8dd5cbd4e 100644 --- a/src/mame/dataeast/ffantasy_ms.cpp +++ b/src/mame/dataeast/ffantasy_ms.cpp @@ -5,10 +5,12 @@ Fighting Fantasy (Modular System) Dragon Ninja (Modular System) Secret Agent (Modular System) + Automat (Modular System) [bootleg of Robocop] As with most of the 'Modular System' setups, the hardware is heavily modified from the original and consists of a multi-board stack in a cage, hence different driver. + For Fighting Fantasy the Modular System cage contains 8 main boards and 1 sub board. MOD-6/1 - TSC68000CP12, 4 ROMs, RAMs, 20 MHz XTAL. @@ -22,6 +24,7 @@ PCBs pictures and dip listing are available at: http://www.recreativas.org/modular-system-fighting-fantasy-5694-gaelco-sa + For Dragon Ninja the Modular System cage contains 7 main boards and 1 sub board. MOD-6/1 - MC68000P10, 2 ROMs, RAMs, 20 MHz XTAL. @@ -34,6 +37,7 @@ PCBs pictures and dip listing are available at: https://www.recreativas.org/modular-system-dragon-ninja-4319-gaelco-sa + For Secret Agent the Modular System cage contains 8 main boards and 1 sub board. MOD-6/1 - MC68000P10, 4 ROMs, RAMs, 22.1184 MHz XTAL. @@ -46,6 +50,18 @@ MOD 4/2 - Tilemap board, has logic + 4 tilemap ROMs, long thin sub-board (C0464) with no chips, just routing along one edge. PCBs pictures and dip listing are available at: https://www.recreativas.org/modular-system-secret-agent-11088-gaelco-sa + + + For Automat the Modular System cage contains 6 main boards and 1 sub board. + + MOD 1/5 - Sound board (Z80B, 2 x YM2203C). Two 8 dip switches banks + small sub board with OKI M5205. + MOD 6/1 - TSC68000CP12, 4 ROMs, RAMs, 20 MHz XTAL. + MOD 2 - Logic + 20 MHz XTAL. + MOD 7/8 - Logic + RAM (2 x + Sony CXK58256PM-10) + PLDs. + MOD 8 - ROM (eight EPROMs) + MOD 51/3 - Sprite board, has logic + 4 EPROMs. + + PCBs pictures and dip listing are available at: https://www.recreativas.org/modular-system-automat-robocop-14508-gaelco-sa */ @@ -170,6 +186,96 @@ void ffantasy_ms_state::secretagm(machine_config &config) m_maincpu->set_clock(22.1184_MHz_XTAL); } +ROM_START( automatm ) + ROM_REGION( 0x100000, "maincpu", 0 ) // on MOD 6/1 board + ROM_LOAD16_BYTE( "mod_6-1_automat_2au_603.ic17", 0x00000, 0x10000, CRC(efce0f8e) SHA1(c27a2db6c5cf92b9682be12d00d4c8b2998a88ee) ) + ROM_LOAD16_BYTE( "mod_6-1_automat_2au_606.ic26", 0x00001, 0x10000, CRC(f19fc5b6) SHA1(3d27ed69a4ab4d799c4afa779ac5d5083cd73cc2) ) + ROM_LOAD16_BYTE( "mod_6-1_automat_2au_602.ic20", 0x20000, 0x10000, CRC(9d7b79e0) SHA1(e0d901b9b3cd62f7c947da04f7447ebfa88bf44a) ) + ROM_LOAD16_BYTE( "mod_6-1_automat_2au_605.ic11", 0x20001, 0x10000, CRC(e655f9c3) SHA1(d5e99d542303d009277ccfc245f877e4e28603c9) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // on MOD 1/5 board + ROM_LOAD( "mod_1-5_automat_2au_101.ic12", 0x00000, 0x10000, CRC(fc80cac1) SHA1(0f31d6c3f2ca1aa1c6d9ac5da28b75a6fbf8444b) ) + + ROM_REGION( 0x80000, "gfx1", 0 ) // on MOD 8 board + ROM_LOAD( "mod_8_automat_2au_301.ic15", 0x00000, 0x10000, CRC(fd3b363b) SHA1(af63d57e362f159c5b54a764e2069ca24849164b) ) + ROM_LOAD( "mod_8_automat_2au_302.ic22", 0x10000, 0x10000, CRC(05755c02) SHA1(e1fa7d464eb7bbf2f22ca132e7df8e92911a0685) ) + ROM_LOAD( "mod_8_automat_2au_303.ic30", 0x20000, 0x10000, CRC(9440bb38) SHA1(aee9372bfc3b2b036a208d91a706312b77042001) ) + ROM_LOAD( "mod_8_automat_2au_304.ic37", 0x30000, 0x10000, CRC(a1c9d781) SHA1(8e062af8a9c2eef74c8e578624f3c961750ac260) ) + ROM_LOAD( "mod_8_automat_2au_305.ic14", 0x40000, 0x10000, CRC(53cb118e) SHA1(cf2329cb8f41c6ddc81dea8fa8def0e47e25b723) ) + ROM_LOAD( "mod_8_automat_2au_306.ic21", 0x50000, 0x10000, CRC(21b682f7) SHA1(1e9bdae1317f215ffdffdd2c1a3c0e08c14ab00c) ) + ROM_LOAD( "mod_8_automat_2au_307.ic29", 0x60000, 0x10000, CRC(be822d87) SHA1(d5f9bb55a16f0ab2d6d11fea5d22b7ced59f9128) ) + ROM_LOAD( "mod_8_automat_2au_308.ic36", 0x70000, 0x10000, CRC(9459159a) SHA1(20fc3f33f2e23d88b2bd21f248ed7814f03b387f) ) + + ROM_REGION( 0x80000, "gfx2", 0 ) // on MOD 51/1 board + ROM_LOAD( "mod_51-3_automat_2au_501.ic43", 0x00000, 0x20000, CRC(8e7ec3fc) SHA1(0c40cf90bb105dca2629a61ff13227b82d3b10de) ) + ROM_LOAD( "mod_51-3_automat_2au_502.ic42", 0x20000, 0x20000, CRC(d0a46eae) SHA1(3efe3b1462b442b4a16704d15e201a4d7bd402c8) ) + ROM_LOAD( "mod_51-3_automat_2au_503.ic41", 0x40000, 0x20000, CRC(e174cdaf) SHA1(e66c8adc6df08e30365bd0e360e78397b495582c) ) + ROM_LOAD( "mod_51-3_automat_2au_504.ic40", 0x60000, 0x20000, CRC(e8662060) SHA1(f59f55fe5bf79be0c66f4984a0ecab17504438c7) ) + + ROM_REGION( 0x120, "proms", 0 ) // PROMs (function unknown) + ROM_LOAD( "mod_1-5_automat_110_82s123.ic20", 0x000, 0x020, NO_DUMP ) + ROM_LOAD( "mod_51-3_a502_63s141.ic10", 0x020, 0x100, NO_DUMP ) + + ROM_REGION( 0x200, "plds", ROMREGION_ERASEFF ) + ROM_LOAD( "mod_6-1_automat_604_gal16v8.ic13", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "mod_6-1_automat_633_gal16v8.ic7", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "mod_7-8_7133_gal20v8.ic7", 0x000, 0x157, NO_DUMP ) + ROM_LOAD( "mod_7-8_7233_gal20v8.ic54", 0x000, 0x157, NO_DUMP ) + ROM_LOAD( "mod_7-8_7333_gal16v8.ic55", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "mod_7-8_7433_gal16v8.ic9", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "mod_7-8_7533_gal16v8.ic59", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "mod_7-8_7633_gal20v9.ic44", 0x000, 0x157, NO_DUMP ) +ROM_END + +ROM_START( drgninjam ) + ROM_REGION( 0x100000, "maincpu", 0 ) // on MOD 6/1 board, extremely similar to drgninjab in dec0.cpp. TODO: ROM loading may be wrong (check 0x20000 - 0x3ffff being empty in drgninjab) + ROM_LOAD16_BYTE( "6-1_cpu_dn_603.ic17", 0x00000, 0x20000, CRC(1c3670df) SHA1(0e287a0b4494e702080e80a911c4762bbc6a5815) ) + ROM_LOAD16_BYTE( "6-1_cpu_dn_606.ic8", 0x00001, 0x20000, CRC(07669458) SHA1(c5dcf72eba5e345228ee3f9e0228cba526e1156a) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // on MOD 1/2 board + ROM_LOAD( "1-4_snd_dn_101.ic12", 0x00000, 0x10000, CRC(0b82c205) SHA1(0be243b19693c54914eccefbf6a8b8b513eec299) ) + + ROM_REGION( 0x80000, "gfx1", 0 ) // on one of the MOD 4/3 boards + ROM_LOAD( "4-3_dn_401.ic17", 0x0000, 0x4000, CRC(45ab2822) SHA1(0cf0f74ad5325a66f74fc20cabd6a9d3d8c42f2a) ) + ROM_LOAD( "4-3_dn_402.ic16", 0x4000, 0x4000, CRC(26f0095b) SHA1(9e568a23df2b0ca05d8b87fea445f5f98e55fac5) ) + ROM_LOAD( "4-3_dn_403.ic15", 0x8000, 0x4000, CRC(c2061c37) SHA1(b06737ecece7da4785c2e98977f6dc35986a445e) ) // 1ST AND 2ND HALF IDENTICAL + ROM_IGNORE( 0x4000 ) + ROM_LOAD( "4-3_dn_404.ic14", 0xc000, 0x4000, CRC(1da44e82) SHA1(ccb9464b711025a5c2c18ecb765f7f0e15f7d4a5) ) // 1ST AND 2ND HALF IDENTICAL + ROM_IGNORE( 0x4000 ) + + ROM_REGION( 0x80000, "gfx2", 0 ) // on a second MOD 4/3 board + ROM_LOAD( "4-3-a_dn_4a01.ic17", 0x00000, 0x8000, CRC(c89982ac) SHA1(7509322bf4dcaceefdbaf6e9f4087a576133fe39) ) + ROM_LOAD( "4-3-a_dn_4a02.ic16", 0x08000, 0x8000, CRC(144b0359) SHA1(46565c5694f0cfcf06c1ee7c131ab3c88c804d35) ) + ROM_LOAD( "4-3-a_dn_4a03.ic15", 0x10000, 0x8000, CRC(ae98a684) SHA1(d6fe7237b82125a21b9804500ba2166906475a0e) ) + ROM_LOAD( "4-3-a_dn_4a04.ic14", 0x18000, 0x8000, CRC(8292c4ad) SHA1(f83acf64b101022927b678749d754374a20f5444) ) + + ROM_REGION( 0x80000, "gfx3", 0 ) // on a MOD 4/2 board + ROM_LOAD( "4-2-b_dn_4b01.ic17", 0x00000, 0x10000, CRC(65002e5c) SHA1(e1fa0a0395d3fbcf31e15b63b7eaf478063aa971) ) + ROM_LOAD( "4-2-b_dn_4b02.ic16", 0x10000, 0x10000, CRC(dd6acd2d) SHA1(e2a0ccf49dce421b10ad0ed54d02ba1ca6525404) ) + ROM_LOAD( "4-2-b_dn_4b03.ic15", 0x20000, 0x10000, CRC(63e337c1) SHA1(ca347d6a46ee643edfdc8614760dc9b0994e1745) ) + ROM_LOAD( "4-2-b_dn_4b04.ic14", 0x30000, 0x10000, CRC(5cc7ec8c) SHA1(3f17e13af7152c51ce025ca06ece70b4a6f65f94) ) + + ROM_REGION( 0x100000, "gfx4", 0 ) // on MOD 51/1 board + ROM_LOAD( "51-3_dn_501.ic43", 0x00000, 0x20000, CRC(0fccce1f) SHA1(e2e5625b62ddd73a4363596a4b1b2d72c2fe1c38) ) + ROM_LOAD( "51-3_dn_502.ic42", 0x20000, 0x20000, CRC(361f4616) SHA1(40279c76d027bcf698b8ff694afc2afb15279381) ) + ROM_LOAD( "51-3_dn_503.ic41", 0x40000, 0x20000, CRC(b3c97ad1) SHA1(f77426e1ee347b8cae9c5aef1e31058344c019c2) ) + ROM_LOAD( "51-3_dn_504.ic40", 0x60000, 0x20000, CRC(1445dccb) SHA1(fddbb9d136ea6dbb2704ac93e5536ed0e6bfb19c) ) + + ROM_REGION( 0x0400, "proms", 0 ) // PROMs (function unknown) + ROM_LOAD( "1-4_snd_110_82s123.ic20", 0x000, 0x020, CRC(e26e680a) SHA1(9bbe30e98e952a6113c64e1171330153ddf22ce7) ) + ROM_LOAD( "21-1_p0201_tbp24s10n.ic4", 0x100, 0x100, CRC(2697da58) SHA1(e62516b886ff6e204b718e5f0c6ce2712e4b7fc5) ) + ROM_LOAD( "21-1_p0205_82s129n.ic12", 0x200, 0x100, CRC(204a7aee) SHA1(322164134aa65c37a9389024f921364a81d13e88) ) + ROM_LOAD( "51-3_502_82s129.ic10", 0x300, 0x100, CRC(15085e44) SHA1(646e7100fcb112594023cf02be036bd3d42cc13c) ) + + ROM_REGION( 0xc00, "plds", ROMREGION_ERASEFF ) + ROM_LOAD( "6-1_cpu_604_gal16v8.ic13", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "6-1_cpu_630_gal16v8.ic7", 0x200, 0x117, NO_DUMP ) + ROM_LOAD( "4-3_p0403_pal16r8a.ic29", 0x400, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) ) + ROM_LOAD( "4-3-a_p0403.ic29", 0x600, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) ) + ROM_LOAD( "4-2-b_403_gal16v8.ic29", 0x800, 0x104, NO_DUMP ) + ROM_LOAD( "51-3_503_gal16v8.ic46", 0xa00, 0x117, CRC(11470ea1) SHA1(cfcafbcc7e55be717348f895df61e144fdd0cc9b) ) +ROM_END + ROM_START( ffantasym ) ROM_REGION( 0x100000, "maincpu", 0 ) // on MOD 6/1 board, extremely similar to ffantasybl in dec0.cpp ROM_LOAD16_BYTE( "ff_6-1_5fa_603.ic17", 0x00000, 0x10000, CRC(124ebff8) SHA1(20423990903dc3d682e2df6fb4dec0ae6b49036d) ) @@ -225,55 +331,6 @@ ROM_START( ffantasym ) ROM_LOAD( "ff_5-1_5235_gal16v8.ic8", 0x000, 0x117, NO_DUMP ) ROM_END -ROM_START( drgninjam ) - ROM_REGION( 0x100000, "maincpu", 0 ) // on MOD 6/1 board, extremely similar to drgninjab in dec0.cpp. TODO: ROM loading may be wrong (check 0x20000 - 0x3ffff being empty in drgninjab) - ROM_LOAD16_BYTE( "6-1_cpu_dn_603.ic17", 0x00000, 0x20000, CRC(1c3670df) SHA1(0e287a0b4494e702080e80a911c4762bbc6a5815) ) - ROM_LOAD16_BYTE( "6-1_cpu_dn_606.ic8", 0x00001, 0x20000, CRC(07669458) SHA1(c5dcf72eba5e345228ee3f9e0228cba526e1156a) ) - - ROM_REGION( 0x10000, "audiocpu", 0 ) // on MOD 1/2 board - ROM_LOAD( "1-4_snd_dn_101.ic12", 0x00000, 0x10000, CRC(0b82c205) SHA1(0be243b19693c54914eccefbf6a8b8b513eec299) ) - - ROM_REGION( 0x80000, "gfx1", 0 ) // on one of the MOD 4/3 boards - ROM_LOAD( "4-3_dn_401.ic17", 0x0000, 0x4000, CRC(45ab2822) SHA1(0cf0f74ad5325a66f74fc20cabd6a9d3d8c42f2a) ) - ROM_LOAD( "4-3_dn_402.ic16", 0x4000, 0x4000, CRC(26f0095b) SHA1(9e568a23df2b0ca05d8b87fea445f5f98e55fac5) ) - ROM_LOAD( "4-3_dn_403.ic15", 0x8000, 0x4000, CRC(c2061c37) SHA1(b06737ecece7da4785c2e98977f6dc35986a445e) ) // 1ST AND 2ND HALF IDENTICAL - ROM_IGNORE( 0x4000 ) - ROM_LOAD( "4-3_dn_404.ic14", 0xc000, 0x4000, CRC(1da44e82) SHA1(ccb9464b711025a5c2c18ecb765f7f0e15f7d4a5) ) // 1ST AND 2ND HALF IDENTICAL - ROM_IGNORE( 0x4000 ) - - ROM_REGION( 0x80000, "gfx2", 0 ) // on a second MOD 4/3 board - ROM_LOAD( "4-3-a_dn_4a01.ic17", 0x00000, 0x8000, CRC(c89982ac) SHA1(7509322bf4dcaceefdbaf6e9f4087a576133fe39) ) - ROM_LOAD( "4-3-a_dn_4a02.ic16", 0x08000, 0x8000, CRC(144b0359) SHA1(46565c5694f0cfcf06c1ee7c131ab3c88c804d35) ) - ROM_LOAD( "4-3-a_dn_4a03.ic15", 0x10000, 0x8000, CRC(ae98a684) SHA1(d6fe7237b82125a21b9804500ba2166906475a0e) ) - ROM_LOAD( "4-3-a_dn_4a04.ic14", 0x18000, 0x8000, CRC(8292c4ad) SHA1(f83acf64b101022927b678749d754374a20f5444) ) - - ROM_REGION( 0x80000, "gfx3", 0 ) // on a MOD 4/2 board - ROM_LOAD( "4-2-b_dn_4b01.ic17", 0x00000, 0x10000, CRC(65002e5c) SHA1(e1fa0a0395d3fbcf31e15b63b7eaf478063aa971) ) - ROM_LOAD( "4-2-b_dn_4b02.ic16", 0x10000, 0x10000, CRC(dd6acd2d) SHA1(e2a0ccf49dce421b10ad0ed54d02ba1ca6525404) ) - ROM_LOAD( "4-2-b_dn_4b03.ic15", 0x20000, 0x10000, CRC(63e337c1) SHA1(ca347d6a46ee643edfdc8614760dc9b0994e1745) ) - ROM_LOAD( "4-2-b_dn_4b04.ic14", 0x30000, 0x10000, CRC(5cc7ec8c) SHA1(3f17e13af7152c51ce025ca06ece70b4a6f65f94) ) - - ROM_REGION( 0x100000, "gfx4", 0 ) // on MOD 51/1 board - ROM_LOAD( "51-3_dn_501.ic43", 0x00000, 0x20000, CRC(0fccce1f) SHA1(e2e5625b62ddd73a4363596a4b1b2d72c2fe1c38) ) - ROM_LOAD( "51-3_dn_502.ic42", 0x20000, 0x20000, CRC(361f4616) SHA1(40279c76d027bcf698b8ff694afc2afb15279381) ) - ROM_LOAD( "51-3_dn_503.ic41", 0x40000, 0x20000, CRC(b3c97ad1) SHA1(f77426e1ee347b8cae9c5aef1e31058344c019c2) ) - ROM_LOAD( "51-3_dn_504.ic40", 0x60000, 0x20000, CRC(1445dccb) SHA1(fddbb9d136ea6dbb2704ac93e5536ed0e6bfb19c) ) - - ROM_REGION( 0x0400, "proms", 0 ) // PROMs (function unknown) - ROM_LOAD( "1-4_snd_110_82s123.ic20", 0x000, 0x020, CRC(e26e680a) SHA1(9bbe30e98e952a6113c64e1171330153ddf22ce7) ) - ROM_LOAD( "21-1_p0201_tbp24s10n.ic4", 0x100, 0x100, CRC(2697da58) SHA1(e62516b886ff6e204b718e5f0c6ce2712e4b7fc5) ) - ROM_LOAD( "21-1_p0205_82s129n.ic12", 0x200, 0x100, CRC(204a7aee) SHA1(322164134aa65c37a9389024f921364a81d13e88) ) - ROM_LOAD( "51-3_502_82s129.ic10", 0x300, 0x100, CRC(15085e44) SHA1(646e7100fcb112594023cf02be036bd3d42cc13c) ) - - ROM_REGION( 0xc00, "plds", ROMREGION_ERASEFF ) - ROM_LOAD( "6-1_cpu_604_gal16v8.ic13", 0x000, 0x117, NO_DUMP ) - ROM_LOAD( "6-1_cpu_630_gal16v8.ic7", 0x200, 0x117, NO_DUMP ) - ROM_LOAD( "4-3_p0403_pal16r8a.ic29", 0x400, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) ) - ROM_LOAD( "4-3-a_p0403.ic29", 0x600, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) ) - ROM_LOAD( "4-2-b_403_gal16v8.ic29", 0x800, 0x104, NO_DUMP ) - ROM_LOAD( "51-3_503_gal16v8.ic46", 0xa00, 0x117, CRC(11470ea1) SHA1(cfcafbcc7e55be717348f895df61e144fdd0cc9b) ) -ROM_END - ROM_START( secretagm ) ROM_REGION( 0x100000, "maincpu", 0 ) // on MOD 6/1 board ROM_LOAD16_BYTE( "mod_6-1_ag_603.ic17", 0x00000, 0x10000, CRC(4a61489b) SHA1(41f3b99bbd60ebac567477b98dc7c0158f972d60) ) @@ -332,6 +389,7 @@ ROM_END } // anonymous namespace -GAME( 199?, drgninjam, baddudes, ffantasym, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Dragon Ninja (Modular System)", MACHINE_IS_SKELETON ) -GAME( 199?, ffantasym, hippodrm, ffantasym, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Fighting Fantasy (Modular System)", MACHINE_IS_SKELETON ) -GAME( 199?, secretagm, secretag, secretagm, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Secret Agent (Modular System)", MACHINE_IS_SKELETON ) +GAME( 199?, automatm, robocop, ffantasym, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Automat (bootleg of Robocop, Modular System)", MACHINE_IS_SKELETON ) +GAME( 199?, drgninjam, baddudes, ffantasym, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Dragon Ninja (Modular System)", MACHINE_IS_SKELETON ) +GAME( 199?, ffantasym, hippodrm, ffantasym, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Fighting Fantasy (Modular System)", MACHINE_IS_SKELETON ) +GAME( 199?, secretagm, secretag, secretagm, ffantasym, ffantasy_ms_state, empty_init, ROT0, "bootleg (Gaelco / Ervisa)", "Secret Agent (Modular System)", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 76f343f6414..32260d48e38 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16988,6 +16988,7 @@ wexpressb2 // bootleg wexpressb3 // bootleg @source:dataeast/ffantasy_ms.cpp +automatm // drgninjam // ffantasym // secretagm // From 08ced719e2908520e7ae60a671c0454d0c089df7 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Wed, 28 Aug 2024 20:34:35 +0200 Subject: [PATCH 29/44] Add a newer Diet Go Go set (with alt graphics) (#12692) New working systems ------------------- Diet Go Go (Europe v1.1 1992.09.26 v4) [Tailsnic Retroworks] --- src/mame/dataeast/dietgo.cpp | 51 +++++++++++++++++++++++++++++------- src/mame/mame.lst | 1 + 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/src/mame/dataeast/dietgo.cpp b/src/mame/dataeast/dietgo.cpp index f5053c8cd41..3cd252299f9 100644 --- a/src/mame/dataeast/dietgo.cpp +++ b/src/mame/dataeast/dietgo.cpp @@ -92,7 +92,7 @@ uint32_t dietgo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap m_sprgen->set_flip_screen(BIT(flip, 7)); m_deco_tilegen->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]); - bitmap.fill(256, cliprect); /* not verified */ + bitmap.fill(256, cliprect); // not verified m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); @@ -228,6 +228,15 @@ static INPUT_PORTS_START( dietgo ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( dietgon ) // New version with alt graphics + PORT_INCLUDE( dietgo ) + + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x2000, 0x2000, "Alternative graphics" ) + PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) +INPUT_PORTS_END + static const gfx_layout tile_8x8_layout = { 8,8, @@ -322,8 +331,31 @@ void dietgo_state::dietgo(machine_config &config) OKIM6295(config, "oki", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60); // verified on PCB } +ROM_START( dietgo ) + ROM_REGION( 0x80000, "maincpu", 0 ) // DE102 code (encrypted) + ROM_LOAD16_BYTE( "jy_00-3.4h", 0x000001, 0x040000, CRC(a863ad0c) SHA1(61bf2fe5dce92e3995791a7e9ef813d64bcc2b93) ) + ROM_LOAD16_BYTE( "jy_01-3.5h", 0x000000, 0x040000, CRC(ef243eda) SHA1(b8efbb80c5bf40ef6c26a06fc7232d6e63596cb4) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "jy_02.14m", 0x00000, 0x10000, CRC(4e3492a5) SHA1(5f302bdbacbf95ea9f3694c48545a1d6bba4b019) ) + + ROM_REGION( 0x100000, "tiles", 0 ) + ROM_LOAD( "may-00.10a", 0x00000, 0x100000, CRC(234d1f8d) SHA1(42d23aad20df20cbd2359cc12bdd47636b2027d3) ) + + ROM_REGION( 0x200000, "sprites", 0 ) + ROM_LOAD( "may-04_w78_9235kd011.14a", 0x000000, 0x100000, CRC(dedd2dd3) SHA1(c1021edb0b377a030ab9593c838083f0f3b996b2) ) + ROM_LOAD( "may-05_w79_9235kd019.16a", 0x100000, 0x100000, CRC(cb23835f) SHA1(c504ff99f9029355f69e7fd7e9528d647bd491bf) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "may-03.11l", 0x00000, 0x80000, CRC(b6e42bae) SHA1(c282cdf7db30fb63340cc609bf00f5ab63a75583) ) + + ROM_REGION( 0x0600, "plds", 0 ) + ROM_LOAD( "pal16l8b_vd-00.6h", 0x0000, 0x0104, NO_DUMP ) // PAL is read protected + ROM_LOAD( "pal16l8b_vd-01.7h", 0x0200, 0x0104, NO_DUMP ) // PAL is read protected + ROM_LOAD( "pal16r6a_vd-02.11h", 0x0400, 0x0104, NO_DUMP ) // PAL is read protected +ROM_END -ROM_START( dietgo ) // same version 1.1 and same date as dietgoe but newer version in rom labels +ROM_START( dietgoe ) // same version 1.1 and same date as dietgoe but newer version in ROM labels ROM_REGION( 0x80000, "maincpu", 0 ) // DE102 code (encrypted) ROM_LOAD16_BYTE( "jy_00-3.4h", 0x000001, 0x040000, CRC(a863ad0c) SHA1(61bf2fe5dce92e3995791a7e9ef813d64bcc2b93) ) ROM_LOAD16_BYTE( "jy_01-3.5h", 0x000000, 0x040000, CRC(ef243eda) SHA1(b8efbb80c5bf40ef6c26a06fc7232d6e63596cb4) ) @@ -347,7 +379,7 @@ ROM_START( dietgo ) // same version 1.1 and same date as dietgoe but newer versi ROM_LOAD( "pal16r6a_vd-02.11h", 0x0400, 0x0104, NO_DUMP ) // PAL is read protected ROM_END -ROM_START( dietgoe ) // weird, still version 1.1 and same date +ROM_START( dietgoea ) // weird, still version 1.1 and same date ROM_REGION( 0x80000, "maincpu", 0 ) // DE102 code (encrypted) ROM_LOAD16_BYTE( "jy_00-2.4h", 0x000001, 0x040000, CRC(014dcf62) SHA1(1a28ce4a643ec8b6f062b1200342ed4dc6db38a1) ) ROM_LOAD16_BYTE( "jy_01-2.5h", 0x000000, 0x040000, CRC(793ebd83) SHA1(b9178f18ce6e9fca848cbbf9dce3f3856672bf94) ) @@ -371,7 +403,7 @@ ROM_START( dietgoe ) // weird, still version 1.1 and same date ROM_LOAD( "pal16r6a_vd-02.11h", 0x0400, 0x0104, NO_DUMP ) // PAL is read protected ROM_END -ROM_START( dietgoea ) // weird, still version 1.1 but different (earlier) date +ROM_START( dietgoeb ) // weird, still version 1.1 but different (earlier) date ROM_REGION( 0x80000, "maincpu", 0 ) // DE102 code (encrypted) ROM_LOAD16_BYTE( "jy_00-1.4h", 0x000001, 0x040000, CRC(8bce137d) SHA1(55f5b1c89330803c6147f9656f2cabe8d1de8478) ) ROM_LOAD16_BYTE( "jy_01-1.5h", 0x000000, 0x040000, CRC(eca50450) SHA1(1a24117e3b1b66d7dbc5484c94cc2c627d34e6a3) ) @@ -453,8 +485,9 @@ void dietgo_state::init_dietgo() } // Anonymous namespace -GAME( 1992, dietgo, 0, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.09.26 v3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, dietgoe, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.09.26 v2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, dietgoea, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.08.04)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, dietgou, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (USA v1.1 1992.09.26)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, dietgoj, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Japan v1.1 1992.09.26)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgo, 0, dietgo, dietgon, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.09.26 v4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgoe, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.09.26 v3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgoea, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.09.26 v2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgoeb, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Europe v1.1 1992.08.04)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgou, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (USA v1.1 1992.09.26)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, dietgoj, dietgo, dietgo, dietgo, dietgo_state, init_dietgo, ROT0, "Data East Corporation", "Diet Go Go (Japan v1.1 1992.09.26)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 32260d48e38..0b37de543ee 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16972,6 +16972,7 @@ destiny // (c) 1983 dietgo // MAY (c) 1993 dietgoe // MAY (c) 1993 dietgoea // MAY (c) 1993 +dietgoeb // MAY (c) 1993 dietgoj // MAY (c) 1993 dietgou // MAY (c) 1993 From ed86b07bd56b86a2fe2c090070d7811855e16ea8 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 28 Aug 2024 22:33:06 +0200 Subject: [PATCH 30/44] input_sdl: empty event queue on resets --- src/osd/modules/input/input_sdl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index e1ec2509d5e..ae1ef1515eb 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -608,6 +608,7 @@ class sdl_keyboard_device : public sdl_device virtual void reset() override { + sdl_device::reset(); memset(&m_keyboard.state, 0, sizeof(m_keyboard.state)); m_capslock_pressed = std::chrono::steady_clock::time_point::min(); } @@ -662,6 +663,7 @@ class sdl_mouse_device_base : public sdl_device virtual void reset() override { + sdl_device::reset(); memset(&m_mouse, 0, sizeof(m_mouse)); m_v = m_h = 0; } @@ -1330,6 +1332,7 @@ class sdl_joystick_device : public sdl_joystick_device_base virtual void reset() override { + sdl_joystick_device_base::reset(); memset(&m_joystick, 0, sizeof(m_joystick)); } @@ -2048,6 +2051,7 @@ class sdl_game_controller_device : public sdl_joystick_device_base virtual void reset() override { + sdl_joystick_device_base::reset(); memset(&m_controller, 0, sizeof(m_controller)); } From 63c186558f237c8085c215dd0ef7538fcfdd0fbd Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 29 Aug 2024 10:37:00 +0200 Subject: [PATCH 31/44] excellent/d9final.cpp: add coin counters, coin lockout and hopper payout --- src/mame/excellent/d9final.cpp | 83 +++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/src/mame/excellent/d9final.cpp b/src/mame/excellent/d9final.cpp index ba7ad4f4fd9..68e7135c600 100644 --- a/src/mame/excellent/d9final.cpp +++ b/src/mame/excellent/d9final.cpp @@ -2,23 +2,20 @@ // copyright-holders:Angelo Salese, David Haywood /******************************************************************************************* - Dream 9 Final (c) 1992 Excellent Systems +Dream 9 Final (c) 1992 Excellent Systems - driver by Angelo Salese & David Haywood - - TODO: - - What does the ES8712 control? There's definitely no ADPCM chip or sample ROM here; - - Main CPU banking is wrong; - - Some inputs not understood; - - A bunch of missing port outputs (including payout); - - screen disable? Start-up fading looks horrible; - - Game looks IGS-esque, is there any correlation? +TODO: +- What does the ES8712 control? There's definitely no ADPCM chip or sample ROM here; +- Some inputs not understood; +- A bunch of missing port outputs (including payout); +- screen disable? Start-up fading looks horrible; +- Game looks IGS-esque, is there any correlation? ============================================================================================ - PCB: ES-9112 +PCB: ES-9112 - Main Chips: Z80, ES8712, 24Mhz OSC, RTC62421B 9262, YM2413, 4x8DSW +Main Chips: Z80, ES8712, 24Mhz OSC, RTC62421B 9262, YM2413, 4x8DSW *******************************************************************************************/ @@ -27,6 +24,7 @@ #include "cpu/z80/z80.h" #include "machine/msm6242.h" #include "machine/nvram.h" +#include "machine/ticket.h" #include "sound/es8712.h" #include "sound/ymopl.h" #include "emupal.h" @@ -40,14 +38,15 @@ namespace { class d9final_state : public driver_device { public: - d9final_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_lo_vram(*this, "lo_vram"), - m_hi_vram(*this, "hi_vram"), - m_cram(*this, "cram"), - m_mainbank(*this, "mainbank") + d9final_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_hopper(*this, "hopper") + , m_lo_vram(*this, "lo_vram") + , m_hi_vram(*this, "hi_vram") + , m_cram(*this, "cram") + , m_mainbank(*this, "mainbank") { } void d9final(machine_config &config); @@ -59,6 +58,7 @@ class d9final_state : public driver_device private: required_device m_maincpu; required_device m_gfxdecode; + required_device m_hopper; required_shared_ptr m_lo_vram; required_shared_ptr m_hi_vram; @@ -67,15 +67,15 @@ class d9final_state : public driver_device tilemap_t *m_sc0_tilemap; - void sc0_lovram(offs_t offset, uint8_t data); - void sc0_hivram(offs_t offset, uint8_t data); - void sc0_cram(offs_t offset, uint8_t data); void bank_w(uint8_t data); uint8_t prot_latch_r(); + void sc0_lovram(offs_t offset, uint8_t data); + void sc0_hivram(offs_t offset, uint8_t data); + void sc0_cram(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_sc0_tile_info); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void io_map(address_map &map); void prg_map(address_map &map); }; @@ -153,12 +153,29 @@ void d9final_state::prg_map(address_map &map) void d9final_state::io_map(address_map &map) { map.global_mask(0xff); -// map(0x00, 0x00).nopw(); //bit 0: irq enable? screen enable? - map(0x00, 0x00).portr("DSWA"); - map(0x20, 0x20).portr("DSWB"); + map(0x00, 0x00).portr("DSWA").lw8( + NAME([this] (offs_t offset, u8 data) { + machine().bookkeeping().coin_lockout_global_w(!BIT(data, 0)); + // bit 1: bet lamp + // bit 2-3: take score & double up lamps + // bit 4: big lamp + // bit 5: small lamp (lit for instruction sheet in bet phase) + // bit 6: start lamp + // bit 7: payout lamp + }) + ); + map(0x20, 0x20).portr("DSWB").lw8( + NAME([this] (offs_t offset, u8 data) { + // NOTE: keyin goes to coin counter 2, coin 2 and 3 to 1 & 2 + for (int i = 0; i < 4; i++) + machine().bookkeeping().coin_counter_w(i, BIT(data, i)); + + m_hopper->motor_w(BIT(data, 7)); + }) + ); map(0x40, 0x40).portr("DSWC"); map(0x40, 0x41).w("ymsnd", FUNC(ym2413_device::write)); - map(0x60, 0x60).portr("DSWD"); + map(0x60, 0x60).portr("DSWD").nopw(); // write: irq ack? shadows bank_w writes, twice, at line ~8 map(0x80, 0x80).portr("IN0"); map(0xa0, 0xa0).portr("IN1").w(FUNC(d9final_state::bank_w)); map(0xe0, 0xe0).portr("IN2"); @@ -167,9 +184,11 @@ void d9final_state::io_map(address_map &map) static INPUT_PORTS_START( d9final ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) - PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) @@ -310,7 +329,6 @@ void d9final_state::machine_start() void d9final_state::d9final(machine_config &config) { - // basic machine hardware Z80(config, m_maincpu, 24000000 / 4); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &d9final_state::prg_map); m_maincpu->set_addrmap(AS_IO, &d9final_state::io_map); @@ -318,7 +336,8 @@ void d9final_state::d9final(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // Sharp LH5116D-10 + battery - // video hardware + HOPPER(config, m_hopper, attotime::from_msec(20), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH ); + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); From 9a29a103416f76be92dbcf2b8325131ac7a7fea6 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 29 Aug 2024 13:37:35 +0200 Subject: [PATCH 32/44] New working clones ------------------ Diablo 68000 (set 1) [Berger] --- src/mame/fidelity/elite.cpp | 4 ++-- src/mame/mame.lst | 1 + src/mame/novag/diablo.cpp | 18 +++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/mame/fidelity/elite.cpp b/src/mame/fidelity/elite.cpp index b7bca3628a6..457e66dd89f 100644 --- a/src/mame/fidelity/elite.cpp +++ b/src/mame/fidelity/elite.cpp @@ -617,7 +617,7 @@ ROM_START( feasbua ) // model EWC ROM_CONTINUE( 0xd000, 0x0800 ) ROM_CONTINUE( 0xc800, 0x0800 ) ROM_CONTINUE( 0xd800, 0x0800 ) - ROM_LOAD("green", 0xe000, 0x0800, CRC(c7bbfbbe) SHA1(63fe13d0e64d1e5c1ea1b4de13ac3e753797a992) ) // M5L2764K - only 4 bytes different to feasbu (after descramble) + ROM_LOAD("green", 0xe000, 0x0800, CRC(c7bbfbbe) SHA1(63fe13d0e64d1e5c1ea1b4de13ac3e753797a992) ) // M5L2764K - only 4 bytes different from feasbu (after descramble) ROM_CONTINUE( 0xf000, 0x0800 ) ROM_CONTINUE( 0xe800, 0x0800 ) ROM_CONTINUE( 0xf800, 0x0800 ) @@ -685,7 +685,7 @@ ROM_START( feasglaa ) // model EAS-C ROM_CONTINUE( 0x9000, 0x0800 ) ROM_CONTINUE( 0x8800, 0x0800 ) ROM_CONTINUE( 0x9800, 0x0800 ) - ROM_LOAD("black", 0xc000, 0x0800, CRC(3f0b01b6) SHA1(fe8d214f1678e000ba945e2f6dc3438af97c6f33) ) // only 2 bytes different to feasgla + ROM_LOAD("black", 0xc000, 0x0800, CRC(3f0b01b6) SHA1(fe8d214f1678e000ba945e2f6dc3438af97c6f33) ) // only 2 bytes different from feasgla ROM_CONTINUE( 0xd000, 0x0800 ) ROM_CONTINUE( 0xc800, 0x0800 ) ROM_CONTINUE( 0xd800, 0x0800 ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 0b37de543ee..0b537eb77c0 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35108,6 +35108,7 @@ constjr @source:novag/diablo.cpp diablo68 diablo68a +diablo68b scorpio68 @source:novag/diamond.cpp diff --git a/src/mame/novag/diablo.cpp b/src/mame/novag/diablo.cpp index b137913fd30..b3ed217d746 100644 --- a/src/mame/novag/diablo.cpp +++ b/src/mame/novag/diablo.cpp @@ -6,7 +6,7 @@ Novag Diablo 68000 (model 908) Novag Scorpio 68000 (model 909) -Hardware notes (Diablo): +Hardware notes (Diablo 68000): - M68000 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high) - 2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 - 3*32KB ROM (27C256 or equivalent) @@ -344,17 +344,24 @@ void diablo_state::scorpio68k(machine_config &config) ROM Definitions *******************************************************************************/ -ROM_START( diablo68 ) // ID = D 1.08 +ROM_START( diablo68 ) // ID = D 1.08, serial 90999x ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_BYTE("d_904.u3", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) - ROM_LOAD16_BYTE("d_924.u2", 0x00001, 0x8000, CRC(e182dbdd) SHA1(24dacbef2173fa737636e4729ff22ec1e6623ca5) ) // only 2 bytes differ (one of them is the checksum) + ROM_LOAD16_BYTE("d_a09.u2", 0x00001, 0x8000, CRC(bcd27647) SHA1(2de5bccd4e7b9a32957811c0028dbca1a407b9b0) ) ROM_LOAD16_BYTE("502.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom ROM_END -ROM_START( diablo68a ) // ID = D 1.08 +ROM_START( diablo68a ) // ID = D 1.08, serial 90984x + ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_BYTE("d_904.u3", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) + ROM_LOAD16_BYTE("d_924.u2", 0x00001, 0x8000, CRC(e182dbdd) SHA1(24dacbef2173fa737636e4729ff22ec1e6623ca5) ) // only 4 bytes different from diablo68 + ROM_LOAD16_BYTE("502.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom +ROM_END + +ROM_START( diablo68b ) // ID = D 1.08, serial 90973x ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_BYTE("d_evn_904.u3", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) - ROM_LOAD16_BYTE("d_odd_904.u2", 0x00001, 0x8000, CRC(d46fcc7a) SHA1(8ed69cd0fec07bf5451eaa882c87cf7cf70c87eb) ) + ROM_LOAD16_BYTE("d_odd_904.u2", 0x00001, 0x8000, CRC(d46fcc7a) SHA1(8ed69cd0fec07bf5451eaa882c87cf7cf70c87eb) ) // only 2 bytes different from diablo68a ROM_LOAD16_BYTE("ds_bk.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom ROM_END @@ -377,5 +384,6 @@ ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS SYST( 1991, diablo68, 0, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 1)", MACHINE_SUPPORTS_SAVE ) SYST( 1991, diablo68a, diablo68, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 2)", MACHINE_SUPPORTS_SAVE ) +SYST( 1991, diablo68b, diablo68, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 3)", MACHINE_SUPPORTS_SAVE ) SYST( 1991, scorpio68, 0, 0, scorpio68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Scorpio 68000", MACHINE_SUPPORTS_SAVE ) From 3de5b7189393869a03feee5640d3461b099626bb Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 29 Aug 2024 15:32:40 +0200 Subject: [PATCH 33/44] novag*: small misc refactor --- ...novag_diablo68k.lay => novag_diablo68.lay} | 0 ...vag_scorpio68k.lay => novag_scorpio68.lay} | 34 ++++---- src/mame/novag/cexpert.cpp | 20 +---- src/mame/novag/cforte.cpp | 13 ++- src/mame/novag/const.cpp | 16 +--- src/mame/novag/diablo.cpp | 84 +++++++++---------- src/mame/novag/sexpert.cpp | 28 ++----- 7 files changed, 78 insertions(+), 117 deletions(-) rename src/mame/layout/{novag_diablo68k.lay => novag_diablo68.lay} (100%) rename src/mame/layout/{novag_scorpio68k.lay => novag_scorpio68.lay} (97%) diff --git a/src/mame/layout/novag_diablo68k.lay b/src/mame/layout/novag_diablo68.lay similarity index 100% rename from src/mame/layout/novag_diablo68k.lay rename to src/mame/layout/novag_diablo68.lay diff --git a/src/mame/layout/novag_scorpio68k.lay b/src/mame/layout/novag_scorpio68.lay similarity index 97% rename from src/mame/layout/novag_scorpio68k.lay rename to src/mame/layout/novag_scorpio68.lay index 67e75428e56..a5692b2876e 100644 --- a/src/mame/layout/novag_scorpio68k.lay +++ b/src/mame/layout/novag_scorpio68.lay @@ -504,23 +504,23 @@ authors:hap - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/mame/novag/cexpert.cpp b/src/mame/novag/cexpert.cpp index bc6b3ff2662..5226fcfad37 100644 --- a/src/mame/novag/cexpert.cpp +++ b/src/mame/novag/cexpert.cpp @@ -50,7 +50,6 @@ class cexpert_state : public driver_device m_inputs(*this, "IN.%u", 0) { } - // machine configs void cexpert(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(change_cpu_freq); @@ -67,13 +66,10 @@ class cexpert_state : public driver_device required_ioport_array<8> m_inputs; u8 m_inp_mux = 0; - u8 m_led_select = 0; - // address maps void main_map(address_map &map); // I/O handlers - void update_display(); void mux_w(u8 data); void control_w(u8 data); u8 input1_r(); @@ -82,9 +78,7 @@ class cexpert_state : public driver_device void cexpert_state::machine_start() { - // register for savestates save_item(NAME(m_inp_mux)); - save_item(NAME(m_led_select)); } INPUT_CHANGED_MEMBER(cexpert_state::change_cpu_freq) @@ -99,16 +93,11 @@ INPUT_CHANGED_MEMBER(cexpert_state::change_cpu_freq) I/O *******************************************************************************/ -void cexpert_state::update_display() -{ - m_display->matrix(1 << m_led_select, m_inp_mux); -} - void cexpert_state::mux_w(u8 data) { // d0-d7: input mux, led data m_inp_mux = data; - update_display(); + m_display->write_mx(data); } void cexpert_state::control_w(u8 data) @@ -116,11 +105,11 @@ void cexpert_state::control_w(u8 data) // d0-d2: clock/printer? // d3: enable beeper - m_beeper->set_state(data >> 3 & 1); + m_beeper->set_state(BIT(data, 3)); // d4-d7: 74145 to led select - m_led_select = data >> 4 & 0xf; - update_display(); + u8 sel = data >> 4 & 0xf; + m_display->write_my(1 << sel); } u8 cexpert_state::input1_r() @@ -145,7 +134,6 @@ u8 cexpert_state::input2_r() data |= m_inputs[i]->read() << 6; // other: ? - return ~data; } diff --git a/src/mame/novag/cforte.cpp b/src/mame/novag/cforte.cpp index d73742a7360..8e7289474fa 100644 --- a/src/mame/novag/cforte.cpp +++ b/src/mame/novag/cforte.cpp @@ -93,7 +93,7 @@ void cforte_state::machine_start() I/O *******************************************************************************/ -// HLCD0538 +// LCD void cforte_state::lcd_output_w(u64 data) { @@ -115,7 +115,7 @@ void cforte_state::lcd_output_w(u64 data) } -// TTL/generic +// misc void cforte_state::update_display() { @@ -135,9 +135,9 @@ void cforte_state::control_w(u8 data) // d0: HLCD0538 data in // d1: HLCD0538 clk // d2: HLCD0538 lcd - m_lcd->data_w(data & 1); - m_lcd->clk_w(data >> 1 & 1); - m_lcd->lcd_w(data >> 2 & 1); + m_lcd->data_w(BIT(data, 0)); + m_lcd->clk_w(BIT(data, 1)); + m_lcd->lcd_w(BIT(data, 2)); // d3: ? (goes high at power-off NMI) @@ -146,7 +146,7 @@ void cforte_state::control_w(u8 data) update_display(); // d7: enable beeper - m_beeper->set_state(data >> 7 & 1); + m_beeper->set_state(BIT(data, 7)); } u8 cforte_state::input1_r() @@ -171,7 +171,6 @@ u8 cforte_state::input2_r() data |= m_inputs[i]->read() << 6; // other: ? - return ~data; } diff --git a/src/mame/novag/const.cpp b/src/mame/novag/const.cpp index 5b7220376eb..04c89420f69 100644 --- a/src/mame/novag/const.cpp +++ b/src/mame/novag/const.cpp @@ -129,7 +129,6 @@ class const_state : public driver_device bool m_power = false; u8 m_inp_mux = 0; - u8 m_led_select = 0; // address maps void const_map(address_map &map); @@ -137,7 +136,6 @@ class const_state : public driver_device void sconst_map(address_map &map); // I/O handlers - void update_display(); void mux_w(u8 data); void control_w(u8 data); u8 input1_r(); @@ -149,7 +147,6 @@ void const_state::machine_start() // register for savestates save_item(NAME(m_power)); save_item(NAME(m_inp_mux)); - save_item(NAME(m_led_select)); } INPUT_CHANGED_MEMBER(const_state::power_off) @@ -175,28 +172,23 @@ void const_state::init_const() I/O *******************************************************************************/ -void const_state::update_display() -{ - m_display->matrix(m_led_select, m_inp_mux); -} - void const_state::mux_w(u8 data) { // d0-d7: input mux, led data m_inp_mux = data; - update_display(); + m_display->write_mx(data); } void const_state::control_w(u8 data) { // d0-d2: ? // d3: ? (goes high at power-off NMI) + // d4-d6: select led row - m_led_select = data >> 4 & 7; - update_display(); + m_display->write_my(data >> 4 & 7); // d7: enable beeper - m_beeper->set_state(data >> 7 & 1); + m_beeper->set_state(BIT(data, 7)); } u8 const_state::input1_r() diff --git a/src/mame/novag/diablo.cpp b/src/mame/novag/diablo.cpp index b3ed217d746..b97c7f0cd31 100644 --- a/src/mame/novag/diablo.cpp +++ b/src/mame/novag/diablo.cpp @@ -35,8 +35,8 @@ Scorpio 68000 hardware is very similar, but with chessboard buttons and side led #include "speaker.h" // internal artwork -#include "novag_diablo68k.lh" -#include "novag_scorpio68k.lh" +#include "novag_diablo68.lh" +#include "novag_scorpio68.lh" namespace { @@ -58,8 +58,8 @@ class diablo_state : public driver_device { } // machine configs - void diablo68k(machine_config &config); - void scorpio68k(machine_config &config); + void diablo68(machine_config &config); + void scorpio68(machine_config &config); protected: virtual void machine_start() override; @@ -77,18 +77,16 @@ class diablo_state : public driver_device required_ioport_array<8> m_inputs; u8 m_inp_mux = 0; - u8 m_led_data = 0; - u8 m_led_side = 0; u8 m_lcd_control = 0; u8 m_lcd_data = 0; // address maps - void diablo68k_map(address_map &map); - void scorpio68k_map(address_map &map); + void diablo68_map(address_map &map); + void scorpio68_map(address_map &map); // I/O handlers - void update_display(); void control_w(u8 data); + void control2_w(u8 data); void lcd_data_w(u8 data); void leds_w(u8 data); u8 input1_r(); @@ -102,8 +100,6 @@ void diablo_state::machine_start() { // register for savestates save_item(NAME(m_inp_mux)); - save_item(NAME(m_led_data)); - save_item(NAME(m_led_side)); save_item(NAME(m_lcd_control)); save_item(NAME(m_lcd_data)); } @@ -137,14 +133,7 @@ HD44780_PIXEL_UPDATE(diablo_state::lcd_pixel_update) } -// TTL - -void diablo_state::update_display() -{ - // update leds (lcd is done separately) - u8 led_select = 1 << m_inp_mux; - m_display->matrix(led_select, m_led_side << 8 | m_led_data); -} +// misc void diablo_state::control_w(u8 data) { @@ -155,14 +144,19 @@ void diablo_state::control_w(u8 data) m_lcd_control = data & 3; // d7: enable beeper - m_beeper->set_state(data >> 7 & 1); - - // d2,d3: side leds(scorpio) - m_led_side = ~data >> 2 & 3; + m_beeper->set_state(BIT(data, 7)); // d4-d6: input mux, led select m_inp_mux = data >> 4 & 7; - update_display(); + m_display->write_my(1 << m_inp_mux); +} + +void diablo_state::control2_w(u8 data) +{ + control_w(data); + + // d2,d3: side leds (scorpio68) + m_display->write_mx(~data >> 2 & 3); } void diablo_state::lcd_data_w(u8 data) @@ -173,9 +167,8 @@ void diablo_state::lcd_data_w(u8 data) void diablo_state::leds_w(u8 data) { - // d0-d7: chessboard leds - m_led_data = data; - update_display(); + // d0-d7: chessboard leds (diablo68) + m_display->write_mx(data); } u8 diablo_state::input1_r() @@ -197,7 +190,7 @@ u8 diablo_state::input2_r() Address Maps *******************************************************************************/ -void diablo_state::diablo68k_map(address_map &map) +void diablo_state::diablo68_map(address_map &map) { map(0x000000, 0x00ffff).rom(); map(0x200000, 0x20ffff).rom().region("maincpu", 0x10000); @@ -211,10 +204,10 @@ void diablo_state::diablo68k_map(address_map &map) map(0xff8000, 0xffbfff).ram().share("nvram"); } -void diablo_state::scorpio68k_map(address_map &map) +void diablo_state::scorpio68_map(address_map &map) { - diablo68k_map(map); - map(0x380000, 0x380000).w(FUNC(diablo_state::control_w)); + diablo68_map(map); + map(0x380000, 0x380000).w(FUNC(diablo_state::control2_w)); map(0x3c0000, 0x3c0001).nopw(); } @@ -224,7 +217,7 @@ void diablo_state::scorpio68k_map(address_map &map) Input Ports *******************************************************************************/ -static INPUT_PORTS_START( diablo68k ) +static INPUT_PORTS_START( diablo68 ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Go") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Take Back / Analyze Games") @@ -272,12 +265,12 @@ INPUT_PORTS_END Machine Configs *******************************************************************************/ -void diablo_state::diablo68k(machine_config &config) +void diablo_state::diablo68(machine_config &config) { // basic machine hardware M68000(config, m_maincpu, 16_MHz_XTAL); m_maincpu->set_interrupt_mixer(false); - m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::diablo68k_map); + m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::diablo68_map); auto &irq_clock(CLOCK(config, "irq_clock", 32.768_kHz_XTAL/128)); // 256Hz irq_clock.set_pulse_width(attotime::from_nsec(1380)); // active for 1.38us @@ -305,8 +298,8 @@ void diablo_state::diablo68k(machine_config &config) m_lcd->set_lcd_size(2, 8); m_lcd->set_pixel_update_cb(FUNC(diablo_state::lcd_pixel_update)); - PWM_DISPLAY(config, m_display).set_size(8, 8+2); - config.set_default_layout(layout_novag_diablo68k); + PWM_DISPLAY(config, m_display).set_size(8, 8); + config.set_default_layout(layout_novag_diablo68); // sound hardware SPEAKER(config, "mono").front_center(); @@ -325,17 +318,18 @@ void diablo_state::diablo68k(machine_config &config) m_rs232->dsr_handler().set("acia", FUNC(mos6551_device::write_dsr)); } -void diablo_state::scorpio68k(machine_config &config) +void diablo_state::scorpio68(machine_config &config) { - diablo68k(config); + diablo68(config); // basic machine hardware - m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::scorpio68k_map); + m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::scorpio68_map); m_board->set_type(sensorboard_device::BUTTONS); m_board->set_delay(attotime::from_msec(150)); - config.set_default_layout(layout_novag_scorpio68k); + m_display->set_width(2); + config.set_default_layout(layout_novag_scorpio68); } @@ -381,9 +375,9 @@ ROM_END Drivers *******************************************************************************/ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -SYST( 1991, diablo68, 0, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 1)", MACHINE_SUPPORTS_SAVE ) -SYST( 1991, diablo68a, diablo68, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 2)", MACHINE_SUPPORTS_SAVE ) -SYST( 1991, diablo68b, diablo68, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 3)", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1991, diablo68, 0, 0, diablo68, diablo68, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 1)", MACHINE_SUPPORTS_SAVE ) +SYST( 1991, diablo68a, diablo68, 0, diablo68, diablo68, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 2)", MACHINE_SUPPORTS_SAVE ) +SYST( 1991, diablo68b, diablo68, 0, diablo68, diablo68, diablo_state, empty_init, "Novag Industries", "Diablo 68000 (set 3)", MACHINE_SUPPORTS_SAVE ) -SYST( 1991, scorpio68, 0, 0, scorpio68k, diablo68k, diablo_state, empty_init, "Novag Industries", "Scorpio 68000", MACHINE_SUPPORTS_SAVE ) +SYST( 1991, scorpio68, 0, 0, scorpio68, diablo68, diablo_state, empty_init, "Novag Industries", "Scorpio 68000", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/novag/sexpert.cpp b/src/mame/novag/sexpert.cpp index d37e3a1dfbe..c1c92842530 100644 --- a/src/mame/novag/sexpert.cpp +++ b/src/mame/novag/sexpert.cpp @@ -103,7 +103,6 @@ class sexpert_state : public driver_device required_ioport_array<8> m_inputs; u8 m_inp_mux = 0; - u8 m_led_data = 0; u8 m_lcd_control = 0; u8 m_lcd_data = 0; @@ -111,7 +110,6 @@ class sexpert_state : public driver_device void sexpert_map(address_map &map); // I/O handlers - void update_display(); virtual void lcd_control_w(u8 data); virtual void lcd_data_w(u8 data); void leds_w(u8 data); @@ -127,7 +125,6 @@ void sexpert_state::machine_start() { // register for savestates save_item(NAME(m_inp_mux)); - save_item(NAME(m_led_data)); save_item(NAME(m_lcd_control)); save_item(NAME(m_lcd_data)); } @@ -213,13 +210,7 @@ HD44780_PIXEL_UPDATE(sexpert_state::lcd_pixel_update) } -// TTL/generic - -void sexpert_state::update_display() -{ - // update leds (lcd is done separately) - m_display->matrix(m_inp_mux, m_led_data); -} +// common void sexpert_state::lcd_control_w(u8 data) { @@ -240,8 +231,7 @@ void sexpert_state::lcd_data_w(u8 data) void sexpert_state::leds_w(u8 data) { // d0-d7: chessboard leds - m_led_data = data; - update_display(); + m_display->write_mx(data); } void sexpert_state::mux_w(u8 data) @@ -250,11 +240,11 @@ void sexpert_state::mux_w(u8 data) m_rombank->set_entry(data & 1); // d3: enable beeper - m_beeper->set_state(data >> 3 & 1); + m_beeper->set_state(BIT(data, 3)); // d4-d7: 74145 to input mux/led select m_inp_mux = 1 << (data >> 4 & 0xf) & 0xff; - update_display(); + m_display->write_my(m_inp_mux); } u8 sexpert_state::input1_r() @@ -301,10 +291,10 @@ void sforte_state::lcd_data_w(u8 data) // d0-d2: 74145 to input mux/led select // 74145 D from lcd control d2 (HD44780 E) m_inp_mux = 1 << ((m_lcd_control << 1 & 8) | (data & 7)); + m_display->write_my(m_inp_mux); // d5,d6: led data - m_led_data = ~data >> 5 & 3; - update_display(); + m_display->write_mx(~data >> 5 & 3); // d7: enable beeper // capacitor for noise filter (sound glitches otherwise) @@ -341,10 +331,7 @@ void sexpert_state::sexpert_map(address_map &map) void sforte_state::sforte_map(address_map &map) { sexpert_map(map); - map(0x1ff4, 0x1ff4).nopw(); - map(0x1ff5, 0x1ff5).nopw(); - map(0x1ff6, 0x1ff6).w(FUNC(sforte_state::lcd_control_w)); - map(0x1ff7, 0x1ff7).w(FUNC(sforte_state::lcd_data_w)); + map(0x1ff4, 0x1ff5).nopw(); } @@ -483,6 +470,7 @@ void sforte_state::sforte(machine_config &config) m_board->set_type(sensorboard_device::BUTTONS); + m_display->set_width(2); config.set_default_layout(layout_novag_sforte); } From ffc49cad9aa52efba7aa16920a2c7a00f22ac37a Mon Sep 17 00:00:00 2001 From: angelosa Date: Thu, 29 Aug 2024 18:57:12 +0200 Subject: [PATCH 34/44] excellent/lastbank.cpp: hookup inputs and dips for fever13 --- src/mame/excellent/d9final.cpp | 5 +- src/mame/excellent/lastbank.cpp | 272 +++++++++++++++++++++++++------- 2 files changed, 217 insertions(+), 60 deletions(-) diff --git a/src/mame/excellent/d9final.cpp b/src/mame/excellent/d9final.cpp index 68e7135c600..3fd07894611 100644 --- a/src/mame/excellent/d9final.cpp +++ b/src/mame/excellent/d9final.cpp @@ -6,9 +6,8 @@ Dream 9 Final (c) 1992 Excellent Systems TODO: - What does the ES8712 control? There's definitely no ADPCM chip or sample ROM here; -- Some inputs not understood; -- A bunch of missing port outputs (including payout); -- screen disable? Start-up fading looks horrible; +- lamps; +- Start-up fading looks horrible, video timings? btanb? - Game looks IGS-esque, is there any correlation? ============================================================================================ diff --git a/src/mame/excellent/lastbank.cpp b/src/mame/excellent/lastbank.cpp index 855b0d502fe..b3bf90fd771 100644 --- a/src/mame/excellent/lastbank.cpp +++ b/src/mame/excellent/lastbank.cpp @@ -1,26 +1,25 @@ // license:BSD-3-Clause // copyright-holders: Angelo Salese +/************************************************************************************************** -/*************************************************************************** - - Last Bank (c) 1994 Excellent System +Last Bank (c) 1994 Excellent System - driver by Angelo Salese +Uses a TC0091LVC, a variant of the one used on Taito L HW - Uses a TC0091LVC, a variant of the one used on Taito L HW +Undumped games on similar hardware (ES-9402 or ES-9410): +* Gold Strike +* Lucky Pierrot / Wonder Circus +* Miracle Seven - Heaven's Gate +* Miracle Seven - Heaven's Gate Turbo +* Ukiyo Box - Undumped games on similar hardware (ES-9402 or ES-9410): - * Gold Strike - * Lucky Pierrot / Wonder Circus - * Miracle Seven - Heaven's Gate - * Miracle Seven - Heaven's Gate Turbo - * Ukiyo Box +TODO: +- fever13: GFX ROM dump; +- fever13: OKI sound volume overdrives a lot; +- hookup hopper device; - TODO: - fever13: inputs / dips once the GFX ROM is dumped. Dips are helpfully - shown at startup -***************************************************************************/ +**************************************************************************************************/ #include "emu.h" @@ -50,40 +49,53 @@ class lastbank_state : public driver_device { } void lastbank(machine_config &config); - void fever13(machine_config &config); DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); protected: virtual void machine_start() override; + virtual void main_map(address_map &map); + virtual void audio_io(address_map &map); + + void sound_flags_w(uint8_t data); + private: required_device m_maincpu; required_device m_oki; required_device m_essnd; - uint8_t m_mux_data = 0; + uint8_t m_key_select = 0; uint8_t m_sound_flags = 0; void screen_vblank(int state); void output_w(offs_t offset, uint8_t data); - uint8_t mux_0_r(); - void mux_w(uint8_t data); - void sound_flags_w(uint8_t data); + uint8_t key_matrix_r(); + void key_select_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(irq_scanline); - void lastbank_audio_io(address_map &map); - void fever13_audio_io(address_map &map); - void audio_program_map(address_map &map); - void main_program_map(address_map &map); + void audio_map(address_map &map); void tc0091lvc_map(address_map &map); }; +class fever13_state : public lastbank_state +{ +public: + fever13_state(const machine_config &mconfig, device_type type, const char *tag) + : lastbank_state(mconfig, type, tag) + { } + +protected: + virtual void main_map(address_map &map) override; + virtual void audio_io(address_map &map) override; +}; + + void lastbank_state::machine_start() { - save_item(NAME(m_mux_data)); + save_item(NAME(m_key_select)); save_item(NAME(m_sound_flags)); } @@ -96,7 +108,7 @@ void lastbank_state::screen_vblank(int state) } -uint8_t lastbank_state::mux_0_r() +uint8_t lastbank_state::key_matrix_r() { const char *const keynames[2][5] = { {"P1_KEY0", "P1_KEY1", "P1_KEY2", "P1_KEY3", "P1_KEY4"}, @@ -108,7 +120,7 @@ uint8_t lastbank_state::mux_0_r() for(i=0;i<5;i++) { - if(m_mux_data & 1 << i) + if(m_key_select & 1 << i) res = ioport(keynames[0][i])->read(); } @@ -133,9 +145,9 @@ void lastbank_state::output_w(offs_t offset, uint8_t data) } } -void lastbank_state::mux_w(uint8_t data) +void lastbank_state::key_select_w(uint8_t data) { - m_mux_data = data; + m_key_select = data; } void lastbank_state::sound_flags_w(uint8_t data) @@ -163,33 +175,33 @@ void lastbank_state::tc0091lvc_map(address_map &map) map(0xff08, 0xff08).rw(m_maincpu, FUNC(tc0091lvc_device::rom_bank_r), FUNC(tc0091lvc_device::rom_bank_w)); } -void lastbank_state::main_program_map(address_map &map) +void lastbank_state::main_map(address_map &map) { tc0091lvc_map(map); map(0xa000, 0xa00d).noprw(); // MSM62X42B or equivalent probably read from here map(0xa800, 0xa800).portr("COINS"); map(0xa800, 0xa802).w(FUNC(lastbank_state::output_w)); - map(0xa803, 0xa803).w(FUNC(lastbank_state::mux_w)); // mux for $a808 / $a80c + map(0xa803, 0xa803).w(FUNC(lastbank_state::key_select_w)); map(0xa804, 0xa804).portr("SPECIAL"); map(0xa805, 0xa805).w("soundlatch1", FUNC(generic_latch_8_device::write)); map(0xa806, 0xa806).w("soundlatch2", FUNC(generic_latch_8_device::write)); map(0xa807, 0xa807).nopw(); // hopper? - map(0xa808, 0xa808).r(FUNC(lastbank_state::mux_0_r)); - map(0xa80c, 0xa80c).r(FUNC(lastbank_state::mux_0_r)); - map(0xa81c, 0xa81c).portr("DSW0"); - map(0xa81d, 0xa81d).portr("DSW1"); - map(0xa81e, 0xa81e).portr("DSW2"); - map(0xa81f, 0xa81f).portr("DSW3"); + map(0xa808, 0xa808).r(FUNC(lastbank_state::key_matrix_r)); + map(0xa80c, 0xa80c).r(FUNC(lastbank_state::key_matrix_r)); + map(0xa81c, 0xa81c).portr("DSW1"); + map(0xa81d, 0xa81d).portr("DSW2"); + map(0xa81e, 0xa81e).portr("DSW3"); + map(0xa81f, 0xa81f).portr("DSW4"); } -void lastbank_state::audio_program_map(address_map &map) +void lastbank_state::audio_map(address_map &map) { map(0x0000, 0xbfff).rom(); map(0xc000, 0xdfff).ram(); map(0xe000, 0xe7ff).ram(); } -void lastbank_state::lastbank_audio_io(address_map &map) +void lastbank_state::audio_io(address_map &map) { map.global_mask(0xff); map(0x00, 0x06).rw(m_essnd, FUNC(es8712_device::read), FUNC(es8712_device::write)); @@ -198,12 +210,19 @@ void lastbank_state::lastbank_audio_io(address_map &map) map(0xc0, 0xc0).r("soundlatch2", FUNC(generic_latch_8_device::read)); } -void lastbank_state::fever13_audio_io(address_map &map) +void fever13_state::main_map(address_map &map) { - lastbank_audio_io(map); + lastbank_state::main_map(map); + map(0xa808, 0xa808).portr("IN0"); + map(0xa80c, 0xa80c).portr("IN0"); +} + +void fever13_state::audio_io(address_map &map) +{ + lastbank_state::audio_io(map); map(0x80, 0x80).r("soundlatch2", FUNC(generic_latch_8_device::read)); - map(0xc0, 0xc0).r("soundlatch1", FUNC(generic_latch_8_device::read)).w(FUNC(lastbank_state::sound_flags_w)); + map(0xc0, 0xc0).r("soundlatch1", FUNC(generic_latch_8_device::read)).w(FUNC(fever13_state::sound_flags_w)); } static INPUT_PORTS_START( lastbank ) @@ -273,7 +292,7 @@ static INPUT_PORTS_START( lastbank ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("2-3") PORT_CODE(KEYCODE_A) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW0") + PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -299,7 +318,7 @@ static INPUT_PORTS_START( lastbank ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW1") + PORT_START("DSW2") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -325,7 +344,7 @@ static INPUT_PORTS_START( lastbank ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("DSW2") + PORT_START("DSW3") PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW3:1,2,3,4") PORT_DIPSETTING( 0x07, "1 Coin /100 Credits" ) PORT_DIPSETTING( 0x08, "1 Coin /50 Credits" ) @@ -361,7 +380,7 @@ static INPUT_PORTS_START( lastbank ) PORT_DIPSETTING( 0x20, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x00, "10 Coins /1 Credit" ) - PORT_START("DSW3") + PORT_START("DSW4") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -388,6 +407,152 @@ static INPUT_PORTS_START( lastbank ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( fever13 ) + PORT_INCLUDE( lastbank ) + + PORT_MODIFY("P1_KEY0") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P1_KEY1") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P1_KEY2") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P1_KEY3") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P1_KEY4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("COINS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) + + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) // "Right" + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) // "Left" + + PORT_MODIFY("DSW1") + PORT_DIPNAME( 0x03, 0x03, "Max Bet" ) PORT_DIPLOCATION("DSW1:1,2") + PORT_DIPSETTING( 0x03, "10" ) + PORT_DIPSETTING( 0x02, "20" ) + PORT_DIPSETTING( 0x01, "50" ) + PORT_DIPSETTING( 0x00, "90" ) + PORT_DIPNAME( 0x1c, 0x1c, "Win Percentage" ) PORT_DIPLOCATION("DSW1:3,4,5") + PORT_DIPSETTING( 0x1c, "95%" ) + PORT_DIPSETTING( 0x18, "90%" ) + PORT_DIPSETTING( 0x14, "85%" ) + PORT_DIPSETTING( 0x10, "80%" ) + PORT_DIPSETTING( 0x0c, "75%" ) + PORT_DIPSETTING( 0x08, "70%" ) + PORT_DIPSETTING( 0x04, "65%" ) + PORT_DIPSETTING( 0x00, "60%" ) + PORT_DIPNAME( 0x20, 0x20, "Hopper Motor" ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, "Hopper Count" ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, "Sensor SW" ) + PORT_DIPSETTING( 0x00, "Micro SW" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x01, 0x00, "Payout calculation" ) PORT_DIPLOCATION("DSW2:1") // "% Calculate with" + PORT_DIPSETTING( 0x01, "Gambling" ) + PORT_DIPSETTING( 0x00, "Amusement" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Difficulty" ) PORT_DIPLOCATION("DSW2:3,4") + PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) + PORT_DIPNAME( 0x10, 0x10, "Double-Up Game" ) PORT_DIPLOCATION("DSW2:5") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, "L/R SW Reverse" ) PORT_DIPLOCATION("DSW2:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, "Auto Stop" ) PORT_DIPLOCATION("DSW2:7") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, "Auto Start" ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + PORT_MODIFY("DSW3") + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW3:1,2,3,4") + PORT_DIPSETTING( 0x07, "1 Coin /100 Credits" ) + PORT_DIPSETTING( 0x08, "1 Coin /50 Credits" ) + PORT_DIPSETTING( 0x09, "1 Coin /25 Credits" ) + PORT_DIPSETTING( 0x0a, "1 Coin /20 Credits" ) + PORT_DIPSETTING( 0x0b, "1 Coin /10 Credits" ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x01, "5 Coins /2 Credits" ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x00, "10 Coins /1 Credit" ) + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW3:5,6,7,8") + PORT_DIPSETTING( 0x70, "1 Coin /100 Credits" ) + PORT_DIPSETTING( 0x80, "1 Coin /50 Credits" ) + PORT_DIPSETTING( 0x90, "1 Coin /25 Credits" ) + PORT_DIPSETTING( 0xa0, "1 Coin /20 Credits" ) + PORT_DIPSETTING( 0xb0, "1 Coin /10 Credits" ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x10, "5 Coins /2 Credits" ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x00, "10 Coins /1 Credit" ) + + PORT_MODIFY("DSW4") + PORT_DIPNAME( 0x07, 0x07, "Coin C" ) PORT_DIPLOCATION("DSW4:1,2,3") + PORT_DIPSETTING( 0x06, "1 Coin /50 Credits" ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x01, "9 Coins /1 Credit" ) + PORT_DIPSETTING( 0x00, "10 Coins /1 Credit" ) + PORT_DIPNAME( 0x38, 0x38, "Credit Limit" ) PORT_DIPLOCATION("DSW4:4,5,6") // "Give Up" + PORT_DIPSETTING( 0x38, "1000" ) + PORT_DIPSETTING( 0x30, "3000" ) + PORT_DIPSETTING( 0x28, "5000" ) + PORT_DIPSETTING( 0x20, "10000" ) + PORT_DIPSETTING( 0x18, "20000" ) + PORT_DIPSETTING( 0x10, "30000" ) + PORT_DIPSETTING( 0x08, "40000" ) + PORT_DIPSETTING( 0x00, "50000" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + +INPUT_PORTS_END + TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline) { int scanline = param; @@ -407,7 +572,7 @@ void lastbank_state::lastbank(machine_config &config) { // basic machine hardware TC0091LVC(config, m_maincpu, XTAL(14'318'181) / 4); //!!! TC0091LVC !!! - m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::main_program_map); + m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::main_map); m_maincpu->set_tilemap_xoffs(0,192); // TODO: correct? TIMER(config, "scantimer").configure_scanline(FUNC(lastbank_state::irq_scanline), "screen", 0, 1); @@ -415,8 +580,8 @@ void lastbank_state::lastbank(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); z80_device &audiocpu(Z80(config, "audiocpu", XTAL(14'318'181) / 4)); - audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::audio_program_map); - audiocpu.set_addrmap(AS_IO, &lastbank_state::lastbank_audio_io); + audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::audio_map); + audiocpu.set_addrmap(AS_IO, &lastbank_state::audio_io); // yes, we have no interrupts config.set_perfect_quantum(m_maincpu); @@ -453,13 +618,6 @@ void lastbank_state::lastbank(machine_config &config) // is also absent from some other games on the same hardware. } -void lastbank_state::fever13(machine_config &config) -{ - lastbank(config); - - subdevice("audiocpu")->set_addrmap(AS_IO, &lastbank_state::fever13_audio_io); -} - /*************************************************************************** Game driver(s) @@ -505,4 +663,4 @@ ROM_END GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, fever13, 0, fever13, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Fever 13 (v1.3)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // missing GFX dump +GAME( 1995, fever13, 0, lastbank, fever13, fever13_state, empty_init, ROT0, "Excellent System", "Fever 13 (Japan, v1.3)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL ) // missing GFX dump From 33cfe5e253777eb9d222ec68ac5d9f2093ea4be7 Mon Sep 17 00:00:00 2001 From: holub Date: Thu, 29 Aug 2024 13:36:10 -0400 Subject: [PATCH 35/44] sinclair: Reset caches after loading a saved state. (#12700) Updated sinclair/specnext_sprites.cpp, sinclair/sprinter.cpp and sinclair/tsconf.cpp. --- src/mame/sinclair/specnext_sprites.cpp | 5 +++++ src/mame/sinclair/specnext_sprites.h | 1 + src/mame/sinclair/sprinter.cpp | 13 ++++++++++--- src/mame/sinclair/tsconf.cpp | 6 ++++++ src/mame/sinclair/tsconf.h | 1 + 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/mame/sinclair/specnext_sprites.cpp b/src/mame/sinclair/specnext_sprites.cpp index da067ef43fe..d4a0ffef27f 100644 --- a/src/mame/sinclair/specnext_sprites.cpp +++ b/src/mame/sinclair/specnext_sprites.cpp @@ -317,6 +317,11 @@ void specnext_sprites_device::device_reset() update_config(); } +void specnext_sprites_device::device_post_load() +{ + m_sprites_cache.clear(); +} + // device type definition DEFINE_DEVICE_TYPE(SPECNEXT_SPRITES, specnext_sprites_device, "sprites", "Spectrum Next Sprites") diff --git a/src/mame/sinclair/specnext_sprites.h b/src/mame/sinclair/specnext_sprites.h index 2d3ec3eac0b..21c10ee73fd 100644 --- a/src/mame/sinclair/specnext_sprites.h +++ b/src/mame/sinclair/specnext_sprites.h @@ -44,6 +44,7 @@ class specnext_sprites_device : public device_t, public device_gfx_interface virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; virtual void device_start() override ATTR_COLD; virtual void device_reset() override ATTR_COLD; + virtual void device_post_load() override ATTR_COLD; memory_share_creator m_sprite_pattern_ram; memory_share_creator m_sprite_attr_ram; diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index e5d747559ba..4c8ce4e3cf7 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -108,9 +108,10 @@ class sprinter_state : public spectrum_128_state INPUT_CHANGED_MEMBER(turbo_changed); protected: - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; + virtual void device_post_load() override ATTR_COLD; void map_io(address_map &map); void map_mem(address_map &map); @@ -1416,6 +1417,12 @@ void sprinter_state::machine_reset() update_memory(); } +void sprinter_state::device_post_load() +{ + spectrum_128_state::device_post_load(); + m_ints.clear(); +} + static const gfx_layout sprinter_charlayout = { 8, 8, // 8 x 8 characters diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index f56ef0cd975..1dc2ddf7538 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -237,6 +237,12 @@ void tsconf_state::machine_reset() while (m_keyboard->read() != 0) { /* invalidate buffer */ } } +void tsconf_state::device_post_load() +{ + spectrum_128_state::device_post_load(); + m_sprites_cache.clear(); +} + INPUT_PORTS_START( tsconf ) PORT_INCLUDE( spec_plus ) diff --git a/src/mame/sinclair/tsconf.h b/src/mame/sinclair/tsconf.h index 157a5560a17..596d76b3d7c 100644 --- a/src/mame/sinclair/tsconf.h +++ b/src/mame/sinclair/tsconf.h @@ -54,6 +54,7 @@ class tsconf_state : public spectrum_128_state virtual void video_start() override ATTR_COLD; virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; + virtual void device_post_load() override ATTR_COLD; virtual TIMER_CALLBACK_MEMBER(irq_off) override; TIMER_CALLBACK_MEMBER(irq_frame); From 42b55aed723de01603265533dc1ec092d8764c0b Mon Sep 17 00:00:00 2001 From: mamehaze <140764005+mamehaze@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:01:10 +0100 Subject: [PATCH 36/44] fruitpar: Fix decryption; game now boots (#12701) --- src/mame/igs/pgmcrypt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/igs/pgmcrypt.cpp b/src/mame/igs/pgmcrypt.cpp index 2389edef502..e98ee17730e 100644 --- a/src/mame/igs/pgmcrypt.cpp +++ b/src/mame/igs/pgmcrypt.cpp @@ -1556,7 +1556,7 @@ void fruitpar_decrypt(running_machine &machine) IGS27_CRYPT4_ALT IGS27_CRYPT5 IGS27_CRYPT6 - IGS27_CRYPT7 + IGS27_CRYPT7_ALT IGS27_CRYPT8 x ^= fruitpar_tab[(i>> 1) & 0xff] << 8; From 4d06a147d7c4ad52c65af43a016946de2cc9a6ff Mon Sep 17 00:00:00 2001 From: ArcadeShadow Date: Thu, 29 Aug 2024 19:14:16 +0100 Subject: [PATCH 37/44] zx81_cass.xml: Added twenty items (eighteen working). (#12668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New working software list items (zx81_cass.xml) -------------------------------------------- Accounts [zx81stuff] Adventure (Gavin Baker) [zx81stuff] Bridgehead [Team Zeddy, Planeta Sinclair] Gamespack [Team Zeddy, Planeta Sinclair] Grand Prix [Planeta Sinclair] Inheritance [Team Zeddy, Planeta Sinclair] Le Chateau Hanté [Team Zeddy, Planeta Sinclair] Purchases [zx81stuff] Racehorse Trainer [zx81stuff] Sabotagem (Timex Portugal) [Planeta Sinclair] Serpents Tomb [Team Zeddy, Planeta Sinclair] Simulador de Voo (Timex Portugal) [Planeta Sinclair] Star Trek + 3D O's and X's [zx81stuff] The Nowotnik Puzzle & Other Diversions [zx81stuff] Tutor (French) [zx81stuff] Xadrez (Timex Portugal) [Planeta Sinclair] Zedman + Spacers [Team Zeddy, Planeta Sinclair] Zor [zx81stuff] New software list items marked not working (zx81_cass.xml) -------------------------------------------- Deflexx [Team Zeddy, Planeta Sinclair] Lemonade [Team Zeddy, Planeta Sinclair] --- hash/zx81_cass.xml | 329 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 296 insertions(+), 33 deletions(-) diff --git a/hash/zx81_cass.xml b/hash/zx81_cass.xml index 21f71e6c2be..6067fd45a8b 100644 --- a/hash/zx81_cass.xml +++ b/hash/zx81_cass.xml @@ -17,16 +17,6 @@ Due to the way the ZX81 saves to tape, different recordings of identical data (s might be stored along with a few different bytes in them. Additional dumps of the same releases should match those differences. TZX files for ZX81 are just the .P dumps with an additional header on top, so they may not be the cleanest format for archival. -Known dumps not yet added (as of 2023-06-14): -- Accounts [zx81stuff.org.uk] -- Adventure (G Barker) [zx81stuff.org.uk] -- Nowotnik Puzzle [Mr. Strudwick, zx81stuff.org.uk] -- Purchases [zx81stuff.org.uk] -- RacehorseTrainer [zx81stuff.org.uk] -- Star Trek and 3D Os and Xs [zx81stuff.org.uk] -- Tutor (French) [zx81stuff.org.uk] -- Zor [zx81stuff.org.uk] - --> @@ -266,6 +256,18 @@ Known dumps not yet added (as of 2023-06-14): + + Accounts + 1982 + Hestacrest + + + + + + + + Admiral Graf Spee 198? @@ -300,7 +302,7 @@ Known dumps not yet added (as of 2023-06-14): - Adventure + Adventure (Bug Byte) 1982 Bug Byte @@ -310,6 +312,18 @@ Known dumps not yet added (as of 2023-06-14): + + Adventure (Gavin Baker) + 1984 + Gavin Baker + + + + + + + + Adventure C 1982 @@ -945,6 +959,18 @@ Known dumps not yet added (as of 2023-06-14): + + Bridgehead + 1984 + Gavin Barker + + + + + + + + Bubble Bugs 1983 @@ -1191,7 +1217,7 @@ Known dumps not yet added (as of 2023-06-14): Catacombs 1981 - J.K.Greye Software + J.K. Greye Software @@ -1222,7 +1248,7 @@ Known dumps not yet added (as of 2023-06-14): - Centipede (dk) + Centipede (dK'tronics) 1982 dK'tronics @@ -1233,7 +1259,7 @@ Known dumps not yet added (as of 2023-06-14): - Centipede (Green Cover) + Centipede (dK'tronics, green cover) 198? dK'tronics @@ -1276,6 +1302,19 @@ Known dumps not yet added (as of 2023-06-14): + + Le Chateau Hanté + 1984 + Sprites + + + + + + + + + The Checkbook Manager 1982 @@ -1291,6 +1330,7 @@ Known dumps not yet added (as of 2023-06-14): Chess also Chess-Clock 1981 Sinclair Research + @@ -1306,9 +1346,10 @@ Known dumps not yet added (as of 2023-06-14): - Chess (MikroGen) + Chess (Mikro-Gen) 1982 Mikro-Gen + @@ -1323,10 +1364,11 @@ Known dumps not yet added (as of 2023-06-14): - - Chess (Psion) + + Chess (Mikro-Gen, orange cover) 1981 - Psion + Mikro-Gen + @@ -1341,7 +1383,7 @@ Known dumps not yet added (as of 2023-06-14): - + Chess (Timex) 1982 Timex @@ -1352,8 +1394,28 @@ Known dumps not yet added (as of 2023-06-14): - - Chess (Typed) + + Xadrez (Timex Portugal) + 1983 + Timex Portugal + + + + + + + + + + + + + + + + + + Chess (typed) 1981 Mikro-Gen @@ -1718,6 +1780,8 @@ Known dumps not yet added (as of 2023-06-14): Dallas (French) 1983 Cases Computer Simulations + + @@ -1765,6 +1829,17 @@ Known dumps not yet added (as of 2023-06-14): + + Deflexx + 1981 + dK'tronics + + + + + + + Dictator 1982 @@ -1795,7 +1870,7 @@ Known dumps not yet added (as of 2023-06-14): - Dodgems and Connect 4 (Brown Inlay) + Dodgems and Connect 4 (brown inlay) 1982 CDS Micro Systems @@ -2231,6 +2306,7 @@ Known dumps not yet added (as of 2023-06-14): Flight Simulation 1982 Sinclair Research + @@ -2238,10 +2314,11 @@ Known dumps not yet added (as of 2023-06-14): - - The Flight Simulator + + The Flight Simulator (Timex) 1982 Timex + @@ -2253,6 +2330,7 @@ Known dumps not yet added (as of 2023-06-14): Flug-Simulation 1982 Sinclair Research + @@ -2260,6 +2338,19 @@ Known dumps not yet added (as of 2023-06-14): + + Simulador de Voo (Timex Portugal) + 1982 + Timex Portugal + + + + + + + + + Football 198? @@ -2875,6 +2966,19 @@ Known dumps not yet added (as of 2023-06-14): + + Gamespack + 1982 + Mikro-Gen + + + + + + + + + Gamestape #3 1984 @@ -3044,6 +3148,19 @@ Known dumps not yet added (as of 2023-06-14): + + Grand Prix + 198? + Indescomp + + + + + + + + + Graphics Kit 1981 @@ -3588,7 +3705,7 @@ Known dumps not yet added (as of 2023-06-14): - Invaders (Re-release) + Invaders (re-release) 1982 Bug Byte @@ -3621,7 +3738,7 @@ Known dumps not yet added (as of 2023-06-14): - Invaders (Typed Inlay) + Invaders (typed inlay) 1981 Bug Byte @@ -4215,6 +4332,17 @@ Known dumps not yet added (as of 2023-06-14): + + Lemonade + 1983 + <unknown> + + + + + + + The List Manager 1982 @@ -4295,6 +4423,18 @@ Known dumps not yet added (as of 2023-06-14): + + Inheritance + 198? + Simon W. Hessel Software + + + + + + + + Machine Code Test Tool 1982 @@ -4890,6 +5030,19 @@ Known dumps not yet added (as of 2023-06-14): + + The Nowotnik Puzzle & Other Diversions + 1982 + Phipps Associates + + + + + + + + + Ocean Trader 1983 @@ -5458,6 +5611,18 @@ Known dumps not yet added (as of 2023-06-14): + + Purchases + 1982 + Hestacrest + + + + + + + + The Puzzler 1982 @@ -5495,7 +5660,7 @@ Known dumps not yet added (as of 2023-06-14): - QS Asteroids (Alt) + QS Asteroids (alt) 1982 Quicksilva @@ -5634,6 +5799,18 @@ Known dumps not yet added (as of 2023-06-14): + + Racehorse Trainer + 1984 + Gavin Barker + + + + + + + + Radio Programs 1 198? @@ -5833,6 +6010,8 @@ Known dumps not yet added (as of 2023-06-14): Sabotage 1982 Sinclair Research + + @@ -5840,6 +6019,19 @@ Known dumps not yet added (as of 2023-06-14): + + Sabotagem (Timex Portugal) + 1983 + Timex Portugal + + + + + + + + + Salvo 198? @@ -5922,6 +6114,19 @@ Known dumps not yet added (as of 2023-06-14): + + Serpents Tomb + 1983 + Vortex Software + + + + + + + + + Sea Wolf (Newer) 1983 @@ -6305,7 +6510,7 @@ Known dumps not yet added (as of 2023-06-14): - Star Trek (Typed Inlay) + Star Trek (typed inlay) 1981 Bug Byte @@ -6351,8 +6556,27 @@ Known dumps not yet added (as of 2023-06-14): + + Star Trek + 3D O's and X's + 1981 + Macronics + + + + + + + + + + + + + + + - States And Capitals + States and Capitals 1982 Timex @@ -7373,10 +7597,23 @@ Known dumps not yet added (as of 2023-06-14): + + Tutor (French) + 1983 + Artic + + + + + + + + - Tutor German + Tutor (German) 1983 Artic + @@ -7385,9 +7622,10 @@ Known dumps not yet added (as of 2023-06-14): - Tutor Spanish + Tutor (Spanish) 1983 Artic + @@ -7627,8 +7865,9 @@ Known dumps not yet added (as of 2023-06-14): Warlord - 1982 - Lothlorien + 1983 + M.C. Lothlorien + @@ -7875,6 +8114,18 @@ Known dumps not yet added (as of 2023-06-14): + + Zedman + Spacers + 1982 + Babtech + + + + + + + + Zombies/Sword of Peace 198? @@ -7886,6 +8137,18 @@ Known dumps not yet added (as of 2023-06-14): + + Zor + 1982 + International Publishing & Software + + + + + + + + Zuckman 1982 From b2f608fe69a58a0188c746ffcb8d3448db62cc4b Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 29 Aug 2024 22:19:55 +0200 Subject: [PATCH 38/44] New working systems ------------------- Aka Mahjong (Double Bet) [Hammy] New systems marked not working ------------------------------ Double 8 Lines [Ioannis Bampoulas] Super Cherry Master Plus [Ioannis Bampoulas] New clones marked not working ----------------------------- Turbo PK (Ver 2.3B2, encrypted) [Hammy] --- src/mame/dynax/royalmah.cpp | 16 +- src/mame/igs/cabaret.cpp | 259 ++++++++++++++++++++++++--------- src/mame/igs/igspoker.cpp | 74 +--------- src/mame/mame.lst | 10 +- src/mame/misc/cb2001.cpp | 22 ++- src/mame/skeleton/boramz80.cpp | 48 +++++- 6 files changed, 280 insertions(+), 149 deletions(-) diff --git a/src/mame/dynax/royalmah.cpp b/src/mame/dynax/royalmah.cpp index da390a485c3..c32f55d586b 100644 --- a/src/mame/dynax/royalmah.cpp +++ b/src/mame/dynax/royalmah.cpp @@ -4469,6 +4469,19 @@ ROM_START( ippatsu ) ROM_LOAD( "82s123an", 0x00, 0x20, CRC(3bde1bbd) SHA1(729498483943f960e38c4ada992b099b698b497a) ) ROM_END +// has NEW DOUBLE BET MOJHONG (sic) in ROM but title screen shows 赤麻雀 (Red Mahjong) +ROM_START( akamj ) + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "b3.bin", 0x00000, 0x8000, CRC(fb2e5a3e) SHA1(6a06b36dd3baa4c0aba339aaf2e00d82d08cbb22) ) + ROM_LOAD( "bc2.bin", 0x08000, 0x8000, CRC(38d2aa91) SHA1(b0469803265c6359dc5680e669324a41b84548d7) ) + ROM_LOAD( "bc1.bin", 0x10000, 0x8000, CRC(38d2aa91) SHA1(b0469803265c6359dc5680e669324a41b84548d7) ) // yes, same ROM 2 times + + ROM_REGION( 0x20, "proms", 0 ) + // taken from Royal Mahjong, might or might not be the same. + ROM_LOAD( "82s123.prm", 0x00, 0x20, BAD_DUMP CRC(d3007282) SHA1(e4d863ab193e49208ed0f59dcddb1da0492314f6) ) +ROM_END + + ROM_START( suzume ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD( "p1.bin", 0x00000, 0x1000, CRC(e9706967) SHA1(2e3d78178623de6552c9036da90e02f240d94055) ) @@ -6181,7 +6194,8 @@ GAME( 1984?, chalgirl, 0, chalgirl, royalmah, royalmah_prgbank_state, ini GAME( 1983, seljan, 0, seljan, seljan, royalmah_state, empty_init, ROT0, "Jem / Dyna Corp", "Sel-Jan (Japan)", 0 ) GAME( 1983, janyoup2, royalmj, janyoup2, janyoup2, royalmah_state, empty_init, ROT0, "Cosmo Denshi", "Janyou Part II (ver 7.03, July 1 1983)",0 ) GAME( 1985, tahjong, royalmj, tahjong, tahjong, royalmah_prgbank_state, init_tahjong, ROT0, "Bally Pond / Nasco", "Tahjong Yakitori (ver. 2-1)", 0 ) // 1985 Jun. 17 -GAME( 1981, janputer, 0, royalmah, royalmah, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd. / Mes)", "New Double Bet Mahjong (bootleg of Royal Mahjong)", 0 ) // MT #05392 +GAME( 1981, janputer, 0, royalmah, royalmah, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd. / Mes)", "New Double Bet Mahjong (bootleg of Royal Mahjong", 0 ) // MT #05392 +GAME( 1981, akamj, 0, ippatsu, ippatsu, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd.)", "Aka Mahjong (Double Bet)", 0 ) GAME( 1984, rkjanoh2, 0, rkjanoh2, royalmah, royalmah_prgbank_state, init_chalgirl, ROT0, "SNK / Dyna Corp", "Royal King Jang Oh 2 (v4.00 1984 Jun 10th)", MACHINE_WRONG_COLORS | MACHINE_NOT_WORKING ) // never seems to set the palette bank? GAME( 1984, janoh, 0, janoh, royalmah, royalmah_state, empty_init, ROT0, "Toaplan", "Jan Oh (set 1)", MACHINE_NOT_WORKING ) GAME( 1984, janoha, janoh, janoha, royalmah, royalmah_state, empty_init, ROT0, "Toaplan", "Jan Oh (set 2)", MACHINE_NOT_WORKING ) // this one is complete? diff --git a/src/mame/igs/cabaret.cpp b/src/mame/igs/cabaret.cpp index 5f4c6261519..200e695f630 100644 --- a/src/mame/igs/cabaret.cpp +++ b/src/mame/igs/cabaret.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:Mirko Buffoni, David Haywood +// copyright-holders: Mirko Buffoni, David Haywood + /*************************************************************************** Cabaret (AMT) @@ -15,6 +16,8 @@ Driver by Mirko Buffoni, David Haywood - Remove patches after finding why there are so many pitfalls. Maybe the game expects to read inputs via an external device and expects certain timings +- Trojan out internal ROMs for kungfua and double8l +- kungfua and double8l have 5 8-DIP banks (sheets available for double8l) Press F1+F2 during reset to see 'pork*ish' test mode :P @@ -24,9 +27,11 @@ are the same of IGS. AMT may be previous IGS name. ***************************************************************************/ #include "emu.h" + #include "cpu/z180/z180.h" #include "machine/i8255.h" #include "sound/ymopl.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -40,52 +45,62 @@ class cabaret_state : public driver_device public: cabaret_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") , m_fg_tile_ram(*this, "fg_tile_ram") , m_fg_color_ram(*this, "fg_color_ram") , m_bg_scroll(*this, "bg_scroll") , m_bg_tile_ram(*this, "bg_tile_ram") - , m_maincpu(*this, "maincpu") - , m_gfxdecode(*this, "gfxdecode") - , m_palette(*this, "palette") , m_led(*this, "led6") { } - void bg_scroll_w(offs_t offset, uint8_t data); - void bg_tile_w(offs_t offset, uint8_t data); - void fg_tile_w(offs_t offset, uint8_t data); - void fg_color_w(offs_t offset, uint8_t data); - void nmi_and_coins_w(uint8_t data); - void ppi2_b_w(uint8_t data); - void ppi2_c_w(uint8_t data); - void show_out(); - void init_cabaret(); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - TILE_GET_INFO_MEMBER(get_fg_tile_info); - uint32_t screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(cabaret_interrupt); void cabaret(machine_config &config); - void cabaret_map(address_map &map); - void cabaret_portmap(address_map &map); + + void init_cabaret(); + void init_double8l(); + void init_kungfua(); protected: virtual void machine_start() override { m_led.resolve(); } virtual void machine_reset() override; virtual void video_start() override; +private: + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; + required_shared_ptr m_fg_tile_ram; required_shared_ptr m_fg_color_ram; required_shared_ptr m_bg_scroll; required_shared_ptr m_bg_tile_ram; + + output_finder<> m_led; + tilemap_t *m_bg_tilemap = nullptr; tilemap_t *m_fg_tilemap = nullptr; - int m_nmi_enable = 0; + + uint8_t m_nmi_enable = 0; uint8_t m_out[3]{}; - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - output_finder<> m_led; -}; + void bg_scroll_w(offs_t offset, uint8_t data); + void bg_tile_w(offs_t offset, uint8_t data); + void fg_tile_w(offs_t offset, uint8_t data); + void fg_color_w(offs_t offset, uint8_t data); + void nmi_and_coins_w(uint8_t data); + void ppi2_b_w(uint8_t data); + void ppi2_c_w(uint8_t data); + void show_out(); + + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_tile_info); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt_cb); + + void program_map(address_map &map); + void port_map(address_map &map); +}; /*************************************************************************** @@ -93,8 +108,6 @@ class cabaret_state : public driver_device ***************************************************************************/ - - void cabaret_state::bg_scroll_w(offs_t offset, uint8_t data) { m_bg_scroll[offset] = data; @@ -109,14 +122,14 @@ void cabaret_state::bg_tile_w(offs_t offset, uint8_t data) TILE_GET_INFO_MEMBER(cabaret_state::get_bg_tile_info) { - int code = m_bg_tile_ram[tile_index]; + int const code = m_bg_tile_ram[tile_index]; tileinfo.set(1, code & 0xff, 0, 0); } TILE_GET_INFO_MEMBER(cabaret_state::get_fg_tile_info) { - int code = m_fg_tile_ram[tile_index] | (m_fg_color_ram[tile_index] << 8); - int tile = code & 0x1fff; + int const code = m_fg_tile_ram[tile_index] | (m_fg_color_ram[tile_index] << 8); + int const tile = code & 0x1fff; tileinfo.set(0, code, tile != 0x1fff ? ((code >> 12) & 0xe) + 1 : 0, 0); } @@ -134,14 +147,14 @@ void cabaret_state::fg_color_w(offs_t offset, uint8_t data) void cabaret_state::video_start() { - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cabaret_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 32, 64, 8); - m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cabaret_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cabaret_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 32, 64, 8); + m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(cabaret_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_fg_tilemap->set_transparent_pen(0); m_bg_tilemap->set_scroll_cols(64); } -uint32_t cabaret_state::screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t cabaret_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(m_palette->black_pen(), cliprect); @@ -169,14 +182,14 @@ void cabaret_state::nmi_and_coins_w(uint8_t data) { if ((m_nmi_enable ^ data) & (~0xdd)) { - logerror("PC %06X: nmi_and_coins = %02x\n",m_maincpu->pc(),data); + logerror("PC %06X: nmi_and_coins = %02x\n", m_maincpu->pc(), data); // popmessage("%02x",data); } - machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a - machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c - machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in - machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech + machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a + machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c + machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in + machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech m_led = BIT(data, 6); // led for coin m_out / hopper active @@ -200,13 +213,13 @@ void cabaret_state::ppi2_c_w(uint8_t data) -void cabaret_state::cabaret_map(address_map &map) +void cabaret_state::program_map(address_map &map) { map(0x00000, 0x0efff).rom(); map(0x0f000, 0x0ffff).ram(); } -void cabaret_state::cabaret_portmap(address_map &map) +void cabaret_state::port_map(address_map &map) { map(0x0000, 0x003f).ram(); // Z180 internal regs @@ -214,20 +227,20 @@ void cabaret_state::cabaret_portmap(address_map &map) map(0x0090, 0x0093).rw("ppi2", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x00a0, 0x00a3).rw("ppi3", FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0x00b0, 0x00b0).portr("DSW3"); /* DSW3 */ + map(0x00b0, 0x00b0).portr("DSW3"); map(0x00e0, 0x00e1).w("ymsnd", FUNC(ym2413_device::write)); - map(0x2000, 0x27ff).ram().w(FUNC(cabaret_state::fg_tile_w)).share("fg_tile_ram"); - map(0x2800, 0x2fff).ram().w(FUNC(cabaret_state::fg_color_w)).share("fg_color_ram"); + map(0x2000, 0x27ff).ram().w(FUNC(cabaret_state::fg_tile_w)).share(m_fg_tile_ram); + map(0x2800, 0x2fff).ram().w(FUNC(cabaret_state::fg_color_w)).share(m_fg_color_ram); map(0x3000, 0x37ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette"); map(0x3800, 0x3fff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext"); - map(0x1000, 0x103f).ram().w(FUNC(cabaret_state::bg_scroll_w)).share("bg_scroll"); + map(0x1000, 0x103f).ram().w(FUNC(cabaret_state::bg_scroll_w)).share(m_bg_scroll); - map(0x1800, 0x19ff).ram().w(FUNC(cabaret_state::bg_tile_w)).share("bg_tile_ram"); - map(0x8000, 0xffff).rom().region("gfx3", 0); + map(0x1800, 0x19ff).ram().w(FUNC(cabaret_state::bg_tile_w)).share(m_bg_tile_ram); + map(0x8000, 0xffff).rom().region("bgmaps", 0); } @@ -346,8 +359,8 @@ static const gfx_layout layout_8x32x6i = }; static GFXDECODE_START( gfx_cabaret ) - GFXDECODE_ENTRY( "gfx1", 0x00000, layout_8x8x6, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0x00000, layout_8x32x6i, 0, 16 ) + GFXDECODE_ENTRY( "fgtiles", 0x00000, layout_8x8x6, 0, 16 ) + GFXDECODE_ENTRY( "bgtiles", 0x00000, layout_8x32x6i, 0, 16 ) GFXDECODE_END @@ -359,10 +372,10 @@ GFXDECODE_END void cabaret_state::machine_reset() { - m_nmi_enable = 0; + m_nmi_enable = 0; } -INTERRUPT_GEN_MEMBER(cabaret_state::cabaret_interrupt) +INTERRUPT_GEN_MEMBER(cabaret_state::interrupt_cb) { if (m_nmi_enable & 0x80) device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -370,11 +383,11 @@ INTERRUPT_GEN_MEMBER(cabaret_state::cabaret_interrupt) void cabaret_state::cabaret(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware Z80180(config, m_maincpu, XTAL(12'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &cabaret_state::cabaret_map); - m_maincpu->set_addrmap(AS_IO, &cabaret_state::cabaret_portmap); - m_maincpu->set_vblank_int("screen", FUNC(cabaret_state::cabaret_interrupt)); + m_maincpu->set_addrmap(AS_PROGRAM, &cabaret_state::program_map); + m_maincpu->set_addrmap(AS_IO, &cabaret_state::port_map); + m_maincpu->set_vblank_int("screen", FUNC(cabaret_state::interrupt_cb)); i8255_device &ppi1(I8255(config, "ppi1")); ppi1.in_pa_callback().set_ioport("BUTTONS2"); @@ -392,19 +405,19 @@ void cabaret_state::cabaret(machine_config &config) ppi3.in_pb_callback().set_ioport("DSW1"); ppi3.in_pc_callback().set_ioport("DSW2"); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(512, 256); screen.set_visarea_full(); - screen.set_screen_update(FUNC(cabaret_state::screen_update_cabaret)); + screen.set_screen_update(FUNC(cabaret_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cabaret); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -414,13 +427,13 @@ void cabaret_state::init_cabaret() { uint8_t *rom = memregion("maincpu")->base(); - /* decrypt the program ROM */ + // decrypt the program ROM for (int i = 0; i < 0xf000; i++) { if ((i & 0x2206) == 0x2002) rom[i] ^= 0x01; } - /* Patch pitfalls */ + // Patch pitfalls rom[0x1012] = rom[0x1013] = 0; rom[0x13b8] = 0x18; @@ -432,25 +445,139 @@ void cabaret_state::init_cabaret() rom[0xc6c4] = 0x18; } +void cabaret_state::init_double8l() +{ + uint8_t *rom = memregion("maincpu")->base(); + + // TODO: verify if/when the internal ROM gets dumped + for (int i = 0x4000; i < 0x10000; i++) + if ((i & 0x3206) == 0x2002) + rom[i] = rom[i] ^ 0x01; +} + +void cabaret_state::init_kungfua() +{ + uint8_t *rom = memregion("maincpu")->base(); + + for (int i = 0x4000; i < 0x10000; i++) + { + rom[i] = rom[i] ^ 0x01; + } +} + + ROM_START( cabaret ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* 64k for code */ - ROM_LOAD( "cg-8v204.u97", 0x0000, 0x10000, CRC(44cebf77) SHA1(e3f4e4abf41388f0eed50cf9a0fd0b14aa2f8b93) ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "cg-8v204.u97", 0x00000, 0x10000, CRC(44cebf77) SHA1(e3f4e4abf41388f0eed50cf9a0fd0b14aa2f8b93) ) - ROM_REGION( 0x60000, "gfx1", 0 ) + ROM_REGION( 0x60000, "fgtiles", 0 ) ROM_LOAD( "cg-4.u43", 0x40000, 0x20000, CRC(e509f50a) SHA1(7e68ca54642c92cdb348d5cf9466065938d0e027) ) ROM_LOAD( "cg-5.u44", 0x20000, 0x20000, CRC(e2cbf489) SHA1(3a15ed7efd5696656e6d55b54ec0ff779bdb0d98) ) ROM_LOAD( "cg-6.u45", 0x00000, 0x20000, CRC(4f2fced7) SHA1(b954856ffdc97fbc99fd3ec087376fbf466d2d5a) ) - ROM_REGION( 0xc000, "gfx2", 0 ) + ROM_REGION( 0xc000, "bgtiles", 0 ) ROM_LOAD( "cg-1.u40", 0x8000, 0x4000, CRC(7dee8b1f) SHA1(80dbdf6aab9b02cc000956b7894023552428e6a1) ) ROM_LOAD( "cg-2.u41", 0x0000, 0x4000, CRC(ce8dea39) SHA1(b30d1678a7b98cd821d2ce7383a83cb7c9f31b5f) ) ROM_LOAD( "cg-3.u42", 0x4000, 0x4000, CRC(7e1f821f) SHA1(b709d49f9d1890fe3b8ca7f90affc0017a0ad95e) ) - ROM_REGION( 0x8000, "gfx3", 0 ) - ROM_LOAD( "cg-7.u98", 0x0000, 0x8000, CRC(b93ae6f8) SHA1(accb87045c278d5d79fff65bb763aa6e8025a945) ) /* background maps, read by the CPU */ + ROM_REGION( 0x8000, "bgmaps", 0 ) + ROM_LOAD( "cg-7.u98", 0x0000, 0x8000, CRC(b93ae6f8) SHA1(accb87045c278d5d79fff65bb763aa6e8025a945) ) // background maps, read by the CPU +ROM_END + +// custom CPU package DB8LN CPUV1.0 1991 (almost surely Z180 based). +ROM_START( double8l ) + ROM_REGION( 0x10000, "maincpu", 0 ) + // contains leftover x86 code at 0-3fff + ROM_LOAD( "db8ln_cpuv1.0_1991.u80", 0x00000, 0x04000, NO_DUMP ) + ROM_LOAD( "u97", 0x00000, 0x10000, CRC(84686a43) SHA1(9e41c725a4fe9c674979c8437715e5c3197e4aa2) ) // 27C512, didn't have an original sticker + + ROM_REGION( 0x60000, "fgtiles", 0 ) // all Intel 27C010A + ROM_LOAD( "d8ln_cgf4.u43", 0x40000, 0x20000, CRC(d16b724d) SHA1(37ad925b07ef64d28670a8937ef6edfb00708d59) ) + ROM_LOAD( "d8ln_cgf5.u44", 0x20000, 0x20000, CRC(7c4aa36f) SHA1(0d1fe127a300b3341b0f15c6bdaeffde1564b204) ) + ROM_LOAD( "d8ln_cgf6.u45", 0x00000, 0x20000, CRC(759a8b81) SHA1(9b885d0eab72c7257005f1da21269ce490888640) ) + + ROM_REGION( 0xc000, "bgtiles", 0 ) + ROM_LOAD( "d8ln_cgf1.u40", 0x8000, 0x4000, CRC(969bb2e9) SHA1(5aecce965f558a11ec117ab5ccb82b841de6051f) ) // Microchip 27C128 + ROM_LOAD( "d8ln_cgf2.u41", 0x0000, 0x4000, CRC(bf6ef240) SHA1(a79e16ba259f03c0479e87a647a3a6a2ce0a1aac) ) // Microchip 27C128 + ROM_LOAD( "d8ln_cgf3.u42", 0x4000, 0x4000, CRC(f432f709) SHA1(a203c01358b42f6b8639ce45afa70a86afdc79cf) ) // Intel 27128A + + ROM_REGION( 0x8000, "bgmaps", 0 ) + ROM_LOAD( "d8ln_cgf7.u98", 0x0000, 0x8000, CRC(5268ae60) SHA1(9e5d819fc5a5623cc3e81384ba542391c59ab7f1) ) // 27C256, background maps, read by the CPU + + ROM_REGION( 0x100, "proms", 0 ) + ROM_LOAD( "dm74s287.u38", 0x000, 0x100, CRC(935d8c14) SHA1(04e90b01ef1e3485d3bfcf9473a18b7afea25d1d) ) + + ROM_REGION( 0x600, "plds", ROMREGION_ERASE00 ) + ROM_LOAD( "ami18cv8.u46", 0x000, 0x155, NO_DUMP ) + ROM_LOAD( "pal16l8an.u47", 0x200, 0x104, NO_DUMP ) + ROM_LOAD( "ami18cv8.u48", 0x400, 0x155, NO_DUMP ) +ROM_END + +/* + +Cherry master looking board + +Big chip with no markings at U80 stickered KUNG FU + V1.0 + 1992 + +Board silkscreend on top PCB NO.0013-B + +.45 27010 stickered 6 +.44 27010 stickered 5 +.43 27010 stickered 4 +.42 27128 stickered 3 +.41 27128 stickered 2 +.40 27128 stickered 1 +.98 27256 stickered 7 couldn't read chip, but board was silkscreened 27c256 +.97 27512 stickered ? looked like Japanese writing +.38 74s287 +.46 18cv8 <--- same checksum as .48 +.47 pal16l8a <--- checksum was 0 +.48 18cv8 <--- same checksum as .46 + +unknown 24 pin chip @ u29 +open 24 pin socket @ u54 +12 MHz crystal + +5 x DSW8 +3 x NEC D8255AC + +*/ + +ROM_START( kungfua ) + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) + // u97 contains leftover x86 code at 0-3fff (compiled with Borland Turbo-C). + // You can rename the rom to kungfu.exe and run it (DOS MZ executable)! + // The rest is Z80 code, so the CPU at u80 is probably a variant with internal ROM. + ROM_LOAD( "kungfu-internal.u80", 0x00000, 0x04000, NO_DUMP ) + ROM_LOAD( "kungfu.u97", 0x00000, 0x10000, CRC(5c8e16de) SHA1(4af3795753d6e08f528b861d3a771c782e173556) ) + + ROM_REGION( 0x60000, "fgtiles", 0 ) + ROM_LOAD( "kungfu-4.u43", 0x40000, 0x20000, CRC(df4afedb) SHA1(56ab18c46a199653c284417a8e9edc9f32374318) ) + ROM_LOAD( "kungfu-5.u44", 0x20000, 0x20000, CRC(25c9c98e) SHA1(2d3a399d8d53ee5cb8106d2b35d1ab1778439f81) ) + ROM_LOAD( "kungfu-6.u45", 0x00000, 0x20000, CRC(f1ec5f0d) SHA1(0aa888e13312ed5d98953c81f03a61c6175c7fec) ) + + ROM_REGION( 0xc000, "bgtiles", ROMREGION_ERASE00 ) + ROM_LOAD( "kungfu-1.u40", 0x8000, 0x4000, CRC(abaada6b) SHA1(a6b910db7451e8ca737f43f32dfc8fc5ecf865f4) ) + ROM_LOAD( "kungfu-2.u41", 0x0000, 0x4000, CRC(927b3060) SHA1(a780ea5aaee04287cc9533c2d258dc18f8426530) ) + ROM_LOAD( "kungfu-3.u42", 0x4000, 0x4000, CRC(bbf78e03) SHA1(06fee093e75e2611d00c076c2e0a681938fa8b74) ) + + ROM_REGION( 0x8000, "bgmaps", 0 ) + ROM_LOAD( "kungfu-7.u98", 0x0000, 0x8000, CRC(1d3f0c79) SHA1(0a33798b69fbdc0fb7c47c51f5759e42acd2c608) ) // background maps, read by the CPU + + ROM_REGION( 0x100, "proms", 0 ) + ROM_LOAD( "kungfu.u38", 0x000, 0x100, CRC(2074f729) SHA1(eb9a60dec57a029ae6d3fc53aa7bc78e8ac34392) ) + + ROM_REGION( 0x1000, "plds", 0 ) // TODO: convert with jedutil + ROM_LOAD( "kungfu.u46", 0x000, 0xde1, CRC(5d4aacaf) SHA1(733546ce0585c40833e1c34504c33219a2bea0a9) ) + ROM_LOAD( "kungfu.u47", 0x000, 0xaee, CRC(5c7e25b5) SHA1(7d37e4abfe1256bd9cb168e0f02e651118dfb304) ) + ROM_LOAD( "kungfu.u48", 0x000, 0xde1, CRC(5d4aacaf) SHA1(733546ce0585c40833e1c34504c33219a2bea0a9) ) ROM_END } // anonymous namespace -GAME( 1992, cabaret, 0, cabaret, cabaret, cabaret_state, init_cabaret, ROT0, "AMT Co. Ltd.", "Cabaret Show", MACHINE_NOT_WORKING ) +GAME( 1992, cabaret, 0, cabaret, cabaret, cabaret_state, init_cabaret, ROT0, "AMT Co. Ltd.", "Cabaret Show", MACHINE_NOT_WORKING ) +GAME( 1992, double8l, 0, cabaret, cabaret, cabaret_state, init_double8l, ROT0, "AMT Co. Ltd.", "Double 8 Lines", MACHINE_NOT_WORKING ) // missing internal ROM dump +GAME( 1992, kungfua, kungfu, cabaret, cabaret, cabaret_state, init_kungfua, ROT0, "IGS", "Kung Fu Fighters (IGS, v100)", MACHINE_NOT_WORKING ) // missing internal ROM dump diff --git a/src/mame/igs/igspoker.cpp b/src/mame/igs/igspoker.cpp index cc6c9a89249..f522338ef10 100644 --- a/src/mame/igs/igspoker.cpp +++ b/src/mame/igs/igspoker.cpp @@ -125,7 +125,6 @@ class igspoker_state : public driver_device void init_cpoker300us(); void init_igs_ncs2(); void init_cpokerpk(); - void init_kungfua(); int hopper_r(); @@ -2964,76 +2963,7 @@ void igspoker_state::init_pktet346() rom[0xbb0c] = 0xc3; } -/* - -Cherry master looking board - -Big chip with no markings at U80 stickered KUNG FU - V1.0 - 1992 - -Board silkscreend on top PCB NO.0013-B - -.45 27010 stickered 6 -.44 27010 stickered 5 -.43 27010 stickered 4 -.42 27128 stickered 3 -.41 27128 stickered 2 -.40 27128 stickered 1 -.98 27256 stickered 7 couldn't read chip, but board was silkscreened 27c256 -.97 27512 stickered ? looked like Japanese writing -.38 74s287 -.46 18cv8 <--- same checksum as .48 -.47 pal16l8a <--- checksum was 0 -.48 18cv8 <--- same checksum as .46 - -unknown 24 pin chip @ u29 -open 24 pin socket @ u54 -12 MHz crystal - -5 x DSW8 -3 x NEC D8255AC - -*/ - -ROM_START( kungfua ) - ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) - // u97 contains leftover x86 code at 0-3fff (compiled with Borland Turbo-C). - // You can rename the rom to kungfu.exe and run it (DOS MZ executable)! - // The rest is Z80 code, so the CPU at u80 is probably a variant with internal ROM. - ROM_LOAD( "kungfu-internal.u80", 0x00000, 0x04000, NO_DUMP ) - ROM_LOAD( "kungfu.u97", 0x00000, 0x10000, CRC(5c8e16de) SHA1(4af3795753d6e08f528b861d3a771c782e173556) ) - ROM_LOAD( "kungfu-7.u98", 0x10000, 0x08000, CRC(1d3f0c79) SHA1(0a33798b69fbdc0fb7c47c51f5759e42acd2c608) ) - - ROM_REGION( 0x60000, "gfx1", 0 ) - ROM_LOAD( "kungfu-4.u43", 0x00000, 0x20000, CRC(df4afedb) SHA1(56ab18c46a199653c284417a8e9edc9f32374318) ) - ROM_LOAD( "kungfu-5.u44", 0x20000, 0x20000, CRC(25c9c98e) SHA1(2d3a399d8d53ee5cb8106d2b35d1ab1778439f81) ) - ROM_LOAD( "kungfu-6.u45", 0x40000, 0x20000, CRC(f1ec5f0d) SHA1(0aa888e13312ed5d98953c81f03a61c6175c7fec) ) - - ROM_REGION( 0x30000, "gfx2", ROMREGION_ERASE00 ) - ROM_LOAD( "kungfu-1.u40", 0x00000, 0x4000, CRC(abaada6b) SHA1(a6b910db7451e8ca737f43f32dfc8fc5ecf865f4) ) - ROM_LOAD( "kungfu-2.u41", 0x10000, 0x4000, CRC(927b3060) SHA1(a780ea5aaee04287cc9533c2d258dc18f8426530) ) - ROM_LOAD( "kungfu-3.u42", 0x20000, 0x4000, CRC(bbf78e03) SHA1(06fee093e75e2611d00c076c2e0a681938fa8b74) ) - - ROM_REGION( 0x1000, "plds", 0 ) - ROM_LOAD( "kungfu.u38", 0x000, 0x100, CRC(2074f729) SHA1(eb9a60dec57a029ae6d3fc53aa7bc78e8ac34392) ) - ROM_LOAD( "kungfu.u46", 0x000, 0xde1, CRC(5d4aacaf) SHA1(733546ce0585c40833e1c34504c33219a2bea0a9) ) - ROM_LOAD( "kungfu.u47", 0x000, 0xaee, CRC(5c7e25b5) SHA1(7d37e4abfe1256bd9cb168e0f02e651118dfb304) ) - ROM_LOAD( "kungfu.u48", 0x000, 0xde1, CRC(5d4aacaf) SHA1(733546ce0585c40833e1c34504c33219a2bea0a9) ) -ROM_END - -void igspoker_state::init_kungfua() -{ - uint8_t *rom = memregion("maincpu")->base(); - - for (int A = 0x4000; A < 0x10000; A++) - { - rom[A] = rom[A] ^ 0x01; - } - memset( &rom[0xf000], 0, 0x1000); -} - -} // Anonymous namespace +} // anonymous namespace GAMEL( 1993?,cpoker, 0, igspoker, cpoker, igspoker_state, init_cpoker, ROT0, "IGS", "Champion Poker (v220I)", 0, layout_igspoker ) @@ -3068,5 +2998,3 @@ GAMEL( 1998, stellecu, 0, number10, number10, igspoker_state, empty_in GAMEL( 1993?,pktet346, 0, pktetris, pktet346, igspoker_state, init_pktet346, ROT0, "IGS", "PK Tetris (v346I)", 0, layout_igspoker ) GAMEL( 199?, igstet341, pktet346, pktetris, igstet341,igspoker_state, init_tet341, ROT0, "IGS", "Tetris (v341R)", 0, layout_igspoker ) GAMEL( 199?, igstet342, pktet346, pktetris, igstet341,igspoker_state, init_tet341, ROT0, "IGS", "Tetris (v342R)", 0, layout_igspoker ) - -GAMEL( 1992, kungfua, kungfu, igspoker, cpoker, igspoker_state, init_kungfua, ROT0, "IGS", "Kung Fu Fighters (IGS, v100)", MACHINE_NOT_WORKING, layout_igspoker ) // missing internal ROM dump diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 0b537eb77c0..d7902f623d0 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -17535,6 +17535,7 @@ realbrkk // "600" Billiard Academy Real Break 1998 (Korea realbrko // "600" Billiard Academy Real Break 1998 (Europe) @source:dynax/royalmah.cpp +akamj // bootleg cafebrk // "528" Mahjong Cafe Break (C) 1999 Nakanihon / Dynax cafedoll // "76" (c) 1993 Dynax cafedollg // "76" (c) 1993 Dynax @@ -17550,7 +17551,7 @@ janoh // (c) 1984 Toaplan janoha // (c) 1984 Toaplan janptr96 // "503" (c) 1996 Dynax janptrsp // "511" (c) 1997 Dynax -janputer // (c) 1982 Taito +janputer // bootleg jansou // (c) 1985 Dyna jansoua // (c) 1985 Dyna janyoup2 // Falcon bootleg @@ -19959,6 +19960,8 @@ zoofari // (c) 2006 ICE/Play Mechanix @source:igs/cabaret.cpp cabaret // (c) 1992 AMT +double8l // (c) 1992 AMT +kungfua // (c) 1992 IGS @source:igs/dunhuang.cpp dunhuang // (c) 1995 @@ -20306,7 +20309,6 @@ igs_ncs // (c) 198? IGS igs_ncs2 // (c) 2000 IGS igstet341 // (c) 199? IGS igstet342 // (c) 199? IGS -kungfua // (c) 1992 IGS number10 // (c) IGS (Board labeled Playmark Srl) numbr10l // (c) IGS (Board labeled Playmark Srl) pktet346 // (c) 199? IGS @@ -29142,7 +29144,8 @@ castrev // Revolution @source:misc/cb2001.cpp cb2001 // (c) 2001 Dyna Electronics ndongmul2 // (c) 1999 Dyna Electronics -scherrym // (c) 2001? Dyna Electronics +scherrym // (c) 1997 Dyna Electronics +scherrymp // (c) 1997 Dyna Electronics @source:misc/chameleonrx1.cpp chamrx1 // 2003 @@ -41897,6 +41900,7 @@ boo1000 @source:skeleton/boramz80.cpp pkboram tpkboram +tpkborama @source:skeleton/bpmmicro.cpp bp1200 // (c) 1991 BP Microsystems diff --git a/src/mame/misc/cb2001.cpp b/src/mame/misc/cb2001.cpp index 57307f8a7b0..67788686ab0 100644 --- a/src/mame/misc/cb2001.cpp +++ b/src/mame/misc/cb2001.cpp @@ -1079,6 +1079,19 @@ ROM_START( scherrym ) // DYNA D9702 PCB; DYNA PLUS V1.6 in bookkeeping screen ROM_LOAD( "n82s135-2.bin", 0x200, 0x100, CRC(a19821db) SHA1(62dda90dd67dfbc0b96f161f1f2b7a46a5805eae) ) ROM_END +ROM_START( scherrymp ) // DYNA D9702 PCB; DYNA PLUS V1.0U in bookkeeping screen + ROM_REGION16_LE( 0x040000, "boot_prg", 0 ) + ROM_LOAD16_WORD( "m27c2001.bin", 0x000000, 0x40000, CRC(6e797b3f) SHA1(cc333e3dc2d416f1059559ce958bfe25a3869fc8) ) + + ROM_REGION( 0x080000, "gfx", ROMREGION_ERASEFF ) + // this board uses an unmarked MASK ROM at 12c, 12a is unpopulated. Size unknown. The bootleg PCB uses an mx29f1610ml, so possibly the same or compatible + ROM_LOAD( "gfx.12c", 0x000000, 0x80000, NO_DUMP ) + + ROM_REGION( 0x400, "proms", 0 ) + ROM_LOAD( "82s147.9b", 0x000, 0x200, CRC(dcf976d2) SHA1(73a08e4587f3516d694a8060b79470cf71df3925) ) + ROM_LOAD( "82s147.11b", 0x200, 0x200, CRC(a67e7a63) SHA1(b23e0eb9af13e57bbc8602ddc7fb381ba5c8267e) ) +ROM_END + /* New DongmulDongmul 2 (뉴 동물동물 2, New AnimalAnimal 2) runs on slightly different hardware, but with same CPU, custom and I/O. Video from the real hardware: https://youtu.be/1K9e_7RzeiM _______________________________________________________________________________ @@ -1138,7 +1151,8 @@ ROM_END } // anonymous namespace -// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS -GAME( 2001, cb2001, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "Cherry Bonus 2001", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1999, ndongmul2, 0, ndongmul2, ndongmul2, cb2001_state, empty_init, ROT0, "Dyna", "New DongmulDongmul 2", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // goes into the weeds at various point, due to either missing MCU dump or incomplete decryption. Bad reels GFX. -GAME( 2001, scherrym, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "Super Cherry Master", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 2001 version? (we have bootlegs running on z80 hw of a 1996 version) +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS +GAME( 2001, cb2001, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "Cherry Bonus 2001", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1999, ndongmul2, 0, ndongmul2, ndongmul2, cb2001_state, empty_init, ROT0, "Dyna", "New DongmulDongmul 2", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // goes into the weeds at various point, due to either missing MCU dump or incomplete decryption. Bad reels GFX. +GAME( 1997, scherrym, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "Super Cherry Master", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 2001 version? (we have bootlegs running on z80 hw of a 1996 version) +GAME( 1997, scherrymp, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "Super Cherry Master Plus", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // diff --git a/src/mame/skeleton/boramz80.cpp b/src/mame/skeleton/boramz80.cpp index b590e7e3324..5e77038e524 100644 --- a/src/mame/skeleton/boramz80.cpp +++ b/src/mame/skeleton/boramz80.cpp @@ -46,6 +46,8 @@ class boramz80_state : public driver_device void pk(machine_config &config) ATTR_COLD; + void init_tpkborama(); + protected: virtual void video_start() override ATTR_COLD; @@ -261,8 +263,50 @@ ROM_START( tpkboram ) ROM_LOAD( "10.pg8", 0x38000, 0x8000, CRC(4a293afa) SHA1(be532e6a476f78638e7f558bf8093e1914bc3688) ) ROM_END +// this runs on a newer ATPK-BORAM 0500 PCB. Given all GFX match tpkboram, it's probably a newer revision. +// code is encrypted +ROM_START( tpkborama ) + ROM_REGION( 0x8000, "maincpu", 0 ) + ROM_LOAD( "223.rom", 0x0000, 0x8000, CRC(1d776d37) SHA1(6918cddb0b47d28cf8145823f869dfd2296c0eed) ) + + ROM_REGION( 0x4000, "chars", 0 ) // these are same as tpkboram + ROM_LOAD( "1.cg1", 0x0000, 0x2000, CRC(69f44d04) SHA1(2f98805e4b70ce3426078f35ff260a3bc97fab86) ) + ROM_LOAD( "2.cg2", 0x2000, 0x2000, CRC(c1adf009) SHA1(0d5d8b39d40c807b9b5ed7418ba871c4d683286a) ) + + ROM_REGION( 0x40000, "tiles", 0 ) // these are all 1st and 2nd half identical, but same as tpkboram if split + ROM_LOAD( "3.pg1", 0x00000, 0x8000, CRC(612c5b39) SHA1(9682167b1fbbcd34b71c2628641b646a2993f61b) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "4.pg2", 0x08000, 0x8000, CRC(14ee6437) SHA1(a046b3efb14a400d201f7ce1c3ee0e01badb46a6) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "5.pg3", 0x10000, 0x8000, CRC(ce87f0c5) SHA1(96379856182bb0c81c805906551ec2e4aa2eb1d5) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "6.pg4", 0x18000, 0x8000, CRC(0a8a6106) SHA1(ac88f1ef2eb39cd24a236b2f18e85367c0736ae8) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "7.pg5", 0x20000, 0x8000, CRC(484a0eec) SHA1(6e32da2d4d78fb4c4bae2d2da945a71231051d5f) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "8.pg6", 0x28000, 0x8000, CRC(772d8996) SHA1(bd0412d0656a26a80b0f00ff5d6bcff2c4adb6c7) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "9.pg7", 0x30000, 0x8000, CRC(ff052a99) SHA1(7523ab2eeef1e44107710c8a68897daa7bf2ce12) ) + ROM_IGNORE( 0x8000 ) + ROM_LOAD( "10.pg8", 0x38000, 0x8000, CRC(61a4e0f3) SHA1(8d9f0efd3b691eaf93c933c63ba6aa34ebad71b1) ) + ROM_IGNORE( 0x8000 ) +ROM_END + + +void boramz80_state::init_tpkborama() +{ + uint8_t *rom = memregion("maincpu")->base(); + + for (int i = 0; i < 0x8000; i++) + { + // TODO + rom[i] = rom[i]; + } +} + } // anonymous namespace -GAME( 1987, pkboram, 0, pk, pkboram, boramz80_state, empty_init, ROT0, "Boram", "PK - New Exciting Poker!", MACHINE_IS_SKELETON ) // PK-BORAM 0211 aug.04.1987. BORAM CORP -GAME( 1988, tpkboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "Turbo PK", MACHINE_IS_SKELETON ) // PK-TURBO jan.29.1988. BORAM CORP. +GAME( 1987, pkboram, 0, pk, pkboram, boramz80_state, empty_init, ROT0, "Boram", "PK - New Exciting Poker!", MACHINE_IS_SKELETON ) // PK-BORAM 0211 aug.04.1987. BORAM CORP +GAME( 1988, tpkboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "Turbo PK", MACHINE_IS_SKELETON ) // PK-TURBO jan.29.1988. BORAM CORP. +GAME( 1998, tpkborama, tpkboram, pk, tpkboram, boramz80_state, init_tpkborama, ROT0, "Boram", "Turbo PK (Ver 2.3B2, encrypted)", MACHINE_IS_SKELETON ) // dep inctype-23B1998 0519Ver 2.3B2 From 0bd289b75898e69ec7f8684f34f811e95ee272f3 Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Fri, 30 Aug 2024 00:20:04 +0300 Subject: [PATCH 39/44] New not working clone --------------------- Mushiking The King Of Beetles - Mushiking IV / V / VI (Taiwan) [Justin Zhan, MetalliC, rtw, Xue] --- src/mame/mame.lst | 1 + src/mame/sega/naomi.cpp | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index d7902f623d0..61cbf57b247 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -39716,6 +39716,7 @@ mushi2eo // 2005.?? Mushiking The King Of Beetles II / II mushik2e // 2005.?? Mushiking The King Of Beetles II / III / III+ (Ver. 2.001) (World) mushik2k // 2006.?? Mushiking The King Of Beetles II / III / III+ (Ver. 1.000-) (Korea) mushik4e // 2007.?? Mushiking The King Of Beetles IV / V / VI (World) +mushik4t // 2007.?? Mushiking The King Of Beetles IV / V / VI (Taiwan) mvsc2 // 2000.03 Marvel Vs. Capcom 2 New Age of Heroes (Export, Korea) (Rev A) mvsc2u // 2000.03 Marvel Vs. Capcom 2 New Age of Heroes (USA) (Rev A) naomi // 1998.?? Naomi BIOS diff --git a/src/mame/sega/naomi.cpp b/src/mame/sega/naomi.cpp index 3e4345bb1c1..126ed0808e9 100644 --- a/src/mame/sega/naomi.cpp +++ b/src/mame/sega/naomi.cpp @@ -78,7 +78,9 @@ EPF8452AQC160-3 - Altera FLEX EPF8452AQC160-3 FPGA (QFP160) ADM485 - Analog Devices ADM485 +5 V Low Power EIA RS-485 Transceiver (SOIC8) PCM1725 - Burr-Brown PCM1725 Stereo Audio Digital to Analog Converter 16 Bits, 96kHz Sampling (SOIC14) JP1 - AICA sound block Master Clock source: 2-3 - onboard OSC1 33.8688MHz (default), 1-2 - cart/DIMM connector CN2 pin A48 (alt setting, not used at practice, there is no known devices which provide external AICA clock). - JP4 - set to 2-3. Alt setting is 1-2 + JP2 - (not mounted) Fan check: 1-2 - hold reset if fan not working (default), 2-3 - disabled. + JP3 - (not mounted) 315-6146 to Maple port 0 comms: 2-3 - enabled (default), 1-2 - disabled. + JP4 - Ext.NMI from CN1 A3 goes to: 2-3 - SH-4 NMI (default), 1-2 - SH-4 TCLK. CN1/2/3 - Connectors for ROM cart or GDROM DIMM Unit CN25/26 - Connectors for Filter Board @@ -677,6 +679,8 @@ Melty Blood Actress Again Version A (Rev A) 841-0061C 24455 6 \Mushiking II / III / III+ (Ver. 1.000-) (Korea) 840-0168C not present 2 (512Mb) present 317-0437-COM present requires 610-0669 barcode reader, 838-14245-92 "MAPLE/232C CONVERT BD" (MIE-based), 838-14243 "RFID CHIP R/W BD" and RFID chip /Mushiking The King Of Beetles \Mushiking IV / V / VI (World) 840-0180C not present 2 (512Mb) present 317-0437-COM present IC2# is labeled "VER.1", IC4# is marked "8A", requires 610-0669 barcode reader, 838-14245-92 "MAPLE/232C CONVERT BD" (MIE-based), 838-14243 "RFID CHIP R/W BD" and RFID chip +/Mushiking The King Of Beetles +\Mushiking IV / V / VI (Taiwan) 840-0181C not present 2 (512Mb) present 317-0437-COM present IC2# is labeled "VER.1", IC4# is marked "8A", requires 610-0669 barcode reader, 838-14245-92 "MAPLE/232C CONVERT BD" (MIE-based), 838-14243 "RFID CHIP R/W BD" and RFID chip Mushiking The King Of Beetles 2006 First (Japan) 840-0167C not present 2 (512Mb) present 317-0444-JPN present IC4# is marked "18", require 610-0669 barcode reader Mushiking The King Of Beetles 2006 Second (Japan) 840-0171C not present 2 (512Mb) present 317-0444-JPN present IC4# is marked "18", require 610-0669 barcode reader Pokasuka Ghost! 840-0170C not present 5 (512Mb) present 317-0461-COM present requires 837-14672 sensor board (SH4 based) @@ -6612,6 +6616,20 @@ ROM_START( mushik4e ) ROM_PARAMETER( ":rom_board:id", "5502" ) ROM_END +ROM_START( mushik4t ) + NAOMI_BIOS + NAOMI_DEFAULT_EEPROM + + ROM_REGION( 0x8000000, "rom_board", ROMREGION_ERASEFF) + ROM_LOAD( "fpr-24420.ic8", 0x0000000, 0x4000000, CRC(4a44a604) SHA1(deaba62d563ac835f673533ffe18f73937b9a26f) ) + ROM_LOAD( "fpr-24421.ic9", 0x4000000, 0x4000000, BAD_DUMP CRC(af137021) SHA1(2b380253263e92bc2dcf1a3262dfe7f32c3703dc) ) + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0437-com.ic3", 0, 0x800, CRC(3b6fcee8) SHA1(65fbdd3b8c61a4b5ccb6389b25483a7ecdc0794d) ) + + ROM_PARAMETER( ":rom_board:id", "5502" ) +ROM_END + ROM_START( zunou ) NAOMI_BIOS NAOMI_DEFAULT_EEPROM @@ -10436,7 +10454,7 @@ ROM_END /********************************************** * -* Naomi 2 network CD and DVD-ROM defines +* Naomi network CD and DVD-ROM defines * *********************************************/ @@ -11002,6 +11020,7 @@ void naomi_state::init_hotd2() /* 0175 */ GAME( 2007, asndynmto, asndynmt, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Asian Dynamite / Dynamite Deka EX (older)", GAME_FLAGS ) // no revision stickers, presumably older revision but might be release for Asian market /* 0177 */ GAME( 2007, rhytngk, naomi, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega / Nintendo - J.P ROOM", "Rhythm Tengoku (Japan)", GAME_FLAGS ) /* 0180 */ GAME( 2007, mushik4e, naomi, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Mushiking The King Of Beetles - Mushiking IV / V / VI (World)", GAME_FLAGS ) // not for Japan or Korea, version can be changed in secret menu, ~equivalent of Japanese 2K6 versions. +/* 0181 */ GAME( 2007, mushik4t, mushik4e, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Mushiking The King Of Beetles - Mushiking IV / V / VI (Taiwan)", GAME_FLAGS ) // not for Japan or Korea, version can be changed in secret menu, ~equivalent of Japanese 2K6 versions. /* 0183 */ GAME( 2009, shorseprvl,shorsepr, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Star Horse Progress Returns (main screen left)", GAME_FLAGS ) /* 0184 */ GAME( 2009, shorseprvr,shorsepr, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Star Horse Progress Returns (main screen right)", GAME_FLAGS ) /* 0185 */ GAME( 2009, shorseprl, shorsepr, naomim4, naomi, naomi_state, init_naomi, ROT0, "Sega", "Star Horse Progress Returns (live and voice)", GAME_FLAGS ) From 55bbe418d7492c3267d8405bc7935f33f0e7900b Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 30 Aug 2024 09:46:09 +0200 Subject: [PATCH 40/44] bombjack: remove BIT(v, 0, n), just use a mask, re-add enters after comment block --- src/mame/tecmo/bombjack.cpp | 39 ++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/mame/tecmo/bombjack.cpp b/src/mame/tecmo/bombjack.cpp index f17dcda5872..efaf5823bfa 100644 --- a/src/mame/tecmo/bombjack.cpp +++ b/src/mame/tecmo/bombjack.cpp @@ -46,6 +46,7 @@ * Convert the audio and video hardware to devices. ***********************************************************************/ + #include "emu.h" #include "cpu/z80/z80.h" @@ -201,6 +202,7 @@ class calorie_state : public bombjack_state * Audio hardware * *************************************/ + u8 bombjack_state::soundlatch_r() { // An extra flip-flop is used to clear the LS273 after @@ -220,6 +222,7 @@ u8 bombjack_state::soundlatch_r() * Video hardware * *************************************/ + void bombjack_state::video_start() { save_item(NAME(m_bg_image)); @@ -250,13 +253,13 @@ void bombjack_state::colorram_w(offs_t offset, u8 data) void bombjack_state::spritectrl_w(offs_t offset, u8 data) { - data = BIT(data, 0, 4); // four bits, addresses 16 sprites + data &= 0x0f; // four bits, addresses 16 sprites m_spritectrl[offset] = data; } void bombjack_state::background_w(u8 data) { - data = BIT(data, 0, 5); // four address bits + a "KILL" bit + data &= 0x1f; // four address bits + a "KILL" bit if (m_bg_image != data) { m_bg_image = data; @@ -266,8 +269,7 @@ void bombjack_state::background_w(u8 data) void bombjack_state::flip_w(u8 data) { - data = BIT(data, 0); - m_flip = data; + m_flip = BIT(data, 0); m_bg_tilemap->set_flip(m_flip ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); m_fg_tilemap->set_flip(m_flip ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); @@ -289,13 +291,12 @@ void bombjack_state::vblank_nmi(int state) void bombjack_state::watchdog_w(u8 data) { - data = BIT(data, 0); - m_watchdog->watchdog_enable(data); + m_watchdog->watchdog_enable(BIT(data, 0)); } void bombjack_state::set_bg_tile_info(u8 const attr, u16 &code, u8 &color, bool &flipx, bool &flipy) { - color = BIT(attr, 0, 4); + color = attr & 0x0f; flipy = BIT(attr, 7); } @@ -309,7 +310,7 @@ void calorie_state::set_bg_tile_info(u8 const attr, u16 &code, u8 &color, bool & TILE_GET_INFO_MEMBER(bombjack_state::get_bg_tile_info) { - tile_index |= BIT(m_bg_image, 0, 4) << 9; + tile_index |= (m_bg_image & 0x0f) << 9; u8 const attr = m_bgmaps[tile_index + 0x100]; u16 code = m_bgmaps[tile_index]; @@ -318,7 +319,7 @@ TILE_GET_INFO_MEMBER(bombjack_state::get_bg_tile_info) set_bg_tile_info(attr, code, color, flipx, flipy); tileinfo.set(1, code, color, (flipx ? TILE_FLIPX : 0) | - (flipy ? TILE_FLIPY : 0)); + (flipy ? TILE_FLIPY : 0)); } void bombjack_state::set_fg_tile_info(u8 const attr, u16 &code, u8 &color, bool &flipx, bool &flipy) @@ -345,14 +346,13 @@ TILE_GET_INFO_MEMBER(bombjack_state::get_fg_tile_info) set_fg_tile_info(attr, code, color, flipx, flipy); tileinfo.set(0, code, color, (flipx ? TILE_FLIPX : 0) | - (flipy ? TILE_FLIPY : 0)); + (flipy ? TILE_FLIPY : 0)); } bool bombjack_state::large_sprite(int const index, u8 const attr) { - bool const reverse = m_spritectrl[0] > m_spritectrl[1]; - return (index > m_spritectrl[reverse ? 1 : 0]) && - (index <= m_spritectrl[reverse ? 0 : 1]); + u8 const rev = (m_spritectrl[0] > m_spritectrl[1]) ? 1 : 0; + return (index > m_spritectrl[rev]) && (index <= m_spritectrl[rev ^ 1]); } bool calorie_state::large_sprite(int const index, u8 const attr) @@ -368,7 +368,7 @@ void bombjack_state::draw_sprites(bitmap_ind16 &bitmap, rectangle const &cliprec int const offs = sprite * 4; int code = m_spriteram[offs]; int const attr = m_spriteram[offs + 1]; - int const color = BIT(attr, 0, 4); + int const color = attr & 0x0f; // BIT(attr, 4) - internal tag for bonus objects // BIT(attr, 5) - internal tag for large objects bool flipx = BIT(attr, 6); @@ -382,7 +382,7 @@ void bombjack_state::draw_sprites(bitmap_ind16 &bitmap, rectangle const &cliprec if (BIT(sprite, 0)) continue; else - code |= (1 << 6); + code |= 0x40; } int const vpos = large ? VBSTART - 16 : VBSTART; @@ -396,7 +396,7 @@ void bombjack_state::draw_sprites(bitmap_ind16 &bitmap, rectangle const &cliprec } m_gfxdecode->gfx(large ? 3 : 2)->transpen(bitmap, cliprect, - code, color, flipx, flipy, xpos, ypos, 0); + code, color, flipx, flipy, xpos, ypos, 0); } } @@ -418,6 +418,7 @@ u32 bombjack_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, r * Address maps * *************************************/ + void bombjack_state::program_map(address_map &map) { map(0x0000, 0x0fff).ram().share(m_mainram); @@ -498,6 +499,7 @@ void bombjack_state::bombjack_audio_portmap(address_map &map) * (Bomb Jack) * *************************************/ + static INPUT_PORTS_START( bombjack ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY @@ -578,6 +580,7 @@ INPUT_PORTS_END * (Calorie Kun) * *************************************/ + static INPUT_PORTS_START( calorie ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_4WAY @@ -660,6 +663,7 @@ INPUT_PORTS_END * Graphics definitions * *************************************/ + static gfx_layout const layout_8x8 = { 8, 8, @@ -706,6 +710,7 @@ GFXDECODE_END * Machine driver * *************************************/ + void bombjack_state::machine_start() { save_item(NAME(m_nmi_on)); @@ -810,6 +815,7 @@ void calorie_state::init_calorieb() * (Bomb Jack) * *************************************/ + ROM_START( bombjack ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "09_j01b.bin", 0x0000, 0x2000, CRC(c668dc30) SHA1(51dd6a2688b42e9f28f0882bd76f75be7ec3222a) ) @@ -944,6 +950,7 @@ ROM_END * (Calorie Kun) * *************************************/ + /* Calorie Kun Sega, 1986 From 7ae196d1cf96506f3f15ff3a3ba8b8f68ac3055e Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 30 Aug 2024 10:46:04 +0200 Subject: [PATCH 41/44] igs_m027: add dsw read (commented out for now) --- src/mame/igs/igs_m027.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index d1774e27056..703dedac09e 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -49,9 +49,7 @@ class igs_m027_state : public driver_device m_oki(*this, "oki"), m_portb(*this, "PORTB"), m_portc(*this, "PORTC"), - m_dsw1(*this, "DSW1"), - m_dsw2(*this, "DSW2"), - m_dsw3(*this, "DSW3") + m_dsw(*this, "DSW%u", 1U) { } void igs_mahjong(machine_config &config); @@ -92,9 +90,7 @@ class igs_m027_state : public driver_device required_device m_oki; required_ioport m_portb; required_ioport m_portc; - required_ioport m_dsw1; - required_ioport m_dsw2; - required_ioport m_dsw3; + required_ioport_array<3> m_dsw; u32 unk_r(); u32 unk2_r(); @@ -153,7 +149,7 @@ void igs_m027_state::igs_mahjong_map(address_map &map) map(0x4000000c, 0x4000000f).r(FUNC(igs_m027_state::unk2_r)); map(0x40000018, 0x4000001b).w(FUNC(igs_m027_state::dsw_io_select_w)); - map(0x70000200, 0x70000203).ram(); //?????????????? + map(0x70000200, 0x70000203).ram(); // ?????????????? map(0x50000000, 0x500003ff).nopw(); // uploads XOR table to external ROM here map(0xf0000000, 0xf000000f).nopw(); // magic registers } @@ -165,7 +161,6 @@ void igs_m027_state::igs_mahjong_map(address_map &map) ***************************************************************************/ static INPUT_PORTS_START( base ) - PORT_START("DSW1") PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" ) PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" ) @@ -281,7 +276,6 @@ static INPUT_PORTS_START( jking02 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // maybe bet? PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) // maybe start? - INPUT_PORTS_END static INPUT_PORTS_START( qlgs ) @@ -291,7 +285,6 @@ static INPUT_PORTS_START( qlgs ) PORT_DIPNAME( 0x04, 0x00, "Link Mode" ) PORT_DIPSETTING( 0x04, "Linked" ) PORT_DIPSETTING( 0x00, "Standalone" ) - INPUT_PORTS_END static INPUT_PORTS_START( amazonia ) @@ -423,6 +416,16 @@ u32 igs_m027_state::unk2_r() u32 igs_m027_state::lhdmg_unk2_r() { +#if 0 + u32 data = 0xffffffff; + + for (int i = 0; i < 3; i++) + if (!BIT(m_dsw_io_select, i)) + data &= m_dsw[i]->read() | 0xffffff00; + + return data; +#endif + logerror("%s: lhdmg_unk2_r\n", machine().describe_context()); if (m_dsw_io_select & 1) From c11f2edf6aa89ae62b61c51df9a73152270d2f9e Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 30 Aug 2024 11:01:25 +0200 Subject: [PATCH 42/44] igs_m027: move dsw read to correct function, use set_ioport instead of trampolines for ppi b/c --- src/mame/igs/igs_m027.cpp | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 703dedac09e..86c6f7bf612 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -47,8 +47,6 @@ class igs_m027_state : public driver_device m_igs017_igs031(*this, "igs017_igs031"), m_screen(*this, "screen"), m_oki(*this, "oki"), - m_portb(*this, "PORTB"), - m_portc(*this, "PORTC"), m_dsw(*this, "DSW%u", 1U) { } @@ -88,8 +86,6 @@ class igs_m027_state : public driver_device required_device m_igs017_igs031; required_device m_screen; required_device m_oki; - required_ioport m_portb; - required_ioport m_portc; required_ioport_array<3> m_dsw; u32 unk_r(); @@ -100,8 +96,6 @@ class igs_m027_state : public driver_device void dsw_io_select_w(u32 data); u8 ppi_porta_r(); - u8 ppi_portb_r(); - u8 ppi_portc_r(); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); @@ -372,23 +366,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(igs_m027_state::interrupt) u8 igs_m027_state::ppi_porta_r() { - logerror("%s: ppi_porta_r\n", machine().describe_context()); - return 0xff; -} + u8 data = 0xff; -u8 igs_m027_state::ppi_portb_r() -{ - logerror("%s: ppi_portb_r\n", machine().describe_context()); - return m_portb->read(); -} + for (int i = 0; i < 3; i++) + if (!BIT(m_dsw_io_select, i)) + data &= m_dsw[i]->read(); -u8 igs_m027_state::ppi_portc_r() -{ - logerror("%s: ppi_portc_r\n", machine().describe_context()); - return m_portc->read(); + return data; } - void igs_m027_state::dsw_io_select_w(u32 data) { m_dsw_io_select = data; @@ -416,16 +402,6 @@ u32 igs_m027_state::unk2_r() u32 igs_m027_state::lhdmg_unk2_r() { -#if 0 - u32 data = 0xffffffff; - - for (int i = 0; i < 3; i++) - if (!BIT(m_dsw_io_select, i)) - data &= m_dsw[i]->read() | 0xffffff00; - - return data; -#endif - logerror("%s: lhdmg_unk2_r\n", machine().describe_context()); if (m_dsw_io_select & 1) @@ -462,8 +438,8 @@ void igs_m027_state::igs_mahjong(machine_config &config) I8255A(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(igs_m027_state::ppi_porta_r)); - m_ppi->in_pb_callback().set(FUNC(igs_m027_state::ppi_portb_r)); - m_ppi->in_pc_callback().set(FUNC(igs_m027_state::ppi_portc_r)); + m_ppi->in_pb_callback().set_ioport("PORTB"); + m_ppi->in_pc_callback().set_ioport("PORTC"); IGS017_IGS031(config, m_igs017_igs031, 0); From 10a284b04fbbba3e445c6de5638d60b6d226f463 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 30 Aug 2024 11:06:08 +0200 Subject: [PATCH 43/44] igs_m027: initialize m_dsw_io_select to 7 --- src/mame/igs/igs_m027.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 86c6f7bf612..2128169a8a8 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -113,7 +113,7 @@ void igs_m027_state::video_start() void igs_m027_state::machine_start() { - m_dsw_io_select = 0; + m_dsw_io_select = 7; m_unk2_write_count = 0; save_item(NAME(m_dsw_io_select)); From 087c945bd874aab374ede3de91e98dfd0fdd0e7f Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 30 Aug 2024 11:15:52 +0200 Subject: [PATCH 44/44] royalmah/bombjack: correct small typo --- src/mame/dynax/royalmah.cpp | 2 +- src/mame/tecmo/bombjack.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/dynax/royalmah.cpp b/src/mame/dynax/royalmah.cpp index c32f55d586b..1f946c9d2ce 100644 --- a/src/mame/dynax/royalmah.cpp +++ b/src/mame/dynax/royalmah.cpp @@ -6194,7 +6194,7 @@ GAME( 1984?, chalgirl, 0, chalgirl, royalmah, royalmah_prgbank_state, ini GAME( 1983, seljan, 0, seljan, seljan, royalmah_state, empty_init, ROT0, "Jem / Dyna Corp", "Sel-Jan (Japan)", 0 ) GAME( 1983, janyoup2, royalmj, janyoup2, janyoup2, royalmah_state, empty_init, ROT0, "Cosmo Denshi", "Janyou Part II (ver 7.03, July 1 1983)",0 ) GAME( 1985, tahjong, royalmj, tahjong, tahjong, royalmah_prgbank_state, init_tahjong, ROT0, "Bally Pond / Nasco", "Tahjong Yakitori (ver. 2-1)", 0 ) // 1985 Jun. 17 -GAME( 1981, janputer, 0, royalmah, royalmah, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd. / Mes)", "New Double Bet Mahjong (bootleg of Royal Mahjong", 0 ) // MT #05392 +GAME( 1981, janputer, 0, royalmah, royalmah, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd. / Mes)", "New Double Bet Mahjong (bootleg of Royal Mahjong)", 0 ) // MT #05392 GAME( 1981, akamj, 0, ippatsu, ippatsu, royalmah_state, empty_init, ROT0, "bootleg (Paradise Denshi Ltd.)", "Aka Mahjong (Double Bet)", 0 ) GAME( 1984, rkjanoh2, 0, rkjanoh2, royalmah, royalmah_prgbank_state, init_chalgirl, ROT0, "SNK / Dyna Corp", "Royal King Jang Oh 2 (v4.00 1984 Jun 10th)", MACHINE_WRONG_COLORS | MACHINE_NOT_WORKING ) // never seems to set the palette bank? GAME( 1984, janoh, 0, janoh, royalmah, royalmah_state, empty_init, ROT0, "Toaplan", "Jan Oh (set 1)", MACHINE_NOT_WORKING ) diff --git a/src/mame/tecmo/bombjack.cpp b/src/mame/tecmo/bombjack.cpp index efaf5823bfa..7b0dc26dc90 100644 --- a/src/mame/tecmo/bombjack.cpp +++ b/src/mame/tecmo/bombjack.cpp @@ -1086,5 +1086,5 @@ GAME( 1984, bombjack2, bombjack, bombjack, bombjack, bombjack_state, empty_init GAME( 1984, bombjackt, bombjack, bombjack, bombjack, bombjack_state, empty_init, ROT90, "Tehkan (Tecfri license)", "Bomb Jack (Tecfri, Spain)", MACHINE_SUPPORTS_SAVE ) // official license GAME( 1985, bombjackbl, bombjack, bombjack, bombjack, bombjack_state, empty_init, ROT90, "bootleg", "Bomb Jack (bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, calorie, 0, calorie, calorie, calorie_state, empty_init, ROT0, "Sega", "Calorie Kun vs Moguranian", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, calorieb, calorie, calorieb, calorie, calorie_state, init_calorieb, ROT0, "bootleg", "Calorie Kun vs Moguranian (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, calorie, 0, calorie, calorie, calorie_state, empty_init, ROT0, "Sega", "Calorie Kun vs Moguranian", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, calorieb, calorie, calorieb, calorie, calorie_state, init_calorieb, ROT0, "bootleg", "Calorie Kun vs Moguranian (bootleg)", MACHINE_SUPPORTS_SAVE )