summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/a51xx.cpp
blob: c1a93dd266cfa67fa66b357505db0b2a6abe6a0d (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic
/***************************************************************************

    A51xx

    12/05/2009 Skeleton driver.

    http://www.robotrontechnik.de/index.htm?/html/computer/a5120.htm
    http://www.robotrontechnik.de/index.htm?/html/computer/a5130.htm

****************************************************************************/

#include "emu.h"
#include "cpu/z80/z80.h"

#include "screen.h"


class a51xx_state : public driver_device
{
public:
	a51xx_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag) ,
		m_maincpu(*this, "maincpu") { }

	virtual void machine_reset() override;
	virtual void video_start() override;
	DECLARE_MACHINE_RESET(a5130);
	DECLARE_VIDEO_START(a5130);
	uint32_t screen_update_a5120(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	uint32_t screen_update_a5130(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	required_device<cpu_device> m_maincpu;
	void a5130(machine_config &config);
	void a5120(machine_config &config);
	void a5120_io(address_map &map);
	void a5120_mem(address_map &map);
	void a5130_io(address_map &map);
	void a5130_mem(address_map &map);
};


void a51xx_state::a5120_mem(address_map &map)
{
	map.unmap_value_high();
	map(0x0000, 0x03ff).rom();
	map(0x0400, 0xffff).ram();
}

void a51xx_state::a5120_io(address_map &map)
{
	map.unmap_value_high();
	map.global_mask(0xff);
}

void a51xx_state::a5130_mem(address_map &map)
{
	map.unmap_value_high();
	map(0x0000, 0x0fff).rom();
	map(0x1000, 0xffff).ram();
}

void a51xx_state::a5130_io(address_map &map)
{
	map.unmap_value_high();
	map.global_mask(0xff);
}


/* Input ports */
static INPUT_PORTS_START( a5120 )
INPUT_PORTS_END


void a51xx_state::machine_reset()
{
}

void a51xx_state::video_start()
{
}

uint32_t a51xx_state::screen_update_a5120(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	return 0;
}


/* Input ports */
static INPUT_PORTS_START( a5130 )
INPUT_PORTS_END


MACHINE_RESET_MEMBER(a51xx_state,a5130)
{
}

VIDEO_START_MEMBER(a51xx_state,a5130)
{
}

uint32_t a51xx_state::screen_update_a5130(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	return 0;
}

/* F4 Character Displayer */
static const gfx_layout a51xx_charlayout =
{
	8, 16,                  /* 8 x 16 characters */
	128,                    /* 128 characters */
	1,                  /* 1 bits per pixel */
	{ 0 },                  /* no bitplanes */
	/* x offsets */
	{ 0, 1, 2, 3, 4, 5, 6, 7 },
	/* y offsets */
	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 1024*8, 1025*8, 1026*8, 1027*8, 1028*8, 1029*8, 1030*8, 1031*8 },
	8*8                 /* every char takes 2 x 8 bytes */
};

static GFXDECODE_START( a51xx )
	GFXDECODE_ENTRY( "chargen", 0x0000, a51xx_charlayout, 0, 1 )
GFXDECODE_END

MACHINE_CONFIG_START(a51xx_state::a5120)
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu",Z80, XTAL(4'000'000))
	MCFG_CPU_PROGRAM_MAP(a5120_mem)
	MCFG_CPU_IO_MAP(a5120_io)


	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(50)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
	MCFG_SCREEN_SIZE(640, 480)
	MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
	MCFG_SCREEN_UPDATE_DRIVER(a51xx_state, screen_update_a5120)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", a51xx)

	MCFG_PALETTE_ADD_MONOCHROME("palette")

MACHINE_CONFIG_END

MACHINE_CONFIG_START(a51xx_state::a5130)
	a5120(config);
	/* basic machine hardware */
	MCFG_CPU_MODIFY("maincpu")
	MCFG_CPU_PROGRAM_MAP(a5130_mem)
	MCFG_CPU_IO_MAP(a5130_io)

	MCFG_MACHINE_RESET_OVERRIDE(a51xx_state,a5130)

	/* video hardware */
	MCFG_SCREEN_MODIFY("screen")
	MCFG_SCREEN_UPDATE_DRIVER(a51xx_state, screen_update_a5130)

	MCFG_VIDEO_START_OVERRIDE(a51xx_state,a5130)
MACHINE_CONFIG_END

/* ROM definition */
ROM_START( a5120 )
	ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
	ROM_SYSTEM_BIOS( 0, "v1", "v1" )
	ROMX_LOAD( "a5120_v1.rom", 0x0000, 0x0400, CRC(b2b3fee0) SHA1(6198513b263d8a7a867f1dda368b415bb37fcdae), ROM_BIOS(1))
	ROM_SYSTEM_BIOS( 1, "v2", "v2" )
	ROMX_LOAD( "a5120_v2.rom", 0x0000, 0x0400, CRC(052386c2) SHA1(e545d30a0882cb7ee7acdbea842b57440552e4a6), ROM_BIOS(2))

	ROM_REGION(0x0800, "chargen",0)
	ROM_LOAD( "bab47_1_lat.bin", 0x0000, 0x0400, CRC(93220886) SHA1(a5a1ab4e2e06eabc58c84991caa6a1cf55f1462d))
	ROM_LOAD( "bab46_2_lat.bin", 0x0400, 0x0400, CRC(7a578ec8) SHA1(d17d3f1c182c23e9e9fd4dd56f3ac3de4c18fb1a))
ROM_END

/* ROM definition */
ROM_START( a5130 )
	ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
	ROM_LOAD( "dzr5130.rom", 0x0000, 0x1000, CRC(4719beb7) SHA1(09295a658b8c5b75b20faea57ad925f69f07a9b5))

	ROM_REGION(0x0800, "chargen",0)
	ROM_LOAD( "bab47_1_lat.bin", 0x0000, 0x0400, CRC(93220886) SHA1(a5a1ab4e2e06eabc58c84991caa6a1cf55f1462d))
	ROM_LOAD( "bab46_2_lat.bin", 0x0400, 0x0400, CRC(7a578ec8) SHA1(d17d3f1c182c23e9e9fd4dd56f3ac3de4c18fb1a))
ROM_END

/* Driver */

//    YEAR  NAME    PARENT  COMPAT   MACHINE     INPUT  STATE         INIT    COMPANY           FULLNAME  FLAGS
COMP( 1982, a5120,  0,      0,       a5120,      a5120, a51xx_state,  0,      "VEB Robotron",   "A5120",  MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
COMP( 1983, a5130,  a5120,  0,       a5130,      a5130, a51xx_state,  0,      "VEB Robotron",   "A5130",  MACHINE_NOT_WORKING | MACHINE_NO_SOUND )