;license:MIT ;(c) 2020-2 by 4am ; ;------------------------------------------------------------------------------ ; YE OLDE GRAND UNIFIED MEMORY MAP ; ; MAIN MEMORY ; 0300..03CF - data structures for current puzzle ; 0400..07FF - text page (kept black for switching) ; 0800..19FF - scroll routines (generated at startup) ; 1A00..1BFF - HGR lookup tables ; 1C00..1FFF - ProDOS file buffer ; 2000..3FFF - hi-res page ; 4000+ - program code (relocated to here at startup) ; ...unused... ; 8E10..8F37 - progress of puzzles in current world ; 8F38..8FFF - address lookup table for puzzles within following world data ; 9000..BEB3 - world data (read from disk) ; BEB4..BEFF - (de)acceleration function ;------------------------------------------------------------------------------ ; soft switches KBD = $C000 ; last key pressed (if any) STOREOFF = $C000 ; STA then use the following 4 flags: READMAINMEM = $C002 ; STA to read from main mem READAUXMEM = $C003 ; STA to read from aux mem WRITEMAINMEM = $C004 ; STA to write to main mem WRITEAUXMEM = $C005 ; STA to write to aux mem CLRC3ROM = $C00A ; STA to use internal Slot 3 ROM (required to use 128K and DHGR) SETC3ROM = $C00B ; STA to use external Slot 3 ROM (required to detect VidHD in slot 3) CLR80VID = $C00C ; 40 columns (also used to get out of DHGR mode) SET80VID = $C00D ; 80 columns (also used to get into DHGR mode) PRIMARYCHARSET= $C00E ; no mousetext for you CLEARKBD = $C010 ; clear last key pressed SPEAKER = $C030 ; chirp chirp CLOCKCTL = $C034 ; bits 0-3 are IIgs border color (also VidHD) GFXMODE = $C050 TEXTMODE = $C051 FULLGFX = $C052 MIXGFX = $C053 PAGE1 = $C054 ; page 1 (affects text, HGR, DHGR) PAGE2 = $C055 ; page 2 (affects text, HGR, DHGR) LORES = $C056 HIRES = $C057 ; ROM routines and addresses ROM_TEXT = $FB2F ROM_MACHINEID =$FBB3 ROM_HOME = $FC58 ROM_WAIT = $FCA8 ROM_COUT = $FDED ROM_NORMAL = $FE84 ; NORMAL text (instead of INVERSE or FLASH) ROM_IN0 = $FE89 ; SETKBD ROM_PR0 = $FE93 ; SETVID ; application-specific addresses PARAM = $00 ; word (used by PARAMS_ON_STACK macro) HTAB = $24 ; byte VTAB = $25 ; byte original_char = $ED ; byte char = $EE ; byte charrow = $EF ; byte GENSCROLLDOWN = $0800 ; 0x0900 bytes GENSCROLLUP = $1100 ; 0x0900 bytes HGRLO = $1A00 ; 0x00C0 bytes HGRHI = $1B00 ; 0x00C0 bytes WORLDFILEBUFFER = $1C00 ; 0x0400 bytes PREFSFILEBUFFER = WORLDFILEBUFFER PROGRESSFILEBUFFER = PREFSFILEBUFFER PACKEDPROGRESS = $8E10 ; 0x00C0 bytes PROGRESS = $8ED0 ; 0x0068 bytes PUZZLELO = $8F38 ; 0x0064 bytes PUZZLEHI = $8F9C ; 0x0064 bytes WORLDDATA = $9000 ; 0x3F00 bytes max DisableAccelerator = $BEB4 EnableAccelerator = DisableAccelerator+3