summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-02-15 20:21:23 +0100
committer Olivier Galibert <galibert@pobox.com>2021-02-15 20:22:10 +0100
commitea3904bdf4f9e5848ab0e60689d36a73785e9714 (patch)
tree26cd1756708c89af987321ff9ba7b3c56ec16967
parentaed9f93f39fc107a8f54c2208bbea22e54954a2e (diff)
woz: Fix 2.0 format track length
-rwxr-xr-xsrc/devices/machine/applefdintf.cpp1
-rw-r--r--src/lib/formats/ap2_dsk.cpp4
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);
}
}
}