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
+11 -5
View File
@@ -3,30 +3,36 @@
PROJNAME=equi PROJNAME=equi
CFILES=equi.c CFILES=equi.c
PBTDIR=platform-build-tools PBTDIR=platform-build-tools
PERSFILE=PERS.DAT
DFLAGS= DFLAGS=
desktopcc: desktopcc: perscopy
cc -std=c89 -Os -o $(PROJNAME) $(CFILES) $(DFLAGS) cc -std=c89 -Os -o $(PROJNAME) $(CFILES) $(DFLAGS)
# strip $(PROJNAME) # strip $(PROJNAME)
tcc: tcc: perscopy
tcc -std=c89 -o $(PROJNAME) $(CFILES) $(DFLAGS) tcc -std=c89 -o $(PROJNAME) $(CFILES) $(DFLAGS)
apple2-build: apple2-build:
cl65 --standard c89 -O -Os -t apple2 -o $(PROJNAME).apple2 $(CFILES) $(DFLAGS) cl65 --standard c89 -O -Os -t apple2 -o $(PROJNAME).apple2 $(CFILES) $(DFLAGS)
apple2: apple2-build apple2: apple2-build perscopy
cp $(PBTDIR)/apple2/tpl.dsk $(PROJNAME).dsk cp $(PBTDIR)/apple2/tpl.dsk $(PROJNAME).dsk
java -jar $(PBTDIR)/apple2/ac.jar -p $(PROJNAME).dsk $(PROJNAME).system sys < $$(cl65 --print-target-path)/apple2/util/loader.system java -jar $(PBTDIR)/apple2/ac.jar -p $(PROJNAME).dsk $(PROJNAME).system sys < $$(cl65 --print-target-path)/apple2/util/loader.system
java -jar $(PBTDIR)/apple2/ac.jar -as $(PROJNAME).dsk $(PROJNAME) bin < $(PROJNAME).apple2 java -jar $(PBTDIR)/apple2/ac.jar -as $(PROJNAME).dsk $(PROJNAME) bin < $(PROJNAME).apple2
java -jar $(PBTDIR)/apple2/ac.jar -dos $(PROJNAME).dsk $(PERSFILE) bin < $(PERSFILE)
apple2enh-build: apple2enh-build:
cl65 --standard c89 -O -Os -t apple2enh -o $(PROJNAME).a2enh $(CFILES) $(DFLAGS) cl65 --standard c89 -O -Os -t apple2enh -o $(PROJNAME).a2enh $(CFILES) $(DFLAGS)
apple2enh: apple2enh-build apple2enh: apple2enh-build perscopy
cp $(PBTDIR)/apple2/tpl.dsk $(PROJNAME)-enh.dsk cp $(PBTDIR)/apple2/tpl.dsk $(PROJNAME)-enh.dsk
java -jar $(PBTDIR)/apple2/ac.jar -p $(PROJNAME)-enh.dsk $(PROJNAME).system sys < $$(cl65 --print-target-path)/apple2enh/util/loader.system java -jar $(PBTDIR)/apple2/ac.jar -p $(PROJNAME)-enh.dsk $(PROJNAME).system sys < $$(cl65 --print-target-path)/apple2enh/util/loader.system
java -jar $(PBTDIR)/apple2/ac.jar -as $(PROJNAME)-enh.dsk $(PROJNAME) bin < $(PROJNAME).a2enh java -jar $(PBTDIR)/apple2/ac.jar -as $(PROJNAME)-enh.dsk $(PROJNAME) bin < $(PROJNAME).a2enh
java -jar $(PBTDIR)/apple2/ac.jar -dos $(PROJNAME)-enh.dsk $(PERSFILE) bin < $(PERSFILE)
perscopy:
cp $(PBTDIR)/$(PERSFILE) $(PERSFILE)
clean: clean:
rm -f ./$(PROJNAME) *.dsk *.o *.apple2 *.a2enh rm -f ./$(PROJNAME) $(PERSFILE) *.dsk *.o *.apple2 *.a2enh
+1 -1
View File
@@ -21,7 +21,7 @@ Main features of an Equi machine:
- Instruction ignore (II) flag; - Instruction ignore (II) flag;
- 16-bit input buffer pointer; - 16-bit input buffer pointer;
- 42752 bytes of main RAM (0x0000-0xa6ff), 41984 bytes of which are available for the program and data and 768 bytes hold the three stacks and necessary service registers listed above; - 42752 bytes of main RAM (0x0000-0xa6ff), 41984 bytes of which are available for the program and data and 768 bytes hold the three stacks and necessary service registers listed above;
- Up to 4GB flat persistent storage (tape, disk, flash etc); - Up to 2GB flat persistent storage (tape, disk, flash etc);
- Serial terminal input and output; - Serial terminal input and output;
- Up to 65535 peripheral extension ports, including several virtual ports. - Up to 65535 peripheral extension ports, including several virtual ports.
+3 -3
View File
@@ -59,12 +59,12 @@
/* Command buffer size in bytes */ /* Command buffer size in bytes */
#ifndef GPD_AREA_SIZE #ifndef GPD_AREA_SIZE
#define GPD_AREA_SIZE 6400u #define GPD_AREA_SIZE 5100u
#endif #endif
/* Command buffer size in bytes */ /* Command buffer size in bytes */
#ifndef CMD_BUF_SIZE #ifndef CMD_BUF_SIZE
#define CMD_BUF_SIZE 15600u #define CMD_BUF_SIZE 14000u
#endif #endif
/* Maximum amount of CLT entries */ /* 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 persistOp(FILE *pfd, ushort maddr, ushort dataLen, ushort adl, ushort adh, uchar isWrite) {
ushort status = 0, proc; ushort status = 0, proc;
if(pfd) { 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 */ if(isWrite) /* writing to the persistent area from the memory */
proc = (ushort) fwrite(&flatram[maddr], 1, dataLen, pfd); proc = (ushort) fwrite(&flatram[maddr], 1, dataLen, pfd);
else /* reading from the persistent area into the memory */ else /* reading from the persistent area into the memory */
Binary file not shown.