[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Revenge of "Apple Crunch"



BLuRry wrote:
On Jan 14, 9:04 pm, lyricalnanoha
<lyricalnan...@usotsuki.hoshinet.org> wrote:
I'm gonna do a rerelease of Apple Crunch.  I've recompressed a bunch of
the games, recracked a couple, reripped a few more.

Though, I really don't like the menus I'm capable of doing in the current
system. :(  And since I keep the files as BASIC-type (it makes them easier
to handle), I can't use Beautiful Boot without hacking them.

Here's my questions:

1. Does anyone know how I might go about doing something like Beautiful
Boot - a menu with a fastloader that runs in HGR mode - but with the
ability to run BASIC programs as well as binary?  My current approach is
to use RDOS 3.3.

Executing a basic program as a binary is pretty easy... (once you know
about the onerr flag anyway)
; Clear onErr flag
LDA #$00
STA $d8
; Store start of basic program (e.g. $801)
LDA #$01
STA $67
LDA #$08
STA $68
; Store end of basic program (start + filesize -- e.g. $6000)
LDA #$00
STA $AF
LDA #$60
STA $B0
;Set LOMEM (optional?)
LDA #$00
STA $69
LDA #$80
STA $69
?? must be $6A.
;Set HIMEM (optional?)
LDA #$ff
STA $69
STA $73
LDA #$af
STA $69
STA $74

Should also set $6F.70 to HIMEM value so strings go in the
right place.

;Start the basic program
JMP $d566

So you could shove this loader somewhere low in memory like $300 or
you could pre-pend it to the beginning of the basic file.  This is
exactly what I use for AGS to execute basic programs and it seems to
work pretty well.  I set LOMEM to START+SIZE+1 and HIMEM to DOS -1
(and if you don't care about DOS, then just DFFF).   I have a feeling
that what you're doing probably doesn't matter too much if LOMEM or
HIMEM are set -- but I could be mistaken.

HIMEM should be set to the next page boundary *after* the last RAM
address usable by Applesoft.  So on a "bare" machine, it is $C000,
and similarly for any OS, buffers, addons present.  In several places
it is assumed that it is a page-aligned address.

LOMEM (end of program) should be set to program start + size (not +1).

-michael

******** Note new website URL ********

NadaNet and AppleCrate II for Apple II parallel computing!
Home page:  http://home.comcast.net/~mjmahon/

"The wastebasket is our most important design
tool--and it's seriously underused."