mirror of
https://github.com/holub/mame
synced 2025-05-24 06:30:04 +03:00
Updated firefox to use "new" tms5220 interface
This commit is contained in:
parent
e70cc33bd5
commit
1031a08ed8
@ -304,20 +304,28 @@ static UINT8 riot_porta_r(const device_config *device, UINT8 olddata)
|
|||||||
return (main_to_sound_flag << 7) | (sound_to_main_flag << 6) | 0x10 | (tms5220_readyq_r(tms) << 2);
|
return (main_to_sound_flag << 7) | (sound_to_main_flag << 6) | 0x10 | (tms5220_readyq_r(tms) << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static UINT8 riot_portb_r(const device_config *device, UINT8 olddata)
|
||||||
|
{
|
||||||
|
const device_config *tms = devtag_get_device(device->machine, "tms");
|
||||||
|
return tms5220_status_r(tms, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static void riot_porta_w(const device_config *device, UINT8 newdata, UINT8 olddata)
|
static void riot_porta_w(const device_config *device, UINT8 newdata, UINT8 olddata)
|
||||||
{
|
{
|
||||||
const device_config *tms = devtag_get_device(device->machine, "tms");
|
const device_config *tms = devtag_get_device(device->machine, "tms");
|
||||||
|
|
||||||
/* handle 5220 read */
|
/* handle 5220 read */
|
||||||
if ((olddata & 2) != 0 && (newdata & 2) == 0)
|
tms5220_rsq_w(tms, (newdata>>1) & 1);
|
||||||
riot6532_portb_in_set(device, tms5220_status_r(tms, 0), 0xff);
|
|
||||||
|
|
||||||
/* handle 5220 write */
|
/* handle 5220 write */
|
||||||
if ((olddata & 1) != 0 && (newdata & 1) == 0)
|
tms5220_wsq_w(tms, newdata & 1);
|
||||||
tms5220_data_w(tms, 0, riot6532_portb_out_get(device));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void riot_portb_w(const device_config *device, UINT8 newdata, UINT8 olddata)
|
||||||
|
{
|
||||||
|
const device_config *tms = devtag_get_device(device->machine, "tms");
|
||||||
|
tms5220_data_w(tms, 0, newdata);
|
||||||
|
}
|
||||||
|
|
||||||
static void riot_irq(const device_config *device, int state)
|
static void riot_irq(const device_config *device, int state)
|
||||||
{
|
{
|
||||||
@ -640,9 +648,9 @@ GFXDECODE_END
|
|||||||
static const riot6532_interface riot_intf =
|
static const riot6532_interface riot_intf =
|
||||||
{
|
{
|
||||||
riot_porta_r,
|
riot_porta_r,
|
||||||
NULL,
|
riot_portb_r,
|
||||||
riot_porta_w,
|
riot_porta_w,
|
||||||
NULL,
|
riot_portb_w,
|
||||||
riot_irq
|
riot_irq
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user