mirror of
https://github.com/holub/mame
synced 2025-05-19 20:29:09 +03:00
Sync with MESS, changes by Oliver Galibert (no whatsnew)
This commit is contained in:
parent
095b050750
commit
b2003b6f46
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -791,6 +791,8 @@ src/emu/machine/adc1213x.c svneol=native#text/plain
|
||||
src/emu/machine/adc1213x.h svneol=native#text/plain
|
||||
src/emu/machine/am53cf96.c svneol=native#text/plain
|
||||
src/emu/machine/am53cf96.h svneol=native#text/plain
|
||||
src/emu/machine/am8530h.c svneol=native#text/plain
|
||||
src/emu/machine/am8530h.h svneol=native#text/plain
|
||||
src/emu/machine/at28c16.c svneol=native#text/plain
|
||||
src/emu/machine/at28c16.h svneol=native#text/plain
|
||||
src/emu/machine/cdp1852.c svneol=native#text/plain
|
||||
|
@ -159,6 +159,7 @@ EMUMACHINEOBJS = \
|
||||
$(EMUMACHINE)/adc1038.o \
|
||||
$(EMUMACHINE)/adc1213x.o \
|
||||
$(EMUMACHINE)/am53cf96.o \
|
||||
$(EMUMACHINE)/am8530h.o \
|
||||
$(EMUMACHINE)/at28c16.o \
|
||||
$(EMUMACHINE)/cdp1852.o \
|
||||
$(EMUMACHINE)/cdp1871.o \
|
||||
|
57
src/emu/machine/am8530h.c
Normal file
57
src/emu/machine/am8530h.c
Normal file
@ -0,0 +1,57 @@
|
||||
#include "am8530h.h"
|
||||
|
||||
const device_type AM8530H = &device_creator<am8530h_device>;
|
||||
|
||||
am8530h_device::am8530h_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, AM8530H, "AM8530H", tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
void am8530h_device::set_int_change_cb(int_cb_t _int_change_cb)
|
||||
{
|
||||
int_change_cb = _int_change_cb;
|
||||
}
|
||||
|
||||
|
||||
void am8530h_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
READ8_MEMBER( am8530h_device::ca_r )
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
READ8_MEMBER( am8530h_device::cb_r )
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
READ8_MEMBER( am8530h_device::da_r )
|
||||
{
|
||||
return 0x40;
|
||||
}
|
||||
|
||||
READ8_MEMBER( am8530h_device::db_r )
|
||||
{
|
||||
return 0x40;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( am8530h_device::ca_w )
|
||||
{
|
||||
fprintf(stderr, "ca_w %x, %02x\n", offset, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( am8530h_device::cb_w )
|
||||
{
|
||||
fprintf(stderr, "cb_w %x, %02x\n", offset, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( am8530h_device::da_w )
|
||||
{
|
||||
fprintf(stderr, "da_w %x, %02x\n", offset, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( am8530h_device::db_w )
|
||||
{
|
||||
fprintf(stderr, "db_w %x, %02x\n", offset, data);
|
||||
}
|
42
src/emu/machine/am8530h.h
Normal file
42
src/emu/machine/am8530h.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef __AM8530H_H__
|
||||
#define __AM8530H_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#define MCFG_AM8530H_ADD(_tag, _int_change_cb) \
|
||||
MCFG_DEVICE_ADD(_tag, AM8530H, 0) \
|
||||
downcast<am8530h_device *>(device)->set_int_change_cb(_int_change_cb);
|
||||
|
||||
class am8530h_device : public device_t {
|
||||
public:
|
||||
typedef delegate<void ()> int_cb_t;
|
||||
|
||||
am8530h_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
void set_int_change_cb(int_cb_t int_change_cb);
|
||||
|
||||
DECLARE_READ8_MEMBER(ca_r);
|
||||
DECLARE_READ8_MEMBER(cb_r);
|
||||
DECLARE_READ8_MEMBER(da_r);
|
||||
DECLARE_READ8_MEMBER(db_r);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ca_w);
|
||||
DECLARE_WRITE8_MEMBER(cb_w);
|
||||
DECLARE_WRITE8_MEMBER(da_w);
|
||||
DECLARE_WRITE8_MEMBER(db_w);
|
||||
|
||||
void data_a_w(UINT8 val);
|
||||
void data_b_w(UINT8 val);
|
||||
|
||||
void int_ack();
|
||||
bool int_level_get();
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
|
||||
private:
|
||||
int_cb_t int_change_cb;
|
||||
};
|
||||
|
||||
extern const device_type AM8530H;
|
||||
|
||||
#endif
|
@ -844,6 +844,14 @@ void mc68901_device::device_start()
|
||||
|
||||
void mc68901_device::device_reset()
|
||||
{
|
||||
m_xmit_state = XMIT_OFF;
|
||||
m_rx_state = SERIAL_STOP;
|
||||
m_rx_buffer = 0;
|
||||
m_tx_buffer = 0;
|
||||
|
||||
// Avoid read-before-write
|
||||
m_ipr = m_imr = 0;
|
||||
|
||||
register_w(REGISTER_GPIP, 0);
|
||||
register_w(REGISTER_AER, 0);
|
||||
register_w(REGISTER_DDR, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user