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; |
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 |