summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/formats')
-rw-r--r--src/lib/formats/ap2_dsk.cpp6
-rw-r--r--src/lib/formats/jvc_dsk.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp
index f7687c0cc66..9e71303ece5 100644
--- a/src/lib/formats/ap2_dsk.cpp
+++ b/src/lib/formats/ap2_dsk.cpp
@@ -496,19 +496,19 @@ static uint32_t apple2_get_track_size(floppy_image_legacy *floppy, int head, int
LEGACY_FLOPPY_OPTIONS_START( apple2 )
LEGACY_FLOPPY_OPTION( apple2_do, "do,dsk,bin", "Apple ][ DOS order disk image", apple2_dsk_identify, apple2_do_construct, nullptr,
HEADS([1])
- TRACKS([APPLE2_TRACK_COUNT])
+ TRACKS([40]) // APPLE2_TRACK_COUNT
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([0]))
LEGACY_FLOPPY_OPTION( apple2_po, "po,dsk,bin", "Apple ][ ProDOS order disk image", apple2_dsk_identify, apple2_po_construct, nullptr,
HEADS([1])
- TRACKS([APPLE2_TRACK_COUNT])
+ TRACKS([40]) // APPLE2_TRACK_COUNT
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([0]))
LEGACY_FLOPPY_OPTION( apple2_nib, "dsk,nib", "Apple ][ Nibble order disk image", apple2_nib_identify, apple2_nib_construct, nullptr,
HEADS([1])
- TRACKS([APPLE2_TRACK_COUNT])
+ TRACKS([40]) // APPLE2_TRACK_COUNT
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([0]))
diff --git a/src/lib/formats/jvc_dsk.cpp b/src/lib/formats/jvc_dsk.cpp
index 5035e989f22..f5de872c672 100644
--- a/src/lib/formats/jvc_dsk.cpp
+++ b/src/lib/formats/jvc_dsk.cpp
@@ -150,8 +150,8 @@ bool jvc_format::parse_header(io_generic *io, int &header_size, int &tracks, int
switch (header_size)
{
- case 5: emu_fatalerror("jvc_format: sector attribute flag unsupported\n");
- break;
+ case 5:
+ throw emu_fatalerror("jvc_format: sector attribute flag unsupported\n");
case 4: base_sector_id = header[3];
// no break
case 3: sector_size = 128 << header[2];
@@ -184,7 +184,7 @@ bool jvc_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
// safety check
if (sector_count * sector_size > 10000)
- emu_fatalerror("jvc_format: incorrect track layout\n");
+ throw emu_fatalerror("jvc_format: incorrect track layout\n");
int file_offset = header_size;
@@ -253,7 +253,7 @@ bool jvc_format::save(io_generic *io, floppy_image *image)
for (int i = 0; i < 18; i++)
{
if (sectors[1 + i].size != 256)
- emu_fatalerror("jvc_format: invalid sector size: %d\n", sectors[1 + i].size);
+ throw emu_fatalerror("jvc_format: invalid sector size: %d\n", sectors[1 + i].size);
io_generic_write(io, sectors[1 + i].data, file_offset, sectors[1 + i].size);
file_offset += sectors[1 + i].size;