From 470525cbff19cc7d9d5b3d9c53c2ffd7edde3717 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 2 Sep 2017 22:21:21 -0400 Subject: [PATCH] gstriker: Serial link prep (nw) --- src/mame/drivers/gstriker.cpp | 26 ++++++++++++++++++++++---- src/mame/includes/gstriker.h | 9 +++++---- src/mame/video/gstriker.cpp | 11 +++++------ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp index 839b4c0e154..7556e59d07b 100644 --- a/src/mame/drivers/gstriker.cpp +++ b/src/mame/drivers/gstriker.cpp @@ -189,6 +189,12 @@ Frequencies: 68k is XTAL_32MHZ/2 void gstriker_state::machine_start() { membank("soundbank")->configure_entries(0, 8, memregion("audiocpu")->base(), 0x8000); + + if (m_acia.found()) + { + m_acia->write_cts(0); + m_acia->write_dcd(0); + } } /*** SOUND RELATED ***********************************************************/ @@ -240,7 +246,7 @@ GFXDECODE_END -static ADDRESS_MAP_START( gstriker_map, AS_PROGRAM, 16, gstriker_state ) +static ADDRESS_MAP_START( twcup94_map, AS_PROGRAM, 16, gstriker_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, vram_r, vram_w ) AM_RANGE(0x140000, 0x141fff) AM_RAM AM_SHARE("cg10103_m_vram") @@ -251,14 +257,19 @@ static ADDRESS_MAP_START( gstriker_map, AS_PROGRAM, 16, gstriker_state ) AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("zoomtilemap", mb60553_zooming_tilemap_device, regs_r, regs_w ) AM_RANGE(0x200010, 0x200011) AM_WRITENOP AM_RANGE(0x200020, 0x200021) AM_WRITENOP - AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs1") - AM_RANGE(0x200060, 0x20007f) AM_RAM AM_SHARE("mixerregs2") + AM_RANGE(0x200040, 0x20005f) AM_RAM AM_SHARE("mixerregs") AM_RANGE(0x200080, 0x20009f) AM_DEVREADWRITE8("io", vs9209_device, read, write, 0x00ff) AM_RANGE(0x2000a0, 0x2000a1) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("work_ram") ADDRESS_MAP_END +static ADDRESS_MAP_START( gstriker_map, AS_PROGRAM, 16, gstriker_state ) + AM_RANGE(0x200060, 0x200061) AM_DEVREADWRITE8("acia", acia6850_device, status_r, control_w, 0x00ff) + AM_RANGE(0x200062, 0x200063) AM_DEVREADWRITE8("acia", acia6850_device, data_r, data_w, 0x00ff) + AM_IMPORT_FROM(twcup94_map) +ADDRESS_MAP_END + static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gstriker_state ) AM_RANGE(0x0000, 0x77ff) AM_ROM AM_RANGE(0x7800, 0x7fff) AM_RAM @@ -499,6 +510,11 @@ static MACHINE_CONFIG_START( gstriker ) MCFG_DEVICE_ADD("watchdog", MB3773, 0) + MCFG_DEVICE_ADD("acia", ACIA6850, 0) + MCFG_ACIA6850_IRQ_HANDLER(INPUTLINE("maincpu", M68K_IRQ_2)) + //MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("link", rs232_port_device, write_txd)) + //MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE("link", rs232_port_device, write_rts)) + MCFG_SCREEN_ADD("screen", RASTER) // MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) MCFG_SCREEN_REFRESH_RATE(60) @@ -545,12 +561,14 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( twc94, gstriker ) MCFG_CPU_REPLACE("maincpu", M68000, 16000000) - MCFG_CPU_PROGRAM_MAP(gstriker_map) + MCFG_CPU_PROGRAM_MAP(twcup94_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", gstriker_state, irq1_line_hold) MCFG_DEVICE_MODIFY("io") MCFG_VS9209_OUT_PORTH_CB(WRITE8(gstriker_state, twcup94_prot_reg_w)) MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("watchdog", mb3773_device, write_line_ck)) MCFG_DEVCB_BIT(3) + + MCFG_DEVICE_REMOVE("acia") MACHINE_CONFIG_END diff --git a/src/mame/includes/gstriker.h b/src/mame/includes/gstriker.h index 132e2061917..a154e075250 100644 --- a/src/mame/includes/gstriker.h +++ b/src/mame/includes/gstriker.h @@ -4,6 +4,7 @@ #ifndef __GSTRIKER_H #define __GSTRIKER_H +#include "machine/6850acia.h" #include "machine/gen_latch.h" #include "machine/mb3773.h" #include "video/vsystem_spr.h" @@ -28,10 +29,10 @@ public: m_palette(*this, "palette"), m_soundlatch(*this, "soundlatch"), m_watchdog(*this, "watchdog"), + m_acia(*this, "acia"), m_CG10103_m_vram(*this, "cg10103_m_vram"), m_work_ram(*this, "work_ram"), - m_mixerregs1(*this, "mixerregs1"), - m_mixerregs2(*this, "mixerregs2") + m_mixerregs(*this, "mixerregs") { } required_device m_maincpu; @@ -44,13 +45,13 @@ public: required_device m_palette; required_device m_soundlatch; required_device m_watchdog; + optional_device m_acia; required_shared_ptr m_CG10103_m_vram; std::unique_ptr m_buffered_spriteram; std::unique_ptr m_buffered_spriteram2; required_shared_ptr m_work_ram; - required_shared_ptr m_mixerregs1; - required_shared_ptr m_mixerregs2; + required_shared_ptr m_mixerregs; enum { TECMO_WCUP94_MCU = 1, diff --git a/src/mame/video/gstriker.cpp b/src/mame/video/gstriker.cpp index 0e8695ab227..c1919f10727 100644 --- a/src/mame/video/gstriker.cpp +++ b/src/mame/video/gstriker.cpp @@ -35,19 +35,18 @@ WRITE_LINE_MEMBER(gstriker_state::screen_vblank) uint32_t gstriker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(m_mixerregs1[8]&0x07ff, cliprect); // complete guess, causes green behind test grid in twc94 and blue behind title screen on gstriker + bitmap.fill(m_mixerregs[8]&0x07ff, cliprect); // complete guess, causes green behind test grid in twc94 and blue behind title screen on gstriker /* [4] AAAA BBBB ---- ---- sprite priority number A/B? [5] xxxx ---- ---- ---- background layer priority number? [6] xxxx ---- ---- ---- foreground layer priority number? */ -// popmessage("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs1[0],m_mixerregs1[1],m_mixerregs1[2],m_mixerregs1[3],m_mixerregs1[4],m_mixerregs1[5],m_mixerregs1[6],m_mixerregs1[7], m_mixerregs1[8],m_mixerregs1[9],m_mixerregs1[10],m_mixerregs1[11],m_mixerregs1[12],m_mixerregs1[13],m_mixerregs1[14],m_mixerregs1[15] ); -// popmessage("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs2[0],m_mixerregs2[1],m_mixerregs2[2],m_mixerregs2[3],m_mixerregs2[4],m_mixerregs2[5],m_mixerregs2[6],m_mixerregs2[7], m_mixerregs2[8],m_mixerregs2[9],m_mixerregs2[10],m_mixerregs2[11],m_mixerregs2[12],m_mixerregs2[13],m_mixerregs2[14],m_mixerregs2[15] ); +// popmessage("%04x %04x %04x %04x %04x %04x %04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x", m_mixerregs[0],m_mixerregs[1],m_mixerregs[2],m_mixerregs[3],m_mixerregs[4],m_mixerregs[5],m_mixerregs[6],m_mixerregs[7], m_mixerregs[8],m_mixerregs[9],m_mixerregs[10],m_mixerregs[11],m_mixerregs[12],m_mixerregs[13],m_mixerregs[14],m_mixerregs[15] ); - m_spr->set_pal_base( (m_mixerregs1[0]&0xf000)>>8 ); - m_bg->set_pal_base( (m_mixerregs1[1]&0xf000)>>8 ); - m_tx->set_pal_base( (m_mixerregs1[2]&0xf000)>>8 ); + m_spr->set_pal_base( (m_mixerregs[0]&0xf000)>>8 ); + m_bg->set_pal_base( (m_mixerregs[1]&0xf000)>>8 ); + m_tx->set_pal_base( (m_mixerregs[2]&0xf000)>>8 ); // Sandwitched screen/sprite0/score/sprite1. Surely wrong, probably needs sprite orthogonality