Merge pull request #1950 from shattered/_3aa32de

misc. fixes exposed by Displaywriter WIP
This commit is contained in:
R. Belmont 2017-01-09 21:35:37 -05:00 committed by GitHub
commit d7dba2bd78
3 changed files with 15 additions and 5 deletions

View File

@ -473,6 +473,11 @@ uint8_t i8255_device::read_pc()
{ {
// read data from port // read data from port
data |= m_in_pc_cb(0) & mask; data |= m_in_pc_cb(0) & mask;
if (port_c_upper_mode() == MODE_OUTPUT)
{
// read data from output latch
data |= m_output[PORT_C] & mask;
}
} }
return data; return data;

View File

@ -492,10 +492,13 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
} }
} }
if(fm) if(sector_count) {
build_pc_track_fm(track, head, image, cell_count, sector_count, sects, gap_3); if(fm) {
else build_pc_track_fm(track, head, image, cell_count, sector_count, sects, gap_3);
build_pc_track_mfm(track, head, image, cell_count, sector_count, sects, gap_3); } else {
build_pc_track_mfm(track, head, image, cell_count, sector_count, sects, gap_3);
}
}
for(int i=0; i<sector_count; i++) for(int i=0; i<sector_count; i++)
if(sects[i].data && (sects[i].data < &img[0] || sects[i].data >= (&img[0] + size))) if(sects[i].data && (sects[i].data < &img[0] || sects[i].data >= (&img[0] + size)))

View File

@ -889,7 +889,9 @@ bool td0_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
else else
return false; // single side 3.5? return false; // single side 3.5?
break; break;
} } else
image->set_variant(floppy_image::SSDD);
break;
/* no break */ /* no break */
case 3: case 3:
if(head_count == 2) if(head_count == 2)