From ea3904bdf4f9e5848ab0e60689d36a73785e9714 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 15 Feb 2021 20:21:23 +0100 Subject: woz: Fix 2.0 format track length --- src/devices/machine/applefdintf.cpp | 1 + src/lib/formats/ap2_dsk.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/applefdintf.cpp b/src/devices/machine/applefdintf.cpp index 6926d48afee..613f67f30b4 100755 --- a/src/devices/machine/applefdintf.cpp +++ b/src/devices/machine/applefdintf.cpp @@ -23,6 +23,7 @@ FLOPPY_FORMATS_END FLOPPY_FORMATS_MEMBER(applefdintf_device::formats_35) FLOPPY_DC42_FORMAT, + FLOPPY_WOZ_FORMAT, FLOPPY_APPLE_GCR_FORMAT, FLOPPY_APPLE_2MG_FORMAT, FLOPPY_PC_FORMAT diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp index 84b87a06e47..3af006fcfc7 100644 --- a/src/lib/formats/ap2_dsk.cpp +++ b/src/lib/formats/ap2_dsk.cpp @@ -1690,11 +1690,11 @@ bool a2_woz_format::load(io_generic *io, uint32_t form_factor, const std::vector uint32_t boff = (uint32_t)r16(img, trks_off + 0) * 512; - if (r16(img, trks_off + 4) == 0) + if (r32(img, trks_off + 4) == 0) return false; // TODO: when write capability is added, use the WRIT chunk data if it's present - generate_track_from_bitstream(track, head, &img[boff], r16(img, trks_off + 4), image, subtrack, 0xffff); + generate_track_from_bitstream(track, head, &img[boff], r32(img, trks_off + 4), image, subtrack, 0xffff); } } } -- cgit v1.2.3