neptunp2.cpp: Add 'ccorsario' program ROM and improve hardware documentation [jordigahan, ClawGrip]

This commit is contained in:
ClawGrip 2021-04-22 00:28:12 +02:00 committed by GitHub
parent d82c2d1c65
commit ca827671a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ Unidesa Cirsa Las Llaves del Tesoro
Unidesa Cirsa Secreto de la Pirámide
Unidesa Cirsa Filón
Unidesa Cirsa Multi Points
Unidesa Cirsa Corsario
Unidesa Cirsa Corsarios
CIRSA / UNIDESA 960606-5 CPU BOARD
_________________________________________________________________
@ -98,6 +98,7 @@ https://media.recreativas.org/manuales/201909/cirsa-unidesa-carta-control-960606
#include "cpu/i86/i186.h"
#include "emupal.h"
#include "screen.h"
#include "sound/okim6376.h"
#include "speaker.h"
@ -108,10 +109,12 @@ class neptunp2_state : public driver_device
public:
neptunp2_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
m_maincpu(*this, "maincpu"),
m_okim6376(*this, "oki")
{ }
void neptunp2(machine_config &config);
void neptunp2_video(machine_config &config);
void neptunp2_no_video(machine_config &config);
protected:
// driver_device overrides
@ -123,12 +126,35 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void neptunp2_io(address_map &map);
void neptunp2_map(address_map &map);
void neptunp2_video_map(address_map &map);
void neptunp2_no_video_map(address_map &map);
// devices
required_device<cpu_device> m_maincpu;
required_device<okim6376_device> m_okim6376;
};
static INPUT_PORTS_START(c960606)
PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8")
PORT_START("DSW2")
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW2:1")
PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW2:2")
PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW2:3")
PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW2:4")
PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW2:5")
PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:6")
PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:7")
PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:8")
INPUT_PORTS_END
void neptunp2_state::video_start()
{
@ -144,12 +170,11 @@ uint8_t neptunp2_state::test_r()
return machine().rand();
}
void neptunp2_state::neptunp2_map(address_map &map)
void neptunp2_state::neptunp2_no_video_map(address_map &map)
{
map(0x00000, 0xbffff).rom();
map(0xe0000, 0xeffff).ram();
map(0xd0000, 0xd7fff).ram(); //videoram
map(0xdb004, 0xdb007).ram();
map(0xdb00c, 0xdb00f).ram();
@ -162,6 +187,13 @@ void neptunp2_state::neptunp2_map(address_map &map)
map(0xffff0, 0xfffff).rom();
}
void neptunp2_state::neptunp2_video_map(address_map &map)
{
neptunp2_no_video_map(map);
map(0xd0000, 0xd7fff).ram(); //videoram
}
void neptunp2_state::neptunp2_io(address_map &map)
{
}
@ -187,12 +219,24 @@ static GFXDECODE_START( gfx_neptunp2 )
// GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 )
GFXDECODE_END
void neptunp2_state::neptunp2(machine_config &config)
void neptunp2_state::neptunp2_no_video(machine_config &config)
{
// Basic machine hardware
I80188(config, m_maincpu, 36.864_MHz_XTAL); // N80C188-20 AMD
m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_map);
m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_no_video_map);
m_maincpu->set_addrmap(AS_IO, &neptunp2_state::neptunp2_io);
// Sound hardware
SPEAKER(config, "mono").front_center();
OKIM6376(config, "oki", 36.864_MHz_XTAL/32).add_route(ALL_OUTPUTS, "mono", 1.0); // Frequency divisor is a guess
}
void neptunp2_state::neptunp2_video(machine_config &config)
{
neptunp2_no_video(config);
m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_video_map);
m_maincpu->set_vblank_int("screen", FUNC(neptunp2_state::irq0_line_hold));
// Video hardware
@ -206,11 +250,6 @@ void neptunp2_state::neptunp2(machine_config &config)
GFXDECODE(config, "gfxdecode", "palette", gfx_neptunp2);
PALETTE(config, "palette").set_entries(512);
// Sound hardware
SPEAKER(config, "mono").front_center();
// OKIM6376(config, "oki", xxx).add_route(ALL_OUTPUTS, "mono", 1.0);
}
/***************************************************************************
@ -240,16 +279,13 @@ Games on Cirsa "960606-5" PCB
***************************************************************************/
// No battery on the PCB for this game. PLD "PAT-062", CPLD "PD03" (Xilinx XC9536).
ROM_START( ccorsario ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. It was found with most sockets unpopulated. This is mechanical.
ROM_START( ccorsario ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. This is mechanical.
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP )
ROM_REGION( 0x100000, "prg_data", 0 )
ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP )
ROM_LOAD( "c_corsarios_50_b-2057-a_a_6.0d_b-0082.u2", 0x000000, 0x080000, CRC(3a68e622) SHA1(0fddf47915b1eb584eb9fc1a2ca611582629ace1) )
ROM_REGION( 0x100000, "oki", 0 )
ROM_LOAD( "cirsa_corsario_b-2057-a_s127_1.0.u14", 0x00000, 0x80000, CRC(f15ccc6b) SHA1(08f2f0129634075297d4a6b9697ba5bd0c8455ce) )
ROM_LOAD( "cirsa_corsario_b-2057-a_s128_1.0.u15", 0x80000, 0x80000, CRC(061dc7c8) SHA1(a9c8da9c2e7cecd8800974ce70546cc60391cfe8) )
ROM_LOAD( "cirsa_corsarios_b-2057-a_s127_1.0_b-82.u14", 0x000000, 0x080000, CRC(f15ccc6b) SHA1(08f2f0129634075297d4a6b9697ba5bd0c8455ce) )
ROM_LOAD( "cirsa_corsarios_b-2057-a_s128_1.0_b-82.u15", 0x080000, 0x080000, CRC(061dc7c8) SHA1(a9c8da9c2e7cecd8800974ce70546cc60391cfe8) )
ROM_REGION( 0x800, "eeprom", 0 )
ROM_LOAD( "24lc16b.u10", 0x000, 0x800, CRC(0212ae8f) SHA1(d1db767bd4314894e0cbf8063290fe3260646843) )
@ -263,7 +299,7 @@ ROM_START( rockroll ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. It was
ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP )
ROM_REGION( 0x100000, "prg_data", 0 )
ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP )
ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) // it's also possible it wasn't ever populated
ROM_REGION( 0x200000, "oki", 0 )
ROM_LOAD( "c.rock_n_roll_b-2103_6219_otp_b-82_m27c801.u14", 0x000000, 0x100000, CRC(963d184b) SHA1(8ad8b3215d3fc513dfae27bea2ed2ae9939c0f02) )
@ -281,7 +317,7 @@ ROM_START( unk960606 ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. Like '
ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP )
ROM_REGION( 0x100000, "prg_data", 0 )
ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP )
ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) // it's also possible it wasn't ever populated
ROM_REGION( 0x200000, "oki", 0 )
ROM_LOAD( "s284_otp_m27c801.u14", 0x000000, 0x100000, CRC(87325ae4) SHA1(6d77f1933f0aab29371795e8fc7bef9bd05cafea) )
@ -296,10 +332,11 @@ ROM_END
} // Anonymous namespace
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
GAME( 2003, neptunp2, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Neptune's Pearls 2", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year from legal registry date
GAME( 2003, neptunp2, 0, neptunp2_video, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Neptune's Pearls 2", MACHINE_IS_SKELETON ) // Year from legal registry date
// Games on Cirsa "960606-5" PCB
GAME( 2002, ccorsario, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Corsario (Cirsa slot machine)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year from legal registry date
GAME( 1999, rockroll, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Rock 'n' Roll", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year taken from parts' manual and sticker on PCB
GAME( 2001?, unk960606, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "unknown 960606-5 based machine", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year taken from sticker on PCB
GAME( 1999, ccorsario, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Corsarios (Cirsa slot machine)", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from sticker on PCB
GAME( 1999, rockroll, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Rock 'n' Roll", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from parts' manual and sticker on PCB
GAME( 2001?, unk960606, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "unknown 960606-5 based machine", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from sticker on PCB