Previous 15994 Revisions Next

r6101 Friday 16th October, 2009 at 13:55:24 UTC by Dirk Best
[VTECH1] Cleanup and reorganization
[src/mess]mess.mak
[src/mess/drivers]vtech1.c
[src/mess/includes]vtech1.h
[src/mess/machine]vtech1.c

src/mess/includes/vtech1.h
r6100r6101
1/*****************************************************************************
2 *
3 * includes/vtech1.h
4 *
5 ****************************************************************************/
6
7#ifndef VTECH1_H_
8#define VTECH1_H_
9
10#include "devices/snapquik.h"
11
12
13#define VTECH1_CLK        3579500
14#define VZ300_XTAL1_CLK   XTAL_17_73447MHz
15
16#define VZ_BASIC 0xf0
17#define VZ_MCODE 0xf1
18
19
20/*----------- defined in machine/vtech1.c -----------*/
21
22extern int vtech1_latch;
23
24MACHINE_START( laser110 );
25MACHINE_START( laser210 );
26MACHINE_START( laser310 );
27
28DEVICE_IMAGE_LOAD( vtech1_floppy );
29SNAPSHOT_LOAD( vtech1 );
30
31READ8_HANDLER ( vtech1_printer_r );
32WRITE8_HANDLER( vtech1_strobe_w );
33READ8_HANDLER ( vtech1_fdc_r );
34WRITE8_HANDLER( vtech1_fdc_w );
35READ8_HANDLER ( vtech1_joystick_r );
36READ8_HANDLER ( vtech1_lightpen_r );
37READ8_HANDLER ( vtech1_keyboard_r );
38WRITE8_HANDLER( vtech1_latch_w );
39READ8_HANDLER ( vtech1_serial_r );
40WRITE8_HANDLER( vtech1_serial_w );
41WRITE8_HANDLER( vtech1_memory_bank_w );
42
43READ8_DEVICE_HANDLER(vtech1_mc6847_videoram_r);
44VIDEO_UPDATE(vtech1);
45
46
47#endif /* VTECH1_H_ */
src/mess/machine/vtech1.c
r6100r6101
1/******************************************************************************
2
3Video Technology Laser 110-310 computers:
4
5    Video Technology Laser 110
6      Sanyo Laser 110
7    Video Technology Laser 200
8      Salora Fellow
9      Texet TX-8000
10      Video Technology VZ-200
11    Video Technology Laser 210
12      Dick Smith Electronics VZ-200
13      Sanyo Laser 210
14    Video Technology Laser 310
15      Dick Smith Electronics VZ-300
16
17Machine driver:
18
19    Juergen Buchmueller <pullmoll@t-online.de>, Dec 1999
20      - everything
21
22    Dirk Best <duke@redump.de>, May 2004
23      - clean up
24      - fixed mode 1 display (graphic mode)
25      - fixed loading of the DOS ROM
26      - preliminary printer emulation
27
28    Dirk Best <duke@redump.de>, March 2006
29      - 64K bank switched memory implemented
30      - better printer emulation
31      - cartridge support
32
33Thanks go to:
34
35    - Guy Thomason
36    - Jason Oakley
37    - Bushy Maunder
38    - and anybody else on the vzemu list :)
39    - Davide Moretti for the detailed description of the colors.
40
41Todo:
42
43    - Lightpen
44    - RS232 serial
45
46****************************************************************************/
47
48
49#include "driver.h"
50#include "utils.h"
51#include "includes/vtech1.h"
52#include "cpu/z80/z80.h"
53#include "video/m6847.h"
54#include "sound/speaker.h"
55#include "machine/ctronics.h"
56#include "devices/cassette.h"
57#include "devices/messram.h"
58
59#define LOG_VTECH1_LATCH 0
60#define LOG_VTECH1_FDC   0
61
62int vtech1_latch = -1;
63
64#define TRKSIZE_VZ   0x9b0   /* arbitrary (actually from analyzing format) */
65#define TRKSIZE_FM   3172   /* size of a standard FM mode track */
66
67static UINT8 vtech1_track_x2[2] = {80, 80};
68static UINT8 vtech1_fdc_wrprot[2] = {0x80, 0x80};
69static UINT8 vtech1_fdc_status = 0;
70static UINT8 vtech1_fdc_data[TRKSIZE_FM];
71
72static int vtech1_data;
73
74static int vtech1_fdc_edge = 0;
75static int vtech1_fdc_bits = 8;
76static int vtech1_drive = -1;
77static int vtech1_fdc_start = 0;
78static int vtech1_fdc_write = 0;
79static int vtech1_fdc_offs = 0;
80static int vtech1_fdc_latch = 0;
81
82/******************************************************************************
83 Machine Initialisation
84******************************************************************************/
85
86static void common_init_machine(running_machine *machine, int base)
87{
88   /* internal ram */
89   memory_configure_bank(machine, 1, 0, 1, messram_get_ptr(devtag_get_device(machine, "messram")), 0);
90   memory_set_bank(machine, 1, 0);
91
92   /* expansion memory configuration */
93   switch (messram_get_size(devtag_get_device(machine, "messram"))) {
94      case 18 * 1024:
95      case 22 * 1024:
96      case 32 * 1024:
97         /* install 16KB memory expansion */
98         memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base, base + 0x3fff, 0, 0, SMH_BANK(2));
99         memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base, base + 0x3fff, 0, 0, SMH_BANK(2));
100         memory_configure_bank(machine, 2, 0, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + base - 0x7800, 0);
101         memory_set_bank(machine, 2, 0);
102
103         memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base + 0x4000, 0xffff, 0, 0, SMH_NOP);
104         memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base + 0x4000, 0xffff, 0, 0, SMH_NOP);
105         break;
106
107      case 66 * 1024:
108      case 4098 * 1024:
109         /* 64KB/4MB memory expansion */
110
111         /* install fixed first bank */
112         memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0, SMH_BANK(2));
113         memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0, SMH_BANK(2));
114         memory_configure_bank(machine, 2, 0, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x800, 0);
115         memory_set_bank(machine, 2, 0);
116
117         /* install the others, dynamically banked in */
118         memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xffff, 0, 0, SMH_BANK(3));
119         memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xffff, 0, 0, SMH_BANK(3));
120         memory_configure_bank(machine, 3, 0, (messram_get_size(devtag_get_device(machine, "messram")) - 0x4800) / 0x4000, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x4800, 0x4000);
121         memory_set_bank(machine, 3, 0);
122         break;
123
124      default:
125         /* no memory expansion */
126         memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base, 0xffff, 0, 0, SMH_NOP);
127         memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), base, 0xffff, 0, 0, SMH_NOP);
128         break;
129   }
130}
131
132MACHINE_START(laser110)
133{
134   common_init_machine(machine, 0x8000);
135}
136
137MACHINE_START(laser210)
138{
139   common_init_machine(machine, 0x9000);
140}
141
142MACHINE_START(laser310)
143{
144   common_init_machine(machine, 0xb800);
145}
146
147
148/******************************************************************************
149 Memory Bank Handling
150
151 TODO: What happens when an invalid bank is selected?
152       Currently, we just ignore it and keep the current bank.
153******************************************************************************/
154
155WRITE8_HANDLER (vtech1_memory_bank_w)
156{
157   logerror("vtech1_memory_bank_w $%02X\n", data);
158
159   if (data >= 1)
160      if ((data <= 3 && (messram_get_size(devtag_get_device(space->machine, "messram")) == (66 * 1024))) || (messram_get_size(devtag_get_device(space->machine, "messram")) == (4098 * 1024)))
161         memory_set_bank(space->machine, 3, data - 1);
162}
163
164
165/******************************************************************************
166 Cassette Handling
167******************************************************************************/
168
169static const device_config *cassette_device_image(running_machine *machine)
170{
171   return devtag_get_device(machine, "cassette");
172}
173
174
175/******************************************************************************
176 Snapshot Handling
177******************************************************************************/
178
179SNAPSHOT_LOAD(vtech1)
180{
181   const address_space *space = cputag_get_address_space(image->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
182   UINT8 i, header[24];
183   UINT16 start, end, size;
184   char pgmname[18];
185
186   /* get the header */
187   image_fread(image, &header, sizeof(header));
188   for (i = 0; i < 16; i++) pgmname[i] = header[i+4];
189   pgmname[16] = '\0';
190
191   /* get start and end addresses */
192   start = pick_integer_le(header, 22, 2);
193   end = start + snapshot_size - sizeof(header);
194   size = end - start;
195
196   /* check if we have enough ram */
197   if (messram_get_size(devtag_get_device(image->machine, "messram")) < size)
198   {
199      char message[256];
200      snprintf(message, ARRAY_LENGTH(message), "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size);
201      image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message);
202      image_message(image, "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size);
203      return INIT_FAIL;
204   }
205
206   /* write it to ram */
207   image_fread(image, &messram_get_ptr(devtag_get_device(image->machine, "messram"))[start - 0x7800], size);
208
209   /* patch variables depending on snapshot type */
210   switch (header[21])
211   {
212   case VZ_BASIC:      /* 0xF0 */
213      memory_write_byte(space, 0x78a4, start % 256); /* start of basic program */
214      memory_write_byte(space, 0x78a5, start / 256);
215      memory_write_byte(space, 0x78f9, end % 256); /* end of basic program */
216      memory_write_byte(space, 0x78fa, end / 256);
217      memory_write_byte(space, 0x78fb, end % 256); /* start variable table */
218      memory_write_byte(space, 0x78fc, end / 256);
219      memory_write_byte(space, 0x78fd, end % 256); /* start free mem, end variable table */
220      memory_write_byte(space, 0x78fe, end / 256);
221      image_message(image, " %s (B)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end);
222      break;
223
224   case VZ_MCODE:      /* 0xF1 */
225      memory_write_byte(space, 0x788e, start % 256); /* usr subroutine address */
226      memory_write_byte(space, 0x788f, start / 256);
227      image_message(image, " %s (M)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end);
228      cpu_set_reg(cputag_get_cpu(image->machine, "maincpu"), REG_GENPC, start);            /* start program */
229      break;
230
231   default:
232      image_seterror(image, IMAGE_ERROR_UNSUPPORTED, "Snapshot format not supported.");
233      image_message(image, "Snapshot format not supported.");
234      return INIT_FAIL;
235   }
236
237   return INIT_PASS;
238}
239
240
241/******************************************************************************
242 Floppy Handling
243******************************************************************************/
244
245static const device_config *vtech1_file(running_machine *machine)
246{
247   if (vtech1_drive < 0)
248      return NULL;
249
250   return image_from_devtype_and_index(machine, IO_FLOPPY, vtech1_drive);
251}
252
253/*
254int vtech1_floppy_id(int id)
255{
256    mame_file *file;
257    UINT8 buff[32];
258
259    file = image_fopen(IO_FLOPPY, id, FILETYPE_IMAGE, OSD_FOPEN_READ);
260    if (file)
261    {
262        mame_fread(file, buff, sizeof(buff));
263        mame_fclose(file);
264        if( memcmp(buff, "\x80\x80\x80\x80\x80\x80\x00\xfe\0xe7\0x18\0xc3\x00\x00\x00\x80\x80", 16) == 0 )
265            return 1;
266    }
267    return 0;
268}
269*/
270
271DEVICE_IMAGE_LOAD(vtech1_floppy)
272{
273   int id = image_index_in_device(image);
274
275   if (image_is_writable(image))
276      vtech1_fdc_wrprot[id] = 0x00;
277   else
278      vtech1_fdc_wrprot[id] = 0x80;
279
280   return INIT_PASS;
281}
282
283static void vtech1_get_track(running_machine *machine)
284{
285    /* drive selected or and image file ok? */
286   if (vtech1_drive >= 0 && image_exists(vtech1_file(machine)))
287   {
288      int size, offs;
289      size = TRKSIZE_VZ;
290      offs = TRKSIZE_VZ * vtech1_track_x2[vtech1_drive]/2;
291      image_fseek(vtech1_file(machine), offs, SEEK_SET);
292      size = image_fread(vtech1_file(machine), vtech1_fdc_data, size);
293      if (LOG_VTECH1_FDC)
294         logerror("get track @$%05x $%04x bytes\n", offs, size);
295    }
296   vtech1_fdc_offs = 0;
297   vtech1_fdc_write = 0;
298}
299
300static void vtech1_put_track(running_machine *machine)
301{
302    /* drive selected and image file ok? */
303   if (vtech1_drive >= 0 && vtech1_file(machine) != NULL)
304   {
305      int size, offs;
306      offs = TRKSIZE_VZ * vtech1_track_x2[vtech1_drive]/2;
307      image_fseek(vtech1_file(machine), offs + vtech1_fdc_start, SEEK_SET);
308      size = image_fwrite(vtech1_file(machine), &vtech1_fdc_data[vtech1_fdc_start], vtech1_fdc_write);
309      if (LOG_VTECH1_FDC)
310         logerror("put track @$%05X+$%X $%04X/$%04X bytes\n", offs, vtech1_fdc_start, size, vtech1_fdc_write);
311    }
312}
313
314#define PHI0(n) (((n)>>0)&1)
315#define PHI1(n) (((n)>>1)&1)
316#define PHI2(n) (((n)>>2)&1)
317#define PHI3(n) (((n)>>3)&1)
318
319READ8_HANDLER(vtech1_fdc_r)
320{
321    int data = 0xff;
322    switch (offset)
323    {
324    case 1: /* data (read-only) */
325      if (vtech1_fdc_bits > 0)
326        {
327         if( vtech1_fdc_status & 0x80 )
328            vtech1_fdc_bits--;
329         data = (vtech1_data >> vtech1_fdc_bits) & 0xff;
330         if (LOG_VTECH1_FDC) {
331            logerror("vtech1_fdc_r bits %d%d%d%d%d%d%d%d\n",
332                   (data>>7)&1,(data>>6)&1,(data>>5)&1,(data>>4)&1,
333                   (data>>3)&1,(data>>2)&1,(data>>1)&1,(data>>0)&1 );
334         }
335        }
336      if (vtech1_fdc_bits == 0)
337        {
338         vtech1_data = vtech1_fdc_data[vtech1_fdc_offs];
339         if (LOG_VTECH1_FDC)
340            logerror("vtech1_fdc_r %d : data ($%04X) $%02X\n", offset, vtech1_fdc_offs, vtech1_data);
341         if(vtech1_fdc_status & 0x80)
342            {
343            vtech1_fdc_bits = 8;
344            vtech1_fdc_offs = (vtech1_fdc_offs + 1) % TRKSIZE_FM;
345            }
346         vtech1_fdc_status &= ~0x80;
347        }
348        break;
349    case 2: /* polling (read-only) */
350        /* fake */
351      if (vtech1_drive >= 0)
352         vtech1_fdc_status |= 0x80;
353      data = vtech1_fdc_status;
354        break;
355    case 3: /* write protect status (read-only) */
356      if (vtech1_drive >= 0)
357         data = vtech1_fdc_wrprot[vtech1_drive];
358      if (LOG_VTECH1_FDC)
359         logerror("vtech1_fdc_r %d : write_protect $%02X\n", offset, data);
360        break;
361    }
362    return data;
363}
364
365WRITE8_HANDLER(vtech1_fdc_w)
366{
367   int drive;
368
369    switch (offset)
370   {
371   case 0: /* latch (write-only) */
372      drive = (data & 0x10) ? 0 : (data & 0x80) ? 1 : -1;
373      if (drive != vtech1_drive)
374      {
375         vtech1_drive = drive;
376         if (vtech1_drive >= 0)
377            vtech1_get_track(space->machine);
378        }
379      if (vtech1_drive >= 0)
380        {
381         if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI1(vtech1_fdc_latch)) ||
382            (PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI2(vtech1_fdc_latch)) ||
383            (PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI3(vtech1_fdc_latch)) ||
384            (PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI0(vtech1_fdc_latch)))
385            {
386            if (vtech1_track_x2[vtech1_drive] > 0)
387               vtech1_track_x2[vtech1_drive]--;
388            if (LOG_VTECH1_FDC)
389               logerror("vtech1_fdc_w(%d) $%02X drive %d: stepout track #%2d.%d\n", offset, data, vtech1_drive, vtech1_track_x2[vtech1_drive]/2,5*(vtech1_track_x2[vtech1_drive]&1));
390            if ((vtech1_track_x2[vtech1_drive] & 1) == 0)
391               vtech1_get_track(space->machine);
392            }
393            else
394         if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI3(vtech1_fdc_latch)) ||
395            (PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI0(vtech1_fdc_latch)) ||
396            (PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI1(vtech1_fdc_latch)) ||
397            (PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI2(vtech1_fdc_latch)))
398            {
399            if (vtech1_track_x2[vtech1_drive] < 2*40)
400               vtech1_track_x2[vtech1_drive]++;
401            if (LOG_VTECH1_FDC)
402               logerror("vtech1_fdc_w(%d) $%02X drive %d: stepin track #%2d.%d\n", offset, data, vtech1_drive, vtech1_track_x2[vtech1_drive]/2,5*(vtech1_track_x2[vtech1_drive]&1));
403            if ((vtech1_track_x2[vtech1_drive] & 1) == 0)
404               vtech1_get_track(space->machine);
405            }
406            if ((data & 0x40) == 0)
407         {
408            vtech1_data <<= 1;
409            if ((vtech1_fdc_latch ^ data) & 0x20)
410               vtech1_data |= 1;
411            if ((vtech1_fdc_edge ^= 1) == 0)
412                {
413               if (--vtech1_fdc_bits == 0)
414               {
415                  UINT8 value = 0;
416                  vtech1_data &= 0xffff;
417                  if (vtech1_data & 0x4000 ) value |= 0x80;
418                  if (vtech1_data & 0x1000 ) value |= 0x40;
419                  if (vtech1_data & 0x0400 ) value |= 0x20;
420                  if (vtech1_data & 0x0100 ) value |= 0x10;
421                  if (vtech1_data & 0x0040 ) value |= 0x08;
422                  if (vtech1_data & 0x0010 ) value |= 0x04;
423                  if (vtech1_data & 0x0004 ) value |= 0x02;
424                  if (vtech1_data & 0x0001 ) value |= 0x01;
425                  if (LOG_VTECH1_FDC)
426                     logerror("vtech1_fdc_w(%d) data($%04X) $%02X <- $%02X ($%04X)\n", offset, vtech1_fdc_offs, vtech1_fdc_data[vtech1_fdc_offs], value, vtech1_data);
427                  vtech1_fdc_data[vtech1_fdc_offs] = value;
428                  vtech1_fdc_offs = (vtech1_fdc_offs + 1) % TRKSIZE_FM;
429                  vtech1_fdc_write++;
430                  vtech1_fdc_bits = 8;
431               }
432                }
433            }
434         /* change of write signal? */
435         if ((vtech1_fdc_latch ^ data) & 0x40)
436            {
437                /* falling edge? */
438            if (vtech1_fdc_latch & 0x40)
439                {
440               vtech1_fdc_start = vtech1_fdc_offs;
441               vtech1_fdc_edge = 0;
442                }
443                else
444                {
445                    /* data written to track before? */
446               if (vtech1_fdc_write)
447                  vtech1_put_track(space->machine);
448                }
449            vtech1_fdc_bits = 8;
450            vtech1_fdc_write = 0;
451            }
452        }
453      vtech1_fdc_latch = data;
454      break;
455    }
456}
457
458
459/******************************************************************************
460 Input Handling
461******************************************************************************/
462
463READ8_HANDLER(vtech1_lightpen_r)
464{
465   logerror("vtech1_lightpen_r(%d)\n", offset);
466   return 0xff;
467}
468
469READ8_HANDLER(vtech1_joystick_r)
470{
471    int data = 0xff;
472
473   if (!(offset & 1))
474      data &= input_port_read(space->machine, "joystick_0");
475   if (!(offset & 2))
476      data &= input_port_read(space->machine, "joystick_0_arm");
477   if (!(offset & 4))
478      data &= input_port_read(space->machine, "joystick_1");
479   if (!(offset & 8))
480      data &= input_port_read(space->machine, "joystick_1_arm");
481
482    return data;
483}
484
485READ8_HANDLER(vtech1_keyboard_r)
486{
487   static int cassette_bit = 0;
488   int row, data = 0xff;
489   double level;
490   static const char *const keynames[] = { "keyboard_0", "keyboard_1", "keyboard_2", "keyboard_3",
491                              "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7" };
492
493   /* scan keyboard rows */
494   for (row = 0; row < 8; row++)
495   {
496      if (!(offset & (1 << row)))
497         data &= input_port_read(space->machine, keynames[row]);
498   }
499
500   if (video_screen_get_vblank(space->machine->primary_screen))
501        data &= ~0x80;
502
503   /* cassette input is bit 5 (0x40) */
504   level = cassette_input(cassette_device_image(space->machine));
505   if (level < -0.008)
506      cassette_bit = 0x00;
507   if (level > +0.008)
508      cassette_bit = 0x40;
509
510   data &= ~cassette_bit;
511
512    return data;
513}
514
515/*************************************************
516 * bit  function
517 * 7    not assigned
518 * 6    not assigned
519 * 5    speaker B
520 * 4    VDC background 0 green, 1 orange
521 * 3    VDC display mode 0 text, 1 graphics
522 * 2    cassette out (MSB)
523 * 1    cassette out (LSB)
524 * 0    speaker A
525 ************************************************/
526WRITE8_HANDLER( vtech1_latch_w )
527{
528   const device_config *speaker = devtag_get_device(space->machine, "speaker");
529   const device_config *mc6847 = devtag_get_device(space->machine, "mc6847");
530
531   if (LOG_VTECH1_LATCH)
532      logerror("vtech1_latch_w $%02X\n", data);
533
534   /* vdc mode control lines */
535   mc6847_ag_w(mc6847, BIT(data, 3));
536   mc6847_css_w(mc6847, BIT(data, 4));
537
538   /* cassette data bits toggle? */
539   if ((vtech1_latch ^ data ) & 0x06)
540   {
541      static const double amp[4] = { +1.0, +0.5, -0.5, -1.0 };
542      cassette_output(cassette_device_image(space->machine), amp[(data >> 1) & 3]);
543   }
544
545   /* speaker data bits toggle? */
546   if ((vtech1_latch ^ data ) & 0x41)
547      speaker_level_w(speaker, (data & 1) | ((data >> 5) & 2));
548
549   vtech1_latch = data;
550}
551
552
553/******************************************************************************
554 Printer Handling
555******************************************************************************/
556
557/*
558The VZ200/300 printer interface uses I/O port address OE Hex for the ASCII
559character code data and strobe output, and address OOH for the busy/ready-bar
560status input (bit 0).
561*/
562
563READ8_HANDLER( vtech1_printer_r )
564{
565   const device_config *printer = devtag_get_device(space->machine, "centronics");
566   UINT8 result = 0xff;
567
568   result &= ~(!centronics_busy_r(printer));
569
570   return result;
571}
572
573/* TODO: figure out how this really works */
574WRITE8_HANDLER( vtech1_strobe_w )
575{
576   const device_config *printer = devtag_get_device(space->machine, "centronics");
577   centronics_strobe_w(printer, TRUE);
578   centronics_strobe_w(printer, FALSE);
579}
580
581
582/******************************************************************************
583 Serial RS232 Handling
584******************************************************************************/
585
586READ8_HANDLER(vtech1_serial_r)
587{
588   int data = 0xff;
589   logerror("vtech1_serial_r offset $%02x\n", offset);
590   return data;
591}
592
593WRITE8_HANDLER(vtech1_serial_w)
594{
595   logerror("vtech1_serial_w $%02x, offset %02x\n", data, offset);
596}
597
598
599/***************************************************************************
600    MC6847
601***************************************************************************/
602
603READ8_DEVICE_HANDLER( vtech1_mc6847_videoram_r )
604{
605   mc6847_inv_w(device, BIT(videoram[offset], 6));
606   mc6847_as_w(device, BIT(videoram[offset], 7));
607
608   return videoram[offset];
609}
610
611VIDEO_UPDATE( vtech1 )
612{
613   const device_config *mc6847 = devtag_get_device(screen->machine, "mc6847");
614   return mc6847_update(mc6847, bitmap, cliprect);
615}
src/mess/mess.mak
r6100r6101
14581458   $(MESS_DRIVERS)/votrtnt.o   \
14591459
14601460$(MESSOBJ)/vtech.a:            \
1461   $(MESS_MACHINE)/vtech1.o   \
14621461   $(MESS_DRIVERS)/vtech1.o   \
14631462   $(MESS_VIDEO)/vtech2.o      \
14641463   $(MESS_MACHINE)/vtech2.o   \
src/mess/drivers/vtech1.c
r6100r6101
8282        8000-BFFF 64K memory expansion, first bank
8383        C000-FFFF 64K memory expansion, other banks
8484
85
86   Memory expansions available for the Laser/VZ computers:
87
88   - a 16kb expansion without banking
89   - a 64kb expansion where the first bank is fixed and the other 3 are
90     banked in as needed
91   - a banked memory expansion similar to the 64kb one, that the user could
92     fill themselves with memory up to 4MB total.
93
94   They are externally connected devices. The 16kb extension is different
95   between Laser 110/210/310 computers, though it could be relativly
96   easily modified to work on another model.
97
98
8599Todo:
86100
87101    - Figure out which machines were shipped with which ROM version
88102      where not known (currently only a guess)
89103    - Lightpen support
90    - External keyboard? (and maybe the other strange I/O stuff which is
91      commented out at the moment...)
104    - Rewrite floppy and move to its own file
92105
93106Notes:
94107
r6100r6101
98111
99112******************************************************************************/
100113
101/* Core includes */
102114#include "driver.h"
115#include "utils.h"
103116#include "cpu/z80/z80.h"
117#include "video/m6847.h"
118#include "machine/ctronics.h"
104119#include "sound/wave.h"
105#include "includes/vtech1.h"
106
107/* Components */
108#include "video/m6847.h"
109120#include "sound/speaker.h"
110
111/* Devices */
112121#include "devices/cartslot.h"
113122#include "devices/snapquik.h"
114123#include "devices/cassette.h"
115#include "machine/ctronics.h"
116124#include "devices/z80bin.h"
125#include "devices/messram.h"
117126#include "formats/vt_cas.h"
118#include "devices/messram.h"
119127
120static Z80BIN_EXECUTE(vtech1);
121128
129/***************************************************************************
130    CONSTANTS & MACROS
131***************************************************************************/
122132
123/******************************************************************************
124 Address Maps
125******************************************************************************/
133#define LOG_VTECH1_LATCH 0
134#define LOG_VTECH1_FDC   0
126135
127/* Note: Expansion memory is dynamically mapped in machine/vtech1.c */
136#define VTECH1_CLK        3579500
137#define VZ300_XTAL1_CLK   XTAL_17_73447MHz
128138
129static ADDRESS_MAP_START(laser110_mem, ADDRESS_SPACE_PROGRAM, 8)
139#define VZ_BASIC 0xf0
140#define VZ_MCODE 0xf1
141
142#define TRKSIZE_VZ   0x9b0   /* arbitrary (actually from analyzing format) */
143#define TRKSIZE_FM   3172   /* size of a standard FM mode track */
144
145#define PHI0(n) (((n)>>0)&1)
146#define PHI1(n) (((n)>>1)&1)
147#define PHI2(n) (((n)>>2)&1)
148#define PHI3(n) (((n)>>3)&1)
149
150
151/***************************************************************************
152    TYPE DEFINITIONS
153***************************************************************************/
154
155typedef struct _vtech1_state vtech1_state;
156struct _vtech1_state
157{
158   /* devices */
159   const device_config *mc6847;
160   const device_config *speaker;
161   const device_config *cassette;
162   const device_config *printer;
163
164   UINT8 *ram;
165   UINT32 ram_size;
166
167   /* floppy */
168   int drive;
169   UINT8 fdc_track_x2[2];
170   UINT8 fdc_wrprot[2];
171   UINT8 fdc_status;
172   UINT8 fdc_data[TRKSIZE_FM];
173   int data;
174   int fdc_edge;
175   int fdc_bits;
176   int fdc_start;
177   int fdc_write;
178   int fdc_offs;
179   int fdc_latch;
180};
181
182
183/***************************************************************************
184    SNAPSHOT LOADING
185***************************************************************************/
186
187static SNAPSHOT_LOAD( vtech1 )
188{
189   vtech1_state *vtech1 = image->machine->driver_data;
190   const address_space *space = cputag_get_address_space(image->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
191   UINT8 i, header[24];
192   UINT16 start, end, size;
193   char pgmname[18];
194
195   /* get the header */
196   image_fread(image, &header, sizeof(header));
197   for (i = 0; i < 16; i++) pgmname[i] = header[i+4];
198   pgmname[16] = '\0';
199
200   /* get start and end addresses */
201   start = pick_integer_le(header, 22, 2);
202   end = start + snapshot_size - sizeof(header);
203   size = end - start;
204
205   /* check if we have enough ram */
206   if (vtech1->ram_size < size)
207   {
208      char message[256];
209      snprintf(message, ARRAY_LENGTH(message), "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size);
210      image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message);
211      image_message(image, "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size);
212      return INIT_FAIL;
213   }
214
215   /* write it to ram */
216   image_fread(image, &vtech1->ram[start - 0x7800], size);
217
218   /* patch variables depending on snapshot type */
219   switch (header[21])
220   {
221   case VZ_BASIC:      /* 0xF0 */
222      memory_write_byte(space, 0x78a4, start % 256); /* start of basic program */
223      memory_write_byte(space, 0x78a5, start / 256);
224      memory_write_byte(space, 0x78f9, end % 256); /* end of basic program */
225      memory_write_byte(space, 0x78fa, end / 256);
226      memory_write_byte(space, 0x78fb, end % 256); /* start variable table */
227      memory_write_byte(space, 0x78fc, end / 256);
228      memory_write_byte(space, 0x78fd, end % 256); /* start free mem, end variable table */
229      memory_write_byte(space, 0x78fe, end / 256);
230      image_message(image, " %s (B)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end);
231      break;
232
233   case VZ_MCODE:      /* 0xF1 */
234      memory_write_byte(space, 0x788e, start % 256); /* usr subroutine address */
235      memory_write_byte(space, 0x788f, start / 256);
236      image_message(image, " %s (M)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end);
237      cpu_set_reg(cputag_get_cpu(image->machine, "maincpu"), REG_GENPC, start);            /* start program */
238      break;
239
240   default:
241      image_seterror(image, IMAGE_ERROR_UNSUPPORTED, "Snapshot format not supported.");
242      image_message(image, "Snapshot format not supported.");
243      return INIT_FAIL;
244   }
245
246   return INIT_PASS;
247}
248
249static Z80BIN_EXECUTE( vtech1 )
250{
251   const device_config *cpu = cputag_get_cpu(machine, "maincpu");
252   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
253
254   /* A Microsoft Basic program needs some manipulation before it can be run.
255    1. A start address of 7ae9 indicates a basic program which needs its pointers fixed up.
256    2. If autorun is turned off, the pointers still need fixing, but then display READY.
257    Important addresses:
258        7ae9 = start (load) address of a conventional basic program
259        791e = custom routine to fix basic pointers */
260
261   memory_write_word_16le(space, 0x791c, end_address + 1);
262   memory_write_word_16le(space, 0x781e, execute_address);
263
264   if (start_address == 0x7ae9)
265   {
266      UINT8 i, data[]={
267         0xe5,         // PUSH HL  ;save pcode pointer
268         0x2a, 0x1c, 0x79,   // LD HL,(791C) ;get saved end_addr+1
269         0x22, 0xf9, 0x78,   // LD (78F9),HL ;move it to correct place
270         0x21, 0x39, 0x78,   // LD HL,7839   ;point to control flag
271         0xcb, 0xf6,      // SET 6,(HL)   ;turn on autorun (cb b6 = manual run)
272         0xcb, 0x9e,      // RES 3,(HL)   ;turn off verify (just in case)
273         0xc3, 0xcf, 0x36,};   // JP 36CF  ;enter bios at autorun point
274
275      for (i = 0; i < ARRAY_LENGTH(data); i++)
276         memory_write_byte(space, 0x791e + i, data[i]);
277
278      if (!autorun)
279         memory_write_byte(space, 0x7929, 0xb6);   /* turn off autorun */
280
281      cpu_set_reg(cpu, REG_GENPC, 0x791e);
282   }
283   else
284   {
285      if (autorun)
286         cpu_set_reg(cpu, REG_GENPC, execute_address);
287   }
288}
289
290
291/***************************************************************************
292    FLOPPY DRIVE
293***************************************************************************/
294
295static const device_config *vtech1_file(running_machine *machine)
296{
297   vtech1_state *vtech1 = machine->driver_data;
298
299   if (vtech1->drive < 0)
300      return NULL;
301
302   return image_from_devtype_and_index(machine, IO_FLOPPY, vtech1->drive);
303}
304
305static DEVICE_IMAGE_LOAD( vtech1_floppy )
306{
307   vtech1_state *vtech1 = image->machine->driver_data;
308   int id = image_index_in_device(image);
309
310   if (image_is_writable(image))
311      vtech1->fdc_wrprot[id] = 0x00;
312   else
313      vtech1->fdc_wrprot[id] = 0x80;
314
315   return INIT_PASS;
316}
317
318static void vtech1_get_track(running_machine *machine)
319{
320   vtech1_state *vtech1 = machine->driver_data;
321
322   /* drive selected or and image file ok? */
323   if (vtech1->drive >= 0 && image_exists(vtech1_file(machine)))
324   {
325      int size, offs;
326      size = TRKSIZE_VZ;
327      offs = TRKSIZE_VZ * vtech1->fdc_track_x2[vtech1->drive]/2;
328      image_fseek(vtech1_file(machine), offs, SEEK_SET);
329      size = image_fread(vtech1_file(machine), vtech1->fdc_data, size);
330      if (LOG_VTECH1_FDC)
331         logerror("get track @$%05x $%04x bytes\n", offs, size);
332    }
333   vtech1->fdc_offs = 0;
334   vtech1->fdc_write = 0;
335}
336
337static void vtech1_put_track(running_machine *machine)
338{
339   vtech1_state *vtech1 = machine->driver_data;
340
341    /* drive selected and image file ok? */
342   if (vtech1->drive >= 0 && vtech1_file(machine) != NULL)
343   {
344      int size, offs;
345      offs = TRKSIZE_VZ * vtech1->fdc_track_x2[vtech1->drive]/2;
346      image_fseek(vtech1_file(machine), offs + vtech1->fdc_start, SEEK_SET);
347      size = image_fwrite(vtech1_file(machine), &vtech1->fdc_data[vtech1->fdc_start], vtech1->fdc_write);
348      if (LOG_VTECH1_FDC)
349         logerror("put track @$%05X+$%X $%04X/$%04X bytes\n", offs, vtech1->fdc_start, size, vtech1->fdc_write);
350    }
351}
352
353static READ8_HANDLER( vtech1_fdc_r )
354{
355   vtech1_state *vtech1 = space->machine->driver_data;
356    int data = 0xff;
357
358    switch (offset)
359    {
360    case 1: /* data (read-only) */
361      if (vtech1->fdc_bits > 0)
362        {
363         if( vtech1->fdc_status & 0x80 )
364            vtech1->fdc_bits--;
365         data = (vtech1->data >> vtech1->fdc_bits) & 0xff;
366         if (LOG_VTECH1_FDC) {
367            logerror("vtech1_fdc_r bits %d%d%d%d%d%d%d%d\n",
368                   (data>>7)&1,(data>>6)&1,(data>>5)&1,(data>>4)&1,
369                   (data>>3)&1,(data>>2)&1,(data>>1)&1,(data>>0)&1 );
370         }
371        }
372      if (vtech1->fdc_bits == 0)
373        {
374         vtech1->data = vtech1->fdc_data[vtech1->fdc_offs];
375         if (LOG_VTECH1_FDC)
376            logerror("vtech1_fdc_r %d : data ($%04X) $%02X\n", offset, vtech1->fdc_offs, vtech1->data);
377         if(vtech1->fdc_status & 0x80)
378            {
379            vtech1->fdc_bits = 8;
380            vtech1->fdc_offs = (vtech1->fdc_offs + 1) % TRKSIZE_FM;
381            }
382         vtech1->fdc_status &= ~0x80;
383        }
384        break;
385    case 2: /* polling (read-only) */
386        /* fake */
387      if (vtech1->drive >= 0)
388         vtech1->fdc_status |= 0x80;
389      data = vtech1->fdc_status;
390        break;
391    case 3: /* write protect status (read-only) */
392      if (vtech1->drive >= 0)
393         data = vtech1->fdc_wrprot[vtech1->drive];
394      if (LOG_VTECH1_FDC)
395         logerror("vtech1_fdc_r %d : write_protect $%02X\n", offset, data);
396        break;
397    }
398    return data;
399}
400
401static WRITE8_HANDLER( vtech1_fdc_w )
402{
403   vtech1_state *vtech1 = space->machine->driver_data;
404   int drive;
405
406    switch (offset)
407   {
408   case 0: /* latch (write-only) */
409      drive = (data & 0x10) ? 0 : (data & 0x80) ? 1 : -1;
410      if (drive != vtech1->drive)
411      {
412         vtech1->drive = drive;
413         if (vtech1->drive >= 0)
414            vtech1_get_track(space->machine);
415        }
416      if (vtech1->drive >= 0)
417        {
418         if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI1(vtech1->fdc_latch)) ||
419            (PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI2(vtech1->fdc_latch)) ||
420            (PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI3(vtech1->fdc_latch)) ||
421            (PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI0(vtech1->fdc_latch)))
422            {
423            if (vtech1->fdc_track_x2[vtech1->drive] > 0)
424               vtech1->fdc_track_x2[vtech1->drive]--;
425            if (LOG_VTECH1_FDC)
426               logerror("vtech1_fdc_w(%d) $%02X drive %d: stepout track #%2d.%d\n", offset, data, vtech1->drive, vtech1->fdc_track_x2[vtech1->drive]/2,5*(vtech1->fdc_track_x2[vtech1->drive]&1));
427            if ((vtech1->fdc_track_x2[vtech1->drive] & 1) == 0)
428               vtech1_get_track(space->machine);
429            }
430            else
431         if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI3(vtech1->fdc_latch)) ||
432            (PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI0(vtech1->fdc_latch)) ||
433            (PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI1(vtech1->fdc_latch)) ||
434            (PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI2(vtech1->fdc_latch)))
435            {
436            if (vtech1->fdc_track_x2[vtech1->drive] < 2*40)
437               vtech1->fdc_track_x2[vtech1->drive]++;
438            if (LOG_VTECH1_FDC)
439               logerror("vtech1_fdc_w(%d) $%02X drive %d: stepin track #%2d.%d\n", offset, data, vtech1->drive, vtech1->fdc_track_x2[vtech1->drive]/2,5*(vtech1->fdc_track_x2[vtech1->drive]&1));
440            if ((vtech1->fdc_track_x2[vtech1->drive] & 1) == 0)
441               vtech1_get_track(space->machine);
442            }
443            if ((data & 0x40) == 0)
444         {
445            vtech1->data <<= 1;
446            if ((vtech1->fdc_latch ^ data) & 0x20)
447               vtech1->data |= 1;
448            if ((vtech1->fdc_edge ^= 1) == 0)
449                {
450               vtech1->fdc_bits--;
451
452               if (vtech1->fdc_bits == 0)
453               {
454                  UINT8 value = 0;
455                  vtech1->data &= 0xffff;
456                  if (vtech1->data & 0x4000 ) value |= 0x80;
457                  if (vtech1->data & 0x1000 ) value |= 0x40;
458                  if (vtech1->data & 0x0400 ) value |= 0x20;
459                  if (vtech1->data & 0x0100 ) value |= 0x10;
460                  if (vtech1->data & 0x0040 ) value |= 0x08;
461                  if (vtech1->data & 0x0010 ) value |= 0x04;
462                  if (vtech1->data & 0x0004 ) value |= 0x02;
463                  if (vtech1->data & 0x0001 ) value |= 0x01;
464                  if (LOG_VTECH1_FDC)
465                     logerror("vtech1_fdc_w(%d) data($%04X) $%02X <- $%02X ($%04X)\n", offset, vtech1->fdc_offs, vtech1->fdc_data[vtech1->fdc_offs], value, vtech1->data);
466                  vtech1->fdc_data[vtech1->fdc_offs] = value;
467                  vtech1->fdc_offs = (vtech1->fdc_offs + 1) % TRKSIZE_FM;
468                  vtech1->fdc_write++;
469                  vtech1->fdc_bits = 8;
470               }
471                }
472            }
473         /* change of write signal? */
474         if ((vtech1->fdc_latch ^ data) & 0x40)
475            {
476                /* falling edge? */
477            if (vtech1->fdc_latch & 0x40)
478                {
479               vtech1->fdc_start = vtech1->fdc_offs;
480               vtech1->fdc_edge = 0;
481                }
482                else
483                {
484                    /* data written to track before? */
485               if (vtech1->fdc_write)
486                  vtech1_put_track(space->machine);
487                }
488            vtech1->fdc_bits = 8;
489            vtech1->fdc_write = 0;
490            }
491        }
492      vtech1->fdc_latch = data;
493      break;
494    }
495}
496
497
498/***************************************************************************
499    PRINTER
500***************************************************************************/
501
502static READ8_DEVICE_HANDLER( vtech1_printer_r )
503{
504   UINT8 result = 0xff;
505
506   result &= ~(!centronics_busy_r(device));
507
508   return result;
509}
510
511/* TODO: figure out how this really works */
512static WRITE8_DEVICE_HANDLER( vtech1_strobe_w )
513{
514   centronics_strobe_w(device, TRUE);
515   centronics_strobe_w(device, FALSE);
516}
517
518
519/***************************************************************************
520    RS232 SERIAL
521***************************************************************************/
522
523static READ8_HANDLER( vtech1_serial_r )
524{
525   logerror("vtech1_serial_r offset $%02x\n", offset);
526   return 0xff;
527}
528
529static WRITE8_HANDLER( vtech1_serial_w )
530{
531   logerror("vtech1_serial_w $%02x, offset %02x\n", data, offset);
532}
533
534
535/***************************************************************************
536    INPUTS
537***************************************************************************/
538
539static READ8_HANDLER( vtech1_lightpen_r )
540{
541   logerror("vtech1_lightpen_r(%d)\n", offset);
542   return 0xff;
543}
544
545static READ8_HANDLER( vtech1_joystick_r )
546{
547    int result = 0xff;
548
549   if (!BIT(offset, 0)) result &= input_port_read(space->machine, "joystick_0");
550   if (!BIT(offset, 1)) result &= input_port_read(space->machine, "joystick_0_arm");
551   if (!BIT(offset, 2)) result &= input_port_read(space->machine, "joystick_1");
552   if (!BIT(offset, 3)) result &= input_port_read(space->machine, "joystick_1_arm");
553
554    return result;
555}
556
557static READ8_HANDLER( vtech1_keyboard_r )
558{
559   vtech1_state *vtech1 = space->machine->driver_data;
560   UINT8 result = 0x3f;
561
562   /* bit 0 to 5, keyboard input */
563   if (!BIT(offset, 0)) result &= input_port_read(space->machine, "keyboard_0");
564   if (!BIT(offset, 1)) result &= input_port_read(space->machine, "keyboard_1");
565   if (!BIT(offset, 2)) result &= input_port_read(space->machine, "keyboard_2");
566   if (!BIT(offset, 3)) result &= input_port_read(space->machine, "keyboard_3");
567   if (!BIT(offset, 4)) result &= input_port_read(space->machine, "keyboard_4");
568   if (!BIT(offset, 5)) result &= input_port_read(space->machine, "keyboard_5");
569   if (!BIT(offset, 6)) result &= input_port_read(space->machine, "keyboard_6");
570   if (!BIT(offset, 7)) result &= input_port_read(space->machine, "keyboard_7");
571
572   /* bit 6, cassette input */
573   result |= (cassette_input(vtech1->cassette) > 0 ? 1 : 0) << 6;
574
575   /* bit 7, field sync */
576   result |= mc6847_fs_r(vtech1->mc6847) << 7;
577
578    return result;
579}
580
581
582/***************************************************************************
583    I/O LATCH
584***************************************************************************/
585
586static WRITE8_HANDLER( vtech1_latch_w )
587{
588   vtech1_state *vtech1 = space->machine->driver_data;
589
590   if (LOG_VTECH1_LATCH)
591      logerror("vtech1_latch_w $%02X\n", data);
592
593   /* bit 2, cassette out */
594   cassette_output(vtech1->cassette, BIT(data, 2) ? +1.0 : -1.0);
595
596   /* bit 3 and 4, vdc mode control lines */
597   mc6847_ag_w(vtech1->mc6847, BIT(data, 3));
598   mc6847_css_w(vtech1->mc6847, BIT(data, 4));
599
600   /* bit 0 and 5, speaker */
601   speaker_level_w(vtech1->speaker, (BIT(data, 5) << 1) | BIT(data, 0));
602}
603
604
605/***************************************************************************
606    MEMORY BANKING
607***************************************************************************/
608
609static WRITE8_HANDLER( vtech1_memory_bank_w )
610{
611   vtech1_state *vtech1 = space->machine->driver_data;
612
613   logerror("vtech1_memory_bank_w $%02X\n", data);
614
615   if (data >= 1)
616      if ((data <= 3 && vtech1->ram_size == 66*1024) || (vtech1->ram_size == 4098*1024))
617         memory_set_bank(space->machine, 3, data - 1);
618}
619
620
621/***************************************************************************
622    VIDEO EMULATION
623***************************************************************************/
624
625static READ8_DEVICE_HANDLER( vtech1_mc6847_videoram_r )
626{
627   mc6847_inv_w(device, BIT(videoram[offset], 6));
628   mc6847_as_w(device, BIT(videoram[offset], 7));
629
630   return videoram[offset];
631}
632
633static VIDEO_UPDATE( vtech1 )
634{
635   vtech1_state *vtech1 = screen->machine->driver_data;
636   return mc6847_update(vtech1->mc6847, bitmap, cliprect);
637}
638
639
640/***************************************************************************
641    DRIVER INIT
642***************************************************************************/
643
644static DRIVER_INIT( vtech1 )
645{
646   vtech1_state *vtech1 = machine->driver_data;
647   const address_space *prg = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
648
649   /* find devices */
650   vtech1->mc6847 = devtag_get_device(machine, "mc6847");
651   vtech1->speaker = devtag_get_device(machine, "speaker");
652   vtech1->cassette = devtag_get_device(machine, "cassette");
653   vtech1->printer = devtag_get_device(machine, "printer");
654
655   /* ram */
656   vtech1->ram = messram_get_ptr(devtag_get_device(machine, "messram"));
657   vtech1->ram_size = messram_get_size(devtag_get_device(machine, "messram"));
658
659   /* setup memory banking */
660   memory_set_bankptr(machine, 1, vtech1->ram);
661
662   /* 16k memory expansion? */
663   if (vtech1->ram_size == 18*1024 || vtech1->ram_size == 22*1024 || vtech1->ram_size == 32*1024)
664   {
665      offs_t base = 0x7800 + (vtech1->ram_size - 0x4000);
666      memory_install_readwrite8_handler(prg, base, base + 0x3fff, 0, 0, SMH_BANK(2), SMH_BANK(2));
667      memory_set_bankptr(machine, 2, vtech1->ram + base - 0x7800);
668   }
669
670   /* 64k expansion? */
671   if (vtech1->ram_size >= 66*1024)
672   {
673      /* install fixed first bank */
674      memory_install_readwrite8_handler(prg, 0x8000, 0xbfff, 0, 0, SMH_BANK(2), SMH_BANK(2));
675      memory_set_bankptr(machine, 2, vtech1->ram + 0x800);
676
677      /* install the others, dynamically banked in */
678      memory_install_readwrite8_handler(prg, 0xc000, 0xffff, 0, 0, SMH_BANK(3), SMH_BANK(3));
679      memory_configure_bank(machine, 3, 0, (vtech1->ram_size - 0x4800) / 0x4000, vtech1->ram + 0x4800, 0x4000);
680      memory_set_bank(machine, 3, 0);
681   }
682
683   /* initialize floppy */
684   vtech1->drive = -1;
685   vtech1->fdc_track_x2[0] = 80;
686   vtech1->fdc_track_x2[1] = 80;
687   vtech1->fdc_wrprot[0] = 0x80;
688   vtech1->fdc_wrprot[1] = 0x80;
689   vtech1->fdc_status = 0;
690   vtech1->fdc_edge = 0;
691   vtech1->fdc_bits = 8;
692   vtech1->fdc_start = 0;
693   vtech1->fdc_write = 0;
694   vtech1->fdc_offs = 0;
695   vtech1->fdc_latch = 0;
696}
697
698
699/***************************************************************************
700    ADDRESS MAPS
701***************************************************************************/
702
703static ADDRESS_MAP_START( laser110_mem, ADDRESS_SPACE_PROGRAM, 8 )
130704    AM_RANGE(0x0000, 0x3fff) AM_ROM   /* basic rom */
131705    AM_RANGE(0x4000, 0x5fff) AM_ROM   /* dos rom or other catridges */
132706    AM_RANGE(0x6000, 0x67ff) AM_ROM   /* reserved for cartridges */
133707    AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w)
134708    AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) /* (6847) */
135    AM_RANGE(0x7800, 0x7fff) AM_RAMBANK(1) /* 2KB user ram */
709    AM_RANGE(0x7800, 0x7fff) AM_RAMBANK(1) /* 2k user ram */
710    AM_RANGE(0x8000, 0xbfff) AM_NOP /* 16k ram expansion */
711    AM_RANGE(0xc000, 0xffff) AM_NOP
136712ADDRESS_MAP_END
137713
138static ADDRESS_MAP_START(laser210_mem, ADDRESS_SPACE_PROGRAM, 8)
714static ADDRESS_MAP_START( laser210_mem, ADDRESS_SPACE_PROGRAM, 8 )
139715    AM_RANGE(0x0000, 0x3fff) AM_ROM   /* basic rom */
140716    AM_RANGE(0x4000, 0x5fff) AM_ROM   /* dos rom or other catridges */
141717    AM_RANGE(0x6000, 0x67ff) AM_ROM   /* reserved for cartridges */
142718    AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w)
143719    AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) /* U7 (6847) */
144    AM_RANGE(0x7800, 0x8fff) AM_RAMBANK(1) /* 6KB user ram */
720    AM_RANGE(0x7800, 0x8fff) AM_RAMBANK(1) /* 6k user ram */
721    AM_RANGE(0x9000, 0xcfff) AM_NOP /* 16k ram expansion */
722    AM_RANGE(0xd000, 0xffff) AM_NOP
145723ADDRESS_MAP_END
146724
147static ADDRESS_MAP_START(laser310_mem, ADDRESS_SPACE_PROGRAM, 8)
725static ADDRESS_MAP_START( laser310_mem, ADDRESS_SPACE_PROGRAM, 8 )
148726    AM_RANGE(0x0000, 0x3fff) AM_ROM   /* basic rom */
149727    AM_RANGE(0x4000, 0x5fff) AM_ROM   /* dos rom or other catridges */
150728    AM_RANGE(0x6000, 0x67ff) AM_ROM   /* reserved for cartridges */
151729    AM_RANGE(0x6800, 0x6fff) AM_READWRITE(vtech1_keyboard_r, vtech1_latch_w)
152730    AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) /* (6847) */
153    AM_RANGE(0x7800, 0xb7ff) AM_RAMBANK(1) /* 16KB user ram */
731    AM_RANGE(0x7800, 0xb7ff) AM_RAMBANK(1) /* 16k user ram */
732    AM_RANGE(0xb800, 0xf7ff) AM_NOP /* 16k ram expansion */
733    AM_RANGE(0xf8ff, 0xffff) AM_NOP
154734ADDRESS_MAP_END
155735
156static ADDRESS_MAP_START(vtech1_io, ADDRESS_SPACE_IO, 8)
736static ADDRESS_MAP_START( vtech1_io, ADDRESS_SPACE_IO, 8 )
157737   ADDRESS_MAP_GLOBAL_MASK(0xff)
158   AM_RANGE(0x00, 0x00) AM_READ(vtech1_printer_r)
159   AM_RANGE(0x0d, 0x0d) AM_WRITE(vtech1_strobe_w)
738   AM_RANGE(0x00, 0x00) AM_DEVREAD("centronics", vtech1_printer_r)
739   AM_RANGE(0x0d, 0x0d) AM_DEVWRITE("centronics", vtech1_strobe_w)
160740   AM_RANGE(0x0e, 0x0e) AM_DEVWRITE("centronics", centronics_data_w)
161741   AM_RANGE(0x10, 0x1f) AM_READWRITE(vtech1_fdc_r, vtech1_fdc_w)
162742   AM_RANGE(0x20, 0x2f) AM_READ(vtech1_joystick_r)
163743   AM_RANGE(0x30, 0x3f) AM_READWRITE(vtech1_serial_r, vtech1_serial_w)
164744   AM_RANGE(0x40, 0x4f) AM_READ(vtech1_lightpen_r)
165   AM_RANGE(0x50, 0x5f) AM_NOP /* Real time clock (proposed) */
166   AM_RANGE(0x60, 0x6f) AM_NOP /* External keyboard */
167745   AM_RANGE(0x70, 0x7f) AM_WRITE(vtech1_memory_bank_w)
168   AM_RANGE(0x80, 0xff) AM_NOP
169//  AM_RANGE(0xc9, 0xca) AM_NOP /* Eprom programmer */
170//  AM_RANGE(0xd8, 0xe7) AM_NOP /* Auto boot at 8000-9fff (proposed) */
171//  AM_RANGE(0xe8, 0xf7) AM_NOP /* RDOS at 6000-67ff (proposed) */
172//  AM_RANGE(0xf0, 0xf3) AM_NOP /* 24 bit I/O interface */
173//  AM_RANGE(0xf8, 0xff) AM_NOP /* RAM Disk at 4000-5fff (proposed) */
174//  AM_RANGE(0xe0, 0xff) AM_NOP /* D. Newcombes Rom Board */
175746ADDRESS_MAP_END
176747
177748
178/******************************************************************************
179 Input Ports
180******************************************************************************/
749/***************************************************************************
750    INPUT PORTS
751***************************************************************************/
181752
182753static INPUT_PORTS_START(vtech1)
183754   PORT_START("keyboard_0")
r6100r6101
289860INPUT_PORTS_END
290861
291862
292/******************************************************************************
293 Audio Initialisation
294******************************************************************************/
863/***************************************************************************
864    PALETTE
865***************************************************************************/
295866
296static const INT16 speaker_levels[] = {-32768, 0, 32767, 0};
297
298static const speaker_interface vtech1_speaker_interface =
299{
300   4,
301   speaker_levels
302};
303
304
305/******************************************************************************
306 Machine Drivers
307******************************************************************************/
308
309static const cassette_config laser_cassette_config =
310{
311   vtech1_cassette_formats,
312   NULL,
313   CASSETTE_PLAY
314};
315
316867static const UINT32 vtech1_palette_mono[] =
317868{
318869   MAKE_RGB(131, 131, 131),
r6100r6101
333884   MAKE_RGB(193, 193, 193)
334885};
335886
887
888/***************************************************************************
889    MACHINE DRIVERS
890***************************************************************************/
891
892static const INT16 speaker_levels[] = {-32768, 0, 32767, 0};
893
894static const speaker_interface vtech1_speaker_interface =
895{
896   4,
897   speaker_levels
898};
899
900static const cassette_config laser_cassette_config =
901{
902   vtech1_cassette_formats,
903   NULL,
904   CASSETTE_PLAY
905};
906
336907static const mc6847_interface vtech1_mc6847_intf =
337908{
338909   DEVCB_HANDLER(vtech1_mc6847_videoram_r),
r6100r6101
349920   DEVCB_NULL,
350921};
351922
352static MACHINE_DRIVER_START(laser110)
923static MACHINE_DRIVER_START( laser110 )
924   MDRV_DRIVER_DATA(vtech1_state)
925
353926    /* basic machine hardware */
354927    MDRV_CPU_ADD("maincpu", Z80, VTECH1_CLK)  /* 3.57950 MHz */
355928    MDRV_CPU_PROGRAM_MAP(laser110_mem)
356929    MDRV_CPU_IO_MAP(vtech1_io)
357930
358   MDRV_MACHINE_START(laser110)
359
360931    /* video hardware */
361932   MDRV_SCREEN_ADD("screen", RASTER)
362933   MDRV_SCREEN_REFRESH_RATE(M6847_PAL_FRAMES_PER_SECOND)
r6100r6101
390961   /* cartridge */
391962   MDRV_CARTSLOT_ADD("cart")
392963   MDRV_CARTSLOT_EXTENSION_LIST("rom")
393   
964
394965   /* internal ram */
395966   MDRV_RAM_ADD("messram")
396967   MDRV_RAM_DEFAULT_SIZE("66K")
397968   MDRV_RAM_EXTRA_OPTIONS("2K,18K,4098K")
398969MACHINE_DRIVER_END
399970
400static MACHINE_DRIVER_START(laser200)
971static MACHINE_DRIVER_START( laser200 )
401972    MDRV_IMPORT_FROM(laser110)
402973
403974    MDRV_DEVICE_MODIFY("mc6847")
404975    MDRV_MC6847_PALETTE(NULL)
405976MACHINE_DRIVER_END
406977
407static MACHINE_DRIVER_START(laser210)
978static MACHINE_DRIVER_START( laser210 )
408979    MDRV_IMPORT_FROM(laser200)
409980    MDRV_CPU_MODIFY("maincpu")
410981    MDRV_CPU_PROGRAM_MAP(laser210_mem)
411982
412    MDRV_MACHINE_START(laser210)
413   
414983   /* internal ram */
415984   MDRV_RAM_MODIFY("messram")
416985   MDRV_RAM_DEFAULT_SIZE("66K")
417   MDRV_RAM_EXTRA_OPTIONS("6K,22K,4098K")   
986   MDRV_RAM_EXTRA_OPTIONS("6K,22K,4098K")
418987MACHINE_DRIVER_END
419988
420static MACHINE_DRIVER_START(laser310)
421    MDRV_IMPORT_FROM( laser200 )
422    MDRV_CPU_REPLACE( "maincpu", Z80, VZ300_XTAL1_CLK/5)  /* 3.546894 MHz */
989static MACHINE_DRIVER_START( laser310 )
990    MDRV_IMPORT_FROM(laser200)
991    MDRV_CPU_REPLACE("maincpu", Z80, VZ300_XTAL1_CLK / 5)  /* 3.546894 MHz */
423992    MDRV_CPU_PROGRAM_MAP(laser310_mem)
424993
425    MDRV_MACHINE_START(laser310)
426994   /* internal ram */
427995   MDRV_RAM_MODIFY("messram")
428996   MDRV_RAM_DEFAULT_SIZE("66K")
429997   MDRV_RAM_EXTRA_OPTIONS("16K,32K,4098K")
430998MACHINE_DRIVER_END
431999
432/******************************************************************************
433 ROM Definitions
434******************************************************************************/
4351000
436ROM_START(laser110)
1001/***************************************************************************
1002    ROM DEFINITIONS
1003***************************************************************************/
1004
1005ROM_START( laser110 )
4371006    ROM_REGION(0x6800, "maincpu", 0)
4381007    ROM_LOAD("vtechv12.u09",   0x0000, 0x2000, CRC(99412d43) SHA1(6aed8872a0818be8e1b08ecdfd92acbe57a3c96d))
4391008    ROM_LOAD("vtechv12.u10",   0x2000, 0x2000, CRC(e4c24e8b) SHA1(9d8fb3d24f3d4175b485cf081a2d5b98158ab2fb))
r6100r6101
4421011
4431012/* The VZ-200 sold in Germany and the Netherlands came with BASIC V1.1, which
4441013   is currently not dumped. */
445ROM_START(vz200de)
1014ROM_START( vz200de )
4461015    ROM_REGION(0x6800, "maincpu", 0)
4471016    ROM_LOAD("vtechv11.u09",   0x0000, 0x2000, NO_DUMP)
4481017    ROM_LOAD("vtechv11.u10",   0x2000, 0x2000, NO_DUMP)
r6100r6101
4571026   needs to be verified */
4581027#define rom_tx8000      rom_laser110
4591028
460ROM_START(laser210)
1029ROM_START( laser210 )
4611030    ROM_REGION(0x6800, "maincpu", 0)
4621031    ROM_LOAD("vtechv20.u09",   0x0000, 0x2000, CRC(cc854fe9) SHA1(6e66a309b8e6dc4f5b0b44e1ba5f680467353d66))
4631032    ROM_LOAD("vtechv20.u10",   0x2000, 0x2000, CRC(7060f91a) SHA1(8f3c8f24f97ebb98f3c88d4e4ba1f91ffd563440))
r6100r6101
4671036#define rom_las210de    rom_laser210
4681037#define rom_vz200       rom_laser210
4691038
470ROM_START(laser310)
1039ROM_START( laser310 )
4711040    ROM_REGION(0x6800, "maincpu", 0)
4721041   ROM_SYSTEM_BIOS(0, "basic20", "BASIC V2.0")
4731042    ROMX_LOAD("vtechv20.u12", 0x0000, 0x4000, CRC(613de12c) SHA1(f216c266bc09b0dbdbad720796e5ea9bc7d91e53), ROM_BIOS(1))
r6100r6101
4791048#define rom_vz300       rom_laser310
4801049
4811050
482/******************************************************************************
483 System Config
484******************************************************************************/
1051/***************************************************************************
1052    SYSTEM_CONFIG
1053***************************************************************************/
4851054
486static Z80BIN_EXECUTE( vtech1 )
487{
488   const device_config *cpu = cputag_get_cpu(machine, "maincpu");
489   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
490
491   /* A Microsoft Basic program needs some manipulation before it can be run.
492    1. A start address of 7ae9 indicates a basic program which needs its pointers fixed up.
493    2. If autorun is turned off, the pointers still need fixing, but then display READY.
494    Important addresses:
495        7ae9 = start (load) address of a conventional basic program
496        791e = custom routine to fix basic pointers */
497
498   memory_write_word_16le(space, 0x791c, end_address + 1);
499   memory_write_word_16le(space, 0x781e, execute_address);
500
501   if (start_address == 0x7ae9)
502   {
503      UINT8 i, data[]={
504         0xe5,         // PUSH HL  ;save pcode pointer
505         0x2a, 0x1c, 0x79,   // LD HL,(791C) ;get saved end_addr+1
506         0x22, 0xf9, 0x78,   // LD (78F9),HL ;move it to correct place
507         0x21, 0x39, 0x78,   // LD HL,7839   ;point to control flag
508         0xcb, 0xf6,      // SET 6,(HL)   ;turn on autorun (cb b6 = manual run)
509         0xcb, 0x9e,      // RES 3,(HL)   ;turn off verify (just in case)
510         0xc3, 0xcf, 0x36,};   // JP 36CF  ;enter bios at autorun point
511
512      for (i = 0; i < ARRAY_LENGTH(data); i++)
513         memory_write_byte(space, 0x791e + i, data[i]);
514
515      if (!autorun)
516         memory_write_byte(space, 0x7929, 0xb6);   /* turn off autorun */
517
518      cpu_set_reg(cpu, REG_GENPC, 0x791e);
519   }
520   else
521   {
522      if (autorun)
523         cpu_set_reg(cpu, REG_GENPC, execute_address);
524   }
525}
526
527
5281055static void vtech1_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
5291056{
530   /* floppy */
531   switch(state)
1057   switch (state)
5321058   {
5331059      /* --- the following bits of info are returned as 64-bit signed integers --- */
534      case MESS_DEVINFO_INT_TYPE:                     info->i = IO_FLOPPY; break;
535      case MESS_DEVINFO_INT_READABLE:                  info->i = 1; break;
536      case MESS_DEVINFO_INT_WRITEABLE:                  info->i = 1; break;
537      case MESS_DEVINFO_INT_CREATABLE:                  info->i = 1; break;
538      case MESS_DEVINFO_INT_COUNT:                     info->i = 2; break;
1060      case MESS_DEVINFO_INT_TYPE:            info->i = IO_FLOPPY; break;
1061      case MESS_DEVINFO_INT_READABLE:         info->i = 1; break;
1062      case MESS_DEVINFO_INT_WRITEABLE:      info->i = 1; break;
1063      case MESS_DEVINFO_INT_CREATABLE:      info->i = 1; break;
1064      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
5391065
5401066      /* --- the following bits of info are returned as pointers to data or functions --- */
541      case MESS_DEVINFO_PTR_LOAD:                     info->load = DEVICE_IMAGE_LOAD_NAME(vtech1_floppy); break;
1067      case MESS_DEVINFO_PTR_LOAD:            info->load = DEVICE_IMAGE_LOAD_NAME(vtech1_floppy); break;
5421068
5431069      /* --- the following bits of info are returned as NULL-terminated strings --- */
544      case MESS_DEVINFO_STR_FILE_EXTENSIONS:            strcpy(info->s = device_temp_str(), "dsk"); break;
1070      case MESS_DEVINFO_STR_FILE_EXTENSIONS:   strcpy(info->s = device_temp_str(), "dsk"); break;
5451071   }
5461072}
5471073
548/* Memory expansions available for the Laser/VZ computers:
549
550   - a 16kb expansion without banking
551   - a 64kb expansion where the first bank is fixed and the other 3 are
552     banked in as needed
553   - a banked memory expansion similar to the 64kb one, that the user could
554     fill themselves with memory up to 4MB total.
555
556   They are externally connected devices. The 16kb extension is different
557   between Laser 110/210/310 computers, though it could be relativly
558   easily modified to work on another model. */
559
560static SYSTEM_CONFIG_START(vtech1)
1074static SYSTEM_CONFIG_START( vtech1 )
5611075    CONFIG_DEVICE(vtech1_floppy_getinfo)
5621076SYSTEM_CONFIG_END
5631077
5641078
565/******************************************************************************
566 Drivers
567******************************************************************************/
1079/***************************************************************************
1080    GAME DRIVERS
1081***************************************************************************/
5681082
569/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT CONFIG      COMPANY                     FULLNAME                            FLAGS */
570COMP( 1983, laser110,   0,          0,      laser110,   vtech1, 0,   vtech1,   "Video Technology",         "Laser 110",                        0 )
571COMP( 1983, las110de,   laser110,   0,      laser110,   vtech1, 0,   vtech1,   "Sanyo",                    "Laser 110 (Germany)",              0 )
572
573COMP( 1983, laser200,   0,          0,      laser200,   vtech1, 0,   vtech1,   "Video Technology",         "Laser 200",                        0 )
574COMP( 1983, vz200de,    laser200,   0,      laser200,   vtech1, 0,   vtech1,   "Video Technology",         "VZ-200 (Germany & Netherlands)",   GAME_NOT_WORKING )
575COMP( 1983, fellow,     laser200,   0,      laser200,   vtech1, 0,   vtech1,   "Salora",                   "Fellow (Finland)",                 0 )
576COMP( 1983, tx8000,     laser200,   0,      laser200,   vtech1, 0,   vtech1,   "Texet",                    "TX-8000 (UK)",                     0 )
577
578COMP( 1984, laser210,   0,          0,      laser210,   vtech1, 0,   vtech1,   "Video Technology",         "Laser 210",                        0 )
579COMP( 1984, vz200,      laser210,   0,      laser210,   vtech1, 0,   vtech1,   "Dick Smith Electronics",   "VZ-200 (Oceania)",                 0 )
580COMP( 1984, las210de,   laser210,   0,      laser210,   vtech1, 0,   vtech1,   "Sanyo",                    "Laser 210 (Germany)",              0 )
581
582COMP( 1984, laser310,   0,          0,      laser310,   vtech1, 0,   vtech1,   "Video Technology",         "Laser 310",                        0 )
583COMP( 1984, vz300,      laser310,   0,      laser310,   vtech1, 0,    vtech1,   "Dick Smith Electronics",   "VZ-300 (Oceania)",                 0 )
1083/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT   INIT    CONFIG  COMPANY                   FULLNAME                          FLAGS */
1084COMP( 1983, laser110, 0,        0,      laser110, vtech1, vtech1, vtech1, "Video Technology",       "Laser 110",                      0 )
1085COMP( 1983, las110de, laser110, 0,      laser110, vtech1, vtech1, vtech1, "Sanyo",                  "Laser 110 (Germany)",            0 )
1086COMP( 1983, laser200, 0,        0,      laser200, vtech1, vtech1, vtech1, "Video Technology",       "Laser 200",                      0 )
1087COMP( 1983, vz200de,  laser200, 0,      laser200, vtech1, vtech1, vtech1, "Video Technology",       "VZ-200 (Germany & Netherlands)", 0 )
1088COMP( 1983, fellow,   laser200, 0,      laser200, vtech1, vtech1, vtech1, "Salora",                 "Fellow (Finland)",               0 )
1089COMP( 1983, tx8000,   laser200, 0,      laser200, vtech1, vtech1, vtech1, "Texet",                  "TX-8000 (UK)",                   0 )
1090COMP( 1984, laser210, 0,        0,      laser210, vtech1, vtech1, vtech1, "Video Technology",       "Laser 210",                      0 )
1091COMP( 1984, vz200,    laser210, 0,      laser210, vtech1, vtech1, vtech1, "Dick Smith Electronics", "VZ-200 (Oceania)",               0 )
1092COMP( 1984, las210de, laser210, 0,      laser210, vtech1, vtech1, vtech1, "Sanyo",                  "Laser 210 (Germany)",            0 )
1093COMP( 1984, laser310, 0,        0,      laser310, vtech1, vtech1, vtech1, "Video Technology",       "Laser 310",                      0 )
1094COMP( 1984, vz300,    laser310, 0,      laser310, vtech1, vtech1, vtech1, "Dick Smith Electronics", "VZ-300 (Oceania)",               0 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team