Previous 199869 Revisions Next

r31071 Sunday 22nd June, 2014 at 03:13:07 UTC by R. Belmont
(MESS) apple2: Support some oddball sized disk images and DOS 3.3 disks that were ripped in ProDOS sector order. [R. Belmont]
[src/lib/formats]ap2_dsk.c

trunk/src/lib/formats/ap2_dsk.c
r31070r31071
561561{
562562      UINT64 size = io_generic_size(io);
563563      UINT32 expected_size = 35 * 16 * 256;
564      return size == expected_size;
564
565      // check standard size plus some oddball sizes in our softlist
566      if ((size = (35*16*256)) || (size == 143403) || (size == 143363) || (size == 143358))
567      {
568         return 1;
569      }
570
571      return 0;
565572}
566573
567574// following is placeholder, is completely wrong.
r31070r31071
603610      UINT32 track_data[51090*2];
604611      UINT8 sector_data[256*16];
605612      int offset = 0;
613      static const unsigned char pascal_block1[4] = { 0x08, 0xa5, 0x0f, 0x29 };
614      static const unsigned char dos33_block1[4] = { 0xa2, 0x02, 0x8e, 0x52 };
606615
607616      io_generic_read(io, sector_data, fpos, 256*16);
608617
r31070r31071
619628         }   // check Apple II Pascal
620629         else if (!memcmp("SYSTEM.APPLE", &sector_data[0xd7], 12))
621630         {
622            unsigned char pascal_block1[4] = { 0x08, 0xa5, 0x0f, 0x29 };
623
624631            // Pascal discs can still be DOS order.
625632            // Check for the second half of the boot code at 0x100
626633            // (which means ProDOS order)
r31070r31071
628635            {
629636               m_prodos_order = true;
630637            }
638         }   // check for DOS 3.3 disks in ProDOS order
639         else if (!memcmp(dos33_block1, &sector_data[0x100], 4))
640         {
641            m_prodos_order = true;
631642         }
632643      }
633644

Previous 199869 Revisions Next


© 1997-2024 The MAME Team