From 32f0b19582976d45c1a1d79aa61d89524c3f9a9d Mon Sep 17 00:00:00 2001 From: James Wallace Date: Wed, 6 Aug 2014 20:00:48 +0000 Subject: [PATCH] New game added (Not Working) ============================ Revelations (Nova Productions) [AintBigAintClever, J.Wallace] New non working clone ============================ Cops (UK) [Any] Started reworking Cops driver into a full Nova Lasermax emulation. Added onboard sound chip, fixed the alphanumeric display. --- src/mame/drivers/bfm_sc1.c | 24 +--------- src/mame/drivers/cops.c | 89 +++++++++++++++++++++++++++++++------ src/mame/layout/cops.lay | 5 +-- src/mame/layout/sc1_vfd.lay | 28 +++++++++++- src/mame/mame.lst | 4 +- 5 files changed, 108 insertions(+), 42 deletions(-) diff --git a/src/mame/drivers/bfm_sc1.c b/src/mame/drivers/bfm_sc1.c index bf2c76f0961..fc9e8c0f17f 100644 --- a/src/mame/drivers/bfm_sc1.c +++ b/src/mame/drivers/bfm_sc1.c @@ -214,7 +214,6 @@ int bfm_sc1_state::Scorpion1_GetSwitchState(int strobe, int data) WRITE8_MEMBER(bfm_sc1_state::bankswitch_w) { -// printf("bankswitch %02x\n", data); membank("bank1")->set_entry(data & 0x03); } @@ -355,28 +354,6 @@ READ8_MEMBER(bfm_sc1_state::nec_r) WRITE8_MEMBER(bfm_sc1_state::vfd_w) { -/* int changed = m_vfd_latch ^ data; - - m_vfd_latch = data; - - if ( changed ) - { - if ( changed & VFD_RESET ) - { // vfd reset line changed - if ( !(data & VFD_RESET) ) - { // reset the vfd - m_vfd0->reset(); - } - } - if ( changed & VFD_CLOCK1 ) - { // clock line changed - if ( !(data & VFD_CLOCK1) && (data & VFD_RESET) ) - { // new data clocked into vfd - m_vfd0->shift_data(data & VFD_DATA ); - } - } - } -*/ m_vfd0->por(data & VFD_RESET); m_vfd0->data(data & VFD_DATA); m_vfd0->sclk(data & VFD_CLOCK1); @@ -1077,6 +1054,7 @@ static MACHINE_CONFIG_START( scorpion1, bfm_sc1_state ) MCFG_CPU_PERIODIC_INT_DRIVER(bfm_sc1_state, timer_irq, 1000) // generate 1000 IRQ's per second MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) + MCFG_BFMBD1_ADD("vfd0",0) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("aysnd",AY8912, MASTER_CLOCK/4) diff --git a/src/mame/drivers/cops.c b/src/mame/drivers/cops.c index e3ad207af97..6f4e06152f6 100644 --- a/src/mame/drivers/cops.c +++ b/src/mame/drivers/cops.c @@ -1,16 +1,29 @@ /*************************************************************************** - Atari Games Cops + Nova 'LaserMax'/Atari Games Cops (hardware developed by Nova Productions Limited) + Preliminary driver by Mariusz Wojcieszek, James Wallace - Preliminary driver by Mariusz Wojcieszek + Cops uses a Sony CD-ROM in addition to the regular setup, purely to play + Bad Boys by Inner Circle, so there is muscial accompaniment to areas + where the laserdisc audio is muted. + TODO: There are probably more ROMs for Revelations, the disc contains + full data for a picture based memory game called 'Vision Quest'. + + LaserMax memory map needs sorting out, Cops uses a subset of what's + actually available + + The UK version COPS appears to want to communicate with the LDP in a + different way. ***************************************************************************/ #include "emu.h" #include "cpu/m6502/m6502.h" #include "machine/6522via.h" +#include "sound/sn76496.h" + //#include "machine/mos6551.h" #include "cops.lh" @@ -26,11 +39,13 @@ public: cops_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_sn(*this, "snsnd"), m_irq(0) { } // devices required_device m_maincpu; + required_device m_sn; // screen updates UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -52,10 +67,12 @@ public: void dacia_receive(UINT8 data); DECLARE_WRITE8_MEMBER(dacia_w); DECLARE_READ8_MEMBER(dacia_r); + DECLARE_WRITE8_MEMBER(via1_b_w); + DECLARE_WRITE8_MEMBER(via1_cb1_w); DECLARE_WRITE8_MEMBER(cdrom_data_w); DECLARE_WRITE8_MEMBER(cdrom_ctrl_w); DECLARE_READ8_MEMBER(cdrom_data_r); - + DECLARE_DRIVER_INIT(cops); int m_irq; UINT8 m_lcd_addr_l, m_lcd_addr_h; @@ -67,6 +84,9 @@ public: UINT8 m_cdrom_ctrl; UINT8 m_cdrom_data; + UINT8 m_sn_data; + UINT8 m_sn_cb1; + // LDP-1450 UINT8 m_ld_command_to_send[5]; UINT8 m_ld_command_total_bytes; @@ -97,13 +117,6 @@ void cops_state::video_start() UINT32 cops_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { - char ledtext[16 + 1]; - for ( int i = 0; i < 16; i++ ) - { - ledtext[i] = m_maincpu->space(AS_PROGRAM).read_byte(0x64 + i); - } - ledtext[16] = 0; - popmessage("%s",ledtext); return 0; } @@ -386,7 +399,7 @@ WRITE8_MEMBER(cops_state::io1_w) { sprintf(output_name, "digit%d", i); display_data = m_lcd_data_l | (m_lcd_data_h << 8); - display_data = BITSWAP16(display_data, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); // todo: + display_data = BITSWAP16(display_data, 4, 5, 12, 1, 0, 11, 10, 6, 7, 2, 9, 3, 15, 8, 14, 13); output_set_value(output_name, display_data); } } @@ -494,6 +507,20 @@ WRITE_LINE_MEMBER(cops_state::via1_irq) m_maincpu->set_input_line(M6502_IRQ_LINE, m_irq ? ASSERT_LINE : CLEAR_LINE); } +WRITE8_MEMBER(cops_state::via1_b_w) +{ + m_sn_data = BITSWAP8(data,0,1,2,3,4,5,6,7); + if (m_sn_cb1) + { + m_sn->write(space,0,m_sn_data); + } +} + +WRITE8_MEMBER(cops_state::via1_cb1_w) +{ + m_sn_cb1 = data; +} + /************************************* * * VIA 2 (U27) @@ -534,10 +561,9 @@ static ADDRESS_MAP_START( cops_map, AS_PROGRAM, 8, cops_state ) // AM_RANGE(0xd004, 0xd007) AM_DEVREADWRITE("acia6551_2", mos6551_device, read, write ) AM_RANGE(0xd000, 0xd007) AM_READWRITE(dacia_r, dacia_w) AM_RANGE(0xd800, 0xd80f) AM_DEVREADWRITE("via6522_3", via6522_device, read, write) /* VIA 3 */ - AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("system", 0) + AM_RANGE(0xe000, 0xffff) AM_ROMBANK("sysbank1") ADDRESS_MAP_END - static INPUT_PORTS_START( cops ) PORT_START("SW0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Switch A") PORT_CODE(KEYCODE_A) PORT_IMPULSE(1) @@ -587,6 +613,15 @@ PALETTE_INIT_MEMBER( cops_state,cops ) { } +DRIVER_INIT_MEMBER(cops_state,cops) +{ + //The hardware is designed and programmed to use multiple system ROM banks, but for some reason it's hardwired to bank 2. + //For documentation's sake, here's the init + UINT8 *rom = memregion("system")->base(); + membank("sysbank1")->configure_entries(0, 4, &rom[0x0000], 0x2000); + membank("sysbank1")->set_entry(2); +} + static MACHINE_CONFIG_START( cops, cops_state ) /* basic machine hardware */ @@ -608,6 +643,8 @@ static MACHINE_CONFIG_START( cops, cops_state ) /* via */ MCFG_DEVICE_ADD("via6522_1", VIA6522, 0) MCFG_VIA6522_IRQ_HANDLER(WRITELINE(cops_state, via1_irq)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(cops_state, via1_b_w)) + MCFG_VIA6522_CB1_HANDLER(WRITE8(cops_state, via1_cb1_w)) MCFG_DEVICE_ADD("via6522_2", VIA6522, 0) MCFG_VIA6522_IRQ_HANDLER(WRITELINE(cops_state, via2_irq)) @@ -623,6 +660,11 @@ static MACHINE_CONFIG_START( cops, cops_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + + /* TODO: Verify clock */ + MCFG_SOUND_ADD("snsnd", SN76489, MAIN_CLOCK/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + MACHINE_CONFIG_END @@ -640,4 +682,23 @@ ROM_START( cops ) ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) ROM_END -GAMEL( 1994, cops, 0, cops, cops, driver_device, 0, ROT0, "Atari Games", "Cops", GAME_NOT_WORKING | GAME_NO_SOUND, layout_cops ) +ROM_START( copsuk ) + ROM_REGION( 0x8000, "program", 0 ) + ROM_LOAD( "cops1b_uk.bin", 0x0000, 0x8000, CRC(f095ee95) SHA1(86bb517331d81ae3a8f3b87df67c321013c6aae4) ) + + ROM_REGION( 0x8000, "system", 0 ) + ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) ) +ROM_END + +ROM_START( revlatns ) + ROM_REGION( 0x8000, "program", 0 ) + ROM_LOAD( "revelations_prog.bin", 0x0000, 0x8000, CRC(5ab41ac3) SHA1(0f7027551da17011576cf077e2f199729bb10482) ) + + ROM_REGION( 0x8000, "system", 0 ) + ROM_LOAD( "revelations_sys.bin", 0x0000, 0x8000, CRC(43e5e3ec) SHA1(fa44b102b5aa7ad2421c575abdc67f1c29f23bc1) ) +ROM_END + + +GAMEL( 1994, cops, 0, cops, cops, cops_state, cops, ROT0, "Atari Games", "Cops (USA)", GAME_NOT_WORKING | GAME_NO_SOUND, layout_cops ) +GAMEL( 1994, copsuk, cops,cops, cops, cops_state, cops, ROT0, "Nova Productions / Deith Leisure","Cops (UK)", GAME_NOT_WORKING | GAME_NO_SOUND, layout_cops ) +GAMEL( 1994, revlatns, 0, cops, cops, cops_state, cops, ROT0, "Nova Productions", "Revelations", GAME_NOT_WORKING | GAME_NO_SOUND, layout_cops ) diff --git a/src/mame/layout/cops.lay b/src/mame/layout/cops.lay index 73c432bda5e..f1c802aec08 100644 --- a/src/mame/layout/cops.lay +++ b/src/mame/layout/cops.lay @@ -1,11 +1,10 @@ - + - + - diff --git a/src/mame/layout/sc1_vfd.lay b/src/mame/layout/sc1_vfd.lay index 521a3087332..caa63022ff1 100644 --- a/src/mame/layout/sc1_vfd.lay +++ b/src/mame/layout/sc1_vfd.lay @@ -20,7 +20,33 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 22ef0cc5be4..136d2828813 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -7236,8 +7236,10 @@ vcircle // (proto) (c) 1996 a51site4 // ?? (c) 1998 a51site4a // Sept.11,1998 (c) 1998 -// Atari Laserdisc +// Atari/Nova Laserdisc cops // (c) 1994 +copsuk // (c) 1994 (Nova/Deith Leisure) +revlatns // (c) 199? // SNK / Rock-ola games sasuke // [1980] Shin Nihon Kikaku (SNK)