summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/vicdual.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/vicdual.cpp')
-rw-r--r--src/mame/drivers/vicdual.cpp67
1 files changed, 37 insertions, 30 deletions
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index b704f867d68..7b9a9f128cc 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -58,6 +58,8 @@
#include "audio/invinco.h"
#include "audio/pulsar.h"
#include "audio/vicdual.h"
+#include "audio/vicdual-97271p.h"
+#include "video/vicdual-97269pb.h"
#include "cpu/i8085/i8085.h"
#include "cpu/z80/z80.h"
@@ -2232,7 +2234,7 @@ MACHINE_CONFIG_END
*
*************************************/
-READ8_MEMBER(vicdual_state::nsub_io_r)
+READ8_MEMBER(nsub_state::nsub_io_r)
{
uint8_t ret = 0;
@@ -2243,19 +2245,22 @@ READ8_MEMBER(vicdual_state::nsub_io_r)
}
-WRITE8_MEMBER(vicdual_state::nsub_io_w)
+WRITE8_MEMBER(nsub_state::nsub_io_w)
{
if (offset & 0x01) assert_coin_status();
- if (offset & 0x02) { /* nsub_audio_w(0, data) */ }
+ if (offset & 0x02)
+ {
+ m_s97271p->port_w(data);
+ }
if (offset & 0x04)
{
palette_bank_w(space, 0, data);
- m_gradient = data & 4;
+ m_s97269pb->palette_bank_w(data);
}
}
-static ADDRESS_MAP_START( nsub_map, AS_PROGRAM, 8, vicdual_state )
+static ADDRESS_MAP_START( nsub_map, AS_PROGRAM, 8, nsub_state )
AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_NOP /* unused */
AM_RANGE(0xc000, 0xc3ff) AM_MIRROR(0x3000) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
@@ -2264,7 +2269,7 @@ static ADDRESS_MAP_START( nsub_map, AS_PROGRAM, 8, vicdual_state )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( nsub_io_map, AS_IO, 8, vicdual_state )
+static ADDRESS_MAP_START( nsub_io_map, AS_IO, 8, nsub_state )
ADDRESS_MAP_GLOBAL_MASK(0x0f)
/* no decoder, just logic gates, so in theory the
@@ -2275,7 +2280,7 @@ ADDRESS_MAP_END
// coinage is handled by extra hardware on a daughterboard, put before the coin-in pin on the main logic board
// IC board "COIN CALCULATOR" (97201-P): two 74191 counters, a 555 timer, coin meters, and lots of other TTL
-TIMER_DEVICE_CALLBACK_MEMBER(vicdual_state::nsub_coin_pulse)
+TIMER_DEVICE_CALLBACK_MEMBER(nsub_state::nsub_coin_pulse)
{
if (m_nsub_play_counter > 0)
{
@@ -2284,7 +2289,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(vicdual_state::nsub_coin_pulse)
}
}
-INPUT_CHANGED_MEMBER(vicdual_state::nsub_coin_in)
+INPUT_CHANGED_MEMBER(nsub_state::nsub_coin_in)
{
if (newval)
{
@@ -2339,14 +2344,14 @@ static INPUT_PORTS_START( nsub )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nsub_state, get_composite_blank_comp, nullptr)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nsub_state, read_coin_status, nullptr)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)0)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)2)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, nsub_state, nsub_coin_in, (void*)0)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, nsub_state, nsub_coin_in, (void*)1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, nsub_state, nsub_coin_in, (void*)2)
PORT_START("COINAGE") // "OPTION SW." on daughterboard
PORT_DIPNAME( 0x07, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2,3")
@@ -2372,7 +2377,7 @@ static INPUT_PORTS_START( nsub )
INPUT_PORTS_END
-MACHINE_START_MEMBER(vicdual_state,nsub)
+MACHINE_START_MEMBER(nsub_state, nsub)
{
m_nsub_play_counter = 0;
save_item(NAME(m_nsub_coin_counter));
@@ -2385,28 +2390,33 @@ MACHINE_START_MEMBER(vicdual_state,nsub)
m_nsub_coinage_timer->adjust(attotime::zero, 0, attotime::from_msec(150));
}
-MACHINE_RESET_MEMBER(vicdual_state,nsub)
+MACHINE_RESET_MEMBER(nsub_state, nsub)
{
m_nsub_coin_counter = m_coinage->read() & 7;
machine_reset();
}
-static MACHINE_CONFIG_DERIVED( nsub, vicdual_root )
-
+static MACHINE_CONFIG_START( nsub, nsub_state )
/* basic machine hardware */
- MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_ADD("maincpu", Z80, VICDUAL_MAIN_CPU_CLOCK)
MCFG_CPU_PROGRAM_MAP(nsub_map)
MCFG_CPU_IO_MAP(nsub_io_map)
- MCFG_TIMER_DRIVER_ADD("nsub_coin", vicdual_state, nsub_coin_pulse)
-
- MCFG_MACHINE_START_OVERRIDE(vicdual_state,nsub)
- MCFG_MACHINE_RESET_OVERRIDE(vicdual_state,nsub)
+ MCFG_TIMER_DRIVER_ADD("coinstate", nsub_state, clear_coin_status)
+ MCFG_TIMER_DRIVER_ADD("nsub_coin", nsub_state, nsub_coin_pulse)
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(vicdual_state, screen_update_color)
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(VICDUAL_PIXEL_CLOCK, VICDUAL_HTOTAL, VICDUAL_HBEND, VICDUAL_HBSTART, VICDUAL_VTOTAL, VICDUAL_VBEND, VICDUAL_VBSTART)
+ MCFG_SCREEN_UPDATE_DRIVER(nsub_state, screen_update_color)
+ MCFG_S97269PB_ADD("s97269pb")
+
+ MCFG_MACHINE_START_OVERRIDE(nsub_state, nsub)
+ MCFG_MACHINE_RESET_OVERRIDE(nsub_state, nsub)
+
+ /* audio hardware */
+ MCFG_S97271P_ADD("s97271p")
MACHINE_CONFIG_END
@@ -2664,11 +2674,8 @@ Epr-274.u42
Epr-275.u41
Pr-69.u11
-Also PR33.u82 and PR34.u83 were not dumped from this pcb, couldn't be read because aluminium cooler on it.
-They're probably the same as on other games.
-
-This game use a separate "daughter" board for input ??? ref: 97269-P-B
-with a prom on it : PR-02 type MMI 6336-1j which is soldered.
+This game use a separate "daughter" board for gradient and starfield ref: 97269-P-B
+with 3 proms on it : PR-02 type MMI 6336-1j, PR-56 type MB7054 and PR-57 type MB7054
*/
@@ -3646,7 +3653,7 @@ GAME( 1979, headon2, 0, headon2, headon2, driver_device, 0, ROT0,
GAME( 1979, headon2s, headon2, headon2bw, car2, driver_device, 0, ROT0, "bootleg (Sidam)", "Head On 2 (Sidam bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // won't coin up?
GAME( 1979, car2, headon2, headon2bw, car2, driver_device, 0, ROT0, "bootleg (RZ Bologna)", "Car 2 (bootleg of Head On 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // title still says 'HeadOn 2'
GAME( 1979, invho2, 0, invho2, invho2, driver_device, 0, ROT270, "Sega", "Invinco / Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1980, nsub, 0, nsub, nsub, driver_device, 0, ROT270, "Sega", "N-Sub (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // this is the upright set. cocktail set still needs to be dumped
+GAME( 1980, nsub, 0, nsub, nsub, driver_device, 0, ROT270, "Sega", "N-Sub (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // this is the upright set. cocktail set still needs to be dumped
GAME( 1980, samurai, 0, samurai, samurai, driver_device, 0, ROT270, "Sega", "Samurai", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, invinco, 0, invinco, invinco, driver_device, 0, ROT270, "Sega", "Invinco", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, invds, 0, invds, invds, driver_device, 0, ROT270, "Sega", "Invinco / Deep Scan", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )