(MESS) Vtech1 : fixed i/o error when reading disks. [Robbbert]

(out of whatsnew) not tested on writing. Also, it works on VZ200 with 18K of ram, but freezes on vz300.
This commit is contained in:
Robbbert 2013-07-11 10:22:22 +00:00
parent 860455c1ca
commit 485eed587a

View File

@ -139,7 +139,7 @@ Notes:
#define VZ_BASIC 0xf0
#define VZ_MCODE 0xf1
#define TRKSIZE_VZ 0x9b0 /* arbitrary (actually from analyzing format) */
#define TRKSIZE_VZ 0x9a0 /* arbitrary (actually from analyzing format) */
#define TRKSIZE_FM 3172 /* size of a standard FM mode track */
#define PHI0(n) (((n)>>0)&1)
@ -300,7 +300,8 @@ void vtech1_state::vtech1_get_track()
size = TRKSIZE_VZ;
offs = TRKSIZE_VZ * m_fdc_track_x2[m_drive]/2;
image->fseek(offs, SEEK_SET);
size = image->fread(m_fdc_data, size);
// some disks have slightly larger header, make sure we capture the checksum at the end of the track
size = image->fread(m_fdc_data, size+4);
if (LOG_VTECH1_FDC)
logerror("get track @$%05x $%04x bytes\n", offs, size);
}