diff options
author | 2012-12-18 00:40:17 +0000 | |
---|---|---|
committer | 2012-12-18 00:40:17 +0000 | |
commit | 4a807320a985fcfe6aaf04daec5e599e47a68822 (patch) | |
tree | 0f5cf012d67992addf9a5a24f92f27098d4d2a1a /src/mess/machine/pc9801_26.h | |
parent | 8b185b0edc1240d9a2becd7ab518eff103319c02 (diff) |
Preliminary slot interface for PC-9801, added support for PC-9801-26 sound board as an example
Diffstat (limited to 'src/mess/machine/pc9801_26.h')
-rw-r--r-- | src/mess/machine/pc9801_26.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/mess/machine/pc9801_26.h b/src/mess/machine/pc9801_26.h new file mode 100644 index 00000000000..536603d31ae --- /dev/null +++ b/src/mess/machine/pc9801_26.h @@ -0,0 +1,69 @@ +/*************************************************************************** + +Template for skeleton device + +***************************************************************************/ + + +#pragma once + +#ifndef __PC9801_26DEV_H__ +#define __PC9801_26DEV_H__ + +#include "machine/pic8259.h" +#include "sound/2203intf.h" + +#define MCFG_PC9801_26_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \ + MCFG_DEVICE_ADD(_tag, PC9801_26, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false) + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> pc9801_26_device + +class pc9801_26_device : public device_t +{ +public: + // construction/destruction + pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual ioport_constructor device_input_ports() const; + + DECLARE_READ8_MEMBER(opn_porta_r); + DECLARE_WRITE8_MEMBER(opn_portb_w); + DECLARE_READ8_MEMBER(pc9801_26_r); + DECLARE_WRITE8_MEMBER(pc9801_26_w); + +// required_device<cpu_device> m_maincpu; + required_device<ym2203_device> m_opn; +protected: + // device-level overrides + virtual void device_validity_check(validity_checker &valid) const; + virtual void device_start(); + virtual void device_reset(); + virtual void device_config_complete() { m_shortname = "pc9801_26"; } + void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); + +private: + UINT8 m_joy_sel; + +}; + + +// device type definition +extern const device_type PC9801_26; + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + + +#endif |