Previous 15994 Revisions Next

r4475 Friday 10th April, 2009 at 17:44:42 UTC by Fabio Priuli
[ATARI 8BIT] Factored out MESS-specific code from MAME source (MAME side of the changes on its way to MAME source). Renamed atari_pia_cb2_w in atarifdc.c to atarifdc_pia_cb2_w (this handler seems unused in MESS... is it a regression or has it never been implemented?)
[src/mame/includes]atari.h
[src/mame/machine]atari.c
[src/mess]mess.mak
[src/mess/drivers]atari.c
[src/mess/machine]ataricrt.c* ataridev.h* atarifdc.c

src/mame/machine/atari.c
r4474r4475
2020#define VERBOSE_SERIAL   0
2121#define VERBOSE_TIMERS   0
2222
23//#define LOG(x) if (errorlog) fprintf x
24
25static int atari = 0;
26#define ATARI_5200   0
27#define ATARI_400   1
28#define ATARI_800   2
29#define ATARI_600XL 3
30#define ATARI_800XL 4
31
32#ifdef MESS
33static int a800_cart_loaded = 0;
34static int a800_cart_is_16k = 0;
35#endif
36
3723static void a800xl_mmu(running_machine *machine, UINT8 new_mmu);
3824static void a600xl_mmu(running_machine *machine, UINT8 new_mmu);
3925
r4474r4475
9076static WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w) { a600xl_mmu(device->machine, data); }
9177static WRITE8_DEVICE_HANDLER(a800xl_pia_pb_w) { a800xl_mmu(device->machine, data); }
9278
93#ifndef MESS
9479WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { }
95#endif
9680
9781const pia6821_interface atari_pia_interface =
9882{
r4474r4475
423407   atari_last = 0xff;
424408}
425409
426#ifdef MESS
427DRIVER_INIT( atari )
428{
429   offs_t ram_top;
430   offs_t ram_size;
431410
432   if (!strcmp(machine->gamedrv->name, "a400")
433      || !strcmp(machine->gamedrv->name, "a400pal")
434      || !strcmp(machine->gamedrv->name, "a800")
435      || !strcmp(machine->gamedrv->name, "a800pal")
436      || !strcmp(machine->gamedrv->name, "a800xl"))
437   {
438      ram_size = 0xA000;
439   }
440   else
441   {
442      ram_size = 0x8000;
443   }
444
445   /* install RAM */
446   ram_top = MIN(mess_ram_size, ram_size) - 1;
447   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
448      0x0000, ram_top, 0, 0, SMH_BANK2);
449   memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
450      0x0000, ram_top, 0, 0, SMH_BANK2);
451   memory_set_bankptr(machine, 2, mess_ram);
452}
453#endif
454
455
456
457411/*************************************
458412 *
459413 *  Generic Atari Code
460414 *
461415 *************************************/
462416
463#ifdef MESS
464static void a800_setbank(running_machine *machine, int n)
465{
466   void *read_addr;
467   void *write_addr;
468   UINT8 *mem = memory_region(machine, "maincpu");
469417
470   switch (n)
471   {
472      case 1:
473         read_addr = &mem[0x10000];
474         write_addr = NULL;
475         break;
476      default:
477         if( atari <= ATARI_400 )
478         {
479            /* Atari 400 has no RAM here, so install the NOP handler */
480            read_addr = NULL;
481            write_addr = NULL;
482         }
483         else
484         {
485            read_addr = &mess_ram[0x08000];
486            write_addr = &mess_ram[0x08000];
487         }
488         break;
489   }
490
491   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0,
492      read_addr ? SMH_BANK1 : SMH_NOP);
493   memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0,
494      write_addr ? SMH_BANK1 : SMH_NOP);
495   if (read_addr)
496      memory_set_bankptr(machine, 1, read_addr);
497   if (write_addr)
498      memory_set_bankptr(machine, 1, write_addr);
499}
500#endif
501
502
503
504418static void pokey_reset(running_machine *machine)
505419{
506420   const device_config *pokey = devtag_get_device(machine, "pokey");
r4474r4475
508422}
509423
510424
511
512static void cart_reset(running_machine *machine)
513{
514#ifdef MESS
515   if (a800_cart_loaded)
516      a800_setbank(machine, 1);
517#endif /* MESS */
518}
519
520
521
522425static UINT8 console_read(const address_space *space)
523426{
524427   return input_port_read(space->machine, "console");
525428}
526429
527430
528
529431static void console_write(const address_space *space, UINT8 data)
530432{
531433   const device_config *dac = devtag_get_device(space->machine, "dac");
r4474r4475
542444}
543445
544446
545static void atari_machine_start(running_machine *machine, int type, int has_cart)
447void atari_machine_start(running_machine *machine)
546448{
547449   gtia_interface gtia_intf;
548450
549   atari = type;
550
551451   /* GTIA */
552452   memset(&gtia_intf, 0, sizeof(gtia_intf));
553453   if (input_port_by_tag(machine->portconfig, "console") != NULL)
r4474r4475
562462   /* ANTIC */
563463   add_reset_callback(machine, _antic_reset);
564464
565   /* cartridge */
566   if (has_cart)
567      add_reset_callback(machine, cart_reset);
568
569#ifdef MESS
570   {
571      offs_t ram_top;
572      offs_t ram_size;
573
574      if (!strcmp(machine->gamedrv->name, "a400")
575         || !strcmp(machine->gamedrv->name, "a400pal")
576         || !strcmp(machine->gamedrv->name, "a800")
577         || !strcmp(machine->gamedrv->name, "a800pal")
578         || !strcmp(machine->gamedrv->name, "a800xl"))
579      {
580         ram_size = 0xA000;
581      }
582      else
583      {
584         ram_size = 0x8000;
585      }
586
587      /* install RAM */
588      ram_top = MIN(mess_ram_size, ram_size) - 1;
589      memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
590         0x0000, ram_top, 0, 0, SMH_BANK2);
591      memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
592         0x0000, ram_top, 0, 0, SMH_BANK2);
593      memory_set_bankptr(machine, 2, mess_ram);
594   }
595#endif /* MESS */
596
597465   /* save states */
598466   state_save_register_global_pointer(machine, ((UINT8 *) &antic.r), sizeof(antic.r));
599467   state_save_register_global_pointer(machine, ((UINT8 *) &antic.w), sizeof(antic.w));
600468}
601469
602470
603
604471/*************************************
605472 *
606 *  Atari 400
607473 *  Atari 600XL
608474 *
609475 *************************************/
610476
611MACHINE_START( a400 )
612{
613   atari_machine_start(machine, ATARI_400, TRUE);
614}
615
616477MACHINE_START( a600xl )
617478{
618   atari_machine_start(machine, ATARI_600XL, TRUE);
479   atari_machine_start(machine);
619480}
620
621
622
623/*************************************
624 *
625 *  Atari 800
626 *
627 *************************************/
628
629MACHINE_START( a800 )
630{
631   atari_machine_start(machine, ATARI_800, TRUE);
632}
633
634
635
636#ifdef MESS
637DEVICE_IMAGE_LOAD( a800_cart )
638{
639   UINT8 *mem = memory_region(image->machine, "maincpu");
640   int size;
641
642   /* load an optional (dual) cartridge (e.g. basic.rom) */
643   if( strcmp(image->tag,"cart2") == 0 )
644   {
645      size = image_fread(image, &mem[0x12000], 0x2000);
646      a800_cart_is_16k = (size == 0x2000);
647      logerror("%s loaded right cartridge '%s' size 16K\n", image->machine->gamedrv->name, image_filename(image) );
648   }
649   else
650   {
651      size = image_fread(image, &mem[0x10000], 0x2000);
652      a800_cart_loaded = size > 0x0000;
653      size = image_fread(image, &mem[0x12000], 0x2000);
654      a800_cart_is_16k = size > 0x2000;
655      logerror("%s loaded left cartridge '%s' size %s\n", image->machine->gamedrv->name, image_filename(image) , (a800_cart_is_16k) ? "16K":"8K");
656   }
657   return INIT_PASS;
658}
659
660DEVICE_IMAGE_UNLOAD( a800_cart )
661{
662   if( strcmp(image->tag,"cart2") == 0 )
663   {
664      a800_cart_is_16k = 0;
665      a800_setbank(image->machine, 1);
666    }
667   else
668   {
669      a800_cart_loaded = 0;
670      a800_setbank(image->machine, 0);
671    }
672}
673#endif
674
675
676
677/*************************************
678 *
679 *  Atari 800XL
680 *
681 *************************************/
682
683MACHINE_START( a800xl )
684{
685   atari_machine_start(machine, ATARI_800XL, TRUE);
686}
687
688
689
690#ifdef MESS
691DEVICE_IMAGE_LOAD( a800xl_cart )
692{
693   UINT8 *mem = memory_region(image->machine, "maincpu");
694   astring *fname;
695   mame_file *basic_fp;
696   file_error filerr;
697   unsigned size;
698
699   fname = astring_assemble_3(astring_alloc(), image->machine->gamedrv->name, PATH_SEPARATOR, "basic.rom");
700   filerr = mame_fopen(SEARCHPATH_ROM, astring_c(fname), OPEN_FLAG_READ, &basic_fp);
701   astring_free(fname);
702
703   if (filerr != FILERR_NONE)
704   {
705      size = mame_fread(basic_fp, &mem[0x14000], 0x2000);
706      if( size < 0x2000 )
707      {
708         logerror("%s image '%s' load failed (less than 8K)\n", image->machine->gamedrv->name, astring_c(fname));
709         mame_fclose(basic_fp);
710         return 2;
711      }
712   }
713
714   /* load an optional (dual) cartidge (e.g. basic.rom) */
715   if (filerr != FILERR_NONE)
716   {
717      {
718         size = image_fread(image, &mem[0x14000], 0x2000);
719         a800_cart_loaded = size / 0x2000;
720         size = image_fread(image, &mem[0x16000], 0x2000);
721         a800_cart_is_16k = size / 0x2000;
722         logerror("%s loaded cartridge '%s' size %s\n",
723               image->machine->gamedrv->name, image_filename(image), (a800_cart_is_16k) ? "16K":"8K");
724      }
725      mame_fclose(basic_fp);
726   }
727
728   return INIT_PASS;
729}
730#endif
731
732
733
734/*************************************
735 *
736 *  Atari 5200 console
737 *
738 *************************************/
739
740MACHINE_START( a5200 )
741{
742   atari_machine_start(machine, ATARI_800XL, FALSE);
743}
744
745
746
747#ifdef MESS
748DEVICE_IMAGE_LOAD( a5200_cart )
749{
750   UINT8 *mem = memory_region(image->machine, "maincpu");
751   int size;
752
753   /* load an optional (dual) cartidge */
754   size = image_fread(image, &mem[0x4000], 0x8000);
755   if (size<0x8000) memmove(mem+0x4000+0x8000-size, mem+0x4000, size);
756   // mirroring of smaller cartridges
757   if (size <= 0x1000) memcpy(mem+0xa000, mem+0xb000, 0x1000);
758   if (size <= 0x2000) memcpy(mem+0x8000, mem+0xa000, 0x2000);
759   if (size <= 0x4000)
760   {
761      const char *info;
762      memcpy(&mem[0x4000], &mem[0x8000], 0x4000);
763      info = image_extrainfo(image);
764      if (info!=NULL && strcmp(info, "A13MIRRORING")==0)
765      {
766         memcpy(&mem[0x8000], &mem[0xa000], 0x2000);
767         memcpy(&mem[0x6000], &mem[0x4000], 0x2000);
768      }
769   }
770   logerror("%s loaded cartridge '%s' size %dK\n",
771      image->machine->gamedrv->name, image_filename(image) , size/1024);
772   return INIT_PASS;
773}
774
775DEVICE_IMAGE_UNLOAD( a5200_cart )
776{
777   UINT8 *mem = memory_region(image->machine, "maincpu");
778   /* zap the cartridge memory (again) */
779   memset(&mem[0x4000], 0x00, 0x8000);
780}
781#endif
782
src/mame/includes/atari.h
r4474r4475
1616
1717/*----------- defined in machine/atari.c -----------*/
1818
19typedef struct {
20   int  serout_count;
21   int  serout_offs;
22   UINT8 serout_buff[512];
23   UINT8 serout_chksum;
24   int  serout_delay;
25
26   int  serin_count;
27   int  serin_offs;
28   UINT8 serin_buff[512];
29   UINT8 serin_chksum;
30   int  serin_delay;
31}   ATARI_FDC;
32extern ATARI_FDC atari_fdc;
33
3419extern const pia6821_interface atari_pia_interface;
3520extern const pia6821_interface a600xl_pia_interface;
3621extern const pia6821_interface a800xl_pia_interface;
3722
38MACHINE_START( a400 );
39MACHINE_START( a800 );
23
24void atari_machine_start(running_machine *machine);   // this is needed in MESS as well for other Atari 8bits systems
25
4026MACHINE_START( a600xl );
41MACHINE_START( a800xl );
42MACHINE_START( a5200 );
4327
4428WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w);
4529
46#ifdef MESS
47DEVICE_IMAGE_LOAD( a800_floppy );
48
49DEVICE_IMAGE_LOAD( a800_cart );
50DEVICE_IMAGE_UNLOAD( a800_cart );
51
52DEVICE_IMAGE_LOAD( a800xl_cart );
53DEVICE_IMAGE_UNLOAD( a800xl_cart );
54
55DEVICE_IMAGE_LOAD( a5200_cart );
56DEVICE_IMAGE_UNLOAD( a5200_cart );
57#endif
58
59 READ8_HANDLER ( atari_serin_r );
30READ8_HANDLER ( atari_serin_r );
6031WRITE8_HANDLER ( atari_serout_w );
6132void atari_interrupt_cb(const device_config *device, int mask);
6233
src/mess/machine/ataricrt.c
r0r4475
1/***************************************************************************
2
3   MESS specific Atari init and Cartridge code for Atari 8 bit systems
4
5***************************************************************************/
6
7#include "driver.h"
8#include "includes/atari.h"
9#include "ataridev.h"
10
11static int a800_cart_loaded = 0;
12static int a800_cart_is_16k = 0;
13static int atari = 0;
14
15/*************************************
16 *
17 *  Generic code
18 *
19 *************************************/
20
21DRIVER_INIT( atari )
22{
23   offs_t ram_top;
24   offs_t ram_size;
25
26   if (!strcmp(machine->gamedrv->name, "a400")
27      || !strcmp(machine->gamedrv->name, "a400pal")
28      || !strcmp(machine->gamedrv->name, "a800")
29      || !strcmp(machine->gamedrv->name, "a800pal")
30      || !strcmp(machine->gamedrv->name, "a800xl"))
31   {
32      ram_size = 0xA000;
33   }
34   else
35   {
36      ram_size = 0x8000;
37   }
38
39   /* install RAM */
40   ram_top = MIN(mess_ram_size, ram_size) - 1;
41   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
42      0x0000, ram_top, 0, 0, SMH_BANK2);
43   memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
44      0x0000, ram_top, 0, 0, SMH_BANK2);
45   memory_set_bankptr(machine, 2, mess_ram);
46}
47
48
49static void a800_setbank(running_machine *machine, int n)
50{
51   void *read_addr;
52   void *write_addr;
53   UINT8 *mem = memory_region(machine, "maincpu");
54
55   switch (n)
56   {
57      case 1:
58         read_addr = &mem[0x10000];
59         write_addr = NULL;
60         break;
61      default:
62         if( atari <= ATARI_400 )
63         {
64            /* Atari 400 has no RAM here, so install the NOP handler */
65            read_addr = NULL;
66            write_addr = NULL;
67         }
68         else
69         {
70            read_addr = &mess_ram[0x08000];
71            write_addr = &mess_ram[0x08000];
72         }
73         break;
74   }
75
76   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0,
77      read_addr ? SMH_BANK1 : SMH_NOP);
78   memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8000, 0xbfff, 0, 0,
79      write_addr ? SMH_BANK1 : SMH_NOP);
80   if (read_addr)
81      memory_set_bankptr(machine, 1, read_addr);
82   if (write_addr)
83      memory_set_bankptr(machine, 1, write_addr);
84}
85
86
87static void cart_reset(running_machine *machine)
88{
89   if (a800_cart_loaded)
90      a800_setbank(machine, 1);
91}
92
93/* MESS specific parts that have to be started */
94static void ms_atari_machine_start(running_machine *machine, int type, int has_cart)
95{
96   offs_t ram_top;
97   offs_t ram_size;
98   
99   /* set atari type (needed for banks above) */
100   atari = type;
101
102   /* determine RAM */
103   if (!strcmp(machine->gamedrv->name, "a400")
104      || !strcmp(machine->gamedrv->name, "a400pal")
105      || !strcmp(machine->gamedrv->name, "a800")
106      || !strcmp(machine->gamedrv->name, "a800pal")
107      || !strcmp(machine->gamedrv->name, "a800xl"))
108   {
109      ram_size = 0xA000;
110   }
111   else
112   {
113      ram_size = 0x8000;
114   }
115
116   /* install RAM */
117   ram_top = MIN(mess_ram_size, ram_size) - 1;
118   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
119      0x0000, ram_top, 0, 0, SMH_BANK2);
120   memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),
121      0x0000, ram_top, 0, 0, SMH_BANK2);
122   memory_set_bankptr(machine, 2, mess_ram);
123
124   /* cartridge */
125   if (has_cart)
126      add_reset_callback(machine, cart_reset);
127}
128
129
130/*************************************
131 *
132 *  Atari 400
133 *
134 *************************************/
135
136MACHINE_START( a400 )
137{
138   atari_machine_start(machine);
139   ms_atari_machine_start(machine, ATARI_400, TRUE);
140}
141
142
143/*************************************
144 *
145 *  Atari 800
146 *
147 *************************************/
148
149MACHINE_START( a800 )
150{
151   atari_machine_start(machine);
152   ms_atari_machine_start(machine, ATARI_800, TRUE);
153}
154
155
156DEVICE_IMAGE_LOAD( a800_cart )
157{
158   UINT8 *mem = memory_region(image->machine, "maincpu");
159   int size;
160
161   /* load an optional (dual) cartridge (e.g. basic.rom) */
162   if( strcmp(image->tag,"cart2") == 0 )
163   {
164      size = image_fread(image, &mem[0x12000], 0x2000);
165      a800_cart_is_16k = (size == 0x2000);
166      logerror("%s loaded right cartridge '%s' size 16K\n", image->machine->gamedrv->name, image_filename(image) );
167   }
168   else
169   {
170      size = image_fread(image, &mem[0x10000], 0x2000);
171      a800_cart_loaded = size > 0x0000;
172      size = image_fread(image, &mem[0x12000], 0x2000);
173      a800_cart_is_16k = size > 0x2000;
174      logerror("%s loaded left cartridge '%s' size %s\n", image->machine->gamedrv->name, image_filename(image) , (a800_cart_is_16k) ? "16K":"8K");
175   }
176   return INIT_PASS;
177}
178
179DEVICE_IMAGE_UNLOAD( a800_cart )
180{
181   if( strcmp(image->tag,"cart2") == 0 )
182   {
183      a800_cart_is_16k = 0;
184      a800_setbank(image->machine, 1);
185    }
186   else
187   {
188      a800_cart_loaded = 0;
189      a800_setbank(image->machine, 0);
190    }
191}
192
193
194/*************************************
195 *
196 *  Atari 800XL
197 *
198 *************************************/
199
200MACHINE_START( a800xl )
201{
202   atari_machine_start(machine);
203   ms_atari_machine_start(machine, ATARI_800XL, TRUE);
204}
205
206DEVICE_IMAGE_LOAD( a800xl_cart )
207{
208   UINT8 *mem = memory_region(image->machine, "maincpu");
209   astring *fname;
210   mame_file *basic_fp;
211   file_error filerr;
212   unsigned size;
213
214   fname = astring_assemble_3(astring_alloc(), image->machine->gamedrv->name, PATH_SEPARATOR, "basic.rom");
215   filerr = mame_fopen(SEARCHPATH_ROM, astring_c(fname), OPEN_FLAG_READ, &basic_fp);
216   astring_free(fname);
217
218   if (filerr != FILERR_NONE)
219   {
220      size = mame_fread(basic_fp, &mem[0x14000], 0x2000);
221      if( size < 0x2000 )
222      {
223         logerror("%s image '%s' load failed (less than 8K)\n", image->machine->gamedrv->name, astring_c(fname));
224         mame_fclose(basic_fp);
225         return 2;
226      }
227   }
228
229   /* load an optional (dual) cartidge (e.g. basic.rom) */
230   if (filerr != FILERR_NONE)
231   {
232      {
233         size = image_fread(image, &mem[0x14000], 0x2000);
234         a800_cart_loaded = size / 0x2000;
235         size = image_fread(image, &mem[0x16000], 0x2000);
236         a800_cart_is_16k = size / 0x2000;
237         logerror("%s loaded cartridge '%s' size %s\n",
238               image->machine->gamedrv->name, image_filename(image), (a800_cart_is_16k) ? "16K":"8K");
239      }
240      mame_fclose(basic_fp);
241   }
242
243   return INIT_PASS;
244}
245
246
247/*************************************
248 *
249 *  Atari 5200 console
250 *
251 *************************************/
252
253MACHINE_START( a5200 )
254{
255   atari_machine_start(machine);
256   ms_atari_machine_start(machine, ATARI_800XL, TRUE);
257}
258
259
260DEVICE_IMAGE_LOAD( a5200_cart )
261{
262   UINT8 *mem = memory_region(image->machine, "maincpu");
263   int size;
264
265   /* load an optional (dual) cartidge */
266   size = image_fread(image, &mem[0x4000], 0x8000);
267   if (size<0x8000) memmove(mem+0x4000+0x8000-size, mem+0x4000, size);
268   // mirroring of smaller cartridges
269   if (size <= 0x1000) memcpy(mem+0xa000, mem+0xb000, 0x1000);
270   if (size <= 0x2000) memcpy(mem+0x8000, mem+0xa000, 0x2000);
271   if (size <= 0x4000)
272   {
273      const char *info;
274      memcpy(&mem[0x4000], &mem[0x8000], 0x4000);
275      info = image_extrainfo(image);
276      if (info!=NULL && strcmp(info, "A13MIRRORING")==0)
277      {
278         memcpy(&mem[0x8000], &mem[0xa000], 0x2000);
279         memcpy(&mem[0x6000], &mem[0x4000], 0x2000);
280      }
281   }
282   logerror("%s loaded cartridge '%s' size %dK\n",
283      image->machine->gamedrv->name, image_filename(image) , size/1024);
284   return INIT_PASS;
285}
286
287DEVICE_IMAGE_UNLOAD( a5200_cart )
288{
289   UINT8 *mem = memory_region(image->machine, "maincpu");
290   /* zap the cartridge memory (again) */
291   memset(&mem[0x4000], 0x00, 0x8000);
292}
src/mess/machine/ataridev.h
r0r4475
1/*
2   ataridev.h
3
4*/
5
6#ifndef _ATARIDEV_H
7#define _ATARIDEV_H
8
9#define ATARI_5200   0
10#define ATARI_400   1
11#define ATARI_800   2
12#define ATARI_600XL 3
13#define ATARI_800XL 4
14
15/* defined in ataricrt.c */
16MACHINE_START( a400 );
17MACHINE_START( a800 );
18MACHINE_START( a800xl );
19MACHINE_START( a5200 );
20
21DEVICE_IMAGE_LOAD( a800_cart );
22DEVICE_IMAGE_UNLOAD( a800_cart );
23
24DEVICE_IMAGE_LOAD( a800xl_cart );
25DEVICE_IMAGE_UNLOAD( a800xl_cart );
26
27DEVICE_IMAGE_LOAD( a5200_cart );
28DEVICE_IMAGE_UNLOAD( a5200_cart );
29
30/* defined in atarifdc.c */
31DEVICE_IMAGE_LOAD( a800_floppy );
32
33#endif /* _ATARIDEV_H */
34
src/mess/machine/atarifdc.c
r4474r4475
1313#include "driver.h"
1414#include "cpu/m6502/m6502.h"
1515#include "includes/atari.h"
16#include "ataridev.h"
1617#include "sound/pokey.h"
1718#include "machine/6821pia.h"
1819#include "image.h"
r4474r4475
2021#define VERBOSE_SERIAL   0
2122#define VERBOSE_CHKSUM   0
2223
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 
2338ATARI_FDC atari_fdc;
2439
2540typedef struct _atari_drive atari_drive;
r4474r4475
726741
727742
728743
729WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w)
744WRITE_LINE_DEVICE_HANDLER(atarifdc_pia_cb2_w)
730745{
731746   if (!state)
732747   {
src/mess/mess.mak
r4474r4475
463463   $(MAME_VIDEO)/atari.o      \
464464   $(MAME_VIDEO)/antic.o      \
465465   $(MAME_VIDEO)/gtia.o      \
466   $(MESS_MACHINE)/ataricrt.o   \
466467   $(MESS_MACHINE)/atarifdc.o   \
467468   $(MESS_DRIVERS)/atari.o      \
468469   $(MESS_MACHINE)/a7800.o      \
src/mess/drivers/atari.c
r4474r4475
1010#include "deprecat.h"
1111#include "cpu/m6502/m6502.h"
1212#include "includes/atari.h"
13#include "machine/ataridev.h"
1314#include "devices/cartslot.h"
1415#include "sound/pokey.h"
1516#include "machine/6821pia.h"

Previous 15994 Revisions Next


© 1998-2018 The MESS Team