Adapted persfile to 96K and the buffer size to fit AppleIIe

This commit is contained in:
Luxferre
2022-08-12 11:46:04 +03:00
parent 1a95042757
commit d736ab3019
4 changed files with 15 additions and 9 deletions
+3 -3
View File
@@ -59,12 +59,12 @@
/* Command buffer size in bytes */
#ifndef GPD_AREA_SIZE
#define GPD_AREA_SIZE 6400u
#define GPD_AREA_SIZE 5100u
#endif
/* Command buffer size in bytes */
#ifndef CMD_BUF_SIZE
#define CMD_BUF_SIZE 15600u
#define CMD_BUF_SIZE 14000u
#endif
/* Maximum amount of CLT entries */
@@ -308,7 +308,7 @@ ushort crc16(const uchar* data_p, uchar length) {
ushort persistOp(FILE *pfd, ushort maddr, ushort dataLen, ushort adl, ushort adh, uchar isWrite) {
ushort status = 0, proc;
if(pfd) {
fseek(pfd, (adh << 16) | adl, SEEK_SET);
fseek(pfd, ((adh&0x7fffu) << 15) | adl, SEEK_SET);
if(isWrite) /* writing to the persistent area from the memory */
proc = (ushort) fwrite(&flatram[maddr], 1, dataLen, pfd);
else /* reading from the persistent area into the memory */