homerun.cpp: updated hw info, TODO list, dips [Guru]

This commit is contained in:
Ivan Vangelista 2020-04-20 18:14:14 +02:00
parent 225e53f476
commit b832ed2655

View File

@ -7,47 +7,105 @@
Driver by Tomasz Slanina
They're gambling games (seems to be aimed at kids), with a little skill involved.
ganjaja has a coin hopper, I don't know how the other games reward the player.
All games have a medal hopper to reward the player.
*weird* hardware - based on NES version
(gfx bank changed in the middle of screen,
sprites in NES format etc)
homerun and ganjaja use an extra soundchip for playing voice/samples
homerun, dynashot and ganjaja use an extra soundchip for playing voice/samples
Todo :
- dump homerun sample rom
- improve controls/dips
- fix sprite glitches in ganjaja Hop Step & Jump
- Dump homerun and dynashot sample rom
- Improve controls/DIP switches
- Fix sprite glitches in ganjaja Hop Step & Jump
- Fix sample playing in ganjaja Saisho wa Goo. The words 'rock', 'paper', scissors' are not played?
- Fix small gfx glitch on right side of screen in homerun. On the real PCB there is nothing on the right side.
- Fix coinage; Extra credits are added on the first coin-up so with 5C 1C, only 4 coins are required for a credit.
After that first credit, coinage works as expected and additional crediting requires the correct number of coins.
When X-Coins Y-Credits is active (where X=* and Y>1), coinage works as expected.
When starting the game with 1C 1C active, all games start with 1 credit.
------------------------------------------------------------------------------------
Hardware info by Guru
All these games run on the same PCB.
All games use a NEC uPD7756 for speech.
-----------------------------------
Moero!! Pro Yakyuu Homerun Kyousou
Jaleco, 1988
PCB Layout
----------
HR-8847
-----------------------------------
| YM2203 Z80B 6264 |
|YM3014 DSW(8) HOMERUN.43 |
| D7756C 6264 |
| |
|J 640KHz HOMERUN.60 |
JALECO HR-8847 MADE IN JAPAN
|---------------------------------|
|C1230 4558 YM3014 Z80B 6264 |
|VOL 358 YM2203 DSW(8) 1.43 |
| D7756C 6264 |
| 640kHz |
|J 3.60 |
|A 2018 |
|M 2018 2018 8255|
|M 8255|
|M 2018 |
|A |
| |
| |
| HOMERUN.120 20MHz|
-----------------------------------
|A 2018 |
| 2018 |
| 555|
| 1.120 20MHz|
|---------------------------------|
Notes:
Z80 clock: 5.000MHz
VSync: 60Hz
HSync: 15.21kHz
Z80 - Clock 5.000MHz [20/4]
2018 - 2k x8-bit SRAM
6264 - 8k x8-bit SRAM
YM2203 - Clock 2.500MHz [20/8]
YM3014 - Yamaha YM3014 DAC
D7756 - NEC uPD7756 ADPCM Speech Processor with internal 256k-bit ROM (32k x8-bit). Clock input 640kHz
358 - NEC C358 Dual Op AMP
4558 - NEC C4558 Dual Op AMP
C1230 - NEC uPC1230H 23W Power AMP
1,2,3 - EPROMs
VSync - 59.something. Measured value moves between 59Hz and 60Hz
HSync - 15.21kHz
Edge Connector is JAMMA but with some pins re-used for other functions.
Controls are up, down, left, right, button 1 and start.
Coin 1 is JAMMA pin 16
Coin 2 is JAMMA pin 24. Note this is equivalent to JAMMA button 3
For Coin 1 (JAMMA pin 16)...
1C 1C - DSW 1 OFF & DSW 2 OFF
2C 1C - DSW 1 ON & DSW 2 OFF
3C 1C - DSW 1 OFF & DSW 2 ON
5C 1C - DSW 1 ON & DSW 2 ON
For Coin 2 (JAMMA pin 24)
1C 1C - DSW 1 OFF & DSW 2 OFF
2C 1C - DSW 1 ON & DSW 2 OFF
1C 3C - DSW 1 OFF & DSW 2 ON
1C 5C - DSW 1 ON & DSW 2 ON
Above coinage for Coin 1 and Coin 2 is confirmed correct on the real PCB.
JAMMA pin 8 is Hopper Solenoid (5VDC)
JAMMA pin 25 is Hopper Switch (SPST On/Off; when active pin 25 is tied to ground)
Hopper operates on 100VAC through a solid-state relay connected to the Hopper Solenoid signal
The cabinet has a digital number display somewhere because the manual mentions a 2nd chance
given if the digital counter reads 777. It may be on-screen or 3x 7-segment LEDs on
the control panel somewhere or maybe there's a DIP setting to turn it on.
At the title screen the sample played is 'bat hitting ball'.
When the game play starts a voice says 'play ball' but this is not played in the emulation.
When the ball is hit the sample played is 'bat hitting ball', then 'crowd cheers'.
After several strikes in a row the sample played is 'aho'
If a foul ball goes behind and is caught by the crowd the sample that plays is 'yah'.
Homerun reference video: https://www.youtube.com/watch?v=80jtlNKZtEE&t=519
This appears to be a different version with Japanese text for 'credit' and 'game over' and
the team selection screen shows the number of credits in the game.
This version shows the 2nd-chance number countdown on screen that is mentioned in the manual.
777 2nd chance video reference: https://www.youtube.com/watch?v=FBCD2tXG4Jo&t=392
This version of Homerun is not dumped.
------------------------------------------------------------------------------------
*/
#include "emu.h"
@ -151,7 +209,7 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
static INPUT_PORTS_START( homerun )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, homerun_d7756_busy_r)
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@ -167,30 +225,56 @@ static INPUT_PORTS_START( homerun )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_START("IN2")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:1,2")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIPSW:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIPSW:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIPSW:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIPSW:6" )
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DIPSW:7" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:8")
PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) ) // game boots with 2 permanent credits which is correct
PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "DIPSW:3" ) // manual shows blank so assumed to be unused
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DIPSW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:8")
PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
// The manuals shows the following DIPs but they don't appear to do anything
// so this could be for a different version which is not dumped.
//..PORT_DIPNAME( 0x70, 0x70, "Difficulty" ) PORT_DIPLOCATION("DIPSW:5,6,7")
//..PORT_DIPSETTING( 0x70, "1" )
//..PORT_DIPSETTING( 0x10, "2" )
//..PORT_DIPSETTING( 0x20, "3" ) // manual only shows difficulty 1-5 but using 3 DIP switches
//..PORT_DIPSETTING( 0x30, "4" )
//..PORT_DIPSETTING( 0x40, "5" )
//..PORT_DIPSETTING( 0x50, "?" )
//..PORT_DIPSETTING( 0x60, "?" )
//..PORT_DIPSETTING( 0x00, "?" )
//..PORT_DIPNAME( 0x88, 0x88, "Payout" ) PORT_DIPLOCATION("DIPSW:8,4")
//..PORT_DIPSETTING( 0x88, "1 Medal" ) // after number is a Japanese symbol 枚 which is used for counting flat thin objects
//..PORT_DIPSETTING( 0x08, "2 Medals" ) // so it must be referring to 'medals' since the wiring diagram shows a 'medal hopper'
//..PORT_DIPSETTING( 0x80, "3 Medals" )
//..PORT_DIPSETTING( 0x00, "Unused" )
INPUT_PORTS_END
static INPUT_PORTS_START( dynashot )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // ... actually does have a D7756 on the PCB
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@ -204,29 +288,30 @@ static INPUT_PORTS_START( dynashot )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_START("IN2")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:1,2")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIPSW:3" ) // collisions? (not all bits)
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIPSW:4" ) // "
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIPSW:5" ) // "
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIPSW:6" ) // "
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DIPSW:7" ) // "
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:8")
PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) // game boots with 1 credit inserted - wrong
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIPSW:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIPSW:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIPSW:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIPSW:6" )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:7,8")
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) // game boots with 1 credit inserted - wrong
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
INPUT_PORTS_END
static INPUT_PORTS_START( ganjaja )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, ganjaja_d7756_busy_r)
PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@ -242,17 +327,18 @@ static INPUT_PORTS_START( ganjaja )
PORT_START("IN2")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // bit masked with IN0 IPT_COIN1, maybe coin lockout?
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xcf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW")
// starts game with coin in if 1c_1c?
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:1")
// Starts game with coin in if 1C_1C
// With 2C_1C only 1 coin is needed to start the game because 1 extra credit is incorrectly given
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:1")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DIPSW:2")
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) ) // game boots with 1 credit inserted - wrong
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DIPSW:2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) // game will boot with 1 credit inserted
PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIPSW:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIPSW:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIPSW:5" )
@ -270,26 +356,27 @@ INPUT_PORTS_END
***************************************************************************/
// homerun samples, note that this is the complete rom contents; not all samples are used in this game
// homerun samples, taken from the Famicom version of Moero!! Pro Yakyuu
// note that this is the complete rom contents; not all samples are used in this game
static const char *const homerun_sample_names[] =
{
"*homerun",
"00", // strike
"01", // ball
"02", // time (ask for time out)
"03", // out
"04", // safe
"05", // foul
"06", // yah (field player catching a fast ball)
"07", // batter out (batter out after 3 strikes)
"08", // play ball
"09", // ball four
"10", // home run
"11", // new pitcher (choosing new pitcher in time out)
"12", // ouch (batter gets hit by pitcher)
"13", // aho (be called a fool by supervisor)
"14", // bat hits ball
"15", // crowd cheers
"00", // strike (not used)
"01", // ball (not used)
"02", // time (ask for time out) (not used)
"03", // out (not used)
"04", // safe (not used)
"05", // foul (not used)
"06", // yah (person in crowd catching a foul ball going behind)(used)
"07", // batter out (batter out after 3 strikes) (not used)
"08", // play ball (based on video reference this should be played but isn't)
"09", // ball four (not used)
"10", // home run (used)
"11", // new pitcher (choosing new pitcher in time out) (not used)
"12", // ouch (batter gets hit by pitcher) (not used)
"13", // aho (be called a fool by supervisor)(used)
"14", // bat hits ball(used)
"15", // crowd cheers(used)
nullptr
};
@ -418,7 +505,7 @@ ROM_START( homerun )
ROM_LOAD( "homerun.ic120", 0x00000, 0x20000, CRC(52f0709b) SHA1(19e675bcccadb774f60ec5929fc1fb5cf0d3f617) )
ROM_REGION( 0x08000, "d7756", ROMREGION_ERASE00 )
ROM_LOAD( "d7756c.ic98", 0x00000, 0x08000, NO_DUMP ) /* D7756C built-in rom - very likely the same rom as [Moero!! Pro Yakyuu (Black/Red)] on Famicom, and [Moero!! Nettou Yakyuu '88] on MSX2 */
ROM_LOAD( "d7756c.ic98", 0x00000, 0x08000, NO_DUMP ) // D7756C built-in rom - very likely the same rom as Moero!! Pro Yakyuu (Black/Red) on Famicom
ROM_END
ROM_START( nhomerun )
@ -444,6 +531,9 @@ ROM_START( dynashot )
ROM_REGION( 0x20000, "gfx2", 0 )
ROM_LOAD( "2.ic120", 0x00000, 0x20000, CRC(bedf7b98) SHA1(cb6c5fcaf8df5f5c7636c3c8f79b9dda78e30c2e) )
ROM_REGION( 0x08000, "d7756", ROMREGION_ERASE00 )
ROM_LOAD( "d7756c.ic98", 0x00000, 0x08000, NO_DUMP )
ROM_END
@ -465,5 +555,5 @@ ROM_END
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
GAME( 1988, nhomerun, 0, homerun, homerun, homerun_state, empty_init, ROT0, "Jaleco", "NEW Moero!! Pro Yakyuu Homerun Kyousou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // same as below but harder?
GAME( 1988, homerun, nhomerun, homerun, homerun, homerun_state, empty_init, ROT0, "Jaleco", "Moero!! Pro Yakyuu Homerun Kyousou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1988, dynashot, 0, dynashot, dynashot, homerun_state, empty_init, ROT0, "Jaleco", "Dynamic Shoot Kyousou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1990, ganjaja, 0, ganjaja, ganjaja, homerun_state, empty_init, ROT0, "Jaleco", "Ganbare Jajamaru Saisho wa Goo / Ganbare Jajamaru Hop Step & Jump", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1988, dynashot, 0, dynashot, dynashot, homerun_state, empty_init, ROT0, "Jaleco", "Dynamic Shoot Kyousou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1990, ganjaja, 0, ganjaja, ganjaja, homerun_state, empty_init, ROT0, "Jaleco", "Ganbare Jajamaru Saisho wa Goo / Ganbare Jajamaru Hop Step & Jump", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )