From 7285b359d259b2ae0fdf85096571c386ec8c991a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 21 Aug 2012 10:41:19 +0000 Subject: Merge of MESS sources (no whatsnew) --- src/mess/includes/pc8001.h | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/mess/includes/pc8001.h (limited to 'src/mess/includes/pc8001.h') diff --git a/src/mess/includes/pc8001.h b/src/mess/includes/pc8001.h new file mode 100644 index 00000000000..9a11f471352 --- /dev/null +++ b/src/mess/includes/pc8001.h @@ -0,0 +1,82 @@ +#pragma once + +#ifndef __PC8001__ +#define __PC8001__ + + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "imagedev/cassette.h" +#include "machine/ctronics.h" +#include "machine/8257dma.h" +#include "machine/i8255.h" +#include "machine/i8251.h" +#include "machine/ram.h" +#include "machine/upd1990a.h" +#include "sound/speaker.h" +#include "video/upd3301.h" + +#define Z80_TAG "z80" +#define I8251_TAG "i8251" +#define I8255A_TAG "i8255" +#define I8257_TAG "i8257" +#define UPD1990A_TAG "upd1990a" +#define UPD3301_TAG "upd3301" +#define CENTRONICS_TAG "centronics" +#define SCREEN_TAG "screen" + +class pc8001_state : public driver_device +{ +public: + pc8001_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, Z80_TAG), + m_rtc(*this, UPD1990A_TAG), + m_dma(*this, I8257_TAG), + m_crtc(*this, UPD3301_TAG), + m_cassette(*this, CASSETTE_TAG), + m_centronics(*this, CENTRONICS_TAG), + m_speaker(*this, SPEAKER_TAG), + m_ram(*this, RAM_TAG) + { } + + required_device m_maincpu; + required_device m_rtc; + required_device m_dma; + required_device m_crtc; + required_device m_cassette; + required_device m_centronics; + required_device m_speaker; + required_device m_ram; + + virtual void machine_start(); + + virtual void video_start(); + + DECLARE_WRITE8_MEMBER( port10_w ); + DECLARE_WRITE8_MEMBER( port30_w ); + DECLARE_READ8_MEMBER( port40_r ); + DECLARE_WRITE8_MEMBER( port40_w ); + DECLARE_WRITE_LINE_MEMBER( crtc_drq_w ); + DECLARE_WRITE_LINE_MEMBER( hrq_w ); + DECLARE_WRITE8_MEMBER( dma_mem_w ); + DECLARE_READ8_MEMBER( dma_io_r ); + DECLARE_WRITE8_MEMBER( dma_io_w ); + + /* video state */ + UINT8 *m_char_rom; + int m_width80; + int m_color; +}; + +class pc8001mk2_state : public pc8001_state +{ +public: + pc8001mk2_state(const machine_config &mconfig, device_type type, const char *tag) + : pc8001_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER( port31_w ); +}; + +#endif -- cgit v1.2.3-70-g09d2