Cleanup acia6850 modernization, removing trampolines.

Moved a few trivial methods in the ptm6840 device to inline.
This commit is contained in:
Aaron Giles 2011-05-04 06:01:07 +00:00
parent 2ff70f9220
commit 68ddfa5066
9 changed files with 134 additions and 266 deletions

View File

@ -180,28 +180,6 @@ void ptm6840_device::device_timer(emu_timer &timer, device_timer_id id, int para
}
//-------------------------------------------------
// status - Get enabled status
//-------------------------------------------------
int ptm6840_device::status( int clock ) const
{
return m_enabled[clock - 1];
}
//-------------------------------------------------
// irq - Get IRQ state
//-------------------------------------------------
int ptm6840_device::irq_state() const
{
return m_IRQ;
}
//-------------------------------------------------
// subtract_from_counter - Subtract from Counter
//-------------------------------------------------
@ -462,11 +440,6 @@ void ptm6840_device::reload_count(int idx)
//-------------------------------------------------
READ8_MEMBER( ptm6840_device::read )
{
return read(offset);
}
UINT8 ptm6840_device::read(offs_t offset)
{
int val;
@ -531,11 +504,6 @@ UINT8 ptm6840_device::read(offs_t offset)
//-------------------------------------------------
WRITE8_MEMBER( ptm6840_device::write )
{
write(offset, data);
}
void ptm6840_device::write(offs_t offset, UINT8 data)
{
switch ( offset )
{
@ -713,16 +681,6 @@ WRITE_LINE_MEMBER( ptm6840_device::set_c2 ) { set_clock(1, state); }
WRITE_LINE_MEMBER( ptm6840_device::set_c3 ) { set_clock(2, state); }
//-------------------------------------------------
// count - get count value
//-------------------------------------------------
UINT16 ptm6840_device::count(int counter) const
{
return compute_counter(counter);
}
//-------------------------------------------------
// set_ext_clock - set external clock frequency
//-------------------------------------------------
@ -768,13 +726,3 @@ void ptm6840_device::set_ext_clock(int counter, double clock)
m_timer[counter]->enable(true);
}
}
//-------------------------------------------------
// ext_clock - get external clock frequency
//-------------------------------------------------
int ptm6840_device::ext_clock(int counter) const
{
return m_external_clock[counter];
}

View File

@ -54,16 +54,16 @@ public:
// static configuration helpers
static void static_set_interface(device_t &device, const ptm6840_interface &interface);
int status(int clock) const; // get whether timer is enabled
int irq_state() const; // get IRQ state
UINT16 count(int counter) const; // get counter value
int status(int clock) const { return m_enabled[clock - 1]; } // get whether timer is enabled
int irq_state() const { return m_IRQ; } // get IRQ state
UINT16 count(int counter) const { return compute_counter(counter); } // get counter value
void set_ext_clock(int counter, double clock); // set clock frequency
int ext_clock(int counter) const; // get clock frequency
int ext_clock(int counter) const { return m_external_clock[counter]; } // get clock frequency
DECLARE_WRITE8_MEMBER( write );
void write(offs_t offset, UINT8 data);
void write(offs_t offset, UINT8 data) { write(*memory_nonspecific_space(machine()), offset, data); }
DECLARE_READ8_MEMBER( read );
UINT8 read(offs_t offset);
UINT8 read(offs_t offset) { return read(*memory_nonspecific_space(machine()), offset); }
void set_gate(int idx, int state);
DECLARE_WRITE_LINE_MEMBER( set_g1 );

View File

@ -62,37 +62,19 @@ const device_type ACIA6850 = &device_creator<acia6850_device>;
acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ACIA6850, "6850 ACIA", tag, owner, clock)
{
memset(static_cast<acia6850_interface *>(this), 0, sizeof(acia6850_interface));
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
// static_set_interface - set the interface
// struct
//-------------------------------------------------
void acia6850_device::device_config_complete()
void acia6850_device::static_set_interface(device_t &device, const acia6850_interface &interface)
{
// inherit a copy of the static data
const acia6850_interface *intf = reinterpret_cast<const acia6850_interface *>(static_config());
if (intf != NULL)
{
*static_cast<acia6850_interface *>(this) = *intf;
}
// or initialize to defaults if none provided
else
{
m_tx_clock = 0;
m_rx_clock = 0;
memset(&m_in_rx_cb, 0, sizeof(m_in_rx_cb));
memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
memset(&m_in_cts_cb, 0, sizeof(m_in_cts_cb));
memset(&m_out_rts_cb, 0, sizeof(m_out_rts_cb));
memset(&m_in_dcd_cb, 0, sizeof(m_in_dcd_cb));
memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
}
acia6850_device &ptm = downcast<acia6850_device &>(device);
static_cast<acia6850_interface &>(ptm) = interface;
}
@ -102,7 +84,7 @@ void acia6850_device::device_config_complete()
void acia6850_device::device_start()
{
/* resolve callbacks */
// resolve callbacks
m_in_rx_func.resolve(m_in_rx_cb, *this);
m_out_tx_func.resolve(m_out_tx_cb, *this);
m_in_cts_func.resolve(m_in_cts_cb, *this);
@ -112,8 +94,8 @@ void acia6850_device::device_start()
m_tx_counter = 0;
m_rx_counter = 0;
m_rx_timer = machine().scheduler().timer_alloc(FUNC(receive_event_callback), (void *)this);
m_tx_timer = machine().scheduler().timer_alloc(FUNC(transmit_event_callback), (void *)this);
m_rx_timer = timer_alloc(TIMER_ID_RECEIVE);
m_tx_timer = timer_alloc(TIMER_ID_TRANSMIT);
m_first_reset = 1;
m_status_read = 0;
m_brk = 0;
@ -188,12 +170,32 @@ void acia6850_device::device_reset()
}
//-------------------------------------------------
// device_timer - handle timer callbacks
//-------------------------------------------------
/*-------------------------------------------------
acia6850_stat_r - Read Status Register
-------------------------------------------------*/
void acia6850_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
{
case TIMER_ID_TRANSMIT:
tx_tick();
m_tx_counter = 0;
break;
case TIMER_ID_RECEIVE:
rx_tick();
m_rx_counter = 0;
break;
}
}
READ8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_stat_r)
//-------------------------------------------------
// acia6850_stat_r - Read Status Register
//-------------------------------------------------
READ8_MEMBER( acia6850_device::status_read )
{
UINT8 status;
@ -209,11 +211,11 @@ READ8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_stat_r)
}
/*-------------------------------------------------
acia6850_ctrl_w - Write Control Register
-------------------------------------------------*/
//-------------------------------------------------
// control_write - Write Control Register
//-------------------------------------------------
WRITE8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_ctrl_w )
WRITE8_MEMBER( acia6850_device::control_write )
{
if (LOG) logerror("MC6850 '%s' Control: %02x\n", tag(), data);
@ -302,9 +304,9 @@ WRITE8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_ctrl_w )
}
/*-------------------------------------------------
check_interrupts
-------------------------------------------------*/
//-------------------------------------------------
// check_interrupts
//-------------------------------------------------
void acia6850_device::check_interrupts()
{
@ -329,11 +331,11 @@ void acia6850_device::check_interrupts()
}
/*-------------------------------------------------
acia6850_data_w - Write transmit register
-------------------------------------------------*/
//-------------------------------------------------
// data_write - Write transmit register
//-------------------------------------------------
WRITE8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_data_w)
WRITE8_MEMBER( acia6850_device::data_write )
{
if (LOG) logerror("MC6850 '%s' Data: %02x\n", tag(), data);
@ -350,11 +352,11 @@ WRITE8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_data_w)
}
/*-------------------------------------------------
acia6850_data_r - Read character
-------------------------------------------------*/
//-------------------------------------------------
// data_r - Read character
//-------------------------------------------------
READ8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_data_r)
READ8_MEMBER( acia6850_device::data_read )
{
m_status &= ~(ACIA6850_STATUS_RDRF | ACIA6850_STATUS_IRQ | ACIA6850_STATUS_PE);
@ -383,9 +385,9 @@ READ8_DEVICE_HANDLER_TRAMPOLINE(acia6850, acia6850_data_r)
}
/*-------------------------------------------------
tx_tick - Transmit a bit
-------------------------------------------------*/
//-------------------------------------------------
// tx_tick - Transmit a bit
//-------------------------------------------------
void acia6850_device::tx_tick()
{
@ -499,24 +501,9 @@ void acia6850_device::tx_tick()
}
/*-------------------------------------------------
transmit_event
-------------------------------------------------*/
TIMER_CALLBACK( acia6850_device::transmit_event_callback ) { reinterpret_cast<acia6850_device *>(ptr)->transmit_event(); }
void acia6850_device::transmit_event()
{
tx_tick();
m_tx_counter = 0;
}
/*-------------------------------------------------
tx_clock_in - As above, but using the tx pin
-------------------------------------------------*/
void acia6850_tx_clock_in(device_t *device) { downcast<acia6850_device*>(device)->tx_clock_in(); }
//-------------------------------------------------
// tx_clock_in - As above, but using the tx pin
//-------------------------------------------------
void acia6850_device::tx_clock_in()
{
@ -542,9 +529,9 @@ void acia6850_device::tx_clock_in()
}
/*-------------------------------------------------
rx_tick - Receive a bit
-------------------------------------------------*/
//-------------------------------------------------
// rx_tick - Receive a bit
//-------------------------------------------------
void acia6850_device::rx_tick()
{
@ -687,25 +674,9 @@ void acia6850_device::rx_tick()
}
/*-------------------------------------------------
TIMER_CALLBACK( receive_event_callback ) -
Called on receive timer event
-------------------------------------------------*/
TIMER_CALLBACK( acia6850_device::receive_event_callback ) { reinterpret_cast<acia6850_device *>(ptr)->receive_event(); }
void acia6850_device::receive_event()
{
rx_tick();
m_rx_counter = 0;
}
/*-------------------------------------------------
rx_clock_in - As above, but using the rx pin
-------------------------------------------------*/
void acia6850_rx_clock_in(device_t *device) { downcast<acia6850_device*>(device)->rx_clock_in(); }
//-------------------------------------------------
// rx_clock_in - As above, but using the rx pin
//-------------------------------------------------
void acia6850_device::rx_clock_in()
{
@ -731,9 +702,9 @@ void acia6850_device::rx_clock_in()
}
/*-------------------------------------------------
set_rx_clock - set receiver clock
-------------------------------------------------*/
//-------------------------------------------------
// set_rx_clock - set receiver clock
//-------------------------------------------------
void acia6850_device::set_rx_clock(int clock)
{
@ -747,20 +718,9 @@ void acia6850_device::set_rx_clock(int clock)
}
/*-------------------------------------------------
acia6850_set_rx_clock - Set clock frequencies
dynamically
-------------------------------------------------*/
void acia6850_set_rx_clock(device_t *device, int clock)
{
downcast<acia6850_device*>(device)->set_rx_clock(clock);
}
/*-------------------------------------------------
set_tx_clock - set receiver clock
-------------------------------------------------*/
//-------------------------------------------------
// set_tx_clock - set receiver clock
//-------------------------------------------------
void acia6850_device::set_tx_clock(int clock)
{
@ -774,20 +734,9 @@ void acia6850_device::set_tx_clock(int clock)
}
/*-------------------------------------------------
acia6850_set_tx_clock - Set clock frequencies
dynamically
-------------------------------------------------*/
void acia6850_set_tx_clock(device_t *device, int clock)
{
downcast<acia6850_device*>(device)->set_tx_clock(clock);
}
/*-------------------------------------------------
receive_data - receive data byte
-------------------------------------------------*/
//-------------------------------------------------
// receive_data - receive data byte
//-------------------------------------------------
void acia6850_device::receive_data(UINT8 data)
{
@ -795,13 +744,3 @@ void acia6850_device::receive_data(UINT8 data)
m_status |= ACIA6850_STATUS_RDRF;
check_interrupts();
}
/*-------------------------------------------------
acia6850_receive_data - Receive data byte
-------------------------------------------------*/
void acia6850_receive_data(device_t *device, UINT8 data)
{
downcast<acia6850_device*>(device)->receive_data(data);
}

View File

@ -34,9 +34,9 @@
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_ACIA6850_ADD(_tag, _config) \
#define MCFG_ACIA6850_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, ACIA6850, 0) \
MCFG_DEVICE_CONFIG(_config)
acia6850_device::static_set_interface(*device, _interface);
#define ACIA6850_INTERFACE(_name) \
const acia6850_interface(_name) =
@ -74,17 +74,14 @@ class acia6850_device : public device_t,
public:
// construction/destruction
acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration helpers
static void static_set_interface(device_t &device, const acia6850_interface &interface);
void acia6850_tx_clock_in();
void acia6850_rx_clock_in();
void acia6850_set_rx_clock(int clock);
void acia6850_set_tx_clock(int clock);
void acia6850_ctrl_w(UINT32 offset, UINT8 data);
UINT8 acia6850_stat_r(UINT32 offset);
void acia6850_data_w(UINT32 offset, UINT8 data);
UINT8 acia6850_data_r(UINT32 offset);
DECLARE_WRITE8_MEMBER( control_write );
DECLARE_READ8_MEMBER( status_read );
DECLARE_WRITE8_MEMBER( data_write );
DECLARE_READ8_MEMBER( data_read );
void tx_clock_in();
void rx_clock_in();
@ -96,16 +93,16 @@ public:
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
virtual void device_post_load() { }
virtual void device_clock_changed() { }
static TIMER_CALLBACK( transmit_event_callback );
static TIMER_CALLBACK( receive_event_callback );
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
enum
{
TIMER_ID_TRANSMIT,
TIMER_ID_RECEIVE
};
void check_interrupts();
@ -151,19 +148,19 @@ private:
int m_divide;
/* Counters */
// Counters
int m_tx_bits;
int m_rx_bits;
int m_tx_parity;
int m_rx_parity;
/* TX/RX state */
// TX/RX state
int m_bits;
parity_type m_parity;
int m_stopbits;
int m_tx_int;
/* Signals */
// Signals
int m_overrun;
int m_reset;
int m_rts;
@ -187,21 +184,4 @@ extern const device_type ACIA6850;
/***************************************************************************
PROTOTYPES
***************************************************************************/
void acia6850_tx_clock_in(device_t *device) ATTR_NONNULL(1);
void acia6850_rx_clock_in(device_t *device) ATTR_NONNULL(1);
void acia6850_set_rx_clock(device_t *device, int clock) ATTR_NONNULL(1);
void acia6850_set_tx_clock(device_t *device, int clock) ATTR_NONNULL(1);
void acia6850_receive_data(device_t *device, UINT8 data) ATTR_NONNULL(1);
WRITE8_DEVICE_HANDLER( acia6850_ctrl_w );
READ8_DEVICE_HANDLER( acia6850_stat_r );
WRITE8_DEVICE_HANDLER( acia6850_data_w );
READ8_DEVICE_HANDLER( acia6850_data_r );
#endif /* __ACIA6850_H__ */

View File

@ -1335,10 +1335,10 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( z80_io_map, AS_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x23) AM_READWRITE(chipset_r, chipset_w)
AM_RANGE(0x24, 0x24) AM_DEVWRITE("acia6850_0", acia6850_ctrl_w)
AM_RANGE(0x25, 0x25) AM_DEVWRITE("acia6850_0", acia6850_data_w)
AM_RANGE(0x26, 0x26) AM_DEVREAD("acia6850_0", acia6850_stat_r)
AM_RANGE(0x27, 0x27) AM_DEVREAD("acia6850_0", acia6850_data_r)
AM_RANGE(0x24, 0x24) AM_DEVWRITE_MODERN("acia6850_0", acia6850_device, control_write)
AM_RANGE(0x25, 0x25) AM_DEVWRITE_MODERN("acia6850_0", acia6850_device, data_write)
AM_RANGE(0x26, 0x26) AM_DEVREAD_MODERN("acia6850_0", acia6850_device, status_read)
AM_RANGE(0x27, 0x27) AM_DEVREAD_MODERN("acia6850_0", acia6850_device, data_read)
AM_RANGE(0x30, 0x30) AM_READ(fdctrl_r)
AM_RANGE(0x31, 0x31) AM_READWRITE(fddata_r, fdctrl_w)
AM_RANGE(0x40, 0x40) AM_WRITE(rombank_w)
@ -1469,10 +1469,10 @@ static ADDRESS_MAP_START( m6809_prog_map, AS_PROGRAM, 8 )
AM_RANGE(0x2E00, 0x2E00) AM_READ(int_latch_r)
AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("aysnd", ay8910_data_w)
AM_RANGE(0x3201, 0x3201) AM_DEVWRITE("aysnd", ay8910_address_w)
AM_RANGE(0x3404, 0x3404) AM_DEVREADWRITE("acia6850_1", acia6850_stat_r, acia6850_ctrl_w)
AM_RANGE(0x3405, 0x3405) AM_DEVREADWRITE("acia6850_1", acia6850_data_r, acia6850_data_w)
AM_RANGE(0x3406, 0x3406) AM_DEVREADWRITE("acia6850_2", acia6850_stat_r, acia6850_ctrl_w)
AM_RANGE(0x3407, 0x3407) AM_DEVREADWRITE("acia6850_2", acia6850_data_r, acia6850_data_w)
AM_RANGE(0x3404, 0x3404) AM_DEVREADWRITE_MODERN("acia6850_1", acia6850_device, status_read, control_write)
AM_RANGE(0x3405, 0x3405) AM_DEVREADWRITE_MODERN("acia6850_1", acia6850_device, data_read, data_write)
AM_RANGE(0x3406, 0x3406) AM_DEVREADWRITE_MODERN("acia6850_2", acia6850_device, status_read, control_write)
AM_RANGE(0x3407, 0x3407) AM_DEVREADWRITE_MODERN("acia6850_2", acia6850_device, data_read, data_write)
// AM_RANGE(0x3408, 0x3408) AM_NOP
// AM_RANGE(0x340A, 0x340A) AM_NOP
// AM_RANGE(0x3600, 0x3600) AM_NOP

View File

@ -434,11 +434,11 @@ static ADDRESS_MAP_START( memmap, AS_PROGRAM, 8 )
AM_RANGE(0x3001, 0x3001) AM_READNOP //sound latch
AM_RANGE(0x3200, 0x3200) AM_DEVWRITE("aysnd", ay8910_address_w)
AM_RANGE(0x3402, 0x3402) AM_DEVWRITE("acia6850_0", acia6850_ctrl_w)
AM_RANGE(0x3403, 0x3403) AM_DEVWRITE("acia6850_0", acia6850_data_w)
AM_RANGE(0x3402, 0x3402) AM_DEVWRITE_MODERN("acia6850_0", acia6850_device, control_write)
AM_RANGE(0x3403, 0x3403) AM_DEVWRITE_MODERN("acia6850_0", acia6850_device, data_write)
AM_RANGE(0x3406, 0x3406) AM_DEVREAD("acia6850_0", acia6850_stat_r)
AM_RANGE(0x3407, 0x3407) AM_DEVREAD("acia6850_0", acia6850_data_r)
AM_RANGE(0x3406, 0x3406) AM_DEVREAD_MODERN("acia6850_0", acia6850_device, status_read)
AM_RANGE(0x3407, 0x3407) AM_DEVREAD_MODERN("acia6850_0", acia6850_device, data_read)
AM_RANGE(0x3600, 0x3600) AM_WRITE(mux_enable_w) // mux enable

View File

@ -662,8 +662,9 @@ static WRITE_LINE_DEVICE_HANDLER( tx_rx_clk )
int trx_clk;
UINT8 dsw2 = input_port_read(device->machine(), "SW2");
trx_clk = UART_CLOCK * dsw2 / 128;
acia6850_set_rx_clock(device, trx_clk);
acia6850_set_tx_clock(device, trx_clk);
acia6850_device *acia = downcast<acia6850_device *>(device);
acia->set_rx_clock(trx_clk);
acia->set_tx_clock(trx_clk);
}
@ -842,8 +843,8 @@ static ADDRESS_MAP_START( sys903_map, AS_PROGRAM, 8 )
AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE_MODERN("pia0", pia6821_device, read, write)
AM_RANGE(0x08c8, 0x08cb) AM_DEVREADWRITE_MODERN("pia1", pia6821_device, read, write)
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(0x08d0, 0x08d0) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, status_read, control_write)
AM_RANGE(0x08d1, 0x08d1) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, data_read, data_write)
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(calomega_videoram_w) AM_BASE_MEMBER(calomega_state, m_videoram)
AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(calomega_colorram_w) AM_BASE_MEMBER(calomega_state, m_colorram)
AM_RANGE(0x1800, 0x3fff) AM_ROM

View File

@ -286,19 +286,19 @@ static ADDRESS_MAP_START( 68000_map, AS_PROGRAM, 16 )
AM_RANGE(0x020000, 0x03ffff) AM_ROMBANK("bank1")
AM_RANGE(0x040000, 0x043fff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0x046000, 0x046001) AM_WRITENOP
AM_RANGE(0x046020, 0x046021) AM_DEVREADWRITE8("acia6850_0", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0x046022, 0x046023) AM_DEVREADWRITE8("acia6850_0", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0x046020, 0x046021) AM_DEVREADWRITE8_MODERN("acia6850_0", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0x046022, 0x046023) AM_DEVREADWRITE8_MODERN("acia6850_0", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0x046040, 0x04604f) AM_DEVREADWRITE8_MODERN("6840ptm", ptm6840_device, read, write, 0xff)
AM_RANGE(0x046060, 0x046061) AM_READ_PORT("DIRECT") AM_WRITENOP
AM_RANGE(0x046062, 0x046063) AM_WRITENOP
AM_RANGE(0x046064, 0x046065) AM_WRITENOP
AM_RANGE(0x046066, 0x046067) AM_WRITENOP
AM_RANGE(0x046080, 0x046081) AM_DEVREADWRITE8("acia6850_1", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0x046082, 0x046083) AM_DEVREADWRITE8("acia6850_1", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0x046080, 0x046081) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0x046082, 0x046083) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0x046084, 0x046085) AM_READ(unk_r) // PIA?
AM_RANGE(0x046088, 0x046089) AM_READ(unk_r) // PIA?
AM_RANGE(0x04608c, 0x04608d) AM_DEVREADWRITE8("acia6850_2", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0x04608e, 0x04608f) AM_DEVREADWRITE8("acia6850_2", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0x04608c, 0x04608d) AM_DEVREADWRITE8_MODERN("acia6850_2", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0x04608e, 0x04608f) AM_DEVREADWRITE8_MODERN("acia6850_2", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0x0460a0, 0x0460a3) AM_DEVWRITE8("ym2413", ym2413_w, 0x00ff)
AM_RANGE(0x0460c0, 0x0460c1) AM_WRITENOP
AM_RANGE(0x0460e0, 0x0460e5) AM_WRITE(ramdac_w)

View File

@ -349,12 +349,12 @@ static WRITE8_DEVICE_HANDLER( vid_o1_callback )
if (data)
{
device_t *acia_0 = device->machine().device("acia6850_0");
device_t *acia_1 = device->machine().device("acia6850_1");
acia6850_tx_clock_in(acia_0);
acia6850_rx_clock_in(acia_0);
acia6850_tx_clock_in(acia_1);
acia6850_rx_clock_in(acia_1);
acia6850_device *acia_0 = device->machine().device<acia6850_device>("acia6850_0");
acia6850_device *acia_1 = device->machine().device<acia6850_device>("acia6850_1");
acia_0->tx_clock_in();
acia_0->rx_clock_in();
acia_1->tx_clock_in();
acia_1->rx_clock_in();
}
}
@ -1969,8 +1969,8 @@ static ADDRESS_MAP_START( mpu4_68k_map, AS_PROGRAM, 16 )
/* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w)
AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8_MODERN("6840ptm_68k", ptm6840_device, read, write, 0xff)
AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE(characteriser16_r, characteriser16_w)
ADDRESS_MAP_END
@ -1978,8 +1978,8 @@ ADDRESS_MAP_END
/* TODO: Fix up MPU4 map*/
static ADDRESS_MAP_START( mpu4_6809_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE("acia6850_0", acia6850_stat_r, acia6850_ctrl_w)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("acia6850_0", acia6850_data_r, acia6850_data_w)
AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, status_read, control_write)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, data_read, data_write)
AM_RANGE(0x0880, 0x0881) AM_NOP //Read/write here
AM_RANGE(0x0900, 0x0907) AM_DEVREADWRITE_MODERN("ptm_ic2", ptm6840_device, read, write)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE_MODERN("pia_ic3", pia6821_device, read, write)
@ -2004,16 +2004,16 @@ static ADDRESS_MAP_START( vp_68k_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w)
/* AM_RANGE(0xe05000, 0xe05001) AM_READWRITE(adpcm_r, adpcm_w) */
AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8_MODERN("6840ptm_68k", ptm6840_device, read, write, 0xff)
/* AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE(characteriser16_r, characteriser16_w) Word-based version of old CHR??? */
ADDRESS_MAP_END
static ADDRESS_MAP_START( bwbvid_6809_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE("acia6850_0", acia6850_stat_r, acia6850_ctrl_w)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("acia6850_0", acia6850_data_r, acia6850_data_w)
AM_RANGE(0x0800, 0x0800) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, status_read, control_write)
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE_MODERN("acia6850_0", acia6850_device, data_read, data_write)
AM_RANGE(0x0880, 0x0881) //AM_NOP //Read/write here
AM_RANGE(0x0900, 0x0907) AM_DEVREADWRITE_MODERN("ptm_ic2", ptm6840_device, read, write)
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE_MODERN("pia_ic3", pia6821_device, read, write)
@ -2038,8 +2038,8 @@ static ADDRESS_MAP_START( bwbvid_68k_map, AS_PROGRAM, 16 )
/* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w)
AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8_MODERN("6840ptm_68k", ptm6840_device, read, write, 0xff)
//AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(bwb_characteriser16_r, bwb_characteriser16_w)//AM_READWRITE(adpcm_r, adpcm_w) CHR ?
ADDRESS_MAP_END
@ -2055,8 +2055,8 @@ static ADDRESS_MAP_START( bwbvid5_68k_map, AS_PROGRAM, 16 )
/* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w)
AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w)
AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_stat_r, acia6850_ctrl_w, 0xff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_data_r, acia6850_data_w, 0xff)
AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, status_read, control_write, 0xff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8_MODERN("acia6850_1", acia6850_device, data_read, data_write, 0xff)
AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8_MODERN("6840ptm_68k", ptm6840_device, read, write, 0xff)
AM_RANGE(0xe02000, 0xe02007) AM_DEVREADWRITE8_MODERN("pia_ic4ss", pia6821_device, read, write, 0xff)
AM_RANGE(0xe03000, 0xe0300f) AM_DEVREADWRITE8_MODERN("6840ptm_ic3ss", ptm6840_device, read, write, 0xff)