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

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

# Line 1 | Line 1
1   /*
2   *  IEC.h - 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 118 | Line 118 | enum {
118   };
119  
120  
121 + // Information about file in disk image/archive file
122 + struct c64_dir_entry {
123 +        c64_dir_entry(const uint8 *n, int t, bool o, bool p, size_t s, off_t ofs = 0, uint8 sal = 0, uint8 sah = 0)
124 +                : type(t), is_open(o), is_protected(p), size(s), offset(ofs), sa_lo(sal), sa_hi(sah)
125 +        {
126 +                strncpy((char *)name, (const char *)n, 17);
127 +                name[16] = 0;
128 +        }
129 +
130 +        // Basic information
131 +        uint8 name[17];         // File name (C64 charset, null-terminated)
132 +        int type;                       // File type (see defines above)
133 +        bool is_open;           // Flag: file open
134 +        bool is_protected;      // Flag: file protected
135 +        size_t size;            // File size (may be approximated)
136 +
137 +        // Special information
138 +        off_t offset;           // Offset of file in archive file
139 +        uint8 sa_lo, sa_hi;     // C64 start address
140 + };
141 +
142 +
143   class Drive;
144   class C64Display;
145   class Prefs;
# Line 135 | Line 157 | public:
157          uint8 Out(uint8 byte, bool eoi);
158          uint8 OutATN(uint8 byte);
159          uint8 OutSec(uint8 byte);
160 <        uint8 In(uint8 *byte);
160 >        uint8 In(uint8 &byte);
161          void SetATN(void);
162          void RelATN(void);
163          void Turnaround(void);
# Line 150 | Line 172 | private:
172          uint8 sec_talk(void);
173          uint8 open_out(uint8 byte, bool eoi);
174          uint8 data_out(uint8 byte, bool eoi);
175 <        uint8 data_in(uint8 *byte);
175 >        uint8 data_in(uint8 &byte);
176  
177          C64Display *the_display;        // Pointer to display object (for drive LEDs)
178  
# Line 180 | Line 202 | public:
202  
203          virtual uint8 Open(int channel, const uint8 *name, int name_len)=0;
204          virtual uint8 Close(int channel)=0;
205 <        virtual uint8 Read(int channel, uint8 *byte)=0;
205 >        virtual uint8 Read(int channel, uint8 &byte)=0;
206          virtual uint8 Write(int channel, uint8 byte, bool eoi)=0;
207          virtual void Reset(void)=0;
208  
# Line 214 | Line 236 | protected:
236          char error_buf[256];    // Buffer with current error message
237          char *error_ptr;                // Pointer within error message
238          int error_len;                  // Remaining length of error message
239 +        int current_error;              // Number of current error
240  
241          uint8 cmd_buf[64];              // Buffer for incoming command strings
242          int cmd_len;                    // Length of received command
# Line 224 | Line 247 | private:
247  
248  
249   // Convert ASCII character to PETSCII character
250 < extern char ascii2petscii(char c);
250 > extern uint8 ascii2petscii(char c);
251  
252   // Convert ASCII string to PETSCII string
253 < extern void ascii2petscii(char *dest, const char *src, int max);
253 > extern void ascii2petscii(uint8 *dest, const char *src, int max);
254  
255   // Convert PETSCII character to ASCII character
256   extern char petscii2ascii(uint8 c);
257  
258   // Convert PETSCII string to ASCII string
259 < extern void petscii2ascii(char *dest, const char *src, int max);
259 > extern void petscii2ascii(char *dest, const uint8 *src, int max);
260  
261   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines