mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
acorn_dsk: Added support for HADFS floppy images.
This commit is contained in:
parent
cdd3c6bb01
commit
ec751fc8c6
@ -45,6 +45,11 @@ int acorn_ssd_format::find_size(io_generic *io, uint32_t form_factor)
|
|||||||
if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
// test for HADFS - test pattern at sector 70
|
||||||
|
io_generic_read(io, cat, 0x04610, 8);
|
||||||
|
if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
||||||
|
return i;
|
||||||
|
|
||||||
// read sector count from side 0 catalogue
|
// read sector count from side 0 catalogue
|
||||||
io_generic_read(io, cat, 0x100, 8);
|
io_generic_read(io, cat, 0x100, 8);
|
||||||
sectors0 = ((cat[6] & 3) << 8) + cat[7];
|
sectors0 = ((cat[6] & 3) << 8) + cat[7];
|
||||||
@ -170,6 +175,11 @@ int acorn_dsd_format::find_size(io_generic *io, uint32_t form_factor)
|
|||||||
if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
if (memcmp(cat, "\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
// test for HADFS - test pattern at sector 70
|
||||||
|
io_generic_read(io, cat, 0x08c10, 8);
|
||||||
|
if (memcmp(cat, "\x00\x28\x43\x29\x4a\x47\x48\x00", 4) == 0 && size == (uint64_t)compute_track_size(f) * f.track_count * f.head_count)
|
||||||
|
return i;
|
||||||
|
|
||||||
// read sector count from side 0 catalogue
|
// read sector count from side 0 catalogue
|
||||||
io_generic_read(io, cat, 0x100, 8);
|
io_generic_read(io, cat, 0x100, 8);
|
||||||
sectors0 = ((cat[6] & 3) << 8) + cat[7];
|
sectors0 = ((cat[6] & 3) << 8) + cat[7];
|
||||||
|
Loading…
Reference in New Issue
Block a user