revert back to using the old RIOT implementation for the A2600 for now, SuperCharger based titles do not work with the new one, it has been broken since May 22nd.

I've used a compile tile switch, so that it's easier to make comparisons between old / new behavior if anybody is interested in fixing it (nw)
This commit is contained in:
David Haywood 2015-11-05 01:12:28 +00:00
parent ccfd426785
commit cc13f21c9f

View File

@ -10,8 +10,13 @@ TODO:
***************************************************************************/
// the new RIOT does not work with the SuperCharger
// for example "mame64 a2600 scharger -cass offifrog" fails to load after playing the tape
#define USE_NEW_RIOT 0
#include "emu.h"
#include "machine/mos6530n.h"
#include "cpu/m6502/m6507.h"
#include "sound/tiaintf.h"
#include "video/tia.h"
@ -23,10 +28,20 @@ TODO:
#include "bus/vcs/compumat.h"
#include "bus/vcs_ctrl/ctrl.h"
#if USE_NEW_RIOT
#include "machine/mos6530n.h"
#else
#include "machine/6532riot.h"
#endif
#define CONTROL1_TAG "joyport1"
#define CONTROL2_TAG "joyport2"
class a2600_state : public driver_device
{
public:
@ -73,7 +88,12 @@ protected:
required_device<m6507_device> m_maincpu;
required_device<screen_device> m_screen;
required_ioport m_swb;
#if USE_NEW_RIOT
required_device<mos6532_t> m_riot;
#else
required_device<riot6532_device> m_riot;
#endif
};
@ -88,7 +108,11 @@ static const UINT16 supported_screen_heights[4] = { 262, 312, 328, 342 };
static ADDRESS_MAP_START(a2600_mem, AS_PROGRAM, 8, a2600_state ) // 6507 has 13-bit address space, 0x0000 - 0x1fff
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0f00) AM_DEVREADWRITE("tia_video", tia_video_device, read, write)
AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0d00) AM_RAM AM_SHARE("riot_ram")
#if USE_NEW_RIOT
AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d00) AM_DEVICE("riot", mos6532_t, io_map)
#else
AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d00) AM_DEVREADWRITE("riot", riot6532_device, read, write)
#endif
// AM_RANGE(0x1000, 0x1fff) is cart data and it is configured at reset time, depending on the mounted cart!
ADDRESS_MAP_END
@ -116,7 +140,11 @@ READ8_MEMBER(a2600_state::cart_over_all_r)
}
else if (masked_offset < 0x2a0)
{
#if USE_NEW_RIOT
ret = m_riot->io_r(space, masked_offset);
#else
ret = m_riot->read(space, masked_offset);
#endif
}
else if (masked_offset < 0x300)
{
@ -148,7 +176,11 @@ WRITE8_MEMBER(a2600_state::cart_over_all_w)
}
else if (masked_offset < 0x2a0)
{
#if USE_NEW_RIOT
m_riot->io_w(space, masked_offset, data);
#else
m_riot->write(space, masked_offset, data);
#endif
}
else if (masked_offset < 0x300)
{
@ -563,12 +595,21 @@ static MACHINE_CONFIG_START( a2600, a2600_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
/* devices */
#if USE_NEW_RIOT
MCFG_DEVICE_ADD("riot", MOS6532n, MASTER_CLOCK_NTSC / 3)
MCFG_MOS6530n_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_MOS6530n_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_MOS6530n_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_MOS6530n_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_MOS6530n_IRQ_CB(WRITELINE(a2600_state, irq_callback))
MCFG_MOS6530n_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_MOS6530n_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_MOS6530n_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_MOS6530n_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_MOS6530n_IRQ_CB(WRITELINE(a2600_state, irq_callback))
#else
MCFG_DEVICE_ADD("riot", RIOT6532, MASTER_CLOCK_NTSC / 3)
MCFG_RIOT6532_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_RIOT6532_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_RIOT6532_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_RIOT6532_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_RIOT6532_IRQ_CB(WRITELINE(a2600_state, irq_callback))
#endif
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
@ -604,12 +645,21 @@ static MACHINE_CONFIG_START( a2600p, a2600_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
/* devices */
MCFG_DEVICE_ADD("riot", MOS6532n, MASTER_CLOCK_PAL / 3)
MCFG_MOS6530n_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_MOS6530n_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_MOS6530n_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_MOS6530n_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_MOS6530n_IRQ_CB(WRITELINE(a2600_state, irq_callback))
#if USE_NEW_RIOT
MCFG_DEVICE_ADD("riot", MOS6532n, MASTER_CLOCK_PAL / 3)
MCFG_MOS6530n_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_MOS6530n_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_MOS6530n_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_MOS6530n_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_MOS6530n_IRQ_CB(WRITELINE(a2600_state, irq_callback))
#else
MCFG_DEVICE_ADD("riot", RIOT6532, MASTER_CLOCK_PAL / 3)
MCFG_RIOT6532_IN_PA_CB(READ8(a2600_state, switch_A_r))
MCFG_RIOT6532_OUT_PA_CB(WRITE8(a2600_state, switch_A_w))
MCFG_RIOT6532_IN_PB_CB(READ8(a2600_state, riot_input_port_8_r))
MCFG_RIOT6532_OUT_PB_CB(WRITE8(a2600_state, switch_B_w))
MCFG_RIOT6532_IRQ_CB(WRITELINE(a2600_state, irq_callback))
#endif
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)