apple2: Preliminary support for the Synetix SuperSprite card. [Golden Child, R. Belmont]

This commit is contained in:
arbee 2017-08-30 21:11:18 -04:00
parent d911028081
commit c39d66b671
5 changed files with 212 additions and 0 deletions

View File

@ -1731,6 +1731,8 @@ if (BUSES["A2BUS"]~=null) then
MAME_DIR .. "src/devices/bus/a2bus/agat7langcard.h",
MAME_DIR .. "src/devices/bus/a2bus/agat7ram.cpp",
MAME_DIR .. "src/devices/bus/a2bus/agat7ram.h",
MAME_DIR .. "src/devices/bus/a2bus/ssprite.cpp",
MAME_DIR .. "src/devices/bus/a2bus/ssprite.h",
}
end

View File

@ -0,0 +1,150 @@
// license:BSD-3-Clause
// copyright-holders:R. Belmont, Golden Child
/*********************************************************************
ssprite.cpp
Implementation of the Synetix SuperSprite
*********************************************************************/
#include "emu.h"
#include "ssprite.h"
#include "sound/tms5220.h"
#include "speaker.h"
/***************************************************************************
PARAMETERS
***************************************************************************/
#define TMS_TAG "ssprite_tms"
#define TMS5220_TAG "ssprite_tms5220"
#define AY_TAG "ssprite_ay"
#define SCREEN_TAG "screen"
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
DEFINE_DEVICE_TYPE(A2BUS_SSPRITE, a2bus_ssprite_device, "a2ssprite", "Synetix SuperSprite")
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_MEMBER( a2bus_ssprite_device::device_add_mconfig )
MCFG_DEVICE_ADD( TMS_TAG, TMS9918A, XTAL_10_738635MHz / 2 )
MCFG_TMS9928A_VRAM_SIZE(0x4000) // 16k of VRAM
MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(a2bus_ssprite_device, tms_irq_w))
MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG )
MCFG_SCREEN_UPDATE_DEVICE( TMS_TAG, tms9918a_device, screen_update )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(AY_TAG, AY8912, 1022727)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD(TMS5220_TAG, TMS5220, 640000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
a2bus_ssprite_device(mconfig, A2BUS_SSPRITE, tag, owner, clock)
{
}
a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
device_a2bus_card_interface(mconfig, *this),
m_tms(*this, TMS_TAG),
m_ay(*this, AY_TAG),
m_tms5220(*this, TMS5220_TAG)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void a2bus_ssprite_device::device_start()
{
// set_a2bus_device makes m_slot valid
set_a2bus_device();
}
void a2bus_ssprite_device::device_reset()
{
}
/*
C0nx map: (info from Synetix SuperSprite Owners manual.pdf page 33 of 266)
0 - TMS9918 VDP vram read/write
1 - TMS9918 VDP register write
2 - TMS5220 Speech read/write
3 - Video Switch APPLE VIDEO IN OFF
4 - Video Switch APPLE VIDEO IN ON
5 - Video Switch APPLE ONLY OUT
6 - Video Switch MIX VDP/EXTERNAL VIDEO
7 - TMS 9918 WRITE ONLY/FRAME RESET
C - AY Sound data write
D - AY Sound data write
E - AY Sound register write or data read
F - AY Sound register write or data read
*/
uint8_t a2bus_ssprite_device::read_c0nx(address_space &space, uint8_t offset)
{
switch (offset)
{
case 0:
return m_tms->vram_read(space, 0);
case 1:
return m_tms->register_read(space, 0);
case 2:
return 0x1f | m_tms5220->status_r(space, 0); // copied this line from a2echoii.cpp
case 14:
case 15:
return m_ay->data_r(space, 0);
}
return 0xff;
}
void a2bus_ssprite_device::write_c0nx(address_space &space, uint8_t offset, uint8_t data)
{
switch (offset)
{
case 0:
m_tms->vram_write(space, 0, data);
break;
case 1:
m_tms->register_write(space, 0, data);
break;
case 2:
m_tms5220->data_w(space, offset, data);
break;
case 12 ... 13:
m_ay->data_w(space, 0, data);
break;
case 14:
case 15:
m_ay->address_w(space, 0, data);
break;
}
}
WRITE_LINE_MEMBER( a2bus_ssprite_device::tms_irq_w )
{
if (state)
{
raise_slot_irq();
}
else
{
lower_slot_irq();
}
}

View File

@ -0,0 +1,56 @@
// license:BSD-3-Clause
// copyright-holders:R. Belmont, Golden Child
/*********************************************************************
ssprite.h
Synetix SuperSprite
(code based on Third Millenium Engineering Arcade Board)
*********************************************************************/
#ifndef MAME_BUS_A2BUS_A2SSPRITE_H
#define MAME_BUS_A2BUS_A2SSPRITE_H
#pragma once
#include "a2bus.h"
#include "video/tms9928a.h"
#include "sound/ay8910.h"
#include "sound/tms5220.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class a2bus_ssprite_device:
public device_t,
public device_a2bus_card_interface
{
public:
// construction/destruction
a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
// overrides of standard a2bus slot functions
virtual uint8_t read_c0nx(address_space &space, uint8_t offset) override;
virtual void write_c0nx(address_space &space, uint8_t offset, uint8_t data) override;
private:
DECLARE_WRITE_LINE_MEMBER( tms_irq_w );
required_device<tms9918a_device> m_tms;
required_device<ay8910_device> m_ay;
required_device<tms5220_device> m_tms5220;
};
// device type definition
DECLARE_DEVICE_TYPE(A2BUS_SSPRITE, a2bus_ssprite_device)
#endif // MAME_BUS_A2BUS_SSPRITE_H

View File

@ -76,6 +76,7 @@ II Plus: RAM options reduced to 16/32/48 KB.
#include "bus/a2bus/ramcard128k.h"
#include "bus/a2bus/ramcard16k.h"
#include "bus/a2bus/timemasterho.h"
#include "bus/a2bus/ssprite.h"
#include "screen.h"
#include "softlist.h"
@ -1318,6 +1319,7 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("ezcgi", A2BUS_EZCGI) /* E-Z Color Graphics Interface */
SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */
SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */
SLOT_INTERFACE("ssprite", A2BUS_SSPRITE) /* Synetix SuperSprite Board */
// SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */
SLOT_INTERFACE_END

View File

@ -146,6 +146,7 @@ Address bus A0-A11 is Y0-Y11
#include "bus/a2bus/a2estd80col.h"
#include "bus/a2bus/a2eext80col.h"
#include "bus/a2bus/a2eramworks3.h"
#include "bus/a2bus/ssprite.h"
#include "bus/rs232/rs232.h"
@ -3734,6 +3735,7 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */
// SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */
SLOT_INTERFACE("pcxport", A2BUS_PCXPORTER) /* Applied Engineering PC Transporter */
SLOT_INTERFACE("ssprite", A2BUS_SSPRITE) /* Synetix SuperSprite Board */
SLOT_INTERFACE_END
static SLOT_INTERFACE_START(apple2eaux_cards)