trunk/src/lib/formats/ap2_dsk.c
| r31070 | r31071 | |
| 561 | 561 | { |
| 562 | 562 | UINT64 size = io_generic_size(io); |
| 563 | 563 | 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; |
| 565 | 572 | } |
| 566 | 573 | |
| 567 | 574 | // following is placeholder, is completely wrong. |
| r31070 | r31071 | |
| 603 | 610 | UINT32 track_data[51090*2]; |
| 604 | 611 | UINT8 sector_data[256*16]; |
| 605 | 612 | 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 }; |
| 606 | 615 | |
| 607 | 616 | io_generic_read(io, sector_data, fpos, 256*16); |
| 608 | 617 | |
| r31070 | r31071 | |
| 619 | 628 | } // check Apple II Pascal |
| 620 | 629 | else if (!memcmp("SYSTEM.APPLE", §or_data[0xd7], 12)) |
| 621 | 630 | { |
| 622 | | unsigned char pascal_block1[4] = { 0x08, 0xa5, 0x0f, 0x29 }; |
| 623 | | |
| 624 | 631 | // Pascal discs can still be DOS order. |
| 625 | 632 | // Check for the second half of the boot code at 0x100 |
| 626 | 633 | // (which means ProDOS order) |
| r31070 | r31071 | |
| 628 | 635 | { |
| 629 | 636 | m_prodos_order = true; |
| 630 | 637 | } |
| 638 | } // check for DOS 3.3 disks in ProDOS order |
| 639 | else if (!memcmp(dos33_block1, §or_data[0x100], 4)) |
| 640 | { |
| 641 | m_prodos_order = true; |
| 631 | 642 | } |
| 632 | 643 | } |
| 633 | 644 | |