Removed file_talk debugs
This commit is contained in:
parent
25858c3948
commit
19e84072d8
|
@ -83,10 +83,8 @@ file_talk(Device *d, Uint8 b0, Uint8 w)
|
||||||
Uint16 addr = peek16(d->dat, b0 - 1);
|
Uint16 addr = peek16(d->dat, b0 - 1);
|
||||||
FILE *f = fopen(name, read ? "rb" : (offset ? "ab" : "wb"));
|
FILE *f = fopen(name, read ? "rb" : (offset ? "ab" : "wb"));
|
||||||
if(f) {
|
if(f) {
|
||||||
fprintf(stderr, "%s %s %s #%04x, ", read ? "Loading" : "Saving", name, read ? "to" : "from", addr);
|
|
||||||
if(fseek(f, offset, SEEK_SET) != -1)
|
if(fseek(f, offset, SEEK_SET) != -1)
|
||||||
result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f);
|
result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f);
|
||||||
fprintf(stderr, "%04x bytes\n", result);
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
poke16(d->dat, 0x2, result);
|
poke16(d->dat, 0x2, result);
|
||||||
|
|
|
@ -348,10 +348,10 @@ file_talk(Device *d, Uint8 b0, Uint8 w)
|
||||||
Uint16 addr = peek16(d->dat, b0 - 1);
|
Uint16 addr = peek16(d->dat, b0 - 1);
|
||||||
FILE *f = fopen(name, read ? "rb" : (offset ? "ab" : "wb"));
|
FILE *f = fopen(name, read ? "rb" : (offset ? "ab" : "wb"));
|
||||||
if(f) {
|
if(f) {
|
||||||
fprintf(stderr, "%s %s %s #%04x, ", read ? "Loading" : "Saving", name, read ? "to" : "from", addr);
|
/* fprintf(stderr, "%s %s %s #%04x, ", read ? "Loading" : "Saving", name, read ? "to" : "from", addr); */
|
||||||
if(fseek(f, offset, SEEK_SET) != -1)
|
if(fseek(f, offset, SEEK_SET) != -1)
|
||||||
result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f);
|
result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f);
|
||||||
fprintf(stderr, "%04x bytes\n", result);
|
/* fprintf(stderr, "%04x bytes\n", result); */
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
poke16(d->dat, 0x2, result);
|
poke16(d->dat, 0x2, result);
|
||||||
|
|
Loading…
Reference in New Issue