From 2d1bf3ed5cb1f4cdcc40b286a78c24f398217535 Mon Sep 17 00:00:00 2001 From: Julian Sikorski Date: Wed, 29 Jul 2020 07:38:26 +0200 Subject: Fix redundancy in pacman-key --verify call Appveyor VS2017 image only ships with pacman 5.1.3 as of now. In that version pacman-key --verify only takes one argument, the signature. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 65fab2f279a..92a3789b711 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -37,7 +37,7 @@ for: - set MSYSTEM=MINGW64 - bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" - bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" - - bash -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - bash -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" - bash -lc "pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" - bash -lc "pacman -Syu --noconfirm" - taskkill /f /fi "MODULES eq msys-2.0.dll" -- cgit v1.2.3 From f3cc43065b5838a3fbf73c81db0f0e4946375f39 Mon Sep 17 00:00:00 2001 From: DavidHaywood <28625134+DavidHaywood@users.noreply.github.com> Date: Thu, 30 Jul 2020 17:14:50 +0100 Subject: new NOT WORKING machines ----- Lexibook Compact Cyber Arcade - Cars [TeamEurope, David Haywood] NJ Pocket 60-in-1 handheld 'X zero' (NTSC) [Takashi Omoto / https://twitter.com/takashioomoto , TeamEurope, David Haywood] --- src/mame/drivers/nes_vt.cpp | 8 ++++++++ src/mame/drivers/vt1682.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- src/mame/mame.lst | 2 ++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp index 038ec5ea147..2b7680b3051 100644 --- a/src/mame/drivers/nes_vt.cpp +++ b/src/mame/drivers/nes_vt.cpp @@ -1585,6 +1585,11 @@ ROM_START( lxcmcysp ) ROM_LOAD( "lexibookspiderman.bin", 0x00000, 0x4000000, CRC(ef6e8847) SHA1(0012df193c52fd48595d85886fd431619c5d5e3e) ) ROM_END +ROM_START( lxcmcycr ) + ROM_REGION( 0x4000000, "mainrom", 0 ) + ROM_LOAD( "lexibook cars.bin", 0x00000, 0x4000000, CRC(198fe11b) SHA1(5e35caa3fc319ec69812c187a3ec89f01749f749) ) +ROM_END + ROM_START( lxcmcypp ) ROM_REGION( 0x4000000, "mainrom", 0 ) // marked 512mbit, possible A22 / A23 are swapped as they were marked on the board in a different way. @@ -2046,8 +2051,11 @@ CONS( 200?, lxcmcysw, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_stat CONS( 200?, lxcmcyfz, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme CONS( 200?, lxcmcydp, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme CONS( 200?, lxcmcysp, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Marvel Ultimate Spider-Man", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme +CONS( 200?, lxcmcycr, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Cars", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme +// the data order is swapped for this one, maybe other internal differences? CONS( 200?, lxcmcypp, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, init_lxcmcypp, "Lexibook", "Lexibook Compact Cyber Arcade - Paw Patrol", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme + CONS( 200?, lxccminn, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Console Colour - Minnie Mouse", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme CONS( 200?, lxccplan, 0, 0, nes_vt_cy_bigger, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Console Colour - Disney's Planes", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme diff --git a/src/mame/drivers/vt1682.cpp b/src/mame/drivers/vt1682.cpp index 2db8043a856..2edbf8008fd 100644 --- a/src/mame/drivers/vt1682.cpp +++ b/src/mame/drivers/vt1682.cpp @@ -688,6 +688,7 @@ public: void vt1682_unk1682(machine_config& config); void unk1682_init(); + void njp60in1_init(); protected: uint8_t uio_porta_r(); @@ -5690,6 +5691,18 @@ static INPUT_PORTS_START( lxts3 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) INPUT_PORTS_END +static INPUT_PORTS_START( njp60in1 ) + PORT_START("IN0") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) +INPUT_PORTS_END + static INPUT_PORTS_START( exsprt48 ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) @@ -6031,6 +6044,16 @@ void vt1682_lxts3_state::unk1682_init() ROM[0x7ef45] = 0xea; } +void vt1682_lxts3_state::njp60in1_init() +{ + regular_init(); + + uint8_t* ROM = memregion("mainrom")->base(); + // first jsr in the code is for some port based security(?) check, might be SEEPROM + ROM[0x7ff44] = 0xea; + ROM[0x7ff45] = 0xea; + ROM[0x7ff46] = 0xea; +} // the VT1682 can have 0x1000 bytes of internal ROM, but none of the software dumped makes use of it. @@ -6115,6 +6138,18 @@ ROM_START( unk1682 ) ROM_CONTINUE(0x0800000, 0x0800000) ROM_CONTINUE(0x1000000, 0x0800000) ROM_CONTINUE(0x1800000, 0x0800000) + + // also has a 24c02N SEEPROM, no accesses noted (maybe accessed from 'internal ROM' code?) +ROM_END + +ROM_START( njp60in1 ) + ROM_REGION( 0x2000000, "mainrom", 0 ) // the 6Mbyte - 7Mbyte region of the ROM is missing, causing Extreme Power Soccer to fail + ROM_LOAD( "60-in-1.bin", 0x00000, 0x0800000, CRC(7b2ee951) SHA1(fc7c214704908b85676efc64a21930483d24a457) ) + ROM_CONTINUE(0x0800000, 0x0800000) + ROM_CONTINUE(0x1000000, 0x0800000) + ROM_CONTINUE(0x1800000, 0x0800000) + + // also has a 24c02n SEEPROM, seems to access it on startup (security check?) ROM_END @@ -6199,7 +6234,14 @@ CONS( 200?, dance555, 0, 0, vt1682_exsportp, dance555, vt1682_exsport_state // NJ Pocket 60-in-1 (NJ-250) is meant to have similar games to the mini-games found in wowwg and 110dance, so almost certainly fits here -// this appears to be related to the NJ Pocket, claims 101-in-1 but has some duplicates. It once again seems to incorrectly have the PAL version of 'Ranning Horse' but the NTSC version of 'Bomberman' +// manual explicitly states it has NTSC output only (unit can be connected to a TV) and both Ranning Horse + Explosion (Bomberman) are the NTSC versions +// has 21.477 Mhz XTAL +CONS( 200?, njp60in1, 0, 0, vt1682_lxts3, njp60in1, vt1682_lxts3_state, njp60in1_init, "", "NJ Pocket 60-in-1 handheld 'X zero' (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) // needs high colour line mode for main menu + +// this appears to be related to the NJ Pocket, claims 101-in-1 but has some duplicates. +// Like the 'Wow Wireless gaming' it incorrectly mixes the PAL version of 'Ranning Horse' with the NTSC version of 'Bomberman', it has no TV output. +// has 26.6017 Mhz (6xPAL) XTAL CONS( 200?, unk1682, 0, 0, vt1682_unk1682, lxts3, vt1682_lxts3_state, unk1682_init, "", "unknown VT1682 based 101-in-1 handheld (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) // needs high colour line mode for main menu CONS( 2010, lxts3, 0, 0, vt1682_lxts3, lxts3, vt1682_lxts3_state, regular_init, "Lexibook", "Toy Story 3 (Lexibook)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // random number generation issues on 2 games, linescroll on racing games + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 996af757aad..f5059ada4a4 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32088,6 +32088,7 @@ lxcmcyfz lxcmcydp lxcmcysp lxcmcypp +lxcmcycr lxccminn lxccplan rtvgc300 @@ -32178,6 +32179,7 @@ wowwg 110dance lxts3 unk1682 +njp60in1 @source:newbrain.cpp newbrain // -- cgit v1.2.3 From dc506df5f2ba10cc33eacad6710a6fafa1662e1e Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 31 Jul 2020 04:29:02 +1000 Subject: hector: cleanup --- src/mame/drivers/hec2hrp.cpp | 437 +++++++++++++++---------------------------- src/mame/includes/hec2hrp.h | 139 +++++++------- src/mame/machine/hec2hrp.cpp | 360 ++++++++++++++++++----------------- src/mame/video/hec2hrp.cpp | 72 ++----- 4 files changed, 408 insertions(+), 600 deletions(-) diff --git a/src/mame/drivers/hec2hrp.cpp b/src/mame/drivers/hec2hrp.cpp index 4aa37d6aa28..36977c2e70e 100644 --- a/src/mame/drivers/hec2hrp.cpp +++ b/src/mame/drivers/hec2hrp.cpp @@ -11,19 +11,31 @@ Hector 1 Interact - These machines can load and run cassettes for the interact / hector1. +The first model (Interact)was made by Interact Electronics Inc of Ann Arbor, +Michigan. However, just after launch, the company collapsed. The liquidator, +Protecto, sold some and MicroVideo sold the rest. MicroVideo continued to +develop but went under 2 years later. Meanwhile, the French company +Lambda Systems sold a clone called the Victor Lambda. But, like the +Americans, Lambda Systems also collapsed. Another French company, +Micronique, purchased all remaining stock and intellectual rights +from Lambda Systems, Microvideo and Interact, and the computer becomes +wholly French. The computer has a name change, becoming the Hector. +This in turn gets upgraded (2HR, HRX, MX). The line is finally +retired in about 1985. + +These machines can load and run cassettes for the interact / hector1. hec2hr - press 2 then 1 hec2hrp - press 2 then 1 victor - press R then L - These machines will load the cassette but the keys don't work +These machines will load the cassette but the keys don't work hec2hrx, hec2mx40, hec2mdhrx - press 5 then 1 - This machine not compatible +This machine not compatible hec2mx80 - 2009-05-12 Skeleton driver - Micko : mmicko@gmail.com - 2009-10-29 Update skeleton to functional machine by yo_fr (jj.stac @ aliceadsl.fr) +2009-05-12 Skeleton driver - Micko : mmicko@gmail.com +2009-10-29 Update skeleton to functional machine by yo_fr (jj.stac @ aliceadsl.fr) => add Keyboard, => add color, => add cassette, @@ -35,16 +47,16 @@ Important note : Keyboard emulation code obtained from DChector project : http://dchector.free.fr/ made by DanielCoulom (thanks Daniel) - 2010-01-03 Update and cleanup by yo_fr (jj.stac@aliceadsl.fr) +2010-01-03 Update and cleanup by yo_fr (jj.stac@aliceadsl.fr) => add the port mapping for keyboard - 2010-11-20 : synchronization between uPD765 and Z80 are now OK, CP/M running! JJStacino - 2011-11-11 : add minidisk (3.5") support JJStacino +2010-11-20 : synchronization between uPD765 and Z80 are now OK, CP/M running! JJStacino +2011-11-11 : add minidisk (3.5") support JJStacino - for more information about these machines, see the DChector project : http://dchector.free.fr/ made by DanielCoulom + For more information about these machines, see the DChector project : http://dchector.free.fr/ made by DanielCoulom (thanks to Daniel) and Yves site : http://hectorvictor.free.fr/ (thanks too Yves!) - TODO : Add cartridge functionality - Adjust the one-shot and A/D timing (sn76477) +TODO : Add cartridge functionality + Adjust the one-shot and A/D timing (sn76477) ****************************************************************************/ /* Joystick 1 : @@ -82,104 +94,44 @@ #include "formats/hector_minidisc.h" -void interact_state::interact_mem(address_map &map) +void hec2hrp_state::interact_mem(address_map &map) { map.unmap_value_high(); /* Main ROM page*/ - map(0x0000, 0x3fff).rom(); /*BANK(2)*/ -// map(0x1000,0x3fff).ram(); - - /* Hardware address mapping*/ -// map(0x0800, 0x0808).w(FUNC(interact_state::switch_bank_w)); // Bank management not used in BR machine*/ - map(0x1000, 0x1000).w(FUNC(interact_state::color_a_w)); /* Color c0/c1*/ - map(0x1800, 0x1800).w(FUNC(interact_state::color_b_w)); /* Color c2/c3*/ - map(0x2000, 0x2003).w(FUNC(interact_state::sn_2000_w)); /* Sound*/ - map(0x2800, 0x2803).w(FUNC(interact_state::sn_2800_w)); /* Sound*/ - map(0x3000, 0x3000).rw(FUNC(interact_state::cassette_r), FUNC(interact_state::sn_3000_w));/* Write necessary*/ - map(0x3800, 0x3807).rw(FUNC(interact_state::keyboard_r), FUNC(interact_state::keyboard_w)); /* Keyboard*/ - - /* Video br mapping*/ + map(0x0000, 0x3fff).rom(); + map(0x1000, 0x1000).w(FUNC(hec2hrp_state::color_a_w)); /* Color c0/c1*/ + map(0x1800, 0x1800).w(FUNC(hec2hrp_state::color_b_w)); /* Color c2/c3*/ + map(0x2000, 0x2003).w(FUNC(hec2hrp_state::sn_2000_w)); /* Sound*/ + map(0x2800, 0x2803).w(FUNC(hec2hrp_state::sn_2800_w)); /* Sound*/ + map(0x3000, 0x3000).rw(FUNC(hec2hrp_state::cassette_r), FUNC(hec2hrp_state::sn_3000_w));/* Write necessary*/ + map(0x3800, 0x3807).rw(FUNC(hec2hrp_state::keyboard_r), FUNC(hec2hrp_state::keyboard_w)); /* Keyboard*/ map(0x4000, 0x49ff).ram().share("videoram"); - /* continous RAM*/ map(0x4A00, 0xffff).ram(); } -void hec2hrp_state::hecdisc2_mem(address_map &map) -{ - map.unmap_value_high(); - - map(0x0000, 0x3fff).bankrw("bank3"); /* ROM at start up, RAM later */ - map(0x4000, 0xffff).ram(); -} - -void hec2hrp_state::hecdisc2_io(address_map &map) -{ - map.unmap_value_high(); - map.global_mask(0xff); - // ROM page handling - map(0x000, 0x00f).rw(FUNC(hec2hrp_state::disc2_io00_port_r), FUNC(hec2hrp_state::disc2_io00_port_w)); - // RS232 - 8251 comms handling - map(0x020, 0x02f).rw(FUNC(hec2hrp_state::disc2_io20_port_r), FUNC(hec2hrp_state::disc2_io20_port_w)); - // Hector comms handling - map(0x030, 0x03f).rw(FUNC(hec2hrp_state::disc2_io30_port_r), FUNC(hec2hrp_state::disc2_io30_port_w)); - map(0x040, 0x04f).rw(FUNC(hec2hrp_state::disc2_io40_port_r), FUNC(hec2hrp_state::disc2_io40_port_w)); - map(0x050, 0x05f).rw(FUNC(hec2hrp_state::disc2_io50_port_r), FUNC(hec2hrp_state::disc2_io50_port_w)); - // uPD765 link - map(0x060, 0x061).m(m_upd_fdc, FUNC(upd765a_device::map)); - map(0x070, 0x070).mirror(0x00f).rw(m_upd_fdc, FUNC(upd765a_device::dma_r), FUNC(upd765a_device::dma_w)); -} - void hec2hrp_state::hec2hrp_mem(address_map &map) { map.unmap_value_high(); - /* Main ROM page*/ - map(0x0000, 0x3fff).rom(); - - /* Hardware address mapping */ - map(0x0800, 0x0808).w(FUNC(hec2hrp_state::switch_bank_w));/* Bank handling */ - map(0x1000, 0x1000).w(FUNC(hec2hrp_state::color_a_w)); /* Color c0/c1 */ - map(0x1800, 0x1800).w(FUNC(hec2hrp_state::color_b_w)); /* Color c2/c3 */ - map(0x2000, 0x2003).w(FUNC(hec2hrp_state::sn_2000_w)); /* Sound */ - map(0x2800, 0x2803).w(FUNC(hec2hrp_state::sn_2800_w)); /* Sound */ - map(0x3000, 0x3000).rw(FUNC(hec2hrp_state::cassette_r), FUNC(hec2hrp_state::sn_3000_w)); /* Write necessary */ - map(0x3800, 0x3807).rw(FUNC(hec2hrp_state::keyboard_r), FUNC(hec2hrp_state::keyboard_w)); /* Keyboard */ - - /* Video br mapping */ - map(0x4000, 0x49ff).ram().share("videoram"); - /* contiguous RAM */ - map(0x4A00, 0xbfff).ram(); - /* from 0xC000 to 0xFFFF => Bank Ram for video and data */ - map(0xc000, 0xffff).ram().share("hector_videoram"); + interact_mem(map); + map(0x0800, 0x0808).w(FUNC(hec2hrp_state::switch_bank_w)); // bank management + map(0xc000, 0xffff).ram().share("hector_videoram"); /* => Bank Ram for video and data */ } void hec2hrp_state::hec2hrx_mem(address_map &map) { map.unmap_value_high(); - /* Main ROM page*/ - map(0x0000, 0x3fff).bankr("bank2"); - - /* Hardware address mapping*/ - map(0x0800, 0x0808).w(FUNC(hec2hrp_state::switch_bank_w));/* Bank handling */ - map(0x1000, 0x1000).w(FUNC(hec2hrp_state::color_a_w)); /* Color c0/c1 */ - map(0x1800, 0x1800).w(FUNC(hec2hrp_state::color_b_w)); /* Color c2/c3 */ - map(0x2000, 0x2003).w(FUNC(hec2hrp_state::sn_2000_w)); /* Sound */ - map(0x2800, 0x2803).w(FUNC(hec2hrp_state::sn_2800_w)); /* Sound */ - map(0x3000, 0x3000).rw(FUNC(hec2hrp_state::cassette_r), FUNC(hec2hrp_state::sn_3000_w)); /* Write necessary */ - map(0x3800, 0x3807).rw(FUNC(hec2hrp_state::keyboard_r), FUNC(hec2hrp_state::keyboard_w)); /* Keyboard */ - - /* Video br mapping */ - map(0x4000, 0x49ff).ram().share("videoram"); - /* contiguous RAM */ - map(0x4A00, 0xbfff).ram(); - /* from 0xC000 to 0xFFFF => Bank Ram for video and data */ - map(0xc000, 0xffff).bankrw("bank1").share("hector_videoram"); + hec2hrp_mem(map); + map(0x0000, 0x3fff).bankr("bank2"); /* Main ROM page*/ + map(0x3000, 0x3000).rw(FUNC(hec2hrp_state::cassette_r), FUNC(hec2hrp_state::sn_3000_w));/* Write necessary*/ + map(0x3800, 0x3807).rw(FUNC(hec2hrp_state::keyboard_r), FUNC(hec2hrp_state::keyboard_w)); /* Keyboard*/ + map(0xc000, 0xffff).bankrw("bank1").share("hector_videoram"); /* => Bank Ram for video and data */ } void hec2hrp_state::hec2hrp_io(address_map &map) { map.unmap_value_high(); map.global_mask(0xff); - map(0x000, 0x0ff).rw(FUNC(hec2hrp_state::io_8255_r), FUNC(hec2hrp_state::io_8255_w)); + map(0x00, 0xff).rw(FUNC(hec2hrp_state::io_8255_r), FUNC(hec2hrp_state::io_8255_w)); } void hec2hrp_state::hec2hrx_io(address_map &map) @@ -218,6 +170,33 @@ void hec2hrp_state::hec2mx80_io(address_map &map) } +// 2nd cpu +void hec2hrp_state::hecdisc2_mem(address_map &map) +{ + map.unmap_value_high(); + + map(0x0000, 0x3fff).bankrw("bank3"); /* ROM at start up, RAM later */ + map(0x4000, 0xffff).ram(); +} + +void hec2hrp_state::hecdisc2_io(address_map &map) +{ + map.unmap_value_high(); + map.global_mask(0xff); + // ROM page handling + map(0x00, 0x0f).rw(FUNC(hec2hrp_state::disc2_io00_port_r), FUNC(hec2hrp_state::disc2_io00_port_w)); + // RS232 - 8251 comms handling + map(0x20, 0x2f).rw(FUNC(hec2hrp_state::disc2_io20_port_r), FUNC(hec2hrp_state::disc2_io20_port_w)); + // Hector comms handling + map(0x30, 0x3f).rw(FUNC(hec2hrp_state::disc2_io30_port_r), FUNC(hec2hrp_state::disc2_io30_port_w)); + map(0x40, 0x4f).rw(FUNC(hec2hrp_state::disc2_io40_port_r), FUNC(hec2hrp_state::disc2_io40_port_w)); + map(0x50, 0x5f).rw(FUNC(hec2hrp_state::disc2_io50_port_r), FUNC(hec2hrp_state::disc2_io50_port_w)); + // uPD765 link + map(0x60, 0x61).m(m_upd_fdc, FUNC(upd765a_device::map)); + map(0x70, 0x70).mirror(0x0f).rw(m_upd_fdc, FUNC(upd765a_device::dma_r), FUNC(upd765a_device::dma_w)); +} + + /* Input ports */ static INPUT_PORTS_START( hec2hrp ) /* keyboard input */ @@ -309,16 +288,11 @@ static INPUT_PORTS_START( hec2hrp ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -MACHINE_RESET_MEMBER(interact_state,interact) +MACHINE_RESET_MEMBER(hec2hrp_state,interact) { hector_reset(0, 0); } -MACHINE_START_MEMBER(interact_state,interact) -{ - hector_init(); -} - MACHINE_START_MEMBER(hec2hrp_state,hec2hrp) { hector_init(); @@ -332,27 +306,27 @@ MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrp) MACHINE_START_MEMBER(hec2hrp_state,hec2hrx) { - uint8_t *RAM = memregion("maincpu")->base(); + uint8_t *r = m_ram->pointer(); //Patch rom possible ! - //RAMD2[0xff6b] = 0x0ff; // force verbose mode + //RAMD2[0xff6b] = 0xff; // force verbose mode // Memory install for bank switching - membank("bank1")->configure_entry(HECTOR_BANK_PROG , &RAM[0xc000]); - membank("bank1")->configure_entry(HECTOR_BANK_VIDEO, m_hector_videoram_hrx); // Video RAM + m_bank[1]->configure_entry(HECTOR_BANK_PROG, r+0x10000); + m_bank[1]->configure_entry(HECTOR_BANK_VIDEO, m_hector_videoram_hrx); // Video RAM // Set bank HECTOR_BANK_PROG as basic bank - membank("bank1")->set_entry(HECTOR_BANK_PROG); + m_bank[1]->set_entry(HECTOR_BANK_PROG); // MX-specific - membank("bank2")->configure_entry(HECTORMX_BANK_PAGE0 , &RAM[0x0000]); - membank("bank2")->configure_entry(HECTORMX_BANK_PAGE1 , memregion("page1")->base() ); // ROM page 1 - membank("bank2")->configure_entry(HECTORMX_BANK_PAGE2 , memregion("page2")->base() ); // ROM page 2 - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); + m_bank[2]->configure_entry(HECTORMX_BANK_PAGE0, m_rom); + m_bank[2]->configure_entry(HECTORMX_BANK_PAGE1, memregion("page1")->base() ); // ROM page 1 + m_bank[2]->configure_entry(HECTORMX_BANK_PAGE2, memregion("page2")->base() ); // ROM page 2 + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); // Disk II-specific - membank("bank3")->configure_entry(DISCII_BANK_ROM , memregion("rom_disc2")->base() ); // ROM - membank("bank3")->configure_entry(DISCII_BANK_RAM , memregion("disc2mem" )->base() ); // RAM - membank("bank3")->set_entry(DISCII_BANK_ROM); + m_bank[3]->configure_entry(DISCII_BANK_ROM, memregion("rom_disc2")->base() ); // ROM + m_bank[3]->configure_entry(DISCII_BANK_RAM, r); // RAM + m_bank[3]->set_entry(DISCII_BANK_ROM); // As video HR ram is in bank, use external memory m_hector_vram.set_target(m_hector_videoram_hrx,m_hector_vram.bytes()); @@ -364,20 +338,20 @@ MACHINE_START_MEMBER(hec2hrp_state,hec2mdhrx) /*****************************************************************************/ //minidisc { - uint8_t *RAM = memregion("maincpu")->base(); + uint8_t *r = m_ram->pointer(); // Memory install for bank switching - membank("bank1")->configure_entry(HECTOR_BANK_PROG, &RAM[0xc000]); - membank("bank1")->configure_entry(HECTOR_BANK_VIDEO, m_hector_videoram_hrx); // Video RAM + m_bank[1]->configure_entry(HECTOR_BANK_PROG, r+0x10000); + m_bank[1]->configure_entry(HECTOR_BANK_VIDEO, m_hector_videoram_hrx); // Video RAM // Set HECTOR_BANK_PROG as basic bank - membank("bank1")->set_entry(HECTOR_BANK_PROG); + m_bank[1]->set_entry(HECTOR_BANK_PROG); //Here, bank 5 is not used for the language switch but for the floppy ROM // Mini disk-specific - membank("bank2")->configure_entry(HECTOR_BANK_BASE, &RAM[0x0000]); // ROM base page - membank("bank2")->configure_entry(HECTOR_BANK_DISC, memregion("page2")->base() ); // ROM mini disc page - membank("bank2")->set_entry(HECTOR_BANK_BASE); + m_bank[2]->configure_entry(HECTOR_BANK_BASE, m_rom); // ROM base page + m_bank[2]->configure_entry(HECTOR_BANK_DISC, memregion("page2")->base() ); // ROM mini disc page + m_bank[2]->set_entry(HECTOR_BANK_BASE); // As video HR ram is in bank, use external memory m_hector_vram.set_target(m_hector_videoram_hrx,m_hector_vram.bytes()); @@ -388,11 +362,11 @@ MACHINE_START_MEMBER(hec2hrp_state,hec2mdhrx) MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrx) { // Hector Memory - membank("bank1")->set_entry(HECTOR_BANK_PROG); - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); + m_bank[1]->set_entry(HECTOR_BANK_PROG); + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); // DISK II Memory - membank("bank3")->set_entry(DISCII_BANK_ROM); + m_bank[3]->set_entry(DISCII_BANK_ROM); hector_reset(1, 1); hector_disc2_reset(); @@ -402,16 +376,16 @@ MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrx) MACHINE_RESET_MEMBER(hec2hrp_state,hec2mdhrx) { // Hector Memory - membank("bank1")->set_entry(HECTOR_BANK_PROG); - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); + m_bank[1]->set_entry(HECTOR_BANK_PROG); + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); hector_reset(1, 0); } -void interact_state::interact_common(machine_config &config) +void hec2hrp_state::interact_common(machine_config &config) { - MCFG_MACHINE_RESET_OVERRIDE(interact_state,interact) - MCFG_MACHINE_START_OVERRIDE(interact_state,interact) + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,interact) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrp) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -419,18 +393,16 @@ void interact_state::interact_common(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(256, 79); screen.set_visarea(0, 112, 0, 77); - screen.set_screen_update(FUNC(interact_state::screen_update_interact)); + screen.set_screen_update(FUNC(hec2hrp_state::screen_update_interact)); screen.set_palette(m_palette); - PALETTE(config, m_palette).set_entries(16); /* 8 colours, but only 4 at a time*/ - - MCFG_VIDEO_START_OVERRIDE(interact_state,hec2hrp) + PALETTE(config, m_palette, FUNC(hec2hrp_state::init_palette), 16); /* 8 colours, but only 4 at a time*/ hector_audio(config); CASSETTE(config, m_cassette); m_cassette->set_formats(hector_cassette_formats); - m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED); + m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); m_cassette->set_interface("interact_cass"); @@ -440,22 +412,22 @@ void interact_state::interact_common(machine_config &config) PRINTER(config, m_printer, 0); } -void interact_state::interact(machine_config &config) +void hec2hrp_state::interact(machine_config &config) { /* basic machine hardware */ I8080(config, m_maincpu, XTAL(2'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &interact_state::interact_mem); - m_maincpu->set_periodic_int(FUNC(interact_state::irq0_line_hold), attotime::from_hz(50)); + m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::interact_mem); + m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); interact_common(config); } -void interact_state::hector1(machine_config &config) +void hec2hrp_state::hector1(machine_config &config) { /* basic machine hardware */ Z80(config, m_maincpu, XTAL(1'750'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &interact_state::interact_mem); - m_maincpu->set_periodic_int(FUNC(interact_state::irq0_line_hold), attotime::from_hz(50)); + m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::interact_mem); + m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); interact_common(config); } @@ -472,6 +444,11 @@ static void minidisc_floppies(device_slot_interface &device) device.option_add("dd", FLOPPY_35_DD); } +static void hector_floppies(device_slot_interface &device) +{ + device.option_add("525hd", FLOPPY_525_HD); +} + void hec2hrp_state::hec2hr(machine_config &config) { @@ -491,8 +468,7 @@ void hec2hrp_state::hec2hr(machine_config &config) screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp)); screen.set_palette(m_palette); - PALETTE(config, m_palette).set_entries(16); - MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) + PALETTE(config, m_palette, FUNC(hec2hrp_state::init_palette), 16); /* 8 colours, but only 4 at a time*/ hector_audio(config); @@ -504,20 +480,17 @@ void hec2hrp_state::hec2hr(machine_config &config) PRINTER(config, m_printer, 0); - SOFTWARE_LIST(config, "cass_list").set_original("interact"); -} + /* internal ram */ + RAM(config, RAM_TAG).set_default_size("80K").set_default_value(0x00); -static void hector_floppies(device_slot_interface &device) -{ - device.option_add("525hd", FLOPPY_525_HD); + SOFTWARE_LIST(config, "cass_list").set_original("interact"); } -void hec2hrp_state::hec2mx40(machine_config &config) +void hec2hrp_state::hec2hrx(machine_config &config) { - Z80(config, m_maincpu, 5_MHz_XTAL); + hec2hr(config); m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hec2hrx_mem); - m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mx40_io); - m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); /* put on the Z80 irq in Hz*/ + m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2hrx_io); Z80(config, m_disc2cpu, 4_MHz_XTAL); m_disc2cpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hecdisc2_mem); @@ -532,76 +505,25 @@ void hec2hrp_state::hec2mx40(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) - - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(400)); /* 2500 not accurate */ - screen.set_size(512, 230); - screen.set_visarea(0, 243, 0, 227); - screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp)); - screen.set_palette(m_palette); - - PALETTE(config, m_palette).set_entries(16); - MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) - - hector_audio(config); - - CASSETTE(config, m_cassette); - m_cassette->set_formats(hector_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); - m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - - PRINTER(config, m_printer, 0); } -void hec2hrp_state::hec2hrx(machine_config &config) +void hec2hrp_state::hec2mx40(machine_config &config) { - Z80(config, m_maincpu, 5_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hec2hrx_mem); - m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2hrx_io); - m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); /* put on the Z80 irq in Hz*/ - - MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) - MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) - - Z80(config, m_disc2cpu, 4_MHz_XTAL); - m_disc2cpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hecdisc2_mem); - m_disc2cpu->set_addrmap(AS_IO, &hec2hrp_state::hecdisc2_io); - - UPD765A(config, m_upd_fdc, 8'000'000, false, true); - m_upd_fdc->intrq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_interrupt)); - m_upd_fdc->drq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_dma_irq)); - - FLOPPY_CONNECTOR(config, m_upd_connector[0], hector_floppies, "525hd", floppy_image_device::default_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, m_upd_connector[1], hector_floppies, "525hd", floppy_image_device::default_floppy_formats).enable_sound(true); - - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(400)); /* 2500 not accurate */ - screen.set_size(512, 230); - screen.set_visarea(0, 243, 0, 227); - screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp)); - screen.set_palette(m_palette); - - PALETTE(config, m_palette).set_entries(16); - MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) - - hector_audio(config); - - CASSETTE(config, m_cassette); - m_cassette->set_formats(hector_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); - m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + hec2hrx(config); + m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mx40_io); +} - PRINTER(config, m_printer, 0); +void hec2hrp_state::hec2mx80(machine_config &config) +{ + hec2hrx(config); + m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mx80_io); } void hec2hrp_state::hec2mdhrx(machine_config &config) { - Z80(config, m_maincpu, 5_MHz_XTAL); + hec2hr(config); m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hec2hrx_mem); m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mdhrx_io); - m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); /* put on the Z80 irq in Hz*/ MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2mdhrx) MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2mdhrx) @@ -609,74 +531,13 @@ void hec2hrp_state::hec2mdhrx(machine_config &config) /* 3.5" ("mini") disc */ FD1793(config, m_minidisc_fdc, 1_MHz_XTAL); FLOPPY_CONNECTOR(config, "wd179x:0", minidisc_floppies, "dd", hec2hrp_state::minidisc_formats).enable_sound(true); - - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(400)); /* 2500 not accurate */ - screen.set_size(512, 230); - screen.set_visarea(0, 243, 0, 227); - screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp)); - screen.set_palette(m_palette); - - PALETTE(config, m_palette).set_entries(16); - MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) - - hector_audio(config); - - CASSETTE(config, m_cassette); - m_cassette->set_formats(hector_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); - m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - - PRINTER(config, m_printer, 0); } -void hec2hrp_state::hec2mx80(machine_config &config) -{ - Z80(config, m_maincpu, 5_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hec2hrx_mem); - m_maincpu->set_addrmap(AS_IO, &hec2hrp_state::hec2mx80_io); - m_maincpu->set_periodic_int(FUNC(hec2hrp_state::irq0_line_hold), attotime::from_hz(50)); /* put on the Z80 irq in Hz*/ - - MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) - MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) - - Z80(config, m_disc2cpu, 4_MHz_XTAL); - m_disc2cpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hecdisc2_mem); - m_disc2cpu->set_addrmap(AS_IO, &hec2hrp_state::hecdisc2_io); - - UPD765A(config, m_upd_fdc, 8'000'000, false, true); - m_upd_fdc->intrq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_interrupt)); - m_upd_fdc->drq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_dma_irq)); - - FLOPPY_CONNECTOR(config, m_upd_connector[0], hector_floppies, "525hd", floppy_image_device::default_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, m_upd_connector[1], hector_floppies, "525hd", floppy_image_device::default_floppy_formats).enable_sound(true); - - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(400)); /* 2500 not accurate */ - screen.set_size(512, 230); - screen.set_visarea(0, 243, 0, 227); - screen.set_screen_update(FUNC(hec2hrp_state::screen_update_hec2hrp)); - screen.set_palette(m_palette); - - PALETTE(config, m_palette).set_entries(16); - MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) - - hector_audio(config); - - CASSETTE(config, m_cassette); - m_cassette->set_formats(hector_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); - m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - - PRINTER(config, m_printer, 0); -} - ROM_START( interact ) ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "interact.rom", 0x0000, 0x0800, CRC(1aa50444) SHA1(405806c97378abcf7c7b0d549430c78c7fc60ba2)) + // cartridge space 0800-0FFF, first byte must be 00. ROM_END ROM_START( hector1 ) @@ -687,6 +548,7 @@ ROM_END ROM_START( hec2hr ) ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "2hr.bin", 0x0000, 0x1000, CRC(84b9e672) SHA1(8c8b089166122eee565addaed10f84c5ce6d849b)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) ROM_END @@ -694,6 +556,7 @@ ROM_END ROM_START( victor ) ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "victor.rom", 0x0000, 0x1000, CRC(d1e9508f) SHA1(d0f1bdcd39917fafc8859223ab38eee2a7dc85ff)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) ROM_END @@ -701,27 +564,27 @@ ROM_END ROM_START( hec2hrp ) ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "hector2hrp.rom", 0x0000, 0x4000, CRC(983f52e4) SHA1(71695941d689827356042ee52ffe55ce7e6b8ecd)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) - ROM_REGION( 0x10000, "disc2cpu", ROMREGION_ERASEFF ) + // 2nd cpu ROM_REGION( 0x04000, "rom_disc2", ROMREGION_ERASEFF ) ROM_END ROM_START( hec2hrx ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "hector2hrx.rom", 0x0000, 0x4000, CRC(f047c521) SHA1(744336b2acc76acd7c245b562bdc96dca155b066)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) - ROM_REGION( 0x10000, "disc2cpu", ROMREGION_ERASEFF ) - + // 2nd cpu ROM_REGION( 0x04000, "rom_disc2", ROMREGION_ERASEFF ) ROM_LOAD( "d800k.bin" , 0x0000,0x1000, CRC(831bd584) SHA1(9782ee58f570042608d9d568b2c3fc4c6d87d8b9)) - ROM_REGION( 0x10000, "disc2mem", ROMREGION_ERASE00 ) ROM_END // minidisc ROM_START( hec2mdhrx ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "mdic1.bin" , 0x0000,0x2000, CRC(ddda1065) SHA1(e7bba14a72605238d2f8299da029b8320a563254)) ROM_LOAD( "mdicmb.bin" , 0x2000,0x2000, CRC(d8090747) SHA1(f2925b68002307562e2ea5e36b740e5458f0f0eb)) @@ -732,42 +595,42 @@ ROM_START( hec2mdhrx ) ROM_END ROM_START( hec2mx80 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "mx80c_page0.rom" , 0x0000,0x4000, CRC(a75945cf) SHA1(542391e482271be0997b069cf13c8b5dae28feec)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_LOAD( "mx80c_page1.rom", 0x0000, 0x4000, CRC(4615f57c) SHA1(5de291bf3ae0320915133b99f1a088cb56c41658)) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) ROM_LOAD( "mx80c_page2.rom" , 0x0000,0x4000, CRC(2d5d975e) SHA1(48307132e0f3fad0262859bb8142d108f694a436)) - + // 2nd cpu ROM_REGION( 0x04000, "rom_disc2", ROMREGION_ERASEFF ) ROM_LOAD( "d800k.bin" , 0x0000,0x1000, CRC(831bd584) SHA1(9782ee58f570042608d9d568b2c3fc4c6d87d8b9)) - ROM_REGION( 0x10000, "disc2mem", ROMREGION_ERASE00 ) ROM_END ROM_START( hec2mx40 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "mx40c_page0.rom" , 0x0000,0x4000, CRC(9bb5566d) SHA1(0c8c2e396ec8eb995d2b621abe06b6968ca5d0aa)) + // option roms ROM_REGION( 0x4000, "page1", ROMREGION_ERASEFF ) ROM_LOAD( "mx40c_page1.rom", 0x0000, 0x4000, CRC(192a76fa) SHA1(062aa6df0b554b85774d4b5edeea8496a4baca35)) ROM_REGION( 0x4000, "page2", ROMREGION_ERASEFF ) ROM_LOAD( "mx40c_page2.rom" , 0x0000,0x4000, CRC(ef1b2654) SHA1(66624ea040cb7ede4720ad2eca0738d0d3bad89a)) - + // 2nd cpu ROM_REGION( 0x04000, "rom_disc2", ROMREGION_ERASEFF ) // ROM_LOAD( "d360k.bin" , 0x0000,0x4000, CRC(2454eacb) SHA1(dc0d5a7d5891a7e422d9d142a2419527bb15dfd5)) ROM_LOAD( "d800k.bin" , 0x0000,0x1000, CRC(831bd584) SHA1(9782ee58f570042608d9d568b2c3fc4c6d87d8b9)) // ROM_LOAD( "d200k.bin" , 0x0000,0x4000, CRC(e2801377) SHA1(0926df5b417ecd8013e35c71b76780c5a25c1cbf)) - ROM_REGION( 0x10000, "disc2mem", ROMREGION_ERASE00 ) ROM_END /* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP(1979, interact, 0, 0, interact, hec2hrp, interact_state, empty_init, "Interact Electronics", "Interact Family Computer", MACHINE_IMPERFECT_SOUND) -COMP(1983, hector1, interact, 0, hector1, hec2hrp, interact_state, empty_init, "Micronique", "Hector 1", MACHINE_IMPERFECT_SOUND) -COMP(1983, hec2hrp, 0, interact, hec2hr, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector 2HR+", MACHINE_IMPERFECT_SOUND) -COMP(1980, victor, hec2hrp, 0, hec2hr, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Victor", MACHINE_IMPERFECT_SOUND) -COMP(1983, hec2hr, hec2hrp, 0, hec2hr, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector 2HR", MACHINE_IMPERFECT_SOUND) -COMP(1984, hec2hrx, hec2hrp, 0, hec2hrx, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector HRX + Disc2", MACHINE_IMPERFECT_SOUND) -COMP(1985, hec2mdhrx, hec2hrp, 0, hec2mdhrx, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector HRX + mini Disc", MACHINE_IMPERFECT_SOUND) -COMP(1985, hec2mx80, hec2hrp, 0, hec2mx80, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector MX 80c + Disc2", MACHINE_IMPERFECT_SOUND) -COMP(1985, hec2mx40, hec2hrp, 0, hec2mx40, hec2hrp, hec2hrp_state, empty_init, "Micronique", "Hector MX 40c + Disc2", MACHINE_IMPERFECT_SOUND) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP(1979, interact, 0, 0, interact, hec2hrp, hec2hrp_state, init_interact, "Interact Electronics", "Interact Family Computer", MACHINE_IMPERFECT_SOUND) +COMP(1983, hector1, interact, 0, hector1, hec2hrp, hec2hrp_state, init_interact, "Micronique", "Hector 1", MACHINE_IMPERFECT_SOUND) +COMP(1983, hec2hrp, 0, interact, hec2hr, hec2hrp, hec2hrp_state, init_interact, "Micronique", "Hector 2HR+", MACHINE_IMPERFECT_SOUND) +COMP(1980, victor, hec2hrp, 0, hec2hr, hec2hrp, hec2hrp_state, init_victor, "Micronique", "Victor", MACHINE_IMPERFECT_SOUND) +COMP(1983, hec2hr, hec2hrp, 0, hec2hr, hec2hrp, hec2hrp_state, init_victor, "Micronique", "Hector 2HR", MACHINE_IMPERFECT_SOUND) +COMP(1984, hec2hrx, hec2hrp, 0, hec2hrx, hec2hrp, hec2hrp_state, init_hrx, "Micronique", "Hector HRX + Disc2", MACHINE_IMPERFECT_SOUND) +COMP(1985, hec2mdhrx, hec2hrp, 0, hec2mdhrx, hec2hrp, hec2hrp_state, init_mdhrx, "Micronique", "Hector HRX + mini Disc", MACHINE_IMPERFECT_SOUND) +COMP(1985, hec2mx80, hec2hrp, 0, hec2mx80, hec2hrp, hec2hrp_state, init_mx40, "Micronique", "Hector MX 80c + Disc2", MACHINE_IMPERFECT_SOUND) +COMP(1985, hec2mx40, hec2hrp, 0, hec2mx40, hec2hrp, hec2hrp_state, init_mx40, "Micronique", "Hector MX 40c + Disc2", MACHINE_IMPERFECT_SOUND) diff --git a/src/mame/includes/hec2hrp.h b/src/mame/includes/hec2hrp.h index 3d0128b0151..51e5038505a 100644 --- a/src/mame/includes/hec2hrp.h +++ b/src/mame/includes/hec2hrp.h @@ -48,6 +48,7 @@ #include "imagedev/printer.h" #include "machine/upd765.h" #include "machine/wd_fdc.h" +#include "machine/ram.h" #include "sound/discrete.h" /* for 1 Bit sound*/ #include "sound/sn76477.h" /* for sn sound*/ #include "emupal.h" @@ -82,21 +83,24 @@ class hec2hrp_state : public driver_device { public: hec2hrp_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_printer(*this, "printer"), - m_palette(*this, "palette"), - m_disc2cpu(*this, "disc2cpu"), - m_discrete(*this, "discrete"), - m_sn(*this, "sn76477"), - m_vram(*this,"videoram"), - m_hector_vram(*this,"hector_videoram") , - m_keyboard(*this, "KEY.%u", 0), - m_minidisc_fdc(*this, "wd179x"), - m_floppy0(*this, "wd179x:0"), - m_upd_fdc(*this, "upd765"), - m_upd_connector(*this, "upd765:%u", 0U) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cassette(*this, "cassette") + , m_printer(*this, "printer") + , m_palette(*this, "palette") + , m_vram(*this,"videoram") + , m_bank(*this, "bank%u", 0U) + , m_rom(*this, "maincpu") + , m_ram(*this, RAM_TAG) + , m_hector_vram(*this,"hector_videoram") + , m_disc2cpu(*this, "disc2cpu") + , m_discrete(*this, "discrete") + , m_sn(*this, "sn76477") + , m_keyboard(*this, "KEY.%u", 0) + , m_minidisc_fdc(*this, "wd179x") + , m_floppy0(*this, "wd179x:0") + , m_upd_fdc(*this, "upd765") + , m_upd_connector(*this, "upd765:%u", 0U) {} void hec2mx80(machine_config &config); @@ -107,12 +111,18 @@ public: void hec2hr(machine_config &config); void hector_audio(machine_config &config); - void hector_init(); + void init_mx40(); + void init_mdhrx(); + void init_victor(); + void init_hrx(); + void init_interact(); + void hector1(machine_config &config); + void interact(machine_config &config); + void interact_common(machine_config &config); protected: - DECLARE_VIDEO_START(hec2hrp); void hector_hr(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int yram); - void hector_reset(int hr, int with_d2); + void hector_reset(bool hr, bool with_d2); void keyboard_w(uint8_t data); uint8_t keyboard_r(offs_t offset); @@ -122,11 +132,21 @@ protected: void sn_3000_w(uint8_t data); void color_a_w(uint8_t data); void color_b_w(uint8_t data); + bool m_has_disc2; + bool m_has_minidisc; + bool m_is_hr; + bool m_is_extended; + void init_palette(palette_device &); + void hector_init(); required_device m_maincpu; required_device m_cassette; optional_device m_printer; required_device m_palette; + optional_shared_ptr m_vram; + optional_memory_bank_array<4> m_bank; + required_region_ptr m_rom; + optional_device m_ram; private: void minidisc_control_w(uint8_t data); @@ -151,37 +171,24 @@ private: DECLARE_FLOPPY_FORMATS(minidisc_formats); - optional_device m_disc2cpu; - required_device m_discrete; - required_device m_sn; - optional_shared_ptr m_vram; - optional_shared_ptr m_hector_vram; - required_ioport_array<9> m_keyboard; - - optional_device m_minidisc_fdc; - optional_device m_floppy0; - - optional_device m_upd_fdc; - optional_device_array m_upd_connector; - - uint8_t m_hector_flag_hr; - uint8_t m_hector_flag_80c; + bool m_hector_flag_hr; + bool m_hector_flag_80c; uint8_t m_hector_color[4]; uint8_t m_hector_disc2_data_r_ready; uint8_t m_hector_disc2_data_w_ready; uint8_t m_hector_disc2_data_read; uint8_t m_hector_disc2_data_write; - uint8_t m_hector_disc2_rnmi; + bool m_hector_disc2_rnmi; uint8_t m_state3000; - uint8_t m_write_cassette; + bool m_write_cassette; emu_timer *m_cassette_timer; uint8_t m_ck_signal; - uint8_t m_flag_clk; + bool m_flag_clk; double m_pin_value[29][2]; - int m_au[17]; - int m_val_mixer; - int m_oldstate3000; - int m_oldstate1000; + u8 m_au[17]; + u8 m_val_mixer; + u8 m_oldstate3000; + u8 m_oldstate1000; uint8_t m_pot0; uint8_t m_pot1; uint8_t m_actions; @@ -190,18 +197,15 @@ private: uint8_t m_hector_port_c_h; uint8_t m_hector_port_c_l; uint8_t m_hector_port_cmd; - uint8_t m_cassette_bit; - uint8_t m_cassette_bit_mem; + bool m_cassette_bit; + bool m_cassette_bit_mem; uint8_t m_data_k7; int m_counter_write; - int m_irq_current_state; - int m_nmi_current_state; - int m_hector_cmd[10]; - int m_hector_nb_cde; - int m_hector_flag_result; - int m_print; - uint8_t m_hector_videoram_hrx[0x04000]; + bool m_irq_current_state; + bool m_nmi_current_state; + uint8_t m_hector_videoram_hrx[0x4000]; + DECLARE_MACHINE_RESET(interact); DECLARE_MACHINE_START(hec2hrp); DECLARE_MACHINE_RESET(hec2hrp); DECLARE_MACHINE_START(hec2hrx); @@ -213,18 +217,16 @@ private: DECLARE_WRITE_LINE_MEMBER( disc2_fdc_interrupt ); DECLARE_WRITE_LINE_MEMBER( disc2_fdc_dma_irq ); - int has_disc2(); - int has_minidisc(); - int is_hr(); - int is_extended(); + void update_state(int Adresse, int Value ); void init_sn76477(); void update_sound(uint8_t data); - void init_palette(); void hector_80c(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int yram); /*----------- defined in machine/hecdisk2.c -----------*/ void hector_disc2_reset(); + uint32_t screen_update_interact(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void interact_mem(address_map &map); void hec2hrp_io(address_map &map); void hec2hrp_mem(address_map &map); @@ -235,27 +237,16 @@ private: void hec2mx80_io(address_map &map); void hecdisc2_io(address_map &map); void hecdisc2_mem(address_map &map); -}; - -class interact_state : public hec2hrp_state -{ -public: - interact_state(const machine_config &mconfig, device_type type, const char *tag) - : hec2hrp_state(mconfig, type, tag) - , m_vram(*this, "videoram") - { } - void hector1(machine_config &config); - void interact(machine_config &config); - void interact_common(machine_config &config); - -private: - - required_shared_ptr m_vram; - DECLARE_MACHINE_START(interact); - DECLARE_MACHINE_RESET(interact); - uint32_t screen_update_interact(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void interact_mem(address_map &map); + optional_shared_ptr m_hector_vram; + optional_device m_disc2cpu; + required_device m_discrete; + required_device m_sn; + required_ioport_array<9> m_keyboard; + optional_device m_minidisc_fdc; + optional_device m_floppy0; + optional_device m_upd_fdc; + optional_device_array m_upd_connector; }; #endif // MAME_INCLUDES_HEC2HRP_H diff --git a/src/mame/machine/hec2hrp.cpp b/src/mame/machine/hec2hrp.cpp index 771049c6409..4891e4847c7 100644 --- a/src/mame/machine/hec2hrp.cpp +++ b/src/mame/machine/hec2hrp.cpp @@ -36,8 +36,6 @@ - http://dchector.free.fr/ - http://hectorvictor.free.fr/ - TODO : Add cartridge functionality, - Adjust the one shot and A/D timing (sn76477) */ #include "emu.h" @@ -66,36 +64,48 @@ hec2mx80 hec2mx40 */ -/* Helper function*/ -int hec2hrp_state::has_disc2() + +void hec2hrp_state::init_mx40() +{ + m_has_disc2 = true; + m_has_minidisc = false; + m_is_hr = true; + m_is_extended = true; +} + +void hec2hrp_state::init_mdhrx() { - return ((strncmp(machine().system().name , "hec2hrx" , 7)==0) || - (strncmp(machine().system().name , "hec2mx40" , 8)==0) || - (strncmp(machine().system().name , "hec2mx80" , 8)==0)); + m_has_disc2 = false; + m_has_minidisc = true; + m_is_hr = true; + m_is_extended = true; } -int hec2hrp_state::has_minidisc() +void hec2hrp_state::init_victor() { - return ((strncmp(machine().system().name , "hec2mdhrx", 9)==0)); + m_has_disc2 = false; + m_has_minidisc = false; + m_is_hr = true; + m_is_extended = false; } -int hec2hrp_state::is_hr() +void hec2hrp_state::init_hrx() { - return ((strncmp(machine().system().name , "hec2hr" , 6)==0) || //Aviable for hr & hrp - (strncmp(machine().system().name , "hec2mdhrx", 9)==0) || - (strncmp(machine().system().name , "victor" , 6)==0) || - (strncmp(machine().system().name , "hec2mx40" , 8)==0) || - (strncmp(machine().system().name , "hec2mx80" , 8)==0)); + m_has_disc2 = true; + m_has_minidisc = false; + m_is_hr = false; + m_is_extended = true; } -int hec2hrp_state::is_extended() +void hec2hrp_state::init_interact() { - return ((strncmp(machine().system().name , "hec2mdhrx", 9)==0) || - (strncmp(machine().system().name , "hec2hrx" , 7)==0) || - (strncmp(machine().system().name , "hec2mx40" , 8)==0) || - (strncmp(machine().system().name , "hec2mx80" , 8)==0)); + m_has_disc2 = false; + m_has_minidisc = false; + m_is_hr = false; + m_is_extended = false; } + /* Cassette timer*/ TIMER_CALLBACK_MEMBER(hec2hrp_state::cassette_clock) { @@ -118,61 +128,57 @@ void hec2hrp_state::minidisc_control_w(uint8_t data) floppy->ss_w(BIT(data, 4)); } - membank("bank2")->set_entry(BIT(data, 5) ? HECTOR_BANK_BASE : HECTOR_BANK_DISC); + m_bank[2]->set_entry(BIT(data, 5) ? HECTOR_BANK_BASE : HECTOR_BANK_DISC); } void hec2hrp_state::switch_bank_w(offs_t offset, uint8_t data) { if (offset==0x00) { - if (is_extended()) - { - membank("bank1")->set_entry(HECTOR_BANK_VIDEO); - } - if (m_flag_clk == 1) + if (m_is_extended) + m_bank[1]->set_entry(HECTOR_BANK_VIDEO); + + if (m_flag_clk) { - m_flag_clk = 0; + m_flag_clk = false; m_maincpu->set_unscaled_clock(XTAL(5'000'000)); } } if (offset==0x04) { - m_hector_flag_hr = 0; - if (is_extended()) - { - membank("bank1")->set_entry(HECTOR_BANK_VIDEO); - } - if (m_flag_clk == 0) + m_hector_flag_hr = false; + if (m_is_extended) + m_bank[1]->set_entry(HECTOR_BANK_VIDEO); + + if (!m_flag_clk) { - m_flag_clk = 1; + m_flag_clk = true; m_maincpu->set_unscaled_clock(XTAL(1'750'000)); } } if (offset==0x08) { - if (is_extended()) - { - membank("bank1")->set_entry(HECTOR_BANK_PROG); - } - if (m_flag_clk == 1) + if (m_is_extended) + m_bank[1]->set_entry(HECTOR_BANK_PROG); + + if (m_flag_clk) { - m_flag_clk = 0; + m_flag_clk = false; m_maincpu->set_unscaled_clock(XTAL(5'000'000)); } } if (offset == 0x0c) { - m_hector_flag_hr = 0; - if (is_extended()) - { - membank("bank1")->set_entry(HECTOR_BANK_PROG); - } - if (m_flag_clk == 0) + m_hector_flag_hr = false; + if (m_is_extended) + m_bank[1]->set_entry(HECTOR_BANK_PROG); + + if (!m_flag_clk) { - m_flag_clk = 1; + m_flag_clk = true; m_maincpu->set_unscaled_clock(XTAL(1'750'000)); } } @@ -195,31 +201,28 @@ uint8_t hec2hrp_state::keyboard_r(offs_t offset) if (data & 0x01) /* Reset machine */ { m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); - if (is_hr()) + if (m_is_hr) { - m_hector_flag_hr = 1; - if (is_extended()) + m_hector_flag_hr = true; + if (m_is_extended) { - membank("bank1")->set_entry(HECTOR_BANK_PROG); - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); + m_bank[1]->set_entry(HECTOR_BANK_PROG); + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); } //RESET DISC II unit - if (has_disc2()) + if (m_has_disc2) hector_disc2_reset(); /* floppy md master reset */ - if (has_minidisc()) + if (m_has_minidisc) m_minidisc_fdc->reset(); } else - { - m_hector_flag_hr=0; - } - + m_hector_flag_hr = false; - /*Common flag*/ - m_hector_flag_80c = 0; - m_flag_clk = 0; + /*Common flag*/ + m_hector_flag_80c = false; + m_flag_clk = false; } m_actions = 0; @@ -231,21 +234,27 @@ uint8_t hec2hrp_state::keyboard_r(offs_t offset) if (data & 0x08) /* Pot(0)+*/ m_pot0 += 1; - if (m_pot0>128) m_pot0 = 128; + + if (m_pot0>128) + m_pot0 = 128; if (data & 0x10) /* Pot(0)-*/ m_pot0 -= 1; - if (m_pot0>250) m_pot0 = 0; + if (m_pot0>250) + m_pot0 = 0; if (data & 0x20) /* Pot(1)+*/ m_pot1 += 1; - if (m_pot1>128) m_pot1 = 128; + + if (m_pot1>128) + m_pot1 = 128; if (data & 0x40) /* Pot(1)-*/ m_pot1 -= 1; - if (m_pot1>250) m_pot1 = 0; + if (m_pot1>250) + m_pot1 = 0; } /* in all case return the requested value */ @@ -283,23 +292,19 @@ uint8_t hec2hrp_state::cassette_r() } else { - if (m_write_cassette == 0) + if (!m_write_cassette) { level = m_cassette->input(); if (level < -0.08) - m_cassette_bit = 0x00; + m_cassette_bit = false; if (level > +0.08) - m_cassette_bit = 0x01; + m_cassette_bit = true; } - if ((m_cassette_bit != m_cassette_bit_mem) && (m_cassette_bit !=0)) - { - if (m_data_k7 == 0x00) - m_data_k7 = 0x80; - else - m_data_k7 = 0x00; - } + if ((m_cassette_bit != m_cassette_bit_mem) && m_cassette_bit) + m_data_k7 = m_data_k7 ? 0 : 0x80; + value = ( m_ck_signal & 0x7F ) + m_data_k7; m_cassette_bit_mem = m_cassette_bit; } @@ -308,13 +313,14 @@ uint8_t hec2hrp_state::cassette_r() void hec2hrp_state::sn_3000_w(uint8_t data) { m_state3000 = data & 0xf8; /* except bit 0 to 2*/ - if ((data & 7) != m_oldstate3000 ) + data &= 7; + if (data != m_oldstate3000 ) { /* Update sn76477 only when necessary!*/ - update_state(0x3000, data & 7 ); - update_sound(data & 7); + update_state(0x3000, data); + update_sound(data); } - m_oldstate3000 = data & 7; + m_oldstate3000 = data; } /* Color Interface */ @@ -323,18 +329,16 @@ void hec2hrp_state::color_a_w(uint8_t data) if (data & 0x40) { /* Bit 6 => motor ON/OFF => for cassette state!*/ - if (m_write_cassette==0) + if (!m_write_cassette) { - m_cassette->change_state( - CASSETTE_MOTOR_ENABLED, - CASSETTE_MASK_MOTOR); + m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // m_cassette->set_state(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); } } else { /* stop motor*/ m_cassette->set_state(CASSETTE_STOPPED); - m_write_cassette=0; + m_write_cassette = false; m_counter_write =0; } if (((data & 0x80) != (m_oldstate1000 & 0x80)) && ((m_oldstate1000 & 7)==(data & 7)) ) /* Bit7 had change but not the color statement*/ @@ -344,15 +348,14 @@ void hec2hrp_state::color_a_w(uint8_t data) if (m_counter_write > 5) { - /* Wait several cycle before lauch the record to prevent somes bugs*/ + /* Wait several cycles before launch recording to prevent somes bugs*/ m_counter_write = 6; - if (m_write_cassette==0) - { /* C'est la 1er fois => record*/ - m_cassette->change_state( - CASSETTE_MOTOR_ENABLED, - CASSETTE_MASK_MOTOR); + if (!m_write_cassette) + { + // record + m_cassette->change_state( CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); m_cassette->set_state(CASSETTE_RECORD); - m_write_cassette=1; + m_write_cassette = true; } } /* cassette data */ @@ -360,22 +363,25 @@ void hec2hrp_state::color_a_w(uint8_t data) } /* Other bit : color definition*/ - m_hector_color[0] = data & 0x07 ; - m_hector_color[2] = ((data >> 3) & 0x07) | (m_hector_color[2] & 0x40); + m_hector_color[0] = data & 0x07 ; + m_hector_color[2] = BIT(data, 3, 3) | (m_hector_color[2] & 0x40); m_oldstate1000=data; /* For next step*/ } void hec2hrp_state::color_b_w(uint8_t data) { - m_hector_color[1] = data & 0x07; - m_hector_color[3] = (data >> 3) & 0x07; + m_hector_color[1] = data & 0x07; + m_hector_color[3] = BIT(data, 3, 3); /* Half light on color 2 only on HR machines:*/ - if (data & 0x40) m_hector_color[2] |= 8; else m_hector_color[2] &= 7; + if (data & 0x40) + m_hector_color[2] |= 8; + else + m_hector_color[2] &= 7; /* Play bit*/ - m_discrete->write(NODE_01, (data & 0x80) ? 0:1 ); + m_discrete->write(NODE_01, (data & 0x80) ? 0:1 ); } @@ -390,20 +396,20 @@ uint8_t hec2hrp_state::io_8255_r(offs_t offset) uint8_t data =0; uint8_t data_l=0; uint8_t data_h=0; + offset &= 3; - - if ((offset & 0x3) == 0x0) /* Port A */ + if (offset == 0) /* Port A */ data = m_hector_port_a; - - if ((offset & 0x3) == 0x1) /* Port B */ + else + if (offset == 1) /* Port B */ { data = m_hector_port_b; #ifdef DEBUG_TRACE_COM_HECTOR printf("\nLecture data par Hector %x (portB)",data); #endif } - - if ((offset & 0x3) == 0x2) /* Port C */ + else + if (offset == 2) /* Port C */ { data_l = (m_hector_port_c_l & 0x0f); data_h = (m_hector_port_c_h & 0xf0); @@ -413,18 +419,18 @@ uint8_t hec2hrp_state::io_8255_r(offs_t offset) if (BIT(m_hector_port_cmd, 3)) /* Quartet sup en entree ?*/ { - m_hector_port_c_h = (m_hector_port_c_h & 0x0c0); /* Clear bits 4 & 5*/ + m_hector_port_c_h = (m_hector_port_c_h & 0xc0); /* Clear bits 4 & 5*/ if (m_hector_disc2_data_w_ready != 0x00) - m_hector_port_c_h = m_hector_port_c_h + 0x010; // PC4 (data write ready from Disc II to Hector) + m_hector_port_c_h = m_hector_port_c_h + 0x10; // PC4 (data write ready from Disc II to Hector) if (m_hector_disc2_data_r_ready != 0x00) - m_hector_port_c_h = m_hector_port_c_h + 0x020; // PC5 (data read ready from Hector to Disc2) + m_hector_port_c_h = m_hector_port_c_h + 0x20; // PC5 (data read ready from Hector to Disc2) - m_hector_port_c_h = m_hector_port_c_h & 0x07F; // PC7 (printer busy=0) + m_hector_port_c_h = m_hector_port_c_h & 0x7F; // PC7 (printer busy=0) data_h = m_hector_port_c_h; } - data= data_l + data_h; + data = data_l + data_h; } return data; // Return the value! } @@ -433,8 +439,9 @@ uint8_t hec2hrp_state::io_8255_r(offs_t offset) void hec2hrp_state::io_8255_w(offs_t offset, uint8_t data) { + offset &= 3; /* 8255 in mode 0 */ - if ((offset & 0x3) == 0x0) /* Port A => to printer or Disc II*/ + if (offset == 0) /* Port A => to printer or Disc II*/ { m_hector_port_a = data; /* Port A => to printer*/ @@ -442,16 +449,13 @@ void hec2hrp_state::io_8255_w(offs_t offset, uint8_t data) So, everything sent to the Disc2 unit will be printed too! */ if (BIT(m_hector_port_c_l, 0)) // PC0 (bit 0) = strobe printer - { m_printer->output(m_hector_port_a); - } } - - if ((offset & 0x3) == 0x1) /* Port B */ + else + if (offset == 1) /* Port B */ m_hector_port_b = data; - - - if ((offset & 0x3) == 0x2) /* Port C => depending cmd word */ + else + if (offset == 2) /* Port C => depending cmd word */ { if (!BIT(m_hector_port_cmd, 0)) { @@ -476,11 +480,8 @@ void hec2hrp_state::io_8255_w(offs_t offset, uint8_t data) if (!BIT(m_hector_port_cmd, 3)) m_hector_port_c_h = (data & 0xf0); } - - if ((offset & 0x3) == 0x3) /* command */ - { + else // offset=3 m_hector_port_cmd = data; - } } /* End of 8255 managing */ @@ -488,34 +489,44 @@ void hec2hrp_state::io_8255_w(offs_t offset, uint8_t data) /******************* PIO write handler for MX40 *******************/ void hec2hrp_state::mx40_io_port_w(offs_t offset, uint8_t data) { + offset &= 0xff; + /* Bank switching on several address */ - if ((offset &0x0ff) == 0x40) /* Port page 0*/ - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); - if ((offset &0x0ff) == 0x41) /* Port page 1*/ + if (offset == 0x40) /* Port page 0*/ + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); + else + if (offset == 0x41) /* Port page 1*/ { - membank("bank2")->set_entry(HECTORMX_BANK_PAGE1); - m_hector_flag_80c=0; + m_bank[2]->set_entry(HECTORMX_BANK_PAGE1); + m_hector_flag_80c = false; } - if ((offset &0x0ff) == 0x44) /* Port page 2 => 42 pour MX80*/ - membank("bank2")->set_entry(HECTORMX_BANK_PAGE2); - if ((offset &0x0ff) == 0x49) /* Port screen resolution*/ - m_hector_flag_80c=0;/* No 80c in 40c !*/ + else + if (offset == 0x44) /* Port page 2 => 42 on MX80*/ + m_bank[2]->set_entry(HECTORMX_BANK_PAGE2); + else + if (offset == 0x49) /* Port screen resolution*/ + m_hector_flag_80c = false;/* No 80c in 40c !*/ } /******************* PIO write handlerfor MX80 *******************/ void hec2hrp_state::mx80_io_port_w(offs_t offset, uint8_t data) { - if ((offset &0x0ff) == 0x40) /* Port page 0*/ - membank("bank2")->set_entry(HECTORMX_BANK_PAGE0); - if ((offset &0x0ff) == 0x41) /* Port page 1*/ + offset &= 0xff; + + if (offset == 0x40) /* Port page 0*/ + m_bank[2]->set_entry(HECTORMX_BANK_PAGE0); + else + if (offset == 0x41) /* Port page 1*/ { - membank("bank2")->set_entry(HECTORMX_BANK_PAGE1); - m_hector_flag_80c=0; + m_bank[2]->set_entry(HECTORMX_BANK_PAGE1); + m_hector_flag_80c = false; } - if ((offset &0x0ff) == 0x42) /* Port page 2 => different port on MX40 */ - membank("bank2")->set_entry(HECTORMX_BANK_PAGE2); - if ((offset &0x0ff) == 0x49) /* Port screen resolution*/ - m_hector_flag_80c=1; + else + if (offset == 0x42) /* Port page 2 => different port on MX40 */ + m_bank[2]->set_entry(HECTORMX_BANK_PAGE2); + else + if (offset == 0x49) /* Port screen resolution*/ + m_hector_flag_80c = true; } /******************************************************************************** @@ -529,43 +540,43 @@ switch(Adresse ) { case 0x2000: { - m_au[ 0] = BIT(Value, 7); - m_au[ 8] = BIT(Value, 6); + m_au[ 0] = BIT(Value, 7); + m_au[ 8] = BIT(Value, 6); break; } case 0x2001: { - m_au[ 1] = BIT(Value, 7); - m_au[ 9] = BIT(Value, 6); + m_au[ 1] = BIT(Value, 7); + m_au[ 9] = BIT(Value, 6); break; } case 0x2002: { - m_au[ 2] = BIT(Value, 7); - m_au[10] = BIT(Value, 6); + m_au[ 2] = BIT(Value, 7); + m_au[10] = BIT(Value, 6); break; } case 0x2003: { - m_au[ 3] = BIT(Value, 7); - m_au[11] = BIT(Value, 6); + m_au[ 3] = BIT(Value, 7); + m_au[11] = BIT(Value, 6); break; } case 0x2800: { - m_au[ 4] = BIT(Value, 7); - m_au[12] = BIT(Value, 6); + m_au[ 4] = BIT(Value, 7); + m_au[12] = BIT(Value, 6); break; } case 0x2801: { - m_au[ 5] = BIT(Value, 7); - m_au[13] = BIT(Value, 6); + m_au[ 5] = BIT(Value, 7); + m_au[13] = BIT(Value, 6); break; } @@ -578,8 +589,8 @@ switch(Adresse ) case 0x2803: { - m_au[ 7] = BIT(Value, 7); - m_au[15] = BIT(Value, 6); + m_au[ 7] = BIT(Value, 7); + m_au[15] = BIT(Value, 6); break; } @@ -631,8 +642,8 @@ void hec2hrp_state::init_sn76477() m_pin_value[17][0] = CAP_N(47.0) ; /* measured */ m_pin_value[17][1] = CAP_N(580.0) ; /* measured */ /* R VCO Version 3*/ - m_pin_value[18][1] = RES_K(1400.0 );/* Measured 1300, instead of 1Mohm*/ - m_pin_value[18][0] = RES_K( 203.548 );/* Measured 223, instead of 193.548 (1000 // 240KOhm)*/ + m_pin_value[18][1] = RES_K(1400.0); /* Measured 1300, instead of 1Mohm*/ + m_pin_value[18][0] = RES_K(203.548);/* Measured 223, instead of 193.548 (1000 // 240KOhm)*/ /* VCO Controle*/ m_pin_value[16][0] = 0.0; /* Volts */ @@ -666,14 +677,14 @@ void hec2hrp_state::init_sn76477() m_pin_value[6][1] = CAP_U(08.60); /* 0.48*/ /* Values from schematic */ - m_pin_value[5][1] = RES_K(3.30 ) ; /* 330Kohm*/ - m_pin_value[5][0] = RES_K(1.76 ) ; /* 76 Kohm*/ + m_pin_value[5][1] = RES_K(3.30 ); /* 330Kohm*/ + m_pin_value[5][0] = RES_K(1.76 ); /* 76 Kohm*/ /* Noise is not controlled by the audio bus! */ /* Only value[0] is documented! */ - m_pin_value[4][0] = RES_K(47) ; /* 47 K ohm*/ + m_pin_value[4][0] = RES_K(47); /* 47 K ohm*/ m_pin_value[12][0] = RES_K(100); /* 100K ohm*/ - m_pin_value[3][0] = 0 ; /* NC*/ + m_pin_value[3][0] = 0; /* NC*/ /* Envelope-related */ m_pin_value[ 1][0] = 0; @@ -683,22 +694,9 @@ void hec2hrp_state::init_sn76477() m_pin_value[28][1] = 1; /* SN pins initialized to 0 */ - m_au[0]=0; - m_au[1]=0; - m_au[2]=0; - m_au[3]=0; - m_au[4]=0; - m_au[5]=0; - m_au[6]=0; - m_au[7]=0; - m_au[8]=0; - m_au[9]=0; - m_au[10]=0; - m_au[11]=0; - m_au[12]=0; - m_au[13]=0; - m_au[14]=0; - m_au[15]=0; + for (u8 i = 0; i < 16; i++) + m_au[i]=0; + m_val_mixer = 0; } @@ -752,16 +750,16 @@ void hec2hrp_state::update_sound(uint8_t data) m_sn->enable_w(m_pin_value[9][m_au[14]]); } -void hec2hrp_state::hector_reset(int hr, int with_d2) +void hec2hrp_state::hector_reset(bool hr, bool with_d2) { // Hector init m_hector_flag_hr = hr; - m_flag_clk = 0; - m_write_cassette = 0; + m_flag_clk = false; + m_write_cassette = false; m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); // Disc II init - if (with_d2 == 1) + if (with_d2) { m_disc2cpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); m_upd_fdc->reset(); @@ -855,7 +853,7 @@ void hec2hrp_state::hector_disc2_reset() m_disc2cpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); m_upd_fdc->reset(); // Select ROM to cold restart - membank("bank3")->set_entry(DISCII_BANK_ROM); + m_bank[3]->set_entry(DISCII_BANK_ROM); // Clear the Hardware's buffers m_hector_disc2_data_r_ready = 0x0; /* =ff when PC2 = true and data is in read buffer (state->m_hector_disc2_data_read) */ @@ -872,13 +870,13 @@ void hec2hrp_state::hector_disc2_reset() uint8_t hec2hrp_state::disc2_io00_port_r() { /* Switch Disc 2 to RAM */ - membank("bank3")->set_entry(DISCII_BANK_RAM); + m_bank[3]->set_entry(DISCII_BANK_RAM); return 0; } void hec2hrp_state::disc2_io00_port_w(uint8_t data) { /* Switch Disc 2 to RAM */ - membank("bank3")->set_entry(DISCII_BANK_RAM); + m_bank[3]->set_entry(DISCII_BANK_RAM); } uint8_t hec2hrp_state::disc2_io20_port_r() { diff --git a/src/mame/video/hec2hrp.cpp b/src/mame/video/hec2hrp.cpp index 335e5238631..9212b796b80 100644 --- a/src/mame/video/hec2hrp.cpp +++ b/src/mame/video/hec2hrp.cpp @@ -3,35 +3,7 @@ ///////////////////////////////////////////////////////////////////////////////// ///// Hector video ///////////////////////////////////////////////////////////////////////////////// -/* Hector 2HR+ - Victor - Hector 2HR - Hector HRX - Hector MX40c - Hector MX80c - Hector 1 - Interact - 12/05/2009 Skeleton driver - Micko : mmicko@gmail.com - 31/06/2009 Video - Robbbert - - 29/10/2009 Update skeleton to functional machine - by yo_fr (jj.stac @ aliceadsl.fr) - - => add Keyboard, - => add color, - => add cassette, - => add sn76477 sound and 1bit sound, - => add joysticks (stick, pot, fire) - => add BR/HR switching - => add bank switch for HRX - => add device MX80c and bank switching for the ROM - Important note : the keyboard function has been taken from the - DChector project : http://dchector.free.fr/ made by DanielCoulom - (thanks Daniel) - TODO : Add the cartridge function, - Adjust the one shot and A/D timing (sn76477) -*/ #include "emu.h" #include "includes/hec2hrp.h" @@ -39,7 +11,7 @@ #include "screen.h" -void hec2hrp_state::init_palette() +void hec2hrp_state::init_palette(palette_device &palette) { m_hector_color[0] = 0; // black m_hector_color[1] = 1; // red @@ -69,7 +41,6 @@ void hec2hrp_state::init_palette() void hec2hrp_state::hector_hr(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int yram) { - uint8_t *hector_color = m_hector_color; int sy = 0; int ma = 0; for (int y = 0; y <= ymax; y++) @@ -78,20 +49,19 @@ void hec2hrp_state::hector_hr(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int for (int x = ma; x < ma + yram; x++) { uint8_t gfx = *(page + x); - *pix++ = hector_color[(gfx >> 0) & 0x03]; - *pix++ = hector_color[(gfx >> 2) & 0x03]; - *pix++ = hector_color[(gfx >> 4) & 0x03]; - *pix++ = hector_color[(gfx >> 6) & 0x03]; + *pix++ = m_hector_color[BIT(gfx, 0, 2)]; + *pix++ = m_hector_color[BIT(gfx, 2, 2)]; + *pix++ = m_hector_color[BIT(gfx, 4, 2)]; + *pix++ = m_hector_color[BIT(gfx, 6, 2)]; } ma+=yram; } } -uint32_t interact_state::screen_update_interact(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t hec2hrp_state::screen_update_interact(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - uint8_t *videoram = m_vram; screen.set_visible_area(0, 113, 0, 75); - hector_hr(bitmap, videoram, 77, 32); + hector_hr(bitmap, m_vram, 77, 32); return 0; } @@ -105,46 +75,32 @@ void hec2hrp_state::hector_80c(bitmap_ind16 &bitmap, uint8_t *page, int ymax, in for (int x = ma; x < ma + yram; x++) { uint8_t gfx = *(page + x); - *pix++ = (gfx & 0x01) ? 7 : 0; - *pix++ = (gfx & 0x02) ? 7 : 0; - *pix++ = (gfx & 0x04) ? 7 : 0; - *pix++ = (gfx & 0x08) ? 7 : 0; - *pix++ = (gfx & 0x10) ? 7 : 0; - *pix++ = (gfx & 0x20) ? 7 : 0; - *pix++ = (gfx & 0x40) ? 7 : 0; - *pix++ = (gfx & 0x80) ? 7 : 0; + for (u8 i = 0; i < 8; i++) + *pix++ = BIT(gfx, i) ? 7 : 0; } ma += yram; } } - -VIDEO_START_MEMBER(hec2hrp_state,hec2hrp) -{ - init_palette(); -} - uint32_t hec2hrp_state::screen_update_hec2hrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - uint8_t *videoram = m_vram; - uint8_t *videoram_HR = m_hector_vram; - if (m_hector_flag_hr==1) + if (m_hector_flag_hr) { - if (m_hector_flag_80c==0) + if (!m_hector_flag_80c) { screen.set_visible_area(0, 243, 0, 227); - hector_hr(bitmap , &videoram_HR[0], 227, 64); + hector_hr(bitmap , m_hector_vram, 227, 64); } else { screen.set_visible_area(0, 243*2, 0, 227); - hector_80c(bitmap , &videoram_HR[0], 227, 64); + hector_80c(bitmap , m_hector_vram, 227, 64); } } else { screen.set_visible_area(0, 113, 0, 75); - hector_hr(bitmap, videoram, 77, 32); + hector_hr(bitmap, m_vram, 77, 32); } return 0; } -- cgit v1.2.3 From 0a3ddd2103831e6b5ba74261e4f55c5cba7f52f9 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Thu, 30 Jul 2020 21:16:06 +0200 Subject: vsmile_cart.xml: Add note about missing carts --- hash/vsmile_cart.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hash/vsmile_cart.xml b/hash/vsmile_cart.xml index da655e18d0e..ad44901966a 100644 --- a/hash/vsmile_cart.xml +++ b/hash/vsmile_cart.xml @@ -116,7 +116,7 @@ Regular game cartridges | | 80-090200(US) | | +========+===================+================================================================================================+ | | 80-090220(US) | should be Wild Waves (purple) | -| | 80-090224(GE) | Dolphis Wasser-abenteuer (52-090224(GE) on back label) | +| XX | 80-090224(GE) | Dolphis Wasser-abenteuer (52-090224(GE) on back label) | +========+===================+================================================================================================+ | | 80-090240(US) | | +========+===================+================================================================================================+ @@ -172,8 +172,8 @@ Regular game cartridges | XX | 80-092065-105(FR) | Winnie l'Ourson - La Chasse au miel de Winnie (rev. 105 | | | 80-092066(PT) | Winnie the Pooh - Em Busca Do Mel (92076 on cart) | | XX | 80-092067(SP) | Winnie the Pooh - En Busca de la Miel (no # on label, 92067 on PCB) | -| | 80-092068(CN) | 小熊维尼 | | XX | 80-092067-122(SP) | My Friends Tigger and Pooh - En Busca de la Miel (rev. 122, 092067-1 on PCB) | +| | 80-092068(CN) | 小熊维尼 | | XX | 80-092073(DK) | Peter Plys - Honningjagten | | XX | 80-092074(SE) | Nalle Puh - Honungsjakten | | | (NO) | Winnie the Pooh - Honningjakten | -- cgit v1.2.3 From 8e14b26747a7f26e92c534a07a26aec3342904d9 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 30 Jul 2020 22:03:02 +0200 Subject: ssystem3: added the new lcd screen to internal artwork --- src/emu/rendlay.cpp | 4 +- src/mame/drivers/saitek_exchess.cpp | 2 +- src/mame/drivers/saitek_mark5.cpp | 2 +- src/mame/drivers/saitek_simultano.cpp | 3 + src/mame/drivers/saitek_ssystem3.cpp | 2 +- src/mame/drivers/saitek_stratos.cpp | 2 - src/mame/layout/saitek_ssystem3.lay | 175 +++++++++++++++++++++++++++++++--- 7 files changed, 171 insertions(+), 19 deletions(-) diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index a7d6411a1e9..4db27e47762 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -2244,7 +2244,7 @@ protected: int endpos = basey+ourheight/num_shown; - // only render the symbol / text if it's atually in view because the code is SLOW + // only render the symbol / text if it's actually in view because the code is SLOW if ((endpos >= bounds.top()) && (basey <= bounds.bottom())) { while (1) @@ -2403,7 +2403,7 @@ private: int endpos = basex+(ourwidth/num_shown); - // only render the symbol / text if it's atually in view because the code is SLOW + // only render the symbol / text if it's actually in view because the code is SLOW if ((endpos >= bounds.left()) && (basex <= bounds.right())) { while (1) diff --git a/src/mame/drivers/saitek_exchess.cpp b/src/mame/drivers/saitek_exchess.cpp index e95ec363acf..447e9bbe21a 100644 --- a/src/mame/drivers/saitek_exchess.cpp +++ b/src/mame/drivers/saitek_exchess.cpp @@ -241,7 +241,7 @@ void exchess_state::exchess(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); screen.set_refresh_hz(60); - screen.set_size(1020, 1080); + screen.set_size(1020/1.5, 1080/1.5); screen.set_visarea_full(); } diff --git a/src/mame/drivers/saitek_mark5.cpp b/src/mame/drivers/saitek_mark5.cpp index 1a3ca4bb6ae..827fa92d5be 100644 --- a/src/mame/drivers/saitek_mark5.cpp +++ b/src/mame/drivers/saitek_mark5.cpp @@ -436,7 +436,7 @@ void mark5_state::mark5(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); screen.set_refresh_hz(60); - screen.set_size(942, 1080); + screen.set_size(942/1.5, 1080/1.5); screen.set_visarea_full(); config.set_default_layout(layout_saitek_mark5); diff --git a/src/mame/drivers/saitek_simultano.cpp b/src/mame/drivers/saitek_simultano.cpp index a5cfaf3f967..a01e5f80391 100644 --- a/src/mame/drivers/saitek_simultano.cpp +++ b/src/mame/drivers/saitek_simultano.cpp @@ -19,6 +19,9 @@ Hardware notes: It also appeared in Tandy's Chess Champion 2150, not as a simple rebrand, but with hardware differences: 3MHz R65C02, 1 64KB ROM and no EGR socket. +TODO: +- where does the IRQ come from? same problem as with stratos + ***************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/saitek_ssystem3.cpp b/src/mame/drivers/saitek_ssystem3.cpp index 189c82c21f1..08ae361f714 100644 --- a/src/mame/drivers/saitek_ssystem3.cpp +++ b/src/mame/drivers/saitek_ssystem3.cpp @@ -521,7 +521,7 @@ void ssystem3_state::ssystem3(machine_config &config) screen_device &screen(SCREEN(config, "chessunit", SCREEN_TYPE_SVG)); screen.set_refresh_hz(60); - screen.set_size(1060, 1080); + screen.set_size(1060/1.5, 1080/1.5); screen.set_visarea_full(); PWM_DISPLAY(config, m_display[1]).set_size(8, 48); diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp index 4b508f34580..c370141917e 100644 --- a/src/mame/drivers/saitek_stratos.cpp +++ b/src/mame/drivers/saitek_stratos.cpp @@ -9,7 +9,6 @@ SciSys/Saitek Stratos chesscomputer family (1987-1990) - Stratos - Turbo King - Corona --> saitek_corona.cpp -- Simultano --> saitek_simultano.cpp IMPORTANT: The user is expected to press the STOP button to turn off the computer. When not using -autosave, press that button before exiting MAME, or NVRAM can get corrupt. @@ -38,7 +37,6 @@ Hardware notes: Stratos/Turbo King are identical. Corona has magnet sensors and two HELIOS chips. -Simultano has an extra LCD screen representing the chessboard state. There is no official Saitek program versioning for these. The D/D+ versions are known since they're the same chess engine as later Saitek modules, such as the Analyst module. diff --git a/src/mame/layout/saitek_ssystem3.lay b/src/mame/layout/saitek_ssystem3.lay index 64643ef2044..72957cb7e79 100644 --- a/src/mame/layout/saitek_ssystem3.lay +++ b/src/mame/layout/saitek_ssystem3.lay @@ -12,18 +12,10 @@ license:CC0 - - - - - - - - @@ -48,6 +40,48 @@ license:CC0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -160,16 +194,86 @@ license:CC0 - + - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -246,6 +350,53 @@ license:CC0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From b100191d72e46cc9928946693efa3cd5eda0e05e Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Thu, 30 Jul 2020 19:16:33 -0400 Subject: cdi.cpp: cdimono1 and cdibios DEMOTED per developer request (nw) --- src/mame/drivers/cdi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/cdi.cpp b/src/mame/drivers/cdi.cpp index 41da9a40d8f..94e939df12b 100644 --- a/src/mame/drivers/cdi.cpp +++ b/src/mame/drivers/cdi.cpp @@ -885,14 +885,14 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ // BIOS / System -CONS( 1991, cdimono1, 0, 0, cdimono1, cdi, cdi_state, empty_init, "Philips", "CD-i (Mono-I) (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +CONS( 1991, cdimono1, 0, 0, cdimono1, cdi, cdi_state, empty_init, "Philips", "CD-i (Mono-I) (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) CONS( 1991, cdimono2, 0, 0, cdimono2, cdimono2, cdi_state, empty_init, "Philips", "CD-i (Mono-II) (NTSC)", MACHINE_NOT_WORKING ) CONS( 1991, cdi910, 0, 0, cdi910, cdimono2, cdi_state, empty_init, "Philips", "CD-i 910-17P Mini-MMC (PAL)", MACHINE_NOT_WORKING ) CONS( 1991, cdi490a, 0, 0, cdimono1, cdi, cdi_state, empty_init, "Philips", "CD-i 490", MACHINE_NOT_WORKING ) // The Quizard games are retail CD-i units in a cabinet, with an additional JAMMA adapter and dongle for protection, hence being clones of the system. /* YEAR NAME PARENT MACHINE INPUT DEVICE INIT MONITOR COMPANY FULLNAME */ -GAME( 1995, cdibios, 0, cdimono1, quizard, cdi_state, empty_init, ROT0, "Philips", "CD-i (Mono-I) (PAL) BIOS", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IS_BIOS_ROOT ) +GAME( 1995, cdibios, 0, cdimono1, quizard, cdi_state, empty_init, ROT0, "Philips", "CD-i (Mono-I) (PAL) BIOS", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IS_BIOS_ROOT ) GAME( 1995, quizard, cdibios, quizard, quizard, quizard_state, empty_init, ROT0, "TAB Austria", "Quizard (v1.8, German, i8751 DE 11 D3)", MACHINE_IMPERFECT_SOUND ) GAME( 1995, quizard_17, quizard, quizard, quizard, quizard_state, empty_init, ROT0, "TAB Austria", "Quizard (v1.7, German, i8751 DE 11 D3)", MACHINE_IMPERFECT_SOUND ) -- cgit v1.2.3 From ae1872fe7a445c8c32f87e37e30995257045b10d Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Fri, 31 Jul 2020 01:45:54 +0200 Subject: Funworld.cpp: Cleaned-up the driver. Added and corrected technical notes. --- src/mame/drivers/funworld.cpp | 1012 ++++++++++++++++++++--------------------- 1 file changed, 503 insertions(+), 509 deletions(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index 502628036e1..f5ed3a71141 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -120,7 +120,7 @@ * Royal Card (stealth with MSX multigame), bootleg, 1991. - Supported games: 100 + Supported games: 101 ***************************************************************************************** @@ -180,11 +180,12 @@ - Encryption. - A) Encrypted CPU. At least two Fun World boards have custom encrypted CPUs: + A) Encrypted CPU. At least five Fun World boards have custom encrypted CPUs: - - Joker Card from Vesely Svet use a custom unknown CPU and use encrypted prg roms. + - Joker Card from Vesely Svet, Mega Card, Power Card and Multi Win, + use custom unknown CPUs and also encrypted/scrambled prg roms. - Royal Card (slovak, encrypted) from Evona Electronic seems to use a block - with CPU + extras (ICs, TTL, etc) to manage the encryption. + with CPU + extras (ICs, TTL, etc) to manage the encryption. B) General encryption. Managed through hardware: @@ -627,16 +628,12 @@ *** TO DO *** - - Figure out the royalcdc encryption. - Figure out the remaining PIA connections for almost all games. - Reverse-engineering the boot code of Jolly Card Professional 2.0, and Royal Card Professional 2.0 to get the proper codes to boot. - Analyze the unknown writes to $2000/$4000 in some games. - Check for the reads to the ay8910 output ports in some games. - Implement the MCU in monglfir and soccernw. - - Check for a possible bug in the royalcrdf decryption scheme, that - doesn't cover the BRK instruction properly, changing the next value - on the fly turning a NOP into a PLA, messing the Stack Pointer. ****************************************************************************************/ @@ -680,17 +677,17 @@ void funworld_state::funworld_lamp_a_w(uint8_t data) -x-- ---- Hopper Motor (inverted). x--- ---- HOLD4 lamp. */ - m_lamps[0] = BIT(~data, 1); /* Hold1 (inverted) */ - m_lamps[2] = BIT(~data, 1); /* Hold3 (inverted, see pinouts) */ + m_lamps[0] = BIT(~data, 1); // Hold1 (inverted) + m_lamps[2] = BIT(~data, 1); // Hold3 (inverted, see pinouts) - m_lamps[1] = BIT(~data, 3); /* Hold2 / Low (inverted) */ - m_lamps[3] = BIT(data, 7); /* Hold4 / High */ - m_lamps[5] = BIT(~data, 5); /* Cancel / Collect (inverted) */ + m_lamps[1] = BIT(~data, 3); // Hold2 / Low (inverted) + m_lamps[3] = BIT(data, 7); // Hold4 / High + m_lamps[5] = BIT(~data, 5); // Cancel / Collect (inverted) - machine().bookkeeping().coin_counter_w(0, data & 0x01); /* Credit In counter */ - machine().bookkeeping().coin_counter_w(7, data & 0x04); /* Credit Out counter, mapped as coin 8 */ + machine().bookkeeping().coin_counter_w(0, data & 0x01); // Credit In counter + machine().bookkeeping().coin_counter_w(7, data & 0x04); // Credit Out counter, mapped as coin 8 - m_lamps[7] = BIT(~data, 6); /* Hopper Motor (inverted) */ + m_lamps[7] = BIT(~data, 6); // Hopper Motor (inverted) // popmessage("Lamps A: %02X", (data ^ 0xff)); } @@ -704,17 +701,17 @@ void funworld_state::funworld_lamp_b_w(uint8_t data) ---- -x-- Unknown (inverted). xxxx x--- Unknown. */ - m_lamps[4] = BIT(data, 0); /* Hold5 / Bet */ - m_lamps[6] = BIT(data, 1); /* Start / Deal / Draw */ + m_lamps[4] = BIT(data, 0); // Hold5 / Bet + m_lamps[6] = BIT(data, 1); // Start / Deal / Draw // popmessage("Lamps B: %02X", data); } WRITE_LINE_MEMBER(funworld_state::pia1_ca2_w) { -/* TAB and Impera games are writing 0x01 constantly, and 0x00 with each screen change. - This line is tied to sort of reset circuitery. -*/ +// TAB and Impera games are writing 0x01 constantly, and 0x00 with each screen change. +// This line is tied to some sort of reset circuitery. + // popmessage("PIA1 CA2: %02X", state); } @@ -786,9 +783,9 @@ void funworld_state::magicrd2_map(address_map &map) map(0x0c00, 0x0c01).w("ay8910", FUNC(ay8910_device::address_data_w)); map(0x0e00, 0x0e00).w("crtc", FUNC(mc6845_device::address_w)); map(0x0e01, 0x0e01).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); - map(0x2c00, 0x2cff).ram(); /* range for protection */ - map(0x3600, 0x36ff).ram(); /* some games use $3603-05 range for protection */ - map(0x3c00, 0x3cff).ram(); /* range for protection */ + map(0x2c00, 0x2cff).ram(); // range for protection + map(0x3600, 0x36ff).ram(); // some games use $3603-05 range for protection + map(0x3c00, 0x3cff).ram(); // range for protection map(0x4000, 0x4fff).ram().w(FUNC(funworld_state::funworld_videoram_w)).share("videoram"); map(0x5000, 0x5fff).ram().w(FUNC(funworld_state::funworld_colorram_w)).share("colorram"); map(0x6000, 0xffff).rom(); @@ -803,9 +800,9 @@ void funworld_state::cuoreuno_map(address_map &map) map(0x0c00, 0x0c01).w("ay8910", FUNC(ay8910_device::address_data_w)); map(0x0e00, 0x0e00).w("crtc", FUNC(mc6845_device::address_w)); map(0x0e01, 0x0e01).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); - map(0x2000, 0x2000).nopr(); /* some unknown reads */ - map(0x3e00, 0x3fff).ram(); /* some games use $3e03-05 range for protection */ - map(0x4000, 0x5fff).rom(); /* used by rcdino4 (dino4 hw ) */ + map(0x2000, 0x2000).nopr(); // some unknown reads + map(0x3e00, 0x3fff).ram(); // some games use $3e03-05 range for protection + map(0x4000, 0x5fff).rom(); // used by rcdino4 (dino4 hw ) map(0x6000, 0x6fff).ram().w(FUNC(funworld_state::funworld_videoram_w)).share("videoram"); map(0x7000, 0x7fff).ram().w(FUNC(funworld_state::funworld_colorram_w)).share("colorram"); map(0x8000, 0xffff).rom(); @@ -1000,9 +997,6 @@ void funworld_state::gratispk_map(address_map &map) map(0x0c00, 0x0c01).w("ay8910", FUNC(ay8910_device::address_data_w)); map(0x0e00, 0x0e00).w("crtc", FUNC(mc6845_device::address_w)); map(0x0e01, 0x0e01).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); -// map(0x2c00, 0x2cff).ram(); /* range for protection */ -// map(0x3600, 0x36ff).ram(); /* some games use $3603-05 range for protection */ -// map(0x3c00, 0x3cff).ram(); /* range for protection */ map(0x4000, 0x4fff).ram().w(FUNC(funworld_state::funworld_videoram_w)).share("videoram"); map(0x5000, 0x5fff).ram().w(FUNC(funworld_state::funworld_colorram_w)).share("colorram"); map(0x6000, 0xffff).rom(); @@ -1061,14 +1055,14 @@ static INPUT_PORTS_START( funworld ) PORT_DIPSETTING( 0x00, "Dattl Insert" ) PORT_DIPSETTING( 0x10, "TAB Insert" ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1110,7 +1104,7 @@ static INPUT_PORTS_START( jolycdcr ) PORT_DIPNAME( 0x01, 0x01, "State" ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, "Keyboard Test" ) PORT_DIPSETTING( 0x01, "Play" ) - PORT_DIPNAME( 0x02, 0x00, "Remote Value" ) PORT_DIPLOCATION("SW1:7") + PORT_DIPNAME( 0x02, 0x00, "Remote Value" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, "10 Points/Pulse" ) PORT_DIPSETTING( 0x02, "100 Points/Pulse" ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") @@ -1123,14 +1117,14 @@ static INPUT_PORTS_START( jolycdcr ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1184,14 +1178,14 @@ static INPUT_PORTS_START( jolycdit ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1233,7 +1227,7 @@ static INPUT_PORTS_START( jolycdib ) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, "Remote Value" ) PORT_DIPLOCATION("SW1:7") + PORT_DIPNAME( 0x02, 0x00, "Remote Value" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, "10 Points/Pulse" ) PORT_DIPSETTING( 0x02, "100 Points/Pulse" ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") @@ -1246,14 +1240,14 @@ static INPUT_PORTS_START( jolycdib ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enables Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Auto Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* when is ON, allow the player to activate/deactivate the autohold through CANCEL button */ + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // when is ON, allows the player to activate/deactivate the autohold through CANCEL button - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1308,11 +1302,11 @@ static INPUT_PORTS_START( jolycdic ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enables Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Auto Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* when is ON, allow the player to activate/deactivate the autohold through CANCEL button */ + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // when is ON, allows the player to activate/deactivate the autohold through CANCEL button PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1367,7 +1361,7 @@ static INPUT_PORTS_START( jolyc980 ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) @@ -1410,9 +1404,9 @@ static INPUT_PORTS_START( bonuscrd ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW") -/* DIP switch 8 should be left ON by default (all remaining ones in OFF) - to allow initialization. You can change settings later, after the boot. -*/ +// DIP switch 8 should be left ON by default (all remaining ones in OFF) +// to allow initialization. You can change settings later, after the boot. + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) @@ -1435,8 +1429,8 @@ static INPUT_PORTS_START( bonuscrd ) PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1475,9 +1469,9 @@ static INPUT_PORTS_START( bigdeal ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("DSW") -/* DIP switch 8 should be left ON by default (all remaining ones in OFF) - to allow initialization. You can change settings later, after the boot. -*/ +// DIP switch 8 should be left ON by default (all remaining ones in OFF) +// to allow initialization. You can change settings later, after the boot. + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) @@ -1500,8 +1494,8 @@ static INPUT_PORTS_START( bigdeal ) PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1543,7 +1537,7 @@ static INPUT_PORTS_START( magicrd2 ) PORT_DIPNAME( 0x01, 0x01, "State" ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, "Keyboard Test" ) PORT_DIPSETTING( 0x01, "Play" ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") /* remote credits settings are always 10 points/pulse */ + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") // remote credits settings are always 10 points/pulse PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:6") @@ -1562,8 +1556,8 @@ static INPUT_PORTS_START( magicrd2 ) PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1605,7 +1599,7 @@ static INPUT_PORTS_START( royalcrd ) PORT_DIPNAME( 0x01, 0x01, "State" ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x00, "Keyboard Test" ) PORT_DIPSETTING( 0x01, "Play" ) - PORT_DIPNAME( 0x02, 0x02, "Remote Value" ) PORT_DIPLOCATION("SW1:7") /* listed as 'Coin-C' in some sources */ + PORT_DIPNAME( 0x02, 0x02, "Remote Value" ) PORT_DIPLOCATION("SW1:7") // listed as 'Coin-C' in some sources PORT_DIPSETTING( 0x00, "10 Points/Pulse" ) PORT_DIPSETTING( 0x02, "100 Points/Pulse" ) PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:6") @@ -1618,14 +1612,14 @@ static INPUT_PORTS_START( royalcrd ) PORT_DIPSETTING( 0x00, "Dattl Insert" ) PORT_DIPSETTING( 0x10, "TAB Insert" ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1680,14 +1674,14 @@ static INPUT_PORTS_START( royalcrdf ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x40, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -1782,7 +1776,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( cuoreuno ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1 / Switch Bet (1-Max)") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet / Prendi (Take)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Gioca (Play)") @@ -1833,8 +1827,8 @@ static INPUT_PORTS_START( cuoreuno ) PORT_DIPSETTING( 0x40, "Manual - Tickets" ) PORT_DIPSETTING( 0x60, "Manual - User Choice 2" ) - /* the following one (1st DSW) seems to be disconnected - to avoid the use of remote credits or direct payout */ +// the following one (1st DSW) seems to be disconnected +// to avoid the use of remote credits or direct payout PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1843,7 +1837,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( pool10 ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1 / Switch Bet (1-Max)") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet / Prendi (Take)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Gioca (Play)") @@ -1894,7 +1888,7 @@ static INPUT_PORTS_START( pool10 ) PORT_DIPSETTING( 0x40, "Manual - Tickets" ) PORT_DIPSETTING( 0x60, "Manual - User Choice 2" ) - /* direct payout without play Super Game */ +// direct payout without play Super Game PORT_DIPNAME( 0x80, 0x80, "Direct Payout (tickets)" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1903,7 +1897,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( lunapark ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1 / Switch Bet (1-Max)") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet / Prendi (Take)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Gioca (Play)") @@ -1955,13 +1949,13 @@ static INPUT_PORTS_START( lunapark ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - /* the following one seems to be disconnected - to avoid the use of remote credits or direct payout */ +// the following one seems to be disconnected +// to avoid the use of remote credits or direct payout PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - /* the following one is connected to 1st DSW and is meant - for switch between different programs stored in different - halves of the program ROM */ +// the following one is connected to 1st DSW and is meant +// for switch between different programs stored in different +// halves of the program ROM PORT_START("SELDSW") PORT_DIPNAME( 0x01, 0x00, "Game Selector" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "PROGRAM 1, (5 TIRI LIRE 500, ABILITA VINTE)" ) @@ -2017,15 +2011,14 @@ static INPUT_PORTS_START( jolyjokra ) PORT_DIPSETTING( 0x00, "disabled" ) PORT_DIPSETTING( 0x10, "enabled" ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x40, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ - +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -2080,14 +2073,14 @@ static INPUT_PORTS_START( vegasslw ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -2142,14 +2135,14 @@ static INPUT_PORTS_START( vegasfst ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -2204,14 +2197,14 @@ static INPUT_PORTS_START( vegasfte ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x80, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -2266,14 +2259,14 @@ static INPUT_PORTS_START( vegasmil ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) PORT_DIPSETTING( 0x40, "No Auto Hold" ) - /* after nvram init, set the following one to 'manual' - to allow the remote credits mode to work */ +// after nvram init, set the following one to 'manual' +// to allow the remote credits mode to work PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) @@ -2559,7 +2552,7 @@ static INPUT_PORTS_START( witchryl ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ + PORT_DIPSETTING( 0x00, "With Joker" ) // also enables Five of a Kind PORT_DIPSETTING( 0x20, "Without Joker" ) PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x00, "Auto Hold" ) @@ -2657,7 +2650,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( chinatow ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1 / Switch Bet (1-Max)") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet / Prendi (Take)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Gioca (Play) / Gmable") @@ -2714,7 +2707,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( rcdino4 ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") @@ -2771,7 +2764,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( royal ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* no remote credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no remote credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop 1 / Switch Bet (1-Max)") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Bet / Prendi (Take)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Gioca (Play)") @@ -2921,11 +2914,11 @@ static const gfx_layout charlayout = in the first and second half of the bipolar PROM. */ -static GFXDECODE_START( gfx_fw1stpal ) /* Adressing the first half of the palette */ +static GFXDECODE_START( gfx_fw1stpal ) // Adressing the first half of the palette GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) GFXDECODE_END -static GFXDECODE_START( gfx_fw2ndpal ) /* Adressing the second half of the palette */ +static GFXDECODE_START( gfx_fw2ndpal ) // Adressing the second half of the palette GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0x100, 16 ) GFXDECODE_END @@ -2992,7 +2985,8 @@ GFXDECODE_END */ -/* these ports are set to output anyway, but this quietens the log */ + +// these ports are set to output anyway, but this quietens the log uint8_t funworld_state::funquiz_ay8910_a_r() { return 0x00; @@ -3003,6 +2997,7 @@ uint8_t funworld_state::funquiz_ay8910_b_r() return 0x00; } + /******************************** * Machine Start & Reset * ********************************/ @@ -3022,14 +3017,15 @@ void lunapark_state::machine_reset() membank("bank1")->set_entry(seldsw); } + /************************** * Machine Drivers * **************************/ void funworld_state::fw1stpal(machine_config &config) { - /* basic machine hardware */ - M65SC02(config, m_maincpu, CPU_CLOCK); /* 2MHz */ + // basic machine hardware + M65SC02(config, m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funworld_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -3043,31 +3039,31 @@ void funworld_state::fw1stpal(machine_config &config) pia1.readpb_handler().set_ioport("DSW"); pia1.ca2_handler().set(FUNC(funworld_state::pia1_ca2_w)); - /* 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((124+1)*4, (30+1)*8); /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */ - screen.set_visarea(0*4, 96*4-1, 0*8, 29*8-1); /* Taken from MC6845 init, registers 01 & 06 */ + screen.set_size((124+1)*4, (30+1)*8); // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) + screen.set_visarea(0*4, 96*4-1, 0*8, 29*8-1); // Taken from MC6845 init, registers 01 & 06 screen.set_screen_update(FUNC(funworld_state::screen_update_funworld)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_fw1stpal); PALETTE(config, m_palette, FUNC(funworld_state::funworld_palette), 0x200); - mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); /* 2MHz, verified on jollycrd & royalcrd */ + mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); // 2 MHz, verified on jollycrd & royalcrd crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(4); crtc.out_vsync_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &ay8910(AY8910(config, "ay8910", SND_CLOCK)); /* 2MHz */ + ay8910_device &ay8910(AY8910(config, "ay8910", SND_CLOCK)); // 2 MHz. ay8910.port_a_write_callback().set(FUNC(funworld_state::funworld_lamp_a_w)); ay8910.port_b_write_callback().set(FUNC(funworld_state::funworld_lamp_b_w)); - ay8910.add_route(ALL_OUTPUTS, "mono", 2.5); /* analyzed to avoid clips */ + ay8910.add_route(ALL_OUTPUTS, "mono", 2.5); // analyzed to avoid clips } @@ -3075,7 +3071,7 @@ void funworld_state::fw2ndpal(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funworld_map); m_gfxdecode->set_info(gfx_fw2ndpal); @@ -3088,7 +3084,7 @@ void funworld_state::funquiz(machine_config &config) fw1stpal(config); // gray background. // fw2ndpal(config); // blue background. - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::funquiz_map); subdevice("ay8910")->port_a_read_callback().set(FUNC(funworld_state::funquiz_ay8910_a_r)); @@ -3100,15 +3096,15 @@ void magicrd2_state::magicrd2(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &magicrd2_state::magicrd2_map); subdevice("crtc")->set_visarea_adjust(0, -56, 0, 0); - ay8910_device &ay8910(AY8910(config.replace(), "ay8910", SND_CLOCK)); /* 2MHz */ + ay8910_device &ay8910(AY8910(config.replace(), "ay8910", SND_CLOCK)); // 2 MHz. ay8910.port_a_write_callback().set(FUNC(magicrd2_state::funworld_lamp_a_w)); ay8910.port_b_write_callback().set(FUNC(magicrd2_state::funworld_lamp_b_w)); - ay8910.add_route(ALL_OUTPUTS, "mono", 1.5); /* analyzed to avoid clips */ + ay8910.add_route(ALL_OUTPUTS, "mono", 1.5); // analyzed to avoid clips } @@ -3116,7 +3112,7 @@ void funworld_state::royalcd1(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* (G65SC02P in pro version) 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // (G65SC02P in pro version) 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::magicrd2_map); } @@ -3125,7 +3121,7 @@ void funworld_state::royalcd2(machine_config &config) { fw2ndpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::magicrd2_map); } @@ -3134,7 +3130,7 @@ void funworld_state::cuoreuno(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::cuoreuno_map); } @@ -3143,13 +3139,13 @@ void funworld_state::saloon(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::saloon_map); config.device_remove("pia0"); config.device_remove("pia1"); - /* Serial Memory */ + // Serial Memory I2C_24C02(config, "i2cmem", 0).set_e0(1); // ? or maybe 2nd half of 24C04? } @@ -3158,7 +3154,7 @@ void funworld_state::witchryl(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::witchryl_map); } @@ -3167,7 +3163,7 @@ void lunapark_state::lunapark(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &lunapark_state::lunapark_map); // mirrored video RAM (4000/5000 to 6000/7000). } @@ -3176,7 +3172,7 @@ void chinatow_state::chinatow(machine_config &config) { fw2ndpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &chinatow_state::chinatow_map); } @@ -3184,7 +3180,7 @@ void chinatow_state::rcdino4(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &chinatow_state::chinatow_map); } @@ -3193,7 +3189,7 @@ void intergames_state::intrgmes(machine_config &config) { fw1stpal(config); - M65SC02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + M65SC02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &intergames_state::intergames_map); //m_maincpu->set_periodic_int(FUNC(intergames_state::nmi_line_pulse), attotime::from_hz(60)); @@ -3205,7 +3201,7 @@ void funworld_state::fw_brick_1(machine_config &config) { fw1stpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::fw_brick_map); NVRAM(config, "nvram1", nvram_device::DEFAULT_ALL_0); @@ -3216,7 +3212,7 @@ void funworld_state::fw_brick_2(machine_config &config) { fw2ndpal(config); - R65C02(config.replace(), m_maincpu, CPU_CLOCK); /* 2MHz */ + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // 2 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &funworld_state::fw_brick_map); NVRAM(config, "nvram1", nvram_device::DEFAULT_ALL_0); @@ -3245,39 +3241,39 @@ uint8_t royalcrdf_state::royalcrdf_opcode_r(offs_t offset) // 1-bit-to-1-bit bitswaps; furthermore, in both sets one of the // bitswaps is equal to the one applied to all the data (but notice // that, in those cases, we are applying it twice to opcodes here) - constexpr std::array,16> bs{{ // bitswaps for data bits 1,2,5 & 7, in that order - { 1,5,2,7 }, - { 1,5,2,7 }, - { 5,1,7,2 }, - { 7,2,5,1 }, - { 1,5,2,7 }, - { 1,5,2,7 }, - { 5,2,1,7 }, - { 7,2,5,1 }, - { 1,5,2,7 }, - { 1,5,2,7 }, - { 5,1,7,2 }, - { 1,7,5,2 }, - { 1,5,2,7 }, - { 1,5,2,7 }, - { 5,2,1,7 }, - { 1,7,5,2 } + constexpr std::array, 16> bs{{ // bitswaps for data bits 1, 2, 5 & 7, in that order + { 1, 5, 2, 7 }, + { 1, 5, 2, 7 }, + { 5, 1, 7, 2 }, + { 7, 2, 5, 1 }, + { 1, 5, 2, 7 }, + { 1, 5, 2, 7 }, + { 5, 2, 1, 7 }, + { 7, 2, 5, 1 }, + { 1, 5, 2, 7 }, + { 1, 5, 2, 7 }, + { 5, 1, 7, 2 }, + { 1, 7, 5, 2 }, + { 1, 5, 2, 7 }, + { 1, 5, 2, 7 }, + { 5, 2, 1, 7 }, + { 1, 7, 5, 2 } }}; // xor masks, dependent on the same address bits than the bitswaps, // and with the same 5-values structure - constexpr std::array xm { + constexpr std::array xm { 0x02, 0x02, 0xa6, 0x82, 0x02, 0x02, 0x06, 0x82, 0x02, 0x02, 0xa6, 0x00, 0x02, 0x02, 0x06, 0x00 }; uint8_t data {_maincpu->space(AS_PROGRAM).read_byte(offset)}; - if(offset<0x800) - data = bitswap<8>(data^0x22,2,6,7,4,3,1,5,0); + if(offset < 0x800) + data = bitswap<8>(data ^ 0x22, 2, 6, 7, 4, 3, 1, 5, 0); - unsigned idx {bitswap<4>(offset, 8,5,2,1)}; + unsigned idx {bitswap<4>(offset, 8, 5, 2, 1)}; - return bitswap<8>(data, bs[idx][3],6,bs[idx][2],4,3,bs[idx][1],bs[idx][0],0) ^ xm[idx]; + return bitswap<8>(data, bs[idx][3], 6, bs[idx][2], 4, 3, bs[idx][1], bs[idx][0], 0) ^ xm[idx]; } void royalcrdf_state::royalcrdf_opcodes_map(address_map &map) @@ -3290,15 +3286,15 @@ void royalcrdf_state::driver_init() uint8_t *ROM = memregion("maincpu")->base(); for (int x = 0x8000; x < 0x10000; x++) { - ROM[x] = bitswap<8>(ROM[x]^0x22,2,6,7,4,3,1,5,0); + ROM[x] = bitswap<8>(ROM[x] ^ 0x22, 2, 6, 7, 4, 3, 1, 5, 0); } /* Temporary hack to modify the value that ends to be a NOP, after the BRK, and balanced checksums. Will be removed once found a workaround in the decryption routines. */ - ROM[0x802d]=0xa2; // checksum. - ROM[0xbc4e]=0x68; // future NOP after BRK. + ROM[0x802d] = 0xa2; // checksum. + ROM[0xbc4e] = 0x68; // future NOP after BRK. } void royalcrdf_state::royalcrdf(machine_config &config) @@ -3320,19 +3316,19 @@ uint8_t multiwin_state::multiwin_opcode_r(offs_t offset) // one of the address bits don't have effect on the bitswap, just on the xor; // again, we have just five different bitswaps, and the hardware is probably using // passive logic on the address bits to do the selection - constexpr std::array,8> bs{{ // bitswaps for data bits 0,2,4,5 & 7, in that order - { 5,2,4,0,7 }, - { 4,0,2,7,5 }, - { 7,4,5,2,0 }, - { 4,0,2,7,5 }, - { 2,7,0,5,4 }, - { 4,0,2,7,5 }, - { 0,5,7,4,2 }, - { 4,0,2,7,5 } + constexpr std::array, 8> bs{{ // bitswaps for data bits 0, 2, 4, 5 & 7, in that order + { 5, 2, 4, 0, 7 }, + { 4, 0, 2, 7, 5 }, + { 7, 4, 5, 2, 0 }, + { 4, 0, 2, 7, 5 }, + { 2, 7, 0, 5, 4 }, + { 4, 0, 2, 7, 5 }, + { 0, 5, 7, 4, 2 }, + { 4, 0, 2, 7, 5 } }}; // xor masks - constexpr std::array xm { + constexpr std::array xm { 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0xb5, 0x10, 0xb5, 0x20, 0xb5, 0x30, 0xb5 }; @@ -3352,7 +3348,7 @@ void multiwin_state::driver_init() uint8_t *ROM = memregion("maincpu")->base(); for (int x = 0x4000; x < 0x10000; x++) { - ROM[x] = bitswap<8>(ROM[x]^0x91,5,6,7,2,3,0,1,4); + ROM[x] = bitswap<8>(ROM[x] ^ 0x91, 5, 6, 7, 2, 3, 0, 1, 4); } } @@ -3392,7 +3388,7 @@ uint8_t powercrd_state::powercrd_opcode_r(offs_t offset) constexpr uint8_t UNKN {0xfc}; - constexpr std::array,4> decryption_tables{{ + constexpr std::array, 4> decryption_tables{{ // _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f { 0xe8, 0x29, UNKN, UNKN, 0x85, UNKN, 0x18, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, 0xd5, // 0_ UNKN, UNKN, 0xa6, 0x4c, UNKN, UNKN, 0x84, UNKN, UNKN, UNKN, 0x69, UNKN, 0x91, 0x38, 0xa8, UNKN, // 1_ @@ -3467,7 +3463,7 @@ uint8_t powercrd_state::powercrd_opcode_r(offs_t offset) }}; uint8_t data {_maincpu->space(AS_PROGRAM).read_byte(offset)}; - return decryption_tables[offset&3][data]; + return decryption_tables[offset & 3][data]; } void powercrd_state::powercrd_opcodes_map(address_map &map) @@ -3507,7 +3503,7 @@ uint8_t megacard_state::megacard_opcode_r(offs_t offset) constexpr uint8_t UNKN {0xfc}; - constexpr std::array,4> decryption_tables{{ + constexpr std::array, 4> decryption_tables{{ // _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f { UNKN, 0x6c, UNKN, UNKN, UNKN, 0xfa, 0x38, UNKN, UNKN, 0x4c, 0xd8, UNKN, 0xe8, UNKN, 0xc5, UNKN, // 0_ UNKN, 0xa6, 0x91, UNKN, UNKN, UNKN, UNKN, 0x58, 0xa0, 0xe0, 0xb9, 0x4e, UNKN, UNKN, UNKN, 0x78, // 1_ @@ -3582,7 +3578,7 @@ uint8_t megacard_state::megacard_opcode_r(offs_t offset) }}; uint8_t data {_maincpu->space(AS_PROGRAM).read_byte(offset)}; - return decryption_tables[offset&3][data]; + return decryption_tables[offset & 3][data]; } void megacard_state::megacard_opcodes_map(address_map &map) @@ -3656,7 +3652,7 @@ uint8_t jokercrd_state::jokercrd_opcode_r(offs_t offset) constexpr uint8_t UNKN {0xfc}; - constexpr std::array,4> decryption_tables{{ + constexpr std::array, 4> decryption_tables{{ // _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f { UNKN, UNKN, UNKN, 0x3d, 0xe0, UNKN, UNKN, 0xb0, UNKN, 0xa0, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, // 0_ UNKN, UNKN, 0x4a, 0x65, 0x18, 0x64, 0xad, UNKN, 0x90, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, // 1_ @@ -3731,7 +3727,7 @@ uint8_t jokercrd_state::jokercrd_opcode_r(offs_t offset) }}; uint8_t data {_maincpu->space(AS_PROGRAM).read_byte(offset)}; - return decryption_tables[offset&3][data]; + return decryption_tables[offset & 3][data]; } void jokercrd_state::jokercrd_opcodes_map(address_map &map) @@ -3829,7 +3825,7 @@ ROM_START( jollycrd ) ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jollycrd_nvram.bin", 0x0000, 0x0800, CRC(8f0a86c9) SHA1(467bd4f601ac6aa818c036f1269c2d43d27854f6) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -3865,13 +3861,13 @@ ROM_START( jollycrda ) ROM_LOAD( "tab3.bin", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "tab2.bin", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* Default NVRAM. The game doesn't work without it */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM. the game doesn't work without it ROM_LOAD( "jollycrda_nvram.bin", 0x0000, 0x0800, CRC(5cbb4d8f) SHA1(da5edbef20bb4f0c634939389b3a9744c5743641) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "jop.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) - ROM_REGION( 0x0200, "plds", 0 ) /* Cracked PLD */ + ROM_REGION( 0x0200, "plds", 0 ) // cracked PLD ROM_LOAD( "tab1.0_gal16v8s.bin", 0x0000, 0x0117, CRC(574f9a48) SHA1(bb5e2e86da85130d92f61cc57038a844950f443e) ) ROM_END @@ -3884,7 +3880,7 @@ ROM_START( jolyc3x3 ) ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyc3x3_nvram.bin", 0x0000, 0x0800, CRC(727c70cf) SHA1(3639b0891514064e21ebdb280791cc9c8f5ba481) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -3949,18 +3945,20 @@ ROM_END */ ROM_START( jolycmzs ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* MZS Tech */ + ROM_REGION( 0x10000, "maincpu", 0 ) // MZS Tech ROM_LOAD( "mzstech.bin", 0x8000, 0x8000, CRC(cebd1e56) SHA1(24d88b3383cecf3829556d75460053663aab4ef1) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) -/* Load a default eeprom, otherwise an annoying password system should be inserted with - inputs correlated to a code that pops up on the screen. - This code should be inserted into a PC-DOS program, that program is nowhere to be found right now. +/* Load a default NVRAM, otherwise an annoying password system appears + generating a code that needs to be parsed by a PC-DOS program, that + is currently missing and never would appear. This program is supossed + to give back an hexa code to feed in the game through a combination + of inputs. */ - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycmzs_nvram.bin", 0x0000, 0x0800, CRC(828ffeef) SHA1(6a52282231f1944ba79049f267a9c1941373aea2) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -3968,18 +3966,20 @@ ROM_START( jolycmzs ) ROM_END ROM_START( jolyc980 ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Spale Soft */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Spale Soft ROM_LOAD( "j980.bin", 0x8000, 0x8000, CRC(48249fff) SHA1(390cd0eb3399446a66363dc6760458170e1970fd) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) -/* Load a default eeprom, otherwise an annoying password system should be inserted with - inputs correlated to a code that pops up on the screen. - This code should be inserted into a PC-DOS program, that program is nowhere to be found right now. +/* Load a default NVRAM, otherwise an annoying password system appears + generating a code that needs to be parsed by a PC-DOS program, that + is currently missing and never would appear. This program is supossed + to give back an hexa code to feed in the game through a combination + of inputs. */ - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyc980_nvram.bin", 0x0000, 0x0800, CRC(ef2c89c7) SHA1(a286001e205dcd16d914e07ba2b7c820335ab9c2) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -3987,7 +3987,7 @@ ROM_START( jolyc980 ) ROM_END -ROM_START( jolycdev ) /* Jolly Card (lipa) from Evona */ +ROM_START( jolycdev ) // Jolly Card (lipa) from Evona ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "lipa.bin", 0x8000, 0x8000, CRC(62657c98) SHA1(237466dde26540c119c631c75f51c87ea59d1a91) ) @@ -3995,7 +3995,7 @@ ROM_START( jolycdev ) /* Jolly Card (lipa) from Evona */ ROM_LOAD( "jollyb.bin", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jollya.bin", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdev_nvram.bin", 0x0000, 0x0800, CRC(ae2c2fb8) SHA1(912d673ea8e26ff62520a7b86e702e5260cff4c0) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4024,7 +4024,7 @@ ROM_END Only remote credits, as can be seen in test mode. */ -ROM_START( jolyccra ) /* Jolly Card (croatian, set 1) */ +ROM_START( jolyccra ) // Jolly Card (Croatian, set 1) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "jollyc.bin", 0x8000, 0x8000, CRC(8926d99d) SHA1(dd5d1ac03d30d823dfcfe1349328ecb7afbc37fa) ) @@ -4032,7 +4032,7 @@ ROM_START( jolyccra ) /* Jolly Card (croatian, set 1) */ ROM_LOAD( "jollyb.bin", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jollya.bin", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyccra_nvram.bin", 0x0000, 0x0800, CRC(478ab0a9) SHA1(8c5160d2ac8d4a9db0ae1e478d3bb1513a04544f) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4040,7 +4040,7 @@ ROM_START( jolyccra ) /* Jolly Card (croatian, set 1) */ ROM_END -ROM_START( jolyccrb ) /* Jolly Card (croatian, set 2) */ +ROM_START( jolyccrb ) // Jolly Card (Croatian, set 2) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "jollypkr.003", 0x8000, 0x8000, CRC(ea7340b4) SHA1(7dd468f28a488a4781521809d06db1d7917048ad) ) @@ -4048,7 +4048,7 @@ ROM_START( jolyccrb ) /* Jolly Card (croatian, set 2) */ ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyccrb_nvram.bin", 0x0000, 0x0800, CRC(c1d49c88) SHA1(27ffdedfc7f09ff11c3b2537db3681473b776074) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4078,7 +4078,7 @@ ROM_END - 1x trimmer (volume)(missing) */ -ROM_START( jolycdit ) /* blue TAB PCB, encrypted graphics */ +ROM_START( jolycdit ) // blue TAB PCB, encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "jn.bin", 0x8000, 0x8000, CRC(6ae00ed0) SHA1(5921c2882aeb5eadd0e04a477fa505ad35e9d98c) ) @@ -4086,7 +4086,7 @@ ROM_START( jolycdit ) /* blue TAB PCB, encrypted graphics */ ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(46805150) SHA1(63687ac44f6ace6d8924b2629536bcc7d3979ed2) ) ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(43bcb2df) SHA1(5022bc3a0b852a7cd433e25c3c90a720e6328261) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdit_nvram.bin", 0x0000, 0x0800, CRC(c55c6706) SHA1(a38ae926f057fb47e48ca841b2d097fc4fd06416) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4162,18 +4162,18 @@ ROM_END buttons. */ -ROM_START( jolycdic ) /* another bootleg PCB, encrypted graphics */ +ROM_START( jolycdic ) // another bootleg PCB, encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3ss.bin", 0x8000, 0x8000, CRC(3d7cde61) SHA1(6154878491f4d2f1ea035d18cdf43154c550d509) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(32c24495) SHA1(0d78c4d2743401b5ec9919d09814064eeac8023f) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(91093176) SHA1(b889c617f94161933c35c324c7d84fec182953d8) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdic_nvram.bin", 0x0000, 0x0800, CRC(47a5890b) SHA1(6a6531fe5e8f6c1b5a9aac314b2cce6a0129f6da) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4261,17 +4261,17 @@ ROM_END 1x Unknown POT between two caps, maybe for sound amp stage. */ -ROM_START( jolycdid ) /* Altera EP910PC CPLD */ +ROM_START( jolycdid ) // Altera EP910PC CPLD ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "5.cpu", 0x8000, 0x8000, CRC(56158851) SHA1(abf1daad1198dcc017352742e3c00d57e8955bd4) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "7.bin", 0x0000, 0x8000, CRC(a4452751) SHA1(a0b32a8801ebaee7ede7873b244f1a424433fe94) ) - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL ROM_LOAD( "6.bin", 0x8000, 0x8000, CRC(8b64d4c6) SHA1(8106cba31cd3fbda0855e6070182d248e3d52495) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdid_nvram.bin", 0x0000, 0x0800, CRC(6eb66015) SHA1(39490cf5d404c9e9fb58439f6d9876a3e9b29ba0) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4291,7 +4291,7 @@ ROM_END used by another program. */ -ROM_START( jolycdie ) /* Bootleg PCB, NON encrypted graphics */ +ROM_START( jolycdie ) // Bootleg PCB, NON encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "aic.cpu", 0x8000, 0x8000, CRC(56158851) SHA1(abf1daad1198dcc017352742e3c00d57e8955bd4) ) @@ -4299,7 +4299,7 @@ ROM_START( jolycdie ) /* Bootleg PCB, NON encrypted graphics */ ROM_LOAD( "c.bin", 0x0000, 0x8000, CRC(eff5362c) SHA1(1c9a48866dc5ee37fad6d68465f326d243c821c3) ) ROM_LOAD( "b.bin", 0x8000, 0x8000, CRC(98309e14) SHA1(0d3e3766768fafc728a08668ad693f950d1fabab) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdie_nvram.bin", 0x0000, 0x0800, CRC(1b2fba44) SHA1(be5c956517072581edaebe9ae440a542964c8490) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4315,15 +4315,15 @@ ROM_END 5 & 6 are coins. W is payout. */ -ROM_START( jolycdif ) /* Altera EP910PC CPLD */ +ROM_START( jolycdif ) // Altera EP910PC CPLD ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(80983f6a) SHA1(222ce5d4800887de92a73decbad31e96f8da3b4a) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(a4452751) SHA1(a0b32a8801ebaee7ede7873b244f1a424433fe94) ) - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL ROM_LOAD( "3.bin", 0x8000, 0x8000, CRC(2856c82d) SHA1(7ce835bc2246ffede180cff0d8d0d4528afcc297) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // proper dump @@ -4384,9 +4384,9 @@ ROM_START( jolycdih ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "3.bin", 0x0000, 0x8000, CRC(a4452751) SHA1(a0b32a8801ebaee7ede7873b244f1a424433fe94) ) - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL ROM_LOAD( "2.bin", 0x8000, 0x8000, CRC(8b64d4c6) SHA1(8106cba31cd3fbda0855e6070182d248e3d52495) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 1ST AND 2ND HALF IDENTICAL*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half. 1ST AND 2ND HALF IDENTICAL ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "dm74s472n.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) @@ -4395,11 +4395,11 @@ ROM_START( jolycdih ) ROM_LOAD( "ep910.bin", 0x0000, 0x0884, CRC(aa62207e) SHA1(a2e51cf3617d07ff1ce42ee1d56e1c17b6fe71de) ) ROM_LOAD( "pal16v8h-25pc-4.bin", 0x0900, 0x0117, CRC(df5be97d) SHA1(8cd63d49ab7020cdec07c1198413dc7d93e90d35) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolycdih_nvram.bin", 0x0000, 0x0800, CRC(02b3b335) SHA1(207a1289e4298d942e4806adf8ffb87e0b9b4e58) ) ROM_END -ROM_START( sjcd2kx3 ) /* Super Joly 2000 3x */ +ROM_START( sjcd2kx3 ) // Super Joly 2000 3x ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "sj3.bin", 0x8000, 0x8000, CRC(c530b518) SHA1(36934d8e1e2cb2f71eb44a05b86ec970c9f398cd) ) @@ -4407,7 +4407,7 @@ ROM_START( sjcd2kx3 ) /* Super Joly 2000 3x */ ROM_LOAD( "sj2.bin", 0x0000, 0x8000, CRC(d7253325) SHA1(ad40e662519da9b11f77690b7d41c5007f74e280) ) ROM_LOAD( "sj1.bin", 0x8000, 0x8000, CRC(82741749) SHA1(d0bf3073dff9ba1c4913fd754f965951e9cb5b03) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "sjcd2kx3_nvram.bin", 0x0000, 0x0800, CRC(1141368b) SHA1(b4af2d59b5e8115440e1219a621cfd2fb8c2c978) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -4573,7 +4573,7 @@ ROM_START( bigdeal ) ROM_LOAD( "poker4.003", 0x0000, 0x8000, CRC(8c33a15f) SHA1(a1c8451c99a23eeffaedb21d1a1b69f54629f8ab) ) ROM_LOAD( "poker4.002", 0x8000, 0x8000, CRC(5f4e12d8) SHA1(014b2364879faaf4922cdb82ee07692389f20c2d) ) - ROM_REGION( 0x0200, "proms", 0 ) /* using joker card palette till a correct dump appear */ + ROM_REGION( 0x0200, "proms", 0 ) // using joker card palette till a correct dump appear ROM_LOAD( "jokercrd_prom.bin", 0x0000, 0x0200, BAD_DUMP CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) ROM_END @@ -4586,7 +4586,7 @@ ROM_START( bigdealb ) ROM_LOAD( "poker4.003", 0x0000, 0x8000, CRC(8c33a15f) SHA1(a1c8451c99a23eeffaedb21d1a1b69f54629f8ab) ) ROM_LOAD( "poker4.002", 0x8000, 0x8000, CRC(5f4e12d8) SHA1(014b2364879faaf4922cdb82ee07692389f20c2d) ) - ROM_REGION( 0x0200, "proms", 0 ) /* using joker card palette till a correct dump appear */ + ROM_REGION( 0x0200, "proms", 0 ) // using joker card palette till a correct dump appear ROM_LOAD( "jokercrd_prom.bin", 0x0000, 0x0200, BAD_DUMP CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) ROM_END @@ -4621,16 +4621,16 @@ ROM_START( cuoreuno ) ROM_LOAD( "cuore1b.u21", 0x0000, 0x8000, CRC(14eca2b8) SHA1(35cba415800c6cd3e6ed9946057f33510ad2bfc9) ) ROM_LOAD( "cuore1c.u22", 0x8000, 0x8000, CRC(253fac84) SHA1(1ad104ab8e8d73df6397a840a4b26565b245d7a3) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "cuoreuno_nvram.bin", 0x0000, 0x0800, CRC(b5a1bf25) SHA1(c2996a28c080debf10ab7a7dc47c305aed172a83) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29_cu.bin", 0x0000, 0x0200, CRC(7ea61749) SHA1(3167acd79f9bda2078c2af3e049ad6abf160aeae) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_cu.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_cu.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_cu.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_cu.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_cu.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_cu.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4661,24 +4661,24 @@ ROM_END ROM_START( elephfam ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "eleph_a.u2", 0x8000, 0x8000, CRC(8392b842) SHA1(74c850c734ca8174167b2f826b9b1ac902669392) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "eleph_b.u21", 0x0000, 0x8000, CRC(e3612670) SHA1(beb65f7d2bd6d7bc68cfd876af51910cf6417bd0) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "eleph_c.u22", 0x8000, 0x8000, CRC(4b909bf3) SHA1(a822b12126bc58af6d3f999ab2117370015a039b) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "elephfam_nvram.bin", 0x0000, 0x0800, CRC(fb9b1100) SHA1(cf15ce55042f1c4399fec480c2f862622905a8b5) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29_ef.u25", 0x0000, 0x0200, CRC(bca8b82a) SHA1(4aa19f5ecd9953bf8792dceb075a746f77c01cfc) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_ef.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_ef.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_ef.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_ef.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_ef.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_ef.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4690,16 +4690,16 @@ ROM_START( elephfmb ) ROM_LOAD( "elephb.u21", 0x0000, 0x8000, CRC(3c60549c) SHA1(c839b3ea415a877e5eac04e0522c342cce8d6e64) ) ROM_LOAD( "elephc.u20", 0x8000, 0x8000, CRC(448ba955) SHA1(2785cbc8cd42a7dda85bd8b81d5fbec01a1ba0bd) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "elephfmb_nvram.bin", 0x0000, 0x0800, CRC(13a0cfea) SHA1(9c8ce509ef1076e88ea853347b64c5591bc2e18c) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29_ef.u25", 0x0000, 0x0200, CRC(bca8b82a) SHA1(4aa19f5ecd9953bf8792dceb075a746f77c01cfc) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_ef.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_ef.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_ef.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_ef.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_ef.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_ef.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4809,16 +4809,16 @@ ROM_START( pool10 ) ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10_nvram.bin", 0x0000, 0x0800, CRC(2f2fab43) SHA1(f815b70c171bad99fa6a60c256e4fdc85dd6b290) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4829,28 +4829,28 @@ ROM_END u20.bin 1ST AND 2ND HALF IDENTICAL u21.bin 1ST AND 2ND HALF IDENTICAL */ - ROM_START( pool10b ) /* this set should be the parent */ + ROM_START( pool10b ) // 1st set nominated for parent ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "u2.bin", 0x8000, 0x8000, CRC(64fee38e) SHA1(8a624a0b6eb4a3ba09e5b396dc5a01994dfdf294) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - /* GFX ROMs are the same of pool10, but double sized with identical halves. */ +// GFX ROMs are the same of pool10, but double sized with identical halves. ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "u21.bin", 0x0000, 0x8000, CRC(581c4878) SHA1(5ae61af090feea1745e22f46b33b2c01e6013fbe) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "u20.bin", 0x8000, 0x8000, CRC(3bdf1106) SHA1(fa21cbd49bb27ea4a784cf4e4b3fbd52650a285b) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10b_nvram.bin", 0x0000, 0x0800, CRC(d9f35299) SHA1(2c3608bc9c322a9cc86f74d8fa2f660804a8cf3c) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10b.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_p10b.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_p10b.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_p10b.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_p10b.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_p10b.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4862,16 +4862,16 @@ ROM_START( pool10c ) ROM_LOAD( "b.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "c.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10c_nvram.bin", 0x0000, 0x0800, CRC(396aefed) SHA1(066b87ff054dfb37f733a812ad0dc1b1bd2478e6) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4883,22 +4883,22 @@ ROM_END ROM_START( pool10d ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3.50.u2", 0x8000, 0x8000, CRC(4c68e1f4) SHA1(bbab63a18e0c041ce519daa32e12dd1b6a672dce) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) // sldh ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) // sldh - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10d_nvram.bin", 0x0000, 0x0800, CRC(6b5984a0) SHA1(156a94e74e33b1a15222cffff9b62e65f6f5f2f5) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -4986,23 +4986,19 @@ ROM_START( pool10e ) ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(a0d54044) SHA1(c7be1f12f72095daee32ae41c3554d8ab4f99245) ) // sldh ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(55c9fcc8) SHA1(224bdf63ed345b1def4852af3b33f07790fbf123) ) // sldh - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10e_nvram.bin", 0x0000, 0x0800, CRC(e20f9a14) SHA1(617ca53263a971c9f835a95737a66fac5b99780f) ) - ROM_REGION( 0x0200, "proms", 0 ) /* Same as Pool 10, but the 1st half duplicated to cover any PLD addressing */ + ROM_REGION( 0x0200, "proms", 0 ) // Same as Pool 10, but the 1st half duplicated to cover any PLD addressing ROM_LOAD( "am27s29.u25", 0x0000, 0x0200, CRC(2c315cbf) SHA1(f3f91329f2b8388decf26a050f8fb7da38694218) ) ROM_REGION( 0x3000, "plds", 0 ) - ROM_LOAD( "palce16v8h.u5", 0x0000, 0x0892, BAD_DUMP CRC(123d539a) SHA1(cccf0cbae3175b091a998eedf4aa44a55b679400) ) /* read protected */ - ROM_LOAD( "palce20v8h.u22", 0x1000, 0x0a92, BAD_DUMP CRC(ba2a021f) SHA1(e9c5970f80c7446c91282d53cfe97c92353dce7d) ) /* read protected */ - ROM_LOAD( "palce20v8h.u23", 0x2000, 0x0a92, BAD_DUMP CRC(ba2a021f) SHA1(e9c5970f80c7446c91282d53cfe97c92353dce7d) ) /* read protected */ + ROM_LOAD( "palce16v8h.u5", 0x0000, 0x0892, BAD_DUMP CRC(123d539a) SHA1(cccf0cbae3175b091a998eedf4aa44a55b679400) ) // read protected + ROM_LOAD( "palce20v8h.u22", 0x1000, 0x0a92, BAD_DUMP CRC(ba2a021f) SHA1(e9c5970f80c7446c91282d53cfe97c92353dce7d) ) // read protected + ROM_LOAD( "palce20v8h.u23", 0x2000, 0x0a92, BAD_DUMP CRC(ba2a021f) SHA1(e9c5970f80c7446c91282d53cfe97c92353dce7d) ) // read protected ROM_END -/* - -*/ - ROM_START( pool10f ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "cmc-pool10+a+.u2", 0x8000, 0x8000, CRC(e8087fb8) SHA1(c012a81f561978bd97708a52f656e7b13e41a3e2) ) // sldh @@ -5011,20 +5007,20 @@ ROM_START( pool10f ) ROM_LOAD( "cmc-pool10-b.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "cmc-pool10-c.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10f_nvram.bin", 0x0000, 0x0800, CRC(75dd3562) SHA1(a359cada144e7c90946649f5dd0998d0ee48f4d2) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "27s29.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END -ROM_START( pool10g ) /* this set should be the parent */ +ROM_START( pool10g ) // 2nd set nominated for parent ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3.u2", 0x8000, 0x8000, CRC(7b537ce6) SHA1(b221d08c53b9e14178335632420e78070b9cfb27) ) @@ -5032,7 +5028,7 @@ ROM_START( pool10g ) /* this set should be the parent */ ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10h_nvram.bin", 0x0000, 0x0800, CRC(3ec39472) SHA1(aa2bb5abd16557560a19842929ad7dab852abbbf) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5048,7 +5044,7 @@ ROM_START( pool10h ) ROM_LOAD( "cmc-pool10+b+.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "cmc-pool10+c+.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10i_nvram.bin", 0x0000, 0x0800, CRC(e93dee30) SHA1(195525e95a3bdc1b002b12fd27bc31c63d7a9276) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5059,15 +5055,15 @@ ROM_END ROM_START( pool10i ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "a.u2", 0x8000, 0x8000, CRC(566bc05d) SHA1(eec88c8ba6cb664f38ebf8b71f99b4e7d04a9601) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "b.u21", 0x0000, 0x8000, CRC(581c4878) SHA1(5ae61af090feea1745e22f46b33b2c01e6013fbe) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "c.u20", 0x8000, 0x8000, CRC(3bdf1106) SHA1(fa21cbd49bb27ea4a784cf4e4b3fbd52650a285b) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10l_nvram.bin", 0x0000, 0x0800, CRC(89cbee4b) SHA1(ff8031a96ee40e1e62abbae7a0b3d9dc2122759f) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5082,7 +5078,7 @@ ROM_START( pool10j ) ROM_LOAD( "cmcpool10.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "cmcpool10.u20", 0x8000, 0x8000, CRC(9abedd0c) SHA1(f184a82e8ec2387069d631bcb77e890acd44b3f5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "pool10j_nvram.bin", 0x0000, 0x0800, CRC(48684b02) SHA1(6f2fbd0e2621e31b881edd8056ff93ee78f331ab) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5136,16 +5132,16 @@ ROM_START( biliard ) ROM_LOAD( "cmcpool10-b.u21", 0x0000, 0x8000, CRC(99c8c074) SHA1(f8082b08e895cbcd028a2b7cd961a7a2c8b2762c) ) ROM_LOAD( "biliard-c.u20", 0x8000, 0x8000, CRC(b15d10ec) SHA1(9b0f32ff791063cfb2d8339a4e8041e034e73eb7) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "biliard_nvram.bin", 0x0000, 0x0800, CRC(2f2fab43) SHA1(f815b70c171bad99fa6a60c256e4fdc85dd6b290) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29pc.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h-25pc-4.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8a-25lp.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8a-25lp.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h-25pc-4.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8a-25lp.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8a-25lp.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -5154,18 +5150,18 @@ ROM_END This one seems to run in royalcd1 hardware. */ -ROM_START( royal ) /* brute hack of pool 10 */ +ROM_START( royal ) // brute hack of pool 10 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3.u2", 0x8000, 0x8000, CRC(d4f36273) SHA1(2049257ea9ee52fde9cabfe40e809e00526a960e) ) // sldh - /* GFX ROMs are the same of pool10, but double sized with identical halves. */ +// GFX ROMs are the same of pool10, but double sized with identical halves. ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(439eec10) SHA1(500139c16a883f0a5b0b8d91f4f067ba428d2d11) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(9b59e72d) SHA1(96217272ce5abb78ff45ff116a5d921c57717ed9) ) // sldh - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royal_nvram.bin", 0x0000, 0x0800, CRC(9df190d5) SHA1(4be0f5c6f89f822568e45e0e8457cf51ced2dcfe) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5202,16 +5198,16 @@ ROM_START( tortufam ) ROM_LOAD( "tortu.b.u21", 0x0000, 0x8000, CRC(e7b18584) SHA1(fa1c367469d4ced5d7c83c15a25ec5fd6afcca10) ) ROM_LOAD( "tortu.c.u20", 0x8000, 0x8000, CRC(3cda6f73) SHA1(b4f3d2d3c652ebf6973358ae33b7808de5939acd) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "tortufam_nvram.bin", 0x0000, 0x0800, CRC(e5a08b1b) SHA1(6575ed3ec66ef0e42129225fe1679519e5e1c946) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29pc_tf.u25", 0x0000, 0x0200, CRC(c6d433fb) SHA1(065de832bbe8765eb0aacc2029e587a4f5362f8a) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce20v8h_tf.u5", 0x0000, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_tf.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_tf.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce20v8h_tf.u5", 0x0000, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_tf.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_tf.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -5223,16 +5219,16 @@ ROM_START( potgame ) ROM_LOAD( "potg.b.u21", 0x0000, 0x8000, CRC(32fc1d4f) SHA1(cc533a44498338bc0cbb7c7b9c42559ce7ff1337) ) ROM_LOAD( "potg.c.u20", 0x8000, 0x8000, CRC(0331eb42) SHA1(a8e838d644fc6d93a9632070b305e44e4242ce94) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "potgame_nvram.bin", 0x0000, 0x0800, CRC(2b07fb37) SHA1(9cbd3d8fb076d683a7853b3dd8a39a27f1c8872b) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29_pot.u25", 0x0000, 0x0200, CRC(a221f151) SHA1(270c57c9b7de912b136686bc6720eb8f12dbb805) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_pot.u5", 0x0000, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_pot.u22", 0x0200, 0x0157, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce20v8h_pot.u23", 0x0400, 0x0157, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_pot.u5", 0x0000, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_pot.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "palce20v8h_pot.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -5244,16 +5240,16 @@ ROM_START( bottle10 ) ROM_LOAD( "boat_2.bin", 0x0000, 0x8000, CRC(a6b36c3f) SHA1(90b12d9552ad5dbf11a30fc7451da1f3e6763cc3) ) ROM_LOAD( "boat_1.bin", 0x8000, 0x8000, CRC(61fd8c19) SHA1(eb8fd8bd7de38a6c8a435e9e36daf699162138a5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "bottle10_nvram.bin", 0x0000, 0x0800, CRC(82927c53) SHA1(8cde91588cb53fefc84f0b14fc5c0b26a3a445eb) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END @@ -5265,16 +5261,16 @@ ROM_START( bottl10b ) ROM_LOAD( "2.u21", 0x0000, 0x8000, CRC(9395c15b) SHA1(e4caefc6f55b07f5c4370a3b8652fa93e08987ce) ) ROM_LOAD( "1.u20", 0x8000, 0x8000, CRC(61fd8c19) SHA1(eb8fd8bd7de38a6c8a435e9e36daf699162138a5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "bottl10b_nvram.bin", 0x0000, 0x0800, CRC(59976182) SHA1(f8d26169e86444607bc5a6649f41e7f5c05ddbb4) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) /* GAL is read protected */ - ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) /* GAL is read protected */ + ROM_LOAD( "palce16v8h_p10.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u22", 0x0200, 0x0157, NO_DUMP ) // PLD is read protected + ROM_LOAD( "gal20v8b_p10.u23", 0x0400, 0x0157, NO_DUMP ) // PLD is read protected ROM_END /* @@ -5306,18 +5302,18 @@ ROM_END were changed to match the second program. */ -/* The following two have mirrored video RAM 4000/5000 to 6000/7000. */ +// The following two have mirrored video RAM 4000/5000 to 6000/7000. ROM_START( lunapark ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Two different programs. Selectable through a DIP switch */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Two different programs. Selectable through a DIP switch ROM_LOAD( "lunapark-425-95n003.u2", 0x0000, 0x10000, CRC(b3a620ee) SHA1(67b3498edf7b536e22c4d97c1f6ad5a71521e68f) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "lunapark-425-95n002.u21", 0x0000, 0x8000, CRC(2bededb7) SHA1(b8d7e6fe307d347d762adf35d361ade620aab37b) ) - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half 0xff filled ROM_LOAD( "lunapark-425-95n001.u20", 0x8000, 0x8000, CRC(7d91ce1f) SHA1(7e9bfad76f305d5787faffe3a07b218beb37fda8) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half 0xff filled - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "lunapark_nvram.bin", 0x0000, 0x0800, CRC(f99e749b) SHA1(fafd4205dfaacb4c21215af6997d06ab419c9281) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5325,23 +5321,23 @@ ROM_START( lunapark ) ROM_END ROM_START( lunaparkb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Two different programs. Selectable through a DIP switch */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Two different programs. Selectable through a DIP switch ROM_LOAD( "lunapark-number-03_lunaparkb.u2", 0x0000, 0x10000, CRC(cb819bb7) SHA1(c7fb25eab093de2f644445a713d99ee8024d8499) ) ROM_REGION( 0x10000, "gfx1", 0 ) - ROM_LOAD( "27512.u21", 0x0000, 0x8000, CRC(d64ac315) SHA1(c67d9e67a988036844efd4f980d47a90c022ba18) ) /* only the first 2 bytes different */ - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_LOAD( "27512.u21", 0x0000, 0x8000, CRC(d64ac315) SHA1(c67d9e67a988036844efd4f980d47a90c022ba18) ) // only the first 2 bytes different + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half 0xff filled ROM_LOAD( "27512.u20", 0x8000, 0x8000, CRC(7d91ce1f) SHA1(7e9bfad76f305d5787faffe3a07b218beb37fda8 ) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half 0xff filled - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "lunaparkb_nvram.bin", 0x0000, 0x0800, CRC(f99e749b) SHA1(fafd4205dfaacb4c21215af6997d06ab419c9281) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "82s147.u25", 0x0000, 0x0200, CRC(ddb74d72) SHA1(3d5dda3a935a3100cb86017f103b855d6449f73a) ) ROM_END -/* This one hasn't mirrored video RAM, so could run in regular Cuore 1 hardware */ +// This one hasn't mirrored video RAM, so could run in regular Cuore 1 hardware ROM_START( lunaparkc ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "lunapark-number-03_lunaparkc.u2", 0x8000, 0x8000, CRC(fdbe49c3) SHA1(a2b14a6998d5a27fba7bc360a15f17a48c91194f) ) @@ -5350,7 +5346,7 @@ ROM_START( lunaparkc ) ROM_LOAD( "lunapark-number-01.u21", 0x0000, 0x8000, CRC(ee057944) SHA1(31b76dcadf1dd5aacac1dfed0c7c9f7190797ead) ) ROM_LOAD( "lunapark-number-02.u20", 0x8000, 0x8000, CRC(b8795aec) SHA1(5db2e64657dee7742eb9d11e65d29c83a93332b7) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "lunaparkc_nvram.bin", 0x0000, 0x0800, CRC(005b70fc) SHA1(682c2315b4fafb6255db989f0d49255fd8d7a1a9) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5369,7 +5365,7 @@ ROM_START( crystal ) ROM_LOAD( "425-1995-number-02.u21", 0x0000, 0x8000, CRC(1eaf1bd9) SHA1(eb392f4a8864c59c7792f905f165f543087cb4a0) ) ROM_LOAD( "425-1995-number-01.u20", 0x8000, 0x8000, CRC(d3972c19) SHA1(a84ae765eeae1f9d443b0c4941b6f93dcc540f8c) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "crystal_nvram.bin", 0x0000, 0x0800, CRC(21a712ee) SHA1(259d83b8268a93f96b53580562e9c6e835f7473e) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5397,7 +5393,7 @@ ROM_START( royalcrd ) ROM_LOAD( "3.bin", 0x0000, 0x8000, CRC(c46d804f) SHA1(b089821c7dae6714b49401d787f8bed859815763) ) ROM_LOAD( "2.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrd_nvram.bin", 0x0000, 0x0800, CRC(1c775f61) SHA1(c810421eaa31a72e3f2fe9a1d82858e7cc2f6b93) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5422,7 +5418,7 @@ ROM_START( royalcrda ) ROM_LOAD( "r.2", 0x8000, 0x8000, CRC(8a66f22c) SHA1(67d6e8f8f5a0fd979dc498ba2cc67cf707ccdf95) ) ROM_IGNORE( 0x8000) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrda_nvram.bin", 0x0000, 0x0800, CRC(c42dbad4) SHA1(b38552192e3f5f6bc2a4b92bddd2f95ac17ecc8c) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5445,7 +5441,7 @@ ROM_START( royalcrdb ) ROM_LOAD( "rc_3_pl.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) ROM_LOAD( "rc_2_pl.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrdb_nvram.bin", 0x0000, 0x0800, CRC(19bb3dea) SHA1(0965fbcec48ded99c5f6793efffb1d9329cc00eb) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5520,15 +5516,15 @@ ROM_START( royalcrdd ) ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) // sldh ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) // sldh - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrdd_nvram.bin", 0x0000, 0x0800, CRC(335bfa5a) SHA1(7e9cbb502f450c515ea03ffcf4b7fbae60af4e73) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce16v8h-4.bin", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "1-peel18cv8.bin", 0x0200, 0x0155, NO_DUMP ) /* PEEL is read protected */ + ROM_LOAD( "palce16v8h-4.bin", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected + ROM_LOAD( "1-peel18cv8.bin", 0x0200, 0x0155, NO_DUMP ) // PLD is read protected ROM_LOAD( "2-peel18cv8.bin", 0x0400, 0x0155, CRC(8fdafd55) SHA1(fbb187ba682111648ea1586f400990cb81a3077a) ) ROM_END @@ -5552,24 +5548,24 @@ ROM_END - 1x trimmer (volume) */ -ROM_START( royalcrde ) /* both halves have different programs. we're using the 2nd one */ - ROM_REGION( 0x10000, "maincpu", 0 ) /* 1st half prg is testing RAM in offset $8600-$BF00...?? */ +ROM_START( royalcrde ) // both halves have different programs. we're using the 2nd one. + ROM_REGION( 0x10000, "maincpu", 0 ) // 1st half prg is testing RAM in offset $8600-$BF00...?? ROM_LOAD( "rc.bin", 0x0000, 0x10000, CRC(8a9a6dd6) SHA1(04c3f9f17d5404ac1414c51ef8f930df54530e72) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2a.bin", 0x0000, 0x8000, CRC(3af71cf8) SHA1(3a0ce0d0abebf386573c5936545dada1d3558e55) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "1a.bin", 0x8000, 0x8000, CRC(8a66f22c) SHA1(67d6e8f8f5a0fd979dc498ba2cc67cf707ccdf95) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrde_nvram.bin", 0x0000, 0x0800, CRC(3b03440f) SHA1(49e51b8c9e1404d39c479a2d0619aab43f1a6529) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) ROM_REGION( 0x0200, "plds", 0 ) - ROM_LOAD( "palce16v8h-4.bin", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h-4.bin", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected ROM_END @@ -5592,7 +5588,7 @@ ROM_START( royalcrdt ) ROM_REGION( 0x0800, "nvram", 0 ) ROM_LOAD( "royalcrdt_nv.bin", 0x0000, 0x0800, CRC(67a6e68b) SHA1(d7ab01c4d9bd4fe58b5d0f4a945c00c5c4906008) ) - ROM_REGION( 0x0200, "plds", 0 ) /* Device type is 16L8 */ + ROM_REGION( 0x0200, "plds", 0 ) // Device type is 16L8 ROM_LOAD( "tab01_3.bin", 0x0000, 0x0104, CRC(a13a7a0a) SHA1(28e918ece4dcfa3883d2439c226b2f125d43f386) ) ROM_END @@ -5641,7 +5637,7 @@ ROM_START( royalcrdf ) // encrypted program rom ROM_END -ROM_START( royalcrdg ) /* CMC C1030 PCB, EP910EC-30 CPLD, NON encrypted graphics */ +ROM_START( royalcrdg ) // CMC C1030 PCB, EP910EC-30 CPLD, NON encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3.cpu", 0x8000, 0x8000, CRC(829a6a1d) SHA1(b7064e4d60e33d0875eb73525230ea3b99f10542) ) @@ -5649,7 +5645,7 @@ ROM_START( royalcrdg ) /* CMC C1030 PCB, EP910EC-30 CPLD, NON encrypted graphi ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) // sldh ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) // sldh - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrdg_nvram.bin", 0x0000, 0x0800, CRC(853c7da9) SHA1(e275b22a9f470672bfc71425fcc44f547ba38b6d) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5671,7 +5667,7 @@ ROM_START( royalcrdh ) ROM_LOAD( "145-2.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) ROM_LOAD( "145-1.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrdh_nvram.bin", 0x0000, 0x0800, CRC(7757d73a) SHA1(997bfbd847d1d21777694331be92a1a5e79e4faf) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5705,7 +5701,7 @@ ROM_END 1x battery (missing) */ -ROM_START( royalcdfr ) /* Seems bootleg PCB, non encrypted graphics */ +ROM_START( royalcdfr ) // Seems bootleg PCB, non encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "3.bin", 0x8000, 0x8000, CRC(69b944c1) SHA1(6ef76bff01f20376117dd7f67e5890eca754fcfb) ) // sldh @@ -5713,7 +5709,7 @@ ROM_START( royalcdfr ) /* Seems bootleg PCB, non encrypted graphics */ ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(85e77661) SHA1(7d7a765c1bfcfeb9eb91d2519b22d734f20eab24) ) // sldh ROM_LOAD( "1.bin", 0x8000, 0x8000, CRC(41f7a0b3) SHA1(9aff2b8832d2a4f868daa9849a0bfe5e44f88fc0) ) // sldh - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcdfr_nvram.bin", 0x0000, 0x0800, CRC(bda344d4) SHA1(7793d289147bf03c0d8256d4023252c9677ac8ff) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5732,7 +5728,7 @@ ROM_START( royalcrdp ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "n82s147a.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "royalcrdp_nvram.bin", 0x0000, 0x0800, BAD_DUMP CRC(553f8c66) SHA1(d2c21786d715f81c537d860d8515fda6d766f630) ) ROM_REGION( 0x0200, "plds", 0 ) @@ -5765,7 +5761,7 @@ ROM_START( royaljp ) ROM_REGION( 0x0800, "nvram", 0 ) ROM_LOAD( "royaljp_nvram.bin", 0x0000, 0x0800, CRC(48e51e2a) SHA1(b81a1741eef299384d4fa98a534099b2c0332074) ) - ROM_REGION( 0x0600, "plds", 0 ) /* There are 3 GALs */ + ROM_REGION( 0x0600, "plds", 0 ) // There are 3 GALs ROM_LOAD( "gal20v8b.bin", 0x0000, 0x0157, NO_DUMP ) ROM_LOAD( "gal20v8a.bin", 0x0200, 0x0157, NO_DUMP ) ROM_LOAD( "gal16v8d.bin", 0x0400, 0x0117, NO_DUMP ) @@ -5782,7 +5778,7 @@ ROM_START( lluck3x3 ) ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "lluck3x3_nvram.bin", 0x0000, 0x0800, CRC(2fe79cff) SHA1(7839c04336b7702c7bdcd2b6917a353f4376f824) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5798,7 +5794,7 @@ ROM_START( lluck4x1 ) ROM_LOAD( "l2.bin", 0x0000, 0x8000, CRC(8ca90a8f) SHA1(bc3db3f8c097f89eff488e3aca39bf24ff2b5cff) ) ROM_LOAD( "l1.bin", 0x8000, 0x8000, CRC(beadc35c) SHA1(8a6a5954a827def8c4c3b904d8ee58a4bde53d85) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "lluck4x1_nvram.bin", 0x0000, 0x0800, CRC(05d2d7b8) SHA1(1188b2b4835cadd95b1e9160c2948a2e3457afd2) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5835,28 +5831,28 @@ ROM_END */ -ROM_START( magicrd2 ) /* Impera... but seems Bulgarian hack, just for copyright */ - ROM_REGION( 0x10000, "maincpu", 0 ) /* magicard.004 has extra code, and 2 different NVRAM contents harcoded */ +ROM_START( magicrd2 ) // Impera... but seems Bulgarian hack, just for copyright + ROM_REGION( 0x10000, "maincpu", 0 ) // magicard.004 has extra code, and 2 different NVRAM contents harcoded ROM_LOAD( "magicard.004", 0x0000, 0x8000, CRC(f6e948b8) SHA1(7d5983015a508ab135ccbf69b7f3c526c229e3ef) ) - ROM_LOAD( "magicard.01", 0x8000, 0x8000, CRC(c94767d4) SHA1(171ac946bdf2575f9e4a31e534a8e641597af519) ) /* 1st and 2nd half identical */ - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_LOAD( "magicard.01", 0x8000, 0x8000, CRC(c94767d4) SHA1(171ac946bdf2575f9e4a31e534a8e641597af519) ) // 1st and 2nd half identical + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) ROM_LOAD( "mc2gr1.bin", 0x8000, 0x8000, CRC(2406b8d2) SHA1(e9d7a25562fd5adee351d7ef6ba02fff6aab021a) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "magicrd2_nvram.bin", 0x0000, 0x0800, CRC(343b3162) SHA1(1524959dbbc0c6d7c5c3a4a6b20976382cfbe88f) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "mc2-82s147.bin", 0x0000, 0x0200, CRC(aa91cc35) SHA1(79f9a755441500e618c4183f524f969fffd44100) ) ROM_REGION( 0x0200, "plds", 0 ) - ROM_LOAD( "gal16v8uni.bin", 0x0000, 0x0117, CRC(b81d7e0a) SHA1(7fef0b2bcea931a830d38ae0f1102434cf281d2d) ) /* Universal GAL */ + ROM_LOAD( "gal16v8uni.bin", 0x0000, 0x0117, CRC(b81d7e0a) SHA1(7fef0b2bcea931a830d38ae0f1102434cf281d2d) ) // Universal GAL ROM_END -ROM_START( magicrd2a ) /* Nov (new). Imatic Yugoslavian hack for green TAB or Impera boards */ +ROM_START( magicrd2a ) // Nov (new). Imatic Yugoslavian hack for green TAB or Impera boards ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "m3_nov.bin", 0x8000, 0x8000, CRC(ee5468e6) SHA1(f859adbad30e561fca86e60ff5b2e666d8bf4071) ) @@ -5864,7 +5860,7 @@ ROM_START( magicrd2a ) /* Nov (new). Imatic Yugoslavian hack for green TAB or I ROM_LOAD( "m2_nov.bin", 0x0000, 0x8000, CRC(684d71f2) SHA1(e4522844a0406b3e83fa723508a7c05dd21e7fb6) ) ROM_LOAD( "m1_nov.bin", 0x8000, 0x8000, CRC(96151034) SHA1(3107d353705c6240a71faf308e11c45a87d95cf4) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM (passed protection) */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM (passed protection) ROM_LOAD( "mc2_nvram.bin", 0x0000, 0x0800, CRC(2070d63d) SHA1(86c72a2e81651b0138d8551a0cfcd07176f8e7d2) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5875,16 +5871,15 @@ ROM_START( magicrd2a ) /* Nov (new). Imatic Yugoslavian hack for green TAB or I ROM_END -ROM_START( magicrd2b ) /* Imatic Yugoslavian hack for green TAB or Impera boards */ +ROM_START( magicrd2b ) // Imatic Yugoslavian hack for green TAB or Impera boards ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "mc2prgv1.bin", 0x8000, 0x8000, CRC(7f759b70) SHA1(23a1a6e8eda57c4a90c51a970302f9a7bf590083) ) -// ROM_LOAD( "mc2prgv2.bin", 0x8000, 0x8000, CRC(b0ed6b40) SHA1(7167e67608f1b0b1cd956c838dacc1310861cb4a) ) // there are also pcbs with this program ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) ROM_LOAD( "mc2gr1.bin", 0x8000, 0x8000, CRC(2406b8d2) SHA1(e9d7a25562fd5adee351d7ef6ba02fff6aab021a) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM (passed protection) */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM (passed protection) ROM_LOAD( "mc2_v1-v2_nvram.bin", 0x0000, 0x0800, BAD_DUMP CRC(f88c493d) SHA1(8a5352b46ab68164cd7adaaad6f15f04327b7451) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5895,16 +5890,15 @@ ROM_START( magicrd2b ) /* Imatic Yugoslavian hack for green TAB or Impera board ROM_END -ROM_START( magicrd2c ) /* Imatic Yugoslavian hack for blue TAB board (encrypted)*/ +ROM_START( magicrd2c ) // Imatic Yugoslavian hack for blue TAB board (encrypted) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "mc2prgv2.bin", 0x8000, 0x8000, CRC(b0ed6b40) SHA1(7167e67608f1b0b1cd956c838dacc1310861cb4a) ) -// ROM_LOAD( "mc2prgv1.bin", 0x8000, 0x8000, CRC(7f759b70) SHA1(23a1a6e8eda57c4a90c51a970302f9a7bf590083) ) // there are also pcbs with this program ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "mc2gr1b.bin", 0x0000, 0x8000, CRC(ce2629a7) SHA1(84767ed5da8dcee44a210255537e10372bcc264b) ) ROM_LOAD( "mc2gr2b.bin", 0x8000, 0x8000, CRC(d2bf8bde) SHA1(975b8f43a0396c09e357b96d5ae7381b12152b9e) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM (passed protection) */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM (passed protection) ROM_LOAD( "mc2_v1-v2_nvram.bin", 0x0000, 0x0800, BAD_DUMP CRC(f88c493d) SHA1(8a5352b46ab68164cd7adaaad6f15f04327b7451) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -5926,10 +5920,10 @@ ROM_START( vegasslw ) ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "vegasslw_nvram.bin", 0x0000, 0x0800, CRC(1aa043e3) SHA1(c93d071effb2f2fe95e9dc751174c2c765595f74) ) - ROM_REGION( 0x0200, "proms", 0 ) /* PLD address the 2nd half */ + ROM_REGION( 0x0200, "proms", 0 ) // PLD address the 2nd half ROM_LOAD( "jokercrd_prom.bin", 0x0000, 0x0200, CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) ROM_END @@ -5942,39 +5936,39 @@ ROM_START( vegasfst ) ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "vegasfst_nvram.bin", 0x0000, 0x0800, CRC(5034de7a) SHA1(ab2077a49d94676531c73ad8d8ce9548bbfa2b81) ) - ROM_REGION( 0x0200, "proms", 0 ) /* PLD address the 2nd half */ + ROM_REGION( 0x0200, "proms", 0 ) // PLD address the 2nd half ROM_LOAD( "jokercrd_prom.bin", 0x0000, 0x0200, CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) ROM_END -ROM_START( vegasfte ) /* Royal Vegas Joker Card (fast deal, english gfx) */ +ROM_START( vegasfte ) // Royal Vegas Joker Card (fast deal, english gfx) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ch3.bin", 0x8000, 0x8000, CRC(87dfb28d) SHA1(9a06e695e59722b6c97e5a9fd2c8b238661e5a4a) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "ch2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) - ROM_LOAD( "ch1.bin", 0x8000, 0x8000, CRC(0a3679c0) SHA1(ce8a067e1a2eccf9fabb16733ef3a14e0e8129e5) ) /* X & Y in txt layer */ + ROM_LOAD( "ch1.bin", 0x8000, 0x8000, CRC(0a3679c0) SHA1(ce8a067e1a2eccf9fabb16733ef3a14e0e8129e5) ) // X & Y in txt layer - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "vegasfte_nvram.bin", 0x0000, 0x0800, CRC(166c6055) SHA1(db2143a2a3adc92578bd3707391d2f5030cc6a6f) ) - ROM_REGION( 0x0200, "proms", 0 ) /* PLD address the 2nd half */ + ROM_REGION( 0x0200, "proms", 0 ) // PLD address the 2nd half ROM_LOAD( "jokercrd_prom.bin", 0x0000, 0x0200, CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) ROM_END ROM_START( vegasmil ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Mile */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Mile ROM_LOAD( "mile.bin", 0x8000, 0x8000, CRC(ef7e02e2) SHA1(7432b0e723dc528901c422ab1d7d01fd1bc1eb20) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "v2.bin", 0x0000, 0x8000, CRC(af7ab460) SHA1(01ea400424152c09c10eb83a1bd569019969ccb7) ) ROM_LOAD( "v1.bin", 0x8000, 0x8000, CRC(23e0d1c6) SHA1(98967b14d3264c444a1dfbd15c57cde70f41f09d) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "vegasmil_nvram.bin", 0x0000, 0x0800, CRC(d2608e5f) SHA1(ac936df71dbc0bfb811a3ba3c91444a2a3e7b036) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -6066,7 +6060,7 @@ ROM_END */ -ROM_START( jolyjokr ) /* Jolly Joker (98bet, set 1) */ +ROM_START( jolyjokr ) // Jolly Joker (98bet, set 1) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "impera3orig.bin", 0x8000, 0x8000, CRC(ceb3a0d5) SHA1(25efae9f225abddfa663e6abcc91801996e5b0ea) ) @@ -6074,7 +6068,7 @@ ROM_START( jolyjokr ) /* Jolly Joker (98bet, set 1) */ ROM_LOAD( "impera2.bin", 0x0000, 0x8000, CRC(f0fa5941) SHA1(1fcade31ed6893ffcfd4efe97dfaaa31d24283ec) ) ROM_LOAD( "impera1.bin", 0x8000, 0x8000, CRC(c3ab44dd) SHA1(e46c0fd94da561f57033647f1703fa135777ece5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyjokr_nvram.bin", 0x0000, 0x0800, CRC(f33e66ed) SHA1(7a4b9a1b2f976d5d26f54915a213d5ac5eca0a42) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -6082,7 +6076,7 @@ ROM_START( jolyjokr ) /* Jolly Joker (98bet, set 1) */ ROM_END -ROM_START( jolyjokra ) /* Jolly Joker (98bet, set 2) */ +ROM_START( jolyjokra ) // Jolly Joker (98bet, set 2) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "impera50.bin", 0x8000, 0x8000, CRC(7effc044) SHA1(961438e7fb8222296fb959b510cdf646e4ac3226) ) @@ -6090,7 +6084,7 @@ ROM_START( jolyjokra ) /* Jolly Joker (98bet, set 2) */ ROM_LOAD( "impera2.bin", 0x0000, 0x8000, CRC(f0fa5941) SHA1(1fcade31ed6893ffcfd4efe97dfaaa31d24283ec) ) ROM_LOAD( "impera1.bin", 0x8000, 0x8000, CRC(c3ab44dd) SHA1(e46c0fd94da561f57033647f1703fa135777ece5) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyjokra_nvram.bin", 0x0000, 0x0800, CRC(ed43693c) SHA1(d4aa4e539ab12c97bc9b9b1077997195a11d782b) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -6115,18 +6109,18 @@ ROM_END */ ROM_START( jolyjokrb ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Two slightly different programs. Using the 1st one...*/ - ROM_LOAD( "unbekannt.bin", 0x8000, 0x8000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) /* 1st prg */ - ROM_IGNORE( 0x8000 ) /* Using the 1st program. Discarding 2nd half */ -// ROM_LOAD( "unbekannt.bin", 0x0000, 0x10000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) /* 2nd prg */ + ROM_REGION( 0x10000, "maincpu", 0 ) // Two slightly different programs. Using the 1st one... + ROM_LOAD( "unbekannt.bin", 0x8000, 0x8000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) // 1st prg + ROM_IGNORE( 0x8000 ) // Using the 1st program. Discarding 2nd half +// ROM_LOAD( "unbekannt.bin", 0x0000, 0x10000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) // 2nd prg ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "ic26.bin", 0x0000, 0x8000, CRC(3e45dfc6) SHA1(8fd0b0cc00cdd96244ae7e7a91f6613b1c144ee0) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "ic25.bin", 0x8000, 0x8000, CRC(1bd067af) SHA1(9436fe085ba63c00a12ea80903470a84535e3dc1) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "jolyjokrb_nvram.bin", 0x0000, 0x0800, CRC(17007bb5) SHA1(72e08096293ce4fbde205a63b5ecd9641dbee017) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -6151,7 +6145,7 @@ ROM_START( jolyjokrc ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "tbp28s42.bin", 0x0000, 0x0200, CRC(0b671bba) SHA1(92d512e02b50f98b7bc5a60deee4fee722656c4f) ) - ROM_REGION( 0x0200, "plds", 0 ) /* Cracked PLD */ + ROM_REGION( 0x0200, "plds", 0 ) // cracked PLD ROM_LOAD( "jjpal.bin", 0x0000, 0x0117, CRC(3b084c34) SHA1(5d186b70317ef871c9a426eb420b66efcbd918de) ) ROM_END @@ -6269,7 +6263,7 @@ ROM_START( multiwin ) ROM_LOAD( "multiwin1.bin", 0x8000, 0x8000, CRC(97589aa6) SHA1(2486116637bd906cb3b32acd86fc861c48a0475e) ) ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "multi_prom.bin", 0x0000, 0x0200, BAD_DUMP CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) /* using the joker card one */ + ROM_LOAD( "multi_prom.bin", 0x0000, 0x0200, BAD_DUMP CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) // using the joker card one ROM_END @@ -6367,12 +6361,12 @@ ROM_END */ ROM_START( powercrd ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* need proper decryption */ - ROM_LOAD( "263a1.bin", 0x8000, 0x8000, CRC(9e5e477d) SHA1(428464a64bea8cb478bc8033859baa47d7de0297) ) /* just the 2nd half */ - ROM_LOAD( "263a2.bin", 0x0000, 0x8000, CRC(11b1a13f) SHA1(766c1a45c238467d6a292795f5a159187966ceec) ) /* just the 2nd half */ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "263a1.bin", 0x8000, 0x8000, CRC(9e5e477d) SHA1(428464a64bea8cb478bc8033859baa47d7de0297) ) // just the 2nd half + ROM_LOAD( "263a2.bin", 0x0000, 0x8000, CRC(11b1a13f) SHA1(766c1a45c238467d6a292795f5a159187966ceec) ) // just the 2nd half - ROM_REGION( 0x0800, "decode", 0 ) /* from the CY7C291A inside of the custom CPU */ - ROM_LOAD( "powercrd_cy7c291a.bin", 0x0000, 0x0800, CRC(f1d8f35d) SHA1(2b5f9222a81a627d43fd8448385f85c71c24b914) ) /* new dump */ + ROM_REGION( 0x0800, "decode", 0 ) // from the CY7C291A inside of the custom CPU + ROM_LOAD( "powercrd_cy7c291a.bin", 0x0000, 0x0800, CRC(f1d8f35d) SHA1(2b5f9222a81a627d43fd8448385f85c71c24b914) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "power_c_zg2.ic11", 0x0000, 0x8000, CRC(108380bb) SHA1(922beffe3c06f391239125e6f4ccc86ec6980c45) ) @@ -6501,15 +6495,15 @@ ROM_END */ ROM_START( megacard ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* need proper decryption */ - ROM_LOAD( "mega_mc3_210-f-1.ic37", 0x8000, 0x8000, CRC(747f5ed1) SHA1(06757bb6a792dca93978b17b54c28e413e3720b1) ) /* just the 2nd half */ - ROM_LOAD( "mega_mc3_210-f-2.ic41", 0x0000, 0x8000, CRC(373094d2) SHA1(8aed2502e89b0e7522e88f351ac256f1afad7ee8) ) /* just the 2nd half */ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "mega_mc3_210-f-1.ic37", 0x8000, 0x8000, CRC(747f5ed1) SHA1(06757bb6a792dca93978b17b54c28e413e3720b1) ) // just the 2nd half + ROM_LOAD( "mega_mc3_210-f-2.ic41", 0x0000, 0x8000, CRC(373094d2) SHA1(8aed2502e89b0e7522e88f351ac256f1afad7ee8) ) // just the 2nd half - ROM_REGION( 0x0300, "die_65sc02", 0 ) /* from the 65SC02 die inside of the custom CPU */ + ROM_REGION( 0x0300, "die_65sc02", 0 ) // from the 65SC02 die inside of the custom CPU ROM_LOAD( "gteu65decoderom.bin", 0x0000, 0x02f1, CRC(089af0c6) SHA1(0f46a73a7859a694a07ebe74d476fae80e57e329) ) - ROM_REGION( 0x0800, "decode", 0 ) /* from the CY7C291A inside of the custom CPU */ - ROM_LOAD( "megacard_cy7291a.bin", 0x0000, 0x0800, CRC(596f01ac) SHA1(a8606a1dd385fbb46b1a96f11a759fa6580803d8) ) /* new dump */ + ROM_REGION( 0x0800, "decode", 0 ) // from the CY7C291A inside of the custom CPU + ROM_LOAD( "megacard_cy7291a.bin", 0x0000, 0x0800, CRC(596f01ac) SHA1(a8606a1dd385fbb46b1a96f11a759fa6580803d8) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "mega_zg2.ic11", 0x0000, 0x8000, CRC(0993d380) SHA1(e5e2386948fba2fb6b79339af27bd1d0f1e198ca) ) @@ -6535,9 +6529,9 @@ ROM_END Unfortunatelly, the graphics ROM vesely_zg_1.ic10 has address 8 line (leg 25) shorted. Seems that the protection diode was blown due to a bad handling. - With forensics technics, a special device was constructed to process the faulty ROM - and try to read the contents. Fortunatelly after all these efforts, we got - a perfect and complete dump. + With forensics techniques, a special device was constructed to process + the faulty ROM and try to read the contents. Fortunatelly after all these + efforts, we got a perfect and complete dump. Specs: @@ -6592,9 +6586,9 @@ ROM_END ROM_START( jokercrd ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ic41.bin", 0x4000, 0x4000, CRC(d36188b3) SHA1(3fb848fabbbde9fbb70875b3dfef62bfb3a8cbcb) ) - ROM_IGNORE( 0x4000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x4000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "ic37.bin", 0xc000, 0x4000, CRC(8e0d70c4) SHA1(018f92631acbe98e5826a41698f0e07b4b46cd71) ) - ROM_IGNORE( 0x4000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x4000 ) // Identical halves. Discarding 2nd half ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "vesely_zg_2.ic11", 0x0000, 0x8000, CRC(21d05a57) SHA1(156c18ec31b08e4c4af6f73b49cb5d5c68d1670f) ) @@ -6636,25 +6630,25 @@ ROM_END ROM_START( mongolnw ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "prgteov.2.3m.u16", 0x8000, 0x8000, CRC(996b851a) SHA1(ef4e3d036ca10b33c83749024d04c4d4c09feeb7) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x10000, "cpu1", 0 ) /* TSC87C52-16CB MCU Code */ + ROM_REGION( 0x10000, "cpu1", 0 ) // TSC87C52-16CB MCU Code ROM_LOAD( "tsc87c52-mf.u40", 0x0000, 0x02000 , CRC(ae22e778) SHA1(0897e05967d68d7f23489e98717663e3a3176070) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "mong.rc.b2.u3", 0x0000, 0x8000, CRC(5e019b73) SHA1(63a544dccb9589e5a6b938e604c09d4d8fc060fc) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "mong.rc.c1.u2", 0x8000, 0x8000, CRC(e3fc24c4) SHA1(ea4e67ace63b55a76365f7e11a67c7d420a52dd7) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "mongolnw_nvram.bin", 0x0000, 0x0800, CRC(700531fa) SHA1(a8bcf86df6bd06d2ee54b4898dd7822060b81dba) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29pc_mf.u24", 0x0000, 0x0200, CRC(da9181af) SHA1(1b30d992f3b2a4b3bd81e3f99632311988e2e8d1) ) ROM_REGION( 0x0200, "plds", 0 ) - ROM_LOAD( "palce16v8h_mf.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_mf.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected ROM_END @@ -6696,25 +6690,25 @@ ROM_END ROM_START( soccernw ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "prgteo2gv2.3.u16", 0x8000, 0x8000, CRC(c61d1937) SHA1(c516f13a108da60b7ccee338b63a025009ef9099) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x10000, "cpu1", 0 ) /* TSC87C52-16CB MCU Code */ + ROM_REGION( 0x10000, "cpu1", 0 ) // TSC87C52-16CB MCU Code ROM_LOAD( "tsc87c52-sn.u40", 0x0000, 0x02000 , CRC(af0bd35b) SHA1(c6613a7bcdec2fd6060d6dcf639654568de87e75) ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "soccer2.u3", 0x0000, 0x8000, CRC(db09b5bb) SHA1(a12bf2938f5482ea5ebc0db6fd6594e1beb97017) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "soccer1.u2", 0x8000, 0x8000, CRC(564cc467) SHA1(8f90c4bacd97484623666b25dae77e628908e243) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "soccernw_nvram.bin", 0x0000, 0x0800, CRC(607247bd) SHA1(06bbed08166d8930f14e1f41843ac7faeded263d) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "am27s29pc_sn.u24", 0x0000, 0x0200, CRC(d02894fc) SHA1(adcdc912cc0b7a7f67b122fa94fca921c957b282) ) ROM_REGION( 0x0200, "plds", 0 ) - ROM_LOAD( "palce16v8h_sn.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ + ROM_LOAD( "palce16v8h_sn.u5", 0x0000, 0x0117, NO_DUMP ) // PLD is read protected ROM_END @@ -6838,7 +6832,7 @@ ROM_END --+----------------------------------------------------------------------- */ -ROM_START( funquiz ) /* Fun World Quiz */ +ROM_START( funquiz ) // Fun World Quiz ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "kqu_6.bin", 0xc000, 0x4000, CRC(50f0e586) SHA1(85ce5b95283113e2ac94fd882c57ce1b26135ed0) ) @@ -6848,31 +6842,31 @@ ROM_START( funquiz ) /* Fun World Quiz */ ROM_FILL( 0x8000, 0x4000, 0xff) ROM_LOAD( "q_2.bin", 0xc000, 0x4000, CRC(ce07c6e1) SHA1(6b77a9198e29c195d983b856e8826e8174945321) ) - /* One unpopulated questions socket... Maybe sport_1 is missing */ +// One unpopulated questions socket... Maybe sport_1 is missing ROM_REGION( 0x100000, "questions", ROMREGION_ERASEFF ) - /* 01 - Allgemein */ + // 01 - Allgemein ROM_LOAD( "allg_1.bin", 0x00000, 0x8000, CRC(1351cf56) SHA1(50e89c3e6d256bcf7f1d3c0dbef935e4e8561096) ) ROM_LOAD( "allg_2.bin", 0x08000, 0x8000, CRC(021492a4) SHA1(b59e1303f17c9e5af05a808118ae729205690bb2) ) ROM_LOAD( "allg_3.bin", 0x10000, 0x8000, CRC(de8e055f) SHA1(593fce143ee5994087bbac8b51ac7e2d02e8701c) ) ROM_LOAD( "allg_4.bin", 0x18000, 0x8000, CRC(5c87177a) SHA1(a8a8318165008cb3295e25d4b4d38146f44a32fc) ) // this one has the category in the rom in ALL caps, is it official? ROM_LOAD( "allg_5.bin", 0x20000, 0x8000, CRC(83056686) SHA1(00f14ded371751d54a391bf583d940b32ddeae58) ) - /* 02 - Geschichte */ + // 02 - Geschichte ROM_LOAD( "gesch_1.bin", 0x28000, 0x8000, CRC(6f785938) SHA1(1e3df7c262d8cb7d7981c9d424d4c1361fe55b50) ) ROM_LOAD( "gesch_2.bin", 0x30000, 0x8000, CRC(3363c0ba) SHA1(f1a2a86e6abc73dd9312fa744b6929fae138e219) ) - /* 03 - Geographie */ + // 03 - Geographie ROM_LOAD( "geo_1.bin", 0x38000, 0x8000, CRC(504da831) SHA1(4bef7bed4d300400c094cb30e9af55d3c6f47c29) ) ROM_LOAD( "geo_2.bin", 0x40000, 0x8000, CRC(7c563119) SHA1(9f3ae3ba3e4f60d9ea4b5c95aa5aaada8bb446a3) ) - /* 04 - Technik */ + // 04 - Technik ROM_LOAD( "tech_1.bin", 0x48000, 0x8000, CRC(cf5b9edc) SHA1(f1085c9915d21c4da581d06c9568d2bb47d467ed) ) - /* 05 - Sport */ + // 05 - Sport ROM_LOAD( "sport_2.bin", 0x50000, 0x8000, CRC(7accde63) SHA1(75ec3a02368d3a07d48ef9a9ff4ca7f8cf7798e2) ) - /* 07 - Pop */ + // 07 - Pop ROM_LOAD( "pop_1.bin", 0x58000, 0x8000, CRC(5c74781e) SHA1(0a50a706fd397bb220e31f1a7adaa4204b242888) ) ROM_LOAD( "pop_2.bin", 0x60000, 0x8000, CRC(10103648) SHA1(6fdc1aa4dcc8919e46def1c19adc2b9686c0f72d) ) @@ -6901,29 +6895,29 @@ ROM_START( funquiza ) ROM_REGION( 0x100000, "questions", ROMREGION_ERASEFF ) - /* 01 - Allgemein */ + // 01 - Allgemein ROM_LOAD( "allg1.bin", 0x00000, 0x8000, CRC(1351cf56) SHA1(50e89c3e6d256bcf7f1d3c0dbef935e4e8561096) ) ROM_LOAD( "allg2.bin", 0x08000, 0x8000, CRC(021492a4) SHA1(b59e1303f17c9e5af05a808118ae729205690bb2) ) ROM_LOAD( "allg3.bin", 0x10000, 0x8000, CRC(4eb29de3) SHA1(5c5d47959c06261ab51fc4e821bff0fe41ac9176) ) ROM_LOAD( "allg4.bin", 0x18000, 0x8000, CRC(5c87177a) SHA1(a8a8318165008cb3295e25d4b4d38146f44a32fc) ) ROM_LOAD( "allg5.bin", 0x20000, 0x8000, CRC(83056686) SHA1(00f14ded371751d54a391bf583d940b32ddeae58) ) - /* 02 - Technik */ + // 02 - Technik ROM_LOAD( "tech1.bin", 0x28000, 0x8000, CRC(cf5b9edc) SHA1(f1085c9915d21c4da581d06c9568d2bb47d467ed) ) - /* 03 - Sport */ + // 03 - Sport ROM_LOAD( "sp1.bin", 0x30000, 0x8000, CRC(20fb1261) SHA1(ad029f1a2b19365543c77fcd1103f6c5783c9f68) ) ROM_LOAD( "sp2.bin", 0x38000, 0x8000, CRC(1988f5b7) SHA1(969ae64796e432c04862cb8c159e419a4793e9f0) ) - /* 04 - Film - Unterhaltung */ + // 04 - Film - Unterhaltung ROM_LOAD( "unterh1.bin", 0x40000, 0x8000, CRC(996e7adc) SHA1(7b271cdb6ef555d31c2b17c6104bd30cd2eabcb3) ) - /* 05 - Geographie */ + // 05 - Geographie ROM_LOAD( "geo1.bin", 0x48000, 0x8000, CRC(504da831) SHA1(4bef7bed4d300400c094cb30e9af55d3c6f47c29) ) ROM_LOAD( "geo2.bin", 0x50000, 0x8000, CRC(7c563119) SHA1(9f3ae3ba3e4f60d9ea4b5c95aa5aaada8bb446a3) ) ROM_LOAD( "geo3.bin", 0x58000, 0x8000, CRC(7c563119) SHA1(9f3ae3ba3e4f60d9ea4b5c95aa5aaada8bb446a3) ) - /* 06 - Pop */ + // 06 - Pop ROM_LOAD( "pop_1.bin", 0x60000, 0x8000, CRC(5c74781e) SHA1(0a50a706fd397bb220e31f1a7adaa4204b242888) ) ROM_LOAD( "pop_2.bin", 0x68000, 0x8000, CRC(10103648) SHA1(6fdc1aa4dcc8919e46def1c19adc2b9686c0f72d) ) @@ -6949,29 +6943,29 @@ ROM_START( funquizb ) ROM_REGION( 0x100000, "questions", ROMREGION_ERASEFF ) - /* 01 - Allgemein */ + // 01 - Allgemein ROM_LOAD( "allg1.bin", 0x00000, 0x8000, CRC(1351cf56) SHA1(50e89c3e6d256bcf7f1d3c0dbef935e4e8561096) ) ROM_LOAD( "allg2.bin", 0x08000, 0x8000, CRC(021492a4) SHA1(b59e1303f17c9e5af05a808118ae729205690bb2) ) ROM_LOAD( "allg3.bin", 0x10000, 0x8000, CRC(de8e055f) SHA1(593fce143ee5994087bbac8b51ac7e2d02e8701c) ) ROM_LOAD( "allg4.bin", 0x18000, 0x8000, CRC(5c87177a) SHA1(a8a8318165008cb3295e25d4b4d38146f44a32fc) ) ROM_LOAD( "allg5.bin", 0x20000, 0x8000, CRC(83056686) SHA1(00f14ded371751d54a391bf583d940b32ddeae58) ) - /* 02 - Technik */ + // 02 - Technik ROM_LOAD( "tech1.bin", 0x28000, 0x8000, CRC(cf5b9edc) SHA1(f1085c9915d21c4da581d06c9568d2bb47d467ed) ) - /* 03 - Sport */ + // 03 - Sport ROM_LOAD( "sport1.bin", 0x30000, 0x8000, CRC(b351c745) SHA1(3b64d8e935eb4cd5bdf82934983b3ffab465257a) ) ROM_LOAD( "sport2.bin", 0x38000, 0x8000, CRC(7accde63) SHA1(75ec3a02368d3a07d48ef9a9ff4ca7f8cf7798e2) ) - /* 04 - Film - Unterhaltung */ + // 04 - Film - Unterhaltung ROM_LOAD( "unt1.bin", 0x40000, 0x8000, CRC(996e7adc) SHA1(7b271cdb6ef555d31c2b17c6104bd30cd2eabcb3) ) - /* 05 - Geographie */ + // 05 - Geographie ROM_LOAD( "geo1.bin", 0x48000, 0x8000, CRC(504da831) SHA1(4bef7bed4d300400c094cb30e9af55d3c6f47c29) ) ROM_LOAD( "geo2.bin", 0x50000, 0x8000, CRC(7c563119) SHA1(9f3ae3ba3e4f60d9ea4b5c95aa5aaada8bb446a3) ) ROM_LOAD( "geo3.bin", 0x58000, 0x8000, CRC(7c563119) SHA1(9f3ae3ba3e4f60d9ea4b5c95aa5aaada8bb446a3) ) - /* 06 - Pop */ + // 06 - Pop ROM_LOAD( "pop1.bin", 0x60000, 0x8000, CRC(5c74781e) SHA1(0a50a706fd397bb220e31f1a7adaa4204b242888) ) ROM_LOAD( "pop2.bin", 0x68000, 0x8000, CRC(10103648) SHA1(6fdc1aa4dcc8919e46def1c19adc2b9686c0f72d) ) @@ -6995,11 +6989,11 @@ ROM_START( witchryl ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "2.u11", 0x0000, 0x8000, CRC(7edc8f44) SHA1(cabad613fa8a72dc12587d19a72bc9c6861486bd) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "3.u4", 0x8000, 0x8000, CRC(5e4a0d59) SHA1(08eb9b1a617a7b2e6f87377819dba07082cf38b4) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "witchryl_nvram.bin", 0x0000, 0x0800, CRC(98366bed) SHA1(279a5ce4639b8b2ac29146b32512615253c45991) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -7016,7 +7010,7 @@ ROM_END */ -ROM_START( novoplay ) /* Similar to Royal Vegas Joker Card */ +ROM_START( novoplay ) // Similar to Royal Vegas Joker Card ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "np1_run.bin", 0x8000, 0x8000, CRC(4078d695) SHA1(d0e39064250733968044aec216040fe62fecc880) ) @@ -7024,10 +7018,10 @@ ROM_START( novoplay ) /* Similar to Royal Vegas Joker Card */ ROM_LOAD( "np1_ch2.bin", 0x0000, 0x8000, CRC(188d6fad) SHA1(3bc9bab24d8c7beed0c5f491c19a004ca7d719a1) ) ROM_LOAD( "np1_ch1.bin", 0x8000, 0x8000, CRC(fdc3bd67) SHA1(0ec2d5e0b1937849934f98e253e18887af0331e8) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "novoplay_nvram.bin", 0x0000, 0x0800, CRC(92019972) SHA1(e6d1e231cd2ce27e718ed9482dbe9ddc8612eb67) ) - ROM_REGION( 0x0200, "proms", 0 ) /* PLD address the 2nd half */ + ROM_REGION( 0x0200, "proms", 0 ) // PLD address the 2nd half ROM_LOAD( "np1_27s29.bin", 0x0000, 0x0200, CRC(8992aa4d) SHA1(5a0649bff66e7cab1bcbadcdfc74c77a747cc58f) ) ROM_END @@ -7047,7 +7041,7 @@ ROM_END */ -ROM_START( jolycdsp ) /* Encrypted program in a module. Blue TAB PCB encrypted graphics */ +ROM_START( jolycdsp ) // Encrypted program in a module. Blue TAB PCB encrypted graphics ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ct3.bin", 0x8000, 0x8000, CRC(0c9cbae6) SHA1(4f834370229797cac302a5185ed1e77ef2b7cabb) ) @@ -7055,10 +7049,10 @@ ROM_START( jolycdsp ) /* Encrypted program in a module. Blue TAB PCB encrypted ROM_LOAD( "ct2.bin", 0x0000, 0x8000, CRC(7569e719) SHA1(f96e1e72bc13d1888f3868f8d404fd3db94db7b2) ) ROM_LOAD( "ct1.bin", 0x8000, 0x8000, CRC(8f438635) SHA1(3200e20f4b28173cc2a68d0f87969627570418dc) ) - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "ctunk_nvram.bin", 0x0000, 0x0800, CRC(c55c6706) SHA1(a38ae926f057fb47e48ca841b2d097fc4fd06416) ) - ROM_REGION( 0x0200, "proms", 0 ) /* Borrowed from the parent set */ + ROM_REGION( 0x0200, "proms", 0 ) // Borrowed from the parent set ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) ROM_END @@ -7091,11 +7085,11 @@ ROM_START( rcdino4 ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "m27c512.u2", 0x0000, 0x8000, CRC(915f1e59) SHA1(2eb2a7acca50318eb1775b01a00b1d3c74e1522c) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half ROM_LOAD( "m27c512.u20", 0x8000, 0x8000, CRC(86e55f5a) SHA1(be71301b6887e8cc5924864d0f97b54e0668875e) ) - ROM_IGNORE( 0x8000 ) /* Identical halves. Discarding 2nd half */ + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "rcdino4_nvram.bin", 0x0000, 0x0800, CRC(a2dc069e) SHA1(23e296cc0cc0c6f0c34eccffff8c78d2cef2dbae) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -7118,11 +7112,11 @@ ROM_START( chinatow ) ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "27c512.u2", 0x0000, 0x8000, CRC(6ace221f) SHA1(d35a6621d9d9231a844d7043da78035855ebf572) ) - ROM_CONTINUE( 0x0000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_CONTINUE( 0x0000, 0x8000) // Discarding 1nd half 0xff filled ROM_LOAD( "27c512.u20", 0x8000, 0x8000, CRC(efb7f1ec) SHA1(260005526fc9b4087ca03f7cc585e40b6fa007fb) ) - ROM_CONTINUE( 0x8000, 0x8000) /* Discarding 1nd half 0xff filled*/ + ROM_CONTINUE( 0x8000, 0x8000) // Discarding 1nd half 0xff filled - ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM ROM_LOAD( "chinatow_nvram.bin", 0x0000, 0x0800, CRC(eef4c5e7) SHA1(a2d9a9f617d35ccb99236114e5ce3257ad572f49) ) ROM_REGION( 0x0200, "proms", 0 ) @@ -7272,7 +7266,7 @@ ROM_START( fw_a7_11a ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "m3-7649a-5.bin", 0x0000, 0x0200, CRC(f990a9ae) SHA1(f7133798b5f20dd5b8dbe5d1a6876341710d93a8) ) - ROM_REGION( 0x0200, "plds", 0 ) /* Cracked PLD */ + ROM_REGION( 0x0200, "plds", 0 ) // cracked PLD ROM_LOAD( "pal16l8acn_block.bin", 0x0000, 0x0117, CRC(fcda7872) SHA1(60acdb968e6229a8f71c2e29d22e132906a65bd5) ) ROM_END @@ -7423,13 +7417,13 @@ void funworld_state::init_tabblue() for (x=0x0000; x < 0x10000; x++) { - na = src[x] & 0xf0; /* nibble A */ - nb = src[x] << 4; /* nibble B */ + na = src[x] & 0xf0; // nibble A + nb = src[x] << 4; // nibble B - nad = (na ^ (na >> 1)) << 1; /* nibble A decrypted */ - nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; /* nibble B decrypted */ + nad = (na ^ (na >> 1)) << 1; // nibble A decrypted + nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; // nibble B decrypted - src[x] = nad + nbd; /* decrypted byte */ + src[x] = nad + nbd; // decrypted byte } } @@ -7457,20 +7451,20 @@ void magicrd2_state::init_magicd2b() void magicrd2_state::init_magicd2c() { - /*** same as blue TAB PCB, with the magicd2a patch ***/ +// *** same as blue TAB PCB, with the magicd2a patch *** int x, na, nb, nad, nbd; uint8_t *src = memregion( "gfx1" )->base(); uint8_t *ROM = memregion("maincpu")->base(); for (x=0x0000; x < 0x10000; x++) { - na = src[x] & 0xf0; /* nibble A */ - nb = src[x] << 4; /* nibble B */ + na = src[x] & 0xf0; // nibble A + nb = src[x] << 4; // nibble B - nad = (na ^ (na >> 1)) << 1; /* nibble A decrypted */ - nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; /* nibble B decrypted */ + nad = (na ^ (na >> 1)) << 1; // nibble A decrypted + nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; // nibble B decrypted - src[x] = nad + nbd; /* decrypted byte */ + src[x] = nad + nbd; // decrypted byte } ROM[0xc1c6] = 0x92; @@ -7479,26 +7473,26 @@ void magicrd2_state::init_magicd2c() void funworld_state::init_mongolnw() { - /* temporary patch to avoid hardware errors for debug purposes */ +// temporary patch to avoid hardware errors for debug purposes uint8_t *ROM = memregion("maincpu")->base(); ROM[0x9115] = 0xa5; - /* prevents one test from triggering hardware error */ +// prevents one test from triggering hardware error ROM[0xb8f3] = 0xff; } void funworld_state::init_soccernw() { -/* temporary patch to avoid hardware errors for debug purposes */ +// temporary patch to avoid hardware errors for debug purposes uint8_t *ROM = memregion("maincpu")->base(); ROM[0x80b2] = 0xa9; ROM[0x80b3] = 0x00; ROM[0x9115] = 0xa5; -/* prevent one test from triggering hardware error */ +// prevents one test from triggering hardware error ROM[0xb8f3] = 0xff; } @@ -7542,7 +7536,7 @@ void funworld_state::init_saloon() * Program ROM decryption * *****************************/ - /* data lines swap: 76543210 -> 76543012 */ + // data lines swap: 76543210 -> 76543012 for (int i = start; i < size; i++) { @@ -7553,7 +7547,7 @@ void funworld_state::init_saloon() std::vector buffer(size); memcpy(&buffer[0], rom, size); - /* address lines swap: fedcba9876543210 -> fedcba9820134567 */ + // address lines swap: fedcba9876543210 -> fedcba9820134567 for (int i = start; i < size; i++) { @@ -7572,7 +7566,7 @@ void funworld_state::init_saloon() std::vector buffer(sizeg); memcpy(&buffer[0], gfxrom, sizeg); - /* address lines swap: fedcba9876543210 -> fedcb67584a39012 */ + // address lines swap: fedcba9876543210 -> fedcb67584a39012 for (int i = 0; i < sizeg; i++) { @@ -7586,7 +7580,7 @@ void funworld_state::init_saloon() * Color PROM decryption * ****************************/ - /* data lines swap: 76543210 -> 23546710 */ + // data lines swap: 76543210 -> 23546710 { std::vector buffer; @@ -7595,7 +7589,7 @@ void funworld_state::init_saloon() buffer.push_back(bitswap<8>(prom[i], 2, 3, 5, 4, 6, 7, 1, 0)); } - /* address lines swap: fedcba9876543210 -> fedcba9487652013 */ + // address lines swap: fedcba9876543210 -> fedcba9487652013 for (int i = 0; i < sizep; i++) { int a = bitswap<16>(i, 15, 14, 13, 12, 11, 10, 9, 4, 8, 7, 6, 5, 2, 0, 1, 3); @@ -7641,7 +7635,7 @@ void funworld_state::init_dino4() * Program ROM decryption * *****************************/ - /* data lines swap: 76543210 -> 76543120 */ + // data lines swap: 76543210 -> 76543120 for (int i = start; i < size; i++) { @@ -7652,7 +7646,7 @@ void funworld_state::init_dino4() std::vector buffer(size); memcpy(&buffer[0], rom, size); - /* address lines swap: fedcba9876543210 -> fedcba9867543210 */ + // address lines swap: fedcba9876543210 -> fedcba9867543210 for (int i = start; i < size; i++) { int a = bitswap<16>(i, 15, 13, 14, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); @@ -7669,7 +7663,7 @@ void funworld_state::init_dino4() std::vector buffer(sizeg); memcpy(&buffer[0], gfxrom, sizeg); - /* address lines swap: fedcba9876543210 -> fedcb67584a39012 */ + // address lines swap: fedcba9876543210 -> fedcb67584a39012 for (int i = 0; i < sizeg; i++) { @@ -7696,7 +7690,7 @@ void funworld_state::init_ctunk() * Program ROM decryption * *****************************/ - /* data lines swap: 76543210 -> 56734012 */ + // data lines swap: 76543210 -> 56734012 for (int i = start; i < size; i++) { @@ -7715,13 +7709,13 @@ void funworld_state::init_ctunk() //uint8_t *ROM = memregion("maincpu")->base(); for (int x = 0x0000; x < 0x10000; x++) { - int na = src[x] & 0xf0; /* nibble A */ - int nb = src[x] << 4; /* nibble B */ + int na = src[x] & 0xf0; // nibble A + int nb = src[x] << 4; // nibble B - int nad = (na ^ (na >> 1)) << 1; /* nibble A decrypted */ - int nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; /* nibble B decrypted */ + int nad = (na ^ (na >> 1)) << 1; // nibble A decrypted + int nbd = ((nb ^ (nb >> 1)) >> 3) & 0x0f; // nibble B decrypted - src[x] = nad + nbd; /* decrypted byte */ + src[x] = nad + nbd; // decrypted byte } } @@ -7732,7 +7726,7 @@ static void decrypt_rcdino4(uint8_t *rom, int size, uint8_t *gfxrom, int sizeg, * Program ROM decryption * *****************************/ - /* data lines swap: 76543210 -> 76543120 */ + // data lines swap: 76543210 -> 76543120 { std::vector buffer; for (int i = 0; i < size; i++) @@ -7740,7 +7734,7 @@ static void decrypt_rcdino4(uint8_t *rom, int size, uint8_t *gfxrom, int sizeg, buffer.push_back(bitswap<8>(rom[i], 7, 6, 5, 4, 3, 1, 2, 0)); } - /* address lines swap: fedcba9876543210 -> fedcba9867543210 */ + // address lines swap: fedcba9876543210 -> fedcba9867543210 for (int i = 0; i < size; i++) { @@ -7758,7 +7752,7 @@ static void decrypt_rcdino4(uint8_t *rom, int size, uint8_t *gfxrom, int sizeg, std::vector buffer(sizeg); memcpy(&buffer[0], gfxrom, sizeg); - /* address lines swap: fedcba9876543210 -> fedcb67584a39012 */ + // address lines swap: fedcba9876543210 -> fedcb67584a39012 for (int i = 0; i < sizeg; i++) { @@ -7767,7 +7761,7 @@ static void decrypt_rcdino4(uint8_t *rom, int size, uint8_t *gfxrom, int sizeg, } } - /* d4-d5 data lines swap, plus a XOR with 0x81, implemented in two steps for an easy view */ + // d4-d5 data lines swap, plus a XOR with 0x81, implemented in two steps for an easy view for (int x = 0x0000; x < 0x10000; x++) { @@ -7781,7 +7775,7 @@ static void decrypt_rcdino4(uint8_t *rom, int size, uint8_t *gfxrom, int sizeg, static uint8_t rcdino4_add[] = { -/* 0 1 2 3 4 5 6 7 8 9 a b c d e f*/ +// 0 1 2 3 4 5 6 7 8 9 a b c d e f /*0*/ 1, 9, 9, 9, 9, 2, 9, 9, 1, 2, 1, 9, 9, 3, 9, 9, /*1*/ 2, 2, 9, 9, 9, 9, 9, 9, 1, 9, 1, 9, 9, 9, 9, 9, /*2*/ 3, 9, 9, 9, 9, 2, 2, 9, 1, 2, 1, 9, 9, 3, 3, 9, @@ -7802,65 +7796,65 @@ static uint8_t rcdino4_add[] = static uint8_t rcdino4_keys40[] = { -/* 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d*/ +// 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 0x36, 0x54, 0x47, 0x6b, 0xce, 0x95, 0xa2, 0x66, 0x3a, 0x46, 0x53, 0xd7, 0xc4, 0xa4, -/* 4e 4f*/ +// 4e 4f 0x00, 0x00, -/* 50*/ +// 50 0x56 }; static uint8_t rcdino4_keys80[] = { -/* 81 82 83 84 85 */ +// 81 82 83 84 85 0xb8, 0x32, 0x1c, 0x23, 0xe2, -/* 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91*/ +// 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* 92 93 94 95 96 97 */ +// 92 93 94 95 96 97 0x4c, 0x00, 0x3d, 0x00, 0xd9, 0x16, -/* 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3*/ +// 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* a4 a5 a6*/ +// a4 a5 a6 0x5e, 0x73, 0x69, -/* a7 a8 a9*/ +// a7 a8 a9 0x00, 0x00, 0x00, -/* aa*/ +// aa 0xa6, -/* ab ac ad ae af*/ +// ab ac ad ae af 0x00, 0x00, 0x00, 0x00, 0x00, -/* b0 b1*/ +// b0 b1 0xc3, 0x40, -/* b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2*/ +// b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* c3 c4 c5*/ +// c3 c4 c5 0x92, 0xb7, 0x24, -/* c6 c7 c8 c9*/ +// c6 c7 c8 c9 0x00, 0x00, 0x00, 0x00, -/* ca*/ +// ca 0x62, -/* cb cc cd ce cf*/ +// cb cc cd ce cf 0x00, 0x00, 0x00, 0x00, 0x00, -/* d0*/ +// d0 0x84, -/* d1*/ +// d1 0x00, -/* d2*/ +// d2 0xaa, -/* d3 d4 d5*/ +// d3 d4 d5 0x00, 0x00, 0x00, -/* d6*/ +// d6 0xea, -/* d7 d8 d9 da db dc dd de df*/ +// d7 d8 d9 da db dc dd de df 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* e0*/ +// e0 0x17, -/* e1 e2 e3*/ +// e1 e2 e3 0x00, 0x00, 0x00, -/* e4*/ +// e4 0xc0, -/* e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f7*/ +// e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* f8 f9 fa fb fc fd fe*/ +// f8 f9 fa fb fc fd fe 0x06, 0x1e, 0x28, 0x5a, 0xcf, 0x79, 0x11 }; @@ -7920,40 +7914,40 @@ void chinatow_state::init_rcdino4() int add = rcdino4_add[c]; if (((i == 0x81) - && (j >= 0xa3) && (j <= 0xb1) /* text string */ + && (j >= 0xa3) && (j <= 0xb1) // text string ) || ((i == 0x82) - && (j >= 0x35) && (j <= 0x53) /* table of addresses */ + && (j >= 0x35) && (j <= 0x53) // table of addresses ) || ((i == 0x85) - && (j >= 0x7e) && (j <= 0x8d) /* '0'-'9', 'A'-'F' */ + && (j >= 0x7e) && (j <= 0x8d) // '0'-'9', 'A'-'F' ) || ((i == 0x94) - && (((j >= 0x4a) && (j <= 0x86)) /* zeroes */ - || ((j >= 0xbf) && (j <= 0xc1)) /* set of masks */ + && (((j >= 0x4a) && (j <= 0x86)) // zeroes + || ((j >= 0xbf) && (j <= 0xc1)) // set of masks */ ) ) || ((i == 0x96) - && (j >= 0x39) && (j <= 0x3e) /* set of masks */ + && (j >= 0x39) && (j <= 0x3e) // set of masks ) || ((i == 0xa6) - && (j >= 0x30) && (j <= 0x32) /* set of masks */ + && (j >= 0x30) && (j <= 0x32) // set of masks ) || ((i == 0xaa) - && (j >= 0xf2) /* table of addresses */ + && (j >= 0xf2) // table of addresses ) || ((i == 0xc3) - && (j >= 0x70) && (j <= 0xaf) /* set of masks */ + && (j >= 0x70) && (j <= 0xaf) // set of masks ) || ((i == 0xc4) - && (j >= 0xdc) /* zeroes and things */ + && (j >= 0xdc) // zeroes and things ) || ((i == 0xd0) - && (j >= 0xd2) /* text and zeroes */ + && (j >= 0xd2) // text and zeroes ) || ((i == 0xd2) - && ((j <= 0x2f) /* text and zeroes */ - || ((j >= 0x84) && (j <= 0xaf)) /* text and zeroes */ + && ((j <= 0x2f) // text and zeroes + || ((j >= 0x84) && (j <= 0xaf)) // text and zeroes ) ) || (add == 9) @@ -7984,7 +7978,7 @@ void chinatow_state::init_rcdino4() || (i == 0xf8) ) { - j = 0; /* re-align offset after skipping some pages */ + j = 0; // re-align offset after skipping some pages } } while (1); @@ -8084,7 +8078,7 @@ void funworld_state::init_impera16() * Game Drivers * **********************************************/ -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT // Jolly Card based... GAMEL( 1985, jollycrd, 0, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (German, set 1)", 0, layout_jollycrd ) -- cgit v1.2.3 From e1da95bb614f35fdc9b83f1643e8f56a9051efa7 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Fri, 31 Jul 2020 03:17:50 +0200 Subject: New working machines -------------------- Nkoulit (Gullit) (encrypted GFX) [Ioannis Bampoulas, Roberto Fresca] --- src/mame/drivers/funworld.cpp | 41 +++++++++++++++++++++++++++++++++-------- src/mame/mame.lst | 1 + 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index f5ed3a71141..4839f2ae0fb 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -7386,6 +7386,30 @@ ROM_START( gratispka ) // Gratis Poker (V.204, Set 2) ROM_END +/* + Γκόyλιτ + Nkoúlit + Gullit + + Greek hack of Royal Card. + +*/ +ROM_START( nkoulit ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c256-3.bin", 0x8000, 0x8000, CRC(3f4f671d) SHA1(0aa87f813567f7a537315bf3d452343e5a449e13) ) + + ROM_REGION( 0x10000, "gfx1", 0 ) + ROM_LOAD( "27c256-2.bin", 0x0000, 0x8000, CRC(4a9ea5ad) SHA1(50504544265646e12ce769a1fd40d7afeae8b8d3) ) + ROM_LOAD( "27c256-1.bin", 0x8000, 0x8000, CRC(7b3a6d1a) SHA1(b7f2e534ad4467cd0a9d86019be8110caf45c024) ) + + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "nkoulit_nvram.bin", 0x0000, 0x0800, CRC(73584f67) SHA1(4aab0d4fe846592e1cbc8b3c2411ddc1bf79fd95) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "am27s29pc.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) +ROM_END + + /************************** * Driver Initialization * **************************/ @@ -8198,14 +8222,15 @@ GAME( 1990, funquiza, 0, funquiz, funquiza, funworld_state, empty_ini GAME( 1990, funquizb, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 27-04-1990)", 0 ) // Other games... -GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic","Novo Play Multi Card / Club Card", 0, layout_novoplay ) -GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) -GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) -GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) +GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic", "Novo Play Multi Card / Club Card", 0, layout_novoplay ) +GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) +GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) +GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) +GAMEL( 1995, nkoulit, 0, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) // These are 2-in-1 stealth boards, they can run the Poker game, or, using completely separate hardware on the same PCB, a NES / MSX Multigames! GAMEL( 1991, royalcrd_nes, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (stealth with NES multigame)", MACHINE_NOT_WORKING, layout_jollycrd ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 00b624fa58a..ff879bb78c0 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13895,6 +13895,7 @@ megacard // (c) 1993 Fun World mongolnw // 199? bootleg multiwin // (c) 1992 Fun World nevadafw // 199? unknown +nkoulit // 1995 JK Amusement novoplay // (c) 1986 Novomatic pool10 // (c) 1996 C.M.C. pool10b // (c) 1996 C.M.C. -- cgit v1.2.3 From 2b092aa72dc58ec3897cff60dc5edb351ee38596 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Fri, 31 Jul 2020 15:20:47 +1000 Subject: hector: added save state --- src/mame/includes/hec2hrp.h | 62 ++++++++------------------------------------ src/mame/machine/hec2hrp.cpp | 41 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/src/mame/includes/hec2hrp.h b/src/mame/includes/hec2hrp.h index 51e5038505a..3d99dac37df 100644 --- a/src/mame/includes/hec2hrp.h +++ b/src/mame/includes/hec2hrp.h @@ -3,41 +3,7 @@ ///////////////////////////////////////////////////////////////////// ////// HECTOR HEADER FILE ///////////////////////////////////////// ///////////////////////////////////////////////////////////////////// -/* - Hector 2HR+ - Victor - Hector 2HR - Hector HRX - Hector MX40c - Hector MX80c - Hector 1 - Interact - - 12/05/2009 Skeleton driver - Micko : mmicko@gmail.com - 31/06/2009 Video - Robbbert - - 29/10/2009 Update skeleton to functional machine - by yo_fr (jj.stac @ aliceadsl.fr) - - => add Keyboard, - => add color, - => add cassette, - => add sn76477 sound and 1bit sound, - => add joysticks (stick, pot, fire) - => add BR/HR switching - => add bank switch for HRX - => add device MX80c and bank switching for the ROM - 03/01/2010 Update and clean prog by yo_fr (jj.stac@aliceadsl.fr) - => add the port mapping for keyboard - 20/11/2010 : synchronization between uPD765 and Z80 are now OK, CP/M running! JJStacino - 11/11/2011 : add the minidisque support -3 pouces 1/2 driver- JJStacino (jj.stac @ aliceadsl.fr) - - don't forget to keep some information about these machine see DChector project : http://dchector.free.fr/ made by DanielCoulom - (and thank's to Daniel!) and Yves site : http://hectorvictor.free.fr/ (thank's too Yves!) - - TODO : Add the cartridge function, - Adjust the one shot and A/D timing (sn76477) -*/ + #ifndef MAME_INCLUDES_HEC2HRP_H #define MAME_INCLUDES_HEC2HRP_H @@ -120,10 +86,10 @@ public: void interact(machine_config &config); void interact_common(machine_config &config); -protected: +private: void hector_hr(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int yram); void hector_reset(bool hr, bool with_d2); - + void video_start() override; void keyboard_w(uint8_t data); uint8_t keyboard_r(offs_t offset); void sn_2000_w(offs_t offset, uint8_t data); @@ -138,19 +104,7 @@ protected: bool m_is_extended; void init_palette(palette_device &); void hector_init(); - - required_device m_maincpu; - required_device m_cassette; - optional_device m_printer; - required_device m_palette; - optional_shared_ptr m_vram; - optional_memory_bank_array<4> m_bank; - required_region_ptr m_rom; - optional_device m_ram; - -private: void minidisc_control_w(uint8_t data); - void switch_bank_w(offs_t offset, uint8_t data); uint8_t io_8255_r(offs_t offset); void io_8255_w(offs_t offset, uint8_t data); @@ -222,8 +176,6 @@ private: void init_sn76477(); void update_sound(uint8_t data); void hector_80c(bitmap_ind16 &bitmap, uint8_t *page, int ymax, int yram); - /*----------- defined in machine/hecdisk2.c -----------*/ - void hector_disc2_reset(); uint32_t screen_update_interact(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void interact_mem(address_map &map); @@ -238,6 +190,14 @@ private: void hecdisc2_io(address_map &map); void hecdisc2_mem(address_map &map); + required_device m_maincpu; + required_device m_cassette; + optional_device m_printer; + required_device m_palette; + optional_shared_ptr m_vram; + optional_memory_bank_array<4> m_bank; + required_region_ptr m_rom; + optional_device m_ram; optional_shared_ptr m_hector_vram; optional_device m_disc2cpu; required_device m_discrete; diff --git a/src/mame/machine/hec2hrp.cpp b/src/mame/machine/hec2hrp.cpp index 4891e4847c7..2a7264fe668 100644 --- a/src/mame/machine/hec2hrp.cpp +++ b/src/mame/machine/hec2hrp.cpp @@ -529,6 +529,47 @@ void hec2hrp_state::mx80_io_port_w(offs_t offset, uint8_t data) m_hector_flag_80c = true; } +void hec2hrp_state::video_start() +{ + save_item(NAME(m_has_disc2)); + save_item(NAME(m_has_minidisc)); + save_item(NAME(m_is_hr)); + save_item(NAME(m_is_extended)); + save_item(NAME(m_hector_flag_hr)); + save_item(NAME(m_hector_flag_80c)); + save_item(NAME(m_hector_color)); + save_item(NAME(m_hector_disc2_data_r_ready)); + save_item(NAME(m_hector_disc2_data_w_ready)); + save_item(NAME(m_hector_disc2_data_read)); + save_item(NAME(m_hector_disc2_data_write)); + save_item(NAME(m_hector_disc2_rnmi)); + save_item(NAME(m_state3000)); + save_item(NAME(m_write_cassette)); + save_item(NAME(m_ck_signal)); + save_item(NAME(m_flag_clk)); + save_item(NAME(m_pin_value)); + save_item(NAME(m_au)); + save_item(NAME(m_val_mixer)); + save_item(NAME(m_oldstate3000)); + save_item(NAME(m_oldstate1000)); + save_item(NAME(m_pot0)); + save_item(NAME(m_pot1)); + save_item(NAME(m_actions)); + save_item(NAME(m_hector_port_a)); + save_item(NAME(m_hector_port_b)); + save_item(NAME(m_hector_port_c_h)); + save_item(NAME(m_hector_port_c_l)); + save_item(NAME(m_hector_port_cmd)); + save_item(NAME(m_cassette_bit)); + save_item(NAME(m_cassette_bit_mem)); + save_item(NAME(m_data_k7)); + save_item(NAME(m_counter_write)); + save_item(NAME(m_irq_current_state)); + save_item(NAME(m_nmi_current_state)); + save_item(NAME(m_hector_videoram_hrx)); +} + + /******************************************************************************** sound management ********************************************************************************/ -- cgit v1.2.3 From 4d09f86740afc5bea094686c7a424ab3304a1d3a Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 31 Jul 2020 10:51:44 +0200 Subject: odyssey2/chess: add notes --- hash/odyssey2.xml | 2 +- src/devices/bus/odyssey2/chess.cpp | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index 20d9aa3ffc8..975e46f2e3a 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -524,7 +524,7 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. Chess (Euro) - 198? + 1982 Philips diff --git a/src/devices/bus/odyssey2/chess.cpp b/src/devices/bus/odyssey2/chess.cpp index 44890a394ce..e8226a4d3be 100644 --- a/src/devices/bus/odyssey2/chess.cpp +++ b/src/devices/bus/odyssey2/chess.cpp @@ -1,15 +1,21 @@ // license:BSD-3-Clause // copyright-holders:Fabio Priuli -/*********************************************************************************************************** +/****************************************************************************** +Videopac C7010 Chess Module emulation +The chess engine is "Gambiet", written by Wim Rens - Videopac Chess Module emulation +Hardware notes: +- NSC800 (Z80-compatible) @ 4.43MHz +- 8KB ROM, 2KB RAM - TODO: - - this code is just a stub... hence, almost everything is still to do! +Service manual with schematics is available. - ***********************************************************************************************************/ +TODO: +- this code is just a stub... hence, almost everything is still to do! + most importantly, missing 8KB ROM dump +******************************************************************************/ #include "emu.h" #include "chess.h" @@ -47,7 +53,7 @@ void o2_chess_device::chess_io(address_map &map) void o2_chess_device::device_add_mconfig(machine_config &config) { - NSC800(config, m_cpu, XTAL(4'000'000)); + NSC800(config, m_cpu, 4.433619_MHz_XTAL); m_cpu->set_addrmap(AS_PROGRAM, &o2_chess_device::chess_mem); m_cpu->set_addrmap(AS_IO, &o2_chess_device::chess_io); } -- cgit v1.2.3 From 525d7982f98329f9dd75356f43e73d49e4610b0a Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Fri, 31 Jul 2020 14:39:23 +0200 Subject: Jolly Joker (40bet) improvements: [Roberto Fresca] - Removed the 'Croatian hack' description because it's only a simple text hack for commercial purposes. - Splitted the second program to a new set since it's handled through a PLD, so isn't user selectable. - Changed descriptions to 'higher' and 'lower' paytable, since they have different ones. New working clones ------------------ Jolly Joker (40bet, lower paytable) [Roberto Fresca] --- src/mame/drivers/funworld.cpp | 290 +++++++++++++++++++++++++----------------- src/mame/mame.lst | 3 +- 2 files changed, 173 insertions(+), 120 deletions(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index 4839f2ae0fb..d3eae1b518f 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -5,9 +5,10 @@ Fun World / TAB / Impera Series 7000 hardware. - 65C02/65SC02 + 2x PIAs + M6845 CRTC + AY8910 + 65C02/65SC02 + 2x 6821 PIAs + 6845 CRTC + AY-3-8910. + From raw, to different ways of encryption. Even through custom CPUs. - Also from Amatic, CMC, Dino4 encrypted, and Leopard 4. + Also from Amatic, CMC, Dino4 (encrypted), and Leopard 4. Driver by Roberto Fresca. Based on a preliminary work of Curt Coder & Peter Trauner. @@ -86,7 +87,8 @@ * Jolly Joker (Solid State module in suicide board). Impera, 199?. * Jolly Joker (98bet, set 1). Impera, 199?. * Jolly Joker (98bet, set 2). Impera, 199?. - * Jolly Joker (40bet, croatian hack), Impera, 199?. + * Jolly Joker (40bet, higher paytable), Impera, 1985. + * Jolly Joker (40bet, lower paytable), Impera, 1985. * Jolly Joker (Apple Time), Apple Time, 199?. * Multi Win (Ver.0167, encrypted), Fun World, 1992. * Power Card (Ver 0263, encrypted), Fun World, 1993. @@ -116,11 +118,12 @@ * Joker Card / Multi Card (Epoxy brick CPU), Fun World, 1991. * Gratis Poker (V.204, Set 1), Mega Soft, 1995. * Gratis Poker (V.204, Set 2), Mega Soft, 1995. + * Nkoulit (Gullit) (encrypted GFX), JK Amusement, 1995. * Royal Card (stealth with NES multigame), bootleg, 1991. * Royal Card (stealth with MSX multigame), bootleg, 1991. - Supported games: 101 + Supported games: 103 ***************************************************************************************** @@ -361,6 +364,8 @@ * Joker Card 300 (Ver.A267BC, encrypted). * Multi Win (Fun World) + * Power Card (Fun World) + * Mega Card (Fun World) These sets seems to run in the same modified hardware. They are highly encrypted. @@ -6093,26 +6098,72 @@ ROM_END /* - Jolly Joker (40bet, croatian hack) + Jolly Joker (40bet) - am27s29_ic40.bin 1ST AND 2ND HALF IDENTICAL - ic25.bin 1ST AND 2ND HALF IDENTICAL - ic26.bin 1ST AND 2ND HALF IDENTICAL + am27s29_ic40.bin 1ST AND 2ND HALF IDENTICAL + ic25.bin 1ST AND 2ND HALF IDENTICAL + ic26.bin 1ST AND 2ND HALF IDENTICAL - These graphics ROMs have enough data to fix the bitrotten graphics from the other Jolly Joker sets. - impera1.bin ---> bits 7 & 6 - impera2.bin ---> bits 7 & 0 + These graphics ROMs have enough data to fix the bitrotten graphics from the other Jolly Joker sets. + impera1.bin ---> bits 7 & 6 + impera2.bin ---> bits 7 & 0 - Two slightly different programs. One in each half. - Both have Min Bet (5), Max Bet (40). - Surely selectable through a PLD. + Two slightly different programs. One in each half. + Both have Min Bet (5), Max Bet (40). + Surely selectable through a PLD. + + This is clearly the paytable. Here the differences... + + offset: C9CF C9D0 C9D1 C9D2 C9D3 C9D4 C9D5 C9D6 C9D7 C9D8 C9D9 C9DA C9DB C9DC C9DD C9DE C9DF C9E0 C9E1 C9E2 + program #1 0x01 0x00 0x02 0x00 0x03 0x00 0x05 0x00 0x07 0x00 0x10 0x00 0x40 0x00 0x00 0x01 0x00 0x05 0x00 0x11 + program #2 0x01 0x00 0x02 0x00 0x03 0x00 0x05 0x00 0x07 0x00 0x10 0x00 0x40 0x00 0x00 0x01 0x50 0x02 0x00 0x03 + ^^^^ ^^^^ ^^^^ + + offset: C9E3 C9E4 C9E5 C9E6 C9E7 C9E8 C9E9 C9EA C9EB C9EC C9ED C9EE C9EF C9F0 C9F1 C9F2 C9F3 C9F4 C9F5 C9F6 + program #1 0x01 0x00 0x02 0x00 0x03 0x00 0x05 0x00 0x07 0x00 0x10 0x00 0x40 0x00 0x00 0x01 0x00 0x05 0x00 0x11 + program #2 0x01 0x00 0x02 0x00 0x03 0x00 0x05 0x00 0x07 0x00 0x10 0x00 0x40 0x00 0x00 0x01 0x50 0x02 0x00 0x03 + ^^^^ ^^^^ ^^^^ + This change the paytable to the following values: + + Program #1 Program #2 + + Five of a Kind 1100 Five of a Kind 300 + Royak Flush 500 Royak Flush 250 + Street Flush 100 Street Flush 100 + Poker 40 Poker 40 + Full House 10 Full House 10 + Farbe 7 Farbe 7 + Strasse 5 Strasse 5 + Drilling 3 Drilling 3 + 2 Paare 2 2 Paare 2 + Hohes Paar 1 Hohes Paar 1 + + Will split in two different sets, since these programs were made to use as different + game variations, and aren't user selectable. */ -ROM_START( jolyjokrb ) - ROM_REGION( 0x10000, "maincpu", 0 ) // Two slightly different programs. Using the 1st one... - ROM_LOAD( "unbekannt.bin", 0x8000, 0x8000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) // 1st prg +ROM_START( jolyjokrb1 ) + ROM_REGION( 0x10000, "maincpu", 0 ) // Two different paytable programs. Using the 1st one (higher paytable) + ROM_LOAD( "unbekannt.bin", 0x8000, 0x8000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) ROM_IGNORE( 0x8000 ) // Using the 1st program. Discarding 2nd half -// ROM_LOAD( "unbekannt.bin", 0x0000, 0x10000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) // 2nd prg + + ROM_REGION( 0x10000, "gfx1", 0 ) + ROM_LOAD( "ic26.bin", 0x0000, 0x8000, CRC(3e45dfc6) SHA1(8fd0b0cc00cdd96244ae7e7a91f6613b1c144ee0) ) + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half + ROM_LOAD( "ic25.bin", 0x8000, 0x8000, CRC(1bd067af) SHA1(9436fe085ba63c00a12ea80903470a84535e3dc1) ) + ROM_IGNORE( 0x8000 ) // Identical halves. Discarding 2nd half + + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "jolyjokrb_nvram.bin", 0x0000, 0x0800, CRC(17007bb5) SHA1(72e08096293ce4fbde205a63b5ecd9641dbee017) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "am27s29_ic40.bin", 0x0000, 0x0200, CRC(0b671bba) SHA1(92d512e02b50f98b7bc5a60deee4fee722656c4f) ) +ROM_END + +ROM_START( jolyjokrb2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) // Two different paytable programs. Using the 2nd one (lower paytable) + ROM_LOAD( "unbekannt.bin", 0x8000, 0x8000, CRC(327fa3d7) SHA1(2435aada2377b2f8f01d059a7aba9bc7a8993537) ) + ROM_CONTINUE( 0x8000, 0x8000) // overlapping with the 2nd program. ROM_REGION( 0x10000, "gfx1", 0 ) ROM_LOAD( "ic26.bin", 0x0000, 0x8000, CRC(3e45dfc6) SHA1(8fd0b0cc00cdd96244ae7e7a91f6613b1c144ee0) ) @@ -8102,135 +8153,136 @@ void funworld_state::init_impera16() * Game Drivers * **********************************************/ -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT // Jolly Card based... -GAMEL( 1985, jollycrd, 0, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (German, set 1)", 0, layout_jollycrd ) -GAMEL( 1985, jollycrda, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (German, set 2)", 0, layout_jollycrd ) -GAMEL( 1985, jolyc3x3, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (3x3 deal)", 0, layout_jollycrd ) -GAMEL( 1993, jolycmzs, jollycrd, cuoreuno, jolyc980, funworld_state, empty_init, ROT0, "MZS Tech", "Jolly Card Professional 2.0 (MZS Tech)", 0, layout_jollycrd ) -GAMEL( 2000, jolyc980, jollycrd, cuoreuno, jolyc980, funworld_state, empty_init, ROT0, "Spale Soft", "Jolly Card Professional 2.0 (Spale Soft)", 0, layout_jollycrd ) -GAMEL( 1998, jolycdev, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria / Evona Electronic", "Jolly Card (Evona Electronic)", 0, layout_jollycrd ) -GAMEL( 1985, jolyccra, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (Croatian, set 1)", 0, layout_jollycrd ) -GAMEL( 1993, jolyccrb, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "Soft Design", "Jolly Card (Croatian, set 2)", 0, layout_jollycrd ) -GAMEL( 1985, sjcd2kx3, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "M.P.", "Super Joly 2000 - 3x", 0, layout_jollycrd ) -GAMEL( 1986, jolycdab, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Inter Games", "Jolly Card (German, Fun World, bootleg)", 0, layout_jollycrd ) -GAMEL( 1992, jolycdsp, jollycrd, cuoreuno, jolycdit, funworld_state, init_ctunk, ROT0, "TAB Austria", "Jolly Card (Spanish, blue TAB board, encrypted)", 0, layout_royalcrd ) -GAMEL( 1990, jolycdid, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, different colors, set 1)", 0, layout_jollycrd ) // italian, CPLD, different colors. -GAMEL( 1990, jolycdie, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, different colors, set 2)", 0, layout_jollycrd ) // not from TAB blue PCB. -GAMEL( 1990, jolycdif, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 1)", 0, layout_jollycrd ) // italian, CPLD. doesn't need nvram init. -GAMEL( 1993, jolycdig, jollycrd, cuoreuno, jolycdib, funworld_state, init_jolycdig, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 2)", 0, layout_jollycrd ) // italian, CPLD. needs nvram. -GAMEL( 1990, jolycdih, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 3)", 0, layout_jollycrd ) +GAMEL( 1985, jollycrd, 0, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (German, set 1)", 0, layout_jollycrd ) +GAMEL( 1985, jollycrda, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (German, set 2)", 0, layout_jollycrd ) +GAMEL( 1985, jolyc3x3, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (3x3 deal)", 0, layout_jollycrd ) +GAMEL( 1993, jolycmzs, jollycrd, cuoreuno, jolyc980, funworld_state, empty_init, ROT0, "MZS Tech", "Jolly Card Professional 2.0 (MZS Tech)", 0, layout_jollycrd ) +GAMEL( 2000, jolyc980, jollycrd, cuoreuno, jolyc980, funworld_state, empty_init, ROT0, "Spale Soft", "Jolly Card Professional 2.0 (Spale Soft)", 0, layout_jollycrd ) +GAMEL( 1998, jolycdev, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "TAB Austria / Evona Electronic", "Jolly Card (Evona Electronic)", 0, layout_jollycrd ) +GAMEL( 1985, jolyccra, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "TAB Austria", "Jolly Card (Croatian, set 1)", 0, layout_jollycrd ) +GAMEL( 1993, jolyccrb, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "Soft Design", "Jolly Card (Croatian, set 2)", 0, layout_jollycrd ) +GAMEL( 1985, sjcd2kx3, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "M.P.", "Super Joly 2000 - 3x", 0, layout_jollycrd ) +GAMEL( 1986, jolycdab, jollycrd, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Inter Games", "Jolly Card (German, Fun World, bootleg)", 0, layout_jollycrd ) +GAMEL( 1992, jolycdsp, jollycrd, cuoreuno, jolycdit, funworld_state, init_ctunk, ROT0, "TAB Austria", "Jolly Card (Spanish, blue TAB board, encrypted)", 0, layout_royalcrd ) +GAMEL( 1990, jolycdid, jollycrd, cuoreuno, jolycdcr, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, different colors, set 1)", 0, layout_jollycrd ) // italian, CPLD, different colors. +GAMEL( 1990, jolycdie, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, different colors, set 2)", 0, layout_jollycrd ) // not from TAB blue PCB. +GAMEL( 1990, jolycdif, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 1)", 0, layout_jollycrd ) // italian, CPLD. doesn't need nvram init. +GAMEL( 1993, jolycdig, jollycrd, cuoreuno, jolycdib, funworld_state, init_jolycdig, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 2)", 0, layout_jollycrd ) // italian, CPLD. needs nvram. +GAMEL( 1990, jolycdih, jollycrd, cuoreuno, jolycdib, funworld_state, empty_init, ROT0, "bootleg", "Jolly Card (Italian, bootleg, set 3)", 0, layout_jollycrd ) // Bonus Card based... -GAMEL( 1986, bonuscrd, 0, fw2ndpal, bonuscrd, funworld_state, empty_init, ROT0, "Fun World", "Bonus Card (German)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) // use fw1stpal machine for green background -GAMEL( 1986, bonuscrda, bonuscrd, fw2ndpal, bonuscrd, funworld_state, empty_init, ROT0, "Fun World", "Bonus Card (German, ATG Electronic hack)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) // use fw1stpal machine for green background -GAMEL( 1986, bigdeal, bonuscrd, fw2ndpal, bigdeal, funworld_state, empty_init, ROT0, "Fun World", "Big Deal (Hungarian, set 1)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) -GAMEL( 1986, bigdealb, bonuscrd, fw2ndpal, bigdeal, funworld_state, empty_init, ROT0, "Fun World", "Big Deal (Hungarian, set 2)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) +GAMEL( 1986, bonuscrd, 0, fw2ndpal, bonuscrd, funworld_state, empty_init, ROT0, "Fun World", "Bonus Card (German)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) // use fw1stpal machine for green background +GAMEL( 1986, bonuscrda, bonuscrd, fw2ndpal, bonuscrd, funworld_state, empty_init, ROT0, "Fun World", "Bonus Card (German, ATG Electronic hack)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) // use fw1stpal machine for green background +GAMEL( 1986, bigdeal, bonuscrd, fw2ndpal, bigdeal, funworld_state, empty_init, ROT0, "Fun World", "Big Deal (Hungarian, set 1)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) +GAMEL( 1986, bigdealb, bonuscrd, fw2ndpal, bigdeal, funworld_state, empty_init, ROT0, "Fun World", "Big Deal (Hungarian, set 2)", MACHINE_IMPERFECT_COLORS, layout_bonuscrd ) // CMC Italian jamma PCB's... -GAMEL( 1996, cuoreuno, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Cuore 1 (Italian)", 0, layout_jollycrd ) -GAMEL( 1997, elephfam, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Elephant Family (Italian, new)", 0, layout_jollycrd ) -GAMEL( 1996, elephfmb, elephfam, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Elephant Family (Italian, old)", 0, layout_jollycrd ) -GAMEL( 1996, pool10, 0, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 1)", 0, layout_jollycrd ) -GAMEL( 1996, pool10b, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 2)", 0, layout_jollycrd ) -GAMEL( 1996, pool10c, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 3)", 0, layout_jollycrd ) -GAMEL( 1997, pool10d, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 4)", 0, layout_jollycrd ) -GAMEL( 1997, pool10f, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 5)", 0, layout_jollycrd ) -GAMEL( 1996, pool10g, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 6)", 0, layout_jollycrd ) -GAMEL( 1996, pool10h, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 7)", 0, layout_jollycrd ) -GAMEL( 1997, pool10i, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 8)", 0, layout_jollycrd ) -GAMEL( 1996, pool10j, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "bootleg (R.B.)", "Pool 10 (Italian, set 9)", 0, layout_jollycrd ) -GAMEL( 1998, biliard, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "bootleg", "New Biliard 98 (Pool 10 hack)", 0, layout_jollycrd ) -GAMEL( 2001, royal, pool10, royalcd1, royal, funworld_state, empty_init, ROT0, "", "Royal (Pool 10 hack)", 0, layout_jollycrd ) -GAMEL( 1997, tortufam, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Tortuga Family (Italian)", 0, layout_jollycrd ) -GAMEL( 1996, potgame, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pot Game (Italian)", 0, layout_jollycrd ) -GAMEL( 1996, bottle10, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 1)", 0, layout_jollycrd ) -GAMEL( 1996, bottl10b, bottle10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 2)", 0, layout_jollycrd ) -GAMEL( 1998, lunapark, 0, lunapark, lunapark, lunapark_state, empty_init, ROT0, "", "Luna Park (set 1, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000). -GAMEL( 1998, lunaparkb, lunapark, lunapark, lunapark, lunapark_state, empty_init, ROT0, "", "Luna Park (set 2, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000). -GAMEL( 1998, lunaparkc, lunapark, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "", "Luna Park (set 3)", 0, layout_jollycrd ) // regular video RAM 6000/7000. -GAMEL( 1998, crystal, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "J.C.D. srl", "Crystal Colours (CMC hardware)", 0, layout_jollycrd ) +GAMEL( 1996, cuoreuno, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Cuore 1 (Italian)", 0, layout_jollycrd ) +GAMEL( 1997, elephfam, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Elephant Family (Italian, new)", 0, layout_jollycrd ) +GAMEL( 1996, elephfmb, elephfam, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Elephant Family (Italian, old)", 0, layout_jollycrd ) +GAMEL( 1996, pool10, 0, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 1)", 0, layout_jollycrd ) +GAMEL( 1996, pool10b, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 2)", 0, layout_jollycrd ) +GAMEL( 1996, pool10c, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 3)", 0, layout_jollycrd ) +GAMEL( 1997, pool10d, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 4)", 0, layout_jollycrd ) +GAMEL( 1997, pool10f, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 5)", 0, layout_jollycrd ) +GAMEL( 1996, pool10g, pool10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 6)", 0, layout_jollycrd ) +GAMEL( 1996, pool10h, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 7)", 0, layout_jollycrd ) +GAMEL( 1997, pool10i, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "C.M.C.", "Pool 10 (Italian, set 8)", 0, layout_jollycrd ) +GAMEL( 1996, pool10j, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "bootleg (R.B.)", "Pool 10 (Italian, set 9)", 0, layout_jollycrd ) +GAMEL( 1998, biliard, pool10, cuoreuno, pool10, funworld_state, empty_init, ROT0, "bootleg", "New Biliard 98 (Pool 10 hack)", 0, layout_jollycrd ) +GAMEL( 2001, royal, pool10, royalcd1, royal, funworld_state, empty_init, ROT0, "", "Royal (Pool 10 hack)", 0, layout_jollycrd ) +GAMEL( 1997, tortufam, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Tortuga Family (Italian)", 0, layout_jollycrd ) +GAMEL( 1996, potgame, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Pot Game (Italian)", 0, layout_jollycrd ) +GAMEL( 1996, bottle10, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 1)", 0, layout_jollycrd ) +GAMEL( 1996, bottl10b, bottle10, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "C.M.C.", "Bottle 10 (Italian, set 2)", 0, layout_jollycrd ) +GAMEL( 1998, lunapark, 0, lunapark, lunapark, lunapark_state, empty_init, ROT0, "", "Luna Park (set 1, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000). +GAMEL( 1998, lunaparkb, lunapark, lunapark, lunapark, lunapark_state, empty_init, ROT0, "", "Luna Park (set 2, dual program)", 0, layout_jollycrd ) // mirrored video RAM (4000/5000 to 6000/7000). +GAMEL( 1998, lunaparkc, lunapark, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "", "Luna Park (set 3)", 0, layout_jollycrd ) // regular video RAM 6000/7000. +GAMEL( 1998, crystal, 0, cuoreuno, cuoreuno, funworld_state, empty_init, ROT0, "J.C.D. srl", "Crystal Colours (CMC hardware)", 0, layout_jollycrd ) // Royal Card based... -GAMEL( 1991, royalcrd, 0, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 1)", 0, layout_jollycrd ) -GAMEL( 1991, royalcrda, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 2)", 0, layout_jollycrd ) -GAMEL( 1991, royalcrdb, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German/Polish, set 3)", 0, layout_jollycrd ) -GAMEL( 1991, royalcrdc, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 4)", 0, layout_jollycrd ) -GAMEL( 1991, royalcrdd, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 5)", 0, layout_royalcrd ) -GAMEL( 1991, royalcrde, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 6)", 0, layout_jollycrd ) -GAMEL( 1991, royalcrdt, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (TAB original)", 0, layout_jollycrd ) -GAMEL( 1990, royalcrdg, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (German, set 7, CMC C1030 HW)", 0, layout_jollycrd ) // big CPLD -GAMEL( 1991, royalcrdh, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 8)", 0, layout_jollycrd ) -GAMEL( 1991, royalcdfr, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (French)", 0, layout_jollycrd ) -GAME( 1993, royalcrdp, royalcrd, cuoreuno, royalcrd, funworld_state, empty_init, ROT0, "Digital Dreams", "Royal Card v2.0 Professional", 0 ) -GAMEL( 199?, royaljp, royalcrd, royalcd1, royaljp, funworld_state, init_tabblue, ROT0, "TAB / Video Klein","Royal Card / Royal Jackpot (with a third draw)(encrypted)", 0, layout_jollycrd ) -GAMEL( 199?, witchryl, 0, witchryl, witchryl, funworld_state, empty_init, ROT0, "Video Klein", "Witch Royal (Export version 2.1)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrd, 0, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 1)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrda, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 2)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrdb, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German/Polish, set 3)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrdc, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 4)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrdd, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 5)", 0, layout_royalcrd ) +GAMEL( 1991, royalcrde, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 6)", 0, layout_jollycrd ) +GAMEL( 1991, royalcrdt, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (TAB original)", 0, layout_jollycrd ) +GAMEL( 1990, royalcrdg, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (German, set 7, CMC C1030 HW)", 0, layout_jollycrd ) // big CPLD +GAMEL( 1991, royalcrdh, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (German, set 8)", 0, layout_jollycrd ) +GAMEL( 1991, royalcdfr, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Royal Card (French)", 0, layout_jollycrd ) +GAME( 1993, royalcrdp, royalcrd, cuoreuno, royalcrd, funworld_state, empty_init, ROT0, "Digital Dreams", "Royal Card v2.0 Professional", 0 ) +GAMEL( 199?, royaljp, royalcrd, royalcd1, royaljp, funworld_state, init_tabblue, ROT0, "TAB / Video Klein", "Royal Card / Royal Jackpot (with a third draw)(encrypted)", 0, layout_jollycrd ) +GAMEL( 199?, witchryl, 0, witchryl, witchryl, funworld_state, empty_init, ROT0, "Video Klein", "Witch Royal (Export version 2.1)", 0, layout_jollycrd ) // Lucky Lady based... -GAMEL( 1991, lluck3x3, royalcrd, cuoreuno, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Lucky Lady (3x3 deal)", 0, layout_jollycrd ) -GAMEL( 1991, lluck4x1, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Lucky Lady (4x1 aces)", 0, layout_jollycrd ) +GAMEL( 1991, lluck3x3, royalcrd, cuoreuno, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Lucky Lady (3x3 deal)", 0, layout_jollycrd ) +GAMEL( 1991, lluck4x1, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Lucky Lady (4x1 aces)", 0, layout_jollycrd ) // Magic Card 2 based... -GAMEL( 1996, magicrd2, 0, magicrd2, magicrd2, magicrd2_state, empty_init, ROT0, "Impera", "Magic Card II (Bulgarian)", 0, layout_jollycrd ) -GAMEL( 1996, magicrd2a, magicrd2, magicrd2, magicrd2, magicrd2_state, empty_init, ROT0, "Impera", "Magic Card II (Nov, Yugoslavian)", 0, layout_jollycrd ) -GAME( 1996, magicrd2b, magicrd2, magicrd2, magicrd2, magicrd2_state, init_magicd2b, ROT0, "Impera", "Magic Card II (green TAB or Impera board)", 0 ) -GAME( 1996, magicrd2c, magicrd2, magicrd2, magicrd2, magicrd2_state, init_magicd2c, ROT0, "Impera", "Magic Card II (blue TAB board, encrypted)", 0 ) +GAMEL( 1996, magicrd2, 0, magicrd2, magicrd2, magicrd2_state, empty_init, ROT0, "Impera", "Magic Card II (Bulgarian)", 0, layout_jollycrd ) +GAMEL( 1996, magicrd2a, magicrd2, magicrd2, magicrd2, magicrd2_state, empty_init, ROT0, "Impera", "Magic Card II (Nov, Yugoslavian)", 0, layout_jollycrd ) +GAME( 1996, magicrd2b, magicrd2, magicrd2, magicrd2, magicrd2_state, init_magicd2b, ROT0, "Impera", "Magic Card II (green TAB or Impera board)", 0 ) +GAME( 1996, magicrd2c, magicrd2, magicrd2, magicrd2, magicrd2_state, init_magicd2c, ROT0, "Impera", "Magic Card II (blue TAB board, encrypted)", 0 ) // Joker Card based... -GAMEL( 1993, vegasslw, 0, fw2ndpal, vegasslw, funworld_state, empty_init, ROT0, "Fun World", "Royal Vegas Joker Card (slow deal)", 0, layout_jollycrd ) -GAMEL( 1993, vegasfst, vegasslw, fw2ndpal, vegasfst, funworld_state, empty_init, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal)", 0, layout_jollycrd ) -GAMEL( 1993, vegasfte, vegasslw, fw2ndpal, vegasfte, funworld_state, empty_init, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal, English gfx)", 0, layout_jollycrd ) -GAMEL( 1993, vegasmil, vegasslw, fw2ndpal, vegasmil, funworld_state, empty_init, ROT0, "Mile", "Royal Vegas Joker Card (fast deal, Mile)", 0, layout_jollycrd ) +GAMEL( 1993, vegasslw, 0, fw2ndpal, vegasslw, funworld_state, empty_init, ROT0, "Fun World", "Royal Vegas Joker Card (slow deal)", 0, layout_jollycrd ) +GAMEL( 1993, vegasfst, vegasslw, fw2ndpal, vegasfst, funworld_state, empty_init, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal)", 0, layout_jollycrd ) +GAMEL( 1993, vegasfte, vegasslw, fw2ndpal, vegasfte, funworld_state, empty_init, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal, English gfx)", 0, layout_jollycrd ) +GAMEL( 1993, vegasmil, vegasslw, fw2ndpal, vegasmil, funworld_state, empty_init, ROT0, "Mile", "Royal Vegas Joker Card (fast deal, Mile)", 0, layout_jollycrd ) // Jolly Joker based... -GAMEL( 199?, jolyjokr, 0, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (98bet, set 1)", 0, layout_jollycrd ) -GAMEL( 199?, jolyjokra, jolyjokr, fw1stpal, jolyjokra, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (98bet, set 2)", 0, layout_jollycrd ) -GAMEL( 199?, jolyjokrb, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (40bet, Croatian hack)", 0, layout_jollycrd ) -GAMEL( 199?, jolyjokrc, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Apple Time", "Jolly Joker (Apple Time)", MACHINE_NOT_WORKING, layout_jollycrd ) // bad program ROM... -GAMEL( 199?, jolyjokro, jolyjokr, fw2ndpal, funworld, funworld_state, init_impera16, ROT0, "Impera", "Jolly Joker (original program, interleaved GFX, Impera logo)", 0, layout_jollycrd ) -GAMEL( 199?, jolyjokrp, jolyjokr, fw2ndpal, funworld, funworld_state, init_impera16, ROT0, "Impera", "Jolly Joker (original program, interleaved GFX, no logo)", 0, layout_jollycrd ) -GAMEL( 199?, jolyjokrm, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (Solid State module in suicide board)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokr, 0, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (98bet, set 1)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokra, jolyjokr, fw1stpal, jolyjokra, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (98bet, set 2)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokrb1, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (40bet, higher paytable)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokrb2, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (40bet, lower paytable)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokrc, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Apple Time", "Jolly Joker (Apple Time)", MACHINE_NOT_WORKING, layout_jollycrd ) // bad program ROM... +GAMEL( 199?, jolyjokro, jolyjokr, fw2ndpal, funworld, funworld_state, init_impera16, ROT0, "Impera", "Jolly Joker (original program, interleaved GFX, Impera logo)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokrp, jolyjokr, fw2ndpal, funworld, funworld_state, init_impera16, ROT0, "Impera", "Jolly Joker (original program, interleaved GFX, no logo)", 0, layout_jollycrd ) +GAMEL( 199?, jolyjokrm, jolyjokr, fw1stpal, funworld, funworld_state, empty_init, ROT0, "Impera", "Jolly Joker (Solid State module in suicide board)", 0, layout_jollycrd ) // Encrypted games... -GAME( 1992, multiwin, 0, multiwin, funworld, multiwin_state, driver_init, ROT0, "Fun World", "Multi Win (Ver.0167, encrypted)", 0 ) -GAME( 1993, powercrd, 0, powercrd, funworld, powercrd_state, empty_init, ROT0, "Fun World", "Power Card (Ver 0263, encrypted)", 0 ) // clone of Bonus Card. -GAME( 1993, megacard, 0, megacard, funworld, megacard_state, empty_init, ROT0, "Fun World", "Mega Card (Ver.0210, encrypted)", 0 ) -GAME( 1993, jokercrd, 0, jokercrd, funworld, jokercrd_state, empty_init, ROT0, "Amatic Trading", "Joker Card 300 (Ver.A267BC, encrypted)", 0 ) -GAME( 1991, royalcrdf, royalcrd, royalcrdf,royalcrdf, royalcrdf_state,driver_init, ROT0, "Evona Electronic","Royal Card (Evona, Polish, encrypted)", 0 ) -GAME( 198?, saloon, 0, saloon, saloon, funworld_state, init_saloon, ROT0, "", "Saloon (French, encrypted)", 0 ) -GAME( 198?, nevadafw, 0, saloon, saloon, funworld_state, init_saloon, ROT0, "", "Nevada (French, encrypted)", 0 ) +GAME( 1992, multiwin, 0, multiwin, funworld, multiwin_state, driver_init, ROT0, "Fun World", "Multi Win (Ver.0167, encrypted)", 0 ) +GAME( 1993, powercrd, 0, powercrd, funworld, powercrd_state, empty_init, ROT0, "Fun World", "Power Card (Ver 0263, encrypted)", 0 ) // clone of Bonus Card. +GAME( 1993, megacard, 0, megacard, funworld, megacard_state, empty_init, ROT0, "Fun World", "Mega Card (Ver.0210, encrypted)", 0 ) +GAME( 1993, jokercrd, 0, jokercrd, funworld, jokercrd_state, empty_init, ROT0, "Amatic Trading", "Joker Card 300 (Ver.A267BC, encrypted)", 0 ) +GAME( 1991, royalcrdf, royalcrd, royalcrdf,royalcrdf, royalcrdf_state,driver_init, ROT0, "Evona Electronic", "Royal Card (Evona, Polish, encrypted)", 0 ) +GAME( 198?, saloon, 0, saloon, saloon, funworld_state, init_saloon, ROT0, "", "Saloon (French, encrypted)", 0 ) +GAME( 198?, nevadafw, 0, saloon, saloon, funworld_state, init_saloon, ROT0, "", "Nevada (French, encrypted)", 0 ) // Encrypted TAB blue PCB... -GAMEL( 199?, jolycdit, jollycrd, cuoreuno, jolycdit, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, blue TAB board, encrypted)", 0, layout_royalcrd ) -GAMEL( 1990, jolycdib, jollycrd, cuoreuno, jolycdib, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, encrypted bootleg, set 1)", 0, layout_jollycrd ) // not a real TAB blue PCB -GAMEL( 1993, jolycdic, jollycrd, cuoreuno, jolycdic, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, encrypted bootleg, set 2)", 0, layout_jollycrd ) // not a real TAB blue PCB -GAMEL( 1993, jolycdii, jollycrd, cuoreuno, jolycdib, funworld_state, init_tabblue, ROT0, "bootleg (Cleco)", "Jolly Card (Italian, encrypted bootleg, set 3)", 0, layout_jollycrd ) // Cleco bootleg PCB +GAMEL( 199?, jolycdit, jollycrd, cuoreuno, jolycdit, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, blue TAB board, encrypted)", 0, layout_royalcrd ) +GAMEL( 1990, jolycdib, jollycrd, cuoreuno, jolycdib, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, encrypted bootleg, set 1)", 0, layout_jollycrd ) // not a real TAB blue PCB +GAMEL( 1993, jolycdic, jollycrd, cuoreuno, jolycdic, funworld_state, init_tabblue, ROT0, "bootleg", "Jolly Card (Italian, encrypted bootleg, set 2)", 0, layout_jollycrd ) // not a real TAB blue PCB +GAMEL( 1993, jolycdii, jollycrd, cuoreuno, jolycdib, funworld_state, init_tabblue, ROT0, "bootleg (Cleco)", "Jolly Card (Italian, encrypted bootleg, set 3)", 0, layout_jollycrd ) // Cleco bootleg PCB // Dino 4 encrypted hardware... -GAMEL( 1997, pool10e, pool10, cuoreuno, cuoreuno, funworld_state, init_dino4, ROT0, "C.M.C.", "Pool 10 (Italian, Dino 4 hardware, encrypted)", 0, layout_jollycrd ) -GAME( 1998, rcdino4, 0, rcdino4, rcdino4, chinatow_state, init_rcdino4, ROT0, "", "Royal Card (Italian, Dino 4 hardware, encrypted)",0 ) -GAMEL( 1998, chinatow, 0, chinatow, chinatow, chinatow_state, init_rcdinch, ROT0, "", "China Town (Ver 1B, Dino4 HW)", 0, layout_jollycrd ) +GAMEL( 1997, pool10e, pool10, cuoreuno, cuoreuno, funworld_state, init_dino4, ROT0, "C.M.C.", "Pool 10 (Italian, Dino 4 hardware, encrypted)", 0, layout_jollycrd ) +GAME( 1998, rcdino4, 0, rcdino4, rcdino4, chinatow_state, init_rcdino4, ROT0, "", "Royal Card (Italian, Dino 4 hardware, encrypted)",0 ) +GAMEL( 1998, chinatow, 0, chinatow, chinatow, chinatow_state, init_rcdinch, ROT0, "", "China Town (Ver 1B, Dino4 HW)", 0, layout_jollycrd ) // MCU based games... -GAME( 199?, mongolnw, 0, royalcd1, royalcrd, funworld_state, init_mongolnw, ROT0, "", "Mongolfier New (Italian)", MACHINE_UNEMULATED_PROTECTION ) -GAME( 199?, soccernw, 0, royalcd1, royalcrd, funworld_state, init_soccernw, ROT0, "", "Soccer New (Italian)", MACHINE_UNEMULATED_PROTECTION ) +GAME( 199?, mongolnw, 0, royalcd1, royalcrd, funworld_state, init_mongolnw, ROT0, "", "Mongolfier New (Italian)", MACHINE_UNEMULATED_PROTECTION ) +GAME( 199?, soccernw, 0, royalcd1, royalcrd, funworld_state, init_soccernw, ROT0, "", "Soccer New (Italian)", MACHINE_UNEMULATED_PROTECTION ) // Quiz games... -GAME( 199?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German)", 0 ) -GAME( 1990, funquiza, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 12-11-1990)", 0 ) -GAME( 1990, funquizb, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 27-04-1990)", 0 ) +GAME( 199?, funquiz, 0, funquiz, funquiz, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German)", 0 ) +GAME( 1990, funquiza, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 12-11-1990)", 0 ) +GAME( 1990, funquizb, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 27-04-1990)", 0 ) // Other games... -GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic", "Novo Play Multi Card / Club Card", 0, layout_novoplay ) -GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) -GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) -GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) -GAMEL( 1995, nkoulit, 0, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) +GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic", "Novo Play Multi Card / Club Card", 0, layout_novoplay ) +GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) +GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) +GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) +GAMEL( 1995, nkoulit, 0, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) // These are 2-in-1 stealth boards, they can run the Poker game, or, using completely separate hardware on the same PCB, a NES / MSX Multigames! GAMEL( 1991, royalcrd_nes, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (stealth with NES multigame)", MACHINE_NOT_WORKING, layout_jollycrd ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index db63ef9b2a4..9ca0312973e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13877,7 +13877,8 @@ jolycdsp // (c) 1992 TAB-Austria jolycmzs // (c) 1993 MZS Tech jolyjokr // (c) 198? Impera jolyjokra // (c) 198? Impera -jolyjokrb // (c) 198? Impera +jolyjokrb1 // (c) 1985 Impera +jolyjokrb2 // (c) 1985 Impera jolyjokrc // (c) 198? Apple Time jolyjokrm // (c) 198? Impera jolyjokro // (c) 198? Impera -- cgit v1.2.3 From 7c80f66cecc3df67f4c9a03aefa3107bef95cf57 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 31 Jul 2020 10:59:35 -0400 Subject: New machines marked as NOT_WORKING ---------------------------------- CIT-101e Video Terminal [Bitsavers] --- src/emu/xtal.cpp | 6 +++-- src/mame/drivers/cit101.cpp | 66 ++++++++++++++++++++++++++++++++++----------- src/mame/mame.lst | 1 + 3 files changed, 56 insertions(+), 17 deletions(-) diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 885b8b0dfe6..f080fa0e6ed 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -80,6 +80,7 @@ const double XTAL::known_xtals[] = { 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'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 */ @@ -296,7 +297,7 @@ const double XTAL::known_xtals[] = { 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'667'500, /* 21.6675_MHz_XTAL AT&T 610 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 */ @@ -340,7 +341,8 @@ const double XTAL::known_xtals[] = { 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'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 - */ 28'322'000, /* 28.322_MHz_XTAL Saitek RISC 2500, Mephisto Montreux */ 28'375'160, /* 28.37516_MHz_XTAL Amiga PAL systems */ diff --git a/src/mame/drivers/cit101.cpp b/src/mame/drivers/cit101.cpp index 7aa8a514439..b03ff62ba6b 100644 --- a/src/mame/drivers/cit101.cpp +++ b/src/mame/drivers/cit101.cpp @@ -2,7 +2,7 @@ // copyright-holders:AJR /*********************************************************************************************************************************** -Preliminary driver for first-generation C. Itoh video terminals. +Preliminary driver for first-generation C. Itoh/CIE video terminals. CIT-101 (released December 1980) C. Itoh's first terminal, based on DEC VT100. ANSI X3.64 and V52 compatible. @@ -63,7 +63,6 @@ Special SET-UP control codes: #include "machine/cit101_kbd.h" - class cit101_state : public driver_device { public: @@ -76,11 +75,15 @@ public: , m_chargen(*this, "chargen") , m_mainram(*this, "mainram") , m_extraram(*this, "extraram") - { } + { + } void cit101(machine_config &config); + void cit101e(machine_config &config); + protected: virtual void machine_start() override; + private: void draw_line(uint32_t *pixptr, int minx, int maxx, int line, bool last_line, u16 rowaddr, u16 rowattr, u8 scrattr); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -390,29 +393,62 @@ void cit101_state::cit101(machine_config &config) ER2055(config, m_nvr); } +void cit101_state::cit101e(machine_config &config) +{ + cit101(config); + + //m_screen->set_raw(19.6608_MHz_XTAL, 1000, 0, 800, 300, 0, 240); // 65.3 Hz nominal vertical frequency + m_screen->set_raw(27.956_MHz_XTAL, 1476, 0, 1188, 300, 0, 240); // 63.2 Hz nominal vertical frequency +} + // PCB ID: HAV-2P005B / CIT-101 / C. ITOH // CPU: NEC D8085AC // RAM: 12x NEC D416C-2 (16 positions labeled 8116E, including 4 unpopulated ones) // Peripherals: 3x M5L8251AP-5 (2M, 7J, 7K); 2x NEC D8253C-2 (7I, 7L); NEC D8255AC-2 (7N); GI ER-2055 (8P) // Oscillators: 6.144 (XTAL1), 14.976 (XTAL2), 22.464 (XTAL3) -ROM_START( cit101 ) +ROM_START(cit101) ROM_REGION(0x4000, "maincpu", 0) - ROM_LOAD( "ic1_=3g04=_v10a.bin", 0x0000, 0x1000, CRC(5601fcac) SHA1(cad0d0335d133dd43993bc718ff72d12b8445cd1) ) // TMM2732D-45 - ROM_LOAD( "ic2_=3h04=_v10a.bin", 0x1000, 0x1000, CRC(23d263e0) SHA1(586e8185f9804987e0a4081724c060e74769d41d) ) // TMM2732D-45 - ROM_LOAD( "ic3_=3i04=_v10a.bin", 0x2000, 0x1000, CRC(15994b1d) SHA1(6d125db4ef5e1dd4d5a4d2f4d6f6bdf574e5bad8) ) // TMM2732D-45 - ROM_LOAD( "ic4_=3j04=_v10a.bin", 0x3000, 0x0800, CRC(d786995f) SHA1(943b521dcc7abc0662d6e136169b7db480ae1e5c) ) // MB8516 + ROM_LOAD("ic1_=3g04=_v10a.bin", 0x0000, 0x1000, CRC(5601fcac) SHA1(cad0d0335d133dd43993bc718ff72d12b8445cd1)) // TMM2732D-45 + ROM_LOAD("ic2_=3h04=_v10a.bin", 0x1000, 0x1000, CRC(23d263e0) SHA1(586e8185f9804987e0a4081724c060e74769d41d)) // TMM2732D-45 + ROM_LOAD("ic3_=3i04=_v10a.bin", 0x2000, 0x1000, CRC(15994b1d) SHA1(6d125db4ef5e1dd4d5a4d2f4d6f6bdf574e5bad8)) // TMM2732D-45 + ROM_LOAD("ic4_=3j04=_v10a.bin", 0x3000, 0x0800, CRC(d786995f) SHA1(943b521dcc7abc0662d6e136169b7db480ae1e5c)) // MB8516 ROM_RELOAD(0x3800, 0x0800) ROM_REGION(0x1000, "chargen", 0) - ROM_LOAD( "1h =5h 1 02= char rom.bin", 0x0000, 0x1000, CRC(ee0ff889) SHA1(a74ada19d19041b29e1b49aaf57ba7d9d54575e1) ) // TMM2332P + ROM_LOAD("1h =5h 1 02= char rom.bin", 0x0000, 0x1000, CRC(ee0ff889) SHA1(a74ada19d19041b29e1b49aaf57ba7d9d54575e1)) // TMM2332P ROM_REGION(0x180, "proms", 0) - ROM_LOAD( "2i_=3a00=.bin", 0x000, 0x100, NO_DUMP ) // position labeled (MB)7052 - ROM_LOAD( "2f_=6g00=.bin", 0x100, 0x020, NO_DUMP ) // position labeled TBP18S030 - ROM_LOAD( "2e_=7i00=.bin", 0x120, 0x020, NO_DUMP ) // position labeled TBP18S030 - ROM_LOAD( "5d_=4l00=.bin", 0x140, 0x020, NO_DUMP ) // position labeled TBP18S030 - ROM_LOAD( "5g_=7f00=.bin", 0x160, 0x020, NO_DUMP ) // position labeled TBP18S030 + ROM_LOAD("2i_=3a00=.bin", 0x000, 0x100, NO_DUMP) // position labeled (MB)7052 + ROM_LOAD("2f_=6g00=.bin", 0x100, 0x020, NO_DUMP) // position labeled TBP18S030 + ROM_LOAD("2e_=7i00=.bin", 0x120, 0x020, NO_DUMP) // position labeled TBP18S030 + ROM_LOAD("5d_=4l00=.bin", 0x140, 0x020, NO_DUMP) // position labeled TBP18S030 + ROM_LOAD("5g_=7f00=.bin", 0x160, 0x020, NO_DUMP) // position labeled TBP18S030 +ROM_END + +// PCB ID: C.ITOH CIT-101e HBG-2P002 +// CPU: NEC D8085AHC +// RAM: 14x Fujitsu MB8118-12 (16 positions labeled 8118, including 2 unpopulated ones) +// Peripherals: 3x NEC D8251AFC (7M, 7N, 7R); 2x NEC D8253C-2 (7J, 7K); NEC D8255AC-2 (6N); GI ER-2055 (5R) +// Oscillators: 19.6608 (XTAL1), 27.956 (XTAL2), 6.144 (XTAL3) +ROM_START(cit101e) + ROM_REGION(0x5000, "maincpu", 0) + ROM_LOAD("101e_v12c__12.7a", 0x0000, 0x2000, CRC(bc71ad27) SHA1(e61481752e20b115531b76688242691d265853e7)) + ROM_LOAD("101e_v12c__3.7c", 0x2000, 0x1000, CRC(b4c63dd1) SHA1(aff9bd8e79e83c176c882fa3251a1419a283e753)) + ROM_LOAD("101e_v12c__ab.7f", 0x3000, 0x2000, CRC(6d6bc1ee) SHA1(f42596b379bfda0468045d9e3810a1f0990f76f6)) + + ROM_REGION(0x1000, "chargen", 0) + ROM_LOAD("cit-101e_char_gen.3g", 0x0000, 0x1000, CRC(ccf259b4) SHA1(d918f16ce148c813a865280a43a766983673464a)) // position labeled 2732/2332 + + ROM_REGION(0x1c0, "proms", 0) + ROM_LOAD("2c=atr=__.bin", 0x000, 0x100, NO_DUMP) // position labeled MB7052 + ROM_LOAD("6j=adr=00.bin", 0x100, 0x020, NO_DUMP) // position labeled (TBP)18S030 + ROM_LOAD("1n=hs=00.bin", 0x120, 0x020, NO_DUMP) // position labeled (TBP)18S030 + ROM_LOAD("2n=hl=__.bin", 0x140, 0x020, NO_DUMP) // position labeled (TBP)18S030 + ROM_LOAD("1s=vs=__.bin", 0x160, 0x020, NO_DUMP) // position labeled (TBP)18S030 + ROM_LOAD("4s=it1=__.bin", 0x180, 0x020, NO_DUMP) // position labeled (TBP)18S030 + ROM_LOAD("4t=it2=06.bin", 0x1a0, 0x020, NO_DUMP) // position labeled (TBP)18S030 ROM_END -COMP( 1980, cit101, 0, 0, cit101, cit101, cit101_state, empty_init, "C. Itoh Electronics", "CIT-101", MACHINE_NOT_WORKING ) +COMP(1980, cit101, 0, 0, cit101, cit101, cit101_state, empty_init, "C. Itoh Electronics", "CIT-101 Video Terminal", MACHINE_NOT_WORKING) +COMP(1983, cit101e, 0, 0, cit101e, cit101, cit101_state, empty_init, "C. Itoh Electronics", "CIT-101e Video Terminal", MACHINE_NOT_WORKING) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 9ca0312973e..55f5d77a2b6 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -10346,6 +10346,7 @@ wildplt // (c) 1992 Jaleco @source:cit101.cpp cit101 // (c) 1980 C. Itoh +cit101e // (c) 1983 C. Itoh @source:cit101xl.cpp cit101xl // -- cgit v1.2.3 From 4266388e8e3ceaa2f002f1e35155a0e48df2816e Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 1 Aug 2020 03:19:53 +1000 Subject: dct11em: added devices and digital display --- src/mame/drivers/dct11em.cpp | 173 ++++++++++++++++++++++++++++++++++--------- src/mame/layout/dct11em.lay | 60 +++++++++++++++ 2 files changed, 197 insertions(+), 36 deletions(-) create mode 100644 src/mame/layout/dct11em.lay diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 29f03b71d49..8888129d6be 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -1,17 +1,28 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Miodrag Milanovic,Robbbert /*************************************************************************** - DEC DCT11-EM +DEC DCT11-EM (Evaluation Module) - 03/12/2010 Skeleton driver. +2010-12-03 Skeleton driver. + + +TODO: +- user LED +- keyboard (not in manual so have to guess) +- HALT and INT buttons (to HALT and PF input lines) +- DLART device to be emulated +- hookups between DLART, UART and remaining interrupts +- rs232 terminal ****************************************************************************/ #include "emu.h" #include "cpu/t11/t11.h" -#include "emupal.h" -#include "screen.h" +#include "machine/i8251.h" +#include "machine/i8255.h" +#include "machine/clock.h" +#include "dct11em.lh" class dct11em_state : public driver_device @@ -20,77 +31,167 @@ public: dct11em_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_ppi(*this, "ppi") + , m_uart(*this, "uart") + , m_digits(*this, "digit%d", 0U) { } void dct11em(machine_config &config); private: - virtual void machine_reset() override; - virtual void video_start() override; + void machine_reset() override; + void machine_start() override; - void dct11em_mem(address_map &map); + void porta_w(u8); + void portc_w(u8); + u8 portc_r(); + void irq_encoder(u8, bool); - uint32_t screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u8 m_seg_lower; + u8 m_seg_upper; + u8 m_portc; + u16 m_irqs; + + void mem_map(address_map &map); required_device m_maincpu; + required_device m_ppi; + required_device m_uart; + output_finder<12> m_digits; }; -void dct11em_state::dct11em_mem(address_map &map) +void dct11em_state::mem_map(address_map &map) { map.unmap_value_high(); - map(0x0000, 0x0fff).ram(); // RAM - map(0x2000, 0x2fff).ram(); // Optional RAM - map(0xa000, 0xdfff).rom(); // RAM + map(0x0000, 0x0fff).ram(); // 2x 6116 + map(0x1000, 0x1fff).noprw(); // the ram test reads/writes here even though there's no ram + map(0x2000, 0x2fff).ram(); // expansion sockets, 2x 6116 + map(0xa000, 0xdfff).rom(); + map(0xff20, 0xff27).lw8(NAME([this] (offs_t offset, u8 data) { m_ppi->write(offset>>1, data); })); + map(0xff28, 0xff2b).lw8(NAME([this] (offs_t offset, u8 data) { m_uart->write(offset>>1, data); })); + map(0xff60, 0xff67).lr8(NAME([this] (offs_t offset) { return m_ppi->read(offset>>1); })); + map(0xff68, 0xff6b).lr8(NAME([this] (offs_t offset) { return m_uart->read(offset>>1); })); + //map(0xff70, 0xff7f). // DC309 DLART unemulated device - uart to terminal } -/* Input ports */ -static INPUT_PORTS_START( dct11em ) -INPUT_PORTS_END +void dct11em_state::porta_w(u8 data) +{ + m_seg_lower = data; + if (BIT(m_portc, 3)) + m_seg_upper = data; +} +void dct11em_state::portc_w(u8 data) +{ + data &= 15; + m_portc = data; + if (BIT(data, 3)) + { + m_seg_upper = m_seg_lower; + irq_encoder(10, 0); + } + if (data < 6) + { + m_digits[data] = m_seg_lower; + m_digits[data+6] = m_seg_upper; + } + if (data == 10) + output().set_value("led0", 0); + else + if (data == 11) + output().set_value("led0", 1); +} -void dct11em_state::machine_reset() +u8 dct11em_state::portc_r() { + return 0; } -void dct11em_state::video_start() +/* + * interrupts (p. 101) + * + * IRQ CPx Pri Vec Device + * --- --- --- --- ------ + * 15 LLLL 7 140 DLART receiver break + * 11 LHLL 6 100 External interrupt + * 10 LHLH 6 104 Keypad/LED scanning + * 7 HLLL 5 120 8251 receiver + * 6 HLLH 5 124 8251 transmitter + * 3 HHLL 4 060 DLART receiver + * 2 HHLH 4 064 DLART transmitter */ + void dct11em_state::irq_encoder(u8 irq, bool state) { + if (state) + m_irqs |= (1 << irq); + else + m_irqs &= ~(1 << irq); + + int i; + for (i = 15; i > 0; i--) + if (BIT(m_irqs, i)) + break; + + m_maincpu->set_input_line(t11_device::CP3_LINE, BIT(i, 3) ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(t11_device::CP2_LINE, BIT(i, 2) ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(t11_device::CP1_LINE, BIT(i, 1) ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(t11_device::CP0_LINE, BIT(i, 0) ? ASSERT_LINE : CLEAR_LINE); } -uint32_t dct11em_state::screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +void dct11em_state::machine_reset() { - return 0; + m_irqs = 0; } +void dct11em_state::machine_start() +{ + m_digits.resolve(); + save_item(NAME(m_seg_lower)); + save_item(NAME(m_seg_upper)); + save_item(NAME(m_portc)); + save_item(NAME(m_irqs)); +} + + +/* Input ports */ +static INPUT_PORTS_START( dct11em ) +INPUT_PORTS_END void dct11em_state::dct11em(machine_config &config) { /* basic machine hardware */ - T11(config, m_maincpu, 7500000); // 7.5MHz XTAL + T11(config, m_maincpu, 7'500'000); // 7.5MHz XTAL m_maincpu->set_initial_mode(0x1403); /* according to specs */ - m_maincpu->set_addrmap(AS_PROGRAM, &dct11em_state::dct11em_mem); - - /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_size(640, 480); - screen.set_visarea(0, 640-1, 0, 480-1); - screen.set_screen_update(FUNC(dct11em_state::screen_update_dct11em)); - screen.set_palette("palette"); - - PALETTE(config, "palette", palette_device::MONOCHROME); + m_maincpu->set_addrmap(AS_PROGRAM, &dct11em_state::mem_map); + + config.set_default_layout(layout_dct11em); + + I8255(config, m_ppi); + m_ppi->out_pa_callback().set(FUNC(dct11em_state::porta_w)); // segments + // port B - expansion interface + m_ppi->in_pc_callback().set(FUNC(dct11em_state::portc_r)); // keyboard + m_ppi->out_pc_callback().set(FUNC(dct11em_state::portc_w)); // various + + I8251(config, m_uart, 2'457'600 / 8); + // txc and rxc come from DLART pin 34 + + clock_device &inta_clock(CLOCK(config, "inta_clock", 614'400 / 768)); // 800Hz, from DLART pin 25 + inta_clock.signal_handler().set([this] (bool state) { if (state) irq_encoder(10, 1); }); + + //clock_device &dlart_clock(CLOCK(config, "dlart_clock", 7'500'000 / 4)); --> to DLART CLK pin 32 + + //clock_device &uart_clock(CLOCK(config, "uart_clock", 2'457'600 / 8)); --> to UART CLK } /* ROM definition */ ROM_START( dct11em ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) // Highest address line inverted - ROM_LOAD16_BYTE( "23-213e4.bin", 0x8000, 0x2000, CRC(bdd82f39) SHA1(347deeff77596b67eee27a39a9c40075fcf5c10d)) - ROM_LOAD16_BYTE( "23-214e4.bin", 0x8001, 0x2000, CRC(b523dae8) SHA1(cd1a64a2bce9730f7a9177d391663919c7f56073)) + ROM_LOAD16_BYTE( "23-213e4.e53", 0x8000, 0x2000, CRC(bdd82f39) SHA1(347deeff77596b67eee27a39a9c40075fcf5c10d)) + ROM_LOAD16_BYTE( "23-214e4.e45", 0x8001, 0x2000, CRC(b523dae8) SHA1(cd1a64a2bce9730f7a9177d391663919c7f56073)) ROM_COPY("maincpu", 0x8000, 0xc000, 0x2000) ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1983, dct11em, 0, 0, dct11em, dct11em, dct11em_state, empty_init, "Digital Equipment Corporation", "DCT11-EM", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +COMP( 1983, dct11em, 0, 0, dct11em, dct11em, dct11em_state, empty_init, "Digital Equipment Corporation", "DCT11-EM", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/layout/dct11em.lay b/src/mame/layout/dct11em.lay new file mode 100644 index 00000000000..44c10d9acaa --- /dev/null +++ b/src/mame/layout/dct11em.lay @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 1d60ecd16ff93e8f7b354783a25a7334e1e6a81c Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Fri, 31 Jul 2020 22:34:40 +0200 Subject: New working machines -------------------- Reflex Card (English, serial protected) [Roberto Fresca, Ioannis Bampoulas] --- src/mame/drivers/funworld.cpp | 64 +++++++++++++++++++++++++++++++++++-------- src/mame/mame.lst | 1 + 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index d3eae1b518f..373b7bdafa8 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -119,11 +119,12 @@ * Gratis Poker (V.204, Set 1), Mega Soft, 1995. * Gratis Poker (V.204, Set 2), Mega Soft, 1995. * Nkoulit (Gullit) (encrypted GFX), JK Amusement, 1995. + * Reflex Card (English, serial protected), TAB Austria, 1999. * Royal Card (stealth with NES multigame), bootleg, 1991. * Royal Card (stealth with MSX multigame), bootleg, 1991. - Supported games: 103 + Supported games: 104 ***************************************************************************************** @@ -7438,7 +7439,7 @@ ROM_END /* - Γκόyλιτ + Γκούλιτ Nkoúlit Gullit @@ -7461,6 +7462,46 @@ ROM_START( nkoulit ) ROM_END +/* + Reflex Card (English) + Need special NVRAM to boot. + + Without the factory NVRAM, you can generate one. + The attract works, and allow coin up. When you start a game, + a serial number entering screen appears. You must to match + the secret number to continue: + + Serial: 00000000 + Key: FFFFFFFF + + The real serial number isn't shown. Just zeroes as mask. + You must to enter digit by digit using the HOLD buttons, + then turn the machine off, and on. (you can reset in MAME). + + If you entered the correct number, the game continues, + otherwise you'll be stuck forever. + + The code and NVRAM were reversed to find the serial number + and key offsets and the way they are stored, to construct + a working default NVRAM. + +*/ +ROM_START( reflexcrd ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "bonus_2_27c256-1.bin", 0x8000, 0x8000, CRC(8fbcf0b9) SHA1(3a45c09fbec3e4ecce24ac2562a68b453755886f) ) + + ROM_REGION( 0x10000, "gfx1", 0 ) + ROM_LOAD( "27c256-2.bin", 0x0000, 0x8000, CRC(05fe86fc) SHA1(a58ab5d107936f7d462f8f748bb6ac27bd77429b) ) + ROM_LOAD( "27c256-3.bin", 0x8000, 0x8000, CRC(1617ed13) SHA1(312065406ce1d1d7c4ad566e2b13268f7eb524bb) ) + + ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "reflexcrd_nvram.bin", 0x0000, 0x0800, CRC(00004f67) SHA1(4aab0d4fe846592e1cbc8b3c2411ddc1bf79fd95) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) +ROM_END + + /************************** * Driver Initialization * **************************/ @@ -8274,15 +8315,16 @@ GAME( 1990, funquiza, 0, funquiz, funquiza, funworld_state, empty_in GAME( 1990, funquizb, 0, funquiz, funquiza, funworld_state, empty_init, ROT0, "Fun World", "Fun World Quiz (German, 27-04-1990)", 0 ) // Other games... -GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic", "Novo Play Multi Card / Club Card", 0, layout_novoplay ) -GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) -GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) -GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) -GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) -GAMEL( 1995, nkoulit, 0, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) +GAMEL( 1986, novoplay, 0, fw2ndpal, novoplay, funworld_state, empty_init, ROT0, "Admiral/Novomatic", "Novo Play Multi Card / Club Card", 0, layout_novoplay ) +GAME( 1991, intrgmes, 0, intrgmes, intrgmes, intergames_state, empty_init, ROT0, "Inter Games", "Joker Card (Inter Games)", 0 ) +GAMEL( 1985, fw_a7_11, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 1", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1985, fw_a7_11a, fw_a7_11, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A7-11 game 2", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, fw_a0_1, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "unknown Fun World A0-1 game", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empty_init, ROT0, "Fun World", "Joker Card / Multi Card (Epoxy brick CPU)", MACHINE_NOT_WORKING, layout_jollycrd ) +GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) +GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) +GAMEL( 1995, nkoulit, royalcrd, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) +GAMEL( 1999, reflexcrd, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Reflex Card (English, serial protected)", 0, layout_jollycrd ) // These are 2-in-1 stealth boards, they can run the Poker game, or, using completely separate hardware on the same PCB, a NES / MSX Multigames! GAMEL( 1991, royalcrd_nes, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (stealth with NES multigame)", MACHINE_NOT_WORKING, layout_jollycrd ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 55f5d77a2b6..b821ad36db7 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13913,6 +13913,7 @@ biliard // 1998 bootleg. potgame // (c) 1996 C.M.C. powercrd // (c) 1993 Fun World rcdino4 // 1998 unknown +reflexcrd // (c) 1999 TAB-Austria royal // 2001, hack. royalcdfr // (c) 1991 TAB-Austria royalcrd // (c) 1991 TAB-Austria -- cgit v1.2.3 From f49bb92f3ad33a7a4859dd87fc2542e9e4f18ca6 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Fri, 31 Jul 2020 22:39:41 +0200 Subject: New working machines -------------------- Reflex Cards (English, serial protected) [Roberto Fresca, Ioannis Bampoulas] Card"S" Plural... --- src/mame/drivers/funworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index 373b7bdafa8..4bfb6384b99 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -119,7 +119,7 @@ * Gratis Poker (V.204, Set 1), Mega Soft, 1995. * Gratis Poker (V.204, Set 2), Mega Soft, 1995. * Nkoulit (Gullit) (encrypted GFX), JK Amusement, 1995. - * Reflex Card (English, serial protected), TAB Austria, 1999. + * Reflex Cards (English, serial protected), TAB Austria, 1999. * Royal Card (stealth with NES multigame), bootleg, 1991. * Royal Card (stealth with MSX multigame), bootleg, 1991. @@ -7463,7 +7463,7 @@ ROM_END /* - Reflex Card (English) + Reflex Cards (English) Need special NVRAM to boot. Without the factory NVRAM, you can generate one. @@ -8324,7 +8324,7 @@ GAMEL( 1991, jokcrdep, 0, fw_brick_2, fw_brick1, funworld_state, empt GAMEL( 199?, gratispk, 0, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 1)", 0, layout_jollycrd ) GAMEL( 199?, gratispka, gratispk, gratispk, funworld, funworld_state, empty_init, ROT0, "Mega Soft", "Gratis Poker (V.204, Set 2)", 0, layout_jollycrd ) GAMEL( 1995, nkoulit, royalcrd, royalcd1, royalcrd, funworld_state, init_tabblue, ROT0, "JK Amusement", "Nkoulit (Gullit) (encrypted GFX)", 0, layout_jollycrd ) -GAMEL( 1999, reflexcrd, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Reflex Card (English, serial protected)", 0, layout_jollycrd ) +GAMEL( 1999, reflexcrd, royalcrd, royalcd1, royalcrd, funworld_state, empty_init, ROT0, "TAB Austria", "Reflex Cards (English, serial protected)", 0, layout_jollycrd ) // These are 2-in-1 stealth boards, they can run the Poker game, or, using completely separate hardware on the same PCB, a NES / MSX Multigames! GAMEL( 1991, royalcrd_nes, royalcrd, royalcd2, royalcrd, funworld_state, empty_init, ROT0, "bootleg", "Royal Card (stealth with NES multigame)", MACHINE_NOT_WORKING, layout_jollycrd ) -- cgit v1.2.3 From 8d76dc7d0c048e22c6479ec3c829eda1d4b5d42e Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 31 Jul 2020 23:21:57 -0400 Subject: cit101, cit101e: Add dumps and low-level emulation of keyboard MCUs [AJR, Witchy, Bitsavers] --- src/mame/drivers/cit101.cpp | 6 +- src/mame/machine/cit101_kbd.cpp | 469 ++++++++++++++++++++-------------------- src/mame/machine/cit101_kbd.h | 72 +++--- 3 files changed, 288 insertions(+), 259 deletions(-) diff --git a/src/mame/drivers/cit101.cpp b/src/mame/drivers/cit101.cpp index b03ff62ba6b..d5c2468bb97 100644 --- a/src/mame/drivers/cit101.cpp +++ b/src/mame/drivers/cit101.cpp @@ -357,10 +357,10 @@ void cit101_state::cit101(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "uartint").output_handler().set_inputline("maincpu", I8085_RST55_LINE); I8251(config, m_kbduart, 6.144_MHz_XTAL / 2); - m_kbduart->txd_handler().set("keyboard", FUNC(cit101_hle_keyboard_device::write_rxd)); + m_kbduart->txd_handler().set("keyboard", FUNC(cit101_keyboard_device::write_rxd)); m_kbduart->rxrdy_handler().set_inputline("maincpu", I8085_RST65_LINE); - CIT101_HLE_KEYBOARD(config, "keyboard").txd_callback().set("kbduart", FUNC(i8251_device::write_rxd)); + CIT101_KEYBOARD(config, "keyboard").txd_callback().set("kbduart", FUNC(i8251_device::write_rxd)); pit8253_device &pit0(PIT8253(config, "pit0", 0)); pit0.set_clk<0>(6.144_MHz_XTAL / 4); @@ -399,6 +399,8 @@ void cit101_state::cit101e(machine_config &config) //m_screen->set_raw(19.6608_MHz_XTAL, 1000, 0, 800, 300, 0, 240); // 65.3 Hz nominal vertical frequency m_screen->set_raw(27.956_MHz_XTAL, 1476, 0, 1188, 300, 0, 240); // 63.2 Hz nominal vertical frequency + + CIT101E_KEYBOARD(config.replace(), "keyboard").txd_callback().set("kbduart", FUNC(i8251_device::write_rxd)); } diff --git a/src/mame/machine/cit101_kbd.cpp b/src/mame/machine/cit101_kbd.cpp index dedefb7e335..831b6040ba4 100644 --- a/src/mame/machine/cit101_kbd.cpp +++ b/src/mame/machine/cit101_kbd.cpp @@ -8,15 +8,46 @@ a single bidirectional wire at 4800 bits per second. Unlike the VT100 keyboard whose layout it mimics (indicator LEDs included), the CIT-101 keyboard transmits standard ASCII codes for most keys, - and the complexity of decoding these strongly suggests that this - must be done by some sort of MCU. There are also a few special - characters with the 8th bit set, including the numeric keypad, - the cursor keys, the Return key and the all-important no-key code. - - TODO: identify and dump MCU for low-level emulation - TODO: indicator LEDs - TODO: make repeat key do something - TODO: CTRL+G doesn't seem to generate a beep + and a MCU is used to decode the scans, generate clicks and beeps + and handle serial communications. The keyboard also transmits a + few non-ASCII codes with the most significant bit set (and + modifiers encoded in the next two bits): + + 80 (No key pressed) + 82 Set-Up + 83 Return (host may interpret this as CR or CR+LF) + 84 Up + 85 Down + 86 Right + 87 Left + 88 PF1 + 89 PF2 + 8A PF3 + 8B PF4 + 8C , (on numeric keypad) + 8D - (on numeric keypad) + 8E . (on numeric keypad) + 8F Enter (on numeric keypad) + 90 0 (on numeric keypad) + 91 1 (on numeric keypad) + 92 2 (on numeric keypad) + 93 3 (on numeric keypad) + 94 4 (on numeric keypad) + 95 5 (on numeric keypad) + 96 6 (on numeric keypad) + 97 7 (on numeric keypad) + 98 8 (on numeric keypad) + 99 9 (on numeric keypad) + 9A Clr Home + 9B Break + 9C No Scroll + 9D (Keyboard ID: QWERTY layout) + 9E (Keyboard ID: AZERTY layout) + 9F (Invalid key) + + Two types of host commands are processed. Commands with bit 0 + set affect the LEDs (TODO: identify which LEDs are which), and + commands with bit 0 clear are needed to initiate a new scan. **********************************************************************/ @@ -24,277 +55,251 @@ #include "cit101_kbd.h" #include "speaker.h" -#include "machine/keyboard.ipp" - //************************************************************************** -// HLE KEYBOARD DEVICE +// LLE KEYBOARD DEVICE //************************************************************************** -DEFINE_DEVICE_TYPE(CIT101_HLE_KEYBOARD, cit101_hle_keyboard_device, "cit101_hle_kbd", "CIT-101 HLE Keyboard") +DEFINE_DEVICE_TYPE(CIT101_KEYBOARD, cit101_keyboard_device, "cit101_kbd", "CIT-101 Keyboard") +DEFINE_DEVICE_TYPE(CIT101E_KEYBOARD, cit101e_keyboard_device, "cit101e_kbd", "CIT-101e Keyboard") -cit101_hle_keyboard_device::cit101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, CIT101_HLE_KEYBOARD, tag, owner, clock) - , device_matrix_keyboard_interface(mconfig, *this, "KEYS0", "KEYS1", "KEYS2", "KEYS3") - , device_buffered_serial_interface(mconfig, *this) - , m_modifiers(*this, "MODIFIERS") +cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , m_mcu(*this, "mcu") , m_beeper(*this, "beeper") + , m_keys(*this, "KEYS%d", 0U) + , m_kbid(*this, "KBID") + , m_leds(*this, "led%d", 1U) , m_txd_callback(*this) - , m_command{0, 1} + , m_kbid_enabled(false) { } -INPUT_PORTS_START(cit101_hle_keyboard) - PORT_START("MODIFIERS") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_SHIFT_2) PORT_CODE(KEYCODE_LCONTROL) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_SHIFT_1) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CODE(KEYCODE_CAPSLOCK) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Repeat") PORT_CODE(KEYCODE_RCONTROL) - - PORT_START("KEYS0") - PORT_BIT(0x00000003, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("] }") PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\\ |") PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('[') PORT_CHAR('{') PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT(0x00000020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Z") PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) PORT_CODE(KEYCODE_Z) - PORT_BIT(0x00000040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y") PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) PORT_CODE(KEYCODE_Y) - PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("X") PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) PORT_CODE(KEYCODE_X) - PORT_BIT(0x00000100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("W") PORT_CHAR('W') PORT_CHAR('W') PORT_CHAR(0x17) PORT_CODE(KEYCODE_W) - PORT_BIT(0x00000200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("V") PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) PORT_CODE(KEYCODE_V) - PORT_BIT(0x00000400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("U") PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) PORT_CODE(KEYCODE_U) - PORT_BIT(0x00000800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("T") PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) PORT_CODE(KEYCODE_T) - PORT_BIT(0x00001000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("S") PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) PORT_CODE(KEYCODE_S) - PORT_BIT(0x00002000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("R") PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) PORT_CODE(KEYCODE_R) - PORT_BIT(0x00004000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Q") PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) PORT_CODE(KEYCODE_Q) - PORT_BIT(0x00008000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("P") PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) PORT_CODE(KEYCODE_P) - PORT_BIT(0x00010000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("O") PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) PORT_CODE(KEYCODE_O) - PORT_BIT(0x00020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("N") PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) PORT_CODE(KEYCODE_N) - PORT_BIT(0x00040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("M") PORT_CHAR('m') PORT_CHAR('M') PORT_CODE(KEYCODE_M) - PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("L") PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) PORT_CODE(KEYCODE_L) - PORT_BIT(0x00100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("K") PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) PORT_CODE(KEYCODE_K) - PORT_BIT(0x00200000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("J") PORT_CHAR('j') PORT_CHAR('J') PORT_CODE(KEYCODE_J) - PORT_BIT(0x00400000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("I") PORT_CHAR('i') PORT_CHAR('I') PORT_CODE(KEYCODE_I) - PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("H") PORT_CHAR('h') PORT_CHAR('H') PORT_CODE(KEYCODE_H) - PORT_BIT(0x01000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("G (Bell)") PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) PORT_CODE(KEYCODE_G) - PORT_BIT(0x02000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) PORT_CODE(KEYCODE_F) - PORT_BIT(0x04000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) PORT_CODE(KEYCODE_E) - PORT_BIT(0x08000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) PORT_CODE(KEYCODE_D) - PORT_BIT(0x10000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) PORT_CODE(KEYCODE_C) - PORT_BIT(0x20000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) PORT_CODE(KEYCODE_B) - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) PORT_CODE(KEYCODE_A) - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("` ~") PORT_CHAR('`') PORT_CHAR('~') PORT_CHAR(0x1e) PORT_CODE(KEYCODE_TILDE) - - PORT_START("KEYS1") - PORT_BIT(0x00000003, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('=') PORT_CHAR('+') PORT_CODE(KEYCODE_EQUALS) - PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(';') PORT_CHAR(':') PORT_CODE(KEYCODE_COLON) - PORT_BIT(0x00000020, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('9') PORT_CHAR('(') PORT_CODE(KEYCODE_9) - PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('8') PORT_CHAR('*') PORT_CODE(KEYCODE_8) - PORT_BIT(0x00000100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('7') PORT_CHAR('&') PORT_CODE(KEYCODE_7) - PORT_BIT(0x00000200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('6') PORT_CHAR('^') PORT_CODE(KEYCODE_6) - PORT_BIT(0x00000400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('5') PORT_CHAR('%') PORT_CODE(KEYCODE_5) - PORT_BIT(0x00000800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('4') PORT_CHAR('$') PORT_CODE(KEYCODE_4) - PORT_BIT(0x00001000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3 # \xc2\xa3") PORT_CHAR('3') PORT_CHAR('#', 0xa3) PORT_CODE(KEYCODE_3) - PORT_BIT(0x00002000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('2') PORT_CHAR('@') PORT_CODE(KEYCODE_2) - PORT_BIT(0x00004000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('1') PORT_CHAR('!') PORT_CODE(KEYCODE_1) - PORT_BIT(0x00008000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('0') PORT_CHAR(')') PORT_CODE(KEYCODE_0) - PORT_BIT(0x00010000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CHAR('/') PORT_CHAR('?') PORT_CHAR(0x1f) PORT_CODE(KEYCODE_SLASH) - PORT_BIT(0x00020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('.') PORT_CHAR('>') PORT_CODE(KEYCODE_STOP) - PORT_BIT(0x00040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('-') PORT_CHAR('_') PORT_CODE(KEYCODE_MINUS) - PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(',') PORT_CHAR('<') PORT_CODE(KEYCODE_COMMA) - PORT_BIT(0x00f00000, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x01000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR('\'') PORT_CHAR('"') PORT_CODE(KEYCODE_QUOTE) - PORT_BIT(0x7e000000, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(' ') PORT_CODE(KEYCODE_SPACE) - - PORT_START("KEYS2") - PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CHAR(0x7f) PORT_CODE(KEYCODE_DEL) - PORT_BIT(0x0000000e, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(0x1b) PORT_CODE(KEYCODE_ESC) - PORT_BIT(0x001fffe0, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00200000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CHAR(0x0a) PORT_CODE(KEYCODE_RALT) - PORT_BIT(0x00400000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(0x09) PORT_CODE(KEYCODE_TAB) - PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Back Space") PORT_CHAR(0x08) PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT(0xff000000, IP_ACTIVE_HIGH, IPT_UNUSED) - - PORT_START("KEYS3") - PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Key 2") - PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Test Key 1") - PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("No Scroll") PORT_CHAR(UCHAR_MAMEKEY(SCRLOCK)) PORT_CODE(KEYCODE_LALT) - PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Break") PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) PORT_CODE(KEYCODE_END) - PORT_BIT(0x00000020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clr Home") PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CODE(KEYCODE_HOME) - PORT_BIT(0x00000040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_CODE(KEYCODE_9_PAD) - PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CODE(KEYCODE_8_PAD) - PORT_BIT(0x00000100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CODE(KEYCODE_7_PAD) - PORT_BIT(0x00000200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CODE(KEYCODE_6_PAD) - PORT_BIT(0x00000400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) PORT_CODE(KEYCODE_5_PAD) - PORT_BIT(0x00000800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CODE(KEYCODE_4_PAD) - PORT_BIT(0x00001000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CODE(KEYCODE_3_PAD) - PORT_BIT(0x00002000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CODE(KEYCODE_2_PAD) - PORT_BIT(0x00004000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CODE(KEYCODE_1_PAD) - PORT_BIT(0x00008000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CODE(KEYCODE_0_PAD) - PORT_BIT(0x00010000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) PORT_CODE(KEYCODE_ENTER_PAD) - PORT_BIT(0x00020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) PORT_CODE(KEYCODE_DEL_PAD) - PORT_BIT(0x00040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_CODE(KEYCODE_MINUS_PAD) - PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) PORT_CODE(KEYCODE_PLUS_PAD) - PORT_BIT(0x00100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PF4") PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CODE(KEYCODE_F4) - PORT_BIT(0x00200000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PF3") PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CODE(KEYCODE_F3) - PORT_BIT(0x00400000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PF2") PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CODE(KEYCODE_F2) - PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PF1") PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CODE(KEYCODE_F1) - PORT_BIT(0x01000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CODE(KEYCODE_LEFT) - PORT_BIT(0x02000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0x04000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CODE(KEYCODE_DOWN) - PORT_BIT(0x08000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CODE(KEYCODE_UP) - PORT_BIT(0x10000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CHAR(0x0d) PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x20000000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Set-Up") PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CODE(KEYCODE_F5) - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_UNUSED) // actually used for special stop code -INPUT_PORTS_END - -void cit101_hle_keyboard_device::device_add_mconfig(machine_config &config) +cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : cit101_keyboard_device(mconfig, CIT101_KEYBOARD, tag, owner, clock) { - SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 786).add_route(ALL_OUTPUTS, "mono", 0.50); } -ioport_constructor cit101_hle_keyboard_device::device_input_ports() const +cit101e_keyboard_device::cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : cit101_keyboard_device(mconfig, CIT101E_KEYBOARD, tag, owner, clock) { - return INPUT_PORTS_NAME(cit101_hle_keyboard); } -void cit101_hle_keyboard_device::device_resolve_objects() +void cit101_keyboard_device::device_resolve_objects() { m_txd_callback.resolve_safe(); + m_leds.resolve(); } -void cit101_hle_keyboard_device::device_start() +void cit101_keyboard_device::device_start() { - // keyboard USART configured for mode 8Eh - set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1_5); - set_rate(4800); - - save_item(NAME(m_command)); + save_item(NAME(m_kbid_enabled)); } -void cit101_hle_keyboard_device::device_reset() +WRITE_LINE_MEMBER(cit101_keyboard_device::write_rxd) { - stop_processing(); + m_mcu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE); } -void cit101_hle_keyboard_device::tra_callback() + +void cit101_keyboard_device::p2_w(u8 data) { - m_txd_callback(transmit_register_get_data_bit()); + m_txd_callback(!BIT(data, 7)); + m_beeper->set_state(BIT(data, 5)); // Bit 6 also involved? } -WRITE_LINE_MEMBER(cit101_hle_keyboard_device::write_rxd) +void cit101_keyboard_device::leds_w(u8 data) { - rx_w(state); + m_kbid_enabled = !BIT(data, 0); + for (int i = 0; i < 7; i++) + m_leds[i] = !BIT(data, i + 1); } -void cit101_hle_keyboard_device::received_byte(u8 byte) +u8 cit101_keyboard_device::keys_r() { - if (m_command[BIT(byte, 0)] != byte) - { - logerror("Command byte %d = %02X\n", BIT(byte, 0), byte); + u16 strobes = m_mcu->p1_r() | u16(m_mcu->p2_r() & 0x07) << 8; + u8 ret = 0xff; - // probably not correct - if (!BIT(byte, 0)) - m_beeper->set_state(BIT(byte, 2)); + for (int n = 0; n < 11; n++) + if (!BIT(strobes, 10 - n)) + ret &= m_keys[n]->read(); - m_command[BIT(byte, 0)] = byte; - } + if (m_kbid_enabled) + ret &= m_kbid->read(); - start_processing(attotime::from_hz(76800)); // guess + return ret; } -void cit101_hle_keyboard_device::send_key(u8 code) +void cit101_keyboard_device::prog_map(address_map &map) { - transmit_byte(code); + map(0x000, 0x7ff).rom().region("program", 0); } -void cit101_hle_keyboard_device::send_translated(u8 row, u8 column) +void cit101_keyboard_device::ext_map(address_map &map) { - const ioport_value modifiers = m_modifiers->read(); - - logerror("Key row %d column %d\n", row, column); - switch (row) - { - case 0: - if (column < 5) - send_key((BIT(modifiers, 0) ? 0x1f : BIT(modifiers, 1) ? 0x7f : 0x5f) - column); - else if (column < 31) - send_key((BIT(modifiers, 0) ? 0x1f : BIT(modifiers, 1) || BIT(modifiers, 2) ? 0x5f : 0x7f) - column); - else - send_key(BIT(modifiers, 0) ? 0x1e : BIT(modifiers, 1) ? '~' : 0x7f - column); - break; - case 1: - if (BIT(modifiers, 0) && column == 16) - send_key(0x2f - column); - else if (!BIT(modifiers, 1) || column == 31) - send_key((column == 31 && BIT(modifiers, 0) ? 0x1f : 0x3f) - column); - else switch (0x3f - column) - { - case '=': - send_key('+'); - break; - case ';': - send_key(':'); - break; - case '9': - send_key('('); - break; - case '8': - send_key('*'); - break; - case '7': - send_key('&'); - break; - case '6': - send_key('^'); - break; - case '2': - send_key('@'); - break; - case '0': - send_key(')'); - break; - case '-': - send_key('_'); - break; - case '\'': - send_key('"'); - break; - default: - send_key(0x2f ^ column); - break; - } - break; - case 2: - send_key((column == 0) ? 0x7f : 0x1f - column); - break; - case 3: - send_key((0x9f - column) | (BIT(modifiers, 0) ? 0x40 : 0) | (BIT(modifiers, 1) ? 0x20 : 0)); - break; - } + map(0x00, 0x00).mirror(0xff).w(FUNC(cit101_keyboard_device::leds_w)); } -void cit101_hle_keyboard_device::key_make(u8 row, u8 column) + +INPUT_PORTS_START(cit101_keyboard) + PORT_START("SHIFT") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CODE(KEYCODE_CAPSLOCK) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_SHIFT_1) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) + PORT_BIT(0xe7, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("MODIFIERS") + PORT_BIT(1, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Repeat") PORT_CODE(KEYCODE_RCONTROL) + PORT_BIT(2, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_SHIFT_2) PORT_CODE(KEYCODE_LCONTROL) + + PORT_START("KEYS0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF3") PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CODE(KEYCODE_F3) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF4") PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CODE(KEYCODE_F4) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) PORT_CODE(KEYCODE_MINUS_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) PORT_CODE(KEYCODE_PLUS_PAD) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) PORT_CODE(KEYCODE_ENTER_PAD) + + PORT_START("KEYS1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF1") PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CODE(KEYCODE_F1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF2") PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_CODE(KEYCODE_F2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CODE(KEYCODE_2_PAD) + + PORT_START("KEYS2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Clr Home") PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CODE(KEYCODE_HOME) + PORT_BIT(0x3e, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CODE(KEYCODE_0_PAD) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) PORT_CODE(KEYCODE_DEL_PAD) + + PORT_START("KEYS3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("` ~") PORT_CHAR('`') PORT_CHAR('~') PORT_CHAR(0x1e) PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) PORT_CODE(KEYCODE_END) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back Space") PORT_CHAR(0x08) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CHAR(0x0a) PORT_CODE(KEYCODE_RALT) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |") PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) PORT_CODE(KEYCODE_BACKSLASH) + + PORT_START("KEYS4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CODE(KEYCODE_UP) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('-') PORT_CHAR('_') PORT_CODE(KEYCODE_MINUS) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('=') PORT_CHAR('+') PORT_CODE(KEYCODE_EQUALS) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('[') PORT_CHAR('{') PORT_CODE(KEYCODE_OPENBRACE) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) PORT_CODE(KEYCODE_CLOSEBRACE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('\'') PORT_CHAR('"') PORT_CODE(KEYCODE_QUOTE) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CHAR(0x0d) PORT_CODE(KEYCODE_ENTER) + + PORT_START("KEYS5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('9') PORT_CHAR('(') PORT_CODE(KEYCODE_9) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('0') PORT_CHAR(')') PORT_CODE(KEYCODE_0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) PORT_CODE(KEYCODE_O) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) PORT_CODE(KEYCODE_P) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(';') PORT_CHAR(':') PORT_CODE(KEYCODE_COLON) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('.') PORT_CHAR('>') PORT_CODE(KEYCODE_STOP) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CHAR('/') PORT_CHAR('?') PORT_CHAR(0x1f) PORT_CODE(KEYCODE_SLASH) + + PORT_START("KEYS6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('7') PORT_CHAR('&') PORT_CODE(KEYCODE_7) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('8') PORT_CHAR('*') PORT_CODE(KEYCODE_8) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) PORT_CODE(KEYCODE_U) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CHAR('i') PORT_CHAR('I') PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CHAR('j') PORT_CHAR('J') PORT_CODE(KEYCODE_J) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) PORT_CODE(KEYCODE_K) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CHAR('m') PORT_CHAR('M') PORT_CODE(KEYCODE_M) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(',') PORT_CHAR('<') PORT_CODE(KEYCODE_COMMA) + + PORT_START("KEYS7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('5') PORT_CHAR('%') PORT_CODE(KEYCODE_5) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('6') PORT_CHAR('^') PORT_CODE(KEYCODE_6) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) PORT_CODE(KEYCODE_T) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) PORT_CODE(KEYCODE_Y) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G (Bell)") PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) PORT_CODE(KEYCODE_G) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CHAR('h') PORT_CHAR('H') PORT_CODE(KEYCODE_H) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) PORT_CODE(KEYCODE_B) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) PORT_CODE(KEYCODE_N) + + PORT_START("KEYS8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 # \xc2\xa3") PORT_CHAR('3') PORT_CHAR('#', 0xa3) PORT_CODE(KEYCODE_3) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('4') PORT_CHAR('$') PORT_CODE(KEYCODE_4) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) PORT_CODE(KEYCODE_E) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) PORT_CODE(KEYCODE_R) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) PORT_CODE(KEYCODE_D) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) PORT_CODE(KEYCODE_C) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) PORT_CODE(KEYCODE_V) + + PORT_START("KEYS9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('1') PORT_CHAR('!') PORT_CODE(KEYCODE_1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('2') PORT_CHAR('@') PORT_CODE(KEYCODE_2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) PORT_CODE(KEYCODE_Q) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) PORT_CODE(KEYCODE_W) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) PORT_CODE(KEYCODE_A) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) PORT_CODE(KEYCODE_S) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) PORT_CODE(KEYCODE_Z) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) PORT_CODE(KEYCODE_X) + + PORT_START("KEYS10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Set-Up") PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_CODE(KEYCODE_F5) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(0x1b) PORT_CODE(KEYCODE_ESC) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(0x09) PORT_CODE(KEYCODE_TAB) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("No Scroll") PORT_CHAR(UCHAR_MAMEKEY(SCRLOCK)) PORT_CODE(KEYCODE_LALT) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(' ') PORT_CODE(KEYCODE_SPACE) + + PORT_START("KBID") + PORT_CONFNAME(0x01, 0x01, "Keyboard Layout") + PORT_CONFSETTING(0x01, "QWERTY") + PORT_CONFSETTING(0x00, "AZERTY") + PORT_BIT(0xfe, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + +ioport_constructor cit101_keyboard_device::device_input_ports() const { - send_translated(row, column); + return INPUT_PORTS_NAME(cit101_keyboard); } -void cit101_hle_keyboard_device::key_repeat(u8 row, u8 column) +void cit101_keyboard_device::device_add_mconfig(machine_config &config) +{ + I8035(config, m_mcu, 2.376_MHz_XTAL); // TMP8048P in EA mode (location marked "8048/8035/8748" on original keyboard) + m_mcu->set_addrmap(AS_PROGRAM, &cit101_keyboard_device::prog_map); + m_mcu->set_addrmap(AS_IO, &cit101_keyboard_device::ext_map); + m_mcu->bus_in_cb().set(FUNC(cit101_keyboard_device::keys_r)); + m_mcu->p2_in_cb().set_ioport("SHIFT"); + m_mcu->p2_out_cb().set(FUNC(cit101_keyboard_device::p2_w)); + m_mcu->t0_in_cb().set_ioport("MODIFIERS").bit(0); + m_mcu->t1_in_cb().set_ioport("MODIFIERS").bit(1); + + SPEAKER(config, "mono").front_center(); + BEEP(config, m_beeper, 786).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown frequency +} + + +ROM_START(cit101_kbd) + ROM_REGION(0x800, "program", 0) + ROM_LOAD("pkb00.ic4", 0x000, 0x800, CRC(f93f9ce1) SHA1(50fe6b5448f8ec330fa09e8b0125b5b09c680859)) // 1st and 2nd halves identical +ROM_END + +ROM_START(cit101e_kbd) + ROM_REGION(0x1000, "program", 0) + ROM_LOAD("101e-v12b_kbd_rom.ic4", 0x0000, 0x1000, CRC(b9eeac40) SHA1(1bbbe0d422f87c856a10de5a1492297958ff47f6)) // 1st and 2nd halves identical +ROM_END + +const tiny_rom_entry *cit101_keyboard_device::device_rom_region() const { - send_translated(row, column); + return ROM_NAME(cit101_kbd); } -void cit101_hle_keyboard_device::scan_complete() +const tiny_rom_entry *cit101e_keyboard_device::device_rom_region() const { - if (are_all_keys_up()) - { - send_key(0x80); - stop_processing(); - } + return ROM_NAME(cit101e_kbd); } diff --git a/src/mame/machine/cit101_kbd.h b/src/mame/machine/cit101_kbd.h index 1b36653f44a..c116af893ca 100644 --- a/src/mame/machine/cit101_kbd.h +++ b/src/mame/machine/cit101_kbd.h @@ -11,55 +11,77 @@ #pragma once -#include "machine/keyboard.h" +#include "cpu/mcs48/mcs48.h" #include "sound/beep.h" -#include "diserial.h" //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -// ======================> cit101_hle_keyboard_device +// ======================> cit101_keyboard_device -class cit101_hle_keyboard_device : public device_t, public device_matrix_keyboard_interface<4U>, public device_buffered_serial_interface<16U> +class cit101_keyboard_device : public device_t { public: - // construction/destruction - cit101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + // device type constructor + cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); - // configuration + // callback configuration auto txd_callback() { return m_txd_callback.bind(); } + // serial line input DECLARE_WRITE_LINE_MEMBER(write_rxd); protected: - // device_t overrides - virtual void device_add_mconfig(machine_config &config) override; - virtual ioport_constructor device_input_ports() const override; + cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-level overrides virtual void device_resolve_objects() override; virtual void device_start() override; - virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; - // device_buffered_serial_interface overrides - virtual void tra_callback() override; - virtual void received_byte(u8 byte) override; +private: + // MCU handlers + void p2_w(u8 data); + void leds_w(u8 data); + u8 keys_r(); - // device_matrix_keyboard_interface overrides - virtual void key_make(u8 row, u8 column) override; - virtual void key_repeat(u8 row, u8 column) override; - virtual void scan_complete() override; + // address maps + void prog_map(address_map &map); + void ext_map(address_map &map); - void send_translated(u8 row, u8 column); - void send_key(u8 code); -private: - required_ioport m_modifiers; + // object finders + required_device m_mcu; required_device m_beeper; + required_ioport_array<11> m_keys; + required_ioport m_kbid; + output_finder<7> m_leds; + + // output callback devcb_write_line m_txd_callback; - u8 m_command[2]; + + // internal state + bool m_kbid_enabled; +}; + +// ======================> cit101e_keyboard_device + +class cit101e_keyboard_device : public cit101_keyboard_device +{ +public: + // device type constructor + cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + +protected: + // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; }; -// device type definition -DECLARE_DEVICE_TYPE(CIT101_HLE_KEYBOARD, cit101_hle_keyboard_device) +// device type declarations +DECLARE_DEVICE_TYPE(CIT101_KEYBOARD, cit101_keyboard_device) +DECLARE_DEVICE_TYPE(CIT101E_KEYBOARD, cit101e_keyboard_device) #endif -- cgit v1.2.3 From ad545566508c687b3a1aea065fb3190adb8ea18e Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 11:44:18 +0200 Subject: New NOT_WORKING software list additions --------------------------------------- odyssey2: Home Computer Module (Euro) [unknown] --- hash/odyssey2.xml | 36 ++++++++++++++++++++++++++++++------ src/emu/xtal.cpp | 1 + 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index 975e46f2e3a..6ad3ec9995f 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -46,14 +46,17 @@ Fathom (Imagic) NOTE: PAL colours leave a lot to be desired -Chess needs emulation of the C7010 Chess Module, which had a NSC800 CMOS microprocessor, which gave the G7000 extra CPU and memory. -The C7420 Home Computer Module, which contains a Z80 microprocessor running at 3.574 MHz, -adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. +The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM. +The C7420 Home Computer Module, which contains a Z80 microprocessor running at 3.5468 MHz, +adds 16K RAM and 16K ROM, that plugs into the G7000. --> + + + Computer Programmer (Euro) 1980 @@ -80,6 +83,20 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. + + Home Computer Module (Euro) + 1983 + Philips + + + + + + + + + + Newscaster (Euro) 1980 @@ -133,7 +150,10 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. + + + Playschool Maths (Euro) ~ I've Got Your Number (USA) 1980 @@ -263,7 +283,10 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. + + + 4 in 1 Row (Euro) 1982 @@ -523,10 +546,10 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. - Chess (Euro) + Chess Module (Euro) 1982 Philips - + @@ -1794,7 +1817,7 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. - + Death Race (USA) 2014 @@ -1899,4 +1922,5 @@ adds 16K RAM and 18K ROM, that plugs into the G7000 needs to be dumped. + diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index f080fa0e6ed..6ae281e19f9 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -90,6 +90,7 @@ const double XTAL::known_xtals[] = { 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'521'280, /* 3.52128_MHz_XTAL RCA COSMAC VIP */ + 3'546'800, /* 3.5468_MHz_XTAL Atari 400 PAL, Philips G7200 */ 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 */ -- cgit v1.2.3 From 8aae3f87634a42003fdbbecff3f4f391f49cb393 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 12:07:51 +0200 Subject: Machines promoted to working ---------------------------- Chess Challenger [Berger, Mike Watters] --- src/mame/drivers/fidel_cc1.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mame/drivers/fidel_cc1.cpp b/src/mame/drivers/fidel_cc1.cpp index d08b37b116c..c9bdb8d0f3e 100644 --- a/src/mame/drivers/fidel_cc1.cpp +++ b/src/mame/drivers/fidel_cc1.cpp @@ -90,7 +90,7 @@ public: // machine configs void cc1(machine_config &config); void cc3(machine_config &config); - void cc10(machine_config &config); + void cc10c(machine_config &config); protected: virtual void machine_start() override; @@ -106,7 +106,7 @@ private: // address maps void main_map(address_map &map); void main_io(address_map &map); - void cc10_map(address_map &map); + void cc10c_map(address_map &map); // I/O handlers void update_display(); @@ -190,7 +190,7 @@ void cc1_state::main_io(address_map &map) map(0x00, 0x03).mirror(0x04).rw(m_ppi8255, FUNC(i8255_device::read), FUNC(i8255_device::write)); } -void cc1_state::cc10_map(address_map &map) +void cc1_state::cc10c_map(address_map &map) { map.global_mask(0x3fff); map(0x0000, 0x0fff).rom(); @@ -238,7 +238,7 @@ static INPUT_PORTS_START( cc3 ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A) INPUT_PORTS_END -static INPUT_PORTS_START( cc10 ) +static INPUT_PORTS_START( cc10c ) PORT_INCLUDE( cc3 ) PORT_MODIFY("IN.1") @@ -279,12 +279,12 @@ void cc1_state::cc3(machine_config &config) config.set_default_layout(layout_fidel_cc3); } -void cc1_state::cc10(machine_config &config) +void cc1_state::cc10c(machine_config &config) { cc1(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &cc1_state::cc10_map); + m_maincpu->set_addrmap(AS_PROGRAM, &cc1_state::cc10c_map); config.set_default_layout(layout_fidel_cc10c); } @@ -297,7 +297,7 @@ void cc1_state::cc10(machine_config &config) ROM_START( cc1 ) ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD("d2316ac_011", 0x0000, 0x0800, BAD_DUMP CRC(e27f9816) SHA1(ad9881b3bf8341829a27e86de27805fc2ccb5f7d) ) // A4 line was broken + ROM_LOAD("d2316ac_011", 0x0000, 0x0800, CRC(4af38ed6) SHA1(3f07691266196f3aa5c440a40bfe4802303e7c07) ) ROM_END ROM_START( cc3 ) @@ -320,6 +320,6 @@ ROM_END ******************************************************************************/ // YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS -CONS( 1977, cc1, 0, 0, cc1, cc1, cc1_state, empty_init, "Fidelity Electronics", "Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING ) +CONS( 1977, cc1, 0, 0, cc1, cc1, cc1_state, empty_init, "Fidelity Electronics", "Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) CONS( 1977, cc3, 0, 0, cc3, cc3, cc1_state, empty_init, "Fidelity Electronics", "Chess Challenger (upgraded version, 3 levels)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // aka Chess Challenger 3 -CONS( 1979, cc10c, 0, 0, cc10, cc10, cc1_state, empty_init, "Fidelity Electronics", "Chess Challenger (model UCC10, 10 levels)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // aka Chess Challenger 10 C +CONS( 1979, cc10c, 0, 0, cc10c, cc10c, cc1_state, empty_init, "Fidelity Electronics", "Chess Challenger (model UCC10, 10 levels)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // aka Chess Challenger 10 C -- cgit v1.2.3 From 47f2b1b1612fd395bf3e4b6e533c10a119e3292a Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 1 Aug 2020 23:13:13 +1000 Subject: dct11em: machine is now usable --- src/mame/drivers/dct11em.cpp | 156 +++++++++++++++++++++++++++++++++++++------ src/mame/layout/dct11em.lay | 48 +++++++++---- 2 files changed, 170 insertions(+), 34 deletions(-) diff --git a/src/mame/drivers/dct11em.cpp b/src/mame/drivers/dct11em.cpp index 8888129d6be..c273b2b667a 100644 --- a/src/mame/drivers/dct11em.cpp +++ b/src/mame/drivers/dct11em.cpp @@ -6,14 +6,15 @@ DEC DCT11-EM (Evaluation Module) 2010-12-03 Skeleton driver. +System currently works, but with some hacks to replace the unemulated DC319 +DLART (Digital Link Asynchronous Receiver/Transmitter). + TODO: -- user LED -- keyboard (not in manual so have to guess) -- HALT and INT buttons (to HALT and PF input lines) +- user LED (it's there but it doesn't work) - DLART device to be emulated -- hookups between DLART, UART and remaining interrupts -- rs232 terminal +- hookups between DLART (and its DL terminal), UART and remaining interrupts + ****************************************************************************/ @@ -21,7 +22,9 @@ TODO: #include "cpu/t11/t11.h" #include "machine/i8251.h" #include "machine/i8255.h" +#include "bus/rs232/rs232.h" #include "machine/clock.h" +#include "machine/terminal.h" #include "dct11em.lh" @@ -33,10 +36,14 @@ public: , m_maincpu(*this, "maincpu") , m_ppi(*this, "ppi") , m_uart(*this, "uart") + , m_terminal(*this, "terminal") + , m_io_keyboard(*this, "X%u", 0U) , m_digits(*this, "digit%d", 0U) { } void dct11em(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(halt_button); + DECLARE_INPUT_CHANGED_MEMBER(int_button); private: void machine_reset() override; @@ -46,17 +53,24 @@ private: void portc_w(u8); u8 portc_r(); void irq_encoder(u8, bool); + u8 dlart_r(offs_t); + void dlart_w(offs_t, u8); + void kbd_put(u8 data); + u8 m_term_data; u8 m_seg_lower; u8 m_seg_upper; u8 m_portc; u16 m_irqs; + bool m_dlart_maintmode; void mem_map(address_map &map); required_device m_maincpu; required_device m_ppi; required_device m_uart; + required_device m_terminal; + required_ioport_array<5> m_io_keyboard; output_finder<12> m_digits; }; @@ -67,11 +81,54 @@ void dct11em_state::mem_map(address_map &map) map(0x1000, 0x1fff).noprw(); // the ram test reads/writes here even though there's no ram map(0x2000, 0x2fff).ram(); // expansion sockets, 2x 6116 map(0xa000, 0xdfff).rom(); - map(0xff20, 0xff27).lw8(NAME([this] (offs_t offset, u8 data) { m_ppi->write(offset>>1, data); })); - map(0xff28, 0xff2b).lw8(NAME([this] (offs_t offset, u8 data) { m_uart->write(offset>>1, data); })); + map(0xff20, 0xff27).nopr().lw8(NAME([this] (offs_t offset, u8 data) { m_ppi->write(offset>>1, data); })); + map(0xff28, 0xff2b).nopr().lw8(NAME([this] (offs_t offset, u8 data) { m_uart->write(offset>>1, data); })); map(0xff60, 0xff67).lr8(NAME([this] (offs_t offset) { return m_ppi->read(offset>>1); })); map(0xff68, 0xff6b).lr8(NAME([this] (offs_t offset) { return m_uart->read(offset>>1); })); - //map(0xff70, 0xff7f). // DC309 DLART unemulated device - uart to terminal + //map(0xff70, 0xff7f). // DC319 DLART unemulated device - uart to terminal + map(0xff70, 0xff7f).rw(FUNC(dct11em_state::dlart_r), FUNC(dct11em_state::dlart_w)); +} + +// dummy routines to pass the DLART test and to talk to the ascii terminal +u8 dct11em_state::dlart_r(offs_t offset) +{ + offset >>= 1; + switch (offset) + { + case 0: + if (m_term_data) + return 0xff; + else + return 0xfd; + case 1: + { + u8 ret = m_term_data; + irq_encoder(3, 0); // Release IRQ3 + m_term_data = 0; + return ret; + } + default: + return 0xfd; + } +} + +void dct11em_state::dlart_w(offs_t offset, u8 data) +{ + offset >>= 1; + switch (offset) + { + case 3: + if (m_dlart_maintmode) + m_term_data = data; + else + m_terminal->write(data); + break; + case 2: + m_dlart_maintmode = BIT(data, 4); + break; + default: + break; + } } void dct11em_state::porta_w(u8 data) @@ -88,23 +145,22 @@ void dct11em_state::portc_w(u8 data) if (BIT(data, 3)) { m_seg_upper = m_seg_lower; - irq_encoder(10, 0); + irq_encoder(10, 0); // Release IRQ10 } if (data < 6) { m_digits[data] = m_seg_lower; m_digits[data+6] = m_seg_upper; } - if (data == 10) - output().set_value("led0", 0); - else - if (data == 11) - output().set_value("led0", 1); + output().set_value("led0", (data!=9)); } u8 dct11em_state::portc_r() { - return 0; + if (m_portc < 5) + return m_io_keyboard[m_portc]->read(); + else + return 0; } /* @@ -149,13 +205,59 @@ void dct11em_state::machine_start() save_item(NAME(m_seg_upper)); save_item(NAME(m_portc)); save_item(NAME(m_irqs)); + save_item(NAME(m_term_data)); + save_item(NAME(m_dlart_maintmode)); } /* Input ports */ static INPUT_PORTS_START( dct11em ) + PORT_START("X0") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CLR") PORT_CODE(KEYCODE_SPACE) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1/GOLED") PORT_CODE(KEYCODE_1) // Go with LEDs + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4/PROTEC") PORT_CODE(KEYCODE_4) // Release protection + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7/PC") PORT_CODE(KEYCODE_7) + PORT_START("X1") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0/CANCEL") PORT_CODE(KEYCODE_0) // Cancel breakpoints + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2/CONSOL") PORT_CODE(KEYCODE_2) // Start console + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5") PORT_CODE(KEYCODE_5) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8/PS") PORT_CODE(KEYCODE_8) + PORT_START("X2") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EXA/ENTER") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3/BAUD") PORT_CODE(KEYCODE_3) // Set baud rates + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6/SP") PORT_CODE(KEYCODE_6) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9/WP") PORT_CODE(KEYCODE_9) + PORT_START("X3") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ADV") PORT_CODE(KEYCODE_UP) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BAC") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("REG") PORT_CODE(KEYCODE_R) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ADR") PORT_CODE(KEYCODE_MINUS) // Address + PORT_START("X4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("SST") PORT_CODE(KEYCODE_S) // Single-step + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("GO") PORT_CODE(KEYCODE_X) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BPT") PORT_CODE(KEYCODE_B) // Breakpoint + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FNC") PORT_CODE(KEYCODE_LALT) // Function + PORT_START("X5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("HALT") PORT_CODE(KEYCODE_H) PORT_CHANGED_MEMBER(DEVICE_SELF, dct11em_state, halt_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INT") PORT_CODE(KEYCODE_I) PORT_CHANGED_MEMBER(DEVICE_SELF, dct11em_state, int_button, 0) INPUT_PORTS_END +INPUT_CHANGED_MEMBER(dct11em_state::halt_button) +{ + m_maincpu->set_input_line(t11_device::HLT_LINE, newval ? ASSERT_LINE : CLEAR_LINE); +} + +INPUT_CHANGED_MEMBER(dct11em_state::int_button) +{ + m_maincpu->set_input_line(t11_device::PF_LINE, newval ? ASSERT_LINE : CLEAR_LINE); +} + +void dct11em_state::kbd_put(u8 data) +{ + m_term_data = data; + irq_encoder(3, 1); // Assert IRQ3 +} + void dct11em_state::dct11em(machine_config &config) { /* basic machine hardware */ @@ -169,17 +271,31 @@ void dct11em_state::dct11em(machine_config &config) m_ppi->out_pa_callback().set(FUNC(dct11em_state::porta_w)); // segments // port B - expansion interface m_ppi->in_pc_callback().set(FUNC(dct11em_state::portc_r)); // keyboard - m_ppi->out_pc_callback().set(FUNC(dct11em_state::portc_w)); // various + m_ppi->out_pc_callback().set(FUNC(dct11em_state::portc_w)); // digits I8251(config, m_uart, 2'457'600 / 8); - // txc and rxc come from DLART pin 34 + m_uart->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_uart->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); + m_uart->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); + m_uart->rxrdy_handler().set([this] (bool state) { irq_encoder(7, state); }); + m_uart->txrdy_handler().set([this] (bool state) { irq_encoder(6, state); }); clock_device &inta_clock(CLOCK(config, "inta_clock", 614'400 / 768)); // 800Hz, from DLART pin 25 - inta_clock.signal_handler().set([this] (bool state) { if (state) irq_encoder(10, 1); }); + inta_clock.signal_handler().set([this] (bool state) { if (state) irq_encoder(10, 1); }); // Assert IRQ10 + + //clock_device &dlart_clock(CLOCK(config, "dlart_clock", 2'457'600 / 4)); --> to DLART CLK pin 32 + + clock_device &uart_clock(CLOCK(config, "uart_clock", 2'457'600 / 32)); // from DLART pin 34 + uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); + uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); - //clock_device &dlart_clock(CLOCK(config, "dlart_clock", 7'500'000 / 4)); --> to DLART CLK pin 32 + rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); // connection to host mainframe, does nothing for us + rs232.rxd_handler().set(m_uart, FUNC(i8251_device::write_rxd)); + rs232.dsr_handler().set(m_uart, FUNC(i8251_device::write_dsr)); + rs232.cts_handler().set(m_uart, FUNC(i8251_device::write_cts)); - //clock_device &uart_clock(CLOCK(config, "uart_clock", 2'457'600 / 8)); --> to UART CLK + GENERIC_TERMINAL(config, m_terminal, 0); // Main terminal for now + m_terminal->set_keyboard_callback(FUNC(dct11em_state::kbd_put)); } /* ROM definition */ diff --git a/src/mame/layout/dct11em.lay b/src/mame/layout/dct11em.lay index 44c10d9acaa..9046a2f438e 100644 --- a/src/mame/layout/dct11em.lay +++ b/src/mame/layout/dct11em.lay @@ -3,11 +3,21 @@ license:CC0 --> + + + + + + + + + + @@ -16,45 +26,55 @@ license:CC0 + + + - - + + + + + + + - + - + - + - + - + - + + - + - + - + - + - + - + + -- cgit v1.2.3 From bcfc49f5b8872e04ece9dd17a0d9d7241bceee18 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 1 Aug 2020 18:24:40 +0200 Subject: netlist: Fix CD4053 device * also fix signedness warning (clang) in CD4020 --- src/lib/netlist/devices/nld_4020.cpp | 4 ++-- src/lib/netlist/devices/nld_4053.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/netlist/devices/nld_4020.cpp b/src/lib/netlist/devices/nld_4020.cpp index a92ecd2cbd4..b6ae2b45bd1 100644 --- a/src/lib/netlist/devices/nld_4020.cpp +++ b/src/lib/netlist/devices/nld_4020.cpp @@ -49,7 +49,7 @@ namespace netlist m_cnt = 0; m_IP.inactivate(); /* static */ const netlist_time reset_time = netlist_time::from_nsec(140); - for (int i = 0; i < MAX_BITS; i++) + for (unsigned i = 0; i < MAX_BITS; i++) if (((_LiveBitmask >> i) & 1) != 0) m_Q[i].push(0, reset_time); } @@ -70,7 +70,7 @@ namespace netlist NLTIME_FROM_NS(1380), NLTIME_FROM_NS(1480), }; - for (int i = 0; i < MAX_BITS; i++) + for (unsigned i = 0; i < MAX_BITS; i++) if (((_LiveBitmask >> i) & 1) != 0) m_Q[i].push(cnt & 1, out_delayQn[i]); } diff --git a/src/lib/netlist/devices/nld_4053.cpp b/src/lib/netlist/devices/nld_4053.cpp index 649a944c14e..f4b9b03ebd2 100644 --- a/src/lib/netlist/devices/nld_4053.cpp +++ b/src/lib/netlist/devices/nld_4053.cpp @@ -96,7 +96,7 @@ namespace netlist nl_fptype sup = (m_supply.VCC().Q_Analog() - m_supply.GND().Q_Analog()); Rval = m_base_r() * nlconst::magic(5.0) / sup; } - R.change_state([this, Rval]() -> void { this->m_RX.set_R(Rval);}); + R.change_state([&R, Rval]() -> void { R.set_R(Rval);}); } analog::NETLIB_SUB(R_base) m_RX; -- cgit v1.2.3 From c0ecd68341633b30b1d10e13673a5e109b23add0 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 1 Aug 2020 18:25:04 +0200 Subject: netlist: Device refactoring * Move DIPs for 82S16, 82S115, and 2102A devices into nlm_proms * Moved 7448 DIP to a macro. Replaced 7442 with truthtable and macro. * Moved 74LS629 DIP into macro. * Expand truthtable to handle 10 outputs. --- scripts/src/netlist.lua | 2 - src/lib/netlist/build/makefile | 1 - src/lib/netlist/devices/net_lib.cpp | 7 -- src/lib/netlist/devices/nld_2102A.cpp | 33 -------- src/lib/netlist/devices/nld_2102A.h | 23 +---- src/lib/netlist/devices/nld_7442.cpp | 105 ----------------------- src/lib/netlist/devices/nld_7442.h | 63 -------------- src/lib/netlist/devices/nld_7448.cpp | 32 ------- src/lib/netlist/devices/nld_7448.h | 16 +--- src/lib/netlist/devices/nld_74ls629.cpp | 43 ++-------- src/lib/netlist/devices/nld_74ls629.h | 3 - src/lib/netlist/devices/nld_82S115.cpp | 43 ---------- src/lib/netlist/devices/nld_82S115.h | 22 +---- src/lib/netlist/devices/nld_82S16.cpp | 34 +------- src/lib/netlist/devices/nld_82S16.h | 2 - src/lib/netlist/devices/nld_devinc.h | 70 +++++++--------- src/lib/netlist/devices/nlid_truthtable.cpp | 3 +- src/lib/netlist/examples/sn74ls629_osc.c | 1 + src/lib/netlist/macro/nlm_roms.cpp | 125 ++++++++++++++++++++++++++++ src/lib/netlist/macro/nlm_ttl74xx.cpp | 116 ++++++++++++++++++++++---- src/lib/netlist/macro/nlm_ttl74xx.h | 7 +- 21 files changed, 275 insertions(+), 476 deletions(-) delete mode 100644 src/lib/netlist/devices/nld_7442.cpp delete mode 100644 src/lib/netlist/devices/nld_7442.h diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 1f4c8cc1d85..481f2add692 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -146,8 +146,6 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_4066.h", MAME_DIR .. "src/lib/netlist/devices/nld_4316.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_4316.h", - MAME_DIR .. "src/lib/netlist/devices/nld_7442.cpp", - MAME_DIR .. "src/lib/netlist/devices/nld_7442.h", MAME_DIR .. "src/lib/netlist/devices/nld_7448.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_7448.h", MAME_DIR .. "src/lib/netlist/devices/nld_7450.cpp", diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 968a2ed6489..9e10f19a60c 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -158,7 +158,6 @@ NLOBJS := \ $(NLOBJ)/devices/nld_4053.o \ $(NLOBJ)/devices/nld_4066.o \ $(NLOBJ)/devices/nld_4316.o \ - $(NLOBJ)/devices/nld_7442.o \ $(NLOBJ)/devices/nld_7448.o \ $(NLOBJ)/devices/nld_7450.o \ $(NLOBJ)/devices/nld_7473.o \ diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 3d91fe6030c..0e585a92972 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -69,14 +69,10 @@ namespace devices LIB_ENTRY(nicRSFF) LIB_ENTRY(nicDelay) LIB_ENTRY(2102A) - LIB_ENTRY(2102A_dip) LIB_ENTRY(2716) #if !(NL_USE_TRUTHTABLE_7448) LIB_ENTRY(7448) - LIB_ENTRY(7448_dip) #endif - LIB_ENTRY(7442) - LIB_ENTRY(7442_dip) LIB_ENTRY(7450) LIB_ENTRY(7450_dip) LIB_ENTRY(7473) @@ -177,8 +173,6 @@ namespace devices LIB_ENTRY(74193_dip) LIB_ENTRY(74194_dip) LIB_ENTRY(74365_dip) - LIB_ENTRY(82S16_dip) - LIB_ENTRY(82S115_dip) LIB_ENTRY(9602) LIB_ENTRY(9310_dip) LIB_ENTRY(9314_dip) @@ -186,7 +180,6 @@ namespace devices LIB_ENTRY(9322_dip) LIB_ENTRY(9334_dip) LIB_ENTRY(AM2847_dip) - LIB_ENTRY(SN74LS629_dip) LIB_ENTRY(MM5837_dip) } diff --git a/src/lib/netlist/devices/nld_2102A.cpp b/src/lib/netlist/devices/nld_2102A.cpp index d60b661ad21..134e2aae945 100644 --- a/src/lib/netlist/devices/nld_2102A.cpp +++ b/src/lib/netlist/devices/nld_2102A.cpp @@ -60,7 +60,6 @@ namespace netlist } } - friend class NETLIB_NAME(2102A_dip); private: object_array_t m_A; logic_input_t m_CEQ; @@ -74,39 +73,7 @@ namespace netlist nld_power_pins m_power_pins; }; - NETLIB_OBJECT(2102A_dip) - { - NETLIB_CONSTRUCTOR(2102A_dip) - , A(*this, "A") - { - register_subalias("8", A.m_A[0]); - register_subalias("4", A.m_A[1]); - register_subalias("5", A.m_A[2]); - register_subalias("6", A.m_A[3]); - register_subalias("7", A.m_A[4]); - register_subalias("2", A.m_A[5]); - register_subalias("1", A.m_A[6]); - register_subalias("16", A.m_A[7]); - register_subalias("15", A.m_A[8]); - register_subalias("14", A.m_A[9]); - - register_subalias("13", A.m_CEQ); - register_subalias("3", A.m_RWQ); - - register_subalias("11", A.m_DI); - register_subalias("12", A.m_DO); - - register_subalias("10", "A.VCC"); - register_subalias("9", "A.GND"); - - } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(2102A) A; - }; - NETLIB_DEVICE_IMPL(2102A, "RAM_2102A", "+CEQ,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,+A8,+A9,+RWQ,+DI,@VCC,@GND") - NETLIB_DEVICE_IMPL(2102A_dip,"RAM_2102A_DIP","") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_2102A.h b/src/lib/netlist/devices/nld_2102A.h index 9d2279445f1..b617a209fdc 100644 --- a/src/lib/netlist/devices/nld_2102A.h +++ b/src/lib/netlist/devices/nld_2102A.h @@ -26,25 +26,8 @@ #include "netlist/nl_setup.h" -#define RAM_2102A(name, cCEQ, cA0, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cA9, cRWQ, cDI) \ - NET_REGISTER_DEV(RAM_2102A, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, CEQ, cCEQ) \ - NET_CONNECT(name, A0, cA0) \ - NET_CONNECT(name, A1, cA1) \ - NET_CONNECT(name, A2, cA2) \ - NET_CONNECT(name, A3, cA3) \ - NET_CONNECT(name, A4, cA4) \ - NET_CONNECT(name, A5, cA5) \ - NET_CONNECT(name, A6, cA6) \ - NET_CONNECT(name, A7, cA7) \ - NET_CONNECT(name, A8, cA8) \ - NET_CONNECT(name, A9, cA9) \ - NET_CONNECT(name, RWQ, cRWQ) \ - NET_CONNECT(name, DI, cDI) - -#define RAM_2102A_DIP(name) \ - NET_REGISTER_DEV(RAM_2102A_DIP, name) +// expects: RAM_2102A(name, cCEQ, cA0, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cA9, cRWQ, cDI) +#define RAM_2102A(...) \ + NET_REGISTER_DEVEXT(RAM_2102A, __VA_ARGS__) #endif /* NLD_2102A_H_ */ diff --git a/src/lib/netlist/devices/nld_7442.cpp b/src/lib/netlist/devices/nld_7442.cpp deleted file mode 100644 index e25b56e60d3..00000000000 --- a/src/lib/netlist/devices/nld_7442.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Ryan Holtz -/* - * nld_7442.cpp - * - */ - -#include "nld_7442.h" -#include "netlist/nl_base.h" - -namespace netlist -{ -namespace devices -{ - static constexpr const netlist_time delay = NLTIME_FROM_NS(30); // Worst-case through 3 levels of logic - - // FIXME: stateless device, convert to TRUTHTABLE - NETLIB_OBJECT(7442) - { - NETLIB_CONSTRUCTOR(7442) - , m_A(*this, "A", NETLIB_DELEGATE(inputs)) - , m_B(*this, "B", NETLIB_DELEGATE(inputs)) - , m_C(*this, "C", NETLIB_DELEGATE(inputs)) - , m_D(*this, "D", NETLIB_DELEGATE(inputs)) - , m_val(*this, "m_val", 0) - , m_last_val(*this, "m_last_val", 0) - , m_Q(*this, {"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9"}) - , m_power_pins(*this) - { - } - - private: - NETLIB_RESETI() - { - m_val = 0; - m_last_val = 0; - } - - NETLIB_HANDLERI(inputs) - { - const netlist_sig_t new_A = m_A(); - const netlist_sig_t new_B = m_B(); - const netlist_sig_t new_C = m_C(); - const netlist_sig_t new_D = m_D(); - - m_last_val = m_val; - m_val = static_cast((new_D << 3) | (new_C << 2) | (new_B << 1) | new_A); - - if (m_last_val != m_val) - { - update_outputs(); - } - } - - void update_outputs() noexcept - { - for (std::size_t i=0; i<10; i++) - m_Q[i].push(i == m_val ? 0 : 1, delay); - } - - logic_input_t m_A; - logic_input_t m_B; - logic_input_t m_C; - logic_input_t m_D; - - state_var_u8 m_val; - state_var_u8 m_last_val; - - object_array_t m_Q; - nld_power_pins m_power_pins; - }; - - NETLIB_OBJECT(7442_dip) - { - NETLIB_CONSTRUCTOR(7442_dip) - , A(*this, "A") - { - register_subalias("1", "A.Q0"); - register_subalias("2", "A.Q1"); - register_subalias("3", "A.Q2"); - register_subalias("4", "A.Q3"); - register_subalias("5", "A.Q4"); - register_subalias("6", "A.Q5"); - register_subalias("7", "A.Q6"); - register_subalias("8", "A.GND"); - - register_subalias("9", "A.Q7"); - register_subalias("10", "A.Q8"); - register_subalias("11", "A.Q9"); - register_subalias("12", "A.D"); - register_subalias("13", "A.C"); - register_subalias("14", "A.B"); - register_subalias("15", "A.A"); - register_subalias("16", "A.VCC"); - } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(7442) A; - }; - - NETLIB_DEVICE_IMPL(7442, "TTL_7442", "+A,+B,+C,+D,@VCC,@GND") - NETLIB_DEVICE_IMPL(7442_dip, "TTL_7442_DIP", "") - -} // namespace devices -} // namespace netlist diff --git a/src/lib/netlist/devices/nld_7442.h b/src/lib/netlist/devices/nld_7442.h deleted file mode 100644 index faf3aa1e93b..00000000000 --- a/src/lib/netlist/devices/nld_7442.h +++ /dev/null @@ -1,63 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Ryan Holtz -/* - * nld_7442.h - * - * SN7442: 4-Line BCD to 10-Line Decimal Decoder - * - * +--------------+ - * 0 |1 ++ 16| VCC - * 1 |2 15| A - * 2 |3 14| B - * 3 |4 13| C - * 4 |5 7442 12| D - * 5 |6 11| 9 - * 6 |7 10| 8 - * GND |8 9| 7 - * +--------------+ - * - * Truth Table - * - * +------++---+---+---+---++---+---+---+---+---+---+---+---+---+---+ - * | Num. || D | C | B | A || 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | - * +======++===+===+===+===++===+===+===+===+===+===+===+===+===+===+ - * | 0 || 0 | 0 | 0 | 0 || 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | 1 || 0 | 0 | 0 | 1 || 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | 2 || 0 | 0 | 1 | 0 || 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | 3 || 0 | 0 | 1 | 1 || 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | - * | 4 || 0 | 1 | 0 | 0 || 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | - * | 5 || 0 | 1 | 0 | 1 || 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | - * | 6 || 0 | 1 | 1 | 0 || 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | - * | 7 || 0 | 1 | 1 | 1 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | - * | 8 || 1 | 0 | 0 | 0 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | - * | 9 || 1 | 0 | 0 | 1 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | - * | - || 1 | 0 | 1 | 0 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | - || 1 | 0 | 1 | 1 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | - || 1 | 1 | 0 | 0 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | - || 1 | 1 | 0 | 1 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | - || 1 | 1 | 1 | 0 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * | - || 1 | 1 | 1 | 1 || 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | - * +------++---+---+---+---++---+---+---+---+---+---+---+---+---+---+ - * - * Naming conventions follow Texas Instruments datasheet - * - */ - -#ifndef NLD_7442_H_ -#define NLD_7442_H_ - -#include "netlist/nl_setup.h" - -#define TTL_7442(name, cA, cB, cC, cD) \ - NET_REGISTER_DEV(TTL_7442, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, A, cA) \ - NET_CONNECT(name, B, cB) \ - NET_CONNECT(name, C, cC) \ - NET_CONNECT(name, D, cD) - -#define TTL_7442_DIP(name) \ - NET_REGISTER_DEV(TTL_7442_DIP, name) - -#endif /* NLD_7442_H_ */ diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp index 13a9b171258..c2f4c386108 100644 --- a/src/lib/netlist/devices/nld_7448.cpp +++ b/src/lib/netlist/devices/nld_7448.cpp @@ -36,7 +36,6 @@ namespace netlist m_state = 0; } - friend class NETLIB_NAME(7448_dip); private: void update_outputs(unsigned v) noexcept { @@ -98,36 +97,6 @@ namespace netlist static const std::array tab7448; }; - NETLIB_OBJECT(7448_dip) - { - NETLIB_CONSTRUCTOR(7448_dip) - , A(*this, "A") - { - register_subalias("1", A.m_B); - register_subalias("2", A.m_C); - register_subalias("3", A.m_LTQ); - register_subalias("4", A.m_BIQ); - register_subalias("5", A.m_RBIQ); - register_subalias("6", A.m_D); - register_subalias("7", A.m_A); - register_subalias("8", "A.GND"); - - register_subalias("9", A.m_Q[4]); // e - register_subalias("10", A.m_Q[3]); // d - register_subalias("11", A.m_Q[2]); // c - register_subalias("12", A.m_Q[1]); // b - register_subalias("13", A.m_Q[0]); // a - register_subalias("14", A.m_Q[6]); // g - register_subalias("15", A.m_Q[5]); // f - register_subalias("16", "A.VCC"); - } - private: - NETLIB_SUB(7448) A; - }; - #endif - - #if !(NL_USE_TRUTHTABLE_7448) - #define BITS7(b6,b5,b4,b3,b2,b1,b0) ((b6)<<6) | ((b5)<<5) | ((b4)<<4) | ((b3)<<3) | ((b2)<<2) | ((b1)<<1) | ((b0)<<0) const std::array NETLIB_NAME(7448)::tab7448 = @@ -151,7 +120,6 @@ namespace netlist }; NETLIB_DEVICE_IMPL(7448, "TTL_7448", "+A,+B,+C,+D,+LTQ,+BIQ,+RBIQ,@VCC,@GND") - NETLIB_DEVICE_IMPL(7448_dip, "TTL_7448_DIP", "") #endif diff --git a/src/lib/netlist/devices/nld_7448.h b/src/lib/netlist/devices/nld_7448.h index a4caeafed8b..e8899acdd96 100644 --- a/src/lib/netlist/devices/nld_7448.h +++ b/src/lib/netlist/devices/nld_7448.h @@ -28,20 +28,8 @@ #if !NL_AUTO_DEVICES #if !(NL_USE_TRUTHTABLE_7448) -#define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \ - NET_REGISTER_DEV(TTL_7448, name) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, A, cA0) \ - NET_CONNECT(name, B, cA1) \ - NET_CONNECT(name, C, cA2) \ - NET_CONNECT(name, D, cA3) \ - NET_CONNECT(name, LTQ, cLTQ) \ - NET_CONNECT(name, BIQ, cBIQ) \ - NET_CONNECT(name, RBIQ, cRBIQ) - -#define TTL_7448_DIP(name) \ - NET_REGISTER_DEV(TTL_7448_DIP, name) +#define TTL_7448(name) \ + NET_REGISTER_DEV(TTL_7448, name) \ #endif #endif diff --git a/src/lib/netlist/devices/nld_74ls629.cpp b/src/lib/netlist/devices/nld_74ls629.cpp index cc924450eca..4520cffb95e 100644 --- a/src/lib/netlist/devices/nld_74ls629.cpp +++ b/src/lib/netlist/devices/nld_74ls629.cpp @@ -54,6 +54,7 @@ namespace netlist , m_enableq(*this, "m_enableq", 1) , m_out(*this, "m_out", 0) , m_inc(*this, "m_inc", netlist_time::zero()) + , m_power_pins(*this) { connect(m_FB, m_Y); } @@ -72,6 +73,8 @@ namespace netlist state_var m_enableq; state_var m_out; state_var m_inc; + nld_power_pins m_power_pins; + private: NETLIB_HANDLERI(fb) { @@ -98,8 +101,9 @@ namespace netlist , m_RNG(*this, "RNG", NETLIB_DELEGATE(inputs)) , m_FC(*this, "FC", NETLIB_DELEGATE(inputs)) , m_CAP(*this, "CAP", nlconst::magic(1e-6)) + , m_power_pins(*this) { - register_subalias("GND", m_R_FC.N()); + connect(m_power_pins.GND(), m_R_FC.N()); connect(m_FC, m_R_FC.P()); connect(m_RNG, m_R_RNG.P()); @@ -130,6 +134,7 @@ namespace netlist analog_input_t m_FC; param_fp_t m_CAP; + nld_power_pins m_power_pins; private: NETLIB_HANDLERI(inputs) @@ -194,43 +199,7 @@ namespace netlist }; - NETLIB_OBJECT(SN74LS629_dip) - { - NETLIB_CONSTRUCTOR(SN74LS629_dip) - , m_A(*this, "A") - , m_B(*this, "B") - { - register_subalias("1", m_B.m_FC); - register_subalias("2", m_A.m_FC); - register_subalias("3", m_A.m_RNG); - - register_subalias("6", m_A.m_ENQ); - register_subalias("7", m_A.m_clock.m_Y); - - register_subalias("8", m_A.m_R_FC.N()); - register_subalias("9", m_A.m_R_FC.N()); - connect(m_A.m_R_FC.N(), m_B.m_R_FC.N()); - - register_subalias("10", m_B.m_clock.m_Y); - - register_subalias("11", m_B.m_ENQ); - register_subalias("14", m_B.m_RNG); - } - - - NETLIB_RESETI() - { - m_A.reset(); - m_B.reset(); - } - - private: - NETLIB_SUB(SN74LS629) m_A; - NETLIB_SUB(SN74LS629) m_B; - }; - NETLIB_DEVICE_IMPL(SN74LS629, "SN74LS629", "CAP") - NETLIB_DEVICE_IMPL(SN74LS629_dip, "SN74LS629_DIP", "1.CAP1,2.CAP2") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_74ls629.h b/src/lib/netlist/devices/nld_74ls629.h index 7a695e16a17..4b8f3be0b6c 100644 --- a/src/lib/netlist/devices/nld_74ls629.h +++ b/src/lib/netlist/devices/nld_74ls629.h @@ -33,7 +33,4 @@ #define SN74LS629(name, p_cap) \ NET_REGISTER_DEVEXT(SN74LS629, name, p_cap) -#define SN74LS629_DIP(name, p_cap1, p_cap2) \ - NET_REGISTER_DEVEXT(SN74LS629_DIP, name, p_cap1, p_cap2) - #endif /* NLD_74LS629_H_ */ diff --git a/src/lib/netlist/devices/nld_82S115.cpp b/src/lib/netlist/devices/nld_82S115.cpp index 1b1235817f0..377199e2190 100644 --- a/src/lib/netlist/devices/nld_82S115.cpp +++ b/src/lib/netlist/devices/nld_82S115.cpp @@ -31,7 +31,6 @@ namespace netlist m_last_O = 0; } - friend class NETLIB_NAME(82S115_dip); private: // FIXME: timing! NETLIB_HANDLERI(inputs) @@ -73,49 +72,7 @@ namespace netlist nld_power_pins m_power_pins; }; - NETLIB_OBJECT(82S115_dip) - { - NETLIB_CONSTRUCTOR(82S115_dip) - , A(*this, "A") - { - register_subalias("21", A.m_A[0]); - register_subalias("22", A.m_A[1]); - register_subalias("23", A.m_A[2]); - register_subalias("1", A.m_A[3]); - register_subalias("2", A.m_A[4]); - register_subalias("3", A.m_A[5]); - register_subalias("4", A.m_A[6]); - register_subalias("5", A.m_A[7]); - register_subalias("6", A.m_A[8]); - - register_subalias("20", A.m_CE1Q); - register_subalias("19", A.m_CE2); - - // FIXME: implement FE1, FE2 - // register_subalias("13", m_FE1); - // register_subalias("11", m_FE2); - - register_subalias("18", A.m_STROBE); - - register_subalias("7", A.m_O[0]); - register_subalias("8", A.m_O[1]); - register_subalias("9", A.m_O[2]); - register_subalias("10", A.m_O[3]); - register_subalias("14", A.m_O[4]); - register_subalias("15", A.m_O[5]); - register_subalias("16", A.m_O[6]); - register_subalias("17", A.m_O[7]); - - register_subalias("12", "A.GND"); - register_subalias("24", "A.VCC"); - } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(82S115) A; - }; - NETLIB_DEVICE_IMPL(82S115, "PROM_82S115", "+CE1Q,+CE2,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,+A8,+STROBE,@VCC,@GND") - NETLIB_DEVICE_IMPL(82S115_dip, "PROM_82S115_DIP", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_82S115.h b/src/lib/netlist/devices/nld_82S115.h index da4c1209e81..1bb3cfb5289 100644 --- a/src/lib/netlist/devices/nld_82S115.h +++ b/src/lib/netlist/devices/nld_82S115.h @@ -30,24 +30,8 @@ #include "netlist/nl_setup.h" -#define PROM_82S115(name, cCE1Q, cCE2, cA0, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cSTROBE) \ - NET_REGISTER_DEV(PROM_82S115, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, CE1Q, cCE1Q) \ - NET_CONNECT(name, CE2, cCE2) \ - NET_CONNECT(name, A0, cA0) \ - NET_CONNECT(name, A1, cA1) \ - NET_CONNECT(name, A2, cA2) \ - NET_CONNECT(name, A3, cA3) \ - NET_CONNECT(name, A4, cA4) \ - NET_CONNECT(name, A5, cA5) \ - NET_CONNECT(name, A6, cA6) \ - NET_CONNECT(name, A7, cA7) \ - NET_CONNECT(name, A8, cA8) \ - NET_CONNECT(name, STROBE, cSTROBE) - -#define PROM_82S115_DIP(name) \ - NET_REGISTER_DEV(PROM_82S115_DIP, name) +// expects: PROM_82S115(name, cCE1Q, cCE2, cA0, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cSTROBE) +#define PROM_82S115(...) \ + NET_REGISTER_DEVEXT(PROM_82S115, __VA_ARGS__) #endif /* NLD_82S115_H_ */ diff --git a/src/lib/netlist/devices/nld_82S16.cpp b/src/lib/netlist/devices/nld_82S16.cpp index 370f2c0104d..acfa05ef247 100644 --- a/src/lib/netlist/devices/nld_82S16.cpp +++ b/src/lib/netlist/devices/nld_82S16.cpp @@ -38,7 +38,7 @@ namespace netlist m_addr = 0; m_enq = 0; } - friend class NETLIB_NAME(82S16_dip); + private: // FIXME: timing! // FIXME: optimize device (separate address decoder!) @@ -105,39 +105,7 @@ namespace netlist nld_power_pins m_power_pins; }; - NETLIB_OBJECT(82S16_dip) - { - NETLIB_CONSTRUCTOR(82S16_dip) - , A(*this, "A") - { - register_subalias("2", A.m_A[0]); - register_subalias("1", A.m_A[1]); - register_subalias("15", A.m_A[2]); - register_subalias("14", A.m_A[3]); - register_subalias("7", A.m_A[4]); - register_subalias("9", A.m_A[5]); - register_subalias("10", A.m_A[6]); - register_subalias("11", A.m_A[7]); - - register_subalias("3", A.m_CE1Q); - register_subalias("4", A.m_CE2Q); - register_subalias("5", A.m_CE3Q); - - register_subalias("12", A.m_WEQ); - register_subalias("13", A.m_DIN); - - register_subalias("6", A.m_DOUTQ); - - register_subalias("8", "A.GND"); - register_subalias("16", "A.VCC"); - } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(82S16) A; - }; - NETLIB_DEVICE_IMPL(82S16, "TTL_82S16", "") - NETLIB_DEVICE_IMPL(82S16_dip, "TTL_82S16_DIP", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_82S16.h b/src/lib/netlist/devices/nld_82S16.h index 47d6189a79b..635a81b245f 100644 --- a/src/lib/netlist/devices/nld_82S16.h +++ b/src/lib/netlist/devices/nld_82S16.h @@ -28,7 +28,5 @@ #define TTL_82S16(name) \ NET_REGISTER_DEV(TTL_82S16, name) -#define TTL_82S16_DIP(name) \ - NET_REGISTER_DEV(TTL_82S16_DIP, name) #endif /* NLD_82S16_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index 7ff94019366..260c794763d 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -228,10 +228,6 @@ #define RAM_2102A(...) \ NET_REGISTER_DEVEXT(RAM_2102A, __VA_ARGS__) -// usage : RAM_2102A_DIP(name) -#define RAM_2102A_DIP(...) \ - NET_REGISTER_DEVEXT(RAM_2102A_DIP, __VA_ARGS__) - // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_roms.cpp // --------------------------------------------------------------------- @@ -248,22 +244,6 @@ #define TTL_7448(...) \ NET_REGISTER_DEVEXT(TTL_7448, __VA_ARGS__) -// usage : TTL_7448_DIP(name) -#define TTL_7448_DIP(...) \ - NET_REGISTER_DEVEXT(TTL_7448_DIP, __VA_ARGS__) - -// --------------------------------------------------------------------- -// Source: src/lib/netlist/devices/nld_7442.cpp -// --------------------------------------------------------------------- -// usage : TTL_7442(name, pA, pB, pC, pD) -// auto connect: VCC, GND -#define TTL_7442(...) \ - NET_REGISTER_DEVEXT(TTL_7442, __VA_ARGS__) - -// usage : TTL_7442_DIP(name) -#define TTL_7442_DIP(...) \ - NET_REGISTER_DEVEXT(TTL_7442_DIP, __VA_ARGS__) - // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_7450.cpp // --------------------------------------------------------------------- @@ -845,20 +825,6 @@ #define TTL_74365_DIP(...) \ NET_REGISTER_DEVEXT(TTL_74365_DIP, __VA_ARGS__) -// --------------------------------------------------------------------- -// Source: src/lib/netlist/devices/nld_82S16.cpp -// --------------------------------------------------------------------- -// usage : TTL_82S16_DIP(name) -#define TTL_82S16_DIP(...) \ - NET_REGISTER_DEVEXT(TTL_82S16_DIP, __VA_ARGS__) - -// --------------------------------------------------------------------- -// Source: src/lib/netlist/devices/nld_82S115.cpp -// --------------------------------------------------------------------- -// usage : PROM_82S115_DIP(name) -#define PROM_82S115_DIP(...) \ - NET_REGISTER_DEVEXT(PROM_82S115_DIP, __VA_ARGS__) - // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_74123.cpp // --------------------------------------------------------------------- @@ -908,13 +874,6 @@ #define TTL_AM2847_DIP(...) \ NET_REGISTER_DEVEXT(TTL_AM2847_DIP, __VA_ARGS__) -// --------------------------------------------------------------------- -// Source: src/lib/netlist/devices/nld_74ls629.cpp -// --------------------------------------------------------------------- -// usage : SN74LS629_DIP(name, p1_CAP1, p2_CAP2) -#define SN74LS629_DIP(...) \ - NET_REGISTER_DEVEXT(SN74LS629_DIP, __VA_ARGS__) - // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_mm5837.cpp // --------------------------------------------------------------------- @@ -1053,6 +1012,10 @@ #define TTL_7437_NAND(...) \ NET_REGISTER_DEVEXT(TTL_7437_NAND, __VA_ARGS__) +// usage : TTL_7448_DIP(name) +#define TTL_7448_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_7448_DIP, __VA_ARGS__) + // usage : TTL_7486_GATE(name) #define TTL_7486_GATE(...) \ NET_REGISTER_DEVEXT(TTL_7486_GATE, __VA_ARGS__) @@ -1187,6 +1150,14 @@ #define TTL_7437_DIP(...) \ NET_REGISTER_DEVEXT(TTL_7437_DIP, __VA_ARGS__) +// usage : TTL_7442(name, cA, cB, cC, cD) +#define TTL_7442(...) \ + NET_REGISTER_DEVEXT(TTL_7442, __VA_ARGS__) + +// usage : TTL_7442_DIP(name) +#define TTL_7442_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_7442_DIP, __VA_ARGS__) + // usage : TTL_7486_DIP(name) #define TTL_7486_DIP(...) \ NET_REGISTER_DEVEXT(TTL_7486_DIP, __VA_ARGS__) @@ -1243,6 +1214,10 @@ #define TTL_74379_DIP(...) \ NET_REGISTER_DEVEXT(TTL_74379_DIP, __VA_ARGS__) +// usage : SN74LS629_DIP(name, p1_CAP1, p2_CAP2) +#define SN74LS629_DIP(...) \ + NET_REGISTER_DEVEXT(SN74LS629_DIP, __VA_ARGS__) + // usage : DM9312_DIP(name) #define DM9312_DIP(...) \ NET_REGISTER_DEVEXT(DM9312_DIP, __VA_ARGS__) @@ -1429,5 +1404,18 @@ #define EPROM_2716_DIP(...) \ NET_REGISTER_DEVEXT(EPROM_2716_DIP, __VA_ARGS__) +// usage : TTL_82S16_DIP(name) +#define TTL_82S16_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_82S16_DIP, __VA_ARGS__) + +// usage : PROM_82S115_DIP(name) +#define PROM_82S115_DIP(...) \ + NET_REGISTER_DEVEXT(PROM_82S115_DIP, __VA_ARGS__) + +// usage : RAM_2102A_DIP(name) +#define RAM_2102A_DIP(...) \ + NET_REGISTER_DEVEXT(RAM_2102A_DIP, __VA_ARGS__) + + #endif // __PLIB_PREPROCESSOR__ #endif diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp index 947b2651acb..c42e5b2ddb3 100644 --- a/src/lib/netlist/devices/nlid_truthtable.cpp +++ b/src/lib/netlist/devices/nlid_truthtable.cpp @@ -677,7 +677,8 @@ namespace factory #define ENTRY(n, s) ENTRYY(n, 1, s); ENTRYY(n, 2, s); ENTRYY(n, 3, s); \ ENTRYY(n, 4, s); ENTRYY(n, 5, s); ENTRYY(n, 6, s); \ - ENTRYY(n, 7, s); ENTRYY(n, 8, s) + ENTRYY(n, 7, s); ENTRYY(n, 8, s); ENTRYY(n, 9, s); \ + ENTRYY(n, 10, s); host_arena::unique_ptr truthtable_create(tt_desc &desc, properties &&props) { diff --git a/src/lib/netlist/examples/sn74ls629_osc.c b/src/lib/netlist/examples/sn74ls629_osc.c index c51007a1bd3..748f549651f 100644 --- a/src/lib/netlist/examples/sn74ls629_osc.c +++ b/src/lib/netlist/examples/sn74ls629_osc.c @@ -25,6 +25,7 @@ NETLIST_START(ls629) SN74LS629(OSC, 0.022e-6) NET_C(GND, OSC.GND) + NET_C(V5, OSC.VCC) NET_C(VR, OSC.RNG) NET_C(VF, OSC.FC) NET_C(GND, OSC.ENQ) diff --git a/src/lib/netlist/macro/nlm_roms.cpp b/src/lib/netlist/macro/nlm_roms.cpp index e5d6cdc7d06..30bd4b98e06 100644 --- a/src/lib/netlist/macro/nlm_roms.cpp +++ b/src/lib/netlist/macro/nlm_roms.cpp @@ -185,6 +185,27 @@ static NETLIST_START(PROM_82S123_DIP) ALIAS(16, A.VCC) NETLIST_END() +/* + * nld_82S16.h + * + * DM82S16: 256 Bit bipolar ram + * + * +--------------+ + * A1 |1 ++ 16| VCC + * A0 |2 15| A2 + * CE1Q |3 14| A3 + * CE2Q |4 82S16 13| DIN + * CE3Q |5 12| WEQ + * DOUTQ |6 11| A7 + * A4 |7 10| A6 + * GND |8 9| A5 + * +--------------+ + * + * + * Naming conventions follow Signetics datasheet + */ + + //- Identifier: EPROM_2716_DIP //- Title: 2716 16K (2K x 8) UV ERASABLE PROM //- Description: The Intel®2716 is a 16,384-bit ultraviolet erasable and @@ -263,6 +284,107 @@ static NETLIST_START(EPROM_2716_DIP) ALIAS(24, A.VCC) NETLIST_END() +/* DM82S16: 256 Bit bipolar ram + * + * +--------------+ + * A1 |1 ++ 16| VCC + * A0 |2 15| A2 + * CE1Q |3 14| A3 + * CE2Q |4 82S16 13| DIN + * CE3Q |5 12| WEQ + * DOUTQ |6 11| A7 + * A4 |7 10| A6 + * GND |8 9| A5 + * +--------------+ + * + * Naming conventions follow Signetics datasheet + */ + +static NETLIST_START(TTL_82S16_DIP) + TTL_82S16(A) + + DIPPINS( /* +--------------+ */ + A.A1, /* A1 |1 ++ 16| VCC */ A.VCC, + A.A0, /* A0 |2 15| A2 */ A.A2, + A.CE1Q, /* CE1Q |3 14| A3 */ A.A3, + A.CE2Q, /* CE2Q |4 82S16 13| DIN */ A.DIN, + A.CE3Q, /* CE3Q |5 12| WEQ */ A.WEQ, + A.DOUTQ, /* DOUTQ |6 11| A7 */ A.A7, + A.A4, /* A4 |7 10| A6 */ A.A6, + A.GND, /* GND |8 9| A5 */ A.A5 + /* +--------------+ */ + ) +NETLIST_END() + +/* 82S115: 4K-bit TTL bipolar PROM (512 x 8) + * + * +--------------+ + * A3 |1 ++ 24| VCC + * A4 |2 23| A2 + * A5 |3 22| A1 + * A6 |4 82S115 21| A0 + * A7 |5 20| CE1Q + * A8 |6 19| CE2 + * O1 |7 18| STROBE + * O2 |8 17| O8 + * O3 |9 16| O7 + * O4 |10 15| O6 + * FE2 |11 14| O5 + * GND |12 13| FE1 + * +--------------+ + */ + +static NETLIST_START(PROM_82S115_DIP) + PROM_82S115(A) + NC_PIN(NC) + + DIPPINS( /* +--------------+ */ + A.A3, /* A3 |1 ++ 24| VCC */ A.VCC, + A.A4, /* A4 |2 23| A2 */ A.A2, + A.A5, /* A5 |3 22| A1 */ A.A1, + A.A6, /* A6 |4 82S115 21| A0 */ A.A0, + A.A7, /* A7 |5 20| CE1Q */ A.CE1Q, + A.A8, /* A8 |6 19| CE2 */ A.CE2, + A.O1, /* O1 |7 18| STROBE */ A.STROBE, + A.O2, /* O2 |8 17| O8 */ A.O8, + A.O3, /* O3 |9 16| O7 */ A.O7, + A.O4, /* O4 |10 15| O6 */ A.O6, + NC.I, /* FE2 |11 14| O5 */ A.O5, + A.GND, /* GND |12 13| FE1 */ NC.I + /* +--------------+ */ + ) +NETLIST_END() + +/* 2102: 1024 x 1-bit Static RAM + * + * +--------------+ + * A6 |1 ++ 16| A7 + * A5 |2 15| A8 + * RWQ |3 14| A9 + * A1 |4 82S16 13| CEQ + * A2 |5 12| DO + * A3 |6 11| DI + * A4 |7 10| VCC + * A0 |8 9| GND + * +--------------+ + */ + + static NETLIST_START(RAM_2102A_DIP) + RAM_2102A(A) + + DIPPINS( /* +--------------+ */ + A.A6, /* A6 |1 ++ 16| A7 */ A.A7, + A.A5, /* A5 |2 15| A8 */ A.A8, + A.RWQ, /* RWQ |3 14| A9 */ A.A9, + A.A1, /* A1 |4 82S16 13| CEQ */ A.CEQ, + A.A2, /* A2 |5 12| DO */ A.DO, + A.A3, /* A3 |6 11| DI */ A.DI, + A.A4, /* A4 |7 10| VCC */ A.VCC, + A.A0, /* A0 |8 9| GND */ A.GND + /* +--------------+ */ + ) +NETLIST_END() + NETLIST_START(ROMS_lib) @@ -270,6 +392,9 @@ NETLIST_START(ROMS_lib) LOCAL_LIB_ENTRY(PROM_82S126_DIP) LOCAL_LIB_ENTRY(PROM_74S287_DIP) LOCAL_LIB_ENTRY(EPROM_2716_DIP) + LOCAL_LIB_ENTRY(TTL_82S16_DIP) + LOCAL_LIB_ENTRY(PROM_82S115_DIP) + LOCAL_LIB_ENTRY(RAM_2102A_DIP) NETLIST_END() diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index a4b2766cd07..7df9f367100 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -1311,6 +1311,42 @@ static NETLIST_START(TTL_74379_DIP) ) NETLIST_END() +/* + * SN74LS629: VOLTAGE-CONTROLLED OSCILLATORS + * + * +--------------+ + * 2FC |1 ++ 16| VCC + * 1FC |2 15| QSC VCC + * 1RNG |3 14| 2RNG + * 1CX1 |4 74LS629 13| 2CX1 + * 1CX2 |5 12| 2CX2 + * 1ENQ |6 11| 2ENQ + * 1Y |7 10| 2Y + * OSC GND |8 9| GND + * +--------------+ + */ + +static NETLIST_START(SN74LS629_DIP) + SN74LS629(A, CAP_U(1)) + SN74LS629(B, CAP_U(1)) + + NET_C(A.GND, B.GND) + NET_C(A.VCC, B.VCC) + NC_PIN(NC) + + DIPPINS( /* +--------------+ */ + B.FC, /* 2FC |1 ++ 16| VCC */ NC.I, + A.FC, /* 1FC |2 15| OSC VCC */ A.VCC, + A.RNG, /* 1RNG |3 14| 2RNG */ B.RNG, + NC.I, /* 1CX1 |4 74LS629 13| 2CX1 */ NC.I, + NC.I, /* 1CX2 |5 12| 2CX2 */ NC.I, + A.ENQ, /* 1ENQ |6 11| 2ENQ */ B.ENQ, + B.Y, /* 1Y |7 10| 2Y */ B.Y, + A.GND, /* OSC GND |8 9| GND */ NC.I + /* +--------------+ */ + ) +NETLIST_END() + /* * DM9312: One of Eight Line Data Selectors/Multiplexers * @@ -1359,7 +1395,36 @@ static NETLIST_START(DM9312_DIP) ) NETLIST_END() -#if (NL_USE_TRUTHTABLE_7448) +/* SN7442: 4-Line BCD to 10-Line Decimal Decoder + * + * +--------------+ + * 0 |1 ++ 16| VCC + * 1 |2 15| A + * 2 |3 14| B + * 3 |4 13| C + * 4 |5 7442 12| D + * 5 |6 11| 9 + * 6 |7 10| 8 + * GND |8 9| 7 + * +--------------+ + */ + +static NETLIST_START(TTL_7442_DIP) + NET_REGISTER_DEV(TTL_7442, A) + + DIPPINS( /* +--------------+ */ + A.Q0, /* 0 |1 ++ 16| VCC */ A.VCC, + A.Q1, /* 1 |2 15| A */ A.A, + A.Q2, /* 2 |3 14| B */ A.B, + A.Q3, /* 3 |4 13| C */ A.C, + A.Q4, /* 4 |5 7442 12| D */ A.D, + A.Q5, /* 5 |6 11| 9 */ A.Q9, + A.Q6, /* 6 |7 10| 8 */ A.Q8, + A.GND, /* GND |8 9| 7 */ A.Q7 + /* +--------------+ */ + ) +NETLIST_END() + /* * DM7448: BCD to 7-Segment decoders/drivers @@ -1375,31 +1440,30 @@ NETLIST_END() * GND |8 9| e * +--------------+ * - * * Naming conventions follow National Semiconductor datasheet * */ -#ifndef __PLIB_PREPROCESSOR__ -#define TTL_7448_TT(name) \ - NET_REGISTER_DEV(TTL_7448_TT, name) -#endif static NETLIST_START(TTL_7448_DIP) - TTL_7448_TT(s) + +#if (NL_USE_TRUTHTABLE_7448) + NET_REGISTER_DEV(TTL_7448_TT, A) +#else + NET_REGISTER_DEV(TTL_7448, A) +#endif DIPPINS( /* +--------------+ */ - s.B, /* B |1 ++ 16| VCC */ s.VCC, - s.C, /* C |2 15| f */ s.f, - s.LTQ, /* LTQ |3 14| g */ s.g, - s.BIQ, /* BIQ |4 7448 13| a */ s.a, - s.RBIQ, /* RBIQ |5 12| b */ s.b, - s.D, /* D |6 11| c */ s.c, - s.A, /* A |7 10| d */ s.d, - s.GND, /* GND |8 9| e */ s.e + A.B, /* B |1 ++ 16| VCC */ A.VCC, + A.C, /* C |2 15| f */ A.f, + A.LTQ, /* LTQ |3 14| g */ A.g, + A.BIQ, /* BIQ |4 7448 13| a */ A.a, + A.RBIQ, /* RBIQ |5 12| b */ A.b, + A.D, /* D |6 11| c */ A.c, + A.A, /* A |7 10| d */ A.d, + A.GND, /* GND |8 9| e */ A.e /* +--------------+ */ ) NETLIST_END() -#endif NETLIST_START(TTL74XX_lib) NET_MODEL("DM7414 SCHMITT_TRIGGER(VTP=1.7 VTM=0.9 VI=4.35 RI=6.15k VOH=3.5 ROH=120 VOL=0.1 ROL=37.5 TPLH=15 TPHL=15)") @@ -1664,6 +1728,22 @@ NETLIST_START(TTL74XX_lib) TT_FAMILY("74XX") TRUTHTABLE_END() + TRUTHTABLE_START(TTL_7442, 4, 10, "") + TT_HEAD("D,C,B,A|0,1,2,3,4,5,6,7,8,9") + TT_LINE("0,0,0,0|0,1,1,1,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,0,0,1|1,0,1,1,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,0,1,0|1,1,0,1,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,0,1,1|1,1,1,0,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,1,0,0|1,1,1,1,0,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,1,0,1|1,1,1,1,1,0,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,1,1,0|1,1,1,1,1,1,0,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("0,1,1,1|1,1,1,1,1,1,1,0,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("1,0,0,0|1,1,1,1,1,1,1,1,0,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("1,0,0,1|1,1,1,1,1,1,1,1,1,0|30,30,30,30,30,30,30,30,30,30") + TT_LINE("1,0,1,X|1,1,1,1,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TT_LINE("1,1,X,X|1,1,1,1,1,1,1,1,1,1|30,30,30,30,30,30,30,30,30,30") + TRUTHTABLE_END() + #if (NL_USE_TRUTHTABLE_7448) TRUTHTABLE_START(TTL_7448, 7, 7, "+A,+B,+C,+D,+LTQ,+BIQ,+RBIQ,@VCC,@GND") TT_HEAD(" LTQ,BIQ,RBIQ, A , B , C , D | a, b, c, d, e, f, g") @@ -1941,9 +2021,8 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_7430_DIP) LOCAL_LIB_ENTRY(TTL_7432_DIP) LOCAL_LIB_ENTRY(TTL_7437_DIP) -#if (NL_USE_TRUTHTABLE_7448) + LOCAL_LIB_ENTRY(TTL_7442_DIP) LOCAL_LIB_ENTRY(TTL_7448_DIP) -#endif LOCAL_LIB_ENTRY(TTL_7486_DIP) LOCAL_LIB_ENTRY(TTL_74121_DIP) LOCAL_LIB_ENTRY(TTL_74123_DIP) @@ -1961,5 +2040,6 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_74377_DIP) LOCAL_LIB_ENTRY(TTL_74378_DIP) LOCAL_LIB_ENTRY(TTL_74379_DIP) + LOCAL_LIB_ENTRY(SN74LS629_DIP) LOCAL_LIB_ENTRY(DM9312_DIP) NETLIST_END() diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index f6a7da742b9..8476b5c9e85 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -245,6 +245,10 @@ NET_REGISTER_DEV(TTL_7437_DIP, name) +#define TTL_7442_DIP(name) \ + NET_REGISTER_DEV(TTL_7442_DIP, name) + + #if (NL_USE_TRUTHTABLE_7448) #define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \ NET_REGISTER_DEV(TTL_7448, name) \ @@ -257,12 +261,11 @@ NET_CONNECT(name, LTQ, cLTQ) \ NET_CONNECT(name, BIQ, cBIQ) \ NET_CONNECT(name, RBIQ, cRBIQ) +#endif #define TTL_7448_DIP(name) \ NET_REGISTER_DEV(TTL_7448_DIP, name) -#endif - #define TTL_7486_GATE(name) \ NET_REGISTER_DEV(TTL_7486_GATE, name) -- cgit v1.2.3 From d876f4cd824ac7d2ad4419ec3a1a2e7bbe6919bc Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 1 Aug 2020 18:25:22 +0200 Subject: netlist: Fix 74ls629 implementation and some cherry-picking issues. --- src/lib/netlist/devices/nld_7448.h | 6 +++-- src/lib/netlist/devices/nld_74ls629.cpp | 39 +++++++++++------------------ src/lib/netlist/devices/nld_74ls629.h | 4 +-- src/lib/netlist/devices/nlid_truthtable.cpp | 2 +- src/lib/netlist/macro/nlm_roms.h | 4 +++ src/lib/netlist/macro/nlm_ttl74xx.cpp | 8 +++--- src/lib/netlist/nl_base.h | 8 ++++++ src/mame/audio/nl_mario.cpp | 18 ++++++++----- 8 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/lib/netlist/devices/nld_7448.h b/src/lib/netlist/devices/nld_7448.h index e8899acdd96..c25c80136e7 100644 --- a/src/lib/netlist/devices/nld_7448.h +++ b/src/lib/netlist/devices/nld_7448.h @@ -28,8 +28,10 @@ #if !NL_AUTO_DEVICES #if !(NL_USE_TRUTHTABLE_7448) -#define TTL_7448(name) \ - NET_REGISTER_DEV(TTL_7448, name) \ +// usage : TTL_7448(name, pA, pB, pC, pD, pLTQ, pBIQ, pRBIQ) +// auto connect: VCC, GND +#define TTL_7448(...) \ + NET_REGISTER_DEVEXT(TTL_7448, __VA_ARGS__) #endif #endif diff --git a/src/lib/netlist/devices/nld_74ls629.cpp b/src/lib/netlist/devices/nld_74ls629.cpp index 4520cffb95e..31f4056fb39 100644 --- a/src/lib/netlist/devices/nld_74ls629.cpp +++ b/src/lib/netlist/devices/nld_74ls629.cpp @@ -46,24 +46,17 @@ namespace netlist { namespace devices { - NETLIB_OBJECT(SN74LS629clk) - { - NETLIB_CONSTRUCTOR(SN74LS629clk) - , m_FB(*this, "FB", NETLIB_DELEGATE(fb)) - , m_Y(*this, "Y") - , m_enableq(*this, "m_enableq", 1) - , m_out(*this, "m_out", 0) - , m_inc(*this, "m_inc", netlist_time::zero()) - , m_power_pins(*this) - { - connect(m_FB, m_Y); - } - NETLIB_RESETI() + struct SN74LS629clk + { + SN74LS629clk(device_t &owner) + : m_FB(owner, "FB", nldelegate(&SN74LS629clk::fb, this)) + , m_Y(owner, "Y") + , m_enableq(owner, "m_enableq", 0) + , m_out(owner, "m_out", 0) + , m_inc(owner, "m_inc", netlist_time::zero()) { - m_enableq = 0; - m_out = 0; - m_inc = netlist_time::zero(); + owner.connect(m_FB, m_Y); } public: @@ -73,7 +66,6 @@ namespace netlist state_var m_enableq; state_var m_out; state_var m_inc; - nld_power_pins m_power_pins; private: NETLIB_HANDLERI(fb) @@ -94,7 +86,7 @@ namespace netlist NETLIB_OBJECT(SN74LS629) { NETLIB_CONSTRUCTOR(SN74LS629) - , m_clock(*this, "OSC") + , m_clock(*this) , m_R_FC(*this, "R_FC") , m_R_RNG(*this, "R_RNG") , m_ENQ(*this, "ENQ", NETLIB_DELEGATE(inputs)) @@ -102,8 +94,9 @@ namespace netlist , m_FC(*this, "FC", NETLIB_DELEGATE(inputs)) , m_CAP(*this, "CAP", nlconst::magic(1e-6)) , m_power_pins(*this) + , m_power_pins_osc(*this, "OSCVCC", "OSCGND") { - connect(m_power_pins.GND(), m_R_FC.N()); + connect(m_power_pins_osc.GND(), m_R_FC.N()); connect(m_FC, m_R_FC.P()); connect(m_RNG, m_R_RNG.P()); @@ -116,7 +109,6 @@ namespace netlist { m_R_FC.set_R( nlconst::magic(90000.0)); m_R_RNG.set_R(nlconst::magic(90000.0)); - m_clock.reset(); } NETLIB_UPDATE_PARAMI() @@ -125,7 +117,7 @@ namespace netlist } public: - NETLIB_SUB(SN74LS629clk) m_clock; + SN74LS629clk m_clock; analog::NETLIB_SUB(R_base) m_R_FC; analog::NETLIB_SUB(R_base) m_R_RNG; @@ -135,6 +127,7 @@ namespace netlist param_fp_t m_CAP; nld_power_pins m_power_pins; + nld_power_pins m_power_pins_osc; private: NETLIB_HANDLERI(inputs) @@ -179,8 +172,6 @@ namespace netlist // FIXME: we need a possibility to remove entries from queue ... // or an exact model ... m_clock.m_inc = netlist_time::from_fp(nlconst::half() / freq); - - //NL_VERBOSE_OUT(("{1} {2} {3} {4}\n", name(), v_freq, v_rng, freq)); } if (!m_clock.m_enableq && m_ENQ()) @@ -199,7 +190,7 @@ namespace netlist }; - NETLIB_DEVICE_IMPL(SN74LS629, "SN74LS629", "CAP") + NETLIB_DEVICE_IMPL(SN74LS629, "SN74LS629", "CAP,@VCC,@GND") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_74ls629.h b/src/lib/netlist/devices/nld_74ls629.h index 4b8f3be0b6c..72ad5ad8b61 100644 --- a/src/lib/netlist/devices/nld_74ls629.h +++ b/src/lib/netlist/devices/nld_74ls629.h @@ -30,7 +30,7 @@ #include "netlist/nl_setup.h" -#define SN74LS629(name, p_cap) \ - NET_REGISTER_DEVEXT(SN74LS629, name, p_cap) +#define SN74LS629(name, ...) \ + NET_REGISTER_DEVEXT(SN74LS629, name,__VA_ARGS__) #endif /* NLD_74LS629_H_ */ diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp index c42e5b2ddb3..12219353283 100644 --- a/src/lib/netlist/devices/nlid_truthtable.cpp +++ b/src/lib/netlist/devices/nlid_truthtable.cpp @@ -678,7 +678,7 @@ namespace factory #define ENTRY(n, s) ENTRYY(n, 1, s); ENTRYY(n, 2, s); ENTRYY(n, 3, s); \ ENTRYY(n, 4, s); ENTRYY(n, 5, s); ENTRYY(n, 6, s); \ ENTRYY(n, 7, s); ENTRYY(n, 8, s); ENTRYY(n, 9, s); \ - ENTRYY(n, 10, s); + ENTRYY(n, 10, s) host_arena::unique_ptr truthtable_create(tt_desc &desc, properties &&props) { diff --git a/src/lib/netlist/macro/nlm_roms.h b/src/lib/netlist/macro/nlm_roms.h index d838d7a13b1..89deb48b81e 100644 --- a/src/lib/netlist/macro/nlm_roms.h +++ b/src/lib/netlist/macro/nlm_roms.h @@ -30,6 +30,10 @@ #define EPROM_2716_DIP(name) \ NET_REGISTER_DEV(EPROM_2716_DIP, name) +// usage : TTL_82S16_DIP(name) +#define TTL_82S16_DIP(...) \ + NET_REGISTER_DEVEXT(TTL_82S16_DIP, __VA_ARGS__) + #endif // NL_AUTO_DEVICES diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 7df9f367100..49c585b0192 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -1332,17 +1332,19 @@ static NETLIST_START(SN74LS629_DIP) NET_C(A.GND, B.GND) NET_C(A.VCC, B.VCC) + NET_C(A.OSCGND, B.OSCGND) + NET_C(A.OSCVCC, B.OSCVCC) NC_PIN(NC) DIPPINS( /* +--------------+ */ - B.FC, /* 2FC |1 ++ 16| VCC */ NC.I, - A.FC, /* 1FC |2 15| OSC VCC */ A.VCC, + B.FC, /* 2FC |1 ++ 16| VCC */ A.VCC, + A.FC, /* 1FC |2 15| OSC VCC */ A.OSCVCC, A.RNG, /* 1RNG |3 14| 2RNG */ B.RNG, NC.I, /* 1CX1 |4 74LS629 13| 2CX1 */ NC.I, NC.I, /* 1CX2 |5 12| 2CX2 */ NC.I, A.ENQ, /* 1ENQ |6 11| 2ENQ */ B.ENQ, B.Y, /* 1Y |7 10| 2Y */ B.Y, - A.GND, /* OSC GND |8 9| GND */ NC.I + A.OSCGND, /* OSC GND |8 9| GND */ A.GND /* +--------------+ */ ) NETLIST_END() diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 0cbe58c1a92..b6f5da80461 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -369,6 +369,14 @@ namespace netlist { } + // Some devices like the 74LS629 have two pairs of supply pins. + explicit nld_power_pins(device_t &owner, + const pstring &vcc, const pstring &gnd) + : m_VCC(owner, vcc, NETLIB_DELEGATE(noop)) + , m_GND(owner, gnd, NETLIB_DELEGATE(noop)) + { + } + const analog_input_t &VCC() const noexcept { return m_VCC; diff --git a/src/mame/audio/nl_mario.cpp b/src/mame/audio/nl_mario.cpp index 5b427e48314..a009988fff5 100644 --- a/src/mame/audio/nl_mario.cpp +++ b/src/mame/audio/nl_mario.cpp @@ -53,14 +53,16 @@ static NETLIST_START(nl_mario_snd0) SN74LS629(1J_A, CAP_N(3.9)) NET_C(1J_A.RNG, V5) NET_C(1J_A.ENQ, ttllow) - NET_C(GND, 1J_A.GND) + NET_C(GND, 1J_A.OSCGND) + NET_C(VCC, 1J_A.OSCVCC) // #define MR_C17 CAP_N(22) /* verified */ SN74LS629(2J_A, CAP_N(22)) NET_C(2J_A.RNG, V5) NET_C(2J_A.ENQ, ttllow) - NET_C(GND, 2J_A.GND) + NET_C(GND, 2J_A.OSCGND) + NET_C(VCC, 2J_A.OSCVCC) TTL_7486_XOR(1K_A, 1J_A.Y, 2J_A.Y) TTL_7408_AND(2K_A, 2H_A.Q, 1K_A) @@ -99,12 +101,14 @@ static NETLIST_START(nl_mario_snd1) SN74LS629(1J_B, CAP_N(39)) /* C5 */ NET_C(1J_B.RNG, V5) NET_C(1J_B.ENQ, ttllow) - NET_C(GND, 1J_B.GND) + NET_C(GND, 1J_B.OSCGND) + NET_C(VCC, 1J_B.OSCVCC) SN74LS629(2J_B, CAP_N(6.8)) /* C16 */ NET_C(2J_B.RNG, V5) NET_C(2J_B.ENQ, ttllow) - NET_C(GND, 2J_B.GND) + NET_C(GND, 2J_B.OSCGND) + NET_C(VCC, 2J_B.OSCVCC) TTL_7486_XOR(1K_B, 1J_B.Y, 2J_B.Y) TTL_7408_AND(2K_B, 2H_B.Q, 1K_B) @@ -139,7 +143,8 @@ static NETLIST_START(nl_mario_snd7) SN74LS629(4K_A, CAP_U(0.022)) NET_C(4K_A.RNG, V5) NET_C(4K_A.ENQ, ttllow) - NET_C(GND, 4K_A.GND) + NET_C(GND, 4K_A.OSCGND) + NET_C(VCC, 4K_A.OSCVCC) NET_C(R65.1, 4J_A.Q) NET_C(R65.2, 4K_A.FC, C44.1) NET_C(C44.2, GND) @@ -153,7 +158,8 @@ static NETLIST_START(nl_mario_snd7) SN74LS629(4K_B, CAP_U(0.0047)) NET_C(4K_B.RNG, V5) NET_C(4K_B.ENQ, ttllow) - NET_C(GND, 4K_B.GND) + NET_C(GND, 4K_B.OSCGND) + NET_C(VCC, 4K_B.OSCVCC) NET_C(R64.1, 4J_B.Q) NET_C(R64.2, 4K_B.FC, C43.1) NET_C(C43.2, GND) -- cgit v1.2.3 From 15172f15ca9543611ee2e180ea0e492a0449d791 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 1 Aug 2020 18:25:37 +0200 Subject: netlist: Disable dangerous optimization. * This was an over-aggressive optimization. Now prints an info and recommends to comment out if appropriate. --- src/lib/netlist/nl_errstr.h | 2 +- src/lib/netlist/nl_setup.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h index 52746d29b03..983c2972743 100644 --- a/src/lib/netlist/nl_errstr.h +++ b/src/lib/netlist/nl_errstr.h @@ -111,7 +111,7 @@ namespace netlist "but has been forced to act as a logic output. Parameter " " FORCE_TRISTATE_LOGIC for device {2} needs to be disabled!.") - PERRMSGV(MI_REMOVE_DEVICE_1_CONNECTED_ONLY_TO_RAILS_2_3, 3, "Found device {1} connected only to railterminals {2}/{3}. Will be removed") + PERRMSGV(MI_REMOVE_DEVICE_1_CONNECTED_ONLY_TO_RAILS_2_3, 3, "Found device {1} connected only to railterminals {2}/{3}. Please consider commenting those out.") PERRMSGV(MW_DATA_1_NOT_FOUND, 1, "unable to find data {1} in sources collection") diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp index a83723e00d6..46b04d902dc 100644 --- a/src/lib/netlist/nl_setup.cpp +++ b/src/lib/netlist/nl_setup.cpp @@ -1593,9 +1593,12 @@ void setup_t::prepare_to_run() { log().info(MI_REMOVE_DEVICE_1_CONNECTED_ONLY_TO_RAILS_2_3( t->name(), t->N().net().name(), t->P().net().name())); + // The following would remove internal devices in e.g. MOSFETs as well. +#if 0 remove_terminal(t->setup_N().net(), t->setup_N()); remove_terminal(t->setup_P().net(), t->setup_P()); m_nlstate.remove_device(t); +#endif } } -- cgit v1.2.3 From 04878586929cfca7a2c64fe51612793c8bb84195 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 1 Aug 2020 18:25:54 +0200 Subject: netlist: More dip macros and device refactoring * Updated 7450, 7473/7473A, 7474, 7475/7477 devices to use DIP macros instead of C++ DIPs. * Reworked 7475/7477 more in the style of 7474, leveraging system signal activation and edge detection. --- src/lib/netlist/devices/net_lib.cpp | 10 +- src/lib/netlist/devices/nld_7450.cpp | 34 ------ src/lib/netlist/devices/nld_7450.h | 14 +-- src/lib/netlist/devices/nld_7473.cpp | 64 ----------- src/lib/netlist/devices/nld_7473.h | 22 +--- src/lib/netlist/devices/nld_7474.cpp | 34 ------ src/lib/netlist/devices/nld_7474.h | 14 +-- src/lib/netlist/devices/nld_7475.cpp | 197 ++++++---------------------------- src/lib/netlist/devices/nld_7475.h | 26 +---- src/lib/netlist/macro/nlm_ttl74xx.cpp | 194 +++++++++++++++++++++++++++++++++ src/lib/netlist/macro/nlm_ttl74xx.h | 18 ++++ 11 files changed, 260 insertions(+), 367 deletions(-) diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 0e585a92972..40510225b82 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -74,17 +74,11 @@ namespace devices LIB_ENTRY(7448) #endif LIB_ENTRY(7450) - LIB_ENTRY(7450_dip) LIB_ENTRY(7473) - LIB_ENTRY(7473_dip) LIB_ENTRY(7473A) - LIB_ENTRY(7473A_dip) LIB_ENTRY(7474) - LIB_ENTRY(7474_dip) - LIB_ENTRY(7475) - LIB_ENTRY(7475_dip) - LIB_ENTRY(7477) - LIB_ENTRY(7477_dip) + LIB_ENTRY(7475_GATE) + LIB_ENTRY(7477_GATE) LIB_ENTRY(7483) LIB_ENTRY(7483_dip) LIB_ENTRY(7485) diff --git a/src/lib/netlist/devices/nld_7450.cpp b/src/lib/netlist/devices/nld_7450.cpp index 5099ec5eea1..1bca5128d44 100644 --- a/src/lib/netlist/devices/nld_7450.cpp +++ b/src/lib/netlist/devices/nld_7450.cpp @@ -71,41 +71,7 @@ namespace netlist nld_power_pins m_power_pins; }; - NETLIB_OBJECT(7450_dip) - { - NETLIB_CONSTRUCTOR(7450_dip) - , m_A(*this, "A") - , m_B(*this, "B") - { - register_subalias("1", m_A.m_A); - register_subalias("2", m_B.m_A); - register_subalias("3", m_B.m_B); - register_subalias("4", m_B.m_C); - register_subalias("5", m_B.m_D); - register_subalias("6", m_B.m_Q); - register_subalias("7", "A.GND"); - - register_subalias("8", m_A.m_Q); - register_subalias("9", m_A.m_C); - register_subalias("10", m_A.m_D); - //register_subalias("11", m_1.m_X1); - //register_subalias("12", m_1.m_X1Q); - register_subalias("13", m_A.m_B); - register_subalias("14", "A.VCC"); - - connect("A.GND", "B.GND"); - connect("A.VCC", "B.VCC"); - - } - //NETLIB_RESETI(); - //NETLIB_UPDATEI(); - - NETLIB_SUB(7450) m_A; - NETLIB_SUB(7450) m_B; - }; - NETLIB_DEVICE_IMPL(7450, "TTL_7450_ANDORINVERT", "+A,+B,+C,+D,@VCC,@GND") - NETLIB_DEVICE_IMPL(7450_dip, "TTL_7450_DIP", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_7450.h b/src/lib/netlist/devices/nld_7450.h index 431eaaaa65d..1e30d9ec856 100644 --- a/src/lib/netlist/devices/nld_7450.h +++ b/src/lib/netlist/devices/nld_7450.h @@ -26,16 +26,8 @@ #include "netlist/nl_setup.h" -#define TTL_7450_ANDORINVERT(name, cI1, cI2, cI3, cI4) \ - NET_REGISTER_DEV(TTL_7450_ANDORINVERT, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, A, cI1) \ - NET_CONNECT(name, B, cI2) \ - NET_CONNECT(name, C, cI3) \ - NET_CONNECT(name, D, cI4) - -#define TTL_7450_DIP(name) \ - NET_REGISTER_DEV(TTL_7450_DIP, name) +// usage: TTL_7450_ANDORINVERT(name, cI1, cI2, cI3, cI4) +#define TTL_7450_ANDORINVERT(...) \ + NET_REGISTER_DEVEXT(TTL_7450_ANDORINVERT, __VA_ARGS__) #endif /* NLD_7450_H_ */ diff --git a/src/lib/netlist/devices/nld_7473.cpp b/src/lib/netlist/devices/nld_7473.cpp index d724ca16a3b..2b7d803eb35 100644 --- a/src/lib/netlist/devices/nld_7473.cpp +++ b/src/lib/netlist/devices/nld_7473.cpp @@ -85,72 +85,8 @@ namespace netlist }; - NETLIB_OBJECT(7473_dip) - { - NETLIB_CONSTRUCTOR(7473_dip) - , m_A(*this, "A") - , m_B(*this, "B") - { - register_subalias("1", m_A.m_CLK); - register_subalias("2", m_A.m_CLRQ); - register_subalias("3", m_A.m_K); - register_subalias("4", "A.VCC"); - register_subalias("5", m_B.m_CLK); - register_subalias("6", m_B.m_CLRQ); - register_subalias("7", m_B.m_J); - - register_subalias("8", m_B.m_QQ); - register_subalias("9", m_B.m_Q); - register_subalias("10", m_B.m_K); - register_subalias("11", "A.GND"); - register_subalias("12", m_B.m_Q); - register_subalias("13", m_A.m_QQ); - register_subalias("14", m_A.m_J); - - connect("A.GND", "B.GND"); - connect("A.VCC", "B.VCC"); - } - - private: - NETLIB_SUB(7473) m_A; - NETLIB_SUB(7473) m_B; - }; - - NETLIB_OBJECT(7473A_dip) - { - NETLIB_CONSTRUCTOR(7473A_dip) - , m_A(*this, "A") - , m_B(*this, "B") - { - register_subalias("1", m_A.m_CLK); - register_subalias("2", m_A.m_CLRQ); - register_subalias("3", m_A.m_K); - register_subalias("4", "A.VCC"); - register_subalias("5", m_B.m_CLK); - register_subalias("6", m_B.m_CLRQ); - register_subalias("7", m_B.m_J); - - register_subalias("8", m_B.m_QQ); - register_subalias("9", m_B.m_Q); - register_subalias("10", m_B.m_K); - register_subalias("11", "A.GND"); - register_subalias("12", m_B.m_Q); - register_subalias("13", m_A.m_QQ); - register_subalias("14", m_A.m_J); - - connect("A.GND", "B.GND"); - connect("A.VCC", "B.VCC"); - } - - private: - NETLIB_SUB(7473A) m_A; - NETLIB_SUB(7473A) m_B; - }; - NETLIB_DEVICE_IMPL(7473, "TTL_7473", "+CLK,+J,+K,+CLRQ,@VCC,@GND") NETLIB_DEVICE_IMPL(7473A, "TTL_7473A", "+CLK,+J,+K,+CLRQ,@VCC,@GND") - NETLIB_DEVICE_IMPL(7473_dip, "TTL_7473_DIP", "") - NETLIB_DEVICE_IMPL(7473A_dip, "TTL_7473A_DIP", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_7473.h b/src/lib/netlist/devices/nld_7473.h index e0dc8bdb428..1a5e6937ea5 100644 --- a/src/lib/netlist/devices/nld_7473.h +++ b/src/lib/netlist/devices/nld_7473.h @@ -62,23 +62,11 @@ #include "netlist/nl_setup.h" -#define TTL_7473(name, cCLK, cJ, cK, cCLRQ) \ - NET_REGISTER_DEV(TTL_7473, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, CLK, cCLK) \ - NET_CONNECT(name, J, cJ) \ - NET_CONNECT(name, K, cK) \ - NET_CONNECT(name, CLRQ, cCLRQ) +// usage: TTL_7473(name, cCLK, cJ, cK, cCLRQ) +#define TTL_7473(...) \ + NET_REGISTER_DEVEXT(TTL_7473, __VA_ARGS__) -#define TTL_7473A(name, cCLK, cJ, cK, cCLRQ) \ - TTL_7473(name, cCLK, cJ, cK, cCLRQ) - -#define TTL_7473_DIP(name) \ - NET_REGISTER_DEV(TTL_7473_DIP, name) - - -#define TTL_7473A_DIP(name) \ - NET_REGISTER_DEV(TTL_7473A_DIP, name) +#define TTL_7473A(...) \ + TTL_7473(__VA_ARGS__) #endif /* NLD_7473_H_ */ diff --git a/src/lib/netlist/devices/nld_7474.cpp b/src/lib/netlist/devices/nld_7474.cpp index ac01a769f1e..5b2f2b4a589 100644 --- a/src/lib/netlist/devices/nld_7474.cpp +++ b/src/lib/netlist/devices/nld_7474.cpp @@ -82,41 +82,7 @@ namespace netlist } }; - NETLIB_OBJECT(7474_dip) - { - NETLIB_CONSTRUCTOR(7474_dip) - , m_A(*this, "A") - , m_B(*this, "B") - { - register_subalias("1", "A.CLRQ"); - register_subalias("2", "A.D"); - register_subalias("3", "A.CLK"); - register_subalias("4", "A.PREQ"); - register_subalias("5", "A.Q"); - register_subalias("6", "A.QQ"); - register_subalias("7", "A.GND"); - - register_subalias("8", "B.QQ"); - register_subalias("9", "B.Q"); - register_subalias("10", "B.PREQ"); - register_subalias("11", "B.CLK"); - register_subalias("12", "B.D"); - register_subalias("13", "B.CLRQ"); - register_subalias("14", "A.VCC"); - - connect("A.GND", "B.GND"); - connect("A.VCC", "B.VCC"); - } - //NETLIB_UPDATEI(); - //NETLIB_RESETI(); - - private: - NETLIB_SUB(7474) m_A; - NETLIB_SUB(7474) m_B; - }; - NETLIB_DEVICE_IMPL(7474, "TTL_7474", "+CLK,+D,+CLRQ,+PREQ,@VCC,@GND") - NETLIB_DEVICE_IMPL(7474_dip, "TTL_7474_DIP", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_7474.h b/src/lib/netlist/devices/nld_7474.h index ccf75b42c6b..ffe0c046405 100644 --- a/src/lib/netlist/devices/nld_7474.h +++ b/src/lib/netlist/devices/nld_7474.h @@ -44,16 +44,8 @@ #include "netlist/nl_setup.h" -#define TTL_7474(name, cCLK, cD, cCLRQ, cPREQ) \ - NET_REGISTER_DEV(TTL_7474, name) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, CLK, cCLK) \ - NET_CONNECT(name, D, cD) \ - NET_CONNECT(name, CLRQ, cCLRQ) \ - NET_CONNECT(name, PREQ, cPREQ) - -#define TTL_7474_DIP(name) \ - NET_REGISTER_DEV(TTL_7474_DIP, name) +// usage: TTL_7474(name, cCLK, cD, cCLRQ, cPREQ) +#define TTL_7474(...) \ + NET_REGISTER_DEVEXT(TTL_7474, __VA_ARGS__) #endif /* NLD_7474_H_ */ diff --git a/src/lib/netlist/devices/nld_7475.cpp b/src/lib/netlist/devices/nld_7475.cpp index e80326c8cb1..0ddf97eaaec 100644 --- a/src/lib/netlist/devices/nld_7475.cpp +++ b/src/lib/netlist/devices/nld_7475.cpp @@ -13,197 +13,62 @@ namespace netlist { namespace devices { - NETLIB_OBJECT(7477) + template + NETLIB_OBJECT(7475_GATE_BASE) { - NETLIB_CONSTRUCTOR(7477) - , m_C1C2(*this, "C1C2", NETLIB_DELEGATE(inputs)) - , m_C3C4(*this, "C3C4", NETLIB_DELEGATE(inputs)) - , m_last_Q(*this, "m_last_Q", 0) - , m_D(*this, {"D1", "D2", "D3", "D4"}, NETLIB_DELEGATE(inputs)) - , m_Q(*this, {"Q1", "Q2", "Q3", "Q4"}) + NETLIB_CONSTRUCTOR(7475_GATE_BASE) + , m_D(*this, "D", NETLIB_DELEGATE(inputs)) + , m_CLK(*this, "CLK", NETLIB_DELEGATE(clk)) + , m_Q(*this, "Q") + , m_QQ(*this, "QQ") + , m_nextD(*this, "m_nextD", 0) , m_power_pins(*this) { - register_subalias("Q1", m_Q[0]); } NETLIB_RESETI() { - m_last_Q = 0; + m_CLK.set_state(logic_t::STATE_INP_LH); + m_nextD = 0; } - NETLIB_HANDLERI(inputs) + NETLIB_HANDLERI(clk) { - netlist_sig_t c1c2 = m_C1C2(); - netlist_sig_t c3c4 = m_C3C4(); - if (c1c2 && c3c4) - { - update_outputs(0, 4); - } - else if (c1c2) - { - update_outputs(0, 2); - } - else if (c3c4) - { - update_outputs(2, 4); - } - + newstate(m_nextD, !m_nextD); + m_CLK.inactivate(); } - void update_outputs(std::size_t start, std::size_t end) + NETLIB_HANDLERI(inputs) { - for (std::size_t i=start; i> i) & 1)) - m_Q[i].push(d, d != 0 ? NLTIME_FROM_NS(30) : NLTIME_FROM_NS(25)); - m_last_Q &= ~(1 << i); - m_last_Q |= d << i; - } + m_nextD = m_D(); + m_CLK.activate_lh(); } - friend class NETLIB_NAME(7477_dip); - friend class NETLIB_NAME(7475_dip); - // FIXME: needs cleanup - friend class NETLIB_NAME(7475); private: - logic_input_t m_C1C2; - logic_input_t m_C3C4; - state_var m_last_Q; - object_array_t m_D; - object_array_t m_Q; - nld_power_pins m_power_pins; - }; - - NETLIB_OBJECT(7475) - { - NETLIB_CONSTRUCTOR(7475) - , m_C1C2(*this, "C1C2", NETLIB_DELEGATE(inputs)) - , m_C3C4(*this, "C3C4", NETLIB_DELEGATE(inputs)) - , m_last_Q(*this, "m_last_Q", 0) - , m_D(*this, {"D1", "D2", "D3", "D4"}, NETLIB_DELEGATE(inputs)) - , m_Q(*this, {"Q1", "Q2", "Q3", "Q4"}) - , m_QQ(*this, {"QQ1", "QQ2", "QQ3", "QQ4"}) - , m_power_pins(*this) - { - register_subalias("Q1", m_Q[0]); - } - - NETLIB_RESETI() - { - m_last_Q = 0; - } - - NETLIB_HANDLERI(inputs) - { - unsigned start_q = m_last_Q; + logic_input_t m_D; + logic_input_t m_CLK; + logic_output_t m_Q; + logic_output_t m_QQ; - netlist_sig_t c1c2 = m_C1C2(); - netlist_sig_t c3c4 = m_C3C4(); - if (c1c2 && c3c4) - { - update_outputs(0, 4); - } - else if (c1c2) - { - update_outputs(0, 2); - } - else if (c3c4) - { - update_outputs(2, 4); - } + state_var m_nextD; - for (std::size_t i=0; i<4; i++) - { - unsigned last_bit = (m_last_Q >> i) & 1; - unsigned start_bit = (start_q >> i) & 1; - if (last_bit != start_bit) - m_QQ[i].push(last_bit ^ 1, last_bit != 0 ? NLTIME_FROM_NS(15) : NLTIME_FROM_NS(40)); - } - } - - void update_outputs(std::size_t start, std::size_t end) - { - for (std::size_t i=start; i> i) & 1)) - m_Q[i].push(d, d != 0 ? NLTIME_FROM_NS(30) : NLTIME_FROM_NS(25)); - m_last_Q &= ~(1 << i); - m_last_Q |= d << i; - } - } - - friend class NETLIB_NAME(7477_dip); - friend class NETLIB_NAME(7475_dip); - private: - logic_input_t m_C1C2; - logic_input_t m_C3C4; - state_var m_last_Q; - object_array_t m_D; - object_array_t m_Q; - object_array_t m_QQ; nld_power_pins m_power_pins; - }; - NETLIB_OBJECT(7475_dip) - { - NETLIB_CONSTRUCTOR(7475_dip) - , A(*this, "A") + void newstate(const netlist_sig_t stateQ, const netlist_sig_t stateQQ) { - register_subalias("1", A.m_QQ[0]); - register_subalias("2", A.m_D[0]); - register_subalias("3", A.m_D[1]); - register_subalias("4", A.m_C3C4); - register_subalias("5", "A.VCC"); - register_subalias("6", A.m_D[2]); - register_subalias("7", A.m_D[3]); - register_subalias("8", A.m_QQ[3]); - - register_subalias("9", A.m_Q[3]); - register_subalias("10", A.m_Q[2]); - register_subalias("11", A.m_QQ[2]); - register_subalias("12", "A.GND"); - register_subalias("13", A.m_C1C2); - register_subalias("14", A.m_QQ[1]); - register_subalias("15", A.m_Q[1]); - register_subalias("16", A.m_Q[0]); + // 0: High-to-low 40 ns, 1: Low-to-high 25 ns + static constexpr const std::array delay = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + m_Q.push(stateQ, delay[stateQ]); + if (_HasQQ) + m_QQ.push(stateQQ, delay[stateQQ]); } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(7475) A; }; - NETLIB_OBJECT(7477_dip) - { - NETLIB_CONSTRUCTOR(7477_dip) - , A(*this, "A") - { - register_subalias("1", A.m_D[0]); - register_subalias("2", A.m_D[1]); - register_subalias("3", A.m_C3C4); - register_subalias("4", "A.VCC"); - register_subalias("5", A.m_D[2]); - register_subalias("6", A.m_D[3]); - //register_subalias("7", ); ==> NC - - register_subalias("8", A.m_Q[3]); - register_subalias("9", A.m_Q[2]); - //register_subalias("10", ); ==> NC - register_subalias("11", "A.GND"); - register_subalias("12", A.m_C1C2); - register_subalias("13", A.m_Q[1]); - register_subalias("14", A.m_Q[0]); - } - //NETLIB_RESETI() {} - private: - NETLIB_SUB(7477) A; - }; + using NETLIB_NAME(7475_GATE) = NETLIB_NAME(7475_GATE_BASE); + using NETLIB_NAME(7477_GATE) = NETLIB_NAME(7475_GATE_BASE); - NETLIB_DEVICE_IMPL(7475, "TTL_7475", "") - NETLIB_DEVICE_IMPL(7475_dip, "TTL_7475_DIP", "") - NETLIB_DEVICE_IMPL(7477, "TTL_7477", "") - NETLIB_DEVICE_IMPL(7477_dip, "TTL_7477_DIP", "") + NETLIB_DEVICE_IMPL(7475_GATE, "TTL_7475_GATE", "") + NETLIB_DEVICE_IMPL(7477_GATE, "TTL_7477_GATE", "") } //namespace devices } // namespace netlist diff --git a/src/lib/netlist/devices/nld_7475.h b/src/lib/netlist/devices/nld_7475.h index 78ece9ff443..2e0abd97b4c 100644 --- a/src/lib/netlist/devices/nld_7475.h +++ b/src/lib/netlist/devices/nld_7475.h @@ -37,28 +37,10 @@ #include "netlist/nl_setup.h" -#define PARAMS_7475_7477(name, cC1C2, cC3C4, cD1, cD2, cD3, cD4) \ - NET_CONNECT(name, GND, GND) \ - NET_CONNECT(name, VCC, VCC) \ - NET_CONNECT(name, C1C2, cC1C2) \ - NET_CONNECT(name, C3C4, cC3C4) \ - NET_CONNECT(name, D1, cD1) \ - NET_CONNECT(name, D2, cD2) \ - NET_CONNECT(name, D3, cD3) \ - NET_CONNECT(name, D4, cD4) +#define TTL_7475_GATE(...) \ + NET_REGISTER_DEVEXT(TTL_7475_GATE, __VA_ARGS__) -#define TTL_7475(name, cC1C2, cC3C4, cD1, cD2, cD3, cD4) \ - NET_REGISTER_DEV(TTL_7475, name) \ - PARAMS_7475_7477(name, cC1C2, cC3C4, cD1, cD2, cD3, cD4) - -#define TTL_7477(name, cC1C2, cC3C4, cD1, cD2, cD3, cD4) \ - NET_REGISTER_DEV(TTL_7477, name) \ - PARAMS_7475_7477(name, cC1C2, cC3C4, cD1, cD2, cD3, cD4) - -#define TTL_7475_DIP(name) \ - NET_REGISTER_DEV(TTL_7475_DIP, name) - -#define TTL_7477_DIP(name) \ - NET_REGISTER_DEV(TTL_7477_DIP, name) +#define TTL_7477_GATE(...) \ + NET_REGISTER_DEVEXT(TTL_7477_GATE, __VA_ARGS__) #endif /* NLD_7475_H_ */ diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 49c585b0192..2690e9cad5f 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -682,6 +682,194 @@ static NETLIST_START(TTL_7437_DIP) ) NETLIST_END() +/* + * DM7450: DUAL 2-WIDE 2-INPUT AND-OR-INVERT GATES (ONE GATE EXPANDABLE) + * + * +--------------+ + * 1A |1 ++ 14| VCC + * 2A |2 13| 1B + * 2B |3 12| 1XQ + * 2C |4 7450 11| 1X + * 2D |5 10| 1D + * 2Y |6 9| 1C + * GND |7 8| 1Y + * +--------------+ +*/ + +static NETLIST_START(TTL_7450_DIP) + TTL_7450_ANDORINVERT(A) + TTL_7450_ANDORINVERT(B) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) + NC_PIN(NC) + + DIPPINS( /* +--------------+ */ + A.A, /* 1A |1 ++ 14| VCC */ A.VCC, + B.A, /* 2A |2 13| 1B */ A.B, + B.B, /* 2B |3 12| 1XQ */ NC.I, + B.C, /* 2C |4 7450 11| 1X */ NC.I, + B.D, /* 2D |5 10| 1D */ A.D, + B.Q, /* 2Y |6 9| 1C */ A.C, + A.GND,/* GND |7 8| 1Y */ A.Q + /* +--------------+ */ + ) +NETLIST_END() + +/* + * 7473: Dual Master-Slave J-K Flip-Flops with Clear and Complementary Outputs + * 7473A: Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flops with Clear and Complementary Outputs + * + * +----------+ + * 1CLK |1 ++ 14| 1J + * 1CLRQ |2 13| 1QQ + * 1K |3 12| 1Q + * VCC |4 7473 11| GND + * 2CLK |5 10| 2K + * 2CLRQ |6 9| 2Q + * 2J |7 8| 2QQ + * +----------+ + */ + +static NETLIST_START(TTL_7473_DIP) + TTL_7473(A) + TTL_7473(B) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) + + DIPPINS( /* +----------+ */ + A.CLK, /* 1CLK |1 ++ 14| 1J */ A.J, + A.CLRQ, /* 1CLRQ |2 13| 1QQ */ A.QQ, + A.K, /* 1K |3 12| 1Q */ A.Q, + A.VCC, /* VCC |4 7473 11| GND */ A.GND, + B.CLK, /* 2CLK |5 10| 2K */ B.K, + B.CLRQ, /* 2CLRQ |6 9| 2Q */ B.Q, + B.J, /* 2J |7 8| 2QQ */ B.QQ + /* +----------+ */ + ) +NETLIST_END() + +static NETLIST_START(TTL_7473A_DIP) + TTL_7473A(A) + TTL_7473A(B) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) + + DIPPINS( /* +----------+ */ + A.CLK, /* 1CLK |1 ++ 14| 1J */ A.J, + A.CLRQ, /* 1CLRQ |2 13| 1QQ */ A.QQ, + A.K, /* 1K |3 12| 1Q */ A.Q, + A.VCC, /* VCC |4 7473A 11| GND */ A.GND, + B.CLK, /* 2CLK |5 10| 2K */ B.K, + B.CLRQ, /* 2CLRQ |6 9| 2Q */ B.Q, + B.J, /* 2J |7 8| 2QQ */ B.QQ + /* +----------+ */ + ) +NETLIST_END() + +/* + * DM7474: Dual Positive-Edge-Triggered D Flip-Flops + * with Preset, Clear and Complementary Outputs + * + * +--------------+ + * CLR1 |1 ++ 14| VCC + * D1 |2 13| CLR2 + * CLK1 |3 12| D2 + * PR1 |4 7474 11| CLK2 + * Q1 |5 10| PR2 + * Q1Q |6 9| Q2 + * GND |7 8| Q2Q + * +--------------+ + */ + +static NETLIST_START(TTL_7474_DIP) + TTL_7474(A) + TTL_7474(B) + + NET_C(A.VCC, B.VCC) + NET_C(A.GND, B.GND) + + DIPPINS( /* +--------------+ */ + A.CLRQ, /* CLR1 |1 ++ 14| VCC */ A.VCC, + A.D, /* D1 |2 13| CLR2 */ B.CLRQ, + A.CLK, /* CLK1 |3 12| D2 */ B.D, + A.PREQ, /* PR1 |4 7474 11| CLK2 */ B.CLK, + A.Q, /* Q1 |5 10| PR2 */ B.PREQ, + A.QQ, /* Q1Q |6 9| Q2 */ B.Q, + A.GND, /* GND |7 8| Q2Q */ B.QQ + /* +-------------+ */ + ) +NETLIST_END() + +/* + * 7475: 4-Bit Bistable Latches with Complementary Outputs + * 7477: 4-Bit Bistable Latches + * + * +----------+ +----------+ + * 1QQ |1 ++ 16| 1Q 1D |1 ++ 14| 1Q + * 1D |2 15| 2Q 2D |2 13| 2Q + * 2D |3 14| 2QQ 3C4C |3 12| 1C2C + * 3C4C |4 7475 13| 1C2C VCC |4 7477 11| GND + * VCC |5 12| GND 3D |5 10| NC + * 3D |6 11| 3QQ 4D |6 9| 3Q + * 4D |7 10| 3Q NC |7 8| 4Q + * 4QQ |8 9| 4Q +----------+ + * +----------+ + */ + +static NETLIST_START(TTL_7475_DIP) + TTL_7475_GATE(A) + TTL_7475_GATE(B) + TTL_7475_GATE(C) + TTL_7475_GATE(D) + + NET_C(A.VCC, B.VCC, C.VCC, D.VCC) + NET_C(A.GND, B.GND, C.GND, D.GND) + + NET_C(A.CLK, B.CLK) + NET_C(C.CLK, D.CLK) + + DIPPINS( /* +----------+ */ + A.QQ, /* 1QQ |1 ++ 16| 1Q */ A.Q, + A.D, /* 1D |2 15| 2Q */ B.Q, + B.D, /* 2D |3 14| 2QQ */ B.QQ, + C.CLK, /* 3C4C |4 7475 13| 1C2C */ A.CLK, + A.VCC, /* VCC |5 12| GND */ A.GND, + C.D, /* 3D |6 11| 3QQ */ C.QQ, + D.D, /* 4D |7 10| 3Q */ C.Q, + D.QQ, /* 4QQ |8 9| 4Q */ D.Q + /* +----------+ */ + ) +NETLIST_END() + +static NETLIST_START(TTL_7477_DIP) + TTL_7477_GATE(A) + TTL_7477_GATE(B) + TTL_7477_GATE(C) + TTL_7477_GATE(D) + + NET_C(A.VCC, B.VCC, C.VCC, D.VCC) + NET_C(A.GND, B.GND, C.GND, D.GND) + + NET_C(A.CLK, B.CLK) + NET_C(C.CLK, D.CLK) + + NC_PIN(NC) + + DIPPINS( /* +----------+ */ + A.D, /* 1D |1 ++ 14| 1Q */ A.Q, + B.D, /* 2D |2 13| 2Q */ B.Q, + C.CLK, /* 3C4C |3 12| 1C2C */ A.CLK, + A.VCC, /* VCC |4 7477 11| GND */ A.GND, + C.D, /* 3D |5 10| NC */ NC.I, + D.D, /* 4D |6 9| 3Q */ C.Q, + NC.I, /* NC |7 8| 4Q */ D.Q + /* +----------+ */ + ) +NETLIST_END() + /* * DM7486: Quad 2-Input Exclusive-OR Gates * @@ -2025,6 +2213,12 @@ NETLIST_START(TTL74XX_lib) LOCAL_LIB_ENTRY(TTL_7437_DIP) LOCAL_LIB_ENTRY(TTL_7442_DIP) LOCAL_LIB_ENTRY(TTL_7448_DIP) + LOCAL_LIB_ENTRY(TTL_7450_DIP) + LOCAL_LIB_ENTRY(TTL_7473_DIP) + LOCAL_LIB_ENTRY(TTL_7473A_DIP) + LOCAL_LIB_ENTRY(TTL_7474_DIP) + LOCAL_LIB_ENTRY(TTL_7475_DIP) + LOCAL_LIB_ENTRY(TTL_7477_DIP) LOCAL_LIB_ENTRY(TTL_7486_DIP) LOCAL_LIB_ENTRY(TTL_74121_DIP) LOCAL_LIB_ENTRY(TTL_74123_DIP) diff --git a/src/lib/netlist/macro/nlm_ttl74xx.h b/src/lib/netlist/macro/nlm_ttl74xx.h index 8476b5c9e85..97b1fe8dbcd 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.h +++ b/src/lib/netlist/macro/nlm_ttl74xx.h @@ -266,6 +266,24 @@ #define TTL_7448_DIP(name) \ NET_REGISTER_DEV(TTL_7448_DIP, name) +#define TTL_7450_DIP(name) \ + NET_REGISTER_DEV(TTL_7450_DIP, name) + +#define TTL_7473_DIP(name) \ + NET_REGISTER_DEV(TTL_7473_DIP, name) + +#define TTL_7473A_DIP(name) \ + NET_REGISTER_DEV(TTL_7473A_DIP, name) + +#define TTL_7474_DIP(name) \ + NET_REGISTER_DEV(TTL_7474_DIP, name) + +#define TTL_7475_DIP(name) \ + NET_REGISTER_DEV(TTL_7475_DIP, name) + +#define TTL_7477_DIP(name) \ + NET_REGISTER_DEV(TTL_7477_DIP, name) + #define TTL_7486_GATE(name) \ NET_REGISTER_DEV(TTL_7486_GATE, name) -- cgit v1.2.3 From c06ebeb7878847c16b86ccb17cbecc88f820dd3e Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 1 Aug 2020 18:26:11 +0200 Subject: netlist: Fix incorrect sense in warning. --- src/lib/netlist/analog/nld_mosfet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/netlist/analog/nld_mosfet.cpp b/src/lib/netlist/analog/nld_mosfet.cpp index acc7ad8359f..3e74ac617c3 100644 --- a/src/lib/netlist/analog/nld_mosfet.cpp +++ b/src/lib/netlist/analog/nld_mosfet.cpp @@ -279,7 +279,7 @@ namespace analog m_vto = m_modacc.m_VTO; // FIXME zero conversion - if(m_vto != nlconst::zero()) + if(m_vto == nlconst::zero()) log().warning(MW_MOSFET_THRESHOLD_VOLTAGE(m_model.name())); // FIXME: VTO if missing may be calculated from TPG, NSS and temperature. Usually models -- cgit v1.2.3 From 2719654114e4aa693c44f92eeacf199e7db722e0 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 1 Aug 2020 18:26:36 +0200 Subject: netlist: Better implementation of CD4053. --- src/lib/netlist/devices/nld_4053.cpp | 47 +++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/lib/netlist/devices/nld_4053.cpp b/src/lib/netlist/devices/nld_4053.cpp index f4b9b03ebd2..37099e2d9d1 100644 --- a/src/lib/netlist/devices/nld_4053.cpp +++ b/src/lib/netlist/devices/nld_4053.cpp @@ -21,6 +21,7 @@ namespace netlist , m_RY(*this, "RY") , m_select(*this, "S", NETLIB_DELEGATE(controls)) , m_inhibit(*this, "INH", NETLIB_DELEGATE(controls)) + , m_VEE(*this, "VEE", NETLIB_DELEGATE(controls)) , m_base_r(*this, "BASER", nlconst::magic(270.0)) , m_lastx(*this, "m_lastx", false) , m_lasty(*this, "m_lasty", false) @@ -59,15 +60,33 @@ namespace netlist newy = true; } } - if (newx != m_lastx) - { - update_state(m_RX, newx); - m_lastx = newx; - } - if (newy != m_lasty) + + if (newx != m_lastx || newy != m_lasty) { - update_state(m_RY, newy); - m_lasty = newy; + const nl_fptype sup = (m_supply.VCC().Q_Analog() - m_supply.GND().Q_Analog()); + const nl_fptype Ron = m_base_r() * nlconst::magic(5.0) / sup; + const nl_fptype Roff = plib::reciprocal(exec().gmin()); + const nl_fptype RX = (newx != 0) ? Ron : Roff; + const nl_fptype RY = (newy != 0) ? Ron : Roff; + if (m_RX.solver() == m_RY.solver()) + { + m_RX.change_state([this, &RX, &RY]() + { + m_RX.set_R(RX); + m_RY.set_R(RY); + }); + } + else + { + m_RX.change_state([this, &RX]() + { + m_RX.set_R(RX); + }); + m_RY.change_state([this, &RY]() + { + m_RY.set_R(RY); + }); + } } } @@ -88,21 +107,11 @@ namespace netlist return state; } - void update_state(analog::NETLIB_SUB(R_base) &R, bool state) - { - nl_fptype Rval = plib::reciprocal(exec().gmin()); - if (state) - { - nl_fptype sup = (m_supply.VCC().Q_Analog() - m_supply.GND().Q_Analog()); - Rval = m_base_r() * nlconst::magic(5.0) / sup; - } - R.change_state([&R, Rval]() -> void { R.set_R(Rval);}); - } - analog::NETLIB_SUB(R_base) m_RX; analog::NETLIB_SUB(R_base) m_RY; analog_input_t m_select; analog_input_t m_inhibit; + analog_input_t m_VEE; param_fp_t m_base_r; state_var m_lastx; state_var m_lasty; -- cgit v1.2.3 From 9414a219a950297ececac52675c083eaed4d66eb Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 1 Aug 2020 18:26:52 +0200 Subject: netlist: Added CD4017/4022 devices. * Also contains squashed clang signedness fixes --- scripts/src/netlist.lua | 2 + src/lib/netlist/build/makefile | 1 + src/lib/netlist/devices/net_lib.cpp | 2 + src/lib/netlist/devices/net_lib.h | 1 + src/lib/netlist/devices/nld_4017.cpp | 86 ++++++++++++++++++++++++++++++++++++ src/lib/netlist/devices/nld_4017.h | 51 +++++++++++++++++++++ src/lib/netlist/devices/nld_devinc.h | 19 ++++++++ src/lib/netlist/macro/nlm_cd4xxx.cpp | 64 +++++++++++++++++++++++++++ src/lib/netlist/macro/nlm_cd4xxx.h | 6 +++ 9 files changed, 232 insertions(+) create mode 100644 src/lib/netlist/devices/nld_4017.cpp create mode 100644 src/lib/netlist/devices/nld_4017.h diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 481f2add692..2607d419576 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -138,6 +138,8 @@ project "netlist" MAME_DIR .. "src/lib/netlist/devices/nld_4006.h", MAME_DIR .. "src/lib/netlist/devices/nld_4013.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_4013.h", + MAME_DIR .. "src/lib/netlist/devices/nld_4017.cpp", + MAME_DIR .. "src/lib/netlist/devices/nld_4017.h", MAME_DIR .. "src/lib/netlist/devices/nld_4020.cpp", MAME_DIR .. "src/lib/netlist/devices/nld_4020.h", MAME_DIR .. "src/lib/netlist/devices/nld_4053.cpp", diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 9e10f19a60c..c4ad5397515 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -154,6 +154,7 @@ NLOBJS := \ $(NLOBJ)/devices/nld_tms4800.o \ $(NLOBJ)/devices/nld_4006.o \ $(NLOBJ)/devices/nld_4013.o \ + $(NLOBJ)/devices/nld_4017.o \ $(NLOBJ)/devices/nld_4020.o \ $(NLOBJ)/devices/nld_4053.o \ $(NLOBJ)/devices/nld_4066.o \ diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 40510225b82..460d129dff1 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -142,6 +142,8 @@ namespace devices // FIXME: duplicate? LIB_ENTRY(CD4006) LIB_ENTRY(CD4006_dip) + LIB_ENTRY(CD4017) + LIB_ENTRY(CD4022) LIB_ENTRY(CD4020_WI) LIB_ENTRY(CD4020) LIB_ENTRY(CD4024) diff --git a/src/lib/netlist/devices/net_lib.h b/src/lib/netlist/devices/net_lib.h index 60040f4589f..c3d818de17d 100644 --- a/src/lib/netlist/devices/net_lib.h +++ b/src/lib/netlist/devices/net_lib.h @@ -48,6 +48,7 @@ NETLIST_EXTERNAL(ROMS_lib) #include "nld_2102A.h" #include "nld_4006.h" #include "nld_4013.h" +#include "nld_4017.h" #include "nld_4020.h" #include "nld_4053.h" #include "nld_4066.h" diff --git a/src/lib/netlist/devices/nld_4017.cpp b/src/lib/netlist/devices/nld_4017.cpp new file mode 100644 index 00000000000..c396ff73cd2 --- /dev/null +++ b/src/lib/netlist/devices/nld_4017.cpp @@ -0,0 +1,86 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_4017.c + * + */ + +#include "nld_4017.h" +#include "nl_base.h" +#include "nl_factory.h" + +namespace netlist +{ + namespace devices + { + + template + NETLIB_OBJECT(CD4017_base) + { + NETLIB_CONSTRUCTOR_MODEL(CD4017_base, "CD4XXX") + , m_CLK(*this, "CLK", NETLIB_DELEGATE(clk)) + , m_CLKEN(*this, "CLKEN", NETLIB_DELEGATE(inputs)) + , m_RESET(*this, "RESET", NETLIB_DELEGATE(inputs)) + , m_CO(*this, "CO") + , m_Q(*this, 0, "Q{}") + , m_cnt(*this, "m_cnt", 0) + , m_supply(*this) + { + } + + NETLIB_RESETI() + { + m_CLK.set_state(logic_t::STATE_INP_LH); + m_cnt = 0; + } + + NETLIB_HANDLERI(clk) + { + ++m_cnt; + update_outputs(m_cnt); + } + + NETLIB_HANDLERI(inputs) + { + if (m_RESET()) + { + m_CLK.inactivate(); + m_cnt = 0; + update_outputs(m_cnt); + } + else if (m_CLKEN()) + { + m_CLK.inactivate(); + } + else + { + m_CLK.activate_lh(); + } + } + + public: + void update_outputs(const unsigned cnt) noexcept + { + for (std::size_t i = 0; i < _MaxCount; i++) + m_Q[i].push(i == cnt, NLTIME_FROM_NS(200)); + m_CO.push(cnt < _MaxCount / 2, NLTIME_FROM_NS(160)); + } + logic_input_t m_CLK; + logic_input_t m_CLKEN; + logic_input_t m_RESET; + logic_output_t m_CO; + object_array_t m_Q; + + state_var m_cnt; + nld_power_pins m_supply; + }; + + using NETLIB_NAME(CD4017) = NETLIB_NAME(CD4017_base)<10>; + using NETLIB_NAME(CD4022) = NETLIB_NAME(CD4017_base)<8>; + + + NETLIB_DEVICE_IMPL(CD4017, "CD4017", "") + NETLIB_DEVICE_IMPL(CD4022, "CD4022", "") + + } //namespace devices +} // namespace netlist diff --git a/src/lib/netlist/devices/nld_4017.h b/src/lib/netlist/devices/nld_4017.h new file mode 100644 index 00000000000..58ff0dabcb9 --- /dev/null +++ b/src/lib/netlist/devices/nld_4017.h @@ -0,0 +1,51 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_4017.h + * + * CD4017: Decade Counter/Divider with 10 Decoded Outputs + * + * +--------------+ + * Q5 |1 ++ 16| VDD + * Q1 |2 15| RESET + * Q0 |3 14| CLOCK + * Q2 |4 4017 13| CLOCK ENABLE + * Q6 |5 12| CARRY OUT + * Q7 |6 11| Q9 + * Q3 |7 10| Q4 + * VSS |8 9| Q8 + * +--------------+ + * + * + * CD4022: Divide-by-8 Counter/Divider with 8 Decoded Outputs + * + * +--------------+ + * Q1 |1 ++ 16| VDD + * Q0 |2 15| RESET + * Q2 |3 14| CLOCK + * Q5 |4 4022 13| CLOCK ENABLE + * Q6 |5 12| CARRY OUT + * NC |6 11| Q4 + * Q3 |7 10| Q7 + * VSS |8 9| NC + * +--------------+ + * + * Naming conventions follow Fairchild datasheet + * + * FIXME: Timing depends on VDD-VSS + * This needs a cmos d-a/a-d proxy implementation. + * + */ + +#ifndef NLD_4017_H_ +#define NLD_4017_H_ + +#include "netlist/nl_setup.h" + +#define CD4017(name) \ + NET_REGISTER_DEV(CD4017, name) + +#define CD4022(name) \ + NET_REGISTER_DEV(CD4022, name) + +#endif /* NLD_4017_H_ */ diff --git a/src/lib/netlist/devices/nld_devinc.h b/src/lib/netlist/devices/nld_devinc.h index 260c794763d..371bdb6f59b 100644 --- a/src/lib/netlist/devices/nld_devinc.h +++ b/src/lib/netlist/devices/nld_devinc.h @@ -684,6 +684,17 @@ #define CD4006_DIP(...) \ NET_REGISTER_DEVEXT(CD4006_DIP, __VA_ARGS__) +// --------------------------------------------------------------------- +// Source: src/lib/netlist/devices/nld_4017.cpp +// --------------------------------------------------------------------- +// usage : CD4017(name) +#define CD4017(...) \ + NET_REGISTER_DEVEXT(CD4017, __VA_ARGS__) + +// usage : CD4022(name) +#define CD4022(...) \ + NET_REGISTER_DEVEXT(CD4022, __VA_ARGS__) + // --------------------------------------------------------------------- // Source: src/lib/netlist/devices/nld_4020.cpp // --------------------------------------------------------------------- @@ -1264,6 +1275,14 @@ #define CD4013_DIP(...) \ NET_REGISTER_DEVEXT(CD4013_DIP, __VA_ARGS__) +// usage : CD4017_DIP(name) +#define CD4017_DIP(...) \ + NET_REGISTER_DEVEXT(CD4017_DIP, __VA_ARGS__) + +// usage : CD4022_DIP(name) +#define CD4022_DIP(...) \ + NET_REGISTER_DEVEXT(CD4022_DIP, __VA_ARGS__) + // usage : CD4020_DIP(name) #define CD4020_DIP(...) \ NET_REGISTER_DEVEXT(CD4020_DIP, __VA_ARGS__) diff --git a/src/lib/netlist/macro/nlm_cd4xxx.cpp b/src/lib/netlist/macro/nlm_cd4xxx.cpp index 3da618b866c..e948b6786d6 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.cpp +++ b/src/lib/netlist/macro/nlm_cd4xxx.cpp @@ -113,6 +113,68 @@ static NETLIST_START(CD4013_DIP) ) NETLIST_END() +/* + * CD4017: Decade Counter/Divider with 10 Decoded Outputs + * + * +--------------+ + * Q5 |1 ++ 16| VDD + * Q1 |2 15| RESET + * Q0 |3 14| CLOCK + * Q2 |4 4017 13| CLOCK ENABLE + * Q6 |5 12| CARRY OUT + * Q7 |6 11| Q9 + * Q3 |7 10| Q4 + * VSS |8 9| Q8 + * +--------------+ + * + * + * CD4022: Divide-by-8 Counter/Divider with 8 Decoded Outputs + * + * +--------------+ + * Q1 |1 ++ 16| VDD + * Q0 |2 15| RESET + * Q2 |3 14| CLOCK + * Q5 |4 4022 13| CLOCK ENABLE + * Q6 |5 12| CARRY OUT + * NC |6 11| Q4 + * Q3 |7 10| Q7 + * VSS |8 9| NC + * +--------------+ + */ + +static NETLIST_START(CD4017_DIP) + CD4017(A) + + DIPPINS( /* +--------------+ */ + A.Q5, /* Q5 |1 ++ 16| VDD */ A.VDD, + A.Q1, /* Q1 |2 15| RESET */ A.RESET, + A.Q0, /* Q0 |3 14| CLOCK */ A.CLK, + A.Q2, /* Q2 |4 4017 13| CLOCK ENABLE */ A.CLKEN, + A.Q6, /* Q6 |5 12| CARRY OUT */ A.CO, + A.Q7, /* Q7 |6 11| Q9 */ A.Q9, + A.Q3, /* Q3 |7 10| Q4 */ A.Q4, + A.VSS, /* VSS |8 9| Q8 */ A.Q8 + /* +--------------+ */ + ) +NETLIST_END() + +static NETLIST_START(CD4022_DIP) + CD4022(A) + NC_PIN(NC) + + DIPPINS( /* +--------------+ */ + A.Q1, /* Q1 |1 ++ 16| VDD */ A.VDD, + A.Q0, /* Q0 |2 15| RESET */ A.RESET, + A.Q2, /* Q2 |3 14| CLOCK */ A.CLK, + A.Q5, /* Q5 |4 4022 13| CLOCK ENABLE */ A.CLKEN, + A.Q6, /* Q6 |5 12| CARRY OUT */ A.CO, + NC.I, /* NC |6 11| Q4 */ A.Q4, + A.Q3, /* Q3 |7 10| Q7 */ A.Q7, + A.VSS, /* VSS |8 9| NC */ NC.I + /* +--------------+ */ + ) +NETLIST_END() + /* CD4020: 14-Stage Ripple Carry Binary Counters * * +--------------+ @@ -508,6 +570,8 @@ NETLIST_START(CD4XXX_lib) /* DIP ONLY */ LOCAL_LIB_ENTRY(CD4013_DIP) + LOCAL_LIB_ENTRY(CD4017_DIP) + LOCAL_LIB_ENTRY(CD4022_DIP) LOCAL_LIB_ENTRY(CD4020_DIP) LOCAL_LIB_ENTRY(CD4024_DIP) LOCAL_LIB_ENTRY(CD4053_DIP) diff --git a/src/lib/netlist/macro/nlm_cd4xxx.h b/src/lib/netlist/macro/nlm_cd4xxx.h index 7e56a515923..8db793216b1 100644 --- a/src/lib/netlist/macro/nlm_cd4xxx.h +++ b/src/lib/netlist/macro/nlm_cd4xxx.h @@ -61,6 +61,12 @@ #define CD4013_DIP(name) \ NET_REGISTER_DEV(CD4013_DIP, name) +#define CD4017_DIP(name) \ + NET_REGISTER_DEV(CD4017_DIP, name) + +#define CD4022_DIP(name) \ + NET_REGISTER_DEV(CD4022_DIP, name) + #define CD4020_DIP(name) \ NET_REGISTER_DEV(CD4020_DIP, name) -- cgit v1.2.3 From 206767bf56870f62996e4e238744310ff5d64f33 Mon Sep 17 00:00:00 2001 From: fulivi Date: Sat, 1 Aug 2020 18:35:59 +0200 Subject: hp9825: hp98036 serial I/O module added (#7024) --- scripts/src/bus.lua | 2 + src/devices/bus/hp9845_io/98036.cpp | 505 ++++++++++++++++++++++++++++++++ src/devices/bus/hp9845_io/98036.h | 96 ++++++ src/devices/bus/hp9845_io/hp9845_io.cpp | 2 + 4 files changed, 605 insertions(+) create mode 100644 src/devices/bus/hp9845_io/98036.cpp create mode 100644 src/devices/bus/hp9845_io/98036.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index d6e3a9311fa..60dbdcaed71 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -4096,6 +4096,8 @@ if (BUSES["HP9845_IO"]~=null) then MAME_DIR .. "src/devices/bus/hp9845_io/98034.h", MAME_DIR .. "src/devices/bus/hp9845_io/98035.cpp", MAME_DIR .. "src/devices/bus/hp9845_io/98035.h", + MAME_DIR .. "src/devices/bus/hp9845_io/98036.cpp", + MAME_DIR .. "src/devices/bus/hp9845_io/98036.h", MAME_DIR .. "src/devices/bus/hp9845_io/98046.cpp", MAME_DIR .. "src/devices/bus/hp9845_io/98046.h", MAME_DIR .. "src/devices/bus/hp9845_io/hp9885.cpp", diff --git a/src/devices/bus/hp9845_io/98036.cpp b/src/devices/bus/hp9845_io/98036.cpp new file mode 100644 index 00000000000..4d0f5011118 --- /dev/null +++ b/src/devices/bus/hp9845_io/98036.cpp @@ -0,0 +1,505 @@ +// license:BSD-3-Clause +// copyright-holders: F. Ulivi +/********************************************************************* + + 98036.cpp + + 98036 module (RS232 interface) + + Main reference for this module: + HP, 98036A Serial I/O interface installation & service manual + +*********************************************************************/ + +#include "98036.h" + +// Debugging +#define VERBOSE 0 +#include "logmacro.h" + +// Bit manipulation +namespace { + template constexpr T BIT_MASK(unsigned n) + { + return (T)1U << n; + } + + template void BIT_SET(T& w , unsigned n) + { + w |= BIT_MASK(n); + } +} + +// device type definitions +DEFINE_DEVICE_TYPE(HP98036_IO_CARD, hp98036_io_card_device, "hp98036" , "HP98036 card") + +hp98036_io_card_device::hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +: device_t(mconfig, HP98036_IO_CARD, tag, owner, clock) + , device_hp9845_io_interface(mconfig, *this) + , m_uart(*this , "uart") + , m_clock_gen(*this , "clock_gen") + , m_rs232(*this , "rs232") + , m_s1_input(*this , "s1") + , m_s2_input(*this , "s2") + , m_s3_input(*this , "s3") + , m_jumper_input(*this , "jumper") + , m_loopback_en(*this , "loop") +{ +} + +hp98036_io_card_device::~hp98036_io_card_device() +{ +} + +uint16_t hp98036_io_card_device::reg_r(address_space &space, offs_t offset) +{ + uint16_t res = 0; + + switch (offset) { + case 0: + // R4IN + m_r4_dir = false; + res = m_r4in_data; + break; + + case 1: + // R5IN + if (m_tx_int_en) { + BIT_SET(res, 0); + } + if (m_rx_int_en) { + BIT_SET(res, 1); + } + BIT_SET(res, 4); + if (m_int_en) { + BIT_SET(res, 7); + } + break; + + case 2: + // R6IN + // Bits 3&4: jumpers + res = (m_jumper_input->read() & 3) << 3; + if (m_loopback) { + res |= m_lineout; + } else { + if (!m_rs232->dcd_r()) { + BIT_SET(res, 0); + } + if (!m_rs232->ri_r()) { + BIT_SET(res, 1); + } + // Bit 2: secondary CD, always 0 + } + BIT_SET(res, 5); + BIT_SET(res, 6); + BIT_SET(res, 7); + break; + + default: + logerror("Unmapped read @%u\n" , offset); + break; + } + + LOG("RD R%u=%02x\n" , offset + 4 , res); + return res; +} + +void hp98036_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data) +{ + LOG("WR R%u=%02x\n" , offset + 4 , data); + + switch (offset) { + case 0: + // R4OUT + m_r4_dir = true; + m_wrrq = true; + m_r4out_data = data; + uart_wr(); + update_flg(); + break; + + case 1: + // R5OUT + m_uart_cmd = BIT(data , 0); + m_tx_int_en = BIT(data , 1); + m_rx_int_en = BIT(data , 2); + m_int_en = BIT(data , 7); + if (BIT(data , 5)) { + int_reset(); + } else { + uart_rd(); + uart_wr(); + update_irq(); + update_flg(); + } + break; + + case 2: + // R6OUT + m_half_baud = BIT(data , 4); + m_lineout = data & 7; + break; + + case 3: + // R7OUT + if (!m_r4_dir) { + m_rdrq = true; + uart_rd(); + update_irq(); + update_flg(); + } + break; + + default: + logerror("Unmapped write @%u\n" , offset); + break; + } +} + +void hp98036_io_card_device::device_add_mconfig(machine_config &config) +{ + I8251(config , m_uart , 0); + m_uart->txd_handler().set(FUNC(hp98036_io_card_device::txd_w)); + m_uart->dtr_handler().set(FUNC(hp98036_io_card_device::dtr_w)); + m_uart->rts_handler().set(FUNC(hp98036_io_card_device::rts_w)); + m_uart->rxrdy_handler().set(FUNC(hp98036_io_card_device::rxrdy_w)); + m_uart->txrdy_handler().set(FUNC(hp98036_io_card_device::txrdy_w)); + + MC14411(config , m_clock_gen , 1.8432_MHz_XTAL); + m_clock_gen->out_f<1>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<3>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<5>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<6>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<7>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<8>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<9>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<11>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<13>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<14>().set(FUNC(hp98036_io_card_device::bit_rate_clock)); + m_clock_gen->out_f<12>().set(FUNC(hp98036_io_card_device::slow_clock)); + + RS232_PORT(config , m_rs232 , default_rs232_devices , nullptr); + m_rs232->rxd_handler().set(FUNC(hp98036_io_card_device::rxd_w)); + m_rs232->dsr_handler().set(FUNC(hp98036_io_card_device::dsr_w)); + m_rs232->cts_handler().set(FUNC(hp98036_io_card_device::cts_w)); +} + +static INPUT_PORTS_START(hp98036_port) + PORT_HP9845_IO_SC(11) + + PORT_START("s1") + PORT_DIPNAME(3 , 3 , "Clock factor") + PORT_DIPLOCATION("S1:1,2") + PORT_DIPSETTING(1 , "x1") + PORT_DIPSETTING(2 , "x16") + PORT_DIPSETTING(3 , "x64") + PORT_DIPNAME(0x0c , 0x0c , "Character length") + PORT_DIPLOCATION("S1:3,4") + PORT_DIPSETTING(0x00 , "5") + PORT_DIPSETTING(0x04 , "6") + PORT_DIPSETTING(0x08 , "7") + PORT_DIPSETTING(0x0c , "8") + PORT_DIPNAME(0x10 , 0 , "Parity enable") + PORT_DIPLOCATION("S1:5") + PORT_DIPSETTING(0x00 , DEF_STR(Off)) + PORT_DIPSETTING(0x10 , DEF_STR(On)) + PORT_DIPNAME(0x20 , 0 , "Parity") + PORT_DIPLOCATION("S1:6") + PORT_DIPSETTING(0x00 , "Odd") + PORT_DIPSETTING(0x20 , "Even") + PORT_DIPNAME(0xc0 , 0xc0 , "Stop bits") + PORT_DIPLOCATION("S1:7,8") + PORT_DIPSETTING(0x40 , "1") + PORT_DIPSETTING(0x80 , "1.5") + PORT_DIPSETTING(0xc0 , "2") + + PORT_START("s2") + PORT_DIPNAME(1 , 1 , "CTS") + PORT_DIPLOCATION("S2:1") + PORT_DIPSETTING(0 , "Device controlled") + PORT_DIPSETTING(1 , "Always active") + + PORT_START("s3") + PORT_CONFNAME(0xf , 6 , "Baud rate") + PORT_CONFSETTING(0 , "9600") + PORT_CONFSETTING(1 , "4800") + PORT_CONFSETTING(2 , "2400") + PORT_CONFSETTING(3 , "1800") + PORT_CONFSETTING(4 , "1200") + PORT_CONFSETTING(5 , "600") + PORT_CONFSETTING(6 , "300") + PORT_CONFSETTING(7 , "150") + PORT_CONFSETTING(8 , "110") + PORT_CONFSETTING(9 , "75") + + PORT_START("jumper") + PORT_CONFNAME(1 , 0 , "J1") + PORT_CONFSETTING(0 , DEF_STR(Off)) + PORT_CONFSETTING(1 , DEF_STR(On)) + PORT_CONFNAME(2 , 0 , "J2") + PORT_CONFSETTING(0 , DEF_STR(Off)) + PORT_CONFSETTING(2 , DEF_STR(On)) + + PORT_START("loop") + PORT_CONFNAME(1 , 0 , "Test loopback") + PORT_CONFSETTING(0 , DEF_STR(Off)) + PORT_CONFSETTING(1 , DEF_STR(On)) +INPUT_PORTS_END + +ioport_constructor hp98036_io_card_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(hp98036_port); +} + +void hp98036_io_card_device::device_start() +{ + save_item(NAME(m_init_state)); + save_item(NAME(m_irq)); + save_item(NAME(m_int_en)); + save_item(NAME(m_tx_int_en)); + save_item(NAME(m_rx_int_en)); + save_item(NAME(m_txrdy)); + save_item(NAME(m_rxrdy)); + save_item(NAME(m_wrrq)); + save_item(NAME(m_rdrq)); + save_item(NAME(m_uart_cmd)); + save_item(NAME(m_uart_wr_mode)); + save_item(NAME(m_flg)); + save_item(NAME(m_half_baud)); + save_item(NAME(m_baud_div)); + save_item(NAME(m_r4_dir)); + save_item(NAME(m_r4in_data)); + save_item(NAME(m_r4out_data)); + save_item(NAME(m_lineout)); +} + +void hp98036_io_card_device::device_reset() +{ + sts_w(true); + + ioport_value baud_sel = m_s3_input->read(); + m_clock_gen->timer_enable(mc14411_device::TIMER_F1 , baud_sel == 0); + m_clock_gen->timer_enable(mc14411_device::TIMER_F3 , baud_sel == 1); + m_clock_gen->timer_enable(mc14411_device::TIMER_F5 , baud_sel == 2); + m_clock_gen->timer_enable(mc14411_device::TIMER_F6 , baud_sel == 3); + m_clock_gen->timer_enable(mc14411_device::TIMER_F7 , baud_sel == 4); + m_clock_gen->timer_enable(mc14411_device::TIMER_F8 , baud_sel == 5); + m_clock_gen->timer_enable(mc14411_device::TIMER_F9 , baud_sel == 6); + m_clock_gen->timer_enable(mc14411_device::TIMER_F11 , baud_sel == 7); + m_clock_gen->timer_enable(mc14411_device::TIMER_F13 , baud_sel == 8); + m_clock_gen->timer_enable(mc14411_device::TIMER_F14 , baud_sel == 9); + + m_loopback = m_loopback_en->read() != 0; + + if (!m_loopback && BIT(m_s2_input->read() , 0)) { + m_uart->write_cts(0); + } + + int_reset(); +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::bit_rate_clock) +{ + if (m_half_baud) { + if (state) { + m_baud_div = !m_baud_div; + m_uart->write_txc(m_baud_div); + m_uart->write_rxc(m_baud_div); + } + } else { + m_uart->write_txc(state); + m_uart->write_rxc(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::slow_clock) +{ + switch (m_init_state) { + case 0: + // Reset + if (state) { + m_init_state++; + } + break; + + case 1: + // Write mode word + if (state) { + m_init_state++; + } else { + write_uart(true , uint8_t(m_s1_input->read())); + } + break; + + case 2: + // Write default control word + if (state) { + m_init_state++; + update_flg(); + } else { + write_uart(true , 0x05); + } + break; + + default: + break; + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::txd_w) +{ + if (m_loopback) { + m_uart->write_rxd(state); + } else { + m_rs232->write_txd(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::dtr_w) +{ + if (m_loopback) { + m_uart->write_dsr(state); + } else { + m_rs232->write_dtr(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::rts_w) +{ + if (m_loopback) { + m_uart->write_cts(state); + } else { + m_rs232->write_rts(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::txrdy_w) +{ + if (m_txrdy != state) { + m_txrdy = state; + LOG("txrdy %d\n" , m_txrdy); + uart_wr(); + update_irq(); + update_flg(); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::rxrdy_w) +{ + if (m_rxrdy != state) { + m_rxrdy = state; + LOG("rxrdy %d\n" , m_rxrdy); + uart_rd(); + update_irq(); + update_flg(); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::rxd_w) +{ + if (!m_loopback) { + m_uart->write_rxd(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::dsr_w) +{ + if (!m_loopback) { + m_uart->write_dsr(state); + } +} + +WRITE_LINE_MEMBER(hp98036_io_card_device::cts_w) +{ + if (!m_loopback && !BIT(m_s2_input->read() , 0)) { + m_uart->write_cts(state); + } +} + +void hp98036_io_card_device::int_reset() +{ + m_init_state = 0; + m_r4in_data = 0; + m_r4out_data = 0; + m_wrrq = false; + m_rdrq = false; + m_int_en = false; + m_tx_int_en = false; + m_rx_int_en = false; + m_uart_cmd = false; + m_uart_wr_mode = true; + m_half_baud = false; + m_lineout = 0; + m_clock_gen->rate_select_w(0); + m_flg = true; // Ensure update in update_flg + update_flg(); + m_irq = true; // Ensure update in update_irq + update_irq(); + m_uart->reset(); +} + +void hp98036_io_card_device::update_flg() +{ + bool new_flg = (m_init_state == 3) && (!m_wrrq || m_tx_int_en) && (!m_rdrq || m_rx_int_en); + + if (m_flg != new_flg) { + m_flg = new_flg; + LOG("FLG %d\n" , m_flg); + flg_w(m_flg); + } +} + +void hp98036_io_card_device::update_irq() +{ + bool new_irq = m_int_en && ((m_tx_int_en && m_txrdy) || (m_rx_int_en && !m_rdrq)); + + if (m_irq != new_irq) { + m_irq = new_irq; + LOG("IRQ %d\n" , m_irq); + irq_w(m_irq); + } +} + +void hp98036_io_card_device::uart_rd() +{ + if (m_rdrq && (m_rxrdy || m_uart_cmd)) { + m_rdrq = false; + m_r4in_data = m_uart->read(m_uart_cmd); + LOG("uart rd%d=%02x\n" , m_uart_cmd , m_r4in_data); + update_flg(); + } +} + +void hp98036_io_card_device::uart_wr() +{ + if (m_wrrq && (m_txrdy || m_uart_cmd)) { + m_wrrq = false; + write_uart(m_uart_cmd , m_r4out_data); + update_flg(); + } +} + +void hp98036_io_card_device::write_uart(bool cmd , uint8_t data) +{ + if (cmd && m_uart_wr_mode) { + // Capture bits 1 & 0 of mode word (clock factor) and + // adjust rate selection in clock generator + // Mode word RSB/RSA Factor + // 0 0 0 0 -- INVALID -- + // 0 1 0 0 x1 + // 1 0 1 0 x16 + // 1 1 1 1 x64 + m_clock_gen->rate_select_w((BIT(data , 1) ? mc14411_device::RSB : 0) | ((BIT(data , 1) && BIT(data , 0)) ? mc14411_device::RSA : 0)); + LOG("RS %u\n" , data & 3); + } + if (cmd) { + if (BIT(data , 6)) { + m_uart_wr_mode = !m_uart_wr_mode; + } else { + m_uart_wr_mode = false; + } + } + LOG("uart wr%d=%02x\n" , cmd , data); + m_uart->write(cmd , data); +} diff --git a/src/devices/bus/hp9845_io/98036.h b/src/devices/bus/hp9845_io/98036.h new file mode 100644 index 00000000000..c73d32652a5 --- /dev/null +++ b/src/devices/bus/hp9845_io/98036.h @@ -0,0 +1,96 @@ +// license:BSD-3-Clause +// copyright-holders: F. Ulivi +/********************************************************************* + + 98036.h + + 98036 module (RS232 interface) + +*********************************************************************/ + +#ifndef MAME_BUS_HP9845_IO_98036_H +#define MAME_BUS_HP9845_IO_98036_H + +#pragma once + +#include "hp9845_io.h" +#include "machine/i8251.h" +#include "machine/mc14411.h" +#include "bus/rs232/rs232.h" + +class hp98036_io_card_device : public device_t, public device_hp9845_io_interface +{ +public: + // construction/destruction + hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + virtual ~hp98036_io_card_device(); + + virtual uint16_t reg_r(address_space &space, offs_t offset) override; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) override; + +protected: + // device-level overrides + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + required_device m_uart; + required_device m_clock_gen; + required_device m_rs232; + required_ioport m_s1_input; + required_ioport m_s2_input; + required_ioport m_s3_input; + required_ioport m_jumper_input; + required_ioport m_loopback_en; + + DECLARE_WRITE_LINE_MEMBER(bit_rate_clock); + DECLARE_WRITE_LINE_MEMBER(slow_clock); + DECLARE_WRITE_LINE_MEMBER(txd_w); + DECLARE_WRITE_LINE_MEMBER(dtr_w); + DECLARE_WRITE_LINE_MEMBER(rts_w); + DECLARE_WRITE_LINE_MEMBER(txrdy_w); + DECLARE_WRITE_LINE_MEMBER(rxrdy_w); + DECLARE_WRITE_LINE_MEMBER(rxd_w); + DECLARE_WRITE_LINE_MEMBER(dsr_w); + DECLARE_WRITE_LINE_MEMBER(cts_w); + + // State of initialization FSM + // State U11A-Q U11B-Q + // 0 0 0 + // 1 1 0 Load mode word + // 2 1 1 Load control word + // 3 0 1 Done + uint8_t m_init_state; + bool m_irq; // U9-2 + bool m_int_en; // U10-2 + bool m_tx_int_en; // U10-10 + bool m_rx_int_en; // U10-7 + bool m_txrdy; // U31-15 + bool m_rxrdy; // U31-14 + bool m_wrrq; // U19-13 + bool m_rdrq; // U19-7 + bool m_uart_cmd; // U10-15 + bool m_uart_wr_mode;// U17-15 + bool m_flg; // U9-10 + bool m_half_baud; // U21-13 + bool m_baud_div; // U21-1 + bool m_r4_dir; // U19-4 + bool m_loopback; + uint8_t m_r4in_data; // U29, U30 + uint8_t m_r4out_data; // U26, U27 + uint8_t m_lineout; // U28 + + void int_reset(); + void update_flg(); + void update_irq(); + void uart_rd(); + void uart_wr(); + void write_uart(bool cmd , uint8_t data); +}; + +// device type definitions +DECLARE_DEVICE_TYPE(HP98036_IO_CARD, hp98036_io_card_device) + +#endif // MAME_BUS_HP9845_IO_98036_H diff --git a/src/devices/bus/hp9845_io/hp9845_io.cpp b/src/devices/bus/hp9845_io/hp9845_io.cpp index a6d09154671..bf304622f24 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.cpp +++ b/src/devices/bus/hp9845_io/hp9845_io.cpp @@ -12,6 +12,7 @@ #include "hp9845_io.h" #include "98032.h" #include "98035.h" +#include "98036.h" #include "98034.h" #include "98046.h" @@ -36,6 +37,7 @@ hp9845_io_slot_device::hp9845_io_slot_device(const machine_config &mconfig, cons option_add("98032_gpio" , HP98032_IO_CARD); option_add("98034_hpib" , HP98034_IO_CARD); option_add("98035_rtc" , HP98035_IO_CARD); + option_add("98036" , HP98036_IO_CARD); option_add("98046" , HP98046_IO_CARD); set_default_option(nullptr); set_fixed(false); -- cgit v1.2.3 From 18f2dd9ac1cda2fcae6203a24ee1568189b68a64 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 19:02:26 +0200 Subject: Software list items promoted to working --------------------------------------- odyssey2: Chess Module (Euro) [hap] --- hash/odyssey2.xml | 11 +++--- src/devices/bus/odyssey2/chess.cpp | 65 ++++++++++++++++++++++++++++++------ src/devices/bus/odyssey2/chess.h | 26 +++++++++++++-- src/devices/bus/odyssey2/slot.cpp | 12 +++++-- src/devices/bus/odyssey2/slot.h | 6 +++- src/devices/bus/odyssey2/voice.cpp | 11 +++--- src/mame/drivers/odyssey2.cpp | 68 ++++++++++++++++++++------------------ 7 files changed, 141 insertions(+), 58 deletions(-) diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index 6ad3ec9995f..c5d3b1203d8 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -83,7 +83,7 @@ adds 16K RAM and 16K ROM, that plugs into the G7000. - + Home Computer Module (Euro) 1983 Philips @@ -92,7 +92,7 @@ adds 16K RAM and 16K ROM, that plugs into the G7000. - + @@ -545,15 +545,16 @@ adds 16K RAM and 16K ROM, that plugs into the G7000. - + Chess Module (Euro) 1982 Philips - - + + + diff --git a/src/devices/bus/odyssey2/chess.cpp b/src/devices/bus/odyssey2/chess.cpp index e8226a4d3be..f1a871f1000 100644 --- a/src/devices/bus/odyssey2/chess.cpp +++ b/src/devices/bus/odyssey2/chess.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Fabio Priuli +// copyright-holders:hap /****************************************************************************** Videopac C7010 Chess Module emulation @@ -11,10 +11,6 @@ Hardware notes: Service manual with schematics is available. -TODO: -- this code is just a stub... hence, almost everything is still to do! - most importantly, missing 8KB ROM dump - ******************************************************************************/ #include "emu.h" @@ -28,22 +24,38 @@ TODO: DEFINE_DEVICE_TYPE(O2_ROM_CHESS, o2_chess_device, "o2_chess", "Odyssey 2 Videopac Chess Module") -o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : o2_rom_device(mconfig, O2_ROM_CHESS, tag, owner, clock) - , m_cpu(*this, "subcpu") +o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + o2_rom_device(mconfig, O2_ROM_CHESS, tag, owner, clock), + m_cpu(*this, "subcpu"), + m_latch(*this, "latch%u", 0) +{ } + +void o2_chess_device::device_start() +{ + save_item(NAME(m_control)); +} + +void o2_chess_device::cart_init() { + if (m_rom_size != 0x2800) + fatalerror("o2_chess_device: Wrong ROM region size\n"); } +//------------------------------------------------- +// address maps +//------------------------------------------------- + void o2_chess_device::chess_mem(address_map &map) { - map(0x0000, 0x07ff).r(FUNC(o2_chess_device::read_rom04)); + map(0x0000, 0x1fff).r(FUNC(o2_chess_device::internal_rom_r)); + map(0xe000, 0xe7ff).mirror(0x1800).ram(); } void o2_chess_device::chess_io(address_map &map) { - map.unmap_value_high(); - map.global_mask(0xff); + map.global_mask(0x01); + map(0x00, 0x01).r(m_latch[1], FUNC(generic_latch_8_device::read)).w(m_latch[0], FUNC(generic_latch_8_device::write)); } @@ -56,4 +68,35 @@ void o2_chess_device::device_add_mconfig(machine_config &config) NSC800(config, m_cpu, 4.433619_MHz_XTAL); m_cpu->set_addrmap(AS_PROGRAM, &o2_chess_device::chess_mem); m_cpu->set_addrmap(AS_IO, &o2_chess_device::chess_io); + + GENERIC_LATCH_8(config, m_latch[0]); + GENERIC_LATCH_8(config, m_latch[1]); +} + + +//------------------------------------------------- +// mapper specific handlers +//------------------------------------------------- + +void o2_chess_device::write_bank(int bank) +{ + // P10: must be low to access latches + // P11: reset + m_cpu->set_input_line(INPUT_LINE_RESET, (bank & 2) ? CLEAR_LINE : ASSERT_LINE); + + m_control = bank; +} + +u8 o2_chess_device::io_read(offs_t offset) +{ + if (offset & 0x80 && offset & 0x20 && ~m_control & 1) + return m_latch[0]->read(); + else + return 0xff; +} + +void o2_chess_device::io_write(offs_t offset, u8 data) +{ + if (offset & 0x80 && ~m_control & 1) + m_latch[1]->write(data); } diff --git a/src/devices/bus/odyssey2/chess.h b/src/devices/bus/odyssey2/chess.h index da8bee54b9d..d1f6ecbfc9f 100644 --- a/src/devices/bus/odyssey2/chess.h +++ b/src/devices/bus/odyssey2/chess.h @@ -1,5 +1,11 @@ // license:BSD-3-Clause -// copyright-holders:Fabio Priuli +// copyright-holders:hap +/********************************************************************** + + Videopac C7010 Chess Module emulation + +**********************************************************************/ + #ifndef MAME_BUS_ODYSSEY2_CHESS_H #define MAME_BUS_ODYSSEY2_CHESS_H @@ -8,6 +14,7 @@ #include "slot.h" #include "rom.h" #include "cpu/z80/z80.h" +#include "machine/gen_latch.h" // ======================> o2_chess_device @@ -19,14 +26,29 @@ public: o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: + // device-level overrides + virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; -// virtual const rom_entry *device_rom_region() const; + + virtual void cart_init() override; + + virtual u8 read_rom04(offs_t offset) override { return m_rom[offset + 0x2000]; } + virtual u8 read_rom0c(offs_t offset) override { return m_rom[offset + 0x2000]; } + + virtual void write_bank(int bank) override; + virtual void io_write(offs_t offset, u8 data) override; + virtual u8 io_read(offs_t offset) override; private: required_device m_cpu; + required_device_array m_latch; + + u8 internal_rom_r(offs_t offset) { return m_rom[offset]; } void chess_io(address_map &map); void chess_mem(address_map &map); + + u8 m_control = 0; }; // device type definition diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp index 3b743b6964b..b5a2f71be67 100644 --- a/src/devices/bus/odyssey2/slot.cpp +++ b/src/devices/bus/odyssey2/slot.cpp @@ -174,7 +174,7 @@ image_init_result o2_cart_slot_device::call_load() m_type = o2_get_pcb_id(pcb_name); } - //printf("Type: %s\n", o2_get_slot(m_type)); + m_cart->cart_init(); return image_init_result::PASS; } @@ -231,7 +231,7 @@ uint8_t o2_cart_slot_device::read_rom0c(offs_t offset) } /*------------------------------------------------- - io_write + io -------------------------------------------------*/ void o2_cart_slot_device::io_write(offs_t offset, uint8_t data) @@ -240,6 +240,14 @@ void o2_cart_slot_device::io_write(offs_t offset, uint8_t data) m_cart->io_write(offset, data); } +uint8_t o2_cart_slot_device::io_read(offs_t offset) +{ + if (m_cart) + return m_cart->io_read(offset); + else + return 0xff; +} + #include "bus/odyssey2/rom.h" #include "bus/odyssey2/chess.h" diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h index 69e107edc11..cec7e2b8eb5 100644 --- a/src/devices/bus/odyssey2/slot.h +++ b/src/devices/bus/odyssey2/slot.h @@ -38,8 +38,11 @@ public: virtual void write_bank(int bank) { } virtual void io_write(offs_t offset, uint8_t data) { } + virtual uint8_t io_read(offs_t offset) { return 0xff; } virtual DECLARE_READ_LINE_MEMBER(t0_read) { return 0; } + virtual void cart_init() { } // called after loading ROM + void rom_alloc(uint32_t size, const char *tag); void ram_alloc(uint32_t size); uint8_t* get_rom_base() { return m_rom; } @@ -100,9 +103,10 @@ public: uint8_t read_rom04(offs_t offset); uint8_t read_rom0c(offs_t offset); void io_write(offs_t offset, uint8_t data); + uint8_t io_read(offs_t offset); DECLARE_READ_LINE_MEMBER(t0_read) { if (m_cart) return m_cart->t0_read(); else return 0; } - void write_bank(int bank) { if (m_cart) m_cart->write_bank(bank); } + void write_bank(int bank) { if (m_cart) m_cart->write_bank(bank); } protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp index 490b9b286ad..b0c93670b78 100644 --- a/src/devices/bus/odyssey2/voice.cpp +++ b/src/devices/bus/odyssey2/voice.cpp @@ -88,8 +88,11 @@ WRITE_LINE_MEMBER(o2_voice_device::lrq_callback) void o2_voice_device::io_write(offs_t offset, uint8_t data) { - if (data & 0x20) - m_speech->ald_w(offset & 0x7f); - else - m_speech->reset(); + if (offset & 0x80) + { + if (data & 0x20) + m_speech->ald_w(offset & 0x7f); + else + m_speech->reset(); + } } diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp index ad083128ee2..78cd6ee67f0 100644 --- a/src/mame/drivers/odyssey2.cpp +++ b/src/mame/drivers/odyssey2.cpp @@ -2,12 +2,14 @@ // copyright-holders:Wilbert Pol /*************************************************************************** - /drivers/odyssey2.c +Driver file to handle emulation of the Odyssey2. - Driver file to handle emulation of the Odyssey2. - - Minor update to "the voice" rom names, and add comment about - the older revision of "the voice" - LN, 10/03/08 +TODO: +- chess has graphics issues near the screen borders: missing A-H at bottom, + rightmost column is not erased properly, wrongly places chars at top +- homecomp does not work, needs new slot device +- a lot more issues, probably, this TODO list was written by someone with + no knowledge on odyssey2 ***************************************************************************/ @@ -52,7 +54,7 @@ protected: required_device m_i8244; required_device m_cart; - uint8_t m_ram[256]; + uint8_t m_ram[0x80]; uint8_t m_p1; uint8_t m_p2; uint8_t m_lum; @@ -290,19 +292,17 @@ void g7400_state::g7400_palette(palette_device &palette) const void odyssey2_state::init_odyssey2() { - uint8_t *gfx = memregion("gfx1")->base(); + memset(m_ram, 0, 0x80); + uint8_t *gfx = memregion("gfx1")->base(); for (int i = 0; i < 256; i++) - { - gfx[i] = i; /* TODO: Why i and not 0? */ - m_ram[i] = 0; - } + gfx[i] = i; /* TODO: Why i and not 0? */ } void odyssey2_state::machine_start() { - save_pointer(NAME(m_ram),256); + save_item(NAME(m_ram)); save_item(NAME(m_p1)); save_item(NAME(m_p2)); save_item(NAME(m_lum)); @@ -344,16 +344,20 @@ void g7400_state::machine_reset() uint8_t odyssey2_state::io_read(offs_t offset) { + u8 data = 0; + if ((m_p1 & (P1_VDC_COPY_MODE_ENABLE | P1_VDC_ENABLE)) == 0) { - return m_i8244->read(offset); + data = m_i8244->read(offset); } - if (!(m_p1 & P1_EXT_RAM_ENABLE)) + else if (!(m_p1 & P1_EXT_RAM_ENABLE)) { - return m_ram[offset]; + data = m_cart->io_read(offset); + if (~offset & 0x80) + data &= m_ram[offset]; } - return 0; + return data; } @@ -361,12 +365,9 @@ void odyssey2_state::io_write(offs_t offset, uint8_t data) { if ((m_p1 & (P1_EXT_RAM_ENABLE | P1_VDC_COPY_MODE_ENABLE)) == 0x00) { - m_ram[offset] = data; - if (offset & 0x80) - { - logerror("voice write %02X, data = %02X (p1 = %02X)\n", offset, data, m_p1); - m_cart->io_write(offset, data); - } + if (~offset & 0x80) + m_ram[offset] = data; + m_cart->io_write(offset, data); } else if (!(m_p1 & P1_VDC_ENABLE)) { @@ -377,20 +378,24 @@ void odyssey2_state::io_write(offs_t offset, uint8_t data) uint8_t g7400_state::io_read(offs_t offset) { + u8 data = 0; + if ((m_p1 & (P1_VDC_COPY_MODE_ENABLE | P1_VDC_ENABLE)) == 0) { - return m_i8244->read(offset); + data = m_i8244->read(offset); } else if (!(m_p1 & P1_EXT_RAM_ENABLE)) { - return m_ram[offset]; + data = m_cart->io_read(offset); + if (~offset & 0x80) + data &= m_ram[offset]; } else if (!(m_p1 & P1_VPP_ENABLE)) { - return m_ef9340_1->ef9341_read( offset & 0x02, offset & 0x01 ); + data = m_ef9340_1->ef9341_read( offset & 0x02, offset & 0x01 ); } - return 0; + return data; } @@ -398,12 +403,9 @@ void g7400_state::io_write(offs_t offset, uint8_t data) { if ((m_p1 & (P1_EXT_RAM_ENABLE | P1_VDC_COPY_MODE_ENABLE)) == 0x00) { - m_ram[offset] = data; - if (offset & 0x80) - { - logerror("voice write %02X, data = %02X (p1 = %02X)\n", offset, data, m_p1); - m_cart->io_write(offset, data); - } + if (~offset & 0x80) + m_ram[offset] = data; + m_cart->io_write(offset, data); } else if (!(m_p1 & P1_VDC_ENABLE)) { @@ -892,4 +894,4 @@ COMP( 1978, odyssey2, 0, 0, odyssey2, odyssey2, odyssey2_state, init COMP( 1979, videopac, odyssey2, 0, videopac, odyssey2, odyssey2_state, init_odyssey2, "Philips", "Videopac G7000/C52", 0 ) COMP( 1983, g7400, odyssey2, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Philips", "Videopac Plus G7400", MACHINE_IMPERFECT_GRAPHICS ) COMP( 1983, jopac, odyssey2, 0, g7400, odyssey2, g7400_state, init_odyssey2, "Brandt", "Jopac JO7400", MACHINE_IMPERFECT_GRAPHICS ) -COMP( 1983, odyssey3, odyssey2, 0, odyssey3, odyssey2, g7400_state, init_odyssey2, "Magnavox", "Odyssey 3 Command Center (prototype)", MACHINE_IMPERFECT_GRAPHICS ) +COMP( 1983, odyssey3, odyssey2, 0, odyssey3, odyssey2, g7400_state, init_odyssey2, "Magnavox", "Odyssey 3 Command Center (prototype)", MACHINE_IMPERFECT_GRAPHICS ) // USA version of G7400 -- cgit v1.2.3 From b744e341ef31dd11fb5669e1108cb57e0a60f17d Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 19:18:55 +0200 Subject: odyssey2: move homecomp to g7400.xml --- hash/g7400.xml | 17 +++++++++++++++++ hash/odyssey2.xml | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/hash/g7400.xml b/hash/g7400.xml index 6b68929cdd3..b8e549d05e9 100644 --- a/hash/g7400.xml +++ b/hash/g7400.xml @@ -31,6 +31,9 @@ Syracuse (France) Robot City (USA) Interpol (USA) +NOTE: +The C7420 Home Computer Module, which contains a Z80 microprocessor running at 3.5468 MHz, +adds 16K RAM and 16K ROM, that plugs into the G7000. --> @@ -212,6 +215,20 @@ Interpol (USA) + + Home Computer Module (Euro) + 1983 + Philips + + + + + + + + + + Helicopter Rescue (Euro) 1983 diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index c5d3b1203d8..8d665e44084 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -47,8 +47,6 @@ Fathom (Imagic) NOTE: PAL colours leave a lot to be desired The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM. -The C7420 Home Computer Module, which contains a Z80 microprocessor running at 3.5468 MHz, -adds 16K RAM and 16K ROM, that plugs into the G7000. --> @@ -83,20 +81,6 @@ adds 16K RAM and 16K ROM, that plugs into the G7000. - - Home Computer Module (Euro) - 1983 - Philips - - - - - - - - - - Newscaster (Euro) 1980 -- cgit v1.2.3 From b7eac7bf5e53a0e79e54d8b31167838cd02b623b Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 20:57:30 +0200 Subject: addrmap: remove unsupported setter, emumem enforces unmapval 0 or ~0 --- src/devices/bus/odyssey2/chess.cpp | 4 ++-- src/devices/cpu/h16/hd641016.cpp | 2 +- src/emu/addrmap.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/devices/bus/odyssey2/chess.cpp b/src/devices/bus/odyssey2/chess.cpp index f1a871f1000..6dd254c62d1 100644 --- a/src/devices/bus/odyssey2/chess.cpp +++ b/src/devices/bus/odyssey2/chess.cpp @@ -54,8 +54,8 @@ void o2_chess_device::chess_mem(address_map &map) void o2_chess_device::chess_io(address_map &map) { - map.global_mask(0x01); - map(0x00, 0x01).r(m_latch[1], FUNC(generic_latch_8_device::read)).w(m_latch[0], FUNC(generic_latch_8_device::write)); + map.global_mask(0xff); + map(0x00, 0x00).mirror(0xff).r(m_latch[1], FUNC(generic_latch_8_device::read)).w(m_latch[0], FUNC(generic_latch_8_device::write)); } diff --git a/src/devices/cpu/h16/hd641016.cpp b/src/devices/cpu/h16/hd641016.cpp index 2fa5249d562..b52b50c20bf 100644 --- a/src/devices/cpu/h16/hd641016.cpp +++ b/src/devices/cpu/h16/hd641016.cpp @@ -42,7 +42,7 @@ void hd641016_device::ram_map(address_map &map) void hd641016_device::io_map(address_map &map) { - map.unmap_value(0); + map.unmap_value_low(); //map(0x128, 0x129).rw(FUNC(hd641016_device::abr0_r), FUNC(hd641016_device::abr0_w)); //map(0x12a, 0x12b).rw(FUNC(hd641016_device::arr0_r), FUNC(hd641016_device::arr0_w)); //map(0x12c, 0x12d).rw(FUNC(hd641016_device::awcr0_r), FUNC(hd641016_device::awcr0_w)); diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h index b201201c4dd..1795f9808a5 100644 --- a/src/emu/addrmap.h +++ b/src/emu/addrmap.h @@ -483,7 +483,6 @@ public: void global_mask(offs_t mask); void unmap_value_low() { m_unmapval = 0; } void unmap_value_high() { m_unmapval = ~0; } - void unmap_value(u8 value) { m_unmapval = value; } // add a new entry of the given type address_map_entry &operator()(offs_t start, offs_t end); -- cgit v1.2.3 From 78086e13c00fab61df9c2e8aaed2567cd7257f6f Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Sat, 1 Aug 2020 21:54:16 +0200 Subject: Reflex Cards: Fixed wrong default NVRAM hash. --- src/mame/drivers/funworld.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp index 4bfb6384b99..2d97088d3e2 100644 --- a/src/mame/drivers/funworld.cpp +++ b/src/mame/drivers/funworld.cpp @@ -7495,7 +7495,7 @@ ROM_START( reflexcrd ) ROM_LOAD( "27c256-3.bin", 0x8000, 0x8000, CRC(1617ed13) SHA1(312065406ce1d1d7c4ad566e2b13268f7eb524bb) ) ROM_REGION( 0x0800, "nvram", 0 ) // default NVRAM - ROM_LOAD( "reflexcrd_nvram.bin", 0x0000, 0x0800, CRC(00004f67) SHA1(4aab0d4fe846592e1cbc8b3c2411ddc1bf79fd95) ) + ROM_LOAD( "reflexcrd_nvram.bin", 0x0000, 0x0800, CRC(c2c69e5b) SHA1(e4abbf09abc044ba17e542cc8e1cfa16ee7cf776) ) ROM_REGION( 0x0200, "proms", 0 ) ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) -- cgit v1.2.3 From 672876016ab379988bcf693935dc5ce7a6080ae6 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 22:04:42 +0200 Subject: New NOT_WORKING software list additions --------------------------------------- odyssey2: Backgammon (Euro) [unknown] --- hash/odyssey2.xml | 15 ++++++++++++++- src/mame/drivers/odyssey2.cpp | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index 8d665e44084..6f956e8d283 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -374,6 +374,19 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM. + + Backgammon + 1984 + Philips + + + + + + + + + Baseball (Euro) ~ Baseball! (USA) 1980 @@ -529,7 +542,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM. - + Chess Module (Euro) 1982 Philips diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp index 78cd6ee67f0..8aa36c20609 100644 --- a/src/mame/drivers/odyssey2.cpp +++ b/src/mame/drivers/odyssey2.cpp @@ -5,6 +5,7 @@ Driver file to handle emulation of the Odyssey2. TODO: +- backgam does not work, it only shows the background graphics - chess has graphics issues near the screen borders: missing A-H at bottom, rightmost column is not erased properly, wrongly places chars at top - homecomp does not work, needs new slot device -- cgit v1.2.3 From 03cfcb2a4454efc0527fa47a9fceb26e52801133 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 1 Aug 2020 22:30:44 +0200 Subject: odyssey2.xml: typo --- hash/odyssey2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/odyssey2.xml b/hash/odyssey2.xml index 6f956e8d283..f9b5b879164 100644 --- a/hash/odyssey2.xml +++ b/hash/odyssey2.xml @@ -375,7 +375,7 @@ The C7010 Chess Module had a NSC800 CMOS microprocessor, with 2K RAM and 8K ROM. - Backgammon + Backgammon (Euro) 1984 Philips -- cgit v1.2.3