Hi Jeff.
Does Silvern Castle run under straight up Applesoft, or do you use a
BASIC precompiler?
AFAIK, there is no true Applesoft Compiler that runs under ProDOS.
Please correct me if I am wrong.
- Paul
You can list the AppleSoft code directly to see what makes Silvern
tick.
BTW, there is an AppleSoft complier that runs under ProDOS &
Basic.System-the Beagle Compiler. I don't use it because I'm using
MicroDot, a Basic.System replacement that runs in less than 4K, vs
nearly 11K for Basic.System.
cool... What are the specs for MicroDot?
what is removed from it to make it 4k instead
of 11k?
Where can I find it/docs/etc ?
Rich
What MicroDot lacks are built-in commands for directory listings,
random-access capability, multiple open files, and the ability to chain
basic programs. However, MicroDot can implement these features with
optional modules. Plus it includes optional modules for basic program
overlays, hi-res packer/unpackers, and more.
I don't know offhand the status of MicroDot or where you can get it
today.
- Paul
- Paul
Also found this:
http://www.apple2.org.za/mirrors/ground.icaen.uiowa.edu/apple8/Utils/AutoMaker.INFO.txt
- Paul
I used AutoMaker to create the startup program for Silvern Castle; i.e.
the SILVERN.SYSTEM file is nothing but an AppleSoft program
masquerading as a SYS file.
The SILVERN.SYSTEM program simply runs the MICRODOT.SYSTEM file, and
can automatically load Diversi-Cache if you install it per the
instructions. The SILVERN.SYSTEM file can also be used to create a 3.5"
boot disk without needing BASIC.SYSTEM. See the Silvern READ.ME.FIRST
file for more information.
BTW, if you are using 3.5" disks, I highly recommend using
Diversi-Cache, as it will speed-up disk access immensely. Unfortunately
it only works with ROM1 Apple IIgs systems.
The biggest drawback in the review is MicroDot's lack of a
STORE/RESTORE command like BASIC.SYSTEM. But it's not that big of a
problem if you use a technique from the days of DOS 3.3 to bsave/bload
the memory where the variables are stored and save the zero-page
pointers. In fact, the save game code in Silvern Castle originally
came from Eamon.
Another drawback is the lack of a CHAIN command, although MicroDot has
built-in support for overlays, Silvern mostly doesn't use overlays
because I use a trick to mimic the chain command with MicroDot's
overlay ability.
There needs to be a repository for the lost classics/treasure chest
projects. Unfortunately the stuff on A2 central was never updated.
- Paul
please post the code that does this!
Rich
First, a few caveats:
1. When the variables are restored, the LOMEM and HIMEM pointers must
match the values they were when the variables were saved.
2. All string literals must be moved to the string pool. For example:
A$="HELLO" must be changed to A$="HELLO"+"" (the concatenation forces
AppleSoft to move the string into the string pool); also strings within
DATA statements may also need to be moved.
Zero-Page pointers:
105-106 = LOMEM (start of variable space)
107-108 = start of array-space
109-110 = end of array-space
111-112 = start of string-storage
115-116 = HIMEM
Here's the save routine:
100 LOMEM:16384: REM important! set to safe area
110 S=5: A$="TEST+"": C$(1)="APPLE"+"": REM test variables
120 X=FRE(0): REM force garbage collection to compact strings
130 PRINT CHR$(4)"BSAVE GAME.PTR,A105,L8": REM save zero-page pointers
140 PRINT CHR$(4)"BSAVE GAME.VAR,A"; PEEK(105)+PEEK(106)*256; ",L";
PEEK(109)+PEEK(110)*256-PEEK(105)-PEEK(106)*256: REM save variables
150 PRINT CHR$(4)"BSAVE GAME.STR,A"; PEEK(111)+PEEK(112)*256; ",L";
PEEK(115)+PEEK(116)*256-PEEK(111)-PEEK(112)*256: REM save strings
Here's the routines to restore the variables:
100 PRINT CHR$(4)"BLOAD GAME.PTR,A768": REM load zero-page pointers to
page 3 because page zero is marked as protected in the ProDOS bit-map
120 POKE 105,PEEK(768): POKE 106,PEEK(769): POKE 107,PEEK(770): POKE
108,PEEK(771): POKE 109,PEEK(772): POKE 110,PEEK(773): POKE
111,PEEK(774): POKE 112, PEEK(775): REM restore zero-page pointers
130 PRINT CHR$(4)"BLOAD GAME.VAR": REM restore variables
140 PRINT CHR$(4)"BLOAD GAME.STR": REM restore strings
150 PRINT S: PRINT A$: PRINT C$: REM test variables
The routines are written for Basic.System, but work with DOS 3.3 as
well (you can restore the GAME.PTR file directly to the correct
zero-page location).
-Jeff