Previous 15994 Revisions Next

r8774 Saturday 14th August, 2010 at 16:40:54 UTC by Dirk Best
[RT1715] Added latin/cyrillic variant, added some inital keyboard work (likely wrong), cleaned up.
[src/mess]messdriv.c
[src/mess/drivers]rt1715.c

src/mess/messdriv.c
r8773r8774
13401340
13411341   /* Robotron 1715 */
13421342   DRIVER (rt1715)
1343   DRIVER (rt1715lc) /* (latin/cyrillic) */
13431344   DRIVER (rt1715w)
13441345
13451346   /* Z1013 */
src/mess/drivers/rt1715.c
r8773r8774
11/***************************************************************************
22
3        Robotron 1715 video driver by Miodrag Milanovic
3        Robotron PC-1715
44
55        10/06/2008 Preliminary driver.
66
7
8   Notes:
9
10   - keyboard connected to sio channel a
11   - sio channel a clock output connected to ctc trigger 0
12
713****************************************************************************/
814
9
1015#include "emu.h"
1116#include "cpu/z80/z80.h"
12#include "cpu/i8085/i8085.h"
13#include "machine/i8255a.h"
14#include "machine/i8257.h"
17#include "machine/z80ctc.h"
18#include "machine/z80sio.h"
19#include "machine/z80pio.h"
20#include "machine/z80dma.h"
21#include "devices/messram.h"
1522#include "video/i8275.h"
16#include "devices/cassette.h"
17#include "formats/rk_cas.h"
18#include "includes/rt1715.h"
19#include "devices/messram.h"
2023
21static WRITE8_HANDLER (rt1717_set_bank )
24
25/***************************************************************************
26    FLOPPY
27***************************************************************************/
28
29static WRITE8_HANDLER( rt1715_floppy_enable )
2230{
31   logerror("%s: rt1715_floppy_enable %02x\n", cpuexec_describe_context(space->machine), data);
32}
33
34
35/***************************************************************************
36    KEYBOARD
37***************************************************************************/
38
39/* si/so led */
40static READ8_HANDLER( k7658_led1_r )
41{
42   static int led1_val = 0;
43   led1_val ^= 1;
44   logerror("%s: k7658_led1_r %02x\n", cpuexec_describe_context(space->machine), led1_val);
45   return 0xff;
46}
47
48/* caps led */
49static READ8_HANDLER( k7658_led2_r )
50{
51   static int led2_val = 0;
52   led2_val ^= 1;
53   logerror("%s: k7658_led2_r %02x\n", cpuexec_describe_context(space->machine), led2_val);
54   return 0xff;
55}
56
57/* read key state */
58static READ8_HANDLER( k7658_data_r )
59{
60   UINT8 result = 0xff;
61
62   if (BIT(offset,  0)) result &= input_port_read(space->machine, "row_00");
63   if (BIT(offset,  1)) result &= input_port_read(space->machine, "row_10");
64   if (BIT(offset,  2)) result &= input_port_read(space->machine, "row_20");
65   if (BIT(offset,  3)) result &= input_port_read(space->machine, "row_30");
66   if (BIT(offset,  4)) result &= input_port_read(space->machine, "row_40");
67   if (BIT(offset,  5)) result &= input_port_read(space->machine, "row_50");
68   if (BIT(offset,  6)) result &= input_port_read(space->machine, "row_60");
69   if (BIT(offset,  7)) result &= input_port_read(space->machine, "row_70");
70   if (BIT(offset,  8)) result &= input_port_read(space->machine, "row_08");
71   if (BIT(offset,  9)) result &= input_port_read(space->machine, "row_18");
72   if (BIT(offset, 10)) result &= input_port_read(space->machine, "row_28");
73   if (BIT(offset, 11)) result &= input_port_read(space->machine, "row_38");
74   if (BIT(offset, 12)) result &= input_port_read(space->machine, "row_48");
75
76   return result;
77}
78
79/* serial output on D0 */
80static WRITE8_HANDLER( k7658_data_w )
81{
82   logerror("%s: k7658_data_w %02x\n", cpuexec_describe_context(space->machine), BIT(data, 0));
83}
84
85
86/***************************************************************************
87    MEMORY HANDLING
88***************************************************************************/
89
90static MACHINE_START( rt1715 )
91{
92   memory_set_bankptr(machine, "bank2", messram_get_ptr(machine->device("messram")) + 0x0800);
93   memory_set_bankptr(machine, "bank3", messram_get_ptr(machine->device("messram")));
94}
95
96static MACHINE_RESET( rt1715 )
97{
98   /* on reset, enable ROM */
99   memory_set_bankptr(machine, "bank1", memory_region(machine, "ipl"));
100}
101
102static WRITE8_HANDLER( rt1715_rom_disable )
103{
104   logerror("%s: rt1715_set_bank %02x\n", cpuexec_describe_context(space->machine), data);
105
106   /* disable ROM, enable RAM */
23107   memory_set_bankptr(space->machine, "bank1", messram_get_ptr(space->machine->device("messram")));
24   memory_set_bankptr(space->machine, "bank3", messram_get_ptr(space->machine->device("messram")));
25108}
26109
27/* Address maps */
28static ADDRESS_MAP_START(rt1715_mem, ADDRESS_SPACE_PROGRAM, 8)
29   AM_RANGE( 0x0000, 0x07ff ) AM_READ_BANK("bank1") AM_WRITE_BANK("bank3")
30   AM_RANGE( 0x0800, 0xffff ) AM_RAMBANK("bank2")
31ADDRESS_MAP_END
32110
33static ADDRESS_MAP_START( rt1715_io , ADDRESS_SPACE_IO, 8)
34   //ADDRESS_MAP_GLOBAL_MASK(0xFF)
35   ADDRESS_MAP_UNMAP_HIGH
36   AM_RANGE( 0x28, 0x28 ) AM_WRITE( rt1717_set_bank )
37ADDRESS_MAP_END
111/***************************************************************************
112    VIDEO EMULATION
113***************************************************************************/
38114
39/* Input ports */
40static INPUT_PORTS_START( rt1715 )
41INPUT_PORTS_END
115static VIDEO_UPDATE( rt1715 )
116{
117   VIDEO_UPDATE_CALL(generic_bitmapped);
118   return 0;
119}
42120
121static I8275_DISPLAY_PIXELS( rt1715_display_pixels )
122{
123
124}
125
43126/* F4 Character Displayer */
44127static const gfx_layout rt1715_charlayout =
45128{
r8773r8774
55138};
56139
57140static GFXDECODE_START( rt1715 )
58   GFXDECODE_ENTRY( "gfx", 0x0000, rt1715_charlayout, 0, 1 )
141   GFXDECODE_ENTRY("gfx", 0x0000, rt1715_charlayout, 0, 1)
142   GFXDECODE_ENTRY("gfx", 0x0800, rt1715_charlayout, 0, 1)
59143GFXDECODE_END
60144
61/* Machine driver */
145static const i8275_interface rt1715_i8275_intf =
146{
147   "screen",
148   8,
149   0,
150   DEVCB_NULL,
151   DEVCB_NULL,
152   rt1715_display_pixels
153};
154
155
156/***************************************************************************
157    PALETTE
158***************************************************************************/
159
160static PALETTE_INIT( rt1715 )
161{
162   palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
163   palette_set_color(machine, 1, MAKE_RGB(0x00, 0x7f, 0x00)); /* low intensity */
164   palette_set_color(machine, 2, MAKE_RGB(0x00, 0xff, 0x00)); /* high intensitiy */
165}
166
167
168/***************************************************************************
169    ADDRESS MAPS
170***************************************************************************/
171
172static ADDRESS_MAP_START( rt1715_mem, ADDRESS_SPACE_PROGRAM, 8 )
173   AM_RANGE(0x0000, 0x07ff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank3")
174   AM_RANGE(0x0800, 0xffff) AM_RAMBANK("bank2")
175ADDRESS_MAP_END
176
177static ADDRESS_MAP_START( rt1715_io, ADDRESS_SPACE_IO, 8 )
178   ADDRESS_MAP_UNMAP_HIGH
179   ADDRESS_MAP_GLOBAL_MASK(0xff)
180   AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("a71", z80pio_ba_cd_r, z80pio_ba_cd_w)
181   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("a72", z80pio_ba_cd_r, z80pio_ba_cd_w)
182   AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("a30", z80ctc_r, z80ctc_w)
183   AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE("a29", z80sio_ba_cd_r, z80sio_ba_cd_w)
184   AM_RANGE(0x18, 0x19) AM_DEVREADWRITE("a26", i8275_r, i8275_w)
185   AM_RANGE(0x20, 0x20) AM_WRITE(rt1715_floppy_enable)
186   AM_RANGE(0x28, 0x28) AM_WRITE(rt1715_rom_disable)
187ADDRESS_MAP_END
188
189static ADDRESS_MAP_START( k7658_mem, ADDRESS_SPACE_PROGRAM, 8 )
190   AM_RANGE(0x0000, 0xffff) AM_WRITE(k7658_data_w)
191   AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0xf800) AM_ROM
192ADDRESS_MAP_END
193
194static ADDRESS_MAP_START( k7658_io, ADDRESS_SPACE_IO, 8 )
195   AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x8000) AM_READ(k7658_led1_r)
196   AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x8000) AM_READ(k7658_led2_r)
197   AM_RANGE(0x8000, 0x9fff) AM_READ(k7658_data_r)
198ADDRESS_MAP_END
199
200
201/***************************************************************************
202    INPUT PORTS
203***************************************************************************/
204
205static INPUT_PORTS_START( k7658 )
206   PORT_START("row_00")
207   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
208
209   PORT_START("row_10")
210   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
211
212   PORT_START("row_20")
213   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
214
215   PORT_START("row_30")
216   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
217
218   PORT_START("row_40")
219   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
220
221   PORT_START("row_50")
222   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
223
224   PORT_START("row_60")
225   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
226
227   PORT_START("row_70")
228   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
229
230   PORT_START("row_08")
231   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
232
233   PORT_START("row_18")
234   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
235
236   PORT_START("row_28")
237   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
238
239   PORT_START("row_38")
240   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
241
242   PORT_START("row_48")
243   PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED)
244INPUT_PORTS_END
245
246
247/***************************************************************************
248    MACHINE DRIVERS
249***************************************************************************/
250
251static const z80ctc_interface rt1715_ctc_intf =
252{
253   0,
254   DEVCB_NULL,
255   DEVCB_NULL,
256   DEVCB_NULL,
257   DEVCB_NULL
258};
259
260static const z80sio_interface rt1715_sio_intf =
261{
262   NULL,
263   NULL,
264   NULL,
265   NULL,
266   NULL,
267   NULL
268};
269
270static const z80pio_interface rt1715_pio_data_intf =
271{
272   DEVCB_NULL,
273   DEVCB_NULL,
274   DEVCB_NULL,
275   DEVCB_NULL,
276   DEVCB_NULL,
277   DEVCB_NULL,
278   DEVCB_NULL
279};
280
281static const z80pio_interface rt1715_pio_control_intf =
282{
283   DEVCB_NULL,
284   DEVCB_NULL,
285   DEVCB_NULL,
286   DEVCB_NULL,
287   DEVCB_NULL,
288   DEVCB_NULL,
289   DEVCB_NULL
290};
291
292/* priority unknown */
293static const z80_daisy_config rt1715_daisy_chain[] =
294{
295   { "a71" },
296   { "a72" },
297   { "a30" },
298   { "a29" },
299   { NULL }
300};
301
62302static MACHINE_DRIVER_START( rt1715 )
63303   /* basic machine hardware */
64   MDRV_CPU_ADD("maincpu", Z80, XTAL_16MHz / 4)
304   MDRV_CPU_ADD("maincpu", Z80, XTAL_2_4576MHz)
65305   MDRV_CPU_PROGRAM_MAP(rt1715_mem)
66306   MDRV_CPU_IO_MAP(rt1715_io)
67   MDRV_MACHINE_RESET( rt1715 )
307   MDRV_CPU_CONFIG(rt1715_daisy_chain)
68308
309   MDRV_MACHINE_START(rt1715)
310   MDRV_MACHINE_RESET(rt1715)
311
312   /* keyboard */
313   MDRV_CPU_ADD("keyboard", Z80, 683000)
314   MDRV_CPU_PROGRAM_MAP(k7658_mem)
315   MDRV_CPU_IO_MAP(k7658_io)
316
69317   /* video hardware */
70318   MDRV_SCREEN_ADD("screen", RASTER)
71319   MDRV_SCREEN_REFRESH_RATE(50)
r8773r8774
80328   MDRV_VIDEO_START(generic_bitmapped)
81329   MDRV_VIDEO_UPDATE(rt1715)
82330
331   MDRV_I8275_ADD("a26", rt1715_i8275_intf)
332   MDRV_Z80CTC_ADD("a30", XTAL_10MHz/4 /* ? */, rt1715_ctc_intf)
333   MDRV_Z80SIO_ADD("a29", XTAL_10MHz/4 /* ? */, rt1715_sio_intf)
334
335   /* floppy */
336   MDRV_Z80PIO_ADD("a71", XTAL_10MHz/4 /* ? */, rt1715_pio_data_intf)
337   MDRV_Z80PIO_ADD("a72", XTAL_10MHz/4 /* ? */, rt1715_pio_control_intf)
338
83339   /* internal ram */
84340   MDRV_RAM_ADD("messram")
85341   MDRV_RAM_DEFAULT_SIZE("64K")
86342   MDRV_RAM_DEFAULT_VALUE(0x00)
87343MACHINE_DRIVER_END
88344
89/* ROM definition */
345static MACHINE_DRIVER_START( rt1715w )
346   MDRV_IMPORT_FROM(rt1715)
347MACHINE_DRIVER_END
348
349
350/***************************************************************************
351    ROM DEFINITIONS
352***************************************************************************/
353
90354ROM_START( rt1715 )
91   ROM_REGION(0x10800, "maincpu", ROMREGION_ERASEFF)
92   ROM_LOAD("s502.bin", 0x10000, 0x0800, CRC(7b6302e1) SHA1(e8f61763ff8841078a1939aa5e85a17f2af42163))
355   ROM_REGION(0x0800, "ipl", 0)
356   ROM_LOAD("s500.a25.3", 0x0000, 0x0800, NO_DUMP) // CCITT 90e7
357   ROM_LOAD("s501.a25.3", 0x0000, 0x0800, NO_DUMP) // CCITT 68da
358   ROM_LOAD("s502.a25.3", 0x0000, 0x0800, CRC(7b6302e1) SHA1(e8f61763ff8841078a1939aa5e85a17f2af42163))
93359
94   ROM_REGION(0x0800, "gfx", 0)
95   ROM_LOAD("s619.bin", 0x0000, 0x0800, CRC(98647763) SHA1(93fba51ed26392ec3eff1037886576fa12443fe5))
360   ROM_REGION(0x1000, "gfx", 0)
361   ROM_LOAD("s619.a25.2", 0x0000, 0x0800, CRC(98647763) SHA1(93fba51ed26392ec3eff1037886576fa12443fe5))
362   ROM_LOAD("s602.a25.1", 0x0800, 0x0800, NO_DUMP) // CCITT fd67
96363
97   // Z80 code
98364   ROM_REGION(0x0800, "keyboard", 0)
99365   ROM_LOAD("s600.ic8", 0x0000, 0x0800, CRC(b7070122) SHA1(687056b822086ef0eee1e9b27e5b031bdbcade61))
100366
101367   ROM_REGION(0x0800, "floppy", 0)
102   ROM_LOAD("r1715lr.bin", 0x0000, 0x0400, CRC(5306d57b) SHA1(a12d025717b039a8a760eb9961365402f1f501f5)) // "read rom"
103   ROM_LOAD("r1715sr.bin", 0x0400, 0x0400, CRC(319fa72c) SHA1(5f26af1e36339a934760a63e5975e9db09abeaaf)) // "write rom"
368   ROM_LOAD("068.a8.2", 0x0000, 0x0400, CRC(5306d57b) SHA1(a12d025717b039a8a760eb9961365402f1f501f5)) // "read rom"
369   ROM_LOAD("069.a8.1", 0x0400, 0x0400, CRC(319fa72c) SHA1(5f26af1e36339a934760a63e5975e9db09abeaaf)) // "write rom"
104370ROM_END
105371
372ROM_START( rt1715lc )
373   ROM_REGION(0x0800, "ipl", 0)
374   ROM_LOAD("s500.a25.3", 0x0000, 0x0800, NO_DUMP) // CCITT 90e7
375   ROM_LOAD("s501.a25.3", 0x0000, 0x0800, NO_DUMP) // CCITT 68da
376   ROM_LOAD("s502.a25.3", 0x0000, 0x0800, CRC(7b6302e1) SHA1(e8f61763ff8841078a1939aa5e85a17f2af42163))
377
378   ROM_REGION(0x1000, "gfx", 0)
379   ROM_LOAD("s643.a25.2", 0x0000, 0x0800, CRC(ea37f0e6) SHA1(357760974d944b9782734504b9820771e7e37645))
380   ROM_LOAD("s605.a25.1", 0x0800, 0x0800, CRC(38062024) SHA1(798f62d4adeb7098b7dcbfe6caf28302853ee97d))
381
382   ROM_REGION(0x0800, "keyboard", 0)
383   ROM_LOAD("s642.ic8", 0x0000, 0x0800, NO_DUMP) // CCITT 962e
384
385   ROM_REGION(0x0800, "floppy", 0)
386   ROM_LOAD("068.a8.2", 0x0000, 0x0400, CRC(5306d57b) SHA1(a12d025717b039a8a760eb9961365402f1f501f5)) // "read rom"
387   ROM_LOAD("069.a8.1", 0x0400, 0x0400, CRC(319fa72c) SHA1(5f26af1e36339a934760a63e5975e9db09abeaaf)) // "write rom"
388ROM_END
389
106390ROM_START( rt1715w )
107   ROM_REGION( 0x10800, "maincpu", ROMREGION_ERASEFF )
108   ROM_LOAD( "s550.bin", 0x10000, 0x0800, CRC(0a96c754) SHA1(4d9ad5b877353d91ba355044d2847e1d621e2b01))
109   ROM_REGION(0x0800, "gfx",0)
110   ROM_LOAD ("s619.bin", 0x0000, 0x0800, CRC(98647763) SHA1(93fba51ed26392ec3eff1037886576fa12443fe5))
391   ROM_REGION(0x0800, "ipl", 0)
392   ROM_LOAD("s550.bin", 0x0000, 0x0800, CRC(0a96c754) SHA1(4d9ad5b877353d91ba355044d2847e1d621e2b01))
393
394   // loaded from floppy on startup
395   ROM_REGION(0x1000, "gfx", ROMREGION_ERASEFF)
396
397   ROM_REGION(0x0800, "keyboard", 0)
398   ROM_LOAD("s600.ic8", 0x0000, 0x0800, CRC(b7070122) SHA1(687056b822086ef0eee1e9b27e5b031bdbcade61))
399
400   ROM_REGION(0x0100, "prom", 0)
401   ROM_LOAD("287.bin", 0x0000, 0x0100, CRC(8508360c) SHA1(d262a8c3cf2d284c67f23b853e0d59ae5cc1d4c8)) // /CAS decoder prom, 74S287
111402ROM_END
112403
113/* Driver */
114404
115/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT   INIT   COMPANY   FULLNAME       FLAGS */
116COMP( 1986, rt1715, 0,      0,      rt1715,    rt1715, 0,     "Robotron",   "Robotron 1715",   GAME_NOT_WORKING | GAME_NO_SOUND)
117COMP( 1986, rt1715w,rt1715, 0,      rt1715,    rt1715, 0,     "Robotron",   "Robotron 1715W",   GAME_NOT_WORKING | GAME_NO_SOUND)
405/***************************************************************************
406    GAME DRIVERS
407***************************************************************************/
408
409/*    YEAR  NAME      PARENT  COMPAT  MACHINE  INPUT  INIT  COMPANY     FULLNAME                             FLAGS */
410COMP( 1986, rt1715,   0,      0,      rt1715,  k7658, 0,    "Robotron",   "Robotron PC-1715",                  GAME_NOT_WORKING | GAME_NO_SOUND_HW)
411COMP( 1986, rt1715lc, rt1715, 0,      rt1715,  k7658, 0,    "Robotron",   "Robotron PC-1715 (latin/cyrillic)", GAME_NOT_WORKING | GAME_NO_SOUND_HW)
412COMP( 1986, rt1715w,  rt1715, 0,      rt1715w, k7658, 0,    "Robotron",   "Robotron PC-1715W",                 GAME_NOT_WORKING | GAME_NO_SOUND_HW)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team