From 582390256c8bce05c4a8f7deaeabadd454729f7c Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 18 Dec 2024 15:59:18 +0100 Subject: source org: add success folder --- src/mame/mame.lst | 40 +- src/mame/misc/kurukuru.cpp | 971 ------------------------------------- src/mame/misc/othello.cpp | 457 ----------------- src/mame/misc/skopro.cpp | 83 ---- src/mame/misc/sothello.cpp | 408 ---------------- src/mame/msx/big10.cpp | 285 ----------- src/mame/success/big10.cpp | 285 +++++++++++ src/mame/success/kurukuru.cpp | 971 +++++++++++++++++++++++++++++++++++++ src/mame/success/othello.cpp | 457 +++++++++++++++++ src/mame/success/skopro.cpp | 83 ++++ src/mame/success/sothello.cpp | 408 ++++++++++++++++ src/mame/success/tonton.cpp | 265 ++++++++++ src/mame/sunelectronics/ikki.cpp | 2 - src/mame/sunelectronics/tonton.cpp | 263 ---------- 14 files changed, 2489 insertions(+), 2489 deletions(-) delete mode 100644 src/mame/misc/kurukuru.cpp delete mode 100644 src/mame/misc/othello.cpp delete mode 100644 src/mame/misc/skopro.cpp delete mode 100644 src/mame/misc/sothello.cpp delete mode 100644 src/mame/msx/big10.cpp create mode 100644 src/mame/success/big10.cpp create mode 100644 src/mame/success/kurukuru.cpp create mode 100644 src/mame/success/othello.cpp create mode 100644 src/mame/success/skopro.cpp create mode 100644 src/mame/success/sothello.cpp create mode 100644 src/mame/success/tonton.cpp delete mode 100644 src/mame/sunelectronics/tonton.cpp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 55740d2f021..65f91eec676 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -30986,10 +30986,6 @@ dealracl // kingpin // (c) 1983 American Communications Laboratories Inc. maxideal // (c) 1983 American Communications Laboratories Inc. -@source:misc/kurukuru.cpp -kurukuru // (c) 1990 Success / Taiyo Jidoki. -ppj // (c) 199? Success / Taiyo Jidoki. - @source:misc/ladyfrog.cpp ladyfrog // (c) 1990 Mondial Games toucheme // @@ -31695,9 +31691,6 @@ onetwoe // (c) 1997 Barko multibaby // (c) 1990 Oper Coin spirulo // (c) 1988 Oper Coin -@source:misc/othello.cpp -othello // (c) 1984 Success. - @source:misc/pachifev.cpp pachifev // (c) 1983? @@ -32222,9 +32215,6 @@ skeetsht // (c) 1991 @source:misc/skimaxx.cpp skimaxx // (c) 1996 Kyle Hodgetts/ICE -@source:misc/skopro.cpp -drgdance // 2008 - @source:misc/skyarmy.cpp skyarmy // (c) 1982 Shoei @@ -32273,9 +32263,6 @@ sms4in1a // (c) 1984 SMS MFG CORP trvhang // (c) 1984 SMS MFG CORP trvhanga // (c) 1984 SMS MFG CORP -@source:misc/sothello.cpp -sothello // (c) 1986 Success / Fujiwara. - @source:misc/spdamjes.cpp spdamjes // (c) 19?? T-90 S.A. @@ -32744,10 +32731,6 @@ sys1121 // (c) 1984 Motorola @source:motorola/uchroma68.cpp uchroma68 // 1980 Motorola evaluation board for the MC6847 -@source:msx/big10.cpp -big10 // -big10a // (c) 1986 System Make - @source:msx/forte2.cpp pesadelo // (c) 1989 Forte II Games @@ -43498,6 +43481,26 @@ xplan // (c) 2006 Subsino xreel xtrain // (c) 1999 Subsino +@source:success/big10.cpp +big10 // +big10a // (c) 1986 System Make + +@source:success/kurukuru.cpp +kurukuru // (c) 1990 Success / Taiyo Jidoki. +ppj // (c) 199? Success / Taiyo Jidoki. + +@source:success/othello.cpp +othello // (c) 1984 Success. + +@source:success/skopro.cpp +drgdance // 2008 + +@source:success/sothello.cpp +sothello // (c) 1986 Success / Fujiwara. + +@source:success/tonton.cpp +tonton // (c) 199? Success / Taiyo Jidoki. + @source:sun/sun1.cpp sun1 // @@ -43644,9 +43647,6 @@ shangha2a // (c) 1989 Sunsoft (Sun Electronics) shanghai // (c) 1988 Sunsoft (Sun Electronics) shanghaij // (c) 1988 Sunsoft (Sun Electronics) -@source:sunelectronics/tonton.cpp -tonton // (c) 199? Success / Taiyo Jidoki. - @source:sunwise/anoworld.cpp anoworld diff --git a/src/mame/misc/kurukuru.cpp b/src/mame/misc/kurukuru.cpp deleted file mode 100644 index 40a2a3e2b52..00000000000 --- a/src/mame/misc/kurukuru.cpp +++ /dev/null @@ -1,971 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Roberto Fresca, hap -/*********************************************************************************** - - KURU KURU PYON PYON - Success / Taiyo Jidoki - - Driver by Roberto Fresca & hap. - - - This hardware seems to be a derivative of MSX2 'on steroids'. - It has many similarities with sothello.cpp and tonton.cpp - - Special thanks to Charles MacDonald, for all the hardware traces: clocks, - ports, descriptions and a lot of things... :) - - - Pyon Pyon series: - - ぴょんぴょん (Pyon Pyon), 1988 Success / Taiyo Jidoki. - くるくるぴょんぴょん (Kuru Kuru Pyon Pyon), 1990 Success / Taiyo Jidoki. - ぴょんぴょんジャンプ (Pyon Pyon Jump), 1991 Success / Taiyo Jidoki. - スイスイぴょんぴょん (Sui Sui Pyon Pyon), 1992 Success / Taiyo Jidoki. - - -************************************************************************************ - - Technical Notes.... - - - CPU : 2x Sharp LH0080A Z80A - - MEM : 1x Sharp LH5116H-10 (2KB SRAM) - 1x Fairchild 8464A-10L (8KB SRAM) + battery - 6x Sharp LH2464-15 (192KB Video DRAM total) - - SOUND : 1x Yamaha YM2149F - 1x OKI M5205 - - VIDEO : 1x Unknown 64-legs VDP (seems to be from V9938/58 family). - - XTAL : 1x 21477.27 kHz. - 1x 384 kHz. blue resonator (CSB 384 P) surely for the M5202. - - - 1x Texas Instruments RC4558P (Dual General-Purpose Operational Amplifier, DIP8) - 1x Fairchild MB3712 (5,7 Watt Audio Power Amplifier, SIP8). - 2x 8 DIP switches banks. - - 3x PAL16L8A (IC12, IC26 & IC27) - 1x PAL12L6 (IC32) - - - PCB Layout... - - .--------------------------------------------------------------------------------------------------. - | IC4 IC5 | - | IC2 IC3 .------------------. .----------------. BATT | - | .-----------. .-----------. | M5L27512K | | LH5116H-10 | .---------. | - | | LH2464-15 | | SN74HC04N | | | | SHARP JAPAN | | 3.6 V | | - | '-----------' '-----------' | '4' | | | -+ +- | - | IC6 | | '----------------' | BATTERY | | - | .-----------. IC8 '------------------' '---------' | - | | LH2464-15 | .----------------------------. IC9 IC10 | - | '-----------' | LH0080A Z80A-CPU-D | .-----------------. .-----------------. | - | IC7 | SHARP JAPAN | | 8464A-10L | | M5L27512K | | - | .-----------. | | | |F| JAPAN | | | | - | | LH2464-15 | | | | | | '10' | | - | '-----------' '----------------------------' | | | | | - | IC11 IC12 IC13 '-----------------' '-----------------' | - | .-----------. .------------. .------------. IC17 IC18 | - | | LH2464-15 | | PAL16L8ACJ | | SN74LS74AN | .-----------------. .-----------------. | - | '-----------' '------------' '------------' | MBM27256-25 | | M5L27512K | | - | IC14 IC15 IC16 | | | | | - | .-----------. .------------. .-------------. | 'KP 17L' | | '18' | | - | | LH2464-15 | | SN74LS08N | | SN74LS125AN | | | | | | - | '-----------' '------------' '-------------' '-----------------' '-----------------' | - | IC19 IC20 IC21 IC22 IC23 | - | .-----------. .------------. .------------. .--------------------------. .-----------------. | - | | LH2464-15 | | SN74LS174N | | SN74LS174N | | LH0080A Z80A-CPU-D | | | | - | '-----------' '------------' '------------' | SHARP JAPAN | | E M P T Y | | - | X2 | | | S O C K E T | | - | .--------. | | | | | - | X1 IC24 | | RES | '--------------------------' '-----------------' | - | .-----. .------------. | |384kHz| | - | |XTAL | |OKI MSM5205 | '--------' | - | |21.47| '------------' IC25 IC26 IC27 IC28 | - | |727 | .-------------. .------------. .------------. .------------. | - | '-----' | SN74LS374N | | PAL16L8ACJ | | PAL16L8ACJ | | HD74LS153P | | - | '-------------' '------------' '------------' '------------' | - | IC29 IC30 DSW1 IC31 IC32 | - | .-----------------------------. .----. .------------. .------------. .------------. | - | | SANDED... | | AA | | 11111111 | | SN74LS174N | | PAL12L6CN | | - | | (YAMAHA V9938 VDP) | '----' '------------' '------------' '------------' | - | | | IC33 '7908B-4' | - | | '81500' | .------------. IC34 | - | | | | SN74LS245N | .----------------------------. | - | | | '------------' | YAMAHA | | - | '-----------------------------' DSW2 | YM2149F | | - | .------------. | | | - | | 01111110 | | | | - | '------------' '----------------------------' | - | IC35 IC36 IC37 IC38 IC39 IC40 IC41 | - | .----. .----. .----. .----. .------------. .------------. .------------. | - | | AB | | AB | | AB | | AB | | HD74LS273P | | SN74LS245N | | SN74LS245N | .------------. | - | '----' '----' '----' '----' '------------' '------------' '------------' | IC43 | | - | IC42 |.----------.| | - | .----------. |||||||||||| |||||||||||| ||MB3712 M92|| | - | | ULN2003A | +++RESNET+++ +++RESNET+++ |'----------'| | - | '----------' |||||||||||| |||||||||||| '------------' | - | | - | 7908-B hole SUCCESS CORP. | - | .----------. .--. .----------. | - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - '---------' '-----------' '-----------------------------------------' '---------' - <-------- 2x28 JAMMA compatible edge connector --------> - - - AA = Texas Instruments RC4558P T835AJ34. - AB = NEC C1663C 8926B. - - - Pinout: - - solder side |##| components - -------------------|--|----------------- - gnd |01| gnd - gnd |02| gnd - +5v |03| +5v - +5v |04| +5v - -5v |05| -5v - +12v |06| +12v - | | - hole (no connector) |07| hole (no connector) - | | - Coin B (10Y) meter |08| Coin A (100Y) meter - hopper motor |09| unknown out (ULN2003, pin15) - speaker - |10| speaker + - (ULN2003, pin13) unknown out |11| unknown out (ULN2003, pin12) - green |12| red - sync |13| blue - (ULN2003, pin13) unknown out |14| video gnd - | | - medal in |15| management - coin B (10Y) in |16| reset - coin A (100Y) in |17| unknown in (active) - +5v |<|-- (diode) |18| (diode) --|>| +5v - +5v |<|-- (diode) |19| (diode) --|>| +5v - | | - Botechin (5th) |20| (1st) Boketa - (active) unknown in |21| (2nd) Kunio - (active) unknown in |22| (3rd) Pyon-Pyon - start |23| (4th) Pyokorin - payout |24| hopper in (opto in) - | | - not used |25| not used - not used |26| not used - gnd |27| gnd - gnd |28| gnd - - - Pyon Pyon Jump DIP switches: - - .---------------------------------------------------------------------------------. - | DIP Switches bank #1 1 2 3 4 5 6 7 8 | - +-------------------------------------+-------------------------------------------+ - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 11 medal | off off off | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 10 medal | off off on | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 6 medal | off on off | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 5 medal | off on on | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 4 medal | on off off | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 3 medal | on off on | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 2 medal | on on off | - +-----------------+-------------------+-------------------------------------------+ - | Coinage Coin A | 1 coin / 1 medal | on on on | - +-----------------+-------------------+-------------------------------------------+ - | Coin A (100Y) | Exchange | off | - +-----------------+-------------------+-------------------------------------------+ - | Coin A (100Y) | Credit | on | - +-----------------+-------------------+-------------------------------------------+ - | Win | Medal out | off | - +-----------------+-------------------+-------------------------------------------+ - | Win | Credit | on | - +-----------------+-------------------+-------------------------------------------+ - | Coinage config | Coin A: Payout | off | - +-----------------+-------------------+-------------------------------------------+ - | Coinage config | Coin A: Normal | on | - +-----------------+-------------------+-------------------------------------------+ - | Payout Mode | Manual | off | - +-----------------+-------------------+-------------------------------------------+ - | Payout Mode | Automatic | on | - +-----------------+-------------------+-------------------------------------------+ - | Repeat last bet | No | off | - +-----------------+-------------------+-------------------------------------------+ - | Repeat last bet | Yes | on | - '-----------------+-------------------+-------------------------------------------' - - .---------------------------------------------------------------------------------. - | DIP Switches bank #2 1 2 3 4 5 6 7 8 | - +-------------------------------------+-------------------------------------------+ - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 95% | on on on | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 90% | on on off | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 85% | on off on | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 80% | on off off | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 75% | off on on | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 70% | off on off | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 60% | off off on | - +-----------------+-------------------+-------------------------------------------+ - | Percentage | 50% | off off off | - +-----------------+-------------------+-------------------------------------------+ - | Winwave | Small | off | - +-----------------+-------------------+-------------------------------------------+ - | Winwave | Big | on | - +-----------------+-------------------+-------------------------------------------+ - | M.Medal | Off | off | - +-----------------+-------------------+-------------------------------------------+ - | M.Medal | On | on | - +-----------------+-------------------+-------------------------------------------+ - | HG | 20-1 | off off | - +-----------------+-------------------+-------------------------------------------+ - | HG | 50-1 | off on | - +-----------------+-------------------+-------------------------------------------+ - | HG | 100-1 | on off | - +-----------------+-------------------+-------------------------------------------+ - | HG | 200-1 | on on | - +-----------------+-------------------+-------------------------------------------+ - | unknown | off | - +-------------------------------------+-------------------------------------------+ - | unknown | on | - '-------------------------------------+-------------------------------------------' - - -************************************************************************************ - - General Notes.... - - There are at least 4 games in the Pyon Pyon series... - - 1) Pyon Pyon (a marathon game with froggy characters). - 2) Kuru Kuru Pyon Pyon (a kind of slots game with the same froggy characters). - 3) Pyon Pyon Jump (a contents where the same characters try to cross the river jumping on pads). - 4) Sui Sui Pyon Pyon (a swimming competition where the same characters swim with different styles, even walking). - - The 100 Yen coin input (key 7) can be set as "Exchange" through a DIP switch, in - which case its value is not accepted as credits but immediately paid out in - "medals." - - If you get a 'medal jam' error, and the game is not responding anymore, press - RESET (key F1), and the game will reset to default values (even all counters - will be cleared; the program does this by zeroing the magic byte preceding the - game ID string copied with it into NVRAM and then jumping to the boot routine). - - The tables for the I/O routines have room for 7 coin inputs (address + mask) and - 3 output latches, but only 3 coin inputs and 1 output latch are defined and used. - - -************************************************************************************ - - Games Notes: - ------------ - - * Kuru Kuru Pyon Pyon: - - The game name could be translated as "Croak Croak Hop Hop" - Kuru is the frog sound, and Pyon is the sound of jumps. - - How to play... - - Insert tokens (medals). - You can bet to any (or all) of the following 5 characters: Botechin, Oume, - Pyokorin, Kunio, and Pyon-Pyon. Press start, and the reels start to roll. You'll - win if you can get 3 of the chosen character(s) in a row, column or diagonal. - - The black tadpoles behave just like jokers... If you have 2 chosen characters - in a row and the remaining one is a black tadpole, it will transform into another - character to complete the 3 in a row, allowing you to win. - - Red tadpoles are a bonus. Once you get one, it will go to the right panel, - revealing a number. This number represents the extra credits you won. - - Bookkeeping... - - Pressing Bookkeeping key (key 0), you enter the Bookkeeping Mode. There are - 2 screens with all the game information like DIP switches and statistics... - - 1st screen... - - - [Left panel]: All the DIP switches parameters. - - - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games, - won, loss, won by paid range, and 'omake' (extra/bonus). - - 2nd screen (press Bookkeeping key again)... - - - Tate (vertical), Yoko (horizontal) and Naname (diagonal), - for each character (Bote, Oume, Pyoko, Kunio and Pyon Pyon). - - Also Aka (red) and Kuro (black). - - Pressing the Bookkeeping key once more, you exit the mode and go back to the game. - - ---------------------------------------------------------------------------------- - - * Pyon Pyon Jump: - - The game name could be translated as "Hop Hop Jump" - Pyon Pyon is an onomatopoeia for hopping or jumping lightly. - - How to play... - - Insert tokens (medals). - You can bet to any (or all) of the following 5 characters: Boketa, Kunio, Pyon-Pyon, - Pyokorin and Botechin. Press start, and the river's pads start to roll. You'll win - if your character gets the three pads to jump to the other side of the river. - - There is also a bonus game with a black tadpole rounding some pads with extra credits. - you'll get the extra credits marked in the pad where the tadpole stopped. - - Bookkeeping... - - Pressing Bookkeeping key (key 0), you enter the Bookkeeping Mode. There are - 2 screens with all the game information like DIP switches and statistics... - - 1st screen... - - - [Left panel]: All the DIP switches parameters. - - - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games, - won, loss, won by paid range, and 'omake' (extra/bonus). - - 2nd screen (press Bookkeeping key again)... - - - Win distribution by character - (Boketa, Kunio, Pyon-Pyon, Pyokorin and Botechin). - - - Bet distribution (1, 2, 3, 4, 5~10) - - - Omake (bonus) distribution (games total, win games, loss games) - - Pressing the Bookkeeping key once more, you exit the mode and go back to the game. - - -************************************************************************************ - - ADPCM Samples.... - - There are 14 samples in Kuru Kuru Pyon Pyon. - - 00: "Botechin" - 01: - 02: "Hakase" (professor) - 03: "Pyokorin" - 04: "Kunio" - 05: "Pyon-Pyon" - 06: "Boketa" - 07: - 08: "Oume" - 09: "Haipaa" (hyper) - 10: "Ichi ni tsuite" (on your marks) - 11: "Youi" (get ready) - 12: "Bang" (sound for the tadpoles landing in the right panel). - 13: Sound effect for reels when running. - - The fact that there are samples for "on your marks", "get ready", and "bang", - make me think that these sounds could be shared with the other unemulated marathon - game of the series called just "Pyon Pyon". - -***********************************************************************************/ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/gen_latch.h" -#include "machine/nvram.h" -#include "machine/rstbuf.h" -#include "machine/ticket.h" -#include "sound/ay8910.h" -#include "sound/msm5205.h" -#include "video/v9938.h" -#include "speaker.h" - - -namespace { - -class kurukuru_state : public driver_device -{ -public: - kurukuru_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_adpcm(*this, "adpcm"), - m_soundirq(*this, "soundirq"), - m_hopper(*this, "hopper"), - m_bank1(*this, "bank1") - { } - - void ppj(machine_config &config); - void kurukuru(machine_config &config); - -protected: - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - -private: - required_device m_maincpu; - required_device m_audiocpu; - required_device m_adpcm; - required_device m_soundirq; - required_device m_hopper; - required_memory_bank m_bank1; - - uint8_t m_adpcm_data; - - void kurukuru_out_latch_w(uint8_t data); - void kurukuru_bankswitch_w(uint8_t data); - void kurukuru_adpcm_reset_w(uint8_t data); - uint8_t kurukuru_adpcm_timer_irqack_r(); - void kurukuru_adpcm_data_w(uint8_t data); - void ym2149_aout_w(uint8_t data); - void ym2149_bout_w(uint8_t data); - - void kurukuru_msm5205_vck(int state); - void kurukuru_audio_io(address_map &map) ATTR_COLD; - void kurukuru_audio_map(address_map &map) ATTR_COLD; - void kurukuru_io(address_map &map) ATTR_COLD; - void kurukuru_map(address_map &map) ATTR_COLD; - void ppj_audio_io(address_map &map) ATTR_COLD; - void ppj_audio_map(address_map &map) ATTR_COLD; - void ppj_io(address_map &map) ATTR_COLD; - void ppj_map(address_map &map) ATTR_COLD; -}; - -#define MAIN_CLOCK XTAL(21'477'272) -#define CPU_CLOCK MAIN_CLOCK/6 -#define YM2149_CLOCK MAIN_CLOCK/6/2 // '/SEL' pin tied to GND, so internal divisor x2 is active -#define M5205_CLOCK XTAL(384'000) - - -/************************************************* -* Interrupts * -*************************************************/ - - -void kurukuru_state::kurukuru_msm5205_vck(int state) -{ - m_soundirq->rst30_w(1); - m_adpcm->data_w(m_adpcm_data); -} - - -/************************************************* -* Memory Map / I/O * -*************************************************/ - -// Main CPU - -void kurukuru_state::kurukuru_out_latch_w(uint8_t data) -{ -/* - 00-0f is output latch (controls jamma output pins) - - BIT EDGE CONNECTOR JAMMA FUNCTION - ----+--------------------+---------------- - 00 | Pin 08 top side | coin counter 1 - 01 | Pin 09 top side | coin lockout 1 - 02 | Pin 14 bottom side | service switch - 03 | Pin 11 bottom side | unused - 04 | Pin 11 top side | unused - 05 | Pin 08 bottom side | coin counter 2 - 06 | Pin 09 bottom side | coin lockout 2 - 07 | Not connected | unused - -*/ - machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); - machine().bookkeeping().coin_counter_w(1, BIT(data, 5)); - //machine().bookkeeping().coin_lockout_global_w(BIT(data, 6)); - m_hopper->motor_w(BIT(data, 6)); - - if (data & 0x9e) - logerror("kurukuru_out_latch_w %02X @ %04X\n", data, m_maincpu->pc()); -} - -void kurukuru_state::kurukuru_bankswitch_w(uint8_t data) -{ - m_bank1->set_entry(7); // remove banked rom -/* - if bits 5,4 are 00,10,01 then IC10 is enabled - if bits 3,2 are 00,10,01 then IC18 is enabled - if bits 1,0 are 00,10,01 then IC23 is enabled - Then in addition, A15 (ROM half) is determined by the low bit. - Note that in theory, it can cause a conflict by enabling more than one chip, - but the game never does this. -*/ - for (int chip = 0; chip < 3; chip++) - { - if ((data & 3) != 3) - m_bank1->set_entry((chip << 1) | (~data & 1)); - data >>= 2; - } -} - - -void kurukuru_state::kurukuru_map(address_map &map) -{ - map(0x0000, 0x5fff).rom(); - map(0x6000, 0xdfff).bankr("bank1"); - map(0xe000, 0xffff).ram().share("nvram"); -} - -void kurukuru_state::kurukuru_io(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_out_latch_w)); - map(0x10, 0x10).mirror(0x0f).portr("DSW1"); - map(0x20, 0x20).mirror(0x0f).w("soundlatch", FUNC(generic_latch_8_device::write)); - map(0x80, 0x83).mirror(0x0c).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); - map(0x90, 0x90).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_bankswitch_w)); - map(0xa0, 0xa0).mirror(0x0f).portr("IN0"); - map(0xb0, 0xb0).mirror(0x0f).portr("IN1"); - map(0xc0, 0xc0).mirror(0x0f).rw("ym2149", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); - map(0xd0, 0xd0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::data_w)); -} - -void kurukuru_state::ppj_map(address_map &map) -{ - map(0x0000, 0x5fff).rom(); - map(0x6000, 0xdfff).bankr(m_bank1); - map(0xe000, 0xffff).ram().share("nvram"); -} - -void kurukuru_state::ppj_io(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_bankswitch_w)); - map(0x10, 0x13).mirror(0x0c).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); - map(0x30, 0x30).mirror(0x0f).w("soundlatch", FUNC(generic_latch_8_device::write)); - map(0x40, 0x40).mirror(0x0f).portr("DSW1"); - map(0x50, 0x50).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_out_latch_w)); - map(0x60, 0x60).mirror(0x0f).portr("IN1"); - map(0x70, 0x70).mirror(0x0f).portr("IN0"); - map(0xc0, 0xc0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::address_w)); - map(0xc0, 0xc0).mirror(0x0f).r("ym2149", FUNC(ay8910_device::data_r)); - map(0xd0, 0xd0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::data_w)); -} -/* - - 00h W --> bankswitching reg... - - 10h W --> 00's \ - 11h W --> 02 8f 20 91... > V9938 OK - 13h W --> / - - 30h W --> soundlatch... - 40h R --> (very beginning) seems DSW1 - 50h W --> Output port (counters) - 60h R --> Input port - 70h R --> Input port - - C0h W --> YM2149 address W - C8h R --> YM2149 data R --> DSW2 - D0h W --> YM2149 data W - -*/ - -// Audio CPU - -void kurukuru_state::kurukuru_adpcm_data_w(uint8_t data) -{ -/* - 6-bit latch. only 4 connected... - bit 0-3 = MSM5205 data. -*/ - m_adpcm_data = data & 0xf; -} - -void kurukuru_state::kurukuru_adpcm_reset_w(uint8_t data) -{ -/* - 6-bit latch. only 4 connected... - bit 0 = RESET - bit 1 = 4B/3B - bit 2 = S2 - bit 3 = S1 -*/ - m_adpcm->playmode_w(bitswap<8>((data>>1), 7,6,5,4,3,0,1,2)); - m_adpcm->reset_w(data & 1); -} - -uint8_t kurukuru_state::kurukuru_adpcm_timer_irqack_r() -{ - if (!machine().side_effects_disabled()) - m_soundirq->rst30_w(0); - return 0; -} - - -void kurukuru_state::kurukuru_audio_map(address_map &map) -{ - map(0x0000, 0xf7ff).rom(); - map(0xf800, 0xffff).ram(); -} - -void kurukuru_state::kurukuru_audio_io(address_map &map) -{ - map.global_mask(0x7f); - map(0x40, 0x40).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_data_w)); - map(0x50, 0x50).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_reset_w)); - map(0x60, 0x60).mirror(0x0f).r("soundlatch", FUNC(generic_latch_8_device::read)); - map(0x70, 0x70).mirror(0x0f).r(FUNC(kurukuru_state::kurukuru_adpcm_timer_irqack_r)); -} - -void kurukuru_state::ppj_audio_map(address_map &map) -{ - map(0x0000, 0xf7ff).rom(); - map(0xf800, 0xffff).ram(); -} - -void kurukuru_state::ppj_audio_io(address_map &map) -{ - map.global_mask(0x7f); - map(0x20, 0x20).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_data_w)); - map(0x30, 0x30).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_reset_w)); - map(0x40, 0x40).mirror(0x0f).r("soundlatch", FUNC(generic_latch_8_device::read)); - map(0x50, 0x50).mirror(0x0f).r(FUNC(kurukuru_state::kurukuru_adpcm_timer_irqack_r)); -} -/* - 30h -W --> 0x0b - 40h R- --> soundlatch... - 50h R- --> adpcm irq ack -*/ - -// YM2149 ports -void kurukuru_state::ym2149_aout_w(uint8_t data) -{ - logerror("YM2149: Port A out: %02X\n", data); -} - -void kurukuru_state::ym2149_bout_w(uint8_t data) -{ - logerror("YM2149: Port B out: %02X\n", data); -} - - -/************************************************* -* Input Ports Definitions * -*************************************************/ - -static INPUT_PORTS_START( kurukuru ) - PORT_START("IN0") -/* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 - so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 -*/ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Botechin)") // edge connector pin 20 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("2nd (Oume)") // edge connector pin 21 top - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyokorin)") // edge connector pin 22 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Kunio)") // edge connector pin 23 top - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Pyon-Pyon)") // edge connector pin 20 bottom - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom - - PORT_START("IN1") -/* routed to JAMMA top side 15, bottom 15, top 16, bottom 16, top 17, bottom 17, top 24, bottom 24 - so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 -*/ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(u8"¥10 In") // edge connector pin 16 bottom - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(u8"¥100 In") PORT_IMPULSE(2) // edge connector pin 17 bottom - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback, edge connector pin 24 top - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom - - PORT_START("DSW1") // found in the PCB: 11111111 - PORT_DIPNAME( 0x07, 0x00, u8"Coinage A (¥100)" ) PORT_DIPLOCATION("DSW1:1,2,3") - PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) - PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) - PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) - PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) - PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) - PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) - PORT_DIPSETTING( 0x04, "1 Coin / 20 Medal" ) - PORT_DIPSETTING( 0x00, "1 Coin / 50 Medal" ) - PORT_DIPNAME( 0x18, 0x00, u8"Coinage B (¥10)" ) PORT_DIPLOCATION("DSW1:4,5") - PORT_DIPSETTING( 0x00, "3 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x10, "2 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x18, "1 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x08, "1 Coin / 2 Medal" ) - PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x00, u8"¥100 = Credits; Medal In = 2 Credits by Medal" ) - PORT_DIPSETTING( 0x20, u8"¥100 = Exchange; Medal In = 1 Credit by Medal" ) - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x40, "Automatic" ) - PORT_DIPSETTING( 0x00, "Manual" ) - PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8") - PORT_DIPSETTING( 0x80, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - - PORT_START("DSW2") // found in the PCB: 01111110 - PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") - PORT_DIPSETTING( 0x07, "50%" ) - PORT_DIPSETTING( 0x03, "60%" ) - PORT_DIPSETTING( 0x05, "70%" ) - PORT_DIPSETTING( 0x01, "75%" ) - PORT_DIPSETTING( 0x06, "80%" ) - PORT_DIPSETTING( 0x02, "85%" ) - PORT_DIPSETTING( 0x04, "90%" ) - PORT_DIPSETTING( 0x00, "95%" ) - PORT_DIPNAME( 0x08, 0x08, "Winwave" ) PORT_DIPLOCATION("DSW2:4") - PORT_DIPSETTING( 0x08, "Small" ) - PORT_DIPSETTING( 0x00, "Big" ) - PORT_DIPNAME( 0x10, 0x10, "M.Medal" ) PORT_DIPLOCATION("DSW2:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7") - PORT_DIPSETTING( 0x60, "10-1" ) - PORT_DIPSETTING( 0x20, "20-1" ) - PORT_DIPSETTING( 0x40, "50-1" ) - PORT_DIPSETTING( 0x00, "100-1" ) - PORT_DIPNAME( 0x80, 0x80, "Bet Max" ) PORT_DIPLOCATION("DSW2:8") - PORT_DIPSETTING( 0x80, "5" ) - PORT_DIPSETTING( 0x00, "10" ) - -INPUT_PORTS_END - - -static INPUT_PORTS_START( ppj ) - PORT_START("IN0") -/* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 - so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 -*/ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Boketa)") // edge connector pin 20 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("2nd (Kunio)") // edge connector pin 21 top - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyon-Pyon)") // edge connector pin 22 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Pyokorin)") // edge connector pin 23 top - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Botechin)") // edge connector pin 20 bottom - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom (active) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom (active) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom - - PORT_START("IN1") -/* routed to JAMMA top side 15, bottom 15, top 16, bottom 16, top 17, bottom 17, top 24, bottom 24 - so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 -*/ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(u8"¥10 In") // edge connector pin 16 bottom - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(u8"¥100 In") PORT_IMPULSE(2) // edge connector pin 17 bottom - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback, edge connector pin 24 top - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom - - PORT_START("DSW1") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) - PORT_DIPNAME( 0x07, 0x03, u8"Coinage A (¥100)" ) PORT_DIPLOCATION("DSW1:1,2,3") - PORT_DIPSETTING( 0x00, "1 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x04, "1 Coin / 2 Medal" ) - PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) - PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) - PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) - PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) - PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) - PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) - // Coinage B is always 1 Coin / 1 Medal - PORT_DIPNAME( 0x08, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:4") - PORT_DIPSETTING( 0x00, u8"¥100 = Credits" ) - PORT_DIPSETTING( 0x08, u8"¥100 = Exchange" ) - PORT_DIPNAME( 0x10, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:5") - PORT_DIPSETTING( 0x10, "Automatic" ) - PORT_DIPSETTING( 0x00, "Manual" ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSW2") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) - PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") - PORT_DIPSETTING( 0x07, "50%" ) - PORT_DIPSETTING( 0x03, "60%" ) - PORT_DIPSETTING( 0x05, "70%" ) - PORT_DIPSETTING( 0x01, "75%" ) - PORT_DIPSETTING( 0x06, "80%" ) - PORT_DIPSETTING( 0x02, "85%" ) - PORT_DIPSETTING( 0x04, "90%" ) - PORT_DIPSETTING( 0x00, "95%" ) - PORT_DIPNAME( 0x08, 0x00, "Winwave" ) PORT_DIPLOCATION("DSW2:4") - PORT_DIPSETTING( 0x08, "Small" ) - PORT_DIPSETTING( 0x00, "Big" ) - PORT_DIPNAME( 0x10, 0x00, "M.Medal" ) PORT_DIPLOCATION("DSW2:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7") - PORT_DIPSETTING( 0x60, "20-1" ) - PORT_DIPSETTING( 0x20, "50-1" ) - PORT_DIPSETTING( 0x40, "100-1" ) - PORT_DIPSETTING( 0x00, "200-1" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - -INPUT_PORTS_END - - -/************************************************* -* Machine Start & Reset Routines * -*************************************************/ - -void kurukuru_state::machine_start() -{ - m_bank1->configure_entries(0, 8, memregion("user1")->base(), 0x8000); - - save_item(NAME(m_adpcm_data)); -} - -void kurukuru_state::machine_reset() -{ -} - -/************************************************* -* Machine Driver * -*************************************************/ - -void kurukuru_state::kurukuru(machine_config &config) -{ - // basic machine hardware - Z80(config, m_maincpu, CPU_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &kurukuru_state::kurukuru_map); - m_maincpu->set_addrmap(AS_IO, &kurukuru_state::kurukuru_io); - - Z80(config, m_audiocpu, CPU_CLOCK); - m_audiocpu->set_addrmap(AS_PROGRAM, &kurukuru_state::kurukuru_audio_map); - m_audiocpu->set_addrmap(AS_IO, &kurukuru_state::kurukuru_audio_io); - m_audiocpu->set_irq_acknowledge_callback("soundirq", FUNC(rst_neg_buffer_device::inta_cb)); - - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - - // video hardware - v9938_device &v9938(V9938(config, "v9938", MAIN_CLOCK)); - v9938.set_screen_ntsc("screen"); - v9938.set_vram_size(0x30000); - v9938.int_cb().set_inputline("maincpu", 0); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); - - TICKET_DISPENSER(config, "hopper", attotime::from_msec(50)); - - // sound hardware - SPEAKER(config, "mono").front_center(); - - GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set(m_soundirq, FUNC(rst_neg_buffer_device::rst28_w)); - - // latch irq vector is $ef (rst $28) - // timer irq vector is $f7 (rst $30) - // if both are asserted, the vector becomes $f7 AND $ef = $e7 (rst $20) - RST_NEG_BUFFER(config, m_soundirq, 0).int_callback().set_inputline(m_audiocpu, 0); - - ym2149_device &ym2149(YM2149(config, "ym2149", YM2149_CLOCK)); - ym2149.port_b_read_callback().set_ioport("DSW2"); - ym2149.port_a_write_callback().set(FUNC(kurukuru_state::ym2149_aout_w)); - ym2149.port_b_write_callback().set(FUNC(kurukuru_state::ym2149_bout_w)); - ym2149.add_route(ALL_OUTPUTS, "mono", 0.80); - - MSM5205(config, m_adpcm, M5205_CLOCK); - m_adpcm->vck_legacy_callback().set(FUNC(kurukuru_state::kurukuru_msm5205_vck)); - m_adpcm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly - m_adpcm->add_route(ALL_OUTPUTS, "mono", 0.80); -} - -void kurukuru_state::ppj(machine_config &config) -{ - kurukuru(config); - - // basic machine hardware - m_maincpu->set_addrmap(AS_PROGRAM, &kurukuru_state::ppj_map); - m_maincpu->set_addrmap(AS_IO, &kurukuru_state::ppj_io); - - m_audiocpu->set_addrmap(AS_PROGRAM, &kurukuru_state::ppj_audio_map); - m_audiocpu->set_addrmap(AS_IO, &kurukuru_state::ppj_audio_io); -} - - -/************************************************* -* ROMs Loading * -*************************************************/ - -/* Kuru Kuru Pyon Pyon. - くるくるぴょんぴょん - 1990, Success / Taiyo Jidoki. -*/ -ROM_START( kurukuru ) - ROM_REGION( 0x08000, "maincpu", 0 ) - ROM_LOAD( "kp_17l.ic17", 0x00000, 0x08000, CRC(9b552ebc) SHA1(07d0e62b7fdad381963a345376b72ad31eb7b96d) ) // program code - // Game ID string: "carp carp carp hiroshima ---" - - ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms - ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated - ROM_LOAD( "18.ic18", 0x10000, 0x10000, CRC(afb13c6a) SHA1(ac3cd40fad081f7a2b3d1fc72ea96282b9d1f4a3) ) // ic18: big frog gfx - ROM_LOAD( "10.ic10", 0x20000, 0x10000, CRC(3d6012bc) SHA1(2764f70e0e0bef3f2f71dd6c78e0a4189057beca) ) // ic10: title + text + ingame gfx - ROM_FILL( 0x30000, 0x10000, 0xff ) // dummy entry for when no romchip is selected - - ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "4.ic4", 0x00000, 0x10000, CRC(85d86f32) SHA1(f2aa93d702e6577f8f2204c74c44ac26d05be699) ) // code & adpcm samples - - ROM_REGION( 0x800, "plds", 0 ) - ROM_LOAD( "51.ic26", 0x0000, 0x0104, CRC(ce4a601b) SHA1(07f5bbb327b220e5846927cbb91149174dd07b36) ) - ROM_LOAD( "52.ic27", 0x0200, 0x0104, CRC(e23296a5) SHA1(4747923d201fcc5e0e752acbf50b41f0414e4ca8) ) - ROM_LOAD( "53.ic12", 0x0400, 0x0104, CRC(2ac654f2) SHA1(18668c73781a55dcffc4bf4c107026b0e72a75d1) ) - ROM_LOAD( "7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) ) -ROM_END - -/* Pyon Pyon Jump. - ぴょんぴょんジャンプ - Ver 1.40. - 1991, Success / Taiyo Jidoki. -*/ -ROM_START( ppj ) - ROM_REGION( 0x08000, "maincpu", 0 ) - ROM_LOAD( "ppj17.ic17", 0x00000, 0x08000, CRC(5d9c9ceb) SHA1(0f52c8a0aaaf978afeb07e56493399133b4ce781) ) // program code - // Game ID string: "PYON PYON JUMP V1.40" - - ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms - ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated - ROM_LOAD( "ppj18.ic18", 0x10000, 0x10000, CRC(69612fc6) SHA1(c6de2ec0db8ad2ace91c3a557a03ed73d0e7336d) ) // ic18: gfx set 1 - ROM_LOAD( "ppj10.ic10", 0x20000, 0x10000, CRC(95314d84) SHA1(1a8cf50e9a1e9e8a8f5702cc735ec993ddd2fdce) ) // ic10: gfx set 2 - ROM_FILL( 0x30000, 0x10000, 0xff ) // dummy entry for when no romchip is selected - - ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "ppj4.ic4", 0x00000, 0x10000, CRC(6573a0a0) SHA1(6bb99e153a22fce01a71efb3bba6c6cc04bbf8b1) ) // code & adpcm samples - - ROM_REGION( 0x800, "plds", 0 ) - ROM_LOAD( "pal16l8a_no21.ic26", 0x0000, 0x0104, CRC(414c8b50) SHA1(17f562c50a2bca41aeb7a1a7cb3916853cea0d24) ) - ROM_LOAD( "pal16l8a_no22.ic27", 0x0200, 0x0104, CRC(ee2b9257) SHA1(15c79b143eafc7915e0f376a87c01afad8fad2b9) ) - ROM_LOAD( "pal16l8a_no23.ic12", 0x0400, 0x0104, CRC(8a7fbbe0) SHA1(aab8d6b77d46cf2d8620861af1f7c039b6dcda99) ) - ROM_LOAD( "pal12l6a_7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) ) // identical to kurukuru... -ROM_END - -} // anonymous namespace - - -/*************************************************************************** -* Game Drivers * -***************************************************************************/ - -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS -GAME( 1990, kurukuru, 0, kurukuru, kurukuru, kurukuru_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, ppj, 0, ppj, ppj, kurukuru_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jump (V1.40, Japan)", MACHINE_SUPPORTS_SAVE ) - -// unemulated.... - -// ぴょんぴょん (Pyon Pyon), 1988 Success / Taiyo Jidoki. -// スイスイぴょんぴょん (Sui Sui Pyon Pyon), 1992 Success / Taiyo Jidoki. diff --git a/src/mame/misc/othello.cpp b/src/mame/misc/othello.cpp deleted file mode 100644 index b101ce75134..00000000000 --- a/src/mame/misc/othello.cpp +++ /dev/null @@ -1,457 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Tomasz Slanina -/* - -Othello (version 3.0) - Success 1984 -------------------------------------- - -driver by Tomasz Slanina - -CPU Board: - D780C - main CPU (Z80) - HD46505SP - CRTC - D780-C - Sound CPU (Z80) - AY-3-8910 x2 - Sound - D7751C - ADPCM "Speech processor" - D8243 - I/O Expander for D7751C (8048 based) - -Video Board: - almost empty - 3/4 soldering pins not populated - - -Todo: -- correct colors (based on the color DAC (24 resistors) on pcb -- cocktail mode -- map a bunch of unknown read/writes (related to above I think) - -Notes: - -DSw 1:2 -Limit for help/undo (matta): -- when it's off, you can use each of them twice every time you - win and advance to the next game -- when it's on, you can only use them twice throughout the game - -*/ - -#include "emu.h" - -#include "cpu/mcs48/mcs48.h" -#include "cpu/z80/z80.h" -#include "machine/gen_latch.h" -#include "machine/i8243.h" -#include "sound/ay8910.h" -#include "sound/dac.h" -#include "video/mc6845.h" - -#include "emupal.h" -#include "screen.h" -#include "speaker.h" - - -namespace { - -constexpr uint8_t TILE_WIDTH = 6; - - -class othello_state : public driver_device -{ -public: - othello_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu"), - m_ay(*this, "ay%u", 0U), - m_upd7751(*this, "upd7751"), - m_i8243(*this, "upd7751_8243"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch"), - m_gfx_data(*this, "gfx"), - m_upd7751_data(*this, "upd7751data") - { } - - void othello(machine_config &config); - -protected: - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - -private: - /* memory pointers */ - required_shared_ptr m_videoram; - - /* video-related */ - int m_tile_bank = 0; - - /* misc */ - int m_ay_select = 0; - int m_ack_data = 0; - uint8_t m_upd7751_command = 0; - int m_sound_addr = 0; - int m_upd7751_busy = 0; - - /* devices */ - required_device m_maincpu; - required_device_array m_ay; - required_device m_upd7751; - required_device m_i8243; - required_device m_palette; - required_device m_soundlatch; - - required_region_ptr m_gfx_data; - required_region_ptr m_upd7751_data; - - uint8_t unk_87_r(); - void unk_8a_w(uint8_t data); - void upd7751_command_w(uint8_t data); - uint8_t upd7751_busy_r(); - uint8_t sound_ack_r(); - void unk_8f_w(uint8_t data); - void tilebank_w(uint8_t data); - uint8_t latch_r(); - void ay_select_w(uint8_t data); - void ack_w(uint8_t data); - void ay_address_w(uint8_t data); - void ay_data_w(uint8_t data); - uint8_t upd7751_rom_r(); - uint8_t upd7751_command_r(); - void upd7751_p2_w(uint8_t data); - template void upd7751_rom_addr_w(uint8_t data); - void upd7751_rom_select_w(uint8_t data); - - void othello_palette(palette_device &palette) const; - MC6845_UPDATE_ROW(crtc_update_row); - - void audio_map(address_map &map) ATTR_COLD; - void audio_portmap(address_map &map) ATTR_COLD; - void main_map(address_map &map) ATTR_COLD; - void main_portmap(address_map &map) ATTR_COLD; -}; - - -MC6845_UPDATE_ROW( othello_state::crtc_update_row ) -{ - rgb_t const *const palette = m_palette->palette()->entry_list_raw(); - uint8_t const *const gfx = m_gfx_data; - - for(int cx = 0; cx < x_count; ++cx) - { - uint32_t address = ((m_videoram[ma + cx] + m_tile_bank) << 4) | ra; - uint32_t tile_data = gfx[address] | (gfx[address + 0x2000] << 8) | (gfx[address + 0x4000] << 16); - - for(int x = 0; x < TILE_WIDTH; ++x) - { - bitmap.pix(y, (cx * TILE_WIDTH + x) ^ 1) = palette[tile_data & 0x0f]; - tile_data >>= 4; - } - } -} - -void othello_state::othello_palette(palette_device &palette) const -{ - for (int i = 0; i < palette.entries(); i++) - palette.set_pen_color(i, rgb_t(0xff, 0x00, 0xff)); - - // only colors 2,3,7,9,c,d,f are used - palette.set_pen_color(0x02, rgb_t(0x00, 0xff, 0x00)); - palette.set_pen_color(0x03, rgb_t(0xff, 0x7f, 0x00)); - palette.set_pen_color(0x07, rgb_t(0x00, 0x00, 0x00)); - palette.set_pen_color(0x09, rgb_t(0xff, 0x00, 0x00)); - palette.set_pen_color(0x0c, rgb_t(0x00, 0x00, 0xff)); - palette.set_pen_color(0x0d, rgb_t(0x7f, 0x7f, 0x00)); - palette.set_pen_color(0x0f, rgb_t(0xff, 0xff, 0xff)); -} - -void othello_state::main_map(address_map &map) -{ - map(0x0000, 0x1fff).rom(); - map(0x8000, 0x97ff).noprw(); /* not populated */ - map(0x9800, 0x9fff).ram().share(m_videoram); - map(0xf000, 0xffff).ram(); -} - -uint8_t othello_state::unk_87_r() -{ - // bit 7 = ack/status from device connected to port 8a? - return 0; -} - -void othello_state::unk_8a_w(uint8_t data) -{ - logerror("8a -> %x\n", data); -} - -void othello_state::upd7751_command_w(uint8_t data) -{ - m_upd7751->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); - m_upd7751_command = data; -} - -uint8_t othello_state::upd7751_busy_r() -{ - return m_upd7751_busy; -} - -uint8_t othello_state::sound_ack_r() -{ - return m_ack_data; -} - -void othello_state::unk_8f_w(uint8_t data) -{ - logerror("8f -> %x\n", data); -} - -void othello_state::tilebank_w(uint8_t data) -{ - m_tile_bank = (data == 0x0f) ? 0x100 : 0x00; - logerror("tilebank -> %x\n", data); -} - -void othello_state::main_portmap(address_map &map) -{ - map.global_mask(0xff); - map(0x08, 0x08).w("crtc", FUNC(mc6845_device::address_w)); - map(0x09, 0x09).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); - map(0x80, 0x80).portr("INP"); - map(0x81, 0x81).portr("SYSTEM"); - map(0x83, 0x83).portr("DSW"); - map(0x86, 0x86).w(FUNC(othello_state::tilebank_w)); - map(0x87, 0x87).r(FUNC(othello_state::unk_87_r)); - map(0x8a, 0x8a).w(FUNC(othello_state::unk_8a_w)); - map(0x8c, 0x8c).rw(FUNC(othello_state::upd7751_busy_r), FUNC(othello_state::upd7751_command_w)); - map(0x8d, 0x8d).r(FUNC(othello_state::sound_ack_r)).w(m_soundlatch, FUNC(generic_latch_8_device::write)); - map(0x8f, 0x8f).w(FUNC(othello_state::unk_8f_w)); -} - -uint8_t othello_state::latch_r() -{ - uint8_t retval = m_soundlatch->read(); - if (!machine().side_effects_disabled()) - m_soundlatch->clear_w(); - - return retval; -} - -void othello_state::ay_select_w(uint8_t data) -{ - m_ay_select = data; -} - -void othello_state::ack_w(uint8_t data) -{ - m_ack_data = data; -} - -void othello_state::ay_address_w(uint8_t data) -{ - if (m_ay_select & 1) m_ay[0]->address_w(data); - if (m_ay_select & 2) m_ay[1]->address_w(data); -} - -void othello_state::ay_data_w(uint8_t data) -{ - if (m_ay_select & 1) m_ay[0]->data_w(data); - if (m_ay_select & 2) m_ay[1]->data_w(data); -} - -void othello_state::audio_map(address_map &map) -{ - map(0x0000, 0x1fff).rom(); - map(0x8000, 0x83ff).ram(); -} - -void othello_state::audio_portmap(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).r(FUNC(othello_state::latch_r)); - map(0x01, 0x01).w(FUNC(othello_state::ay_data_w)); - map(0x03, 0x03).w(FUNC(othello_state::ay_address_w)); - map(0x04, 0x04).w(FUNC(othello_state::ack_w)); - map(0x08, 0x08).w(FUNC(othello_state::ay_select_w)); -} - -template -void othello_state::upd7751_rom_addr_w(uint8_t data) -{ - // P4 - address lines 0-3 - // P5 - address lines 4-7 - // P6 - address lines 8-11 - m_sound_addr = (m_sound_addr & ~(0x00f << Shift)) | ((data & 0x0f) << Shift); -} - -void othello_state::upd7751_rom_select_w(uint8_t data) -{ - // P7 - ROM selects - m_sound_addr &= 0xfff; - - if (!BIT(data, 0)) m_sound_addr |= 0x0000; - if (!BIT(data, 1)) m_sound_addr |= 0x1000; - if (!BIT(data, 2)) m_sound_addr |= 0x2000; - if (!BIT(data, 3)) m_sound_addr |= 0x3000; -} - -uint8_t othello_state::upd7751_rom_r() -{ - return m_upd7751_data[m_sound_addr]; -} - -uint8_t othello_state::upd7751_command_r() -{ - return m_upd7751_command << 4 | 0x0f; -} - -void othello_state::upd7751_p2_w(uint8_t data) -{ - /* write to P2; low 4 bits go to 8243 */ - m_i8243->p2_w(data & 0x0f); - - /* output of bit $80 indicates we are ready (1) or busy (0) */ - /* no other outputs are used */ - m_upd7751_busy = data & 0x80; -} - -static INPUT_PORTS_START( othello ) - PORT_START("DSW") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x06, 0x06, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3") - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x08, 0x00, "Limit for Matta" ) PORT_DIPLOCATION("SW1:4") - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPLOCATION("SW1:5") /* stored at $fd1e */ - PORT_DIPNAME( 0x60, 0x60, "Timer (seconds)" ) PORT_DIPLOCATION("SW1:6,7") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x20, "6" ) - PORT_DIPSETTING( 0x40, "8" ) - PORT_DIPSETTING( 0x60, "10" ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Hard ) ) - - PORT_START("INP") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - - PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) -INPUT_PORTS_END - -void othello_state::machine_start() -{ - save_item(NAME(m_tile_bank)); - save_item(NAME(m_ay_select)); - save_item(NAME(m_ack_data)); - save_item(NAME(m_upd7751_command)); - save_item(NAME(m_sound_addr)); - save_item(NAME(m_upd7751_busy)); -} - -void othello_state::machine_reset() -{ - m_tile_bank = 0; - m_ay_select = 0; - m_ack_data = 0; - m_upd7751_command = 0; - m_sound_addr = 0; - m_upd7751_busy = 0; -} - -void othello_state::othello(machine_config &config) -{ - /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(8'000'000)/2); - m_maincpu->set_addrmap(AS_PROGRAM, &othello_state::main_map); - m_maincpu->set_addrmap(AS_IO, &othello_state::main_portmap); - m_maincpu->set_vblank_int("screen", FUNC(othello_state::irq0_line_hold)); - - z80_device &audiocpu(Z80(config, "audiocpu", XTAL(3'579'545))); - audiocpu.set_addrmap(AS_PROGRAM, &othello_state::audio_map); - audiocpu.set_addrmap(AS_IO, &othello_state::audio_portmap); - - UPD7751(config, m_upd7751, XTAL(6'000'000)); - m_upd7751->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground - m_upd7751->p2_in_cb().set(FUNC(othello_state::upd7751_command_r)); - m_upd7751->bus_in_cb().set(FUNC(othello_state::upd7751_rom_r)); - m_upd7751->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w)); - m_upd7751->p2_out_cb().set(FUNC(othello_state::upd7751_p2_w)); - m_upd7751->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w)); - - config.set_perfect_quantum(m_maincpu); - - I8243(config, m_i8243); - m_i8243->p4_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<0>)); - m_i8243->p5_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<4>)); - m_i8243->p6_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<8>)); - m_i8243->p7_out_cb().set(FUNC(othello_state::upd7751_rom_select_w)); - - /* 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(64*6, 64*8); - screen.set_visarea(0*8, 64*6-1, 0*8, 64*8-1); - screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update)); - - PALETTE(config, m_palette, FUNC(othello_state::othello_palette), 0x10); - - hd6845s_device &crtc(HD6845S(config, "crtc", 1000000 /* ? MHz */)); /* HD46505SP @ CPU clock */ - crtc.set_screen("screen"); - crtc.set_show_border_area(false); - crtc.set_char_width(TILE_WIDTH); - crtc.set_update_row_callback(FUNC(othello_state::crtc_update_row)); - - /* sound hardware */ - SPEAKER(config, "speaker").front_center(); - - GENERIC_LATCH_8(config, m_soundlatch); - - AY8910(config, m_ay[0], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); - AY8910(config, m_ay[1], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); - - DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC -} - -ROM_START( othello ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "4.ic59", 0x0000, 0x2000, CRC(9f82fe14) SHA1(59600264ccce787383827fc5aa0f2c23728f6946)) - - ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "3.ic32", 0x0000, 0x2000, CRC(2bb4f75d) SHA1(29a659031acf0d50f374f440b8d353bcf98145a0)) - - ROM_REGION( 0x1000, "upd7751", 0 ) /* 1k for 7751 onboard ROM */ - ROM_LOAD( "7751.bin", 0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) - - ROM_REGION( 0x4000, "upd7751data", 0 ) /* 7751 sound data */ - ROM_LOAD( "1.ic48", 0x0000, 0x2000, CRC(c3807dea) SHA1(d6339380e1239f3e20bcca2fbc673ad72e9ca608)) - ROM_LOAD( "2.ic49", 0x2000, 0x2000, CRC(a945f3e7) SHA1(ea18efc18fda63ce1747287bbe2a9704b08daff8)) - - ROM_REGION( 0x6000, "gfx", 0 ) - ROM_LOAD( "5.ic40", 0x0000, 0x2000, CRC(45fdc1ab) SHA1(f30f6002e3f34a647effac8b0116c8ed064e226a)) - ROM_LOAD( "6.ic41", 0x2000, 0x2000, CRC(467a731f) SHA1(af80e854522e53fb1b9af7945b2c803a654c6f65)) - ROM_LOAD( "7.ic42", 0x4000, 0x2000, CRC(a76705f7) SHA1(b7d2a65d65d065732ddd0b3b738749369b382b48)) -ROM_END - -} // anonymous namespace - - -GAME( 1984, othello, 0, othello, othello, othello_state, empty_init, ROT0, "Success", "Othello (version 3.0)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/misc/skopro.cpp b/src/mame/misc/skopro.cpp deleted file mode 100644 index 53746e36b95..00000000000 --- a/src/mame/misc/skopro.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders: -/* - Skonec SkoPro v1.0 PC hardware - - Intel Pentium E2160 1M Cache, 1.80 GHz, 800 MHz FSB - Biostar MG31-M7 TE motherboard - 1GB RAM - nVidia GeForce 8400GS - Integrated sound? - Hitachi Deskstar HDS721680PLA320 80 GB - EGIS2JVS V1.2 card - Windows XP embedded - - The system was meant to be modular, but only 2 titles are said to have been actually released. - - Announced titles: - Douga De Puzzle - Idol Paradise - Dragon Dance - Exception - Otenami Haiken Ritaanzu! - Shanghai -*/ - -#include "emu.h" -#include "cpu/i386/i386.h" -#include "machine/pci.h" - - -namespace { - -class skopro_state : public driver_device -{ -public: - skopro_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - { } - - void skopro(machine_config &config); - -private: - required_device m_maincpu; - - void skopro_map(address_map &map) ATTR_COLD; -}; - -void skopro_state::skopro_map(address_map &map) -{ -} - -static INPUT_PORTS_START( skopro ) -INPUT_PORTS_END - -void skopro_state::skopro(machine_config &config) -{ - /* basic machine hardware */ - PENTIUM4(config, m_maincpu, 100'000'000); // actually a Pentium E2160 at 1.80 GHz - m_maincpu->set_addrmap(AS_PROGRAM, &skopro_state::skopro_map); - m_maincpu->set_disable(); - - PCI_ROOT(config, "pci", 0); - // ... -} - -/*************************************************************************** - - Game drivers - -***************************************************************************/ - -ROM_START( drgdance ) - ROM_REGION(0x20000, "bios", 0) - ROM_LOAD("mbbios", 0x10000, 0x10000, NO_DUMP ) - - DISK_REGION( "ide:0:hdd" ) - DISK_IMAGE( "dragon_dance", 0, SHA1(73868dd9354d936100ba56f460e872087ede012c) ) -ROM_END - -} // anonymous namespace - - -GAME( 2008, drgdance, 0, skopro, skopro, skopro_state, empty_init, ROT0, "Success", "Dragon Dance (V1.02J)", MACHINE_IS_SKELETON ) diff --git a/src/mame/misc/sothello.cpp b/src/mame/misc/sothello.cpp deleted file mode 100644 index 02c34634d96..00000000000 --- a/src/mame/misc/sothello.cpp +++ /dev/null @@ -1,408 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Tomasz Slanina -/* - Super Othello (c)1986 Fujiwara/Success - - driver by Tomasz Slanina - - 1 2 3 4 5 6 7 8 9 10 11 12 -+---------------------------------------------------------------------------------+ -| | -+-+ LA460 LA6324 M5205 X3 Z80A 1 2 5816P 74374 74138 | A - | | - | | -+-+ 74367 Y3014 74174 74174 7404 7474 74138 7404 7432 | B -| | -| | -| 74367 DSW1 YM2203 Z80A 3 4 5 6264 | C -| J | -| A | -| M C1663 74367 DSW2 7408 74125 7404 74138 74139 74174 7408 | D -| M X2 7414 7474 | -| A | -| C1663 V9938 41464 41464 X1 7474 74139 7432 74157 74244 7432 | E -| | -| | -+-+ C1663 41464 41464 6809B 6 6264 6264 6264 74244 74245 | F - | | - | | -+-+ C1663 | H -| | -+---------------------------------------------------------------------------------+ - -CPU : Z80A(x2) HD68B09P -Sound: YM2203?(surface scratched) + M5205 -OSC : 8.0000MHz(X1) 21.477 MHz(X2) 384kHz(X3) - -*/ - -#include "emu.h" -#include "cpu/m6809/m6809.h" -#include "cpu/z80/z80.h" -#include "machine/gen_latch.h" -#include "sound/msm5205.h" -#include "sound/ymopn.h" -#include "video/v9938.h" -#include "speaker.h" - - -namespace { - -class sothello_state : public driver_device -{ -public: - sothello_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_soundcpu(*this, "soundcpu"), - m_subcpu(*this, "subcpu"), - m_msm(*this, "msm"), - m_mainbank(*this, "mainbank") - { } - - void sothello(machine_config &config); - -protected: - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - -private: - void bank_w(uint8_t data); - uint8_t subcpu_comm_clear_r(); - uint8_t subcpu_comm_nmi_r(); - uint8_t subcpu_comm_status_r(); - uint8_t soundcpu_status_r(); - void msm_data_w(uint8_t data); - void soundcpu_busyflag_set_w(uint8_t data); - void soundcpu_busyflag_reset_w(uint8_t data); - void soundcpu_int_clear_w(uint8_t data); - void subcpu_status_w(uint8_t data); - void msm_cfg_w(uint8_t data); - void adpcm_int_w(int state); - - void maincpu_io_map(address_map &map) ATTR_COLD; - void maincpu_mem_map(address_map &map) ATTR_COLD; - void soundcpu_io_map(address_map &map) ATTR_COLD; - void soundcpu_mem_map(address_map &map) ATTR_COLD; - void subcpu_mem_map(address_map &map) ATTR_COLD; - - int m_subcpu_status; - int m_soundcpu_busy; - int m_msm_data; - - required_device m_maincpu; - required_device m_soundcpu; - required_device m_subcpu; - required_device m_msm; - required_memory_bank m_mainbank; -}; - -void sothello_state::machine_start() -{ - m_mainbank->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000); - - save_item(NAME(m_subcpu_status)); - save_item(NAME(m_soundcpu_busy)); - save_item(NAME(m_msm_data)); -} - -void sothello_state::machine_reset() -{ - m_subcpu_status = 0; - m_soundcpu_busy = 0; - m_msm_data = 0; -} - - - -/****************************************************************************** - I/O & Address Maps -******************************************************************************/ - -// main Z80 - -void sothello_state::bank_w(uint8_t data) -{ - int bank=0; - switch(data^0xff) - { - case 1: bank=0; break; - case 2: bank=1; break; - case 4: bank=2; break; - case 8: bank=3; break; - } - m_mainbank->set_entry(bank); -} - -uint8_t sothello_state::subcpu_comm_clear_r() -{ - if(!machine().side_effects_disabled()) - m_subcpu_status = 0; - return 0; -} - -uint8_t sothello_state::subcpu_comm_nmi_r() -{ - if(!machine().side_effects_disabled()) - m_subcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - return 0; -} - -uint8_t sothello_state::subcpu_comm_status_r() -{ - return m_subcpu_status; -} - -uint8_t sothello_state::soundcpu_status_r() -{ - return m_soundcpu_busy; -} - -void sothello_state::maincpu_mem_map(address_map &map) -{ - map(0x0000, 0x7fff).rom().region("maincpu", 0); - map(0x8000, 0xbfff).bankr("mainbank"); - map(0xc000, 0xc7ff).ram().mirror(0x1800).share("mainsub"); - map(0xe000, 0xffff).ram(); -} - -void sothello_state::maincpu_io_map(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x0f).portr("INPUT1"); - map(0x10, 0x1f).portr("INPUT2"); - map(0x20, 0x2f).portr("SYSTEM"); - map(0x30, 0x30).r(FUNC(sothello_state::subcpu_comm_clear_r)); - map(0x31, 0x31).r(FUNC(sothello_state::subcpu_comm_nmi_r)); - map(0x32, 0x32).r(FUNC(sothello_state::subcpu_comm_status_r)); - map(0x33, 0x33).r(FUNC(sothello_state::soundcpu_status_r)); - map(0x40, 0x4f).w("soundlatch", FUNC(generic_latch_8_device::write)); - map(0x50, 0x50).w(FUNC(sothello_state::bank_w)); - map(0x60, 0x61).mirror(0x02).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // not sure, but the A1 line is ignored, code @ $8b8 - map(0x70, 0x73).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); -} - - -// sound Z80 - -void sothello_state::adpcm_int_w(int state) -{ - // only 4 bits are used - m_msm->data_w(m_msm_data & 0x0f); - m_soundcpu->set_input_line(0, ASSERT_LINE); -} - -void sothello_state::msm_cfg_w(uint8_t data) -{ -/* - bit 0 = RESET - bit 1 = 4B/3B 0 - bit 2 = S2 1 - bit 3 = S1 2 -*/ - m_msm->playmode_w(bitswap<3>(data,1,2,3)); - m_msm->reset_w(data & 1); -} - -void sothello_state::msm_data_w(uint8_t data) -{ - m_msm_data = data; -} - -void sothello_state::soundcpu_busyflag_set_w(uint8_t data) -{ - m_soundcpu_busy=1; -} - -void sothello_state::soundcpu_busyflag_reset_w(uint8_t data) -{ - m_soundcpu_busy=0; -} - -void sothello_state::soundcpu_int_clear_w(uint8_t data) -{ - m_soundcpu->set_input_line(0, CLEAR_LINE); -} - -void sothello_state::soundcpu_mem_map(address_map &map) -{ - map(0x0000, 0xdfff).rom().region("soundcpu", 0); - map(0xf800, 0xffff).ram(); -} - -void sothello_state::soundcpu_io_map(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).r("soundlatch", FUNC(generic_latch_8_device::read)); - map(0x01, 0x01).w(FUNC(sothello_state::msm_data_w)); - map(0x02, 0x02).w(FUNC(sothello_state::msm_cfg_w)); - map(0x03, 0x03).w(FUNC(sothello_state::soundcpu_busyflag_set_w)); - map(0x04, 0x04).w(FUNC(sothello_state::soundcpu_busyflag_reset_w)); - map(0x05, 0x05).w(FUNC(sothello_state::soundcpu_int_clear_w)); -} - - -// sub 6809 - -void sothello_state::subcpu_status_w(uint8_t data) -{ - m_subcpu_status = 3; -} - -void sothello_state::subcpu_mem_map(address_map &map) -{ - map(0x0000, 0x0000).w(FUNC(sothello_state::subcpu_status_w)).nopr(); - map(0x2000, 0x77ff).ram(); - map(0x7800, 0x7fff).ram().share("mainsub"); // upper 0x800 of 6264 is shared with main cpu - map(0x8000, 0xffff).rom().region("subcpu", 0); -} - - - -/****************************************************************************** - Input Ports -******************************************************************************/ - -static INPUT_PORTS_START( sothello ) - PORT_START("INPUT1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - - PORT_START("INPUT2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - - PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0xf2, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DSWA") - PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) - PORT_DIPNAME( 0x1c, 0x10, "Timer" ) - PORT_DIPSETTING( 0x1c, "15" ) - PORT_DIPSETTING( 0x18, "20" ) - PORT_DIPSETTING( 0x14, "25" ) - PORT_DIPSETTING( 0x10, "30" ) - PORT_DIPSETTING( 0x0c, "35" ) - PORT_DIPSETTING( 0x08, "40" ) - PORT_DIPSETTING( 0x04, "45" ) - PORT_DIPSETTING( 0x00, "50" ) - PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DSWB") - PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) - PORT_DIPNAME( 0x30, 0x10, "Matta" ) // undo moves - PORT_DIPSETTING( 0x30, "0" ) - PORT_DIPSETTING( 0x20, "1" ) - PORT_DIPSETTING( 0x10, "2" ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPNAME( 0x08, 0x08, "Games for 2 players" ) - PORT_DIPSETTING( 0x08, "1" ) - PORT_DIPSETTING( 0x00, "2" ) - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNUSED ) -INPUT_PORTS_END - - - -/****************************************************************************** - Machine Configs -******************************************************************************/ - -void sothello_state::sothello(machine_config &config) -{ - // basic machine hardware - Z80(config, m_maincpu, XTAL(21'477'272) / 6); - m_maincpu->set_addrmap(AS_PROGRAM, &sothello_state::maincpu_mem_map); - m_maincpu->set_addrmap(AS_IO, &sothello_state::maincpu_io_map); - - Z80(config, m_soundcpu, XTAL(21'477'272) / 6); - m_soundcpu->set_addrmap(AS_PROGRAM, &sothello_state::soundcpu_mem_map); - m_soundcpu->set_addrmap(AS_IO, &sothello_state::soundcpu_io_map); - - MC6809(config, m_subcpu, XTAL(8'000'000)); // divided by 4 internally - m_subcpu->set_addrmap(AS_PROGRAM, &sothello_state::subcpu_mem_map); - - config.set_perfect_quantum(m_maincpu); - - // video hardware - v9938_device &v9938(V9938(config, "v9938", XTAL(21'477'272))); - v9938.set_screen_ntsc("screen"); - v9938.set_vram_size(0x40000); - v9938.int_cb().set_inputline("maincpu", 0); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); - - // sound hardware - SPEAKER(config, "mono").front_center(); - - GENERIC_LATCH_8(config, "soundlatch"); - - ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(21'477'272) / 12)); - ymsnd.irq_handler().set_inputline(m_subcpu, 0); - ymsnd.port_a_read_callback().set_ioport("DSWA"); - ymsnd.port_b_read_callback().set_ioport("DSWB"); - ymsnd.add_route(0, "mono", 0.25); - ymsnd.add_route(1, "mono", 0.25); - ymsnd.add_route(2, "mono", 0.25); - ymsnd.add_route(3, "mono", 0.50); - - MSM5205(config, m_msm, XTAL(384'000)); - m_msm->vck_legacy_callback().set(FUNC(sothello_state::adpcm_int_w)); // interrupt function - m_msm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly - m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); -} - - - -/****************************************************************************** - ROM Definitions -******************************************************************************/ - -ROM_START( sothello ) - ROM_REGION( 0x18000, "maincpu", 0 ) - ROM_LOAD( "3.7c", 0x00000, 0x8000, CRC(47f97bd4) SHA1(52c9638f098fdcf66903fad7dafe3ab171758572) ) - ROM_LOAD( "4.8c", 0x08000, 0x8000, CRC(a98414e9) SHA1(6d14e1f9c79b95101e0aa101034f398af09d7f32) ) - ROM_LOAD( "5.9c", 0x10000, 0x8000, CRC(e5b5d61e) SHA1(2e4b3d85f41d0796a4d61eae40dd824769e1db86) ) - - ROM_REGION( 0x10000, "soundcpu", 0 ) - ROM_LOAD( "1.7a", 0x0000, 0x8000, CRC(6951536a) SHA1(64d07a692d6a167334c825dc173630b02584fdf6) ) - ROM_LOAD( "2.8a", 0x8000, 0x8000, CRC(9c535317) SHA1(b2e69b489e111d6f8105e68fade6e5abefb825f7) ) - - ROM_REGION( 0x8000, "subcpu", 0 ) - ROM_LOAD( "6.7f", 0x0000, 0x8000, CRC(ee80fc78) SHA1(9a9d7925847d7a36930f0761c70f67a9affc5e7c) ) -ROM_END - -} // anonymous namespace - - - -/****************************************************************************** - Drivers -******************************************************************************/ - -GAME( 1986, sothello, 0, sothello, sothello, sothello_state, empty_init, ROT0, "Success / Fujiwara", "Super Othello", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/msx/big10.cpp b/src/mame/msx/big10.cpp deleted file mode 100644 index 59c72e55c01..00000000000 --- a/src/mame/msx/big10.cpp +++ /dev/null @@ -1,285 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Angelo Salese, Roberto Fresca, Tomasz Slanina -/*************************************************************************** - - BIG 10 - Success, 1985. - - Driver by Angelo Salese, Roberto Fresca & Tomasz Slanina. - -**************************************************************************** - - Dumper Notes: - - Z80A - XTAL is 21.?727 - YM2149 - 8-position DSW x1 - RAM 6264 x1 - RAM 41464 x4 - unknown SDIP64 chip with welded heatsink! Might be a video chip or MCU? - -**************************************************************************** - - Dev Notes... - - - Guessed and hooked the Yamaha VDP (SDIP64 IC). Same VDP used on MSX systems. - - Added v9938 stuff, interrupts, video start, machine reset, input ports, - DIP switch, ym2149 interface, pre-defined main Xtal and derivatives for - z80 and ym2149. - - Added NVRAM, defined half of DIP switches bank (coinage & main game rate). - Added inputs for coins A, B & C, payout, reset, and service mode. - - Reorganized the driver. - -**************************************************************************** - - How to Play: - - - This is actually a Keno game (slightly modified Raffle/Bingo/Tombola game). - - First off, select the bet amount with the BET button. - - Then choose between "SELECT 10" button (pseudo-random) or user-defined - numbers,by pressing the desired number with the numpad then "select" - (enters the decimals first then the units, if three or more buttons - are pressed the older pressed buttons are discarded, i.e. press 1234 - then SELECT, 1 and 2 are discarded). - - Press "CANCEL ALL" to redo the numbering scheme. - - Once that you are happy with it, press START to begin the extraction of - winning numbers. - - If you get at least 2-4 numbers out of 20 extracted numbers, you win a - prize and you are entitled to do a big/small (double up) sub-game. - -***************************************************************************/ - -#include "emu.h" - -#include "cpu/z80/z80.h" -#include "machine/nvram.h" -#include "machine/ticket.h" -#include "sound/ay8910.h" -#include "video/v9938.h" - -#include "screen.h" -#include "speaker.h" - - -namespace { - -class big10_state : public driver_device -{ -public: - big10_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_hopper(*this, "hopper") - , m_in(*this, "IN%u", 1) - , m_lamp(*this, "lamp") - { } - - void big10(machine_config &config); - -protected: - virtual void machine_start() override { save_item(NAME(m_mux_data)); m_lamp.resolve(); } - -private: - uint8_t m_mux_data = 0; - required_device m_maincpu; - required_device m_hopper; - required_ioport_array<6> m_in; - output_finder<> m_lamp; - - void main_io(address_map &map) ATTR_COLD; - void main_map(address_map &map) ATTR_COLD; - - uint8_t mux_r(); - void mux_w(uint8_t data); -}; - - -/**************************************** -* Input Ports Demux & Common Routines * -****************************************/ - -void big10_state::mux_w(uint8_t data) -{ - m_mux_data = ~data; - m_hopper->motor_w(BIT(~data, 6)); - m_lamp = BIT(~data, 7); // maybe a coin counter? -} - -uint8_t big10_state::mux_r() -{ - uint8_t result = 0xff; - for (int b = 0; b < 6; b++) - if (BIT(m_mux_data, b)) - result &= m_in[b]->read(); - - return result; -} - - -/************************************** -* Memory Map * -**************************************/ - -void big10_state::main_map(address_map &map) -{ - map(0x0000, 0xbfff).rom(); - map(0xc000, 0xdfff).ram().share("nvram"); - map(0xf000, 0xffff).ram(); -} - -void big10_state::main_io(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).r(FUNC(big10_state::mux_r)); // present in test mode - map(0x02, 0x02).portr("SYSTEM"); // coins and service - map(0x98, 0x9b).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); - map(0xa0, 0xa1).w("aysnd", FUNC(ay8910_device::address_data_w)); - map(0xa2, 0xa2).r("aysnd", FUNC(ay8910_device::data_r)); // Dip-Switches routes here. -} - - -/************************************** -* Input Ports * -**************************************/ - -static INPUT_PORTS_START( big10 ) - - PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Analyze Mode") PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // in test mode, go to the game whilst keep pressed. - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // " - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) - - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Number 0") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Number 1") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Number 2") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Number 3") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Number 4") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Number 5") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Number 6") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Number 7") - - PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Number 8") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Number 9") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("Flip Flop") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Select") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("Select 10") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("Cancel All") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - - PORT_START("IN3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") - PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // in test mode triggers a sound and screen turns black, hanging the game. - - PORT_START("IN4") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("IN5") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("IN6") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, "Credit Limit?" ) PORT_DIPLOCATION("DSW1:8,7") - PORT_DIPSETTING( 0x00, "500" ) - PORT_DIPSETTING( 0x01, "1000" ) - PORT_DIPSETTING( 0x02, "3000" ) - PORT_DIPSETTING( 0x03, "9999" ) - PORT_DIPNAME( 0x0c, 0x0c, "Unknown" ) PORT_DIPLOCATION("DSW1:6,5") // $C17E - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x04, "1" ) - PORT_DIPSETTING( 0x08, "2" ) - PORT_DIPSETTING( 0x0c, "3" ) - PORT_DIPNAME( 0x30, 0x30, "Main Game Rate" ) PORT_DIPLOCATION("DSW1:4,3") - PORT_DIPSETTING( 0x00, "60%" ) - PORT_DIPSETTING( 0x10, "70%" ) - PORT_DIPSETTING( 0x20, "80%" ) - PORT_DIPSETTING( 0x30, "90%" ) - PORT_DIPNAME( 0xC0, 0xc0, "Coinage (A=1; B=5; C=10)" ) PORT_DIPLOCATION("DSW1:2,1") - PORT_DIPSETTING( 0x00, "x1" ) - PORT_DIPSETTING( 0x40, "x2" ) - PORT_DIPSETTING( 0x80, "x5" ) - PORT_DIPSETTING( 0xC0, "x10" ) - - // Unconnected, probably missing from the board - PORT_START("DSW2") - PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) -INPUT_PORTS_END - - -/************************************** -* Machine Driver * -**************************************/ - -void big10_state::big10(machine_config &config) -{ - constexpr XTAL MASTER_CLOCK = 21.477272_MHz_XTAL; // Dumper notes poorly refers to a 21.?727 Xtal. - - // basic machine hardware - Z80(config, m_maincpu, MASTER_CLOCK/6); // guess - m_maincpu->set_addrmap(AS_PROGRAM, &big10_state::main_map); - m_maincpu->set_addrmap(AS_IO, &big10_state::main_io); - - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - - TICKET_DISPENSER(config, m_hopper, attotime::from_msec(40)); - - // video hardware - v9938_device &v9938(V9938(config, "v9938", MASTER_CLOCK)); - v9938.set_screen_ntsc("screen"); - v9938.set_vram_size(0x40000); - v9938.int_cb().set_inputline("maincpu", 0); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); - - // sound hardware - SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", MASTER_CLOCK/12)); // guess - aysnd.port_a_read_callback().set_ioport("DSW2"); - aysnd.port_b_read_callback().set_ioport("DSW1"); - aysnd.port_a_write_callback().set(FUNC(big10_state::mux_w)); - aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); -} - - -/************************************** -* ROM Load * -**************************************/ - -ROM_START( big10 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "1", 0x0000, 0x4000, CRC(03e50455) SHA1(36834d35d037303e8b9e4ce950d22f11a52e9388) ) - ROM_LOAD( "2", 0x4000, 0x4000, CRC(b4626a5f) SHA1(a9b3b9575c657748a7f0b60ec2c7411dad0c83c1) ) - ROM_LOAD( "3", 0x8000, 0x4000, CRC(8d15da74) SHA1(0e114de6fcf79beac800575bfb739e6a6bf35660) ) -ROM_END - -// PCB marked SYSTEM MAKE3 with Cosmo Corporation sticker -ROM_START( big10a ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "auto.big-10-1.ic4", 0x0000, 0x4000, CRC(51bbc509) SHA1(86ba9e1a3a572f8c101b9e2866768836cb7fc1e0) ) - ROM_LOAD( "auto.big-10-2.ic3", 0x4000, 0x4000, CRC(9267f841) SHA1(ad7b32e92b2d81fc147b5d5c348961229f7f4f1c) ) - ROM_LOAD( "auto.big-10-3.ic2", 0x8000, 0x4000, CRC(6ab10d37) SHA1(0ea137d08de3c72ef9e72126114f9da2be7602ab) ) -ROM_END - -} // anonymous namespace - - -/************************************** -* Game Driver(s) * -**************************************/ - -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS -GAME( 1985, big10, 0, big10, big10, big10_state, empty_init, ROT0, "Success", "Big 10 (1985, Success)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, big10a, big10, big10, big10, big10_state, empty_init, ROT0, "System Make", "Big 10 (1986, System Make)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/success/big10.cpp b/src/mame/success/big10.cpp new file mode 100644 index 00000000000..59c72e55c01 --- /dev/null +++ b/src/mame/success/big10.cpp @@ -0,0 +1,285 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, Roberto Fresca, Tomasz Slanina +/*************************************************************************** + + BIG 10 + Success, 1985. + + Driver by Angelo Salese, Roberto Fresca & Tomasz Slanina. + +**************************************************************************** + + Dumper Notes: + + Z80A + XTAL is 21.?727 + YM2149 + 8-position DSW x1 + RAM 6264 x1 + RAM 41464 x4 + unknown SDIP64 chip with welded heatsink! Might be a video chip or MCU? + +**************************************************************************** + + Dev Notes... + + - Guessed and hooked the Yamaha VDP (SDIP64 IC). Same VDP used on MSX systems. + - Added v9938 stuff, interrupts, video start, machine reset, input ports, + DIP switch, ym2149 interface, pre-defined main Xtal and derivatives for + z80 and ym2149. + - Added NVRAM, defined half of DIP switches bank (coinage & main game rate). + Added inputs for coins A, B & C, payout, reset, and service mode. + - Reorganized the driver. + +**************************************************************************** + + How to Play: + + - This is actually a Keno game (slightly modified Raffle/Bingo/Tombola game). + - First off, select the bet amount with the BET button. + - Then choose between "SELECT 10" button (pseudo-random) or user-defined + numbers,by pressing the desired number with the numpad then "select" + (enters the decimals first then the units, if three or more buttons + are pressed the older pressed buttons are discarded, i.e. press 1234 + then SELECT, 1 and 2 are discarded). + - Press "CANCEL ALL" to redo the numbering scheme. + - Once that you are happy with it, press START to begin the extraction of + winning numbers. + - If you get at least 2-4 numbers out of 20 extracted numbers, you win a + prize and you are entitled to do a big/small (double up) sub-game. + +***************************************************************************/ + +#include "emu.h" + +#include "cpu/z80/z80.h" +#include "machine/nvram.h" +#include "machine/ticket.h" +#include "sound/ay8910.h" +#include "video/v9938.h" + +#include "screen.h" +#include "speaker.h" + + +namespace { + +class big10_state : public driver_device +{ +public: + big10_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_hopper(*this, "hopper") + , m_in(*this, "IN%u", 1) + , m_lamp(*this, "lamp") + { } + + void big10(machine_config &config); + +protected: + virtual void machine_start() override { save_item(NAME(m_mux_data)); m_lamp.resolve(); } + +private: + uint8_t m_mux_data = 0; + required_device m_maincpu; + required_device m_hopper; + required_ioport_array<6> m_in; + output_finder<> m_lamp; + + void main_io(address_map &map) ATTR_COLD; + void main_map(address_map &map) ATTR_COLD; + + uint8_t mux_r(); + void mux_w(uint8_t data); +}; + + +/**************************************** +* Input Ports Demux & Common Routines * +****************************************/ + +void big10_state::mux_w(uint8_t data) +{ + m_mux_data = ~data; + m_hopper->motor_w(BIT(~data, 6)); + m_lamp = BIT(~data, 7); // maybe a coin counter? +} + +uint8_t big10_state::mux_r() +{ + uint8_t result = 0xff; + for (int b = 0; b < 6; b++) + if (BIT(m_mux_data, b)) + result &= m_in[b]->read(); + + return result; +} + + +/************************************** +* Memory Map * +**************************************/ + +void big10_state::main_map(address_map &map) +{ + map(0x0000, 0xbfff).rom(); + map(0xc000, 0xdfff).ram().share("nvram"); + map(0xf000, 0xffff).ram(); +} + +void big10_state::main_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).r(FUNC(big10_state::mux_r)); // present in test mode + map(0x02, 0x02).portr("SYSTEM"); // coins and service + map(0x98, 0x9b).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); + map(0xa0, 0xa1).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0xa2, 0xa2).r("aysnd", FUNC(ay8910_device::data_r)); // Dip-Switches routes here. +} + + +/************************************** +* Input Ports * +**************************************/ + +static INPUT_PORTS_START( big10 ) + + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Analyze Mode") PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // in test mode, go to the game whilst keep pressed. + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // " + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Number 0") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Number 1") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Number 2") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Number 3") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Number 4") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Number 5") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Number 6") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Number 7") + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Number 8") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Number 9") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("Flip Flop") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Select") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("Select 10") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("Cancel All") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + + PORT_START("IN3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // in test mode triggers a sound and screen turns black, hanging the game. + + PORT_START("IN4") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN5") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN6") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW1") + PORT_DIPNAME( 0x03, 0x03, "Credit Limit?" ) PORT_DIPLOCATION("DSW1:8,7") + PORT_DIPSETTING( 0x00, "500" ) + PORT_DIPSETTING( 0x01, "1000" ) + PORT_DIPSETTING( 0x02, "3000" ) + PORT_DIPSETTING( 0x03, "9999" ) + PORT_DIPNAME( 0x0c, 0x0c, "Unknown" ) PORT_DIPLOCATION("DSW1:6,5") // $C17E + PORT_DIPSETTING( 0x00, "0" ) + PORT_DIPSETTING( 0x04, "1" ) + PORT_DIPSETTING( 0x08, "2" ) + PORT_DIPSETTING( 0x0c, "3" ) + PORT_DIPNAME( 0x30, 0x30, "Main Game Rate" ) PORT_DIPLOCATION("DSW1:4,3") + PORT_DIPSETTING( 0x00, "60%" ) + PORT_DIPSETTING( 0x10, "70%" ) + PORT_DIPSETTING( 0x20, "80%" ) + PORT_DIPSETTING( 0x30, "90%" ) + PORT_DIPNAME( 0xC0, 0xc0, "Coinage (A=1; B=5; C=10)" ) PORT_DIPLOCATION("DSW1:2,1") + PORT_DIPSETTING( 0x00, "x1" ) + PORT_DIPSETTING( 0x40, "x2" ) + PORT_DIPSETTING( 0x80, "x5" ) + PORT_DIPSETTING( 0xC0, "x10" ) + + // Unconnected, probably missing from the board + PORT_START("DSW2") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + + +/************************************** +* Machine Driver * +**************************************/ + +void big10_state::big10(machine_config &config) +{ + constexpr XTAL MASTER_CLOCK = 21.477272_MHz_XTAL; // Dumper notes poorly refers to a 21.?727 Xtal. + + // basic machine hardware + Z80(config, m_maincpu, MASTER_CLOCK/6); // guess + m_maincpu->set_addrmap(AS_PROGRAM, &big10_state::main_map); + m_maincpu->set_addrmap(AS_IO, &big10_state::main_io); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + TICKET_DISPENSER(config, m_hopper, attotime::from_msec(40)); + + // video hardware + v9938_device &v9938(V9938(config, "v9938", MASTER_CLOCK)); + v9938.set_screen_ntsc("screen"); + v9938.set_vram_size(0x40000); + v9938.int_cb().set_inputline("maincpu", 0); + SCREEN(config, "screen", SCREEN_TYPE_RASTER); + + // sound hardware + SPEAKER(config, "mono").front_center(); + ym2149_device &aysnd(YM2149(config, "aysnd", MASTER_CLOCK/12)); // guess + aysnd.port_a_read_callback().set_ioport("DSW2"); + aysnd.port_b_read_callback().set_ioport("DSW1"); + aysnd.port_a_write_callback().set(FUNC(big10_state::mux_w)); + aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); +} + + +/************************************** +* ROM Load * +**************************************/ + +ROM_START( big10 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "1", 0x0000, 0x4000, CRC(03e50455) SHA1(36834d35d037303e8b9e4ce950d22f11a52e9388) ) + ROM_LOAD( "2", 0x4000, 0x4000, CRC(b4626a5f) SHA1(a9b3b9575c657748a7f0b60ec2c7411dad0c83c1) ) + ROM_LOAD( "3", 0x8000, 0x4000, CRC(8d15da74) SHA1(0e114de6fcf79beac800575bfb739e6a6bf35660) ) +ROM_END + +// PCB marked SYSTEM MAKE3 with Cosmo Corporation sticker +ROM_START( big10a ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "auto.big-10-1.ic4", 0x0000, 0x4000, CRC(51bbc509) SHA1(86ba9e1a3a572f8c101b9e2866768836cb7fc1e0) ) + ROM_LOAD( "auto.big-10-2.ic3", 0x4000, 0x4000, CRC(9267f841) SHA1(ad7b32e92b2d81fc147b5d5c348961229f7f4f1c) ) + ROM_LOAD( "auto.big-10-3.ic2", 0x8000, 0x4000, CRC(6ab10d37) SHA1(0ea137d08de3c72ef9e72126114f9da2be7602ab) ) +ROM_END + +} // anonymous namespace + + +/************************************** +* Game Driver(s) * +**************************************/ + +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS +GAME( 1985, big10, 0, big10, big10, big10_state, empty_init, ROT0, "Success", "Big 10 (1985, Success)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, big10a, big10, big10, big10, big10_state, empty_init, ROT0, "System Make", "Big 10 (1986, System Make)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/success/kurukuru.cpp b/src/mame/success/kurukuru.cpp new file mode 100644 index 00000000000..104f7520176 --- /dev/null +++ b/src/mame/success/kurukuru.cpp @@ -0,0 +1,971 @@ +// license:BSD-3-Clause +// copyright-holders:Roberto Fresca, hap +/*********************************************************************************** + + KURU KURU PYON PYON + Success / Taiyo Jidoki + + Driver by Roberto Fresca & hap. + + + This hardware seems to be a derivative of MSX2 'on steroids'. + It has many similarities with sothello.cpp and tonton.cpp + + Special thanks to Charles MacDonald, for all the hardware traces: clocks, + ports, descriptions and a lot of things... :) + + + Pyon Pyon series: + + ぴょんぴょん (Pyon Pyon), 1988 Success / Taiyo Jidoki. + くるくるぴょんぴょん (Kuru Kuru Pyon Pyon), 1990 Success / Taiyo Jidoki. + ぴょんぴょんジャンプ (Pyon Pyon Jump), 1991 Success / Taiyo Jidoki. + スイスイぴょんぴょん (Sui Sui Pyon Pyon), 1992 Success / Taiyo Jidoki. + + +************************************************************************************ + + Technical Notes.... + + + CPU : 2x Sharp LH0080A Z80A + + MEM : 1x Sharp LH5116H-10 (2KB SRAM) + 1x Fairchild 8464A-10L (8KB SRAM) + battery + 6x Sharp LH2464-15 (192KB Video DRAM total) + + SOUND : 1x Yamaha YM2149F + 1x OKI M5205 + + VIDEO : 1x Unknown 64-legs VDP (seems to be from V9938/58 family). + + XTAL : 1x 21477.27 kHz. + 1x 384 kHz. blue resonator (CSB 384 P) surely for the M5202. + + + 1x Texas Instruments RC4558P (Dual General-Purpose Operational Amplifier, DIP8) + 1x Fairchild MB3712 (5,7 Watt Audio Power Amplifier, SIP8). + 2x 8 DIP switches banks. + + 3x PAL16L8A (IC12, IC26 & IC27) + 1x PAL12L6 (IC32) + + + PCB Layout... + + .--------------------------------------------------------------------------------------------------. + | IC4 IC5 | + | IC2 IC3 .------------------. .----------------. BATT | + | .-----------. .-----------. | M5L27512K | | LH5116H-10 | .---------. | + | | LH2464-15 | | SN74HC04N | | | | SHARP JAPAN | | 3.6 V | | + | '-----------' '-----------' | '4' | | | -+ +- | + | IC6 | | '----------------' | BATTERY | | + | .-----------. IC8 '------------------' '---------' | + | | LH2464-15 | .----------------------------. IC9 IC10 | + | '-----------' | LH0080A Z80A-CPU-D | .-----------------. .-----------------. | + | IC7 | SHARP JAPAN | | 8464A-10L | | M5L27512K | | + | .-----------. | | | |F| JAPAN | | | | + | | LH2464-15 | | | | | | '10' | | + | '-----------' '----------------------------' | | | | | + | IC11 IC12 IC13 '-----------------' '-----------------' | + | .-----------. .------------. .------------. IC17 IC18 | + | | LH2464-15 | | PAL16L8ACJ | | SN74LS74AN | .-----------------. .-----------------. | + | '-----------' '------------' '------------' | MBM27256-25 | | M5L27512K | | + | IC14 IC15 IC16 | | | | | + | .-----------. .------------. .-------------. | 'KP 17L' | | '18' | | + | | LH2464-15 | | SN74LS08N | | SN74LS125AN | | | | | | + | '-----------' '------------' '-------------' '-----------------' '-----------------' | + | IC19 IC20 IC21 IC22 IC23 | + | .-----------. .------------. .------------. .--------------------------. .-----------------. | + | | LH2464-15 | | SN74LS174N | | SN74LS174N | | LH0080A Z80A-CPU-D | | | | + | '-----------' '------------' '------------' | SHARP JAPAN | | E M P T Y | | + | X2 | | | S O C K E T | | + | .--------. | | | | | + | X1 IC24 | | RES | '--------------------------' '-----------------' | + | .-----. .------------. | |384kHz| | + | |XTAL | |OKI MSM5205 | '--------' | + | |21.47| '------------' IC25 IC26 IC27 IC28 | + | |727 | .-------------. .------------. .------------. .------------. | + | '-----' | SN74LS374N | | PAL16L8ACJ | | PAL16L8ACJ | | HD74LS153P | | + | '-------------' '------------' '------------' '------------' | + | IC29 IC30 DSW1 IC31 IC32 | + | .-----------------------------. .----. .------------. .------------. .------------. | + | | SANDED... | | AA | | 11111111 | | SN74LS174N | | PAL12L6CN | | + | | (YAMAHA V9938 VDP) | '----' '------------' '------------' '------------' | + | | | IC33 '7908B-4' | + | | '81500' | .------------. IC34 | + | | | | SN74LS245N | .----------------------------. | + | | | '------------' | YAMAHA | | + | '-----------------------------' DSW2 | YM2149F | | + | .------------. | | | + | | 01111110 | | | | + | '------------' '----------------------------' | + | IC35 IC36 IC37 IC38 IC39 IC40 IC41 | + | .----. .----. .----. .----. .------------. .------------. .------------. | + | | AB | | AB | | AB | | AB | | HD74LS273P | | SN74LS245N | | SN74LS245N | .------------. | + | '----' '----' '----' '----' '------------' '------------' '------------' | IC43 | | + | IC42 |.----------.| | + | .----------. |||||||||||| |||||||||||| ||MB3712 M92|| | + | | ULN2003A | +++RESNET+++ +++RESNET+++ |'----------'| | + | '----------' |||||||||||| |||||||||||| '------------' | + | | + | 7908-B hole SUCCESS CORP. | + | .----------. .--. .----------. | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + '---------' '-----------' '-----------------------------------------' '---------' + <-------- 2x28 JAMMA compatible edge connector --------> + + + AA = Texas Instruments RC4558P T835AJ34. + AB = NEC C1663C 8926B. + + + Pinout: + + solder side |##| components + -------------------|--|----------------- + gnd |01| gnd + gnd |02| gnd + +5v |03| +5v + +5v |04| +5v + -5v |05| -5v + +12v |06| +12v + | | + hole (no connector) |07| hole (no connector) + | | + Coin B (10Y) meter |08| Coin A (100Y) meter + hopper motor |09| unknown out (ULN2003, pin15) + speaker - |10| speaker + + (ULN2003, pin13) unknown out |11| unknown out (ULN2003, pin12) + green |12| red + sync |13| blue + (ULN2003, pin13) unknown out |14| video gnd + | | + medal in |15| management + coin B (10Y) in |16| reset + coin A (100Y) in |17| unknown in (active) + +5v |<|-- (diode) |18| (diode) --|>| +5v + +5v |<|-- (diode) |19| (diode) --|>| +5v + | | + Botechin (5th) |20| (1st) Boketa + (active) unknown in |21| (2nd) Kunio + (active) unknown in |22| (3rd) Pyon-Pyon + start |23| (4th) Pyokorin + payout |24| hopper in (opto in) + | | + not used |25| not used + not used |26| not used + gnd |27| gnd + gnd |28| gnd + + + Pyon Pyon Jump DIP switches: + + .---------------------------------------------------------------------------------. + | DIP Switches bank #1 1 2 3 4 5 6 7 8 | + +-------------------------------------+-------------------------------------------+ + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 11 medal | off off off | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 10 medal | off off on | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 6 medal | off on off | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 5 medal | off on on | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 4 medal | on off off | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 3 medal | on off on | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 2 medal | on on off | + +-----------------+-------------------+-------------------------------------------+ + | Coinage Coin A | 1 coin / 1 medal | on on on | + +-----------------+-------------------+-------------------------------------------+ + | Coin A (100Y) | Exchange | off | + +-----------------+-------------------+-------------------------------------------+ + | Coin A (100Y) | Credit | on | + +-----------------+-------------------+-------------------------------------------+ + | Win | Medal out | off | + +-----------------+-------------------+-------------------------------------------+ + | Win | Credit | on | + +-----------------+-------------------+-------------------------------------------+ + | Coinage config | Coin A: Payout | off | + +-----------------+-------------------+-------------------------------------------+ + | Coinage config | Coin A: Normal | on | + +-----------------+-------------------+-------------------------------------------+ + | Payout Mode | Manual | off | + +-----------------+-------------------+-------------------------------------------+ + | Payout Mode | Automatic | on | + +-----------------+-------------------+-------------------------------------------+ + | Repeat last bet | No | off | + +-----------------+-------------------+-------------------------------------------+ + | Repeat last bet | Yes | on | + '-----------------+-------------------+-------------------------------------------' + + .---------------------------------------------------------------------------------. + | DIP Switches bank #2 1 2 3 4 5 6 7 8 | + +-------------------------------------+-------------------------------------------+ + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 95% | on on on | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 90% | on on off | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 85% | on off on | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 80% | on off off | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 75% | off on on | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 70% | off on off | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 60% | off off on | + +-----------------+-------------------+-------------------------------------------+ + | Percentage | 50% | off off off | + +-----------------+-------------------+-------------------------------------------+ + | Winwave | Small | off | + +-----------------+-------------------+-------------------------------------------+ + | Winwave | Big | on | + +-----------------+-------------------+-------------------------------------------+ + | M.Medal | Off | off | + +-----------------+-------------------+-------------------------------------------+ + | M.Medal | On | on | + +-----------------+-------------------+-------------------------------------------+ + | HG | 20-1 | off off | + +-----------------+-------------------+-------------------------------------------+ + | HG | 50-1 | off on | + +-----------------+-------------------+-------------------------------------------+ + | HG | 100-1 | on off | + +-----------------+-------------------+-------------------------------------------+ + | HG | 200-1 | on on | + +-----------------+-------------------+-------------------------------------------+ + | unknown | off | + +-------------------------------------+-------------------------------------------+ + | unknown | on | + '-------------------------------------+-------------------------------------------' + + +************************************************************************************ + + General Notes.... + + There are at least 4 games in the Pyon Pyon series... + + 1) Pyon Pyon (a marathon game with froggy characters). + 2) Kuru Kuru Pyon Pyon (a kind of slots game with the same froggy characters). + 3) Pyon Pyon Jump (a contents where the same characters try to cross the river jumping on pads). + 4) Sui Sui Pyon Pyon (a swimming competition where the same characters swim with different styles, even walking). + + The 100 Yen coin input (key 7) can be set as "Exchange" through a DIP switch, in + which case its value is not accepted as credits but immediately paid out in + "medals." + + If you get a 'medal jam' error, and the game is not responding anymore, press + RESET (key F1), and the game will reset to default values (even all counters + will be cleared; the program does this by zeroing the magic byte preceding the + game ID string copied with it into NVRAM and then jumping to the boot routine). + + The tables for the I/O routines have room for 7 coin inputs (address + mask) and + 3 output latches, but only 3 coin inputs and 1 output latch are defined and used. + + +************************************************************************************ + + Games Notes: + ------------ + + * Kuru Kuru Pyon Pyon: + + The game name could be translated as "Croak Croak Hop Hop" + Kuru is the frog sound, and Pyon is the sound of jumps. + + How to play... + + Insert tokens (medals). + You can bet to any (or all) of the following 5 characters: Botechin, Oume, + Pyokorin, Kunio, and Pyon-Pyon. Press start, and the reels start to roll. You'll + win if you can get 3 of the chosen character(s) in a row, column or diagonal. + + The black tadpoles behave just like jokers... If you have 2 chosen characters + in a row and the remaining one is a black tadpole, it will transform into another + character to complete the 3 in a row, allowing you to win. + + Red tadpoles are a bonus. Once you get one, it will go to the right panel, + revealing a number. This number represents the extra credits you won. + + Bookkeeping... + + Pressing Bookkeeping key (key 0), you enter the Bookkeeping Mode. There are + 2 screens with all the game information like DIP switches and statistics... + + 1st screen... + + - [Left panel]: All the DIP switches parameters. + + - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games, + won, loss, won by paid range, and 'omake' (extra/bonus). + + 2nd screen (press Bookkeeping key again)... + + - Tate (vertical), Yoko (horizontal) and Naname (diagonal), + for each character (Bote, Oume, Pyoko, Kunio and Pyon Pyon). + + Also Aka (red) and Kuro (black). + + Pressing the Bookkeeping key once more, you exit the mode and go back to the game. + + ---------------------------------------------------------------------------------- + + * Pyon Pyon Jump: + + The game name could be translated as "Hop Hop Jump" + Pyon Pyon is an onomatopoeia for hopping or jumping lightly. + + How to play... + + Insert tokens (medals). + You can bet to any (or all) of the following 5 characters: Boketa, Kunio, Pyon-Pyon, + Pyokorin and Botechin. Press start, and the river's pads start to roll. You'll win + if your character gets the three pads to jump to the other side of the river. + + There is also a bonus game with a black tadpole rounding some pads with extra credits. + you'll get the extra credits marked in the pad where the tadpole stopped. + + Bookkeeping... + + Pressing Bookkeeping key (key 0), you enter the Bookkeeping Mode. There are + 2 screens with all the game information like DIP switches and statistics... + + 1st screen... + + - [Left panel]: All the DIP switches parameters. + + - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games, + won, loss, won by paid range, and 'omake' (extra/bonus). + + 2nd screen (press Bookkeeping key again)... + + - Win distribution by character + (Boketa, Kunio, Pyon-Pyon, Pyokorin and Botechin). + + - Bet distribution (1, 2, 3, 4, 5~10) + + - Omake (bonus) distribution (games total, win games, loss games) + + Pressing the Bookkeeping key once more, you exit the mode and go back to the game. + + +************************************************************************************ + + ADPCM Samples.... + + There are 14 samples in Kuru Kuru Pyon Pyon. + + 00: "Botechin" + 01: + 02: "Hakase" (professor) + 03: "Pyokorin" + 04: "Kunio" + 05: "Pyon-Pyon" + 06: "Boketa" + 07: + 08: "Oume" + 09: "Haipaa" (hyper) + 10: "Ichi ni tsuite" (on your marks) + 11: "Youi" (get ready) + 12: "Bang" (sound for the tadpoles landing in the right panel). + 13: Sound effect for reels when running. + + The fact that there are samples for "on your marks", "get ready", and "bang", + make me think that these sounds could be shared with the other unemulated marathon + game of the series called just "Pyon Pyon". + +***********************************************************************************/ + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "machine/gen_latch.h" +#include "machine/nvram.h" +#include "machine/rstbuf.h" +#include "machine/ticket.h" +#include "sound/ay8910.h" +#include "sound/msm5205.h" +#include "video/v9938.h" +#include "speaker.h" + + +namespace { + +class kurukuru_state : public driver_device +{ +public: + kurukuru_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_adpcm(*this, "adpcm"), + m_soundirq(*this, "soundirq"), + m_hopper(*this, "hopper"), + m_bank1(*this, "bank1") + { } + + void ppj(machine_config &config); + void kurukuru(machine_config &config); + +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + +private: + required_device m_maincpu; + required_device m_audiocpu; + required_device m_adpcm; + required_device m_soundirq; + required_device m_hopper; + required_memory_bank m_bank1; + + uint8_t m_adpcm_data; + + void kurukuru_out_latch_w(uint8_t data); + void kurukuru_bankswitch_w(uint8_t data); + void kurukuru_adpcm_reset_w(uint8_t data); + uint8_t kurukuru_adpcm_timer_irqack_r(); + void kurukuru_adpcm_data_w(uint8_t data); + void ym2149_aout_w(uint8_t data); + void ym2149_bout_w(uint8_t data); + + void kurukuru_msm5205_vck(int state); + void kurukuru_audio_io(address_map &map) ATTR_COLD; + void kurukuru_audio_map(address_map &map) ATTR_COLD; + void kurukuru_io(address_map &map) ATTR_COLD; + void kurukuru_map(address_map &map) ATTR_COLD; + void ppj_audio_io(address_map &map) ATTR_COLD; + void ppj_audio_map(address_map &map) ATTR_COLD; + void ppj_io(address_map &map) ATTR_COLD; + void ppj_map(address_map &map) ATTR_COLD; +}; + +#define MAIN_CLOCK XTAL(21'477'272) +#define CPU_CLOCK MAIN_CLOCK/6 +#define YM2149_CLOCK MAIN_CLOCK/6/2 // '/SEL' pin tied to GND, so internal divisor x2 is active +#define M5205_CLOCK XTAL(384'000) + + +/************************************************* +* Interrupts * +*************************************************/ + + +void kurukuru_state::kurukuru_msm5205_vck(int state) +{ + m_soundirq->rst30_w(1); + m_adpcm->data_w(m_adpcm_data); +} + + +/************************************************* +* Memory Map / I/O * +*************************************************/ + +// Main CPU + +void kurukuru_state::kurukuru_out_latch_w(uint8_t data) +{ +/* + 00-0f is output latch (controls jamma output pins) + + BIT EDGE CONNECTOR JAMMA FUNCTION + ----+--------------------+---------------- + 00 | Pin 08 top side | coin counter 1 + 01 | Pin 09 top side | coin lockout 1 + 02 | Pin 14 bottom side | service switch + 03 | Pin 11 bottom side | unused + 04 | Pin 11 top side | unused + 05 | Pin 08 bottom side | coin counter 2 + 06 | Pin 09 bottom side | coin lockout 2 + 07 | Not connected | unused + +*/ + machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); + machine().bookkeeping().coin_counter_w(1, BIT(data, 5)); + //machine().bookkeeping().coin_lockout_global_w(BIT(data, 6)); + m_hopper->motor_w(BIT(data, 6)); + + if (data & 0x9e) + logerror("kurukuru_out_latch_w %02X @ %04X\n", data, m_maincpu->pc()); +} + +void kurukuru_state::kurukuru_bankswitch_w(uint8_t data) +{ + m_bank1->set_entry(7); // remove banked rom +/* + if bits 5,4 are 00,10,01 then IC10 is enabled + if bits 3,2 are 00,10,01 then IC18 is enabled + if bits 1,0 are 00,10,01 then IC23 is enabled + Then in addition, A15 (ROM half) is determined by the low bit. + Note that in theory, it can cause a conflict by enabling more than one chip, + but the game never does this. +*/ + for (int chip = 0; chip < 3; chip++) + { + if ((data & 3) != 3) + m_bank1->set_entry((chip << 1) | (~data & 1)); + data >>= 2; + } +} + + +void kurukuru_state::kurukuru_map(address_map &map) +{ + map(0x0000, 0x5fff).rom(); + map(0x6000, 0xdfff).bankr("bank1"); + map(0xe000, 0xffff).ram().share("nvram"); +} + +void kurukuru_state::kurukuru_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_out_latch_w)); + map(0x10, 0x10).mirror(0x0f).portr("DSW1"); + map(0x20, 0x20).mirror(0x0f).w("soundlatch", FUNC(generic_latch_8_device::write)); + map(0x80, 0x83).mirror(0x0c).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); + map(0x90, 0x90).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_bankswitch_w)); + map(0xa0, 0xa0).mirror(0x0f).portr("IN0"); + map(0xb0, 0xb0).mirror(0x0f).portr("IN1"); + map(0xc0, 0xc0).mirror(0x0f).rw("ym2149", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); + map(0xd0, 0xd0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::data_w)); +} + +void kurukuru_state::ppj_map(address_map &map) +{ + map(0x0000, 0x5fff).rom(); + map(0x6000, 0xdfff).bankr(m_bank1); + map(0xe000, 0xffff).ram().share("nvram"); +} + +void kurukuru_state::ppj_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_bankswitch_w)); + map(0x10, 0x13).mirror(0x0c).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); + map(0x30, 0x30).mirror(0x0f).w("soundlatch", FUNC(generic_latch_8_device::write)); + map(0x40, 0x40).mirror(0x0f).portr("DSW1"); + map(0x50, 0x50).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_out_latch_w)); + map(0x60, 0x60).mirror(0x0f).portr("IN1"); + map(0x70, 0x70).mirror(0x0f).portr("IN0"); + map(0xc0, 0xc0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::address_w)); + map(0xc0, 0xc0).mirror(0x0f).r("ym2149", FUNC(ay8910_device::data_r)); + map(0xd0, 0xd0).mirror(0x0f).w("ym2149", FUNC(ay8910_device::data_w)); +} +/* + + 00h W --> bankswitching reg... + + 10h W --> 00's \ + 11h W --> 02 8f 20 91... > V9938 OK + 13h W --> / + + 30h W --> soundlatch... + 40h R --> (very beginning) seems DSW1 + 50h W --> Output port (counters) + 60h R --> Input port + 70h R --> Input port + + C0h W --> YM2149 address W + C8h R --> YM2149 data R --> DSW2 + D0h W --> YM2149 data W + +*/ + +// Audio CPU + +void kurukuru_state::kurukuru_adpcm_data_w(uint8_t data) +{ +/* + 6-bit latch. only 4 connected... + bit 0-3 = MSM5205 data. +*/ + m_adpcm_data = data & 0xf; +} + +void kurukuru_state::kurukuru_adpcm_reset_w(uint8_t data) +{ +/* + 6-bit latch. only 4 connected... + bit 0 = RESET + bit 1 = 4B/3B + bit 2 = S2 + bit 3 = S1 +*/ + m_adpcm->playmode_w(bitswap<8>((data>>1), 7,6,5,4,3,0,1,2)); + m_adpcm->reset_w(data & 1); +} + +uint8_t kurukuru_state::kurukuru_adpcm_timer_irqack_r() +{ + if (!machine().side_effects_disabled()) + m_soundirq->rst30_w(0); + return 0; +} + + +void kurukuru_state::kurukuru_audio_map(address_map &map) +{ + map(0x0000, 0xf7ff).rom(); + map(0xf800, 0xffff).ram(); +} + +void kurukuru_state::kurukuru_audio_io(address_map &map) +{ + map.global_mask(0x7f); + map(0x40, 0x40).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_data_w)); + map(0x50, 0x50).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_reset_w)); + map(0x60, 0x60).mirror(0x0f).r("soundlatch", FUNC(generic_latch_8_device::read)); + map(0x70, 0x70).mirror(0x0f).r(FUNC(kurukuru_state::kurukuru_adpcm_timer_irqack_r)); +} + +void kurukuru_state::ppj_audio_map(address_map &map) +{ + map(0x0000, 0xf7ff).rom(); + map(0xf800, 0xffff).ram(); +} + +void kurukuru_state::ppj_audio_io(address_map &map) +{ + map.global_mask(0x7f); + map(0x20, 0x20).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_data_w)); + map(0x30, 0x30).mirror(0x0f).w(FUNC(kurukuru_state::kurukuru_adpcm_reset_w)); + map(0x40, 0x40).mirror(0x0f).r("soundlatch", FUNC(generic_latch_8_device::read)); + map(0x50, 0x50).mirror(0x0f).r(FUNC(kurukuru_state::kurukuru_adpcm_timer_irqack_r)); +} +/* + 30h -W --> 0x0b + 40h R- --> soundlatch... + 50h R- --> adpcm irq ack +*/ + +// YM2149 ports +void kurukuru_state::ym2149_aout_w(uint8_t data) +{ + logerror("YM2149: Port A out: %02X\n", data); +} + +void kurukuru_state::ym2149_bout_w(uint8_t data) +{ + logerror("YM2149: Port B out: %02X\n", data); +} + + +/************************************************* +* Input Ports Definitions * +*************************************************/ + +static INPUT_PORTS_START( kurukuru ) + PORT_START("IN0") +/* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 + so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 +*/ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Botechin)") // edge connector pin 20 top + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("2nd (Oume)") // edge connector pin 21 top + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyokorin)") // edge connector pin 22 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Kunio)") // edge connector pin 23 top + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Pyon-Pyon)") // edge connector pin 20 bottom + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom + + PORT_START("IN1") +/* routed to JAMMA top side 15, bottom 15, top 16, bottom 16, top 17, bottom 17, top 24, bottom 24 + so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 +*/ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(u8"¥10 In") // edge connector pin 16 bottom + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(u8"¥100 In") PORT_IMPULSE(2) // edge connector pin 17 bottom + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback, edge connector pin 24 top + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom + + PORT_START("DSW1") // found in the PCB: 11111111 + PORT_DIPNAME( 0x07, 0x00, u8"Coinage A (¥100)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) + PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) + PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) + PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) + PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) + PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) + PORT_DIPSETTING( 0x04, "1 Coin / 20 Medal" ) + PORT_DIPSETTING( 0x00, "1 Coin / 50 Medal" ) + PORT_DIPNAME( 0x18, 0x00, u8"Coinage B (¥10)" ) PORT_DIPLOCATION("DSW1:4,5") + PORT_DIPSETTING( 0x00, "3 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x10, "2 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x18, "1 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x08, "1 Coin / 2 Medal" ) + PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x00, u8"¥100 = Credits; Medal In = 2 Credits by Medal" ) + PORT_DIPSETTING( 0x20, u8"¥100 = Exchange; Medal In = 1 Credit by Medal" ) + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, "Automatic" ) + PORT_DIPSETTING( 0x00, "Manual" ) + PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + + PORT_START("DSW2") // found in the PCB: 01111110 + PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") + PORT_DIPSETTING( 0x07, "50%" ) + PORT_DIPSETTING( 0x03, "60%" ) + PORT_DIPSETTING( 0x05, "70%" ) + PORT_DIPSETTING( 0x01, "75%" ) + PORT_DIPSETTING( 0x06, "80%" ) + PORT_DIPSETTING( 0x02, "85%" ) + PORT_DIPSETTING( 0x04, "90%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPNAME( 0x08, 0x08, "Winwave" ) PORT_DIPLOCATION("DSW2:4") + PORT_DIPSETTING( 0x08, "Small" ) + PORT_DIPSETTING( 0x00, "Big" ) + PORT_DIPNAME( 0x10, 0x10, "M.Medal" ) PORT_DIPLOCATION("DSW2:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7") + PORT_DIPSETTING( 0x60, "10-1" ) + PORT_DIPSETTING( 0x20, "20-1" ) + PORT_DIPSETTING( 0x40, "50-1" ) + PORT_DIPSETTING( 0x00, "100-1" ) + PORT_DIPNAME( 0x80, 0x80, "Bet Max" ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x80, "5" ) + PORT_DIPSETTING( 0x00, "10" ) + +INPUT_PORTS_END + + +static INPUT_PORTS_START( ppj ) + PORT_START("IN0") +/* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 + so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 +*/ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("1st (Boketa)") // edge connector pin 20 top + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("2nd (Kunio)") // edge connector pin 21 top + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("3rd (Pyon-Pyon)") // edge connector pin 22 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("4th (Pyokorin)") // edge connector pin 23 top + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("5th (Botechin)") // edge connector pin 20 bottom + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 21 bottom (active) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 22 bottom (active) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) // edge connector pin 23 bottom + + PORT_START("IN1") +/* routed to JAMMA top side 15, bottom 15, top 16, bottom 16, top 17, bottom 17, top 24, bottom 24 + so that's test, tilt/slam, coin 1, coin 2, p1 start, p2 start, p1 button 3, p2 button 3 +*/ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // edge connector pin 15 top + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Medal In") // edge connector pin 15 bottom + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // edge connector pin 16 top + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME(u8"¥10 In") // edge connector pin 16 bottom + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // edge connector pin 17 top (active) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME(u8"¥100 In") PORT_IMPULSE(2) // edge connector pin 17 bottom + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback, edge connector pin 24 top + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // edge connector pin 24 bottom + + PORT_START("DSW1") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) + PORT_DIPNAME( 0x07, 0x03, u8"Coinage A (¥100)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPSETTING( 0x00, "1 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x04, "1 Coin / 2 Medal" ) + PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) + PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) + PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) + PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) + PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) + PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) + // Coinage B is always 1 Coin / 1 Medal + PORT_DIPNAME( 0x08, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:4") + PORT_DIPSETTING( 0x00, u8"¥100 = Credits" ) + PORT_DIPSETTING( 0x08, u8"¥100 = Exchange" ) + PORT_DIPNAME( 0x10, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:5") + PORT_DIPSETTING( 0x10, "Automatic" ) + PORT_DIPSETTING( 0x00, "Manual" ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("DSW2") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) + PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") + PORT_DIPSETTING( 0x07, "50%" ) + PORT_DIPSETTING( 0x03, "60%" ) + PORT_DIPSETTING( 0x05, "70%" ) + PORT_DIPSETTING( 0x01, "75%" ) + PORT_DIPSETTING( 0x06, "80%" ) + PORT_DIPSETTING( 0x02, "85%" ) + PORT_DIPSETTING( 0x04, "90%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPNAME( 0x08, 0x00, "Winwave" ) PORT_DIPLOCATION("DSW2:4") + PORT_DIPSETTING( 0x08, "Small" ) + PORT_DIPSETTING( 0x00, "Big" ) + PORT_DIPNAME( 0x10, 0x00, "M.Medal" ) PORT_DIPLOCATION("DSW2:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7") + PORT_DIPSETTING( 0x60, "20-1" ) + PORT_DIPSETTING( 0x20, "50-1" ) + PORT_DIPSETTING( 0x40, "100-1" ) + PORT_DIPSETTING( 0x00, "200-1" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + +INPUT_PORTS_END + + +/************************************************* +* Machine Start & Reset Routines * +*************************************************/ + +void kurukuru_state::machine_start() +{ + m_bank1->configure_entries(0, 8, memregion("user1")->base(), 0x8000); + + save_item(NAME(m_adpcm_data)); +} + +void kurukuru_state::machine_reset() +{ +} + +/************************************************* +* Machine Driver * +*************************************************/ + +void kurukuru_state::kurukuru(machine_config &config) +{ + // basic machine hardware + Z80(config, m_maincpu, CPU_CLOCK); + m_maincpu->set_addrmap(AS_PROGRAM, &kurukuru_state::kurukuru_map); + m_maincpu->set_addrmap(AS_IO, &kurukuru_state::kurukuru_io); + + Z80(config, m_audiocpu, CPU_CLOCK); + m_audiocpu->set_addrmap(AS_PROGRAM, &kurukuru_state::kurukuru_audio_map); + m_audiocpu->set_addrmap(AS_IO, &kurukuru_state::kurukuru_audio_io); + m_audiocpu->set_irq_acknowledge_callback("soundirq", FUNC(rst_neg_buffer_device::inta_cb)); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + // video hardware + v9938_device &v9938(V9938(config, "v9938", MAIN_CLOCK)); + v9938.set_screen_ntsc("screen"); + v9938.set_vram_size(0x30000); + v9938.int_cb().set_inputline("maincpu", 0); + SCREEN(config, "screen", SCREEN_TYPE_RASTER); + + TICKET_DISPENSER(config, "hopper", attotime::from_msec(50)); + + // sound hardware + SPEAKER(config, "mono").front_center(); + + GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set(m_soundirq, FUNC(rst_neg_buffer_device::rst28_w)); + + // latch irq vector is $ef (rst $28) + // timer irq vector is $f7 (rst $30) + // if both are asserted, the vector becomes $f7 AND $ef = $e7 (rst $20) + RST_NEG_BUFFER(config, m_soundirq, 0).int_callback().set_inputline(m_audiocpu, 0); + + ym2149_device &ym2149(YM2149(config, "ym2149", YM2149_CLOCK)); + ym2149.port_b_read_callback().set_ioport("DSW2"); + ym2149.port_a_write_callback().set(FUNC(kurukuru_state::ym2149_aout_w)); + ym2149.port_b_write_callback().set(FUNC(kurukuru_state::ym2149_bout_w)); + ym2149.add_route(ALL_OUTPUTS, "mono", 0.80); + + MSM5205(config, m_adpcm, M5205_CLOCK); + m_adpcm->vck_legacy_callback().set(FUNC(kurukuru_state::kurukuru_msm5205_vck)); + m_adpcm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly + m_adpcm->add_route(ALL_OUTPUTS, "mono", 0.80); +} + +void kurukuru_state::ppj(machine_config &config) +{ + kurukuru(config); + + // basic machine hardware + m_maincpu->set_addrmap(AS_PROGRAM, &kurukuru_state::ppj_map); + m_maincpu->set_addrmap(AS_IO, &kurukuru_state::ppj_io); + + m_audiocpu->set_addrmap(AS_PROGRAM, &kurukuru_state::ppj_audio_map); + m_audiocpu->set_addrmap(AS_IO, &kurukuru_state::ppj_audio_io); +} + + +/************************************************* +* ROMs Loading * +*************************************************/ + +/* Kuru Kuru Pyon Pyon. + くるくるぴょんぴょん + 1990, Success / Taiyo Jidoki. +*/ +ROM_START( kurukuru ) + ROM_REGION( 0x08000, "maincpu", 0 ) + ROM_LOAD( "kp_17l.ic17", 0x00000, 0x08000, CRC(9b552ebc) SHA1(07d0e62b7fdad381963a345376b72ad31eb7b96d) ) // program code + // Game ID string: "carp carp carp hiroshima ---" + + ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms + ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated + ROM_LOAD( "18.ic18", 0x10000, 0x10000, CRC(afb13c6a) SHA1(ac3cd40fad081f7a2b3d1fc72ea96282b9d1f4a3) ) // ic18: big frog gfx + ROM_LOAD( "10.ic10", 0x20000, 0x10000, CRC(3d6012bc) SHA1(2764f70e0e0bef3f2f71dd6c78e0a4189057beca) ) // ic10: title + text + ingame gfx + ROM_FILL( 0x30000, 0x10000, 0xff ) // dummy entry for when no romchip is selected + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "4.ic4", 0x00000, 0x10000, CRC(85d86f32) SHA1(f2aa93d702e6577f8f2204c74c44ac26d05be699) ) // code & adpcm samples + + ROM_REGION( 0x800, "plds", 0 ) + ROM_LOAD( "51.ic26", 0x0000, 0x0104, CRC(ce4a601b) SHA1(07f5bbb327b220e5846927cbb91149174dd07b36) ) + ROM_LOAD( "52.ic27", 0x0200, 0x0104, CRC(e23296a5) SHA1(4747923d201fcc5e0e752acbf50b41f0414e4ca8) ) + ROM_LOAD( "53.ic12", 0x0400, 0x0104, CRC(2ac654f2) SHA1(18668c73781a55dcffc4bf4c107026b0e72a75d1) ) + ROM_LOAD( "7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) ) +ROM_END + +/* Pyon Pyon Jump. + ぴょんぴょんジャンプ + Ver 1.40. + 1991, Success / Taiyo Jidoki. +*/ +ROM_START( ppj ) + ROM_REGION( 0x08000, "maincpu", 0 ) + ROM_LOAD( "ppj17.ic17", 0x00000, 0x08000, CRC(5d9c9ceb) SHA1(0f52c8a0aaaf978afeb07e56493399133b4ce781) ) // program code + // Game ID string: "PYON PYON JUMP V1.40" + + ROM_REGION( 0x40000, "user1", 0 ) // maincpu banked roms + ROM_FILL( 0x00000, 0x10000, 0xff ) // ic23: unpopulated + ROM_LOAD( "ppj18.ic18", 0x10000, 0x10000, CRC(69612fc6) SHA1(c6de2ec0db8ad2ace91c3a557a03ed73d0e7336d) ) // ic18: gfx set 1 + ROM_LOAD( "ppj10.ic10", 0x20000, 0x10000, CRC(95314d84) SHA1(1a8cf50e9a1e9e8a8f5702cc735ec993ddd2fdce) ) // ic10: gfx set 2 + ROM_FILL( 0x30000, 0x10000, 0xff ) // dummy entry for when no romchip is selected + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "ppj4.ic4", 0x00000, 0x10000, CRC(6573a0a0) SHA1(6bb99e153a22fce01a71efb3bba6c6cc04bbf8b1) ) // code & adpcm samples + + ROM_REGION( 0x800, "plds", 0 ) + ROM_LOAD( "pal16l8a_no21.ic26", 0x0000, 0x0104, CRC(414c8b50) SHA1(17f562c50a2bca41aeb7a1a7cb3916853cea0d24) ) + ROM_LOAD( "pal16l8a_no22.ic27", 0x0200, 0x0104, CRC(ee2b9257) SHA1(15c79b143eafc7915e0f376a87c01afad8fad2b9) ) + ROM_LOAD( "pal16l8a_no23.ic12", 0x0400, 0x0104, CRC(8a7fbbe0) SHA1(aab8d6b77d46cf2d8620861af1f7c039b6dcda99) ) + ROM_LOAD( "pal12l6a_7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) ) // identical to kurukuru... +ROM_END + +} // anonymous namespace + + +/*************************************************************************** +* Game Drivers * +***************************************************************************/ + +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS +GAME( 1990, kurukuru, 0, kurukuru, kurukuru, kurukuru_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, ppj, 0, ppj, ppj, kurukuru_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jump (V1.40, Japan)", MACHINE_SUPPORTS_SAVE ) + +// unemulated.... + +// ぴょんぴょん (Pyon Pyon), 1988 Success / Taiyo Jidoki. +// スイスイぴょんぴょん (Sui Sui Pyon Pyon), 1992 Success / Taiyo Jidoki. diff --git a/src/mame/success/othello.cpp b/src/mame/success/othello.cpp new file mode 100644 index 00000000000..b101ce75134 --- /dev/null +++ b/src/mame/success/othello.cpp @@ -0,0 +1,457 @@ +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina +/* + +Othello (version 3.0) - Success 1984 +------------------------------------- + +driver by Tomasz Slanina + +CPU Board: + D780C - main CPU (Z80) + HD46505SP - CRTC + D780-C - Sound CPU (Z80) + AY-3-8910 x2 - Sound + D7751C - ADPCM "Speech processor" + D8243 - I/O Expander for D7751C (8048 based) + +Video Board: + almost empty - 3/4 soldering pins not populated + + +Todo: +- correct colors (based on the color DAC (24 resistors) on pcb +- cocktail mode +- map a bunch of unknown read/writes (related to above I think) + +Notes: + +DSw 1:2 +Limit for help/undo (matta): +- when it's off, you can use each of them twice every time you + win and advance to the next game +- when it's on, you can only use them twice throughout the game + +*/ + +#include "emu.h" + +#include "cpu/mcs48/mcs48.h" +#include "cpu/z80/z80.h" +#include "machine/gen_latch.h" +#include "machine/i8243.h" +#include "sound/ay8910.h" +#include "sound/dac.h" +#include "video/mc6845.h" + +#include "emupal.h" +#include "screen.h" +#include "speaker.h" + + +namespace { + +constexpr uint8_t TILE_WIDTH = 6; + + +class othello_state : public driver_device +{ +public: + othello_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_ay(*this, "ay%u", 0U), + m_upd7751(*this, "upd7751"), + m_i8243(*this, "upd7751_8243"), + m_palette(*this, "palette"), + m_soundlatch(*this, "soundlatch"), + m_gfx_data(*this, "gfx"), + m_upd7751_data(*this, "upd7751data") + { } + + void othello(machine_config &config); + +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + +private: + /* memory pointers */ + required_shared_ptr m_videoram; + + /* video-related */ + int m_tile_bank = 0; + + /* misc */ + int m_ay_select = 0; + int m_ack_data = 0; + uint8_t m_upd7751_command = 0; + int m_sound_addr = 0; + int m_upd7751_busy = 0; + + /* devices */ + required_device m_maincpu; + required_device_array m_ay; + required_device m_upd7751; + required_device m_i8243; + required_device m_palette; + required_device m_soundlatch; + + required_region_ptr m_gfx_data; + required_region_ptr m_upd7751_data; + + uint8_t unk_87_r(); + void unk_8a_w(uint8_t data); + void upd7751_command_w(uint8_t data); + uint8_t upd7751_busy_r(); + uint8_t sound_ack_r(); + void unk_8f_w(uint8_t data); + void tilebank_w(uint8_t data); + uint8_t latch_r(); + void ay_select_w(uint8_t data); + void ack_w(uint8_t data); + void ay_address_w(uint8_t data); + void ay_data_w(uint8_t data); + uint8_t upd7751_rom_r(); + uint8_t upd7751_command_r(); + void upd7751_p2_w(uint8_t data); + template void upd7751_rom_addr_w(uint8_t data); + void upd7751_rom_select_w(uint8_t data); + + void othello_palette(palette_device &palette) const; + MC6845_UPDATE_ROW(crtc_update_row); + + void audio_map(address_map &map) ATTR_COLD; + void audio_portmap(address_map &map) ATTR_COLD; + void main_map(address_map &map) ATTR_COLD; + void main_portmap(address_map &map) ATTR_COLD; +}; + + +MC6845_UPDATE_ROW( othello_state::crtc_update_row ) +{ + rgb_t const *const palette = m_palette->palette()->entry_list_raw(); + uint8_t const *const gfx = m_gfx_data; + + for(int cx = 0; cx < x_count; ++cx) + { + uint32_t address = ((m_videoram[ma + cx] + m_tile_bank) << 4) | ra; + uint32_t tile_data = gfx[address] | (gfx[address + 0x2000] << 8) | (gfx[address + 0x4000] << 16); + + for(int x = 0; x < TILE_WIDTH; ++x) + { + bitmap.pix(y, (cx * TILE_WIDTH + x) ^ 1) = palette[tile_data & 0x0f]; + tile_data >>= 4; + } + } +} + +void othello_state::othello_palette(palette_device &palette) const +{ + for (int i = 0; i < palette.entries(); i++) + palette.set_pen_color(i, rgb_t(0xff, 0x00, 0xff)); + + // only colors 2,3,7,9,c,d,f are used + palette.set_pen_color(0x02, rgb_t(0x00, 0xff, 0x00)); + palette.set_pen_color(0x03, rgb_t(0xff, 0x7f, 0x00)); + palette.set_pen_color(0x07, rgb_t(0x00, 0x00, 0x00)); + palette.set_pen_color(0x09, rgb_t(0xff, 0x00, 0x00)); + palette.set_pen_color(0x0c, rgb_t(0x00, 0x00, 0xff)); + palette.set_pen_color(0x0d, rgb_t(0x7f, 0x7f, 0x00)); + palette.set_pen_color(0x0f, rgb_t(0xff, 0xff, 0xff)); +} + +void othello_state::main_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x8000, 0x97ff).noprw(); /* not populated */ + map(0x9800, 0x9fff).ram().share(m_videoram); + map(0xf000, 0xffff).ram(); +} + +uint8_t othello_state::unk_87_r() +{ + // bit 7 = ack/status from device connected to port 8a? + return 0; +} + +void othello_state::unk_8a_w(uint8_t data) +{ + logerror("8a -> %x\n", data); +} + +void othello_state::upd7751_command_w(uint8_t data) +{ + m_upd7751->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); + m_upd7751_command = data; +} + +uint8_t othello_state::upd7751_busy_r() +{ + return m_upd7751_busy; +} + +uint8_t othello_state::sound_ack_r() +{ + return m_ack_data; +} + +void othello_state::unk_8f_w(uint8_t data) +{ + logerror("8f -> %x\n", data); +} + +void othello_state::tilebank_w(uint8_t data) +{ + m_tile_bank = (data == 0x0f) ? 0x100 : 0x00; + logerror("tilebank -> %x\n", data); +} + +void othello_state::main_portmap(address_map &map) +{ + map.global_mask(0xff); + map(0x08, 0x08).w("crtc", FUNC(mc6845_device::address_w)); + map(0x09, 0x09).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); + map(0x80, 0x80).portr("INP"); + map(0x81, 0x81).portr("SYSTEM"); + map(0x83, 0x83).portr("DSW"); + map(0x86, 0x86).w(FUNC(othello_state::tilebank_w)); + map(0x87, 0x87).r(FUNC(othello_state::unk_87_r)); + map(0x8a, 0x8a).w(FUNC(othello_state::unk_8a_w)); + map(0x8c, 0x8c).rw(FUNC(othello_state::upd7751_busy_r), FUNC(othello_state::upd7751_command_w)); + map(0x8d, 0x8d).r(FUNC(othello_state::sound_ack_r)).w(m_soundlatch, FUNC(generic_latch_8_device::write)); + map(0x8f, 0x8f).w(FUNC(othello_state::unk_8f_w)); +} + +uint8_t othello_state::latch_r() +{ + uint8_t retval = m_soundlatch->read(); + if (!machine().side_effects_disabled()) + m_soundlatch->clear_w(); + + return retval; +} + +void othello_state::ay_select_w(uint8_t data) +{ + m_ay_select = data; +} + +void othello_state::ack_w(uint8_t data) +{ + m_ack_data = data; +} + +void othello_state::ay_address_w(uint8_t data) +{ + if (m_ay_select & 1) m_ay[0]->address_w(data); + if (m_ay_select & 2) m_ay[1]->address_w(data); +} + +void othello_state::ay_data_w(uint8_t data) +{ + if (m_ay_select & 1) m_ay[0]->data_w(data); + if (m_ay_select & 2) m_ay[1]->data_w(data); +} + +void othello_state::audio_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x8000, 0x83ff).ram(); +} + +void othello_state::audio_portmap(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).r(FUNC(othello_state::latch_r)); + map(0x01, 0x01).w(FUNC(othello_state::ay_data_w)); + map(0x03, 0x03).w(FUNC(othello_state::ay_address_w)); + map(0x04, 0x04).w(FUNC(othello_state::ack_w)); + map(0x08, 0x08).w(FUNC(othello_state::ay_select_w)); +} + +template +void othello_state::upd7751_rom_addr_w(uint8_t data) +{ + // P4 - address lines 0-3 + // P5 - address lines 4-7 + // P6 - address lines 8-11 + m_sound_addr = (m_sound_addr & ~(0x00f << Shift)) | ((data & 0x0f) << Shift); +} + +void othello_state::upd7751_rom_select_w(uint8_t data) +{ + // P7 - ROM selects + m_sound_addr &= 0xfff; + + if (!BIT(data, 0)) m_sound_addr |= 0x0000; + if (!BIT(data, 1)) m_sound_addr |= 0x1000; + if (!BIT(data, 2)) m_sound_addr |= 0x2000; + if (!BIT(data, 3)) m_sound_addr |= 0x3000; +} + +uint8_t othello_state::upd7751_rom_r() +{ + return m_upd7751_data[m_sound_addr]; +} + +uint8_t othello_state::upd7751_command_r() +{ + return m_upd7751_command << 4 | 0x0f; +} + +void othello_state::upd7751_p2_w(uint8_t data) +{ + /* write to P2; low 4 bits go to 8243 */ + m_i8243->p2_w(data & 0x0f); + + /* output of bit $80 indicates we are ready (1) or busy (0) */ + /* no other outputs are used */ + m_upd7751_busy = data & 0x80; +} + +static INPUT_PORTS_START( othello ) + PORT_START("DSW") + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x06, 0x06, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3") + PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x08, 0x00, "Limit for Matta" ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_DIPLOCATION("SW1:5") /* stored at $fd1e */ + PORT_DIPNAME( 0x60, 0x60, "Timer (seconds)" ) PORT_DIPLOCATION("SW1:6,7") + PORT_DIPSETTING( 0x00, "4" ) + PORT_DIPSETTING( 0x20, "6" ) + PORT_DIPSETTING( 0x40, "8" ) + PORT_DIPSETTING( 0x60, "10" ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Hard ) ) + + PORT_START("INP") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) +INPUT_PORTS_END + +void othello_state::machine_start() +{ + save_item(NAME(m_tile_bank)); + save_item(NAME(m_ay_select)); + save_item(NAME(m_ack_data)); + save_item(NAME(m_upd7751_command)); + save_item(NAME(m_sound_addr)); + save_item(NAME(m_upd7751_busy)); +} + +void othello_state::machine_reset() +{ + m_tile_bank = 0; + m_ay_select = 0; + m_ack_data = 0; + m_upd7751_command = 0; + m_sound_addr = 0; + m_upd7751_busy = 0; +} + +void othello_state::othello(machine_config &config) +{ + /* basic machine hardware */ + Z80(config, m_maincpu, XTAL(8'000'000)/2); + m_maincpu->set_addrmap(AS_PROGRAM, &othello_state::main_map); + m_maincpu->set_addrmap(AS_IO, &othello_state::main_portmap); + m_maincpu->set_vblank_int("screen", FUNC(othello_state::irq0_line_hold)); + + z80_device &audiocpu(Z80(config, "audiocpu", XTAL(3'579'545))); + audiocpu.set_addrmap(AS_PROGRAM, &othello_state::audio_map); + audiocpu.set_addrmap(AS_IO, &othello_state::audio_portmap); + + UPD7751(config, m_upd7751, XTAL(6'000'000)); + m_upd7751->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground + m_upd7751->p2_in_cb().set(FUNC(othello_state::upd7751_command_r)); + m_upd7751->bus_in_cb().set(FUNC(othello_state::upd7751_rom_r)); + m_upd7751->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w)); + m_upd7751->p2_out_cb().set(FUNC(othello_state::upd7751_p2_w)); + m_upd7751->prog_out_cb().set(m_i8243, FUNC(i8243_device::prog_w)); + + config.set_perfect_quantum(m_maincpu); + + I8243(config, m_i8243); + m_i8243->p4_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<0>)); + m_i8243->p5_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<4>)); + m_i8243->p6_out_cb().set(FUNC(othello_state::upd7751_rom_addr_w<8>)); + m_i8243->p7_out_cb().set(FUNC(othello_state::upd7751_rom_select_w)); + + /* 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(64*6, 64*8); + screen.set_visarea(0*8, 64*6-1, 0*8, 64*8-1); + screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update)); + + PALETTE(config, m_palette, FUNC(othello_state::othello_palette), 0x10); + + hd6845s_device &crtc(HD6845S(config, "crtc", 1000000 /* ? MHz */)); /* HD46505SP @ CPU clock */ + crtc.set_screen("screen"); + crtc.set_show_border_area(false); + crtc.set_char_width(TILE_WIDTH); + crtc.set_update_row_callback(FUNC(othello_state::crtc_update_row)); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + + GENERIC_LATCH_8(config, m_soundlatch); + + AY8910(config, m_ay[0], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); + AY8910(config, m_ay[1], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); + + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC +} + +ROM_START( othello ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "4.ic59", 0x0000, 0x2000, CRC(9f82fe14) SHA1(59600264ccce787383827fc5aa0f2c23728f6946)) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "3.ic32", 0x0000, 0x2000, CRC(2bb4f75d) SHA1(29a659031acf0d50f374f440b8d353bcf98145a0)) + + ROM_REGION( 0x1000, "upd7751", 0 ) /* 1k for 7751 onboard ROM */ + ROM_LOAD( "7751.bin", 0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) + + ROM_REGION( 0x4000, "upd7751data", 0 ) /* 7751 sound data */ + ROM_LOAD( "1.ic48", 0x0000, 0x2000, CRC(c3807dea) SHA1(d6339380e1239f3e20bcca2fbc673ad72e9ca608)) + ROM_LOAD( "2.ic49", 0x2000, 0x2000, CRC(a945f3e7) SHA1(ea18efc18fda63ce1747287bbe2a9704b08daff8)) + + ROM_REGION( 0x6000, "gfx", 0 ) + ROM_LOAD( "5.ic40", 0x0000, 0x2000, CRC(45fdc1ab) SHA1(f30f6002e3f34a647effac8b0116c8ed064e226a)) + ROM_LOAD( "6.ic41", 0x2000, 0x2000, CRC(467a731f) SHA1(af80e854522e53fb1b9af7945b2c803a654c6f65)) + ROM_LOAD( "7.ic42", 0x4000, 0x2000, CRC(a76705f7) SHA1(b7d2a65d65d065732ddd0b3b738749369b382b48)) +ROM_END + +} // anonymous namespace + + +GAME( 1984, othello, 0, othello, othello, othello_state, empty_init, ROT0, "Success", "Othello (version 3.0)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/success/skopro.cpp b/src/mame/success/skopro.cpp new file mode 100644 index 00000000000..53746e36b95 --- /dev/null +++ b/src/mame/success/skopro.cpp @@ -0,0 +1,83 @@ +// license:BSD-3-Clause +// copyright-holders: +/* + Skonec SkoPro v1.0 PC hardware + + Intel Pentium E2160 1M Cache, 1.80 GHz, 800 MHz FSB + Biostar MG31-M7 TE motherboard + 1GB RAM + nVidia GeForce 8400GS + Integrated sound? + Hitachi Deskstar HDS721680PLA320 80 GB + EGIS2JVS V1.2 card + Windows XP embedded + + The system was meant to be modular, but only 2 titles are said to have been actually released. + + Announced titles: + Douga De Puzzle - Idol Paradise + Dragon Dance + Exception + Otenami Haiken Ritaanzu! + Shanghai +*/ + +#include "emu.h" +#include "cpu/i386/i386.h" +#include "machine/pci.h" + + +namespace { + +class skopro_state : public driver_device +{ +public: + skopro_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + { } + + void skopro(machine_config &config); + +private: + required_device m_maincpu; + + void skopro_map(address_map &map) ATTR_COLD; +}; + +void skopro_state::skopro_map(address_map &map) +{ +} + +static INPUT_PORTS_START( skopro ) +INPUT_PORTS_END + +void skopro_state::skopro(machine_config &config) +{ + /* basic machine hardware */ + PENTIUM4(config, m_maincpu, 100'000'000); // actually a Pentium E2160 at 1.80 GHz + m_maincpu->set_addrmap(AS_PROGRAM, &skopro_state::skopro_map); + m_maincpu->set_disable(); + + PCI_ROOT(config, "pci", 0); + // ... +} + +/*************************************************************************** + + Game drivers + +***************************************************************************/ + +ROM_START( drgdance ) + ROM_REGION(0x20000, "bios", 0) + ROM_LOAD("mbbios", 0x10000, 0x10000, NO_DUMP ) + + DISK_REGION( "ide:0:hdd" ) + DISK_IMAGE( "dragon_dance", 0, SHA1(73868dd9354d936100ba56f460e872087ede012c) ) +ROM_END + +} // anonymous namespace + + +GAME( 2008, drgdance, 0, skopro, skopro, skopro_state, empty_init, ROT0, "Success", "Dragon Dance (V1.02J)", MACHINE_IS_SKELETON ) diff --git a/src/mame/success/sothello.cpp b/src/mame/success/sothello.cpp new file mode 100644 index 00000000000..02c34634d96 --- /dev/null +++ b/src/mame/success/sothello.cpp @@ -0,0 +1,408 @@ +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina +/* + Super Othello (c)1986 Fujiwara/Success + + driver by Tomasz Slanina + + 1 2 3 4 5 6 7 8 9 10 11 12 ++---------------------------------------------------------------------------------+ +| | ++-+ LA460 LA6324 M5205 X3 Z80A 1 2 5816P 74374 74138 | A + | | + | | ++-+ 74367 Y3014 74174 74174 7404 7474 74138 7404 7432 | B +| | +| | +| 74367 DSW1 YM2203 Z80A 3 4 5 6264 | C +| J | +| A | +| M C1663 74367 DSW2 7408 74125 7404 74138 74139 74174 7408 | D +| M X2 7414 7474 | +| A | +| C1663 V9938 41464 41464 X1 7474 74139 7432 74157 74244 7432 | E +| | +| | ++-+ C1663 41464 41464 6809B 6 6264 6264 6264 74244 74245 | F + | | + | | ++-+ C1663 | H +| | ++---------------------------------------------------------------------------------+ + +CPU : Z80A(x2) HD68B09P +Sound: YM2203?(surface scratched) + M5205 +OSC : 8.0000MHz(X1) 21.477 MHz(X2) 384kHz(X3) + +*/ + +#include "emu.h" +#include "cpu/m6809/m6809.h" +#include "cpu/z80/z80.h" +#include "machine/gen_latch.h" +#include "sound/msm5205.h" +#include "sound/ymopn.h" +#include "video/v9938.h" +#include "speaker.h" + + +namespace { + +class sothello_state : public driver_device +{ +public: + sothello_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_soundcpu(*this, "soundcpu"), + m_subcpu(*this, "subcpu"), + m_msm(*this, "msm"), + m_mainbank(*this, "mainbank") + { } + + void sothello(machine_config &config); + +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + +private: + void bank_w(uint8_t data); + uint8_t subcpu_comm_clear_r(); + uint8_t subcpu_comm_nmi_r(); + uint8_t subcpu_comm_status_r(); + uint8_t soundcpu_status_r(); + void msm_data_w(uint8_t data); + void soundcpu_busyflag_set_w(uint8_t data); + void soundcpu_busyflag_reset_w(uint8_t data); + void soundcpu_int_clear_w(uint8_t data); + void subcpu_status_w(uint8_t data); + void msm_cfg_w(uint8_t data); + void adpcm_int_w(int state); + + void maincpu_io_map(address_map &map) ATTR_COLD; + void maincpu_mem_map(address_map &map) ATTR_COLD; + void soundcpu_io_map(address_map &map) ATTR_COLD; + void soundcpu_mem_map(address_map &map) ATTR_COLD; + void subcpu_mem_map(address_map &map) ATTR_COLD; + + int m_subcpu_status; + int m_soundcpu_busy; + int m_msm_data; + + required_device m_maincpu; + required_device m_soundcpu; + required_device m_subcpu; + required_device m_msm; + required_memory_bank m_mainbank; +}; + +void sothello_state::machine_start() +{ + m_mainbank->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000); + + save_item(NAME(m_subcpu_status)); + save_item(NAME(m_soundcpu_busy)); + save_item(NAME(m_msm_data)); +} + +void sothello_state::machine_reset() +{ + m_subcpu_status = 0; + m_soundcpu_busy = 0; + m_msm_data = 0; +} + + + +/****************************************************************************** + I/O & Address Maps +******************************************************************************/ + +// main Z80 + +void sothello_state::bank_w(uint8_t data) +{ + int bank=0; + switch(data^0xff) + { + case 1: bank=0; break; + case 2: bank=1; break; + case 4: bank=2; break; + case 8: bank=3; break; + } + m_mainbank->set_entry(bank); +} + +uint8_t sothello_state::subcpu_comm_clear_r() +{ + if(!machine().side_effects_disabled()) + m_subcpu_status = 0; + return 0; +} + +uint8_t sothello_state::subcpu_comm_nmi_r() +{ + if(!machine().side_effects_disabled()) + m_subcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + return 0; +} + +uint8_t sothello_state::subcpu_comm_status_r() +{ + return m_subcpu_status; +} + +uint8_t sothello_state::soundcpu_status_r() +{ + return m_soundcpu_busy; +} + +void sothello_state::maincpu_mem_map(address_map &map) +{ + map(0x0000, 0x7fff).rom().region("maincpu", 0); + map(0x8000, 0xbfff).bankr("mainbank"); + map(0xc000, 0xc7ff).ram().mirror(0x1800).share("mainsub"); + map(0xe000, 0xffff).ram(); +} + +void sothello_state::maincpu_io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x0f).portr("INPUT1"); + map(0x10, 0x1f).portr("INPUT2"); + map(0x20, 0x2f).portr("SYSTEM"); + map(0x30, 0x30).r(FUNC(sothello_state::subcpu_comm_clear_r)); + map(0x31, 0x31).r(FUNC(sothello_state::subcpu_comm_nmi_r)); + map(0x32, 0x32).r(FUNC(sothello_state::subcpu_comm_status_r)); + map(0x33, 0x33).r(FUNC(sothello_state::soundcpu_status_r)); + map(0x40, 0x4f).w("soundlatch", FUNC(generic_latch_8_device::write)); + map(0x50, 0x50).w(FUNC(sothello_state::bank_w)); + map(0x60, 0x61).mirror(0x02).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); // not sure, but the A1 line is ignored, code @ $8b8 + map(0x70, 0x73).rw("v9938", FUNC(v9938_device::read), FUNC(v9938_device::write)); +} + + +// sound Z80 + +void sothello_state::adpcm_int_w(int state) +{ + // only 4 bits are used + m_msm->data_w(m_msm_data & 0x0f); + m_soundcpu->set_input_line(0, ASSERT_LINE); +} + +void sothello_state::msm_cfg_w(uint8_t data) +{ +/* + bit 0 = RESET + bit 1 = 4B/3B 0 + bit 2 = S2 1 + bit 3 = S1 2 +*/ + m_msm->playmode_w(bitswap<3>(data,1,2,3)); + m_msm->reset_w(data & 1); +} + +void sothello_state::msm_data_w(uint8_t data) +{ + m_msm_data = data; +} + +void sothello_state::soundcpu_busyflag_set_w(uint8_t data) +{ + m_soundcpu_busy=1; +} + +void sothello_state::soundcpu_busyflag_reset_w(uint8_t data) +{ + m_soundcpu_busy=0; +} + +void sothello_state::soundcpu_int_clear_w(uint8_t data) +{ + m_soundcpu->set_input_line(0, CLEAR_LINE); +} + +void sothello_state::soundcpu_mem_map(address_map &map) +{ + map(0x0000, 0xdfff).rom().region("soundcpu", 0); + map(0xf800, 0xffff).ram(); +} + +void sothello_state::soundcpu_io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).r("soundlatch", FUNC(generic_latch_8_device::read)); + map(0x01, 0x01).w(FUNC(sothello_state::msm_data_w)); + map(0x02, 0x02).w(FUNC(sothello_state::msm_cfg_w)); + map(0x03, 0x03).w(FUNC(sothello_state::soundcpu_busyflag_set_w)); + map(0x04, 0x04).w(FUNC(sothello_state::soundcpu_busyflag_reset_w)); + map(0x05, 0x05).w(FUNC(sothello_state::soundcpu_int_clear_w)); +} + + +// sub 6809 + +void sothello_state::subcpu_status_w(uint8_t data) +{ + m_subcpu_status = 3; +} + +void sothello_state::subcpu_mem_map(address_map &map) +{ + map(0x0000, 0x0000).w(FUNC(sothello_state::subcpu_status_w)).nopr(); + map(0x2000, 0x77ff).ram(); + map(0x7800, 0x7fff).ram().share("mainsub"); // upper 0x800 of 6264 is shared with main cpu + map(0x8000, 0xffff).rom().region("subcpu", 0); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( sothello ) + PORT_START("INPUT1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + + PORT_START("INPUT2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) + + PORT_START("SYSTEM") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0xf2, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("DSWA") + PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) + PORT_DIPNAME( 0x1c, 0x10, "Timer" ) + PORT_DIPSETTING( 0x1c, "15" ) + PORT_DIPSETTING( 0x18, "20" ) + PORT_DIPSETTING( 0x14, "25" ) + PORT_DIPSETTING( 0x10, "30" ) + PORT_DIPSETTING( 0x0c, "35" ) + PORT_DIPSETTING( 0x08, "40" ) + PORT_DIPSETTING( 0x04, "45" ) + PORT_DIPSETTING( 0x00, "50" ) + PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("DSWB") + PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) + PORT_DIPNAME( 0x30, 0x10, "Matta" ) // undo moves + PORT_DIPSETTING( 0x30, "0" ) + PORT_DIPSETTING( 0x20, "1" ) + PORT_DIPSETTING( 0x10, "2" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPNAME( 0x08, 0x08, "Games for 2 players" ) + PORT_DIPSETTING( 0x08, "1" ) + PORT_DIPSETTING( 0x00, "2" ) + PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void sothello_state::sothello(machine_config &config) +{ + // basic machine hardware + Z80(config, m_maincpu, XTAL(21'477'272) / 6); + m_maincpu->set_addrmap(AS_PROGRAM, &sothello_state::maincpu_mem_map); + m_maincpu->set_addrmap(AS_IO, &sothello_state::maincpu_io_map); + + Z80(config, m_soundcpu, XTAL(21'477'272) / 6); + m_soundcpu->set_addrmap(AS_PROGRAM, &sothello_state::soundcpu_mem_map); + m_soundcpu->set_addrmap(AS_IO, &sothello_state::soundcpu_io_map); + + MC6809(config, m_subcpu, XTAL(8'000'000)); // divided by 4 internally + m_subcpu->set_addrmap(AS_PROGRAM, &sothello_state::subcpu_mem_map); + + config.set_perfect_quantum(m_maincpu); + + // video hardware + v9938_device &v9938(V9938(config, "v9938", XTAL(21'477'272))); + v9938.set_screen_ntsc("screen"); + v9938.set_vram_size(0x40000); + v9938.int_cb().set_inputline("maincpu", 0); + SCREEN(config, "screen", SCREEN_TYPE_RASTER); + + // sound hardware + SPEAKER(config, "mono").front_center(); + + GENERIC_LATCH_8(config, "soundlatch"); + + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(21'477'272) / 12)); + ymsnd.irq_handler().set_inputline(m_subcpu, 0); + ymsnd.port_a_read_callback().set_ioport("DSWA"); + ymsnd.port_b_read_callback().set_ioport("DSWB"); + ymsnd.add_route(0, "mono", 0.25); + ymsnd.add_route(1, "mono", 0.25); + ymsnd.add_route(2, "mono", 0.25); + ymsnd.add_route(3, "mono", 0.50); + + MSM5205(config, m_msm, XTAL(384'000)); + m_msm->vck_legacy_callback().set(FUNC(sothello_state::adpcm_int_w)); // interrupt function + m_msm->set_prescaler_selector(msm5205_device::S48_4B); // changed on the fly + m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( sothello ) + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "3.7c", 0x00000, 0x8000, CRC(47f97bd4) SHA1(52c9638f098fdcf66903fad7dafe3ab171758572) ) + ROM_LOAD( "4.8c", 0x08000, 0x8000, CRC(a98414e9) SHA1(6d14e1f9c79b95101e0aa101034f398af09d7f32) ) + ROM_LOAD( "5.9c", 0x10000, 0x8000, CRC(e5b5d61e) SHA1(2e4b3d85f41d0796a4d61eae40dd824769e1db86) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) + ROM_LOAD( "1.7a", 0x0000, 0x8000, CRC(6951536a) SHA1(64d07a692d6a167334c825dc173630b02584fdf6) ) + ROM_LOAD( "2.8a", 0x8000, 0x8000, CRC(9c535317) SHA1(b2e69b489e111d6f8105e68fade6e5abefb825f7) ) + + ROM_REGION( 0x8000, "subcpu", 0 ) + ROM_LOAD( "6.7f", 0x0000, 0x8000, CRC(ee80fc78) SHA1(9a9d7925847d7a36930f0761c70f67a9affc5e7c) ) +ROM_END + +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +GAME( 1986, sothello, 0, sothello, sothello, sothello_state, empty_init, ROT0, "Success / Fujiwara", "Super Othello", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/success/tonton.cpp b/src/mame/success/tonton.cpp new file mode 100644 index 00000000000..0527a3298ad --- /dev/null +++ b/src/mame/success/tonton.cpp @@ -0,0 +1,265 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese, Roberto Fresca +/************************************************************************** + + Waku Waku Doubutsu Land TonTon (c) 1987 Success. + + HW based off MSX2 + + Driver by Angelo Salese & Roberto Fresca. + + +*************************************************************************** + + WAKUWAKU DOUBUTSU LAND TONTON (ANIMAL VIDEO SLOT) + (c)SUCCESS / CABINET :TAIYO JIDOKI (SUN AUTO MACHINE) + + CPU : Z80 + SOUND : YM2149F + XTAL : 21477.27KHz + + TONTON.BIN : MAIN ROM + + +***************************************************************************/ + +#include "emu.h" + +#include "cpu/z80/z80.h" +#include "machine/nvram.h" +#include "machine/ticket.h" +#include "sound/ay8910.h" +#include "video/v9938.h" + +#include "speaker.h" + + +namespace { + +class tonton_state : public driver_device +{ +public: + tonton_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_v9938(*this, "v9938"), + m_maincpu(*this, "maincpu"), + m_hopper(*this, "hopper") + { } + + void tonton(machine_config &config); + +private: + required_device m_v9938; + void outport_w(offs_t offset, uint8_t data); + void hopper_w(uint8_t data); + void ay_aout_w(uint8_t data); + void ay_bout_w(uint8_t data); + required_device m_maincpu; + required_device m_hopper; + void tonton_io(address_map &map) ATTR_COLD; + void tonton_map(address_map &map) ATTR_COLD; +}; + +#define MAIN_CLOCK XTAL(21'477'272) +#define CPU_CLOCK MAIN_CLOCK/6 +#define YM2149_CLOCK MAIN_CLOCK/6/2 // '/SEL' pin tied to GND, so internal divisor x2 is active + +#define HOPPER_PULSE 50 // time between hopper pulses in milliseconds +#define VDP_MEM 0x30000 + + +/************************************************* +* Multi-Purpose Output Port * +*************************************************/ + +void tonton_state::outport_w(offs_t offset, uint8_t data) +{ + machine().bookkeeping().coin_counter_w(offset, data & 0x01); + machine().bookkeeping().coin_lockout_global_w(data & 0x02); // Coin Lock + +// if(data & 0xfe) +// logerror("%02x %02x\n",data,offset); + if (data) + logerror("tonton_outport_w %02X @ %04X\n", data, m_maincpu->pc()); +} + +void tonton_state::hopper_w(uint8_t data) +{ + m_hopper->motor_w(BIT(data, 1)); +} + + +/************************************************* +* Memory Map * +*************************************************/ + +void tonton_state::tonton_map(address_map &map) +{ + map(0x0000, 0xdfff).rom(); + map(0xe000, 0xe3ff).ram().share("nvram"); + map(0xf000, 0xffff).ram(); +} + +void tonton_state::tonton_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).portr("IN0"); + map(0x00, 0x00).w(FUNC(tonton_state::outport_w)); + map(0x01, 0x01).portr("IN1"); + map(0x01, 0x01).w(FUNC(tonton_state::hopper_w)); + map(0x02, 0x02).portr("DSW1"); + map(0x03, 0x03).portr("DSW2"); + map(0x88, 0x8b).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); + map(0xa0, 0xa1).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0xa2, 0xa2).r("aysnd", FUNC(ay8910_device::data_r)); +} + + +/************************************************* +* Input Ports Definitions * +*************************************************/ + +static INPUT_PORTS_START( tonton ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1. Pig") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2. Penguin") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3. Tiger") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4. Cow") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5. Bear") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_N) PORT_NAME("6. Elephant") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_M) PORT_NAME("7. Lion") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_TOGGLE PORT_NAME("Bookkeeping") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Reset Button") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown A") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + + PORT_START("DSW1") + PORT_DIPNAME( 0x07, 0x03, "Coinage A (100 Yen)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) + PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) + PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) + PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) + PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) + PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) + PORT_DIPSETTING( 0x04, "1 Coin / 20 Medal" ) + PORT_DIPSETTING( 0x00, "1 Coin / 50 Medal" ) + PORT_DIPNAME( 0x18, 0x18, "Coinage B (10 Yen)" ) PORT_DIPLOCATION("DSW1:4,5") + PORT_DIPSETTING( 0x00, "3 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x10, "2 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x18, "1 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x08, "1 Coin / 2 Medal" ) + PORT_DIPNAME( 0x20, 0x20, "Service Coinage" ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x20, "1 Pulse / 1 Medal" ) + PORT_DIPSETTING( 0x00, "1 Pulse / 2 Medal" ) + PORT_DIPNAME( 0x40, 0x40, "Coinage A Lock" ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, "Unlocked" ) + PORT_DIPSETTING( 0x00, "Locked" ) + PORT_DIPNAME( 0x80, 0x80, "Payout Mode") PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x80, "Manual" ) + PORT_DIPSETTING( 0x00, "Automatic" ) + + PORT_START("DSW2") + PORT_DIPNAME( 0x07, 0x03, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") + PORT_DIPSETTING( 0x07, "50%" ) + PORT_DIPSETTING( 0x03, "60%" ) + PORT_DIPSETTING( 0x05, "70%" ) + PORT_DIPSETTING( 0x01, "75%" ) + PORT_DIPSETTING( 0x06, "80%" ) + PORT_DIPSETTING( 0x02, "85%" ) + PORT_DIPSETTING( 0x04, "90%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + +INPUT_PORTS_END + + +/************************************************* +* R/W Handlers and Interrupt Routines * +*************************************************/ + +void tonton_state::ay_aout_w(uint8_t data) +{ + logerror("AY8910: Port A out: %02X\n", data); +} + +void tonton_state::ay_bout_w(uint8_t data) +{ + logerror("AY8910: Port B out: %02X\n", data); +} + +/************************************************* +* Machine Driver * +*************************************************/ + +void tonton_state::tonton(machine_config &config) +{ + // basic machine hardware + Z80(config, m_maincpu, CPU_CLOCK); // Guess. According to other MSX2 based gambling games + m_maincpu->set_addrmap(AS_PROGRAM, &tonton_state::tonton_map); + m_maincpu->set_addrmap(AS_IO, &tonton_state::tonton_io); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + // video hardware + V9938(config, m_v9938, MAIN_CLOCK); + m_v9938->set_screen_ntsc("screen"); + m_v9938->set_vram_size(0x20000); + m_v9938->int_cb().set_inputline(m_maincpu, 0); + SCREEN(config, "screen", SCREEN_TYPE_RASTER); + + TICKET_DISPENSER(config, m_hopper, attotime::from_msec(HOPPER_PULSE)); + + // sound hardware + SPEAKER(config, "mono").front_center(); + ym2149_device &aysnd(YM2149(config, "aysnd", YM2149_CLOCK)); // Guess. According to other MSX2 based gambling games + /* + AY8910: Port A out: FF + AY8910: Port B out: FF + AY8910: Port A out: FF + AY8910: Port B out: FF + AY8910: Port A out: 00 + AY8910: Port B out: 00 + */ + aysnd.port_a_write_callback().set(FUNC(tonton_state::ay_aout_w)); // Write all bits twice, and then reset them at boot + aysnd.port_b_write_callback().set(FUNC(tonton_state::ay_bout_w)); // Write all bits twice, and then reset them at boot + aysnd.add_route(ALL_OUTPUTS, "mono", 0.70); +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( tonton ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "tonton.bin", 0x0000, 0x10000, CRC(6c9cacfb) SHA1(21afd5a40b785300b013ac8cb31f5e4f480657ef) ) +ROM_END + +} // anonymous namespace + + +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS +GAME( 1987, tonton, 0, tonton, tonton, tonton_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Waku Waku Doubutsu Land TonTon (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/sunelectronics/ikki.cpp b/src/mame/sunelectronics/ikki.cpp index c4387985bd9..46b26a24649 100644 --- a/src/mame/sunelectronics/ikki.cpp +++ b/src/mame/sunelectronics/ikki.cpp @@ -488,8 +488,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(ikki_state::irq) } - - void ikki_state::ikki(machine_config &config) { constexpr XTAL MASTER_CLOCK = 20_MHz_XTAL; diff --git a/src/mame/sunelectronics/tonton.cpp b/src/mame/sunelectronics/tonton.cpp deleted file mode 100644 index 5c23e13c54a..00000000000 --- a/src/mame/sunelectronics/tonton.cpp +++ /dev/null @@ -1,263 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Angelo Salese, Roberto Fresca -/************************************************************************** - - Waku Waku Doubutsu Land TonTon (c) 1987 Success. - - HW based off MSX2 - - Driver by Angelo Salese & Roberto Fresca. - - -*************************************************************************** - - WAKUWAKU DOUBUTSU LAND TONTON (ANIMAL VIDEO SLOT) - (c)SUCCESS / CABINET :TAIYO JIDOKI (SUN AUTO MACHINE) - - CPU : Z80 - SOUND : YM2149F - XTAL : 21477.27KHz - - TONTON.BIN : MAIN ROM - - -***************************************************************************/ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/nvram.h" -#include "machine/ticket.h" -#include "sound/ay8910.h" -#include "video/v9938.h" -#include "speaker.h" - - -namespace { - -class tonton_state : public driver_device -{ -public: - tonton_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_v9938(*this, "v9938"), - m_maincpu(*this, "maincpu"), - m_hopper(*this, "hopper") - { } - - void tonton(machine_config &config); - -private: - required_device m_v9938; - void outport_w(offs_t offset, uint8_t data); - void hopper_w(uint8_t data); - void ay_aout_w(uint8_t data); - void ay_bout_w(uint8_t data); - required_device m_maincpu; - required_device m_hopper; - void tonton_io(address_map &map) ATTR_COLD; - void tonton_map(address_map &map) ATTR_COLD; -}; - -#define MAIN_CLOCK XTAL(21'477'272) -#define CPU_CLOCK MAIN_CLOCK/6 -#define YM2149_CLOCK MAIN_CLOCK/6/2 // '/SEL' pin tied to GND, so internal divisor x2 is active - -#define HOPPER_PULSE 50 // time between hopper pulses in milliseconds -#define VDP_MEM 0x30000 - - -/************************************************* -* Multi-Purpose Output Port * -*************************************************/ - -void tonton_state::outport_w(offs_t offset, uint8_t data) -{ - machine().bookkeeping().coin_counter_w(offset, data & 0x01); - machine().bookkeeping().coin_lockout_global_w(data & 0x02); // Coin Lock - -// if(data & 0xfe) -// logerror("%02x %02x\n",data,offset); - if (data) - logerror("tonton_outport_w %02X @ %04X\n", data, m_maincpu->pc()); -} - -void tonton_state::hopper_w(uint8_t data) -{ - m_hopper->motor_w(BIT(data, 1)); -} - - -/************************************************* -* Memory Map * -*************************************************/ - -void tonton_state::tonton_map(address_map &map) -{ - map(0x0000, 0xdfff).rom(); - map(0xe000, 0xe3ff).ram().share("nvram"); - map(0xf000, 0xffff).ram(); -} - -void tonton_state::tonton_io(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x00).portr("IN0"); - map(0x00, 0x00).w(FUNC(tonton_state::outport_w)); - map(0x01, 0x01).portr("IN1"); - map(0x01, 0x01).w(FUNC(tonton_state::hopper_w)); - map(0x02, 0x02).portr("DSW1"); - map(0x03, 0x03).portr("DSW2"); - map(0x88, 0x8b).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); - map(0xa0, 0xa1).w("aysnd", FUNC(ay8910_device::address_data_w)); - map(0xa2, 0xa2).r("aysnd", FUNC(ay8910_device::data_r)); -} - - -/************************************************* -* Input Ports Definitions * -*************************************************/ - -static INPUT_PORTS_START( tonton ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1. Pig") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2. Penguin") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3. Tiger") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4. Cow") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5. Bear") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_N) PORT_NAME("6. Elephant") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_M) PORT_NAME("7. Lion") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_TOGGLE PORT_NAME("Bookkeeping") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Reset Button") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown A") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) // hopper feedback - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x03, "Coinage A (100 Yen)" ) PORT_DIPLOCATION("DSW1:1,2,3") - PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) - PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) - PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) - PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) - PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) - PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) - PORT_DIPSETTING( 0x04, "1 Coin / 20 Medal" ) - PORT_DIPSETTING( 0x00, "1 Coin / 50 Medal" ) - PORT_DIPNAME( 0x18, 0x18, "Coinage B (10 Yen)" ) PORT_DIPLOCATION("DSW1:4,5") - PORT_DIPSETTING( 0x00, "3 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x10, "2 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x18, "1 Coin / 1 Medal" ) - PORT_DIPSETTING( 0x08, "1 Coin / 2 Medal" ) - PORT_DIPNAME( 0x20, 0x20, "Service Coinage" ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x20, "1 Pulse / 1 Medal" ) - PORT_DIPSETTING( 0x00, "1 Pulse / 2 Medal" ) - PORT_DIPNAME( 0x40, 0x40, "Coinage A Lock" ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x40, "Unlocked" ) - PORT_DIPSETTING( 0x00, "Locked" ) - PORT_DIPNAME( 0x80, 0x80, "Payout Mode") PORT_DIPLOCATION("DSW1:8") - PORT_DIPSETTING( 0x80, "Manual" ) - PORT_DIPSETTING( 0x00, "Automatic" ) - - PORT_START("DSW2") - PORT_DIPNAME( 0x07, 0x03, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") - PORT_DIPSETTING( 0x07, "50%" ) - PORT_DIPSETTING( 0x03, "60%" ) - PORT_DIPSETTING( 0x05, "70%" ) - PORT_DIPSETTING( 0x01, "75%" ) - PORT_DIPSETTING( 0x06, "80%" ) - PORT_DIPSETTING( 0x02, "85%" ) - PORT_DIPSETTING( 0x04, "90%" ) - PORT_DIPSETTING( 0x00, "95%" ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:4") - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:6") - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:8") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - -INPUT_PORTS_END - - -/************************************************* -* R/W Handlers and Interrupt Routines * -*************************************************/ - -void tonton_state::ay_aout_w(uint8_t data) -{ - logerror("AY8910: Port A out: %02X\n", data); -} - -void tonton_state::ay_bout_w(uint8_t data) -{ - logerror("AY8910: Port B out: %02X\n", data); -} - -/************************************************* -* Machine Driver * -*************************************************/ - -void tonton_state::tonton(machine_config &config) -{ - // basic machine hardware - Z80(config, m_maincpu, CPU_CLOCK); // Guess. According to other MSX2 based gambling games - m_maincpu->set_addrmap(AS_PROGRAM, &tonton_state::tonton_map); - m_maincpu->set_addrmap(AS_IO, &tonton_state::tonton_io); - - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - - // video hardware - V9938(config, m_v9938, MAIN_CLOCK); - m_v9938->set_screen_ntsc("screen"); - m_v9938->set_vram_size(0x20000); - m_v9938->int_cb().set_inputline(m_maincpu, 0); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); - - TICKET_DISPENSER(config, m_hopper, attotime::from_msec(HOPPER_PULSE)); - - // sound hardware - SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", YM2149_CLOCK)); // Guess. According to other MSX2 based gambling games - /* - AY8910: Port A out: FF - AY8910: Port B out: FF - AY8910: Port A out: FF - AY8910: Port B out: FF - AY8910: Port A out: 00 - AY8910: Port B out: 00 - */ - aysnd.port_a_write_callback().set(FUNC(tonton_state::ay_aout_w)); // Write all bits twice, and then reset them at boot - aysnd.port_b_write_callback().set(FUNC(tonton_state::ay_bout_w)); // Write all bits twice, and then reset them at boot - aysnd.add_route(ALL_OUTPUTS, "mono", 0.70); -} - - -/*************************************************************************** - - Game driver(s) - -***************************************************************************/ - -ROM_START( tonton ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "tonton.bin", 0x0000, 0x10000, CRC(6c9cacfb) SHA1(21afd5a40b785300b013ac8cb31f5e4f480657ef) ) -ROM_END - -} // anonymous namespace - - -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS -GAME( 1987, tonton, 0, tonton, tonton, tonton_state, empty_init, ROT0, "Success / Taiyo Jidoki", "Waku Waku Doubutsu Land TonTon (Japan)", MACHINE_SUPPORTS_SAVE ) -- cgit v1.2.3