1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#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"),
m_ram(*this, RAM_TAG),
m_rom(*this, Z80_TAG),
m_char_rom(*this, UPD3301_TAG)
{ }
required_device<cpu_device> m_maincpu;
required_device<upd1990a_device> m_rtc;
required_device<i8257_device> m_dma;
required_device<upd3301_device> m_crtc;
required_device<cassette_image_device> m_cassette;
required_device<centronics_device> m_centronics;
required_device<speaker_sound_device> m_speaker;
required_device<ram_device> m_ram;
required_memory_region m_rom;
required_memory_region m_char_rom;
virtual void machine_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 */
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),
m_kanji_rom(*this, "kanji")
{ }
required_memory_region m_kanji_rom;
DECLARE_WRITE8_MEMBER( port31_w );
};
#endif
|