--- Frodo4/Src/IEC.cpp 2004/01/11 00:09:51 1.3 +++ Frodo4/Src/IEC.cpp 2004/01/12 15:13:20 1.6 @@ -1,7 +1,7 @@ /* * IEC.cpp - IEC bus routines, 1541 emulation (DOS level) * - * Frodo (C) 1994-1997,2002-2003 Christian Bauer + * Frodo (C) 1994-1997,2002-2004 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ IEC::IEC(C64Display *display) : the_disp if (ThePrefs.DriveType[i] == DRVTYPE_DIR) drive[i] = new FSDrive(this, ThePrefs.DrivePath[i]); else if (ThePrefs.DriveType[i] == DRVTYPE_D64) - drive[i] = new D64Drive(this, ThePrefs.DrivePath[i]); + drive[i] = new ImageDrive(this, ThePrefs.DrivePath[i]); else drive[i] = new T64Drive(this, ThePrefs.DrivePath[i]); } @@ -120,7 +120,7 @@ void IEC::NewPrefs(Prefs *prefs) if (prefs->DriveType[i] == DRVTYPE_DIR) drive[i] = new FSDrive(this, prefs->DrivePath[i]); else if (prefs->DriveType[i] == DRVTYPE_D64) - drive[i] = new D64Drive(this, prefs->DrivePath[i]); + drive[i] = new ImageDrive(this, prefs->DrivePath[i]); else drive[i] = new T64Drive(this, prefs->DrivePath[i]); } @@ -210,12 +210,12 @@ uint8 IEC::OutSec(uint8 byte) * Read one byte */ -uint8 IEC::In(uint8 *byte) +uint8 IEC::In(uint8 &byte) { if (talker_active && (received_cmd == CMD_DATA)) return data_in(byte); - *byte = 0; + byte = 0; return ST_TIMEOUT; } @@ -388,7 +388,7 @@ uint8 IEC::data_out(uint8 byte, bool eoi * Read byte from channel */ -uint8 IEC::data_in(uint8 *byte) +uint8 IEC::data_in(uint8 &byte) { return talker->Read(sec_addr, byte); } @@ -451,6 +451,7 @@ void Drive::set_error(int error, int tra sprintf(error_buf, Errors_1541[error], track, sector); error_ptr = error_buf; error_len = strlen(error_buf); + current_error = error; // Set drive condition if (error != ERR_OK && error != ERR_SCRATCHED)