mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
ap2_dsk.c: support 36-track Apple II NIB images [Peter Ferrie]
This commit is contained in:
parent
1581177aff
commit
7f8df68ae0
@ -249,7 +249,7 @@ static FLOPPY_IDENTIFY(apple2_nib_identify)
|
|||||||
{
|
{
|
||||||
UINT64 size;
|
UINT64 size;
|
||||||
size = floppy_image_size(floppy);
|
size = floppy_image_size(floppy);
|
||||||
*vote = (size == APPLE2_TRACK_COUNT * APPLE2_SECTOR_COUNT * APPLE2_NIBBLE_SIZE) ? 100 : 0;
|
*vote = ((size == APPLE2_TRACK_COUNT * APPLE2_SECTOR_COUNT * APPLE2_NIBBLE_SIZE) || (size == (APPLE2_TRACK_COUNT + 1) * APPLE2_SECTOR_COUNT * APPLE2_NIBBLE_SIZE)) ? 100 : 0;
|
||||||
return FLOPPY_ERROR_SUCCESS;
|
return FLOPPY_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ static FLOPPY_CONSTRUCT(apple2_nib_construct)
|
|||||||
|
|
||||||
static floperr_t apple2_nib_read_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, void *buffer, size_t buflen)
|
static floperr_t apple2_nib_read_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, void *buffer, size_t buflen)
|
||||||
{
|
{
|
||||||
if ((head != 0) || (track < 0) || (track >= APPLE2_TRACK_COUNT))
|
if ((head != 0) || (track < 0) || (track > APPLE2_TRACK_COUNT))
|
||||||
return FLOPPY_ERROR_SEEKERROR;
|
return FLOPPY_ERROR_SEEKERROR;
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
return FLOPPY_ERROR_UNSUPPORTED;
|
return FLOPPY_ERROR_UNSUPPORTED;
|
||||||
@ -276,7 +276,7 @@ static floperr_t apple2_nib_read_track(floppy_image_legacy *floppy, int head, in
|
|||||||
|
|
||||||
static floperr_t apple2_nib_write_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, const void *buffer, size_t buflen)
|
static floperr_t apple2_nib_write_track(floppy_image_legacy *floppy, int head, int track, UINT64 offset, const void *buffer, size_t buflen)
|
||||||
{
|
{
|
||||||
if ((head != 0) || (track < 0) || (track >= APPLE2_TRACK_COUNT))
|
if ((head != 0) || (track < 0) || (track > APPLE2_TRACK_COUNT))
|
||||||
return FLOPPY_ERROR_SEEKERROR;
|
return FLOPPY_ERROR_SEEKERROR;
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
return FLOPPY_ERROR_UNSUPPORTED;
|
return FLOPPY_ERROR_UNSUPPORTED;
|
||||||
|
Loading…
Reference in New Issue
Block a user