trunk/src/emu/machine/lpc-pit.c
| r0 | r242247 | |
| 1 | #include "lpc-pit.h" |
| 2 | |
| 3 | const device_type LPC_PIT = &device_creator<lpc_pit_device>; |
| 4 | |
| 5 | DEVICE_ADDRESS_MAP_START(map, 32, lpc_pit_device) |
| 6 | AM_RANGE(0x40, 0x43) AM_READWRITE8(status_r, access_w, 0x00ffffff) |
| 7 | AM_RANGE(0x40, 0x43) AM_WRITE8 ( control_w, 0xff000000) |
| 8 | AM_RANGE(0x50, 0x53) AM_READWRITE8(status_r, access_w, 0x00ffffff) |
| 9 | AM_RANGE(0x50, 0x53) AM_WRITE8 ( control_w, 0xff000000) |
| 10 | ADDRESS_MAP_END |
| 11 | |
| 12 | lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 13 | : lpc_device(mconfig, LPC_PIT, "LPC PIT", tag, owner, clock, "lpc_pit", __FILE__) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | void lpc_pit_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space, |
| 18 | UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space) |
| 19 | { |
| 20 | io_space->install_device(io_offset, io_window_end, *this, &lpc_pit_device::map); |
| 21 | } |
| 22 | |
| 23 | void lpc_pit_device::device_start() |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | void lpc_pit_device::device_reset() |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | READ8_MEMBER( lpc_pit_device::status_r) |
| 32 | { |
| 33 | logerror("%s: status_r %d\n", tag(), offset); |
| 34 | return 0xff; |
| 35 | } |
| 36 | |
| 37 | WRITE8_MEMBER(lpc_pit_device::access_w) |
| 38 | { |
| 39 | logerror("%s: access_w %d, %02x\n", tag(), offset, data); |
| 40 | } |
| 41 | |
| 42 | WRITE8_MEMBER(lpc_pit_device::control_w) |
| 43 | { |
| 44 | logerror("%s: control_w %02x\n", tag(), data); |
| 45 | } |
trunk/src/emu/machine/lpc-pit.h
| r0 | r242247 | |
| 1 | #ifndef LPC_PIT_H |
| 2 | #define LPC_PIT_H |
| 3 | |
| 4 | #include "lpc.h" |
| 5 | |
| 6 | #define MCFG_LPC_PIT_ADD(_tag) \ |
| 7 | MCFG_DEVICE_ADD(_tag, LPC_PIT, 0) |
| 8 | |
| 9 | class lpc_pit_device : public lpc_device { |
| 10 | public: |
| 11 | lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 12 | |
| 13 | virtual void map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space, |
| 14 | UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space); |
| 15 | |
| 16 | DECLARE_READ8_MEMBER( status_r); |
| 17 | DECLARE_WRITE8_MEMBER(access_w); |
| 18 | DECLARE_WRITE8_MEMBER(control_w); |
| 19 | |
| 20 | protected: |
| 21 | void device_start(); |
| 22 | void device_reset(); |
| 23 | |
| 24 | private: |
| 25 | DECLARE_ADDRESS_MAP(map, 32); |
| 26 | }; |
| 27 | |
| 28 | extern const device_type LPC_PIT; |
| 29 | |
| 30 | #endif |