Renamed 6821new.* -> 6821pia.*

Renamed pia_* functions to pia6821_*

Fixed a couple of compiler errors.
This commit is contained in:
Aaron Giles 2009-03-03 06:58:07 +00:00
parent 9fbb1e6d7b
commit 8dd5d2b953
45 changed files with 434 additions and 434 deletions

4
.gitattributes vendored
View File

@ -565,8 +565,8 @@ src/emu/machine/6526cia.c svneol=native#text/plain
src/emu/machine/6526cia.h svneol=native#text/plain
src/emu/machine/6532riot.c svneol=native#text/plain
src/emu/machine/6532riot.h svneol=native#text/plain
src/emu/machine/6821new.c svneol=native#text/plain
src/emu/machine/6821new.h svneol=native#text/plain
src/emu/machine/6821pia.c svneol=native#text/plain
src/emu/machine/6821pia.h svneol=native#text/plain
src/emu/machine/6840ptm.c svneol=native#text/plain
src/emu/machine/6840ptm.h svneol=native#text/plain
src/emu/machine/6850acia.c svneol=native#text/plain

View File

@ -110,7 +110,7 @@ EMUMACHINEOBJS = \
$(EMUMACHINE)/6532riot.o \
$(EMUMACHINE)/6522via.o \
$(EMUMACHINE)/6526cia.o \
$(EMUMACHINE)/6821new.o \
$(EMUMACHINE)/6821pia.o \
$(EMUMACHINE)/6840ptm.o \
$(EMUMACHINE)/6850acia.o \
$(EMUMACHINE)/68681.o \

View File

@ -4,7 +4,7 @@
**********************************************************************/
#include "6821new.h"
#include "6821pia.h"
/***************************************************************************
@ -428,7 +428,7 @@ static void set_out_cb2(const device_config *device, int data)
{
pia6821 *p = get_token(device);
int z = pianew_get_output_cb2_z(device);
int z = pia6821_get_output_cb2_z(device);
if ((data != p->out_cb2) || (z != p->last_out_cb2_z))
{
@ -552,7 +552,7 @@ static UINT8 control_a_r(const device_config *device)
/* update CA1 & CA2 if callback exists, these in turn may update IRQ's */
if (p->in_ca1_func.read != NULL)
pia_ca1_w(device, 0, devcb_call_read_line(&p->in_ca1_func));
pia6821_ca1_w(device, 0, devcb_call_read_line(&p->in_ca1_func));
else if (!p->logged_ca1_not_connected && (!p->in_ca1_pushed))
{
logerror("PIA #%s: Warning! No CA1 read handler. Assuming pin not connected\n", device->tag);
@ -560,7 +560,7 @@ static UINT8 control_a_r(const device_config *device)
}
if (p->in_ca2_func.read != NULL)
pia_ca2_w(device, 0, devcb_call_read_line(&p->in_ca2_func));
pia6821_ca2_w(device, 0, devcb_call_read_line(&p->in_ca2_func));
else if ( !p->logged_ca2_not_connected && C2_INPUT(p->ctl_a) && !p->in_ca2_pushed)
{
logerror("PIA #%s: Warning! No CA2 read handler. Assuming pin not connected\n", device->tag);
@ -594,7 +594,7 @@ static UINT8 control_b_r(const device_config *device)
/* update CB1 & CB2 if callback exists, these in turn may update IRQ's */
if (p->in_cb1_func.read != NULL)
pia_cb1_w(device, 0, devcb_call_read_line(&p->in_cb1_func));
pia6821_cb1_w(device, 0, devcb_call_read_line(&p->in_cb1_func));
else if (!p->logged_cb1_not_connected && !p->in_cb1_pushed)
{
logerror("PIA #%s: Error! no CB1 read handler. Three-state pin is undefined\n", device->tag);
@ -602,7 +602,7 @@ static UINT8 control_b_r(const device_config *device)
}
if (p->in_cb2_func.read != NULL)
pia_cb2_w(device, 0, devcb_call_read_line(&p->in_cb2_func));
pia6821_cb2_w(device, 0, devcb_call_read_line(&p->in_cb2_func));
else if (!p->logged_cb2_not_connected && C2_INPUT(p->ctl_b) && !p->in_cb2_pushed)
{
logerror("PIA #%s: Error! No CB2 read handler. Three-state pin is undefined\n", device->tag);
@ -626,10 +626,10 @@ static UINT8 control_b_r(const device_config *device)
/*-------------------------------------------------
pia_r
pia6821_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_r)
READ8_DEVICE_HANDLER( pia6821_r )
{
pia6821 *p = get_token(device);
UINT8 ret;
@ -665,20 +665,20 @@ READ8_DEVICE_HANDLER(pia_r)
/*-------------------------------------------------
pia_alt_r
pia6821_alt_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_alt_r)
READ8_DEVICE_HANDLER( pia6821_alt_r )
{
return pia_r(device, ((offset << 1) & 0x02) | ((offset >> 1) & 0x01));
return pia6821_r(device, ((offset << 1) & 0x02) | ((offset >> 1) & 0x01));
}
/*-------------------------------------------------
pianew_get_port_b_z_mask
pia6821_get_port_b_z_mask
-------------------------------------------------*/
UINT8 pianew_get_port_b_z_mask(const device_config *device)
UINT8 pia6821_get_port_b_z_mask(const device_config *device)
{
pia6821 *p = get_token(device);
return ~p->ddr_b;
@ -894,10 +894,10 @@ static void control_b_w(const device_config *device, UINT8 data)
/*-------------------------------------------------
pia_w
pia6821_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_w)
WRITE8_DEVICE_HANDLER( pia6821_w )
{
pia6821 *p = get_token(device);
@ -930,20 +930,20 @@ WRITE8_DEVICE_HANDLER(pia_w)
/*-------------------------------------------------
pia_alt_w
pia6821_alt_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_alt_w)
WRITE8_DEVICE_HANDLER( pia6821_alt_w )
{
pia_w(device, ((offset << 1) & 0x02) | ((offset >> 1) & 0x01), data);
pia6821_w(device, ((offset << 1) & 0x02) | ((offset >> 1) & 0x01), data);
}
/*-------------------------------------------------
pianew_set_port_a_z_mask
pia6821_set_port_a_z_mask
-------------------------------------------------*/
void pianew_set_port_a_z_mask(const device_config *device, UINT8 data)
void pia6821_set_port_a_z_mask(const device_config *device, UINT8 data)
{
pia6821 *p = get_token(device);
@ -952,10 +952,10 @@ void pianew_set_port_a_z_mask(const device_config *device, UINT8 data)
/*-------------------------------------------------
pia_porta_r
pia6821_porta_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_porta_r)
READ8_DEVICE_HANDLER( pia6821_porta_r )
{
pia6821 *p = get_token(device);
@ -964,14 +964,14 @@ READ8_DEVICE_HANDLER(pia_porta_r)
/*-------------------------------------------------
pianew_set_input_a
pia6821_set_input_a
-------------------------------------------------*/
void pianew_set_input_a(const device_config *device, UINT8 data, UINT8 z_mask)
void pia6821_set_input_a(const device_config *device, UINT8 data, UINT8 z_mask)
{
pia6821 *p = get_token(device);
assert_always(p->in_a_func.read == NULL, "pia_porta_w() called when in_a_func implemented");
assert_always(p->in_a_func.read == NULL, "pia6821_porta_w() called when in_a_func implemented");
LOG(("PIA #%s: set input port A = %02X\n", device->tag, data));
@ -982,20 +982,20 @@ void pianew_set_input_a(const device_config *device, UINT8 data, UINT8 z_mask)
/*-------------------------------------------------
pia_porta_w
pia6821_porta_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_porta_w)
WRITE8_DEVICE_HANDLER( pia6821_porta_w )
{
pianew_set_input_a(device, data, 0);
pia6821_set_input_a(device, data, 0);
}
/*-------------------------------------------------
pianew_get_output_a
pia6821_get_output_a
-------------------------------------------------*/
UINT8 pianew_get_output_a(const device_config *device)
UINT8 pia6821_get_output_a(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1006,10 +1006,10 @@ UINT8 pianew_get_output_a(const device_config *device)
/*-------------------------------------------------
pia_ca1_r
pia6821_ca1_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_ca1_r)
READ8_DEVICE_HANDLER( pia6821_ca1_r )
{
pia6821 *p = get_token(device);
@ -1018,10 +1018,10 @@ READ8_DEVICE_HANDLER(pia_ca1_r)
/*-------------------------------------------------
pia_ca1_w
pia6821_ca1_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_ca1_w)
WRITE8_DEVICE_HANDLER( pia6821_ca1_w )
{
pia6821 *p = get_token(device);
@ -1054,10 +1054,10 @@ WRITE8_DEVICE_HANDLER(pia_ca1_w)
/*-------------------------------------------------
pia_ca2_r
pia6821_ca2_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_ca2_r)
READ8_DEVICE_HANDLER( pia6821_ca2_r )
{
pia6821 *p = get_token(device);
@ -1066,10 +1066,10 @@ READ8_DEVICE_HANDLER(pia_ca2_r)
/*-------------------------------------------------
pia_ca2_w
pia6821_ca2_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_ca2_w)
WRITE8_DEVICE_HANDLER( pia6821_ca2_w )
{
pia6821 *p = get_token(device);
@ -1099,10 +1099,10 @@ WRITE8_DEVICE_HANDLER(pia_ca2_w)
/*-------------------------------------------------
pianew_get_output_ca2
pia6821_get_output_ca2
-------------------------------------------------*/
int pianew_get_output_ca2(const device_config *device)
int pia6821_get_output_ca2(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1113,12 +1113,12 @@ int pianew_get_output_ca2(const device_config *device)
/*-------------------------------------------------
pianew_get_output_ca2_z - version of
pianew_get_output_ca2, which takes account of internal
pia6821_get_output_ca2_z - version of
pia6821_get_output_ca2, which takes account of internal
pullup resistor
-------------------------------------------------*/
int pianew_get_output_ca2_z(const device_config *device)
int pia6821_get_output_ca2_z(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1132,10 +1132,10 @@ int pianew_get_output_ca2_z(const device_config *device)
/*-------------------------------------------------
pia_portb_r
pia6821_portb_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_portb_r)
READ8_DEVICE_HANDLER( pia6821_portb_r )
{
pia6821 *p = get_token(device);
@ -1144,10 +1144,10 @@ READ8_DEVICE_HANDLER(pia_portb_r)
/*-------------------------------------------------
pia_portb_w
pia6821_portb_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_portb_w)
WRITE8_DEVICE_HANDLER( pia6821_portb_w )
{
pia6821 *p = get_token(device);
@ -1161,10 +1161,10 @@ WRITE8_DEVICE_HANDLER(pia_portb_w)
/*-------------------------------------------------
pianew_get_output_b
pia6821_get_output_b
-------------------------------------------------*/
UINT8 pianew_get_output_b(const device_config *device)
UINT8 pia6821_get_output_b(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1175,10 +1175,10 @@ UINT8 pianew_get_output_b(const device_config *device)
/*-------------------------------------------------
pia_cb1_r
pia6821_cb1_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_cb1_r)
READ8_DEVICE_HANDLER( pia6821_cb1_r )
{
pia6821 *p = get_token(device);
@ -1187,10 +1187,10 @@ READ8_DEVICE_HANDLER(pia_cb1_r)
/*-------------------------------------------------
pia_cb1_w
pia6821_cb1_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_cb1_w)
WRITE8_DEVICE_HANDLER( pia6821_cb1_w )
{
pia6821 *p = get_token(device);
@ -1224,10 +1224,10 @@ WRITE8_DEVICE_HANDLER(pia_cb1_w)
/*-------------------------------------------------
pia_cb2_r
pia6821_cb2_r
-------------------------------------------------*/
READ8_DEVICE_HANDLER(pia_cb2_r)
READ8_DEVICE_HANDLER( pia6821_cb2_r )
{
pia6821 *p = get_token(device);
@ -1236,10 +1236,10 @@ READ8_DEVICE_HANDLER(pia_cb2_r)
/*-------------------------------------------------
pia_cb2_w
pia6821_cb2_w
-------------------------------------------------*/
WRITE8_DEVICE_HANDLER(pia_cb2_w)
WRITE8_DEVICE_HANDLER( pia6821_cb2_w )
{
pia6821 *p = get_token(device);
@ -1269,10 +1269,10 @@ WRITE8_DEVICE_HANDLER(pia_cb2_w)
/*-------------------------------------------------
pianew_get_output_cb2
pia6821_get_output_cb2
-------------------------------------------------*/
int pianew_get_output_cb2(const device_config *device)
int pia6821_get_output_cb2(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1283,10 +1283,10 @@ int pianew_get_output_cb2(const device_config *device)
/*-------------------------------------------------
pianew_get_output_cb2_z
pia6821_get_output_cb2_z
-------------------------------------------------*/
int pianew_get_output_cb2_z(const device_config *device)
int pia6821_get_output_cb2_z(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1295,10 +1295,10 @@ int pianew_get_output_cb2_z(const device_config *device)
/*-------------------------------------------------
pianew_get_irq_a
pia6821_get_irq_a
-------------------------------------------------*/
int pianew_get_irq_a(const device_config *device)
int pia6821_get_irq_a(const device_config *device)
{
pia6821 *p = get_token(device);
@ -1307,10 +1307,10 @@ int pianew_get_irq_a(const device_config *device)
/*-------------------------------------------------
pianew_get_irq_b
pia6821_get_irq_b
-------------------------------------------------*/
int pianew_get_irq_b(const device_config *device)
int pia6821_get_irq_b(const device_config *device)
{
pia6821 *p = get_token(device);

View File

@ -3,12 +3,12 @@
Motorola 6821 PIA interface and emulation
Notes:
* pia_get_port_b_z_mask() gives the caller the bitmask
* pia6821_get_port_b_z_mask() gives the caller the bitmask
that show which bits are high-impendance when
reading port B, thus neither 0 or 1.
pia_get_output_cb2_z() returns the same
pia6821_get_output_cb2_z() returns the same
information for the CB2 pin
* pia_set_port_a_z_mask allows the input callback to
* pia6821_set_port_a_z_mask allows the input callback to
indicate which port A bits are disconnected.
For these bit, the read operation will return the
output buffer's contents
@ -61,45 +61,45 @@ struct _pia6821_interface
PROTOTYPES
***************************************************************************/
DEVICE_GET_INFO(pia6821);
DEVICE_GET_INFO(pia6822);
DEVICE_GET_INFO( pia6821 );
DEVICE_GET_INFO( pia6822 );
READ8_DEVICE_HANDLER(pia_r);
WRITE8_DEVICE_HANDLER(pia_w);
READ8_DEVICE_HANDLER( pia6821_r );
WRITE8_DEVICE_HANDLER( pia6821_w );
READ8_DEVICE_HANDLER(pia_alt_r);
WRITE8_DEVICE_HANDLER(pia_alt_w);
READ8_DEVICE_HANDLER( pia6821_alt_r );
WRITE8_DEVICE_HANDLER( pia6821_alt_w );
UINT8 pianew_get_port_b_z_mask(const device_config *device); /* see first note */
void pianew_set_port_a_z_mask(const device_config *device, UINT8 data); /* see second note */
UINT8 pia6821_get_port_b_z_mask(const device_config *device); /* see first note */
void pia6821_set_port_a_z_mask(const device_config *device, UINT8 data); /* see second note */
READ8_DEVICE_HANDLER(pia_porta_r);
WRITE8_DEVICE_HANDLER(pia_porta_w);
void pianew_set_input_a(const device_config *device, UINT8 data, UINT8 z_mask);
UINT8 pianew_get_output_a(const device_config *device);
READ8_DEVICE_HANDLER( pia6821_porta_r );
WRITE8_DEVICE_HANDLER( pia6821_porta_w );
void pia6821_set_input_a(const device_config *device, UINT8 data, UINT8 z_mask);
UINT8 pia6821_get_output_a(const device_config *device);
READ8_DEVICE_HANDLER(pia_ca1_r);
WRITE8_DEVICE_HANDLER(pia_ca1_w);
READ8_DEVICE_HANDLER( pia6821_ca1_r );
WRITE8_DEVICE_HANDLER( pia6821_ca1_w );
READ8_DEVICE_HANDLER(pia_ca2_r);
WRITE8_DEVICE_HANDLER(pia_ca2_w);
int pianew_get_output_ca2(const device_config *device);
int pianew_get_output_ca2_z(const device_config *device);
READ8_DEVICE_HANDLER( pia6821_ca2_r );
WRITE8_DEVICE_HANDLER( pia6821_ca2_w );
int pia6821_get_output_ca2(const device_config *device);
int pia6821_get_output_ca2_z(const device_config *device);
READ8_DEVICE_HANDLER(pia_portb_r);
WRITE8_DEVICE_HANDLER(pia_portb_w);
UINT8 pianew_get_output_b(const device_config *device);
READ8_DEVICE_HANDLER( pia6821_portb_r );
WRITE8_DEVICE_HANDLER( pia6821_portb_w );
UINT8 pia6821_get_output_b(const device_config *device);
READ8_DEVICE_HANDLER(pia_cb1_r);
WRITE8_DEVICE_HANDLER(pia_cb1_w);
READ8_DEVICE_HANDLER( pia6821_cb1_r );
WRITE8_DEVICE_HANDLER( pia6821_cb1_w );
READ8_DEVICE_HANDLER(pia_cb2_r);
WRITE8_DEVICE_HANDLER(pia_cb2_w);
int pianew_get_output_cb2(const device_config *device);
int pianew_get_output_cb2_z(const device_config *device);
READ8_DEVICE_HANDLER( pia6821_cb2_r );
WRITE8_DEVICE_HANDLER( pia6821_cb2_w );
int pia6821_get_output_cb2(const device_config *device);
int pia6821_get_output_cb2_z(const device_config *device);
int pianew_get_irq_a(const device_config *device);
int pianew_get_irq_b(const device_config *device);
int pia6821_get_irq_a(const device_config *device);
int pia6821_get_irq_b(const device_config *device);
/***************************************************************************

View File

@ -9,7 +9,7 @@
#include "machine/rescap.h"
#include "streams.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/6532riot.h"
#include "sound/hc55516.h"
#include "sound/5220intf.h"
@ -114,7 +114,7 @@ static double freq_to_step;
static WRITE_LINE_DEVICE_HANDLER( update_irq_state )
{
const device_config *pia = devtag_get_device(device->machine, "pia1");
cpu_set_input_line(device->machine->cpu[1], M6502_IRQ_LINE, (pianew_get_irq_b(pia) | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(device->machine->cpu[1], M6502_IRQ_LINE, (pia6821_get_irq_b(pia) | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
}
@ -707,10 +707,10 @@ static const pia6821_interface venture_pia0_intf =
DEVCB_NULL, /* line CB1 in */
DEVCB_NULL, /* line CA2 in */
DEVCB_NULL, /* line CB2 in */
DEVCB_DEVICE_HANDLER("pia1", pia_portb_w), /* port A out */
DEVCB_DEVICE_HANDLER("pia1", pia_porta_w), /* port B out */
DEVCB_DEVICE_HANDLER("pia1", pia_cb1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("pia1", pia_ca1_w), /* port CB2 out */
DEVCB_DEVICE_HANDLER("pia1", pia6821_portb_w), /* port A out */
DEVCB_DEVICE_HANDLER("pia1", pia6821_porta_w), /* port B out */
DEVCB_DEVICE_HANDLER("pia1", pia6821_cb1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("pia1", pia6821_ca1_w), /* port CB2 out */
DEVCB_NULL, /* IRQA */
DEVCB_NULL /* IRQB */
};
@ -724,10 +724,10 @@ static const pia6821_interface venture_pia1_intf =
DEVCB_NULL, /* line CB1 in */
DEVCB_NULL, /* line CA2 in */
DEVCB_NULL, /* line CB2 in */
DEVCB_DEVICE_HANDLER("pia0", pia_portb_w), /* port A out */
DEVCB_DEVICE_HANDLER("pia0", pia_porta_w), /* port B out */
DEVCB_DEVICE_HANDLER("pia0", pia_cb1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("pia0", pia_ca1_w), /* port CB2 out */
DEVCB_DEVICE_HANDLER("pia0", pia6821_portb_w), /* port A out */
DEVCB_DEVICE_HANDLER("pia0", pia6821_porta_w), /* port B out */
DEVCB_DEVICE_HANDLER("pia0", pia6821_cb1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("pia0", pia6821_ca1_w), /* port CB2 out */
DEVCB_NULL, /* IRQA */
DEVCB_LINE(update_irq_state) /* IRQB */
};
@ -799,7 +799,7 @@ static ADDRESS_MAP_START( venture_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0780) AM_RAM
AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_DEVREADWRITE("riot", riot6532_r, riot6532_w)
AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1800, 0x1803) AM_MIRROR(0x07fc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x2000, 0x27ff) AM_WRITE(exidy_sound_filter_w)
AM_RANGE(0x2800, 0x2807) AM_MIRROR(0x07f8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)
@ -901,11 +901,11 @@ static UINT8 victory_sound_response_ack_clk; /* 7474 @ F4 */
READ8_HANDLER( victory_sound_response_r )
{
const device_config *pia1 = devtag_get_device(space->machine, "pia1");
UINT8 ret = pianew_get_output_b(pia1);
UINT8 ret = pia6821_get_output_b(pia1);
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound response read = %02X\n", cpu_get_previouspc(space->cpu), ret);
pia_cb1_w(pia1, 0, 0);
pia6821_cb1_w(pia1, 0, 0);
return ret;
}
@ -914,7 +914,7 @@ READ8_HANDLER( victory_sound_response_r )
READ8_HANDLER( victory_sound_status_r )
{
const device_config *pia1 = devtag_get_device(space->machine, "pia1");
UINT8 ret = (pia_ca1_r(pia1, 0) << 7) | (pia_cb1_r(pia1, 0) << 6);
UINT8 ret = (pia6821_ca1_r(pia1, 0) << 7) | (pia6821_cb1_r(pia1, 0) << 6);
if (VICTORY_LOG_SOUND) logerror("%04X:!!!! Sound status read = %02X\n", cpu_get_previouspc(space->cpu), ret);
@ -925,8 +925,8 @@ READ8_HANDLER( victory_sound_status_r )
static TIMER_CALLBACK( delayed_command_w )
{
const device_config *pia1 = devtag_get_device(machine, "pia1");
pianew_set_input_a(pia1, param, 0);
pia_ca1_w(pia1, 0, 0);
pia6821_set_input_a(pia1, param, 0);
pia6821_ca1_w(pia1, 0, 0);
}
WRITE8_HANDLER( victory_sound_command_w )
@ -941,7 +941,7 @@ static WRITE8_DEVICE_HANDLER( victory_sound_irq_clear_w )
{
if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound IRQ clear = %02X\n", cpuexec_describe_context(device->machine), data);
if (!data) pia_ca1_w(device, 0, 1);
if (!data) pia6821_ca1_w(device, 0, 1);
}
@ -950,7 +950,7 @@ static WRITE8_DEVICE_HANDLER( victory_main_ack_w )
if (VICTORY_LOG_SOUND) logerror("%s:!!!! Sound Main ACK W = %02X\n", cpuexec_describe_context(device->machine), data);
if (victory_sound_response_ack_clk && !data)
pia_cb1_w(device, 0, 1);
pia6821_cb1_w(device, 0, 1);
victory_sound_response_ack_clk = data;
}
@ -994,12 +994,12 @@ static DEVICE_RESET( victory_sound )
/* the flip-flop @ F4 is reset */
victory_sound_response_ack_clk = 0;
pia_cb1_w(pia1, 0, 1);
pia6821_cb1_w(pia1, 0, 1);
/* these two lines shouldn't be needed, but it avoids the log entry
as the sound CPU checks port A before the main CPU ever writes to it */
pianew_set_input_a(pia1, 0, 0);
pia_ca1_w(pia1, 0, 1);
pia6821_set_input_a(pia1, 0, 0);
pia6821_ca1_w(pia1, 0, 1);
}
@ -1024,7 +1024,7 @@ static DEVICE_GET_INFO( victory_sound )
static ADDRESS_MAP_START( victory_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0f00) AM_RAM
AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_DEVREADWRITE("riot", riot6532_r, riot6532_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x0ffc) AM_READWRITE(exidy_sh8253_r, exidy_sh8253_w)
AM_RANGE(0x4000, 0x4fff) AM_NOP
AM_RANGE(0x5000, 0x5007) AM_MIRROR(0x0ff8) AM_READWRITE(exidy_sh6840_r, exidy_sh6840_w)

View File

@ -506,7 +506,7 @@ static WRITE8_DEVICE_HANDLER( csdeluxe_porta_w )
static WRITE8_DEVICE_HANDLER( csdeluxe_portb_w )
{
UINT8 z_mask = pianew_get_port_b_z_mask(device);
UINT8 z_mask = pia6821_get_port_b_z_mask(device);
dacval = (dacval & ~0x003) | (data >> 6);
dac_signed_data_16_w(devtag_get_device(device->machine, "csddac"), dacval << 6);
@ -517,7 +517,7 @@ static WRITE8_DEVICE_HANDLER( csdeluxe_portb_w )
static WRITE_LINE_DEVICE_HANDLER( csdeluxe_irq )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
cpu_set_input_line(csdeluxe_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -526,8 +526,8 @@ static TIMER_CALLBACK( csdeluxe_delayed_data_w )
{
const device_config *pia = devtag_get_device(machine, "csdpia");
pia_portb_w(pia, 0, param & 0x0f);
pia_ca1_w(pia, 0, ~param & 0x10);
pia6821_portb_w(pia, 0, param & 0x0f);
pia6821_ca1_w(pia, 0, ~param & 0x10);
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
@ -541,17 +541,17 @@ static READ16_DEVICE_HANDLER( csdeluxe_pia_r )
/* using the MOVEP instruction outputs the same value on the high and */
/* low bytes. */
if (ACCESSING_BITS_8_15)
return pia_alt_r(device, offset) << 8;
return pia6821_alt_r(device, offset) << 8;
else
return pia_alt_r(device, offset);
return pia6821_alt_r(device, offset);
}
static WRITE16_DEVICE_HANDLER( csdeluxe_pia_w )
{
if (ACCESSING_BITS_8_15)
pia_alt_w(device, offset, data >> 8);
pia6821_alt_w(device, offset, data >> 8);
else
pia_alt_w(device, offset, data);
pia6821_alt_w(device, offset, data);
}
@ -644,7 +644,7 @@ static WRITE8_DEVICE_HANDLER( soundsgood_porta_w )
static WRITE8_DEVICE_HANDLER( soundsgood_portb_w )
{
UINT8 z_mask = pianew_get_port_b_z_mask(device);
UINT8 z_mask = pia6821_get_port_b_z_mask(device);
dacval = (dacval & ~0x003) | (data >> 6);
dac_signed_data_16_w(devtag_get_device(device->machine, "sgdac"), dacval << 6);
@ -655,7 +655,7 @@ static WRITE8_DEVICE_HANDLER( soundsgood_portb_w )
static WRITE_LINE_DEVICE_HANDLER( soundsgood_irq )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
cpu_set_input_line(soundsgood_sound_cpu, 4, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -664,8 +664,8 @@ static TIMER_CALLBACK( soundsgood_delayed_data_w )
{
const device_config *pia = devtag_get_device(machine, "sgpia");
pia_portb_w(pia, 0, (param >> 1) & 0x0f);
pia_ca1_w(pia, 0, ~param & 0x01);
pia6821_portb_w(pia, 0, (param >> 1) & 0x0f);
pia6821_ca1_w(pia, 0, ~param & 0x01);
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
@ -698,7 +698,7 @@ static ADDRESS_MAP_START( soundsgood_map, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0x7ffff)
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("sgpia", pia_alt_r, pia_alt_w, 0xff00)
AM_RANGE(0x060000, 0x060007) AM_DEVREADWRITE8("sgpia", pia6821_alt_r, pia6821_alt_w, 0xff00)
AM_RANGE(0x070000, 0x070fff) AM_RAM
ADDRESS_MAP_END
@ -759,7 +759,7 @@ static WRITE8_DEVICE_HANDLER( turbocs_portb_w )
static WRITE_LINE_DEVICE_HANDLER( turbocs_irq )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
cpu_set_input_line(turbocs_sound_cpu, M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -768,8 +768,8 @@ static TIMER_CALLBACK( turbocs_delayed_data_w )
{
const device_config *pia = devtag_get_device(machine, "tcspia");
pia_portb_w(pia, 0, (param >> 1) & 0x0f);
pia_ca1_w(pia, 0, ~param & 0x01);
pia6821_portb_w(pia, 0, (param >> 1) & 0x0f);
pia6821_ca1_w(pia, 0, ~param & 0x01);
/* oftentimes games will write one nibble at a time; the sync on this is very */
/* important, so we boost the interleave briefly while this happens */
@ -800,7 +800,7 @@ void turbocs_reset_w(running_machine *machine, int state)
static ADDRESS_MAP_START( turbocs_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("tcspia", pia_alt_r, pia_alt_w)
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("tcspia", pia6821_alt_r, pia6821_alt_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -874,18 +874,18 @@ static WRITE8_DEVICE_HANDLER( squawkntalk_portb2_w )
tms5220_data_w(tms, offset, squawkntalk_tms_command);
/* DoT expects the ready line to transition on a command/write here, so we oblige */
pia_ca2_w(device, 0, 1);
pia_ca2_w(device, 0, 0);
pia6821_ca2_w(device, 0, 1);
pia6821_ca2_w(device, 0, 0);
}
/* read strobe -- read the current status from the TMS5200 */
else if (((data ^ squawkntalk_tms_strobes) & 0x01) && !(data & 0x01))
{
pia_porta_w(device, 0, tms5220_status_r(tms, offset));
pia6821_porta_w(device, 0, tms5220_status_r(tms, offset));
/* DoT expects the ready line to transition on a command/write here, so we oblige */
pia_ca2_w(device, 0, 1);
pia_ca2_w(device, 0, 0);
pia6821_ca2_w(device, 0, 1);
pia6821_ca2_w(device, 0, 0);
}
/* remember the state */
@ -896,7 +896,7 @@ static WRITE_LINE_DEVICE_HANDLER( squawkntalk_irq )
{
const device_config *pia0 = devtag_get_device(device->machine, "sntpia0");
const device_config *pia1 = devtag_get_device(device->machine, "sntpia1");
int combined_state = pianew_get_irq_a(pia0) | pianew_get_irq_b(pia0) | pianew_get_irq_a(pia1) | pianew_get_irq_b(pia1);
int combined_state = pia6821_get_irq_a(pia0) | pia6821_get_irq_b(pia0) | pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1);
cpu_set_input_line(squawkntalk_sound_cpu, M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -905,8 +905,8 @@ static TIMER_CALLBACK( squawkntalk_delayed_data_w )
{
const device_config *pia0 = devtag_get_device(machine, "sntpia0");
pia_porta_w(pia0, 0, ~param & 0x0f);
pia_cb1_w(pia0, 0, ~param & 0x10);
pia6821_porta_w(pia0, 0, ~param & 0x0f);
pia6821_cb1_w(pia0, 0, ~param & 0x10);
}
@ -930,8 +930,8 @@ void squawkntalk_reset_w(running_machine *machine, int state)
static ADDRESS_MAP_START( squawkntalk_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia0", pia_r, pia_w)
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia1", pia_r, pia_w)
AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia0", pia6821_r, pia6821_w)
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x4f6c) AM_DEVREADWRITE("sntpia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x1fff) AM_MIRROR(0x4000) AM_WRITE(squawkntalk_dac_w)
AM_RANGE(0x8000, 0xbfff) AM_MIRROR(0x4000) AM_ROM
ADDRESS_MAP_END
@ -942,8 +942,8 @@ ADDRESS_MAP_END
ADDRESS_MAP_START( squawkntalk_alt_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia0", pia_r, pia_w)
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia1", pia_r, pia_w)
AM_RANGE(0x0080, 0x0083) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia0", pia6821_r, pia6821_w)
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x676c) AM_DEVREADWRITE("sntpia1", pia6821_r, pia6821_w)
AM_RANGE(0x0800, 0x0fff) AM_MIRROR(0x6000) AM_WRITE(squawkntalk_dac_w)
AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x6000) AM_ROM
ADDRESS_MAP_END

View File

@ -6,7 +6,7 @@
***************************************************************************/
#include "machine/6821new.h"
#include "machine/6821pia.h"

View File

@ -102,7 +102,7 @@ static WRITE8_DEVICE_HANDLER( sndpia_2_warning_w )
static TIMER_CALLBACK( deferred_sndpia1_porta_w )
{
const device_config *device = ptr;
pia_porta_w(device, 0, param);
pia6821_porta_w(device, 0, param);
}
@ -129,7 +129,7 @@ static WRITE8_DEVICE_HANDLER( slither_coinctl_w )
static WRITE_LINE_DEVICE_HANDLER( qix_pia_dint )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
/* DINT is connected to the data CPU's IRQ line */
cputag_set_input_line(device->machine, "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -138,7 +138,7 @@ static WRITE_LINE_DEVICE_HANDLER( qix_pia_dint )
static WRITE_LINE_DEVICE_HANDLER( qix_pia_sint )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
/* SINT is connected to the sound CPU's IRQ line */
cputag_set_input_line(device->machine, "audiocpu", M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -154,8 +154,8 @@ static WRITE_LINE_DEVICE_HANDLER( qix_pia_sint )
static ADDRESS_MAP_START( audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x5ffc) AM_DEVREADWRITE("sndpia2", pia_r, pia_w)
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("sndpia1", pia_r, pia_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x5ffc) AM_DEVREADWRITE("sndpia2", pia6821_r, pia6821_w)
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x3ffc) AM_DEVREADWRITE("sndpia1", pia6821_r, pia6821_w)
AM_RANGE(0xd000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -177,7 +177,7 @@ static const pia6821_interface qixsnd_pia_0_intf =
DEVCB_NULL, /* line CB2 in */
DEVCB_DEVICE_HANDLER("sndpia1", sync_sndpia1_porta_w), /* port A out */
DEVCB_DEVICE_HANDLER("discrete", qix_vol_w), /* port B out */
DEVCB_DEVICE_HANDLER("sndpia1", pia_ca1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("sndpia1", pia6821_ca1_w), /* line CA2 out */
DEVCB_HANDLER(qix_flip_screen_w), /* port CB2 out */
DEVCB_LINE(qix_pia_dint), /* IRQA */
DEVCB_LINE(qix_pia_dint) /* IRQB */
@ -191,9 +191,9 @@ static const pia6821_interface qixsnd_pia_1_intf =
DEVCB_NULL, /* line CB1 in */
DEVCB_NULL, /* line CA2 in */
DEVCB_NULL, /* line CB2 in */
DEVCB_DEVICE_HANDLER("sndpia0", pia_porta_w), /* port A out */
DEVCB_DEVICE_HANDLER("sndpia0", pia6821_porta_w), /* port A out */
DEVCB_DEVICE_HANDLER("discrete", qix_dac_w), /* port B out */
DEVCB_DEVICE_HANDLER("sndpia0", pia_ca1_w), /* line CA2 out */
DEVCB_DEVICE_HANDLER("sndpia0", pia6821_ca1_w), /* line CA2 out */
DEVCB_NULL, /* line CB2 out */
DEVCB_LINE(qix_pia_sint), /* IRQA */
DEVCB_LINE(qix_pia_sint) /* IRQB */

View File

@ -12,7 +12,7 @@
#include "cpu/m6502/m6502.h"
#include "machine/rescap.h"
#include "cpu/i8085/i8085.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/ay8910.h"
#include "sound/hc55516.h"
#include "redalert.h"
@ -353,7 +353,7 @@ static WRITE8_DEVICE_HANDLER( demoneye_ay8910_data_w )
static ADDRESS_MAP_START( demoneye_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x0500, 0x0503) AM_DEVREADWRITE("sndpia", pia_r, pia_w)
AM_RANGE(0x0500, 0x0503) AM_DEVREADWRITE("sndpia", pia6821_r, pia6821_w)
AM_RANGE(0x2000, 0x3fff) AM_ROM
ADDRESS_MAP_END

View File

@ -6,7 +6,7 @@
#include "driver.h"
#include "sound/discrete.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "includes/spiders.h"
@ -172,8 +172,8 @@ DISCRETE_SOUND_END
WRITE8_DEVICE_HANDLER( spiders_audio_command_w )
{
pianew_set_input_a(device, data & 0xf8, 0);
pia_ca1_w(device, 0, data & 0x80 ? 1 : 0);
pia6821_set_input_a(device, data & 0xf8, 0);
pia6821_ca1_w(device, 0, data & 0x80 ? 1 : 0);
}

View File

@ -23,7 +23,7 @@
****************************************************************************/
#include "driver.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "cpu/m6809/m6809.h"
#include "williams.h"
#include "sound/2151intf.h"
@ -98,7 +98,7 @@ static WRITE8_HANDLER( narc_slave_sync_w );
static ADDRESS_MAP_START( williams_cvsd_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x1800) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x1ffe) AM_DEVREADWRITE("ym", ym2151_r, ym2151_w)
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("cvsdpia", pia_r, pia_w)
AM_RANGE(0x4000, 0x4003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("cvsdpia", pia6821_r, pia6821_w)
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x07ff) AM_DEVWRITE("cvsd", cvsd_digit_clock_clear_w)
AM_RANGE(0x6800, 0x6800) AM_MIRROR(0x07ff) AM_DEVWRITE("cvsd", cvsd_clock_set_w)
AM_RANGE(0x7800, 0x7800) AM_MIRROR(0x07ff) AM_WRITE(cvsd_bank_select_w)
@ -289,7 +289,7 @@ void williams_cvsd_init(running_machine *machine)
memory_set_bank(machine, 5, 0);
/* reset the IRQ state */
pia_ca1_w(devtag_get_device(machine, "cvsdpia"), 0, 1);
pia6821_ca1_w(devtag_get_device(machine, "cvsdpia"), 0, 1);
/* register for save states */
state_save_register_global(machine, williams_sound_int_state);
@ -408,7 +408,7 @@ static void init_audio_state(running_machine *machine)
static void cvsd_ym2151_irq(const device_config *device, int state)
{
pia_ca1_w(devtag_get_device(device->machine, "cvsdpia"), 0, !state);
pia6821_ca1_w(devtag_get_device(device->machine, "cvsdpia"), 0, !state);
}
@ -473,9 +473,9 @@ static WRITE8_DEVICE_HANDLER( cvsd_clock_set_w )
static TIMER_CALLBACK( williams_cvsd_delayed_data_w )
{
const device_config *pia = devtag_get_device(machine, "cvsdpia");
pia_portb_w(pia, 0, param & 0xff);
pia_cb1_w(pia, 0, (param >> 8) & 1);
pia_cb2_w(pia, 0, (param >> 9) & 1);
pia6821_portb_w(pia, 0, param & 0xff);
pia6821_cb1_w(pia, 0, (param >> 8) & 1);
pia6821_cb2_w(pia, 0, (param >> 9) & 1);
}

View File

@ -624,7 +624,7 @@
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "sound/ay8910.h"
@ -750,8 +750,8 @@ static ADDRESS_MAP_START( sys903_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_address_data_w)
AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x08d0, 0x08d0) AM_DEVREADWRITE("acia6850_0", acia6850_stat_r, acia6850_ctrl_w)
AM_RANGE(0x08d1, 0x08d1) AM_DEVREADWRITE("acia6850_0", acia6850_data_r, acia6850_data_w)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(calomega_videoram_w) AM_BASE(&videoram)
@ -765,8 +765,8 @@ static ADDRESS_MAP_START( s903mod_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_address_data_w)
AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(calomega_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(calomega_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x1800, 0xffff) AM_ROM
@ -778,8 +778,8 @@ static ADDRESS_MAP_START( sys905_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1040, 0x1041) AM_DEVWRITE("ay8912", ay8910_address_data_w)
AM_RANGE(0x1080, 0x1080) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x1081, 0x1081) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x10c4, 0x10c7) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x10c8, 0x10cb) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x10c4, 0x10c7) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x10c8, 0x10cb) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x2000, 0x23ff) AM_RAM_WRITE(calomega_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x2400, 0x27ff) AM_RAM_WRITE(calomega_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2800, 0xffff) AM_ROM

View File

@ -18,7 +18,7 @@
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "carpolo.h"
@ -33,8 +33,8 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x01ff) AM_RAM
AM_RANGE(0x3000, 0x30ff) AM_WRITEONLY AM_BASE(&carpolo_alpharam)
AM_RANGE(0x4000, 0x400f) AM_WRITEONLY AM_BASE(&carpolo_spriteram)
AM_RANGE(0x5400, 0x5403) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x5800, 0x5803) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x5400, 0x5403) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x5800, 0x5803) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0xa000, 0xa000) AM_READ(carpolo_ball_screen_collision_cause_r)
AM_RANGE(0xa001, 0xa001) AM_READ(carpolo_car_ball_collision_x_r)
AM_RANGE(0xa002, 0xa002) AM_READ(carpolo_car_ball_collision_y_r)

View File

@ -24,7 +24,7 @@ x
#include "driver.h"
#include "cpu/z80/z80.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "video/mc6845.h"
#include "sound/ay8910.h"
@ -199,10 +199,10 @@ static ADDRESS_MAP_START( quizmstr_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x03) AM_WRITE(question_w)
AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay", ay8910_address_data_w)
AM_RANGE(0x41, 0x41) AM_DEVREAD("ay", ay8910_r)
AM_RANGE(0x48, 0x4b) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x48, 0x4b) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x50, 0x53) AM_READNOP
AM_RANGE(0x50, 0x53) AM_WRITENOP
AM_RANGE(0x58, 0x5b) AM_DEVREADWRITE("pia2", pia_r, pia_w)
AM_RANGE(0x58, 0x5b) AM_DEVREADWRITE("pia2", pia6821_r, pia6821_w)
AM_RANGE(0x70, 0x70) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x71, 0x71) AM_DEVWRITE("crtc", mc6845_register_w)
AM_RANGE(0xc0, 0xc3) AM_READNOP
@ -217,9 +217,9 @@ static ADDRESS_MAP_START( trailblz_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x41, 0x41) AM_DEVWRITE("crtc", mc6845_register_w)
AM_RANGE(0x48, 0x49) AM_DEVWRITE("ay", ay8910_address_data_w)
AM_RANGE(0x49, 0x49) AM_DEVREAD("ay", ay8910_r)
AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("pia0", pia_r, pia_w) //?
AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x70, 0x73) AM_DEVREADWRITE("pia2", pia_r, pia_w)
AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w) //?
AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x70, 0x73) AM_DEVREADWRITE("pia2", pia6821_r, pia6821_w)
AM_RANGE(0xc1, 0xc3) AM_WRITENOP
ADDRESS_MAP_END
@ -251,9 +251,9 @@ static ADDRESS_MAP_START( pokeroul_io_map, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x41, 0x41) AM_DEVWRITE("crtc", mc6845_register_w)
AM_RANGE(0x48, 0x49) AM_DEVWRITE("ay", ay8910_address_data_w)
AM_RANGE(0x49, 0x49) AM_DEVREAD("ay", ay8910_r)
AM_RANGE(0x58, 0x5b) AM_DEVREADWRITE("pia0", pia_r, pia_w) /* confirmed */
AM_RANGE(0x68, 0x6b) AM_DEVREADWRITE("pia1", pia_r, pia_w) /* confirmed */
AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE("pia2", pia_r, pia_w) /* confirmed */
AM_RANGE(0x58, 0x5b) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w) /* confirmed */
AM_RANGE(0x68, 0x6b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w) /* confirmed */
AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE("pia2", pia6821_r, pia6821_w) /* confirmed */
AM_RANGE(0xc0, 0xc1) AM_READ(ff_r) /* needed to boot */
ADDRESS_MAP_END

View File

@ -130,7 +130,7 @@
#include "deprecat.h"
#include "exidy.h"
#include "targ.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
static UINT8 last_dial;
@ -256,14 +256,14 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( venture_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4800, 0x4fff) AM_RAM AM_BASE(&exidy_characterram)
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( pepper2_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x4800, 0x4fff) AM_NOP
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -275,7 +275,7 @@ static ADDRESS_MAP_START( fax_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1c00, 0x1c00) AM_READ_PORT("IN3")
AM_RANGE(0x2000, 0x2000) AM_WRITE(fax_bank_select_w)
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1)
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x5200, 0x520f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x5213, 0x5217) AM_WRITE(SMH_NOP) /* empty control lines on color/sound board */
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE(&exidy_characterram)
AM_RANGE(0x8000, 0xffff) AM_ROM

View File

@ -1034,7 +1034,7 @@
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/ay8910.h"
#include "machine/eeprom.h"
#include "funworld.lh"
@ -1085,8 +1085,8 @@ static WRITE8_DEVICE_HANDLER(pia1_ca2_w)
static ADDRESS_MAP_START( funworld_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_address_data_w)
AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_address_w)
@ -1100,8 +1100,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( magicrd2_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_address_data_w)
AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_address_w)
@ -1116,8 +1116,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cuoreuno_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_address_data_w)
AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_address_w)
@ -1131,8 +1131,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( royalmcu_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x2a00, 0x2a03) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x2a00, 0x2a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x2c00, 0x2c00) AM_DEVREAD("ay8910", ay8910_r)
AM_RANGE(0x2c00, 0x2c01) AM_DEVWRITE("ay8910", ay8910_address_data_w)
AM_RANGE(0x2e00, 0x2e00) AM_DEVWRITE("crtc", mc6845_address_w)

View File

@ -605,7 +605,7 @@
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/discrete.h"
#include "pmpoker.lh"
@ -882,8 +882,8 @@ static ADDRESS_MAP_START( goldnpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(goldnpkr_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(goldnpkr_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x4000, 0x7fff) AM_ROM
@ -894,8 +894,8 @@ static ADDRESS_MAP_START( pottnpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(goldnpkr_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(goldnpkr_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2000, 0x3fff) AM_ROM
@ -906,8 +906,8 @@ static ADDRESS_MAP_START( witchcrd_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x0848, 0x084b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(goldnpkr_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(goldnpkr_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x2000, 0x2000) AM_READ_PORT("SW2")

View File

@ -499,7 +499,7 @@
#include "cpu/m68000/m68000.h"
#include "cpu/hd6309/hd6309.h"
#include "cpu/m6809/m6809.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/6522via.h"
#include "machine/ticket.h"
#include "video/tms34061.h"
@ -991,7 +991,7 @@ static ADDRESS_MAP_START( sound3812_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym", ym3812_r, ym3812_w)
AM_RANGE(0x3000, 0x37ff) AM_RAM
AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("oki", okim6295_r, okim6295_w)
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("pia", pia_r, pia_w)
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("pia", pia6821_r, pia6821_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -93,7 +93,7 @@
#include "driver.h"
#include "cpu/m6809/m6809.h"
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
/*************************
@ -176,8 +176,8 @@ static ADDRESS_MAP_START( jokrwild_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_WRITE(jokrwild_videoram_w) AM_BASE(&videoram)
AM_RANGE(0x2000, 0x27ff) AM_RAM AM_WRITE(jokrwild_colorram_w) AM_BASE(&colorram)
// AM_RANGE(0x0010, 0x0010) AM_READ(random_gen_r)
// AM_RANGE(0x4004, 0x4007) AM_DEVREADWRITE("pia0", pia_r, pia_w)
// AM_RANGE(0x4008, 0x400b) AM_DEVREADWRITE("pia1", pia_r, pia_w)
// AM_RANGE(0x4004, 0x4007) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
// AM_RANGE(0x4008, 0x400b) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
// AM_RANGE(0x4010, 0x4010) AM_READNOP /* R ???? */
AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0x6001, 0x6001) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)

View File

@ -19,7 +19,7 @@ TODO:
#include "driver.h"
#include "cpu/m6800/m6800.h"
#include "cpu/s2650/s2650.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "video/s2636.h"
#include "sound/ay8910.h"
#include "sound/sn76477.h"
@ -217,7 +217,7 @@ ADDRESS_MAP_END
// the same as in zaccaria.c ?
static ADDRESS_MAP_START( catnmous_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia", pia_r, pia_w)
AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia", pia6821_r, pia6821_w)
AM_RANGE(0xf000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -680,7 +680,7 @@ static INTERRUPT_GEN( zaccaria_cb1_toggle )
const device_config *pia = devtag_get_device(device->machine, "pia");
static int toggle;
pia_cb1_w(pia,0,toggle & 1);
pia6821_cb1_w(pia,0,toggle & 1);
toggle ^= 1;
}

View File

@ -19,7 +19,7 @@
#include "includes/atari.h"
#include "sound/speaker.h"
#include "sound/pokey.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "video/gtia.h"
#include "maxaflex.lh"
@ -244,7 +244,7 @@ static ADDRESS_MAP_START(a600xl_mem, ADDRESS_SPACE_PROGRAM, 8)
AM_RANGE(0xd000, 0xd0ff) AM_READWRITE(atari_gtia_r, atari_gtia_w)
AM_RANGE(0xd100, 0xd1ff) AM_NOP
AM_RANGE(0xd200, 0xd2ff) AM_DEVREADWRITE("pokey", pokey_r, pokey_w)
AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia_alt_r, pia_alt_w)
AM_RANGE(0xd300, 0xd3ff) AM_DEVREADWRITE("pia", pia6821_alt_r, pia6821_alt_w)
AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(atari_antic_r, atari_antic_w)
AM_RANGE(0xd500, 0xd7ff) AM_NOP
AM_RANGE(0xd800, 0xffff) AM_ROM /* OS */

View File

@ -13,7 +13,7 @@
#include "driver.h"
#include "cpu/m6809/m6809.h"
#include "video/awpvid.h" //Fruit Machines Only
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/68681.h"
#include "machine/meters.h"
#include "machine/roc10937.h" // vfd
@ -763,8 +763,8 @@ static ADDRESS_MAP_START( m1_memmap, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2090, 0x2091) AM_DEVWRITE("ay", ay8910_address_data_w)
AM_RANGE(0x20B0, 0x20B0) AM_DEVREAD("ay", ay8910_r)
AM_RANGE(0x20A0, 0x20A3) AM_DEVWRITE("pia", pia_w)
AM_RANGE(0x20A0, 0x20A3) AM_DEVREAD("pia", pia_r)
AM_RANGE(0x20A0, 0x20A3) AM_DEVWRITE("pia", pia6821_w)
AM_RANGE(0x20A0, 0x20A3) AM_DEVREAD("pia", pia6821_r)
AM_RANGE(0x20C0, 0x20C7) AM_WRITE(m1_latch_w)

View File

@ -128,7 +128,7 @@ Find lamps/reels after UPD changes.
#include "cpu/m68000/m68000.h"
#include "video/awpvid.h"
#include "cpu/mcs51/mcs51.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/68681.h"
#include "sound/2413intf.h"
#include "sound/upd7759.h"
@ -647,7 +647,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x86000e, 0x86000f) AM_WRITE(vsync_int_ctrl)
AM_RANGE(0x880000, 0x89ffff) AM_READWRITE(i82716_r, i82716_w)
AM_RANGE(0x8a0000, 0x8a001f) AM_DEVREADWRITE8( "duart68681", duart68681_r, duart68681_w, 0xff)
AM_RANGE(0x8c0000, 0x8c000f) AM_DEVREADWRITE8("pia", pia_r, pia_w, 0xff)
AM_RANGE(0x8c0000, 0x8c000f) AM_DEVREADWRITE8("pia", pia6821_r, pia6821_w, 0xff)
ADDRESS_MAP_END

View File

@ -334,9 +334,9 @@ static ADDRESS_MAP_START( zwackery_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x080000, 0x080fff) AM_RAM
AM_RANGE(0x084000, 0x084fff) AM_RAM
AM_RANGE(0x100000, 0x10000f) AM_READWRITE(zwackery_6840_r, mcr68_6840_upper_w)
AM_RANGE(0x104000, 0x104007) AM_DEVREADWRITE8("pia0", pia_r, pia_w, 0xff00)
AM_RANGE(0x108000, 0x108007) AM_DEVREADWRITE8("pia1", pia_r, pia_w, 0x00ff)
AM_RANGE(0x10c000, 0x10c007) AM_DEVREADWRITE8("pia2", pia_r, pia_w, 0x00ff)
AM_RANGE(0x104000, 0x104007) AM_DEVREADWRITE8("pia0", pia6821_r, pia6821_w, 0xff00)
AM_RANGE(0x108000, 0x108007) AM_DEVREADWRITE8("pia1", pia6821_r, pia6821_w, 0x00ff)
AM_RANGE(0x10c000, 0x10c007) AM_DEVREADWRITE8("pia2", pia6821_r, pia6821_w, 0x00ff)
AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(zwackery_videoram_w) AM_BASE(&videoram16) AM_SIZE(&videoram_size)
AM_RANGE(0x802000, 0x803fff) AM_RAM_WRITE(zwackery_paletteram_w) AM_BASE(&paletteram16)
AM_RANGE(0xc00000, 0xc00fff) AM_RAM_WRITE(zwackery_spriteram_w) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)

View File

@ -243,7 +243,7 @@ TODO: - Fix lamp timing, MAME doesn't update fast enough to see everything
- Distinguish door switches using manual
***********************************************************************************************************/
#include "driver.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/6840ptm.h"
#include "deprecat.h"
@ -454,12 +454,12 @@ static WRITE_LINE_DEVICE_HANDLER( cpu0_irq )
const device_config *pia8 = devtag_get_device(device->machine, "pia_ic8");
/* The PIA and PTM IRQ lines are all connected to a common PCB track, leading directly to the 6809 IRQ line. */
int combined_state = pianew_get_irq_a(pia3) | pianew_get_irq_b(pia3) |
pianew_get_irq_a(pia4) | pianew_get_irq_b(pia4) |
pianew_get_irq_a(pia5) | pianew_get_irq_b(pia5) |
pianew_get_irq_a(pia6) | pianew_get_irq_b(pia6) |
pianew_get_irq_a(pia7) | pianew_get_irq_b(pia7) |
pianew_get_irq_a(pia8) | pianew_get_irq_b(pia8) |
int combined_state = pia6821_get_irq_a(pia3) | pia6821_get_irq_b(pia3) |
pia6821_get_irq_a(pia4) | pia6821_get_irq_b(pia4) |
pia6821_get_irq_a(pia5) | pia6821_get_irq_b(pia5) |
pia6821_get_irq_a(pia6) | pia6821_get_irq_b(pia6) |
pia6821_get_irq_a(pia7) | pia6821_get_irq_b(pia7) |
pia6821_get_irq_a(pia8) | pia6821_get_irq_b(pia8) |
ptm6840_get_irq(0);
if (!serial_card_connected)
@ -506,7 +506,7 @@ static WRITE8_HANDLER( ic2_o1_callback )
static WRITE8_HANDLER( ic2_o2_callback )
{
const device_config *pia = devtag_get_device(space->machine, "pia_ic3");
pia_ca1_w(pia, 0, data); /* copy output value to IC3 ca1 */
pia6821_ca1_w(pia, 0, data); /* copy output value to IC3 ca1 */
/* the output from timer2 is the input clock for timer3 */
ptm6840_set_c3( space->machine, 0, data);
@ -678,12 +678,12 @@ static READ8_DEVICE_HANDLER( pia_ic4_portb_r )
if ( serial_data )
{
ic4_input_b |= 0x80;
pia_cb1_w(device, 0, 1);
pia6821_cb1_w(device, 0, 1);
}
else
{
ic4_input_b &= ~0x80;
pia_cb1_w(device, 0, 0);
pia6821_cb1_w(device, 0, 0);
}
if ( optic_pattern & 0x01 ) ic4_input_b |= 0x40; /* reel A tab */
@ -706,14 +706,14 @@ static READ8_DEVICE_HANDLER( pia_ic4_portb_r )
if ( lamp_undercurrent ) ic4_input_b |= 0x01;
#endif
LOG_IC3(("%04x IC4 PIA Read of Port B %x\n",cpuexec_describe_context(device->machine),ic4_input_b));
LOG_IC3(("%s: IC4 PIA Read of Port B %x\n",cpuexec_describe_context(device->machine),ic4_input_b));
return ic4_input_b;
}
static WRITE_LINE_DEVICE_HANDLER( pia_ic4_ca2_w )
{
LOG_IC3(("%04x IC4 PIA Write CA (input MUX strobe /LED B), %02X\n", cpuexec_describe_context(device->machine),state));
LOG_IC3(("%s: IC4 PIA Write CA (input MUX strobe /LED B), %02X\n", cpuexec_describe_context(device->machine),state));
IC23GB = state;
ic23_update();
@ -740,7 +740,7 @@ static const pia6821_interface pia_ic4_intf =
/* IC5, AUX ports, coin lockouts and AY sound chip select (MODs below 4 only) */
static READ8_DEVICE_HANDLER( pia_ic5_porta_r )
{
LOG(("%04x IC5 PIA Read of Port A (AUX1)\n",cpuexec_describe_context(device->machine)));
LOG(("%s: IC5 PIA Read of Port A (AUX1)\n",cpuexec_describe_context(device->machine)));
return input_port_read(device->machine, "AUX1");
}
@ -748,18 +748,18 @@ static READ8_DEVICE_HANDLER( pia_ic5_porta_r )
static READ8_DEVICE_HANDLER( pia_ic5_portb_r )
{
const device_config *pia_ic5 = devtag_get_device(device->machine, "pia_ic5");
LOG(("%04x IC5 PIA Read of Port B (coin input AUX2)\n",cpuexec_describe_context(device->machine)));
coin_lockout_w(0, (pianew_get_output_b(pia_ic5) & 0x01) );
coin_lockout_w(1, (pianew_get_output_b(pia_ic5) & 0x02) );
coin_lockout_w(2, (pianew_get_output_b(pia_ic5) & 0x04) );
coin_lockout_w(3, (pianew_get_output_b(pia_ic5) & 0x08) );
LOG(("%s: IC5 PIA Read of Port B (coin input AUX2)\n",cpuexec_describe_context(device->machine)));
coin_lockout_w(0, (pia6821_get_output_b(pia_ic5) & 0x01) );
coin_lockout_w(1, (pia6821_get_output_b(pia_ic5) & 0x02) );
coin_lockout_w(2, (pia6821_get_output_b(pia_ic5) & 0x04) );
coin_lockout_w(3, (pia6821_get_output_b(pia_ic5) & 0x08) );
return input_port_read(device->machine, "AUX2");
}
static WRITE_LINE_DEVICE_HANDLER( pia_ic5_ca2_w )
{
LOG(("%04x IC5 PIA Write CA2 (Serial Tx) %2x\n",cpuexec_describe_context(device->machine),state));
LOG(("%s: IC5 PIA Write CA2 (Serial Tx) %2x\n",cpuexec_describe_context(device->machine),state));
serial_data = state;
}
@ -789,7 +789,7 @@ BDIR BC1 |
/* PSG function selected */
static void update_ay(const device_config *device)
{
if (!pianew_get_output_cb2(device))
if (!pia6821_get_output_cb2(device))
{
switch (ay8913_address)
{
@ -801,14 +801,14 @@ static void update_ay(const device_config *device)
case 0x01:
{ /* CA2 = 1 CB2 = 0? : Read from selected PSG register and make the register data available to Port A */
const device_config *pia_ic6 = devtag_get_device(device->machine, "pia_ic6");
LOG(("AY8913 address = %d \n",pianew_get_output_a(pia_ic6)&0x0f));
LOG(("AY8913 address = %d \n",pia6821_get_output_a(pia_ic6)&0x0f));
break;
}
case 0x02:
{/* CA2 = 0 CB2 = 1? : Write to selected PSG register and write data to Port A */
const device_config *pia_ic6 = devtag_get_device(device->machine, "pia_ic6");
const device_config *ay = devtag_get_device(device->machine, "ay8913");
ay8910_data_w(ay, 0, pianew_get_output_a(pia_ic6));
ay8910_data_w(ay, 0, pia6821_get_output_a(pia_ic6));
LOG(("AY Chip Write \n"));
break;
}
@ -817,7 +817,7 @@ static void update_ay(const device_config *device)
The register will remain selected until another is chosen.*/
const device_config *pia_ic6 = devtag_get_device(device->machine, "pia_ic6");
const device_config *ay = devtag_get_device(device->machine, "ay8913");
ay8910_address_w(ay, 0, pianew_get_output_a(pia_ic6));
ay8910_address_w(ay, 0, pia6821_get_output_a(pia_ic6));
LOG(("AY Chip Select \n"));
break;
}
@ -856,11 +856,11 @@ static const pia6821_interface pia_ic5_intf =
/* IC6, Reel A and B and AY registers (MODs below 4 only) */
static WRITE8_DEVICE_HANDLER( pia_ic6_portb_w )
{
LOG(("%04x IC6 PIA Port B Set to %2x (Reel A and B)\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: IC6 PIA Port B Set to %2x (Reel A and B)\n", cpuexec_describe_context(device->machine),data));
stepper_update(0, data & 0x0F );
stepper_update(1, (data>>4) & 0x0F );
/* if ( pia_get_output_cb2(1)) */
/* if ( pia6821_get_output_cb2(1)) */
{
if ( stepper_optic_state(0) ) optic_pattern |= 0x01;
else optic_pattern &= ~0x01;
@ -875,7 +875,7 @@ static WRITE8_DEVICE_HANDLER( pia_ic6_portb_w )
static WRITE8_DEVICE_HANDLER( pia_ic6_porta_w )
{
LOG(("%04x IC6 PIA Write A %2x\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: IC6 PIA Write A %2x\n", cpuexec_describe_context(device->machine),data));
if (mod_number <4)
{
ay_data = data;
@ -886,7 +886,7 @@ static WRITE8_DEVICE_HANDLER( pia_ic6_porta_w )
static WRITE_LINE_DEVICE_HANDLER( pia_ic6_ca2_w )
{
LOG(("%04x IC6 PIA write CA2 %2x (AY8913 BC1)\n", cpuexec_describe_context(device->machine),state));
LOG(("%s: IC6 PIA write CA2 %2x (AY8913 BC1)\n", cpuexec_describe_context(device->machine),state));
if (mod_number <4)
{
if ( state ) ay8913_address |= 0x01;
@ -898,7 +898,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia_ic6_ca2_w )
static WRITE_LINE_DEVICE_HANDLER( pia_ic6_cb2_w )
{
LOG(("%04x IC6 PIA write CB2 %2x (AY8913 BCDIR)\n", cpuexec_describe_context(device->machine),state));
LOG(("%s: IC6 PIA write CB2 %2x (AY8913 BCDIR)\n", cpuexec_describe_context(device->machine),state));
if (mod_number <4)
{
if ( state ) ay8913_address |= 0x02;
@ -928,11 +928,11 @@ static const pia6821_interface pia_ic6_intf =
/* IC7 Reel C and D, mechanical meters/Reel E and F, input strobe bit A */
static WRITE8_DEVICE_HANDLER( pia_ic7_porta_w )
{
LOG(("%04x IC7 PIA Port A Set to %2x (Reel C and D)\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: IC7 PIA Port A Set to %2x (Reel C and D)\n", cpuexec_describe_context(device->machine),data));
stepper_update(2, data & 0x0F );
stepper_update(3, (data >> 4)& 0x0F );
/* if ( pia_get_output_cb2(1)) */
/* if ( pia6821_get_output_cb2(1)) */
{
if ( stepper_optic_state(2) ) optic_pattern |= 0x04;
else optic_pattern &= ~0x04;
@ -961,22 +961,22 @@ all eight meters are driven from this port, giving the 8 line driver chip
mmtr_data = data;
if (mmtr_data)
{
pia_portb_w(device, 0, mmtr_data | 0x80);
pia6821_portb_w(device, 0, mmtr_data | 0x80);
for (meter = 0; meter < 8; meter ++)
if (mmtr_data & (1 << meter)) Mechmtr_update(meter, cycles, mmtr_data & (1 << meter));
}
else
{
pia_portb_w(device, 0, mmtr_data &~0x80);
pia6821_portb_w(device, 0, mmtr_data &~0x80);
}
LOG(("%04x IC7 PIA Port B Set to %2x (Meters, Reel E and F)\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: IC7 PIA Port B Set to %2x (Meters, Reel E and F)\n", cpuexec_describe_context(device->machine),data));
}
static WRITE_LINE_DEVICE_HANDLER( pia_ic7_ca2_w )
{
LOG(("%04x IC7 PIA write CA2 %2x (input strobe bit 0 / LED A)\n", cpuexec_describe_context(device->machine),state));
LOG(("%s: IC7 PIA write CA2 %2x (input strobe bit 0 / LED A)\n", cpuexec_describe_context(device->machine),state));
IC23GA = state;
ic24_setup();
@ -991,10 +991,10 @@ is on PB7. */
UINT64 cycles = cputag_get_total_cycles(device->machine, "maincpu");
if (state)
{
pia_portb_w(device, 0, mmtr_data|0x80);
pia6821_portb_w(device, 0, mmtr_data|0x80);
Mechmtr_update(7, cycles, state );
}
LOG(("%04x IC7 PIA write CB2 %2x \n", cpuexec_describe_context(device->machine),state));
LOG(("%s: IC7 PIA write CB2 %2x \n", cpuexec_describe_context(device->machine),state));
}
@ -1021,11 +1021,11 @@ static READ8_DEVICE_HANDLER( pia_ic8_porta_r )
static const char *const portnames[] = { "ORANGE1", "ORANGE2", "BLACK1", "BLACK2", "ORANGE1", "ORANGE2", "DIL1", "DIL2" };
const device_config *pia_ic5 = devtag_get_device(device->machine, "pia_ic5");
LOG_IC8(("%04x IC8 PIA Read of Port A (MUX input data)\n", cpuexec_describe_context(device->machine)));
LOG_IC8(("%s: IC8 PIA Read of Port A (MUX input data)\n", cpuexec_describe_context(device->machine)));
/* The orange inputs are polled twice as often as the black ones, for reasons of efficiency.
This is achieved via connecting every input line to an AND gate, thus allowing two strobes
to represent each orange input bank (strobes are active low). */
pia_cb1_w(pia_ic5, 0, (input_port_read(device->machine, "AUX2") & 0x80));
pia6821_cb1_w(pia_ic5, 0, (input_port_read(device->machine, "AUX2") & 0x80));
return input_port_read(device->machine, portnames[input_strobe]);
}
@ -1033,7 +1033,7 @@ static READ8_DEVICE_HANDLER( pia_ic8_porta_r )
static WRITE8_DEVICE_HANDLER( pia_ic8_portb_w )
{
int i;
LOG_IC8(("%04x IC8 PIA Port B Set to %2x (OUTPUT PORT, TRIACS)\n", cpuexec_describe_context(device->machine),data));
LOG_IC8(("%s: IC8 PIA Port B Set to %2x (OUTPUT PORT, TRIACS)\n", cpuexec_describe_context(device->machine),data));
for (i = 0; i < 8; i++)
if ( data & (1 << i) ) output_set_indexed_value("triac", i, data & (1 << i));
}
@ -1041,7 +1041,7 @@ static WRITE8_DEVICE_HANDLER( pia_ic8_portb_w )
static WRITE_LINE_DEVICE_HANDLER( pia_ic8_ca2_w )
{
LOG_IC8(("%04x IC8 PIA write CA2 (input_strobe bit 2 / LED C) %02X\n", cpuexec_describe_context(device->machine), state & 0xFF));
LOG_IC8(("%s: IC8 PIA write CA2 (input_strobe bit 2 / LED C) %02X\n", cpuexec_describe_context(device->machine), state & 0xFF));
IC23GC = state;
ic23_update();
@ -1050,7 +1050,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia_ic8_ca2_w )
static WRITE_LINE_DEVICE_HANDLER( pia_ic8_cb2_w )
{
LOG_IC8(("%04x IC8 PIA write CB2 (alpha clock) %02X\n", cpuexec_describe_context(device->machine), state & 0xFF));
LOG_IC8(("%s: IC8 PIA write CB2 (alpha clock) %02X\n", cpuexec_describe_context(device->machine), state & 0xFF));
if ( !alpha_clock && (state) )
{
@ -1082,7 +1082,7 @@ static WRITE8_DEVICE_HANDLER( pia_gb_porta_w )
{
const device_config *msm6376 = devtag_get_device(device->machine, "msm6376");
LOG(("%04x GAMEBOARD: PIA Port A Set to %2x\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: GAMEBOARD: PIA Port A Set to %2x\n", cpuexec_describe_context(device->machine),data));
okim6376_w(msm6376, 0, data);
}
@ -1090,7 +1090,7 @@ static WRITE8_DEVICE_HANDLER( pia_gb_portb_w )
{
int changed = expansion_latch^data;
LOG(("%04x GAMEBOARD: PIA Port B Set to %2x\n", cpuexec_describe_context(device->machine),data));
LOG(("%s: GAMEBOARD: PIA Port B Set to %2x\n", cpuexec_describe_context(device->machine),data));
expansion_latch = data;
@ -1117,7 +1117,7 @@ static WRITE8_DEVICE_HANDLER( pia_gb_portb_w )
}
static READ8_DEVICE_HANDLER( pia_gb_portb_r )
{
LOG(("%04x GAMEBOARD: PIA Read of Port B\n",cpuexec_describe_context(device->machine)));
LOG(("%s: GAMEBOARD: PIA Read of Port B\n",cpuexec_describe_context(device->machine)));
//
// b7, 1 = OKI ready, 0 = OKI busy
// b5, vol clock
@ -1133,7 +1133,7 @@ static READ8_DEVICE_HANDLER( pia_gb_portb_r )
static WRITE_LINE_DEVICE_HANDLER( pia_gb_ca2_w )
{
LOG(("%04x GAMEBOARD: OKI RESET data = %02X\n", cpuexec_describe_context(device->machine), state));
LOG(("%s: GAMEBOARD: OKI RESET data = %02X\n", cpuexec_describe_context(device->machine), state));
// return okim6376_status_0_r();
}
@ -1735,7 +1735,7 @@ static TIMER_DEVICE_CALLBACK( gen_50hz )
oscillating signal.*/
signal_50hz = signal_50hz?0:1;
pia_ca1_w(devtag_get_device(timer->machine, "pia_ic4"), 0, signal_50hz); /* signal is connected to IC4 CA1 */
pia6821_ca1_w(devtag_get_device(timer->machine, "pia_ic4"), 0, signal_50hz); /* signal is connected to IC4 CA1 */
}
@ -1749,12 +1749,12 @@ static ADDRESS_MAP_START( mod2_memmap, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) /* 6840PTM */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x1000, 0xffff) AM_READ(SMH_BANK1) /* 64k paged ROM (4 pages) */
ADDRESS_MAP_END
@ -1771,12 +1771,12 @@ static ADDRESS_MAP_START( mod4_yam_map, ADDRESS_SPACE_PROGRAM, 8 )
// AM_RANGE(0x08E0, 0x08E7) AM_READWRITE(68681_duart_r,68681_duart_w)
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) // 6840PTM
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x1000, 0xffff) AM_READ(SMH_BANK1) // 64k paged ROM (4 pages)
ADDRESS_MAP_END
@ -1788,19 +1788,19 @@ static ADDRESS_MAP_START( mod4_oki_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0850, 0x0850) AM_WRITE(bankswitch_w) // write bank (rom page select)
AM_RANGE(0x0880, 0x0883) AM_DEVREADWRITE("pia_gamebd", pia_r,pia_w) // PIA6821 on game board
AM_RANGE(0x0880, 0x0883) AM_DEVREADWRITE("pia_gamebd", pia6821_r,pia6821_w) // PIA6821 on game board
// AM_RANGE(0x08C0, 0x08C7) AM_READERITE(ptm6840_1_r,ptm6840_1_w) // 6840PTM on game board
// AM_RANGE(0x08E0, 0x08E7) AM_READWRITE(68681_duart_r,68681_duart_w)
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) // 6840PTM
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x1000, 0xffff) AM_READ(SMH_BANK1) // 64k paged ROM (4 pages)
ADDRESS_MAP_END
@ -1814,19 +1814,19 @@ static ADDRESS_MAP_START( dutch_memmap, ADDRESS_SPACE_PROGRAM, 8 )
// AM_RANGE(0x0800, 0x0810) AM_READWRITE(characteriser_r,characteriser_w)
AM_RANGE(0x0850, 0x0850) AM_WRITE(bankswitch_w) // write bank (rom page select)
AM_RANGE(0x0880, 0x0883) AM_DEVREADWRITE("pia_gamebd", pia_r,pia_w) // PIA6821 on game board
AM_RANGE(0x0880, 0x0883) AM_DEVREADWRITE("pia_gamebd", pia6821_r,pia6821_w) // PIA6821 on game board
// AM_RANGE(0x08C0, 0x08C7) AM_READERITE(ptm6840_2_r,ptm6840_2_w) // 6840PTM on game board
// AM_RANGE(0x08E0, 0x08E7) AM_READWRITE(68681_duart_r,68681_duart_w)
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) // 6840PTM
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x1000, 0xffff) AM_READ(SMH_BANK1) // 64k paged ROM (4 pages)
ADDRESS_MAP_END

View File

@ -1482,12 +1482,12 @@ static ADDRESS_MAP_START( mpu4_6809_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) /* 6840PTM */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x4000, 0x40FF) AM_RAM /* it actually runs code from here... */
@ -1666,12 +1666,12 @@ static ADDRESS_MAP_START( dealem_memmap, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0900, 0x0907) AM_READWRITE(ptm6840_0_r,ptm6840_0_w) /* 6840PTM */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia_r,pia_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia_r,pia_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia_r,pia_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia_r,pia_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia_r,pia_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia_r,pia_w) /* PIA6821 IC8 */
AM_RANGE(0x0A00, 0x0A03) AM_DEVREADWRITE("pia_ic3", pia6821_r,pia6821_w) /* PIA6821 IC3 */
AM_RANGE(0x0B00, 0x0B03) AM_DEVREADWRITE("pia_ic4", pia6821_r,pia6821_w) /* PIA6821 IC4 */
AM_RANGE(0x0C00, 0x0C03) AM_DEVREADWRITE("pia_ic5", pia6821_r,pia6821_w) /* PIA6821 IC5 */
AM_RANGE(0x0D00, 0x0D03) AM_DEVREADWRITE("pia_ic6", pia6821_r,pia6821_w) /* PIA6821 IC6 */
AM_RANGE(0x0E00, 0x0E03) AM_DEVREADWRITE("pia_ic7", pia6821_r,pia6821_w) /* PIA6821 IC7 */
AM_RANGE(0x0F00, 0x0F03) AM_DEVREADWRITE("pia_ic8", pia6821_r,pia6821_w) /* PIA6821 IC8 */
AM_RANGE(0x1000, 0x2fff) AM_RAM AM_BASE(&dealem_videoram)
AM_RANGE(0x8000, 0xffff) AM_ROM AM_WRITENOP/* 64k paged ROM (4 pages) */

View File

@ -63,7 +63,7 @@
#include "driver.h"
#include "machine/rescap.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/74123.h"
#include "video/mc6845.h"
#include "cpu/m6800/m6800.h"
@ -115,7 +115,7 @@ static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq )
{
const device_config *pia1 = devtag_get_device(device->machine, "pia1");
const device_config *pia2 = devtag_get_device(device->machine, "pia2");
int combined_state = pianew_get_irq_a(pia1) | pianew_get_irq_b(pia1) | pianew_get_irq_b(pia2);
int combined_state = pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1) | pia6821_get_irq_b(pia2);
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -140,13 +140,13 @@ static INTERRUPT_GEN( update_pia_1 )
/* update the different PIA pins from the input ports */
/* CA1 - copy of PA0 (COIN1) */
pia_ca1_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x01);
pia6821_ca1_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x01);
/* CA2 - copy of PA1 (SERVICE1) */
pia_ca2_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x02);
pia6821_ca2_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x02);
/* CB1 - (crosshatch) */
pia_cb1_w(pia1, 0, input_port_read(device->machine, "CROSS"));
pia6821_cb1_w(pia1, 0, input_port_read(device->machine, "CROSS"));
/* CB2 - NOT CONNECTED */
}
@ -228,7 +228,7 @@ static const pia6821_interface pia_2_intf =
static WRITE8_DEVICE_HANDLER(ic48_1_74123_output_changed)
{
const device_config *pia2 = devtag_get_device(device->machine, "pia2");
pia_ca1_w(pia2, 0, data);
pia6821_ca1_w(pia2, 0, data);
}
@ -504,8 +504,8 @@ static READ8_HANDLER( nyny_pia_1_2_r )
UINT8 ret = 0;
/* the address bits are directly connected to the chip selects */
if (offset & 0x04) ret = pia_r(pia1, offset & 0x03);
if (offset & 0x08) ret = pia_alt_r(pia2, offset & 0x03);
if (offset & 0x04) ret = pia6821_r(pia1, offset & 0x03);
if (offset & 0x08) ret = pia6821_alt_r(pia2, offset & 0x03);
return ret;
}
@ -517,8 +517,8 @@ static WRITE8_HANDLER( nyny_pia_1_2_w )
const device_config *pia2 = devtag_get_device(space->machine, "pia2");
/* the address bits are directly connected to the chip selects */
if (offset & 0x04) pia_w(pia1, offset & 0x03, data);
if (offset & 0x08) pia_alt_w(pia2, offset & 0x03, data);
if (offset & 0x04) pia6821_w(pia1, offset & 0x03, data);
if (offset & 0x08) pia6821_alt_w(pia2, offset & 0x03, data);
}

View File

@ -243,10 +243,10 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8800, 0x8bff) AM_READ(SMH_NOP) /* 6850 ACIA */
AM_RANGE(0x8c00, 0x8c00) AM_MIRROR(0x3fe) AM_READWRITE(qix_video_firq_r, qix_video_firq_w)
AM_RANGE(0x8c01, 0x8c01) AM_MIRROR(0x3fe) AM_READWRITE(qix_data_firq_ack_r, qix_data_firq_ack_w)
AM_RANGE(0x9000, 0x93ff) AM_DEVREADWRITE("sndpia0", pia_r, pia_w)
AM_RANGE(0x9400, 0x97ff) AM_DEVREADWRITE("pia0", pia_r, qix_pia_w)
AM_RANGE(0x9800, 0x9bff) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x9c00, 0x9fff) AM_DEVREADWRITE("pia2", pia_r, pia_w)
AM_RANGE(0x9000, 0x93ff) AM_DEVREADWRITE("sndpia0", pia6821_r, pia6821_w)
AM_RANGE(0x9400, 0x97ff) AM_DEVREADWRITE("pia0", pia6821_r, qix_pia_w)
AM_RANGE(0x9800, 0x9bff) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x9c00, 0x9fff) AM_DEVREADWRITE("pia2", pia6821_r, pia6821_w)
AM_RANGE(0xa000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -257,10 +257,10 @@ static ADDRESS_MAP_START( zoo_main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0800, 0x0bff) AM_READ(SMH_NOP) /* ACIA */
AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x3fe) AM_READWRITE(qix_video_firq_r, qix_video_firq_w)
AM_RANGE(0x0c01, 0x0c01) AM_MIRROR(0x3fe) AM_READWRITE(qix_data_firq_ack_r, qix_data_firq_ack_w)
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("sndpia0", pia_r, pia_w)
AM_RANGE(0x1400, 0x17ff) AM_DEVREADWRITE("pia0", pia_r, qix_pia_w)
AM_RANGE(0x1800, 0x1bff) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x1c00, 0x1fff) AM_DEVREADWRITE("pia2", pia_r, pia_w)
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("sndpia0", pia6821_r, pia6821_w)
AM_RANGE(0x1400, 0x17ff) AM_DEVREADWRITE("pia0", pia6821_r, qix_pia_w)
AM_RANGE(0x1800, 0x1bff) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1c00, 0x1fff) AM_DEVREADWRITE("pia2", pia6821_r, pia6821_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -32,7 +32,7 @@ RAM = 4116 (x11)
#include "driver.h"
#include "machine/rescap.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/74123.h"
#include "video/mc6845.h"
#include "cpu/m6800/m6800.h"
@ -75,8 +75,8 @@ static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq )
{
const device_config *pia0 = devtag_get_device(device->machine, "pia_main");
const device_config *pia1 = devtag_get_device(device->machine, "pia_audio");
int combined_state = pianew_get_irq_a(pia0) | pianew_get_irq_b(pia0) |
pianew_get_irq_a(pia1) | pianew_get_irq_b(pia1);
int combined_state = pia6821_get_irq_a(pia0) | pia6821_get_irq_b(pia0) |
pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1);
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -207,7 +207,7 @@ static const ay8910_interface ay8910_2_interface =
static WRITE8_DEVICE_HANDLER( ttl74123_output_changed )
{
const device_config *pia = devtag_get_device(device->machine, "pia_main");
pia_ca1_w(pia, 0, data);
pia6821_ca1_w(pia, 0, data);
ttl74123_output = data;
}
@ -397,7 +397,7 @@ static VIDEO_UPDATE( r2dtank )
static WRITE8_DEVICE_HANDLER( pia_comp_w )
{
pia_w(device, offset, ~data);
pia6821_w(device, offset, ~data);
}
@ -406,7 +406,7 @@ static ADDRESS_MAP_START( r2dtank_main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2000, 0x3fff) AM_RAM
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&r2dtank_colorram)
AM_RANGE(0x6000, 0x7fff) AM_RAM
AM_RANGE(0x8000, 0x8003) AM_DEVREADWRITE("pia_main", pia_r, pia_comp_w)
AM_RANGE(0x8000, 0x8003) AM_DEVREADWRITE("pia_main", pia6821_r, pia_comp_w)
AM_RANGE(0x8004, 0x8004) AM_READWRITE(audio_answer_r, audio_command_w)
AM_RANGE(0xb000, 0xb000) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0xb001, 0xb001) AM_DEVWRITE("crtc", mc6845_register_w)
@ -417,7 +417,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( r2dtank_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE("pia_audio", pia_r, pia_w)
AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE("pia_audio", pia6821_r, pia6821_w)
AM_RANGE(0xf000, 0xf000) AM_READWRITE(audio_command_r, audio_answer_w)
AM_RANGE(0xf800, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -1293,7 +1293,7 @@ Note: on screen copyright is (c)1998 Coinmaster.
#include "cpu/m6502/m6502.h"
#include "deprecat.h"
#include "seta.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "machine/msm6242.h"
#include "sound/2203intf.h"

View File

@ -192,7 +192,7 @@
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/74123.h"
#include "spiders.h"
@ -234,9 +234,9 @@ static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq )
const device_config *pia1 = devtag_get_device(device->machine, "pia1");
const device_config *pia2 = devtag_get_device(device->machine, "pia2");
const device_config *pia3 = devtag_get_device(device->machine, "pia3");
int combined_state = pianew_get_irq_a(pia1) | pianew_get_irq_b(pia1) |
pianew_get_irq_b(pia2) |
pianew_get_irq_a(pia3) | pianew_get_irq_b(pia3);
int combined_state = pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1) |
pia6821_get_irq_b(pia2) |
pia6821_get_irq_a(pia3) | pia6821_get_irq_b(pia3);
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
}
@ -283,13 +283,13 @@ static INTERRUPT_GEN( update_pia_1 )
/* update the different PIA pins from the input ports */
/* CA1 - copy of PA1 (COIN1) */
pia_ca1_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x02);
pia6821_ca1_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x02);
/* CA2 - copy of PA0 (SERVICE1) */
pia_ca2_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x01);
pia6821_ca2_w(pia1, 0, input_port_read(device->machine, "IN0") & 0x01);
/* CB1 - (crosshatch) */
pia_cb1_w(pia1, 0, input_port_read(device->machine, "XHATCH"));
pia6821_cb1_w(pia1, 0, input_port_read(device->machine, "XHATCH"));
/* CB2 - NOT CONNECTED */
}
@ -383,7 +383,7 @@ static const pia6821_interface pia_4_intf =
static WRITE8_DEVICE_HANDLER( ic60_74123_output_changed)
{
const device_config *pia2 = devtag_get_device(device->machine, "pia2");
pia_ca1_w(pia2, 0, data);
pia6821_ca1_w(pia2, 0, data);
}
@ -587,9 +587,9 @@ static ADDRESS_MAP_START( spiders_main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc000, 0xc000) AM_DEVWRITE("crtc", mc6845_address_w)
AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0xc020, 0xc027) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
AM_RANGE(0xc044, 0xc047) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0xc048, 0xc04b) AM_DEVREADWRITE("pia2", pia_alt_r, pia_alt_w)
AM_RANGE(0xc050, 0xc053) AM_DEVREADWRITE("pia3", pia_r, pia_w)
AM_RANGE(0xc044, 0xc047) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0xc048, 0xc04b) AM_DEVREADWRITE("pia2", pia6821_alt_r, pia6821_alt_w)
AM_RANGE(0xc050, 0xc053) AM_DEVREADWRITE("pia3", pia6821_r, pia6821_w)
AM_RANGE(0xc060, 0xc060) AM_READ_PORT("DSW1")
AM_RANGE(0xc080, 0xc080) AM_READ_PORT("DSW2")
AM_RANGE(0xc0a0, 0xc0a0) AM_READ_PORT("DSW3")
@ -599,7 +599,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( spiders_audio_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x0080, 0x0083) AM_DEVREADWRITE("pia4", pia_r, pia_w)
AM_RANGE(0x0080, 0x0083) AM_DEVREADWRITE("pia4", pia6821_r, pia6821_w)
AM_RANGE(0xf800, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -19,7 +19,7 @@ TODO:
#include "driver.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/sn76477.h"
@ -36,10 +36,10 @@ static UINT8 clear_tv;
*
*************************************/
static READ8_HANDLER( port_b_u3_r )
static READ8_DEVICE_HANDLER( port_b_u3_r )
{
logerror("%04x: read DIP\n",cpu_get_pc(space->cpu));
return input_port_read(space->machine, "DSW");
logerror("%s: read DIP\n",cpuexec_describe_context(device->machine));
return input_port_read(device->machine, "DSW");
}
@ -103,7 +103,7 @@ static WRITE8_HANDLER( clear_tv_w )
static WRITE8_DEVICE_HANDLER( port_b_u1_w )
{
if (pianew_get_port_b_z_mask(device) & 0x20)
if (pia6821_get_port_b_z_mask(device) & 0x20)
coin_counter_w(0, 1);
else
coin_counter_w(0, data & 0x20);
@ -119,7 +119,7 @@ static WRITE8_DEVICE_HANDLER( port_b_u1_w )
static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq )
{
int combined_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
int combined_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
logerror("GEN IRQ: %x\n", combined_state);
cpu_set_input_line(device->machine->cpu[0], 0, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -146,11 +146,11 @@ static UINT8 last = 0;
last = input_port_read(device->machine, "INPUT") & 0x0f;
generic_pulse_irq_line(device, 0);
}
pianew_set_input_a(pia, input_port_read(device->machine, "INPUT") & 0x0f, 0);
pia6821_set_input_a(pia, input_port_read(device->machine, "INPUT") & 0x0f, 0);
pia_ca1_w(pia, 0, input_port_read(device->machine, "INPUT") & 0x10);
pia6821_ca1_w(pia, 0, input_port_read(device->machine, "INPUT") & 0x10);
pia_ca2_w(pia, 0, input_port_read(device->machine, "INPUT") & 0x20);
pia6821_ca2_w(pia, 0, input_port_read(device->machine, "INPUT") & 0x20);
}
static READ8_HANDLER( timer_r )
@ -279,7 +279,7 @@ static const pia6821_interface pia_u2_intf =
static const pia6821_interface pia_u3_intf =
{
DEVCB_NULL, /* port A in */
DEVCB_NULL, /* port B in */
DEVCB_HANDLER(port_b_u3_r), /* port B in */
DEVCB_NULL, /* line CA1 in */
DEVCB_NULL, /* line CB1 in */
DEVCB_NULL, /* line CA2 in */
@ -313,9 +313,9 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xf04a, 0xf04a) AM_WRITE(clear_tv_w) /* the read is mark *LEDEN, but not used */
AM_RANGE(0xf04b, 0xf04b) AM_READWRITE(timer_r, clear_timer_w)
AM_RANGE(0xa04c, 0xf09f) AM_NOP
AM_RANGE(0xf0a0, 0xf0a3) AM_DEVREADWRITE("pia_u1", pia_r, pia_w)
AM_RANGE(0xf0a4, 0xf0a7) AM_DEVREADWRITE("pia_u3", pia_r, pia_w)
AM_RANGE(0xf0a8, 0xf0ab) AM_DEVREADWRITE("pia_u2", pia_r, pia_w)
AM_RANGE(0xf0a0, 0xf0a3) AM_DEVREADWRITE("pia_u1", pia6821_r, pia6821_w)
AM_RANGE(0xf0a4, 0xf0a7) AM_DEVREADWRITE("pia_u3", pia6821_r, pia6821_w)
AM_RANGE(0xf0a8, 0xf0ab) AM_DEVREADWRITE("pia_u2", pia6821_r, pia6821_w)
AM_RANGE(0xf0ac, 0xf7ff) AM_NOP
AM_RANGE(0xf800, 0xffff) AM_ROM
ADDRESS_MAP_END

View File

@ -23,7 +23,7 @@ always false - counter was reloaded and incremented before interrupt occurs
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/ay8910.h"
@ -201,8 +201,8 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1060, 0x1061) AM_DEVWRITE("ay", ay8910_address_data_w)
AM_RANGE(0x10a0, 0x10a1) AM_WRITE(tugboat_hd46505_0_w) /* scrolling is performed changing the start_addr register (0C/0D) */
AM_RANGE(0x10c0, 0x10c1) AM_WRITE(tugboat_hd46505_1_w)
AM_RANGE(0x11e4, 0x11e7) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x11e8, 0x11eb) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x11e4, 0x11e7) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0x11e8, 0x11eb) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
//AM_RANGE(0x1700, 0x1fff) AM_RAM
AM_RANGE(0x18e0, 0x18ef) AM_WRITE(tugboat_score_w)
AM_RANGE(0x2000, 0x2fff) AM_RAM /* tilemap RAM */

View File

@ -496,7 +496,7 @@
#include "cpu/m6800/m6800.h"
#include "sound/dac.h"
#include "sound/hc55516.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "audio/williams.h"
#include "williams.h"
@ -532,8 +532,8 @@ void defender_install_io_space(const address_space *space)
memory_install_write8_handler (space, 0xc3ff, 0xc3ff, 0, 0, williams_watchdog_reset_w);
memory_install_readwrite8_handler(space, 0xc400, 0xc4ff, 0, 0x0300, SMH_BANK3, williams_cmos_w);
memory_install_read8_handler (space, 0xc800, 0xcbff, 0, 0x03e0, williams_video_counter_r);
memory_install_readwrite8_device_handler(space, pia_1, 0xcc00, 0xcc03, 0, 0x03e0, pia_r, pia_w);
memory_install_readwrite8_device_handler(space, pia_0, 0xcc04, 0xcc07, 0, 0x03e0, pia_r, pia_w);
memory_install_readwrite8_device_handler(space, pia_1, 0xcc00, 0xcc03, 0, 0x03e0, pia6821_r, pia6821_w);
memory_install_readwrite8_device_handler(space, pia_0, 0xcc04, 0xcc07, 0, 0x03e0, pia6821_r, pia6821_w);
memory_set_bankptr(space->machine, 3, generic_nvram);
memory_set_bankptr(space->machine, 4, paletteram);
}
@ -550,8 +550,8 @@ static ADDRESS_MAP_START( williams_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x8fff) AM_READWRITE(SMH_BANK1, SMH_RAM) AM_BASE(&williams_videoram)
AM_RANGE(0x9000, 0xbfff) AM_RAM
AM_RANGE(0xc000, 0xc00f) AM_MIRROR(0x03f0) AM_WRITE(SMH_RAM) AM_BASE(&paletteram)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia_r, pia_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia_r, pia_w)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
AM_RANGE(0xc900, 0xc9ff) AM_WRITE(williams_vram_select_w)
AM_RANGE(0xca00, 0xca07) AM_MIRROR(0x00f8) AM_WRITE(williams_blitter_w)
AM_RANGE(0xcb00, 0xcbff) AM_READ(williams_video_counter_r)
@ -565,8 +565,8 @@ static ADDRESS_MAP_START( williams_extra_ram_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x8fff) AM_READWRITE(SMH_BANK1, SMH_RAM) AM_BASE(&williams_videoram)
AM_RANGE(0x9000, 0xbfff) AM_RAM
AM_RANGE(0xc000, 0xc00f) AM_MIRROR(0x03f0) AM_WRITE(SMH_RAM) AM_BASE(&paletteram)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia_r, pia_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia_r, pia_w)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
AM_RANGE(0xc900, 0xc9ff) AM_WRITE(sinistar_vram_select_w)
AM_RANGE(0xca00, 0xca07) AM_MIRROR(0x00f8) AM_WRITE(williams_blitter_w)
AM_RANGE(0xcb00, 0xcbff) AM_READ(williams_video_counter_r)
@ -591,8 +591,8 @@ static ADDRESS_MAP_START( blaster_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xbc00, 0xbcff) AM_WRITE(SMH_RAM) AM_BASE(&blaster_scanline_control)
AM_RANGE(0x9000, 0xbfff) AM_RAM
AM_RANGE(0xc000, 0xc00f) AM_MIRROR(0x03f0) AM_WRITE(SMH_RAM) AM_BASE(&paletteram)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia_r, pia_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia_r, pia_w)
AM_RANGE(0xc804, 0xc807) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
AM_RANGE(0xc80c, 0xc80f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
AM_RANGE(0xc900, 0xc93f) AM_WRITE(blaster_vram_select_w)
AM_RANGE(0xc940, 0xc97f) AM_WRITE(blaster_remap_select_w)
AM_RANGE(0xc980, 0xc9bf) AM_WRITE(blaster_bank_select_w)
@ -619,8 +619,8 @@ static ADDRESS_MAP_START( williams2_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc800, 0xc87f) AM_WRITE(williams2_bank_select_w)
AM_RANGE(0xc880, 0xc887) AM_MIRROR(0x0078) AM_WRITE(williams_blitter_w)
AM_RANGE(0xc900, 0xc97f) AM_WRITE(williams2_watchdog_reset_w)
AM_RANGE(0xc980, 0xc983) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_1", pia_r, pia_w)
AM_RANGE(0xc984, 0xc987) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_0", pia_r, pia_w)
AM_RANGE(0xc980, 0xc983) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
AM_RANGE(0xc984, 0xc987) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
AM_RANGE(0xc98c, 0xc98f) AM_MIRROR(0x0070) AM_WRITE(williams2_7segment_w)
AM_RANGE(0xcb00, 0xcb1f) AM_WRITE(williams2_fg_select_w)
AM_RANGE(0xcb20, 0xcb3f) AM_WRITE(williams2_bg_select_w)
@ -641,8 +641,8 @@ static ADDRESS_MAP_START( williams2_extra_ram_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc800, 0xc87f) AM_WRITE(williams2_bank_select_w)
AM_RANGE(0xc880, 0xc887) AM_MIRROR(0x0078) AM_WRITE(williams_blitter_w)
AM_RANGE(0xc900, 0xc97f) AM_WRITE(williams2_watchdog_reset_w)
AM_RANGE(0xc980, 0xc983) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_1", pia_r, pia_w)
AM_RANGE(0xc984, 0xc987) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_0", pia_r, pia_w)
AM_RANGE(0xc980, 0xc983) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_1", pia6821_r, pia6821_w)
AM_RANGE(0xc984, 0xc987) AM_MIRROR(0x0070) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
AM_RANGE(0xc98c, 0xc98f) AM_MIRROR(0x0070) AM_WRITE(williams2_7segment_w)
AM_RANGE(0xcb00, 0xcb1f) AM_WRITE(williams2_fg_select_w)
AM_RANGE(0xcb20, 0xcb3f) AM_WRITE(williams2_bg_select_w)
@ -666,7 +666,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( defender_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0x0400, 0x0403) AM_MIRROR(0x8000) AM_DEVREADWRITE("pia_2", pia_r, pia_w)
AM_RANGE(0x0400, 0x0403) AM_MIRROR(0x8000) AM_DEVREADWRITE("pia_2", pia6821_r, pia6821_w)
AM_RANGE(0xb000, 0xffff) AM_ROM /* most games start at $F000, Sinistar starts at $B000 */
ADDRESS_MAP_END
@ -674,7 +674,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0x0080, 0x00ff) AM_RAM /* MC6810 RAM */
AM_RANGE(0x0400, 0x0403) AM_MIRROR(0x8000) AM_DEVREADWRITE("pia_2", pia_r, pia_w)
AM_RANGE(0x0400, 0x0403) AM_MIRROR(0x8000) AM_DEVREADWRITE("pia_2", pia6821_r, pia6821_w)
AM_RANGE(0xb000, 0xffff) AM_ROM /* most games start at $F000, Sinistar starts at $B000 */
ADDRESS_MAP_END
@ -689,7 +689,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( williams2_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */
AM_RANGE(0x0080, 0x00ff) AM_RAM /* MC6810 RAM */
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("pia_2", pia_r, pia_w)
AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE("pia_2", pia6821_r, pia6821_w)
AM_RANGE(0xe000, 0xffff) AM_ROM
ADDRESS_MAP_END
@ -2798,7 +2798,7 @@ static DRIVER_INIT( spdball )
CONFIGURE_BLITTER(WILLIAMS_BLITTER_SC01, 0xc000);
/* add a third PIA */
memory_install_readwrite8_device_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), pia_3, 0xc808, 0xc80b, 0, 0, pia_r, pia_w);
memory_install_readwrite8_device_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), pia_3, 0xc808, 0xc80b, 0, 0, pia6821_r, pia6821_w);
/* install extra input handlers */
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc800, 0xc800, 0, 0, "AN0");

View File

@ -36,7 +36,7 @@ Notes:
#include "driver.h"
#include "cpu/z80/z80.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/8255ppi.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
@ -156,7 +156,7 @@ static INTERRUPT_GEN( zaccaria_cb1_toggle )
const device_config *pia0 = devtag_get_device(device->machine, "pia0");
static int toggle;
pia_cb1_w(pia0,0, toggle & 1);
pia6821_cb1_w(pia0,0, toggle & 1);
toggle ^= 1;
}
@ -208,7 +208,7 @@ return counter;
static void tms5220_irq_handler(const device_config *device, int state)
{
const device_config *pia1 = devtag_get_device(device->machine, "pia1");
pia_cb1_w(pia1,0,state ? 0 : 1);
pia6821_cb1_w(pia1,0,state ? 0 : 1);
}
@ -266,7 +266,7 @@ static WRITE8_HANDLER( sound_command_w )
static WRITE8_HANDLER( sound1_command_w )
{
const device_config *pia0 = devtag_get_device(space->machine, "pia0");
pia_ca1_w(pia0,0,data & 0x80);
pia6821_ca1_w(pia0,0,data & 0x80);
soundlatch2_w(space,0,data);
}
@ -355,14 +355,14 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map_1, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia_r, pia_w)
AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
AM_RANGE(0xa000, 0xbfff) AM_ROM
AM_RANGE(0xe000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map_2, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia_r, pia_w)
AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("dac2", mc1408_data_w) /* MC1408 */
AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w)
AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r)

View File

@ -12,7 +12,7 @@
#ifndef ATARI_H
#define ATARI_H
#include "machine/6821new.h"
#include "machine/6821pia.h"
/*----------- defined in machine/atari.c -----------*/

View File

@ -6,7 +6,7 @@
****************************************************************************/
#include "machine/6821new.h"
#include "machine/6821pia.h"
/*----------- defined in machine/carpolo.c -----------*/

View File

@ -8,7 +8,7 @@
#include "machine/z80ctc.h"
#include "machine/z80pio.h"
#include "machine/z80sio.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
/* constants */
#define MAIN_OSC_MCR_I XTAL_19_968MHz

View File

@ -7,7 +7,7 @@
***************************************************************************/
#include "video/mc6845.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#define MAIN_CLOCK_OSC 20000000 /* 20 MHz */

View File

@ -5,7 +5,7 @@
**************************************************************************/
#include "machine/6821new.h"
#include "machine/6821pia.h"
/*----------- defined in drivers/williams.c -----------*/

View File

@ -12,7 +12,7 @@
#include "cpu/m6502/m6502.h"
#include "includes/atari.h"
#include "sound/pokey.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "sound/dac.h"
#include "video/gtia.h"

View File

@ -8,7 +8,7 @@
#include "driver.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/7474.h"
#include "machine/74148.h"
#include "machine/74153.h"

View File

@ -142,7 +142,7 @@ static READ8_DEVICE_HANDLER( zwackery_port_1_r )
{
UINT8 ret = input_port_read(device->machine, "IN1");
pianew_set_port_a_z_mask(device, ret);
pia6821_set_port_a_z_mask(device, ret);
return ret;
}
@ -152,7 +152,7 @@ static READ8_DEVICE_HANDLER( zwackery_port_3_r )
{
UINT8 ret = input_port_read(device->machine, "IN3");
pianew_set_port_a_z_mask(device, ret);
pia6821_set_port_a_z_mask(device, ret);
return ret;
}
@ -605,7 +605,7 @@ WRITE_LINE_DEVICE_HANDLER( zwackery_ca2_w )
static WRITE_LINE_DEVICE_HANDLER( zwackery_pia_irq )
{
v493_irq_state = pianew_get_irq_a(device) | pianew_get_irq_b(device);
v493_irq_state = pia6821_get_irq_a(device) | pia6821_get_irq_b(device);
update_mcr68_interrupts(device->machine);
}
@ -613,7 +613,7 @@ static WRITE_LINE_DEVICE_HANDLER( zwackery_pia_irq )
static TIMER_CALLBACK( zwackery_493_off_callback )
{
const device_config *pia = devtag_get_device(machine, "pia0");
pia_ca1_w(pia, 0, 0);
pia6821_ca1_w(pia, 0, 0);
}
@ -621,7 +621,7 @@ static TIMER_CALLBACK( zwackery_493_callback )
{
const device_config *pia = devtag_get_device(machine, "pia0");
pia_ca1_w(pia, 0, 1);
pia6821_ca1_w(pia, 0, 1);
timer_set(machine, video_screen_get_scan_period(machine->primary_screen), NULL, 0, zwackery_493_off_callback);
}

View File

@ -253,7 +253,7 @@ MACHINE_START( qixmcu )
MC6845_ON_VSYNC_CHANGED( qix_vsync_changed )
{
const device_config *pia = devtag_get_device(device->machine, "sndpia0");
pia_cb1_w(pia, 0, vsync);
pia6821_cb1_w(pia, 0, vsync);
}
@ -359,7 +359,7 @@ static WRITE8_DEVICE_HANDLER( qixmcu_coin_w )
qix_state *state = device->machine->driver_data;
logerror("6809:qixmcu_coin_w = %02X\n", data);
/* this is a callback called by pia_w(), so I don't need to synchronize */
/* this is a callback called by pia6821_w(), so I don't need to synchronize */
/* the CPUs - they have already been synchronized by qix_pia_w() */
state->_68705_port_in[0] = data;
}
@ -380,7 +380,7 @@ static WRITE8_DEVICE_HANDLER( qixmcu_coinctrl_w )
else
cputag_set_input_line(device->machine, "mcu", M68705_IRQ_LINE, CLEAR_LINE);
/* this is a callback called by pia_w(), so I don't need to synchronize */
/* this is a callback called by pia6821_w(), so I don't need to synchronize */
/* the CPUs - they have already been synchronized by qix_pia_w() */
state->coinctrl = data;
logerror("6809:qixmcu_coinctrl_w = %02X\n", data);
@ -472,7 +472,7 @@ WRITE8_HANDLER( qix_68705_portC_w )
static TIMER_CALLBACK( pia_w_callback )
{
const device_config *device = ptr;
pia_w(device, param >> 8, param & 0xff);
pia6821_w(device, param >> 8, param & 0xff);
}
@ -511,8 +511,8 @@ static WRITE8_DEVICE_HANDLER( slither_76489_0_w )
sn76496_w(devtag_get_device(device->machine, "sn1"), 0, data);
/* clock the ready line going back into CB1 */
pia_cb1_w(device, 0, 0);
pia_cb1_w(device, 0, 1);
pia6821_cb1_w(device, 0, 0);
pia6821_cb1_w(device, 0, 1);
}
@ -522,8 +522,8 @@ static WRITE8_DEVICE_HANDLER( slither_76489_1_w )
sn76496_w(devtag_get_device(device->machine, "sn2"), 0, data);
/* clock the ready line going back into CB1 */
pia_cb1_w(device, 0, 0);
pia_cb1_w(device, 0, 1);
pia6821_cb1_w(device, 0, 0);
pia6821_cb1_w(device, 0, 1);
}

View File

@ -8,7 +8,7 @@
#include "audio/williams.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
#include "machine/6821new.h"
#include "machine/6821pia.h"
#include "machine/ticket.h"
#include "williams.h"
#include "sound/dac.h"
@ -190,7 +190,7 @@ const pia6821_interface williams2_muxed_pia_0_intf =
const pia6821_interface williams2_pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(input_port_2_device_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia_ca1_w),
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia6821_ca1_w),
/*irqs : A/B */ DEVCB_LINE(williams_main_irq), DEVCB_LINE(williams_main_irq)
};
@ -198,7 +198,7 @@ const pia6821_interface williams2_pia_1_intf =
const pia6821_interface williams2_snd_pia_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_DEVICE_HANDLER("pia_1", pia_portb_w), DEVCB_DEVICE_HANDLER("wmsdac", dac_w), DEVCB_DEVICE_HANDLER("pia_1", pia_cb1_w), DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_DEVICE_HANDLER("pia_1", pia6821_portb_w), DEVCB_DEVICE_HANDLER("wmsdac", dac_w), DEVCB_DEVICE_HANDLER("pia_1", pia6821_cb1_w), DEVCB_NULL,
/*irqs : A/B */ DEVCB_LINE(williams_snd_irq), DEVCB_LINE(williams_snd_irq)
};
@ -222,7 +222,7 @@ const pia6821_interface mysticm_pia_0_intf =
const pia6821_interface mysticm_pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(input_port_2_device_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia_ca1_w),
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia6821_ca1_w),
/*irqs : A/B */ DEVCB_LINE(mysticm_main_irq), DEVCB_LINE(mysticm_main_irq)
};
@ -238,7 +238,7 @@ const pia6821_interface tshoot_pia_0_intf =
const pia6821_interface tshoot_pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(input_port_2_device_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia_ca1_w),
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(williams2_snd_cmd_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("pia_2", pia6821_ca1_w),
/*irqs : A/B */ DEVCB_LINE(tshoot_main_irq), DEVCB_LINE(tshoot_main_irq)
};
@ -246,7 +246,7 @@ const pia6821_interface tshoot_pia_1_intf =
const pia6821_interface tshoot_snd_pia_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_DEVICE_HANDLER("pia_1", pia_portb_w), DEVCB_DEVICE_HANDLER("wmsdac", dac_w), DEVCB_DEVICE_HANDLER("pia_1", pia_cb1_w), DEVCB_HANDLER(tshoot_maxvol_w),
/*outputs: A/B,CA/B2 */ DEVCB_DEVICE_HANDLER("pia_1", pia6821_portb_w), DEVCB_DEVICE_HANDLER("wmsdac", dac_w), DEVCB_DEVICE_HANDLER("pia_1", pia6821_cb1_w), DEVCB_HANDLER(tshoot_maxvol_w),
/*irqs : A/B */ DEVCB_LINE(williams_snd_irq), DEVCB_LINE(williams_snd_irq)
};
@ -254,7 +254,7 @@ const pia6821_interface tshoot_snd_pia_intf =
const pia6821_interface joust2_pia_1_intf =
{
/*inputs : A/B,CA/B1,CA/B2 */ DEVCB_HANDLER(input_port_2_device_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(joust2_snd_cmd_w), DEVCB_HANDLER(joust2_pia_3_cb1_w), DEVCB_DEVICE_HANDLER("pia_2", pia_ca1_w),
/*outputs: A/B,CA/B2 */ DEVCB_NULL, DEVCB_HANDLER(joust2_snd_cmd_w), DEVCB_HANDLER(joust2_pia_3_cb1_w), DEVCB_DEVICE_HANDLER("pia_2", pia6821_ca1_w),
/*irqs : A/B */ DEVCB_LINE(williams_main_irq), DEVCB_LINE(williams_main_irq)
};
@ -272,7 +272,7 @@ static TIMER_CALLBACK( williams_va11_callback )
int scanline = param;
/* the IRQ signal comes into CB1, and is set to VA11 */
pia_cb1_w(pia_1, 0, scanline & 0x20);
pia6821_cb1_w(pia_1, 0, scanline & 0x20);
/* set a timer for the next update */
scanline += 0x20;
@ -286,7 +286,7 @@ static TIMER_CALLBACK( williams_count240_off_callback )
const device_config *pia_1 = devtag_get_device(machine, "pia_1");
/* the COUNT240 signal comes into CA1, and is set to the logical AND of VA10-VA13 */
pia_ca1_w(pia_1, 0, 0);
pia6821_ca1_w(pia_1, 0, 0);
}
@ -295,7 +295,7 @@ static TIMER_CALLBACK( williams_count240_callback )
const device_config *pia_1 = devtag_get_device(machine, "pia_1");
/* the COUNT240 signal comes into CA1, and is set to the logical AND of VA10-VA13 */
pia_ca1_w(pia_1, 0, 1);
pia6821_ca1_w(pia_1, 0, 1);
/* set a timer to turn it off once the scanline counter resets */
timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 0, 0), NULL, 0, williams_count240_off_callback);
@ -308,7 +308,7 @@ static TIMER_CALLBACK( williams_count240_callback )
static void williams_main_irq(const device_config *device, int state)
{
const device_config *pia_1 = devtag_get_device(device->machine, "pia_1");
int combined_state = pianew_get_irq_a(pia_1) | pianew_get_irq_b(pia_1);
int combined_state = pia6821_get_irq_a(pia_1) | pia6821_get_irq_b(pia_1);
/* IRQ to the main CPU */
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -325,7 +325,7 @@ static void williams_main_firq(const device_config *device, int state)
static void williams_snd_irq(const device_config *device, int state)
{
const device_config *pia_2 = devtag_get_device(device->machine, "pia_2");
int combined_state = pianew_get_irq_a(pia_2) | pianew_get_irq_b(pia_2);
int combined_state = pia6821_get_irq_a(pia_2) | pia6821_get_irq_b(pia_2);
/* IRQ to the sound CPU */
cpu_set_input_line(device->machine->cpu[1], M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -343,7 +343,7 @@ static void mysticm_main_irq(const device_config *device, int state)
{
const device_config *pia_0 = devtag_get_device(device->machine, "pia_0");
const device_config *pia_1 = devtag_get_device(device->machine, "pia_1");
int combined_state = pianew_get_irq_b(pia_0) | pianew_get_irq_a(pia_1) | pianew_get_irq_b(pia_1);
int combined_state = pia6821_get_irq_b(pia_0) | pia6821_get_irq_a(pia_1) | pia6821_get_irq_b(pia_1);
/* IRQ to the main CPU */
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -354,7 +354,7 @@ static void tshoot_main_irq(const device_config *device, int state)
{
const device_config *pia_0 = devtag_get_device(device->machine, "pia_0");
const device_config *pia_1 = devtag_get_device(device->machine, "pia_1");
int combined_state = pianew_get_irq_a(pia_0) | pianew_get_irq_b(pia_0) | pianew_get_irq_a(pia_1) | pianew_get_irq_b(pia_1);
int combined_state = pia6821_get_irq_a(pia_0) | pia6821_get_irq_b(pia_0) | pia6821_get_irq_a(pia_1) | pia6821_get_irq_b(pia_1);
/* IRQ to the main CPU */
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
@ -409,8 +409,8 @@ static TIMER_CALLBACK( williams2_va11_callback )
int scanline = param;
/* the IRQ signal comes into CB1, and is set to VA11 */
pia_cb1_w(pia_0, 0, scanline & 0x20);
pia_ca1_w(pia_1, 0, scanline & 0x20);
pia6821_cb1_w(pia_0, 0, scanline & 0x20);
pia6821_ca1_w(pia_1, 0, scanline & 0x20);
/* set a timer for the next update */
scanline += 0x20;
@ -424,7 +424,7 @@ static TIMER_CALLBACK( williams2_endscreen_off_callback )
const device_config *pia_0 = devtag_get_device(machine, "pia_0");
/* the /ENDSCREEN signal comes into CA1 */
pia_ca1_w(pia_0, 0, 1);
pia6821_ca1_w(pia_0, 0, 1);
}
@ -433,7 +433,7 @@ static TIMER_CALLBACK( williams2_endscreen_callback )
const device_config *pia_0 = devtag_get_device(machine, "pia_0");
/* the /ENDSCREEN signal comes into CA1 */
pia_ca1_w(pia_0, 0, 0);
pia6821_ca1_w(pia_0, 0, 0);
/* set a timer to turn it off once the scanline counter resets */
timer_set(machine, video_screen_get_time_until_pos(machine->primary_screen, 8, 0), NULL, 0, williams2_endscreen_off_callback);
@ -544,8 +544,8 @@ static TIMER_CALLBACK( williams_deferred_snd_cmd_w )
{
const device_config *pia_2 = devtag_get_device(machine, "pia_2");
pia_portb_w(pia_2, 0, param);
pia_cb1_w(pia_2, 0, (param == 0xff) ? 0 : 1);
pia6821_portb_w(pia_2, 0, param);
pia6821_cb1_w(pia_2, 0, (param == 0xff) ? 0 : 1);
}
WRITE8_DEVICE_HANDLER( williams_snd_cmd_w )
@ -564,7 +564,7 @@ static TIMER_CALLBACK( williams2_deferred_snd_cmd_w )
{
const device_config *pia_2 = devtag_get_device(machine, "pia_2");
pia_porta_w(pia_2, 0, param);
pia6821_porta_w(pia_2, 0, param);
}
static WRITE8_DEVICE_HANDLER( williams2_snd_cmd_w )
@ -961,7 +961,7 @@ MACHINE_RESET( joust2 )
/* standard init */
MACHINE_RESET_CALL(williams2);
pia_ca1_w(pia_3, 0, 1);
pia6821_ca1_w(pia_3, 0, 1);
state_save_register_global(machine, joust2_current_sound_data);
}
@ -969,7 +969,7 @@ MACHINE_RESET( joust2 )
static TIMER_CALLBACK( joust2_deferred_snd_cmd_w )
{
const device_config *pia_2 = devtag_get_device(machine, "pia_2");
pia_porta_w(pia_2, 0, param & 0xff);
pia6821_porta_w(pia_2, 0, param & 0xff);
}
@ -978,7 +978,7 @@ static WRITE8_DEVICE_HANDLER( joust2_pia_3_cb1_w )
const device_config *pia_3 = devtag_get_device(device->machine, "cvsdpia");
joust2_current_sound_data = (joust2_current_sound_data & ~0x100) | ((data << 8) & 0x100);
pia_cb1_w(pia_3, offset, data);
pia6821_cb1_w(pia_3, offset, data);
}