(mess) floppy: Random fixes/logging [O. Galibert]

This commit is contained in:
Olivier Galibert 2012-10-10 15:33:41 +00:00
parent 5a2289ab25
commit 47e6b65df5
2 changed files with 6 additions and 4 deletions

View File

@ -369,12 +369,14 @@ void floppy_image_device::stp_w(int state)
if ( stp != state ) {
stp = state;
if ( stp == 0 ) {
int ocyl = cyl;
if ( dir ) {
if ( cyl ) cyl--;
} else {
if ( cyl < tracks-1 ) cyl++;
}
if(ocyl != cyl)
logerror("%s: track %d\n", tag(), cyl);
/* Update disk detection if applicable */
if (exists())
{

View File

@ -62,8 +62,8 @@ public:
void setup_unload_cb(unload_cb cb);
void setup_index_pulse_cb(index_pulse_cb cb);
UINT32* get_buffer() { return image->get_buffer(cyl, ss ^ 1); }
UINT32 get_len() { return image->get_track_size(cyl, ss ^ 1); }
UINT32* get_buffer() { return image->get_buffer(cyl, ss); }
UINT32 get_len() { return image->get_track_size(cyl, ss); }
void mon_w(int state);
bool ready_r();
@ -71,7 +71,7 @@ public:
bool wpt_r() { return output_format == 0; }
int dskchg_r() { return dskchg; }
bool trk00_r() { return cyl != 0; }
bool trk00_r() { return cyl != 0 || !image; }
int idx_r() { return idx; }
bool ss_r() { return ss; }