From 91435777749dd78c9c2c00fc930a7c0be63fb786 Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sun, 8 Jan 2017 23:26:26 +0300 Subject: [PATCH 1/3] i8255: in read_pc(), also return data from output latch --- src/devices/machine/i8255.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp index ff78e63ab01..c136d7a02dd 100644 --- a/src/devices/machine/i8255.cpp +++ b/src/devices/machine/i8255.cpp @@ -473,6 +473,11 @@ uint8_t i8255_device::read_pc() { // read data from port 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; From 1fda75a0e29f6f9416d268ed42e79c6f3d1d2afb Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sat, 7 Jan 2017 19:10:13 +0300 Subject: [PATCH 2/3] ImageDisk loader: don't crash on tracks with no data --- src/lib/formats/imd_dsk.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp index cce87fa64f2..8476da6ac38 100644 --- a/src/lib/formats/imd_dsk.cpp +++ b/src/lib/formats/imd_dsk.cpp @@ -492,10 +492,13 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) } } - if(fm) - build_pc_track_fm(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); + if(sector_count) { + if(fm) { + build_pc_track_fm(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= (&img[0] + size))) From 4add62a083bbc680811bac485b302c1288812d08 Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sun, 8 Jan 2017 23:28:51 +0300 Subject: [PATCH 3/3] TeleDisk loader: accept images produced from 8" SSSD disks --- src/lib/formats/td0_dsk.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/formats/td0_dsk.cpp b/src/lib/formats/td0_dsk.cpp index 588603a40f5..f31150eb45d 100644 --- a/src/lib/formats/td0_dsk.cpp +++ b/src/lib/formats/td0_dsk.cpp @@ -889,7 +889,9 @@ bool td0_format::load(io_generic *io, uint32_t form_factor, floppy_image *image) else return false; // single side 3.5? break; - } + } else + image->set_variant(floppy_image::SSDD); + break; /* no break */ case 3: if(head_count == 2)