mirror of
https://github.com/holub/mame
synced 2025-07-06 02:18:09 +03:00
Factored out some more MESS specific code for Atari 8bit
This commit is contained in:
parent
706c525c72
commit
3a3acbc79d
@ -16,19 +16,18 @@
|
||||
|
||||
/*----------- defined in machine/atari.c -----------*/
|
||||
|
||||
extern const pia6821_interface atari_pia_interface;
|
||||
extern const pia6821_interface a600xl_pia_interface;
|
||||
extern const pia6821_interface a800xl_pia_interface;
|
||||
|
||||
/* These handlers are needed by MESS Atari 8bit drivers (for their custom pia_interface) */
|
||||
READ8_DEVICE_HANDLER(atari_pia_pa_r);
|
||||
READ8_DEVICE_HANDLER(atari_pia_pb_r);
|
||||
WRITE8_DEVICE_HANDLER(a800xl_pia_pb_w);
|
||||
|
||||
void atari_machine_start(running_machine *machine); // this is needed in MESS as well for other Atari 8bits systems
|
||||
/* This is needed in MESS as well for Atari 8bit drivers */
|
||||
void atari_machine_start(running_machine *machine);
|
||||
|
||||
MACHINE_START( a600xl );
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w);
|
||||
|
||||
READ8_HANDLER ( atari_serin_r );
|
||||
WRITE8_HANDLER ( atari_serout_w );
|
||||
void atari_interrupt_cb(const device_config *device, int mask);
|
||||
|
||||
void a800_handle_keyboard(running_machine *machine);
|
||||
|
@ -63,36 +63,20 @@ void atari_interrupt_cb(const device_config *device, int mask)
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
static READ8_DEVICE_HANDLER(atari_pia_pa_r)
|
||||
READ8_DEVICE_HANDLER(atari_pia_pa_r)
|
||||
{
|
||||
return atari_input_disabled() ? 0xFF : input_port_read_safe(device->machine, "djoy_0_1", 0);
|
||||
}
|
||||
|
||||
static READ8_DEVICE_HANDLER(atari_pia_pb_r)
|
||||
READ8_DEVICE_HANDLER(atari_pia_pb_r)
|
||||
{
|
||||
return atari_input_disabled() ? 0xFF : input_port_read_safe(device->machine, "djoy_2_3", 0);
|
||||
}
|
||||
|
||||
static WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w) { a600xl_mmu(device->machine, data); }
|
||||
static WRITE8_DEVICE_HANDLER(a800xl_pia_pb_w) { a800xl_mmu(device->machine, data); }
|
||||
WRITE8_DEVICE_HANDLER(a800xl_pia_pb_w) { a800xl_mmu(device->machine, data); }
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { }
|
||||
|
||||
const pia6821_interface atari_pia_interface =
|
||||
{
|
||||
DEVCB_HANDLER(atari_pia_pa_r), /* port A in */
|
||||
DEVCB_HANDLER(atari_pia_pb_r), /* port B in */
|
||||
DEVCB_NULL, /* line CA1 in */
|
||||
DEVCB_NULL, /* line CB1 in */
|
||||
DEVCB_NULL, /* line CA2 in */
|
||||
DEVCB_NULL, /* line CB2 in */
|
||||
DEVCB_NULL, /* port A out */
|
||||
DEVCB_NULL, /* port B out */
|
||||
DEVCB_NULL, /* line CA2 out */
|
||||
DEVCB_LINE(atari_pia_cb2_w), /* port CB2 out */
|
||||
DEVCB_NULL, /* IRQA */
|
||||
DEVCB_NULL /* IRQB */
|
||||
};
|
||||
static WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { } // This is used by Floppy drive on Atari 8bits Home Computers
|
||||
|
||||
const pia6821_interface a600xl_pia_interface =
|
||||
{
|
||||
@ -110,24 +94,6 @@ const pia6821_interface a600xl_pia_interface =
|
||||
DEVCB_NULL /* IRQB */
|
||||
};
|
||||
|
||||
const pia6821_interface a800xl_pia_interface =
|
||||
{
|
||||
DEVCB_HANDLER(atari_pia_pa_r), /* port A in */
|
||||
DEVCB_HANDLER(atari_pia_pb_r), /* port B in */
|
||||
DEVCB_NULL, /* line CA1 in */
|
||||
DEVCB_NULL, /* line CB1 in */
|
||||
DEVCB_NULL, /* line CA2 in */
|
||||
DEVCB_NULL, /* line CB2 in */
|
||||
DEVCB_NULL, /* port A out */
|
||||
DEVCB_HANDLER(a800xl_pia_pb_w), /* port B out */
|
||||
DEVCB_NULL, /* line CA2 out */
|
||||
DEVCB_LINE(atari_pia_cb2_w), /* port CB2 out */
|
||||
DEVCB_NULL, /* IRQA */
|
||||
DEVCB_NULL /* IRQB */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user