diff options
author | 2012-08-21 10:41:19 +0000 | |
---|---|---|
committer | 2012-08-21 10:41:19 +0000 | |
commit | 7285b359d259b2ae0fdf85096571c386ec8c991a (patch) | |
tree | a027aff57f1a255f9ec6cfd3b68cabe4b6683998 /src/mess/machine/nextmo.h | |
parent | 67c425e90757876a6716b7867df30c0149912e74 (diff) |
Merge of MESS sources (no whatsnew)
Diffstat (limited to 'src/mess/machine/nextmo.h')
-rw-r--r-- | src/mess/machine/nextmo.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/mess/machine/nextmo.h b/src/mess/machine/nextmo.h new file mode 100644 index 00000000000..e105464377a --- /dev/null +++ b/src/mess/machine/nextmo.h @@ -0,0 +1,56 @@ +#ifndef NEXTMO_H +#define NEXTMO_H + +#define MCFG_NEXTMO_ADD(_tag, _irq, _drq) \ + MCFG_DEVICE_ADD(_tag, NEXTMO, 0) \ + downcast<nextmo_device *>(device)->set_cb(_irq, _drq); + +class nextmo_device : public device_t +{ +public: + nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + void set_cb(line_cb_t irq_cb, line_cb_t drq_cb); + + DECLARE_ADDRESS_MAP(map, 32); + + DECLARE_READ8_MEMBER(r4_r); + DECLARE_WRITE8_MEMBER(r4_w); + DECLARE_READ8_MEMBER(r5_r); + DECLARE_WRITE8_MEMBER(r5_w); + DECLARE_READ8_MEMBER(r6_r); + DECLARE_WRITE8_MEMBER(r6_w); + DECLARE_READ8_MEMBER(r7_r); + DECLARE_WRITE8_MEMBER(r7_w); + DECLARE_READ8_MEMBER(r8_r); + DECLARE_WRITE8_MEMBER(r8_w); + DECLARE_READ8_MEMBER(r9_r); + DECLARE_WRITE8_MEMBER(r9_w); + DECLARE_READ8_MEMBER(ra_r); + DECLARE_WRITE8_MEMBER(ra_w); + DECLARE_READ8_MEMBER(rb_r); + DECLARE_WRITE8_MEMBER(rb_w); + DECLARE_READ8_MEMBER(r10_r); + DECLARE_WRITE8_MEMBER(r10_w); + + UINT8 dma_r(); + void dma_w(UINT8 data); + +protected: + virtual void device_start(); + virtual void device_reset(); + +private: + UINT8 sector[0x510]; + UINT8 r4, r5, r6, r7; + line_cb_t irq_cb, drq_cb; + int sector_pos; + + void check_dma_end(); + void check_ecc(); + void compute_ecc(); +}; + +extern const device_type NEXTMO; + +#endif |