Previous 15994 Revisions Next

r819 Monday 13th August, 2007 at 09:18:35 UTC by Curt Coder
[ATARIST] Added *.ST floppy image loading
[src/mess/drivers]atarist.c

src/mess/drivers/atarist.c
r818r819
2323   - US keyboard layout
2424   - add serial communications to HD63701 cpu core
2525   - connect mouse to ikbd
26   - floppy image device_load
2726   - MFP interrupts
2827   - accurate screen timing
2928   - fdc.dma_int ?
r818r819
656655
657656static struct acia6850_interface acia_ikbd_intf =
658657{
659   500000,
660   500000,
658   Y2/64,
659   Y2/64,
661660   &acia_ikbd_rx,
662661   &acia_ikbd_tx,
663662   acia_interrupt
r818r819
665664
666665static struct acia6850_interface acia_midi_intf =
667666{
668   500000,
669   500000,
667   Y2/64,
668   Y2/64,
670669   &acia_midi_rx,
671670   &acia_midi_tx,
672671   acia_interrupt
r818r819
690689   */
691690
692691   UINT8 data = 0;
693   int centronics_handshake = centronics_read_handshake(1);
692   int centronics_handshake = centronics_read_handshake(0);
694693
695694   if ((centronics_handshake & CENTRONICS_NOT_BUSY) == 0)
696695   {
r818r819
935934
936935static DEVICE_LOAD( atarist_floppy )
937936{
938   int tracks = 80 , heads = 2, sectors = 16;
939
940937   if (image_has_been_created(image))
941938      return INIT_FAIL;
942939
943940   if (device_load_basicdsk_floppy(image) == INIT_PASS)
944941   {
945      /* drive, tracks, heads, sectors per track, sector length, first sector id, offset track zero, track skipping */
946      basicdsk_set_geometry(image, tracks, heads, sectors, 512, 1, 0, FALSE);
947      return INIT_PASS;
942      UINT8 bootsector[512];
943      image_fseek(image, 0, SEEK_SET);
944
945      if (image_fread(image, bootsector, 512))
946      {
947         int sectors = bootsector[0x18];
948         int heads = bootsector[0x1a];
949         int tracks = (bootsector[0x13] | (bootsector[0x14] << 8)) / sectors / heads;
950   
951         /* drive, tracks, heads, sectors per track, sector length, first sector id, offset track zero, track skipping */
952         basicdsk_set_geometry(image, tracks, heads, sectors, 512, 1, 0, FALSE);
953
954         return INIT_PASS;
955      }
948956   }
949957
950958   return INIT_FAIL;
r818r819
10271035   {
10281036      if (image_fread(image, ptr, filesize) == filesize)
10291037      {
1030         memory_install_read16_handler (0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MRA16_BANK2);
1031         memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MWA16_BANK2);
1038         memory_install_read16_handler (0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MRA16_BANK3);
1039         memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MWA16_BANK3);
10321040
10331041         return INIT_PASS;
10341042      }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team