Previous 15994 Revisions Next

r6747 Friday 25th December, 2009 at 09:30:29 UTC by Miodrag Milanović
Converted Atari FDC to device
[src/mess/drivers]atari.c
[src/mess/machine]ataridev.h atarifdc.c

src/mess/machine/ataridev.h
r6746r6747
3030
3131
3232/*----------- defined in machine/atarifdc.c -----------*/
33/***************************************************************************
34    MACROS
35***************************************************************************/
3336
34DEVICE_IMAGE_LOAD( a800_floppy );
35READ8_HANDLER( atari_serin_r );
36WRITE8_HANDLER( atari_serout_w );
37#define ATARI_FDC      DEVICE_GET_INFO_NAME(atari_fdc)
38
39#define MDRV_ATARI_FDC_ADD(_tag)   \
40   MDRV_DEVICE_ADD((_tag),  ATARI_FDC, 0)
41
42
43/***************************************************************************
44    FUNCTION PROTOTYPES
45***************************************************************************/
46
47DEVICE_GET_INFO(atari_fdc);
48
49READ8_DEVICE_HANDLER( atari_serin_r );
50WRITE8_DEVICE_HANDLER( atari_serout_w );
3751WRITE_LINE_DEVICE_HANDLER( atarifdc_pia_cb2_w );
3852
3953#endif /* _ATARIDEV_H */
src/mess/machine/atarifdc.c
r6746r6747
1616#include "ataridev.h"
1717#include "sound/pokey.h"
1818#include "machine/6821pia.h"
19#include "devices/flopdrv.h"
1920#include "image.h"
2021
2122#define VERBOSE_SERIAL   0
2223#define VERBOSE_CHKSUM   0
2324
24typedef struct {
25   int  serout_count;
26   int  serout_offs;
27   UINT8 serout_buff[512];
28   UINT8 serout_chksum;
29   int  serout_delay;
30
31   int  serin_count;
32   int  serin_offs;
33   UINT8 serin_buff[512];
34   UINT8 serin_chksum;
35   int  serin_delay;
36}   ATARI_FDC;
37
38static ATARI_FDC atari_fdc;
39
4025typedef struct _atari_drive atari_drive;
4126struct _atari_drive
4227{
r6746r6747
5338   int sectors;      /* total sectors, ie. tracks x heads x spt */
5439};
5540
56static atari_drive drv[4];
41typedef struct _atari_fdc_t atari_fdc_t;
42struct _atari_fdc_t
43{
44   int  serout_count;
45   int  serout_offs;
46   UINT8 serout_buff[512];
47   UINT8 serout_chksum;
48   int  serout_delay;
5749
50   int  serin_count;
51   int  serin_offs;
52   UINT8 serin_buff[512];
53   UINT8 serin_chksum;
54   int  serin_delay;
55   
56   atari_drive drv[4];
57};
58
5859/*************************************
5960 *
6061 *  Disk stuff
r6746r6747
6667#define FORMAT_DSK   2
6768
6869/*****************************************************************************
70    INLINE FUNCTIONS
71*****************************************************************************/
72INLINE atari_fdc_t *get_safe_token(const device_config *device)
73{
74   assert(device != NULL);
75   assert(device->token != NULL);
76
77   return (atari_fdc_t *)device->token;
78}
79
80/*****************************************************************************
6981 * This is the structure I used in my own Atari 800 emulator some years ago
7082 * Though it's a bit overloaded, I used it as it is the maximum of all
7183 * supported formats:
r6746r6747
136148 *****************************************************************************/
137149
138150#define MAXSIZE 5760 * 256 + 80
139DEVICE_IMAGE_LOAD( a800_floppy )
151static void atari_load_proc(const device_config *image)
140152{
153   atari_fdc_t *fdc = get_safe_token(image->owner);
154   int id = floppy_get_drive(image);
141155   int size, i;
142156   const char *ext;
143   int id = image_index_in_device(image);
144157
145   drv[id].image = image_malloc(image, MAXSIZE);
146   if (!drv[id].image)
147      return INIT_FAIL;
158   fdc->drv[id].image = image_malloc(image, MAXSIZE);
159   if (!fdc->drv[id].image)
160      return;
148161
149162   /* tell whether the image is writable */
150   drv[id].mode = image_is_writable(image);
163   fdc->drv[id].mode = image_is_writable(image);
151164   /* set up image if it has been created */
152165   if (image_has_been_created(image))
153166   {
r6746r6747
160173      image_fseek(image, 0, SEEK_SET);
161174   }
162175
163   size = image_fread(image, drv[id].image, MAXSIZE);
176   size = image_fread(image, fdc->drv[id].image, MAXSIZE);
164177   if( size <= 0 )
165178   {
166      drv[id].image = NULL;
167      return INIT_FAIL;
179      fdc->drv[id].image = NULL;
180      return;
168181   }
169182   /* re allocate the buffer; we don't want to be too lazy ;) */
170    drv[id].image = image_realloc(image, drv[id].image, size);
183    fdc->drv[id].image = image_realloc(image, fdc->drv[id].image, size);
171184
172185   ext = image_filetype(image);
173186    /* no extension: assume XFD format (no header) */
174187    if (!ext)
175188    {
176        drv[id].type = FORMAT_XFD;
177        drv[id].header_skip = 0;
189        fdc->drv[id].type = FORMAT_XFD;
190        fdc->drv[id].header_skip = 0;
178191    }
179192    else
180193    /* XFD extension */
181194    if( toupper(ext[0])=='X' && toupper(ext[1])=='F' && toupper(ext[2])=='D' )
182195    {
183        drv[id].type = FORMAT_XFD;
184        drv[id].header_skip = 0;
196        fdc->drv[id].type = FORMAT_XFD;
197        fdc->drv[id].header_skip = 0;
185198    }
186199    else
187200    /* ATR extension */
188201    if( toupper(ext[0])=='A' && toupper(ext[1])=='T' && toupper(ext[2])=='R' )
189202    {
190        drv[id].type = FORMAT_ATR;
191        drv[id].header_skip = 16;
203        fdc->drv[id].type = FORMAT_ATR;
204        fdc->drv[id].header_skip = 16;
192205    }
193206    else
194207    /* DSK extension */
195208    if( toupper(ext[0])=='D' && toupper(ext[1])=='S' && toupper(ext[2])=='K' )
196209    {
197        drv[id].type = FORMAT_DSK;
198        drv[id].header_skip = sizeof(dsk_format);
210        fdc->drv[id].type = FORMAT_DSK;
211        fdc->drv[id].header_skip = sizeof(dsk_format);
199212    }
200213    else
201214    {
202      drv[id].type = FORMAT_XFD;
203        drv[id].header_skip = 0;
215      fdc->drv[id].type = FORMAT_XFD;
216        fdc->drv[id].header_skip = 0;
204217    }
205218
206   if( drv[id].type == FORMAT_ATR &&
207      (drv[id].image[0] != 0x96 || drv[id].image[1] != 0x02) )
219   if( fdc->drv[id].type == FORMAT_ATR &&
220      (fdc->drv[id].image[0] != 0x96 || fdc->drv[id].image[1] != 0x02) )
208221   {
209      drv[id].type = FORMAT_XFD;
210      drv[id].header_skip = 0;
222      fdc->drv[id].type = FORMAT_XFD;
223      fdc->drv[id].header_skip = 0;
211224   }
212225
213   switch (drv[id].type)
226   switch (fdc->drv[id].type)
214227   {
215228   /* XFD or unknown format: find a matching size from the table */
216229   case FORMAT_XFD:
r6746r6747
218231      {
219232         if( size == xfd_formats[i].size )
220233         {
221            drv[id].density = xfd_formats[i].dsk.density;
222            drv[id].tracks = xfd_formats[i].dsk.tracks;
223            drv[id].spt = xfd_formats[i].dsk.spt;
224            drv[id].heads = (xfd_formats[i].dsk.doublesided) ? 2 : 1;
225            drv[id].bseclen = 128;
226            drv[id].seclen = 256 * xfd_formats[i].dsk.seclen_hi + xfd_formats[i].dsk.seclen_lo;
227            drv[id].sectors = drv[id].tracks * drv[id].heads * drv[id].spt;
234            fdc->drv[id].density = xfd_formats[i].dsk.density;
235            fdc->drv[id].tracks = xfd_formats[i].dsk.tracks;
236            fdc->drv[id].spt = xfd_formats[i].dsk.spt;
237            fdc->drv[id].heads = (xfd_formats[i].dsk.doublesided) ? 2 : 1;
238            fdc->drv[id].bseclen = 128;
239            fdc->drv[id].seclen = 256 * xfd_formats[i].dsk.seclen_hi + xfd_formats[i].dsk.seclen_lo;
240            fdc->drv[id].sectors = fdc->drv[id].tracks * fdc->drv[id].heads * fdc->drv[id].spt;
228241            break;
229242         }
230243      }
r6746r6747
234247      {
235248         int s;
236249
237         drv[id].bseclen = 128;
250         fdc->drv[id].bseclen = 128;
238251         /* get sectors from ATR header */
239252         s = (size - 16) / 128;
240253         /* 3 + odd number of sectors ? */
241         if ( drv[id].image[4] == 128 || (s % 18) == 0 || (s % 26) == 0 || ((s - 3) % 1) != 0 )
254         if ( fdc->drv[id].image[4] == 128 || (s % 18) == 0 || (s % 26) == 0 || ((s - 3) % 1) != 0 )
242255         {
243            drv[id].sectors = s;
244            drv[id].seclen = 128;
256            fdc->drv[id].sectors = s;
257            fdc->drv[id].seclen = 128;
245258            /* sector size 128 or count not evenly dividable by 26 ? */
246            if( drv[id].seclen == 128 || (s % 26) != 0 )
259            if( fdc->drv[id].seclen == 128 || (s % 26) != 0 )
247260            {
248261               /* yup! single density */
249               drv[id].density = 0;
250               drv[id].spt = 18;
251               drv[id].heads = 1;
252               drv[id].tracks = s / 18;
262               fdc->drv[id].density = 0;
263               fdc->drv[id].spt = 18;
264               fdc->drv[id].heads = 1;
265               fdc->drv[id].tracks = s / 18;
253266               if( s % 18 != 0 )
254                  drv[id].tracks += 1;
255               if( drv[id].tracks % 2 == 0 && drv[id].tracks > 80 )
267                  fdc->drv[id].tracks += 1;
268               if( fdc->drv[id].tracks % 2 == 0 && fdc->drv[id].tracks > 80 )
256269               {
257                  drv[id].heads = 2;
258                  drv[id].tracks /= 2;
270                  fdc->drv[id].heads = 2;
271                  fdc->drv[id].tracks /= 2;
259272               }
260273            }
261274            else
262275            {
263276               /* yes: medium density */
264               drv[id].density = 0;
265               drv[id].spt = 26;
266               drv[id].heads = 1;
267               drv[id].tracks = s / 26;
277               fdc->drv[id].density = 0;
278               fdc->drv[id].spt = 26;
279               fdc->drv[id].heads = 1;
280               fdc->drv[id].tracks = s / 26;
268281               if( s % 26 != 0 )
269                  drv[id].tracks += 1;
270               if( drv[id].tracks % 2 == 0 && drv[id].tracks > 80 )
282                  fdc->drv[id].tracks += 1;
283               if( fdc->drv[id].tracks % 2 == 0 && fdc->drv[id].tracks > 80 )
271284               {
272                  drv[id].heads = 2;
273                  drv[id].tracks /= 2;
285                  fdc->drv[id].heads = 2;
286                  fdc->drv[id].tracks /= 2;
274287               }
275288            }
276289         }
r6746r6747
278291         {
279292            /* it's double density */
280293            s = (s - 3) / 2 + 3;
281            drv[id].sectors = s;
282            drv[id].density = 2;
283            drv[id].seclen = 256;
284            drv[id].spt = 18;
285            drv[id].heads = 1;
286            drv[id].tracks = s / 18;
294            fdc->drv[id].sectors = s;
295            fdc->drv[id].density = 2;
296            fdc->drv[id].seclen = 256;
297            fdc->drv[id].spt = 18;
298            fdc->drv[id].heads = 1;
299            fdc->drv[id].tracks = s / 18;
287300            if( s % 18 != 0 )
288               drv[id].tracks += 1;
289            if( drv[id].tracks % 2 == 0 && drv[id].tracks > 80 )
301               fdc->drv[id].tracks += 1;
302            if( fdc->drv[id].tracks % 2 == 0 && fdc->drv[id].tracks > 80 )
290303            {
291               drv[id].heads = 2;
292               drv[id].tracks /= 2;
304               fdc->drv[id].heads = 2;
305               fdc->drv[id].tracks /= 2;
293306            }
294307         }
295308      }
r6746r6747
297310   /* DSK format: it's all in the header */
298311   case FORMAT_DSK:
299312      {
300         dsk_format *dsk = (dsk_format *) drv[id].image;
313         dsk_format *dsk = (dsk_format *) fdc->drv[id].image;
301314
302         drv[id].tracks = dsk->tracks;
303         drv[id].spt = dsk->spt;
304         drv[id].heads = (dsk->doublesided) ? 2 : 1;
305         drv[id].seclen = 256 * dsk->seclen_hi + dsk->seclen_lo;
306         drv[id].bseclen = drv[id].seclen;
307         drv[id].sectors = drv[id].tracks * drv[id].heads * drv[id].spt;
315         fdc->drv[id].tracks = dsk->tracks;
316         fdc->drv[id].spt = dsk->spt;
317         fdc->drv[id].heads = (dsk->doublesided) ? 2 : 1;
318         fdc->drv[id].seclen = 256 * dsk->seclen_hi + dsk->seclen_lo;
319         fdc->drv[id].bseclen = fdc->drv[id].seclen;
320         fdc->drv[id].sectors = fdc->drv[id].tracks * fdc->drv[id].heads * fdc->drv[id].spt;
308321      }
309322      break;
310323   }
311324   logerror("atari opened floppy '%s', %d sectors (%d %s%s) %d bytes/sector\n",
312325         image_filename(image),
313         drv[id].sectors,
314         drv[id].tracks,
315         (drv[id].heads == 1) ? "SS" : "DS",
316         (drv[id].density == 0) ? "SD" : (drv[id].density == 1) ? "MD" : "DD",
317         drv[id].seclen);
318   return INIT_PASS;
326         fdc->drv[id].sectors,
327         fdc->drv[id].tracks,
328         (fdc->drv[id].heads == 1) ? "SS" : "DS",
329         (fdc->drv[id].density == 0) ? "SD" : (fdc->drv[id].density == 1) ? "MD" : "DD",
330         fdc->drv[id].seclen);
331   return;
319332}
320333
321334
r6746r6747
375388 * F->A                    128/256 byte CKS   bad sector table
376389 *
377390 *****************************************************************************/
378
379391static   void make_chksum(UINT8 * chksum, UINT8 data)
380392{
381393   UINT8 new;
r6746r6747
389401   *chksum = new;
390402}
391403
392static   void clr_serout(int expect_data)
404static   void clr_serout(const device_config *device,int expect_data)
393405{
394   atari_fdc.serout_chksum = 0;
395   atari_fdc.serout_offs = 0;
396   atari_fdc.serout_count = expect_data + 1;
406   atari_fdc_t *fdc = get_safe_token(device);
407   
408   fdc->serout_chksum = 0;
409   fdc->serout_offs = 0;
410   fdc->serout_count = expect_data + 1;
397411}
398412
399static void add_serout(int expect_data)
413static void add_serout(const device_config *device,int expect_data)
400414{
401   atari_fdc.serout_chksum = 0;
402   atari_fdc.serout_count = expect_data + 1;
415   atari_fdc_t *fdc = get_safe_token(device);
416   
417   fdc->serout_chksum = 0;
418   fdc->serout_count = expect_data + 1;
403419}
404420
405static void clr_serin(running_machine *machine, int ser_delay)
421static void clr_serin(const device_config *device, int ser_delay)
406422{
407   const device_config *pokey = devtag_get_device(machine, "pokey");
408   atari_fdc.serin_chksum = 0;
409   atari_fdc.serin_offs = 0;
410   atari_fdc.serin_count = 0;
423   atari_fdc_t *fdc = get_safe_token(device);
424   const device_config *pokey = devtag_get_device(device->machine, "pokey");
425   fdc->serin_chksum = 0;
426   fdc->serin_offs = 0;
427   fdc->serin_count = 0;
411428   pokey_serin_ready(pokey, ser_delay * 40);
412429}
413430
414static void add_serin(UINT8 data, int with_checksum)
431static void add_serin(const device_config *device,UINT8 data, int with_checksum)
415432{
416   atari_fdc.serin_buff[atari_fdc.serin_count++] = data;
433   atari_fdc_t *fdc = get_safe_token(device);
434   fdc->serin_buff[fdc->serin_count++] = data;
417435   if (with_checksum)
418      make_chksum(&atari_fdc.serin_chksum, data);
436      make_chksum(&fdc->serin_chksum, data);
419437}
420438
421static void ATTR_PRINTF(2,3) atari_set_frame_message(running_machine *machine, const char *fmt, ...)
439static void ATTR_PRINTF(2,3) atari_set_frame_message(const device_config *device,const char *fmt, ...)
422440{
423441   va_list arg;
424442   va_start(arg, fmt);
r6746r6747
429447   va_end(arg);
430448}
431449
432static void a800_serial_command(running_machine *machine)
450static void a800_serial_command(const device_config *device)
433451{
434452   int i, drive, sector, offset;
435
436   if( !atari_fdc.serout_offs )
453   atari_fdc_t *fdc = get_safe_token(device);
454   
455   if( !fdc->serout_offs )
437456   {
438457      if (VERBOSE_SERIAL)
439458         logerror("atari serout command offset = 0\n");
440459      return;
441460   }
442   clr_serin(machine, 10);
461   clr_serin(device, 10);
443462
444463   if (VERBOSE_SERIAL)
445464   {
446465      logerror("atari serout command %d: %02X %02X %02X %02X %02X : %02X ",
447         atari_fdc.serout_offs,
448         atari_fdc.serout_buff[0], atari_fdc.serout_buff[1], atari_fdc.serout_buff[2],
449         atari_fdc.serout_buff[3], atari_fdc.serout_buff[4], atari_fdc.serout_chksum);
466         fdc->serout_offs,
467         fdc->serout_buff[0], fdc->serout_buff[1], fdc->serout_buff[2],
468         fdc->serout_buff[3], fdc->serout_buff[4], fdc->serout_chksum);
450469   }
451470
452   if (atari_fdc.serout_chksum == 0)
471   if (fdc->serout_chksum == 0)
453472   {
454473      if (VERBOSE_SERIAL)
455474         logerror("OK\n");
456475
457      drive = atari_fdc.serout_buff[0] - '1';   /* drive # */
476      drive = fdc->serout_buff[0] - '1';   /* drive # */
458477      /* sector # */
459478      if (drive < 0 || drive > 3)          /* ignore unknown drives */
460479      {
461480         logerror("atari unsupported drive #%d\n", drive+1);
462         atari_set_frame_message(machine, "DRIVE #%d not supported", drive+1);
481         atari_set_frame_message(device, "DRIVE #%d not supported", drive+1);
463482         return;
464483      }
465484
466485      /* extract sector number from the command buffer */
467      sector = atari_fdc.serout_buff[2] + 256 * atari_fdc.serout_buff[3];
486      sector = fdc->serout_buff[2] + 256 * fdc->serout_buff[3];
468487
469      switch (atari_fdc.serout_buff[1]) /* command ? */
488      switch (fdc->serout_buff[1]) /* command ? */
470489      {
471490         case 'S':   /* status */
472            atari_set_frame_message(machine, "DRIVE #%d STATUS", drive+1);
491            atari_set_frame_message(device, "DRIVE #%d STATUS", drive+1);
473492
474493            if (VERBOSE_SERIAL)
475494               logerror("atari status\n");
476495
477            add_serin('A',0);
478            add_serin('C',0);
479            if (!drv[drive].mode) /* read only mode ? */
496            add_serin(device,'A',0);
497            add_serin(device,'C',0);
498            if (!fdc->drv[drive].mode) /* read only mode ? */
480499            {
481               if (drv[drive].spt == 26)
482                  add_serin(0x80,1);   /* MD: 0x80 */
500               if (fdc->drv[drive].spt == 26)
501                  add_serin(device,0x80,1);   /* MD: 0x80 */
483502               else
484               if (drv[drive].seclen == 128)
485                  add_serin(0x00,1);   /* SD: 0x00 */
503               if (fdc->drv[drive].seclen == 128)
504                  add_serin(device,0x00,1);   /* SD: 0x00 */
486505               else
487                  add_serin(0x20,1);   /* DD: 0x20 */
506                  add_serin(device,0x20,1);   /* DD: 0x20 */
488507            }
489508            else
490509            {
491               if (drv[drive].spt == 26)
492                  add_serin(0x84,1);   /* MD: 0x84 */
510               if (fdc->drv[drive].spt == 26)
511                  add_serin(device,0x84,1);   /* MD: 0x84 */
493512               else
494               if (drv[drive].seclen == 128)
495                  add_serin(0x04,1);   /* SD: 0x04 */
513               if (fdc->drv[drive].seclen == 128)
514                  add_serin(device,0x04,1);   /* SD: 0x04 */
496515               else
497                  add_serin(0x24,1);   /* DD: 0x24 */
516                  add_serin(device,0x24,1);   /* DD: 0x24 */
498517            }
499            if (drv[drive].image)
500               add_serin(0xff,1);   /* door closed: 0xff */
518            if (fdc->drv[drive].image)
519               add_serin(device,0xff,1);   /* door closed: 0xff */
501520            else
502               add_serin(0x7f,1);   /* door open: 0x7f */
503            add_serin(0xe0,1);   /* dunno */
504            add_serin(0x00,1);   /* dunno */
505            add_serin(atari_fdc.serin_chksum,0);
521               add_serin(device,0x7f,1);   /* door open: 0x7f */
522            add_serin(device,0xe0,1);   /* dunno */
523            add_serin(device,0x00,1);   /* dunno */
524            add_serin(device,fdc->serin_chksum,0);
506525            break;
507526
508527         case 'R':   /* read sector */
509528            if (VERBOSE_SERIAL)
510529               logerror("atari read sector #%d\n", sector);
511530
512            if( sector < 1 || sector > drv[drive].sectors )
531            if( sector < 1 || sector > fdc->drv[drive].sectors )
513532            {
514               atari_set_frame_message(machine, "DRIVE #%d READ SECTOR #%3d - ERR", drive+1, sector);
533               atari_set_frame_message(device, "DRIVE #%d READ SECTOR #%3d - ERR", drive+1, sector);
515534
516535               if (VERBOSE_SERIAL)
517536                  logerror("atari bad sector #\n");
518537
519               add_serin('E',0);
538               add_serin(device,'E',0);
520539               break;
521540            }
522            add_serin('A',0);   /* acknowledge */
523            add_serin('C',0);   /* completed */
541            add_serin(device,'A',0);   /* acknowledge */
542            add_serin(device,'C',0);   /* completed */
524543            if (sector < 4)    /* sector 1 .. 3 might be different length */
525544            {
526               atari_set_frame_message(machine, "DRIVE #%d READ SECTOR #%3d - SD", drive+1, sector);
527               offset = (sector - 1) * drv[drive].bseclen + drv[drive].header_skip;
545               atari_set_frame_message(device, "DRIVE #%d READ SECTOR #%3d - SD", drive+1, sector);
546               offset = (sector - 1) * fdc->drv[drive].bseclen + fdc->drv[drive].header_skip;
528547               for (i = 0; i < 128; i++)
529                  add_serin(drv[drive].image[offset++],1);
548                  add_serin(device,fdc->drv[drive].image[offset++],1);
530549            }
531550            else
532551            {
533               atari_set_frame_message(machine, "DRIVE #%d READ SECTOR #%3d - %cD", drive+1, sector, (drv[drive].seclen == 128) ? 'S' : 'D');
534                    offset = (sector - 1) * drv[drive].seclen + drv[drive].header_skip;
535               for (i = 0; i < drv[drive].seclen; i++)
536                  add_serin(drv[drive].image[offset++],1);
552               atari_set_frame_message(device, "DRIVE #%d READ SECTOR #%3d - %cD", drive+1, sector, (fdc->drv[drive].seclen == 128) ? 'S' : 'D');
553                    offset = (sector - 1) * fdc->drv[drive].seclen + fdc->drv[drive].header_skip;
554               for (i = 0; i < fdc->drv[drive].seclen; i++)
555                  add_serin(device,fdc->drv[drive].image[offset++],1);
537556            }
538            add_serin(atari_fdc.serin_chksum,0);
557            add_serin(device,fdc->serin_chksum,0);
539558            break;
540559
541560         case 'W':   /* write sector with verify */
542561            if (VERBOSE_SERIAL)
543562               logerror("atari write sector #%d\n", sector);
544563
545            add_serin('A',0);
564            add_serin(device,'A',0);
546565            if (sector < 4)    /* sector 1 .. 3 might be different length */
547566            {
548               add_serout(drv[drive].bseclen);
549               atari_set_frame_message(machine, "DRIVE #%d WRITE SECTOR #%3d - SD", drive+1, sector);
567               add_serout(device,fdc->drv[drive].bseclen);
568               atari_set_frame_message(device, "DRIVE #%d WRITE SECTOR #%3d - SD", drive+1, sector);
550569                }
551570            else
552571            {
553               add_serout(drv[drive].seclen);
554               atari_set_frame_message(machine, "DRIVE #%d WRITE SECTOR #%3d - %cD", drive+1, sector, (drv[drive].seclen == 128) ? 'S' : 'D');
572               add_serout(device,fdc->drv[drive].seclen);
573               atari_set_frame_message(device, "DRIVE #%d WRITE SECTOR #%3d - %cD", drive+1, sector, (fdc->drv[drive].seclen == 128) ? 'S' : 'D');
555574                }
556575            break;
557576
r6746r6747
559578            if (VERBOSE_SERIAL)
560579               logerror("atari put sector #%d\n", sector);
561580
562            add_serin('A',0);
581            add_serin(device,'A',0);
563582            if (sector < 4)    /* sector 1 .. 3 might be different length */
564583            {
565               add_serout(drv[drive].bseclen);
566               atari_set_frame_message(machine, "DRIVE #%d PUT SECTOR #%3d - SD", drive+1, sector);
584               add_serout(device,fdc->drv[drive].bseclen);
585               atari_set_frame_message(device, "DRIVE #%d PUT SECTOR #%3d - SD", drive+1, sector);
567586                }
568587            else
569588            {
570               add_serout(drv[drive].seclen);
571               atari_set_frame_message(machine, "DRIVE #%d PUT SECTOR #%3d - %cD", drive+1, sector, (drv[drive].seclen == 128) ? 'S' : 'D');
589               add_serout(device,fdc->drv[drive].seclen);
590               atari_set_frame_message(device, "DRIVE #%d PUT SECTOR #%3d - %cD", drive+1, sector, (fdc->drv[drive].seclen == 128) ? 'S' : 'D');
572591                }
573592            break;
574593
r6746r6747
576595            if (VERBOSE_SERIAL)
577596               logerror("atari format SD drive #%d\n", drive+1);
578597
579            atari_set_frame_message(machine, "DRIVE #%d FORMAT SD", drive+1);
580                add_serin('A',0);   /* acknowledge */
581            add_serin('C',0);   /* completed */
598            atari_set_frame_message(device, "DRIVE #%d FORMAT SD", drive+1);
599                add_serin(device,'A',0);   /* acknowledge */
600            add_serin(device,'C',0);   /* completed */
582601            for (i = 0; i < 128; i++)
583               add_serin(0,1);
584            add_serin(atari_fdc.serin_chksum,0);
602               add_serin(device,0,1);
603            add_serin(device,fdc->serin_chksum,0);
585604            break;
586605
587606         case '"':   /* DD format */
588607            if (VERBOSE_SERIAL)
589608               logerror("atari format DD drive #%d\n", drive+1);
590609
591            atari_set_frame_message(machine, "DRIVE #%d FORMAT DD", drive+1);
592                add_serin('A',0);   /* acknowledge */
593            add_serin('C',0);   /* completed */
610            atari_set_frame_message(device, "DRIVE #%d FORMAT DD", drive+1);
611                add_serin(device,'A',0);   /* acknowledge */
612            add_serin(device,'C',0);   /* completed */
594613            for (i = 0; i < 256; i++)
595               add_serin(0,1);
596            add_serin(atari_fdc.serin_chksum,0);
614               add_serin(device,0,1);
615            add_serin(device,fdc->serin_chksum,0);
597616            break;
598617
599618         default:
600619            if (VERBOSE_SERIAL)
601               logerror("atari unknown command #%c\n", atari_fdc.serout_buff[1]);
620               logerror("atari unknown command #%c\n", fdc->serout_buff[1]);
602621
603            atari_set_frame_message(machine, "DRIVE #%d UNKNOWN CMD '%c'", drive+1, atari_fdc.serout_buff[1]);
604                add_serin('N',0);   /* negative acknowledge */
622            atari_set_frame_message(device, "DRIVE #%d UNKNOWN CMD '%c'", drive+1, fdc->serout_buff[1]);
623                add_serin(device,'N',0);   /* negative acknowledge */
605624      }
606625   }
607626   else
608627   {
609      atari_set_frame_message(machine, "serial cmd chksum error");
628      atari_set_frame_message(device, "serial cmd chksum error");
610629      if (VERBOSE_SERIAL)
611630         logerror("BAD\n");
612631
613      add_serin('E',0);
632      add_serin(device,'E',0);
614633   }
615634   if (VERBOSE_SERIAL)
616      logerror("atari %d bytes to read\n", atari_fdc.serin_count);
635      logerror("atari %d bytes to read\n", fdc->serin_count);
617636}
618637
619static void a800_serial_write(running_machine *machine)
638static void a800_serial_write(const device_config *device)
620639{
621640   int i, drive, sector, offset;
641   atari_fdc_t *fdc = get_safe_token(device);
622642
623643   if (VERBOSE_SERIAL)
624644   {
625645      logerror("atari serout %d bytes written : %02X ",
626         atari_fdc.serout_offs, atari_fdc.serout_chksum);
646         fdc->serout_offs, fdc->serout_chksum);
627647   }
628648
629   clr_serin(machine, 80);
630   if (atari_fdc.serout_chksum == 0)
649   clr_serin(device, 80);
650   if (fdc->serout_chksum == 0)
631651   {
632652      if (VERBOSE_SERIAL)
633653         logerror("OK\n");
634654
635      add_serin('C',0);
655      add_serin(device,'C',0);
636656      /* write the sector */
637      drive = atari_fdc.serout_buff[0] - '1';   /* drive # */
657      drive = fdc->serout_buff[0] - '1';   /* drive # */
638658      /* not write protected and image available ? */
639      if (drv[drive].mode && drv[drive].image)
659      if (fdc->drv[drive].mode && fdc->drv[drive].image)
640660      {
641661         /* extract sector number from the command buffer */
642         sector = atari_fdc.serout_buff[2] + 256 * atari_fdc.serout_buff[3];
662         sector = fdc->serout_buff[2] + 256 * fdc->serout_buff[3];
643663         if (sector < 4)    /* sector 1 .. 3 might be different length */
644664         {
645            offset = (sector - 1) * drv[drive].bseclen + drv[drive].header_skip;
665            offset = (sector - 1) * fdc->drv[drive].bseclen + fdc->drv[drive].header_skip;
646666
647667            if (VERBOSE_SERIAL)
648668               logerror("atari storing 128 byte sector %d at offset 0x%08X", sector, offset );
649669
650670            for (i = 0; i < 128; i++)
651               drv[drive].image[offset++] = atari_fdc.serout_buff[5+i];
652            atari_set_frame_message(machine, "DRIVE #%d WROTE SECTOR #%3d - SD", drive+1, sector);
671               fdc->drv[drive].image[offset++] = fdc->serout_buff[5+i];
672            atari_set_frame_message(device, "DRIVE #%d WROTE SECTOR #%3d - SD", drive+1, sector);
653673            }
654674         else
655675         {
656            offset = (sector - 1) * drv[drive].seclen + drv[drive].header_skip;
676            offset = (sector - 1) * fdc->drv[drive].seclen + fdc->drv[drive].header_skip;
657677
658678            if (VERBOSE_SERIAL)
659               logerror("atari storing %d byte sector %d at offset 0x%08X", drv[drive].seclen, sector, offset );
679               logerror("atari storing %d byte sector %d at offset 0x%08X", fdc->drv[drive].seclen, sector, offset );
660680
661            for (i = 0; i < drv[drive].seclen; i++)
662               drv[drive].image[offset++] = atari_fdc.serout_buff[5+i];
663            atari_set_frame_message(machine, "DRIVE #%d WROTE SECTOR #%3d - %cD", drive+1, sector, (drv[drive].seclen == 128) ? 'S' : 'D');
681            for (i = 0; i < fdc->drv[drive].seclen; i++)
682               fdc->drv[drive].image[offset++] = fdc->serout_buff[5+i];
683            atari_set_frame_message(device, "DRIVE #%d WROTE SECTOR #%3d - %cD", drive+1, sector, (fdc->drv[drive].seclen == 128) ? 'S' : 'D');
664684            }
665         add_serin('C',0);
685         add_serin(device,'C',0);
666686      }
667687      else
668688      {
669         add_serin('E',0);
689         add_serin(device,'E',0);
670690      }
671691   }
672692   else
r6746r6747
674694      if (VERBOSE_SERIAL)
675695         logerror("BAD\n");
676696
677      add_serin('E',0);
697      add_serin(device,'E',0);
678698   }
679699}
680700
681READ8_HANDLER ( atari_serin_r )
701READ8_DEVICE_HANDLER ( atari_serin_r )
682702{
683703   int data = 0x00;
684704   int ser_delay = 0;
705   atari_fdc_t *fdc = get_safe_token(device);
685706
686   if (atari_fdc.serin_count)
707   if (fdc->serin_count)
687708   {
688      const device_config *pokey = devtag_get_device(space->machine, "pokey");
709      const device_config *pokey = devtag_get_device(device->machine, "pokey");
689710
690      data = atari_fdc.serin_buff[atari_fdc.serin_offs];
711      data = fdc->serin_buff[fdc->serin_offs];
691712      ser_delay = 2 * 40;
692      if (atari_fdc.serin_offs < 3)
713      if (fdc->serin_offs < 3)
693714      {
694715         ser_delay = 4 * 40;
695         if (atari_fdc.serin_offs < 2)
716         if (fdc->serin_offs < 2)
696717            ser_delay = 200 * 40;
697718      }
698      atari_fdc.serin_offs++;
699      if (--atari_fdc.serin_count == 0)
700         atari_fdc.serin_offs = 0;
719      fdc->serin_offs++;
720      if (--fdc->serin_count == 0)
721         fdc->serin_offs = 0;
701722      else
702723         pokey_serin_ready(pokey, ser_delay);
703724   }
704725
705726   if (VERBOSE_SERIAL)
706      logerror("atari serin[$%04x] -> $%02x; delay %d\n", atari_fdc.serin_offs, data, ser_delay);
727      logerror("atari serin[$%04x] -> $%02x; delay %d\n", fdc->serin_offs, data, ser_delay);
707728
708729   return data;
709730}
710731
711WRITE8_HANDLER ( atari_serout_w )
732WRITE8_DEVICE_HANDLER ( atari_serout_w )
712733{
713   const device_config *pia = devtag_get_device( space->machine, "pia" );
734   const device_config *pia = devtag_get_device( device->machine, "pia" );
735   atari_fdc_t *fdc = get_safe_token(device);
714736
715737   /* ignore serial commands if no floppy image is specified */
716   if( !drv[0].image )
738   if( !fdc->drv[0].image )
717739      return;
718   if (atari_fdc.serout_count)
740   if (fdc->serout_count)
719741   {
720742      /* store data */
721      atari_fdc.serout_buff[atari_fdc.serout_offs] = data;
743      fdc->serout_buff[fdc->serout_offs] = data;
722744
723745      if (VERBOSE_SERIAL)
724         logerror("atari serout[$%04x] <- $%02x; count %d\n", atari_fdc.serout_offs, data, atari_fdc.serout_count);
746         logerror("atari serout[$%04x] <- $%02x; count %d\n", fdc->serout_offs, data, fdc->serout_count);
725747
726      atari_fdc.serout_offs++;
727      if (--atari_fdc.serout_count == 0)
748      fdc->serout_offs++;
749      if (--fdc->serout_count == 0)
728750      {
729751         /* exclusive or written checksum with calculated */
730         atari_fdc.serout_chksum ^= data;
752         fdc->serout_chksum ^= data;
731753         /* if the attention line is high, this should be data */
732754         if (pia6821_get_irq_b(pia))
733            a800_serial_write(space->machine);
755            a800_serial_write(device);
734756      }
735757      else
736758      {
737         make_chksum(&atari_fdc.serout_chksum, data);
759         make_chksum(&fdc->serout_chksum, data);
738760      }
739761   }
740762}
741763
742764WRITE_LINE_DEVICE_HANDLER(atarifdc_pia_cb2_w)
743765{
766   atari_fdc_t *fdc = get_safe_token(device);
744767   if (!state)
745768   {
746      clr_serout(4); /* expect 4 command bytes + checksum */
769      clr_serout(device,4); /* expect 4 command bytes + checksum */
747770   }
748771   else
749772   {
750      atari_fdc.serin_delay = 0;
751      a800_serial_command(device->machine);
773      fdc->serin_delay = 0;
774      a800_serial_command(device);
752775   }
753776}
777
778static FLOPPY_IDENTIFY( atari_dsk_identify )
779{
780   *vote = 100;
781   return FLOPPY_ERROR_SUCCESS;
782}
783
784
785static FLOPPY_CONSTRUCT( atari_dsk_construct )
786{
787   return FLOPPY_ERROR_SUCCESS;
788}
789
790FLOPPY_OPTIONS_START( atari_only )
791   FLOPPY_OPTION(
792      atari_dsk,
793      "atr,dsk,xfd",
794      "Atari floppy disk image",
795      atari_dsk_identify,
796      atari_dsk_construct,
797      NULL
798   )
799      { NULL }
800};
801
802static const floppy_config atari_floppy_config =
803{
804   DEVCB_NULL,
805   DEVCB_NULL,
806   DEVCB_NULL,
807   DEVCB_NULL,
808   DEVCB_NULL,
809   FLOPPY_DRIVE_DS_80,
810   FLOPPY_OPTIONS_NAME(atari_only),
811   DO_NOT_KEEP_GEOMETRY
812};
813
814static MACHINE_DRIVER_START( atari_fdc )
815   MDRV_FLOPPY_4_DRIVES_ADD(atari_floppy_config)
816MACHINE_DRIVER_END
817
818const device_config *atari_floppy_get_device_child(const device_config *device,int drive)
819{
820   switch(drive) {
821      case 0 : return device_find_child_by_tag(device,FLOPPY_0);
822      case 1 : return device_find_child_by_tag(device,FLOPPY_1);
823      case 2 : return device_find_child_by_tag(device,FLOPPY_2);
824      case 3 : return device_find_child_by_tag(device,FLOPPY_3);
825   }
826   return NULL;
827}
828
829static DEVICE_START(atari_fdc)
830{   
831   int id;
832   for(id=0;id<4;id++)
833   {
834      floppy_install_load_proc(atari_floppy_get_device_child(device, id), atari_load_proc);
835   }
836}
837
838static DEVICE_RESET(atari_fdc)
839{   
840}
841
842DEVICE_GET_INFO( atari_fdc )
843{
844   switch (state)
845   {
846      /* --- the following bits of info are returned as 64-bit signed integers --- */
847      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                                    break;
848      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(atari_fdc_t);                        break;
849      case DEVINFO_INT_CLASS:                     info->i = DEVICE_CLASS_PERIPHERAL;                     break;
850
851      /* --- the following bits of info are returned as pointers --- */
852      case DEVINFO_PTR_MACHINE_CONFIG:            info->machine_config = MACHINE_DRIVER_NAME(atari_fdc);      break;
853
854      /* --- the following bits of info are returned as pointers to data or functions --- */
855      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(atari_fdc);               break;
856      case DEVINFO_FCT_STOP:                     /* Nothing */                                    break;
857      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(atari_fdc);               break;
858
859      /* --- the following bits of info are returned as NULL-terminated strings --- */
860      case DEVINFO_STR_NAME:                     strcpy(info->s, "Atari FDC");                        break;
861      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Atari FDC");                        break;
862      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                              break;
863      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                           break;
864      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright the MESS Team");             break;
865   }
866}
src/mess/drivers/atari.c
r6746r6747
856856      DEVCB_INPUT_PORT("analog_7")
857857   },
858858   DEVCB_NULL,
859   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, atari_serin_r),
860   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, atari_serout_w),
859   DEVCB_DEVICE_HANDLER("fdc", atari_serin_r),
860   DEVCB_DEVICE_HANDLER("fdc", atari_serout_w),
861861   atari_interrupt_cb,
862862};
863863
r6746r6747
873873   DEVCB_NULL,      /* port A out */
874874   DEVCB_NULL,      /* port B out */
875875   DEVCB_NULL,      /* line CA2 out */
876   DEVCB_LINE(atarifdc_pia_cb2_w),      /* port CB2 out */
876   DEVCB_DEVICE_LINE("fdc",atarifdc_pia_cb2_w),      /* port CB2 out */
877877   DEVCB_NULL,      /* IRQA */
878878   DEVCB_NULL      /* IRQB */
879879};
r6746r6747
889889   DEVCB_NULL,      /* port A out */
890890   DEVCB_HANDLER(a600xl_pia_pb_w),      /* port B out */
891891   DEVCB_NULL,      /* line CA2 out */
892   DEVCB_LINE(atarifdc_pia_cb2_w),      /* port CB2 out */
892   DEVCB_DEVICE_LINE("fdc",atarifdc_pia_cb2_w),      /* port CB2 out */
893893   DEVCB_NULL,      /* IRQA */
894894   DEVCB_NULL      /* IRQB */
895895};
r6746r6747
905905   DEVCB_NULL,      /* port A out */
906906   DEVCB_HANDLER(a1200xl_pia_pb_w),      /* port B out */
907907   DEVCB_NULL,      /* line CA2 out */
908   DEVCB_LINE(atarifdc_pia_cb2_w),      /* port CB2 out */
908   DEVCB_DEVICE_LINE("fdc",atarifdc_pia_cb2_w),      /* port CB2 out */
909909   DEVCB_NULL,      /* IRQA */
910910   DEVCB_NULL      /* IRQB */
911911};
r6746r6747
921921   DEVCB_NULL,      /* port A out */
922922   DEVCB_HANDLER(a800xl_pia_pb_w),      /* port B out */
923923   DEVCB_NULL,      /* line CA2 out */
924   DEVCB_LINE(atarifdc_pia_cb2_w),      /* port CB2 out */
924   DEVCB_DEVICE_LINE("fdc",atarifdc_pia_cb2_w),      /* port CB2 out */
925925   DEVCB_NULL,      /* IRQA */
926926   DEVCB_NULL      /* IRQB */
927927};
r6746r6747
981981   /* internal ram */
982982   MDRV_RAM_ADD("messram")
983983   MDRV_RAM_DEFAULT_SIZE("40K")
984   
985   MDRV_ATARI_FDC_ADD("fdc")
984986MACHINE_DRIVER_END
985987
986988
r6746r6747
12541256
12551257/**************************************************************
12561258 *
1257 * Configs
1258 *
1259 **************************************************************/
1260
1261static void atari_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
1262{
1263   /* floppy */
1264   switch(state)
1265   {
1266      /* --- the following bits of info are returned as 64-bit signed integers --- */
1267      case MESS_DEVINFO_INT_TYPE:                     info->i = IO_FLOPPY; break;
1268      case MESS_DEVINFO_INT_READABLE:                  info->i = 1; break;
1269      case MESS_DEVINFO_INT_WRITEABLE:                  info->i = 1; break;
1270      case MESS_DEVINFO_INT_CREATABLE:                  info->i = 1; break;
1271      case MESS_DEVINFO_INT_COUNT:                     info->i = 4; break;
1272
1273      /* --- the following bits of info are returned as pointers to data or functions --- */
1274      case MESS_DEVINFO_PTR_LOAD:                     info->load = DEVICE_IMAGE_LOAD_NAME(a800_floppy); break;
1275
1276      /* --- the following bits of info are returned as NULL-terminated strings --- */
1277      case MESS_DEVINFO_STR_FILE_EXTENSIONS:            strcpy(info->s = device_temp_str(), "atr,dsk,xfd"); break;
1278   }
1279}
1280
1281static SYSTEM_CONFIG_START(atari)
1282   CONFIG_DEVICE(atari_floppy_getinfo)
1283SYSTEM_CONFIG_END
1284
1285/**************************************************************
1286 *
12871259 * Driver initializations
12881260 *
12891261 **************************************************************/
r6746r6747
13061278 **************************************************************/
13071279
13081280/*     YEAR  NAME      PARENT    COMPAT MACHINE     INPUT    INIT    CONFIG   COMPANY    FULLNAME */
1309COMP ( 1979, a400,     0,        0,     a400,       a800,    0,      atari,    "Atari",   "Atari 400 (NTSC)", 0)
1310COMP ( 1979, a400pal,  a400,     0,     a400pal,    a800,    0,      atari,    "Atari",   "Atari 400 (PAL)",  0)
1311COMP ( 1979, a800,     0,        0,     a800,       a800,    0,      atari,    "Atari",   "Atari 800 (NTSC)", 0)
1312COMP ( 1979, a800pal,  a800,     0,     a800pal,    a800,    0,      atari,    "Atari",   "Atari 800 (PAL)",  0)
1313COMP ( 1982, a1200xl,  a800,     0,     a1200xl,    a800xl,  a800xl, atari,    "Atari",   "Atari 1200XL",     GAME_NOT_WORKING )      // 64k RAM
1314COMP ( 1983, a600xl,   a800xl,   0,     a600xl,     a800xl,  a600xl, atari,   "Atari",   "Atari 600XL",      GAME_NOT_WORKING )      // 16k RAM
1315COMP ( 1983, a800xl,   0,       0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari 800XL (NTSC)",GAME_IMPERFECT_GRAPHICS )      // 64k RAM
1316COMP ( 1983, a800xlp,  a800xl,    0,     a800xlpal,  a800xl,  a800xl, atari,    "Atari",   "Atari 800XL (PAL)", GAME_IMPERFECT_GRAPHICS )      // 64k RAM
1317COMP ( 1986, a65xe,    a800xl,   0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari 65XE",       GAME_NOT_WORKING )      // 64k RAM
1318COMP ( 1986, a65xea,   a800xl,   0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari 65XE (Arabic)", GAME_NOT_WORKING )
1319COMP ( 1986, a130xe,   a800xl,   0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari 130XE",      GAME_NOT_WORKING )      // 128k RAM
1320COMP ( 1986, a800xe,   a800xl,   0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari 800XE",      GAME_NOT_WORKING )      // 64k RAM
1321COMP ( 1987, xegs,     0,        0,     a800xl,     a800xl,  a800xl, atari,    "Atari",   "Atari XE Game System", GAME_NOT_WORKING )   // 64k RAM
1281COMP ( 1979, a400,     0,        0,     a400,       a800,    0,      0,       "Atari",   "Atari 400 (NTSC)", 0)
1282COMP ( 1979, a400pal,  a400,     0,     a400pal,    a800,    0,      0,       "Atari",   "Atari 400 (PAL)",  0)
1283COMP ( 1979, a800,     0,        0,     a800,       a800,    0,      0,       "Atari",   "Atari 800 (NTSC)", 0)
1284COMP ( 1979, a800pal,  a800,     0,     a800pal,    a800,    0,      0,       "Atari",   "Atari 800 (PAL)",  0)
1285COMP ( 1982, a1200xl,  a800,     0,     a1200xl,    a800xl,  a800xl, 0,       "Atari",   "Atari 1200XL",     GAME_NOT_WORKING )      // 64k RAM
1286COMP ( 1983, a600xl,   a800xl,   0,     a600xl,     a800xl,  a600xl, 0,      "Atari",   "Atari 600XL",      GAME_NOT_WORKING )      // 16k RAM
1287COMP ( 1983, a800xl,   0,       0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari 800XL (NTSC)",GAME_IMPERFECT_GRAPHICS )      // 64k RAM
1288COMP ( 1983, a800xlp,  a800xl,    0,     a800xlpal,  a800xl,  a800xl, 0,       "Atari",   "Atari 800XL (PAL)", GAME_IMPERFECT_GRAPHICS )      // 64k RAM
1289COMP ( 1986, a65xe,    a800xl,   0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari 65XE",       GAME_NOT_WORKING )      // 64k RAM
1290COMP ( 1986, a65xea,   a800xl,   0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari 65XE (Arabic)", GAME_NOT_WORKING )
1291COMP ( 1986, a130xe,   a800xl,   0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari 130XE",      GAME_NOT_WORKING )      // 128k RAM
1292COMP ( 1986, a800xe,   a800xl,   0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari 800XE",      GAME_NOT_WORKING )      // 64k RAM
1293COMP ( 1987, xegs,     0,        0,     a800xl,     a800xl,  a800xl, 0,       "Atari",   "Atari XE Game System", GAME_NOT_WORKING )   // 64k RAM
13221294
1323CONS ( 1982, a5200,    0,        0,     a5200,      a5200,   0,      atari,    "Atari",   "Atari 5200",       0)
1295CONS ( 1982, a5200,    0,        0,     a5200,      a5200,   0,      0,       "Atari",   "Atari 5200",       0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team