blob: a15d02a963a28951736a78babd5252da5b9aac5c (
plain) (
blame)
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
87
88
89
90
91
92
|
// license:BSD-3-Clause
// copyright-holders:AJR
/******************************************************************************
Video System C7-01 GGA
*******************************************************************************
_____ _____
? 1 |* \_/ | 64 ?
H0 2 | | 63 ?
H1 3 | | 62 V.I
H2 4 | | 61 CS
? 5 | | 60 D0
? 6 | | 59 D1
? 7 | | 58 D2
? 8 | | 57 D3
? 9 | | 56 D4
? 10 | | 55 D5
H3 11 | | 54 D6
H4 12 | | 53 D7
H5 13 | | 52 RES
? 14 | | 51 CLOCK
? 15 | V-SYSTEM | 50 INV
H6 16 | C7-01 | 49 ?
H7 17 | GGA | 48 A0?
? 18 | | 47 ?
? 19 | | 46 ?
? 20 | | 45 ?
H8 21 | | 44 ?
V0 22 | | 43 V7
/H3 23 | | 42 /BLANK
/H2 24 | | 41 VEL? (INTCL)
/H1 25 | | 40 /SYNC
? 26 | | 39 ?
? 27 | | 38 ?
V1 28 | | 37 ?
V2 29 | | 36 V7
V3 30 | | 35 V6
/H0 31 | | 34 V4
? 32 |_____________| 33 ?
******************************************************************************/
#ifndef MAME_VIDEO_VSYSTEM_GGA_H
#define MAME_VIDEO_VSYSTEM_GGA_H
#pragma once
//**************************************************************************
// CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VSYSTEM_GGA_REGISTER_WRITE_CB(_devcb) \
devcb = &downcast<vsystem_gga_device &>(*device).set_write_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> vsystem_gga_device
class vsystem_gga_device : public device_t, public device_video_interface
{
public:
// construction/destruction
vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration
template<class Obj> devcb_base &set_write_cb(Obj &&object) { return m_write_cb.set_callback(std::forward<Obj>(object)); }
// memory handlers
DECLARE_WRITE8_MEMBER(write);
// temporary accessor
u8 reg(u8 offset) const { return m_regs[offset]; }
protected:
// device-level overrides
virtual void device_start() override;
private:
// internal state
u8 m_address_latch;
u8 m_regs[16];
devcb_write8 m_write_cb;
};
// device type definition
DECLARE_DEVICE_TYPE(VSYSTEM_GGA, vsystem_gga_device)
#endif // MAME_VIDEO_VSYSTEM_GGA_H
|