ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/IEC.cpp
(Generate patch)

Comparing Frodo4/Src/IEC.cpp (file contents):
Revision 1.3 by cebix, 2004-01-11T00:09:51Z vs.
Revision 1.7 by cebix, 2004-01-14T16:54:46Z

# Line 1 | Line 1
1   /*
2   *  IEC.cpp - IEC bus routines, 1541 emulation (DOS level)
3   *
4 < *  Frodo (C) 1994-1997,2002-2003 Christian Bauer
4 > *  Frodo (C) 1994-1997,2002-2004 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 68 | Line 68 | IEC::IEC(C64Display *display) : the_disp
68                          if (ThePrefs.DriveType[i] == DRVTYPE_DIR)
69                                  drive[i] = new FSDrive(this, ThePrefs.DrivePath[i]);
70                          else if (ThePrefs.DriveType[i] == DRVTYPE_D64)
71 <                                drive[i] = new D64Drive(this, ThePrefs.DrivePath[i]);
71 >                                drive[i] = new ImageDrive(this, ThePrefs.DrivePath[i]);
72                          else
73 <                                drive[i] = new T64Drive(this, ThePrefs.DrivePath[i]);
73 >                                drive[i] = new ArchDrive(this, ThePrefs.DrivePath[i]);
74                  }
75  
76          listener_active = talker_active = false;
# Line 120 | Line 120 | void IEC::NewPrefs(Prefs *prefs)
120                                  if (prefs->DriveType[i] == DRVTYPE_DIR)
121                                          drive[i] = new FSDrive(this, prefs->DrivePath[i]);
122                                  else if (prefs->DriveType[i] == DRVTYPE_D64)
123 <                                        drive[i] = new D64Drive(this, prefs->DrivePath[i]);
123 >                                        drive[i] = new ImageDrive(this, prefs->DrivePath[i]);
124                                  else
125 <                                        drive[i] = new T64Drive(this, prefs->DrivePath[i]);
125 >                                        drive[i] = new ArchDrive(this, prefs->DrivePath[i]);
126                          }
127                  }
128  
# Line 210 | Line 210 | uint8 IEC::OutSec(uint8 byte)
210   *  Read one byte
211   */
212  
213 < uint8 IEC::In(uint8 *byte)
213 > uint8 IEC::In(uint8 &byte)
214   {
215          if (talker_active && (received_cmd == CMD_DATA))
216                  return data_in(byte);
217  
218 <        *byte = 0;
218 >        byte = 0;
219          return ST_TIMEOUT;
220   }
221  
# Line 388 | Line 388 | uint8 IEC::data_out(uint8 byte, bool eoi
388   *  Read byte from channel
389   */
390  
391 < uint8 IEC::data_in(uint8 *byte)
391 > uint8 IEC::data_in(uint8 &byte)
392   {
393          return talker->Read(sec_addr, byte);
394   }
# Line 451 | Line 451 | void Drive::set_error(int error, int tra
451          sprintf(error_buf, Errors_1541[error], track, sector);
452          error_ptr = error_buf;
453          error_len = strlen(error_buf);
454 +        current_error = error;
455  
456          // Set drive condition
457          if (error != ERR_OK && error != ERR_SCRATCHED)
# Line 847 | Line 848 | void Drive::unsupp_cmd(void)
848   *  Convert PETSCII<->ASCII
849   */
850  
851 < char ascii2petscii(char c)
851 > uint8 ascii2petscii(char c)
852   {
853          if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
854                  return c ^ 0x20;
855          return c;
856   }
857  
858 < void ascii2petscii(char *dest, const char *src, int n)
858 > void ascii2petscii(uint8 *dest, const char *src, int n)
859   {
860          while (n-- && (*dest++ = ascii2petscii(*src++))) ;
861   }
# Line 868 | Line 869 | char petscii2ascii(uint8 c)
869          return c;
870   }
871  
872 < void petscii2ascii(char *dest, const char *src, int n)
872 > void petscii2ascii(char *dest, const uint8 *src, int n)
873   {
874          while (n-- && (*dest++ = petscii2ascii(*src++))) ;
875   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines