From 3172ea0b7058f8ae45fe3493aaf370e6ee2e06fa Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Thu, 3 Oct 2019 14:11:16 -0700 Subject: [PATCH] Update Apple II data files Added symbols for the ProDOS 8 global page, as well as some notes about screen holes. Also, if a platform symbol has a tag, show it in the Info panel. --- SourceGen/MainController.cs | 3 + SourceGen/RuntimeData/Apple/Applesoft.sym65 | 5 +- SourceGen/RuntimeData/Apple/Cxxx-IO.sym65 | 26 ++++++ SourceGen/RuntimeData/Apple/DOS33.sym65 | 16 ++-- SourceGen/RuntimeData/Apple/ProDOS8.sym65 | 92 ++++++++++++++++++++- 5 files changed, 132 insertions(+), 10 deletions(-) diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index 6733a4b..95ec1b3 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -3315,6 +3315,9 @@ namespace SourceGen { } else if (defSym.SymbolSource == Symbol.Source.Platform) { sourceStr = "platform symbol file (#" + defSym.LoadOrdinal + ":" + defSym.FileIdentifier + ")"; + if (!string.IsNullOrEmpty(defSym.Tag)) { + sourceStr += ", tag=" + defSym.Tag; + } } else { sourceStr = "???"; } diff --git a/SourceGen/RuntimeData/Apple/Applesoft.sym65 b/SourceGen/RuntimeData/Apple/Applesoft.sym65 index 0559110..635b181 100644 --- a/SourceGen/RuntimeData/Apple/Applesoft.sym65 +++ b/SourceGen/RuntimeData/Apple/Applesoft.sym65 @@ -10,7 +10,7 @@ BAS_USRVEC @ $0A 3 ;USR() command vector BAS_CHARAC @ $0D ;used by string utility BAS_ENDCHR @ $0E ;used by string utility -BAS_VALTYP @ $11 ;flag for last FAC operation ($00=num, $FF=str) +BAS_VALTYP @ $11 2 ;flag for last FAC operation ($00=num, $FF=str) BAS_SUBFLG @ $14 ;subscript flag ($00=allowed, $80=not) BAS_HCOLOR1 @ $1C ;hi-res color mask BAS_COUNTH @ $1D ;hi-res high-order byte of step for line @@ -28,7 +28,7 @@ BAS_FRETOP @ $6F 2 ;pointer to end of string storage (2b) BAS_MEMSIZE @ $73 2 ;HIMEM (2b) BAS_CURLIN @ $75 2 ;current line number (2b) BAS_OLDLIN @ $77 2 ;last line executed (2b) -BAS_OLDTEXT @ $79 ;old text pointer +BAS_OLDTEXT @ $79 2 ;old text pointer (2b) BAS_DATLIN @ $7B 2 ;current line # from which data is being read (2b) BAS_DATPTR @ $7D 2 ;points to mem from which data is being read (2b) BAS_VARNAM @ $81 2 ;holds last-used variable's name (2b) @@ -56,6 +56,7 @@ BAS_AUTORUN @ $D6 ;set to $80 to auto-run BAS_ERRFLG @ $D8 ;$80 if onerr active BAS_HPAG @ $E6 ;hi-res page to draw on ($20 or $40) BAS_SCALE @ $E7 ;hi-res graphics scale factor +BAS_HSHAPE @ $E8 2 ;hi-res shape table pointer (2b) BAS_FIRST @ $F0 ;used for lo-res plot coordinates BAS_ORMASK @ $F3 ;mask for output control BAS_REMSTK @ $F8 ;stack pointer saved before each statement diff --git a/SourceGen/RuntimeData/Apple/Cxxx-IO.sym65 b/SourceGen/RuntimeData/Apple/Cxxx-IO.sym65 index 2b6e451..3af033d 100644 --- a/SourceGen/RuntimeData/Apple/Cxxx-IO.sym65 +++ b/SourceGen/RuntimeData/Apple/Cxxx-IO.sym65 @@ -147,3 +147,29 @@ CLRROM @ $CFFF ; Not strictly I/O locations, but they're in the neighborhood. ROM_AUXMOVE @ $C311 ROM_XFER @ $C314 + + +; +; I/O scratchpad RAM addresses +; +; Each slot has 8 bytes of storage available in the "screen holes" in +; text page 1. See Apple II Reference Manual table page 83, +; "Peripheral Slot Scratchpad RAM", and +; https://retrocomputing.stackexchange.com/a/2541/56 +; +; Slot number: +; * 1 2 3 4 5 6 7 +; $0478 $0479 $047A $047B $047C $047D $047E $047F +; $04F8 $04F9 $04FA $04FB $04FC $04FD $04FE $04FF +; $0578 $0579 $057A $057B $057C $057D $057E $057F +; $05F8 $05F9 $05FA $05FB $05FC $05FD $0SFE $05FF +; $0678 $0679 $067A $067B $067C $067D $067E $067F +; $06F8 $06F9 $06FA $06FB $06FC $06FD $06FE $06FF +; $0778 $0779 $077A $077B $077C $077D $077E $077F +; $07F8 $07F9 $07FA $07FB $07FC $07FD $07FE $07FF +; +; The slot 0 holes are shared among peripheral cards and the operating +; system, e.g. DOS puts the slot number of the peripheral card from +; which it was booted into $5F8. +; +ACTV_PERIP_SLOT @ $07F8 ;slot num ($Cn) of active peripheral card diff --git a/SourceGen/RuntimeData/Apple/DOS33.sym65 b/SourceGen/RuntimeData/Apple/DOS33.sym65 index 278d470..71a2a52 100644 --- a/SourceGen/RuntimeData/Apple/DOS33.sym65 +++ b/SourceGen/RuntimeData/Apple/DOS33.sym65 @@ -5,9 +5,13 @@ *SYNOPSIS DOS 3.3 public addresses and constants. -DOS_WRM @ $3d0 ;DOS warmstart entry point -DOS_CLD @ $3d3 ;DOS coldstart entry point -DOS_FM @ $3d6 ;DOS file manager entry point -DOS_RWTS @ $3d9 ;RWTS entry point -DOS_LOCFPL @ $3dc ;loads Y/A with address of FM param list -DOS_LOCRPL @ $3e3 ;loads Y/A with address of RWTS IOB +DOS_WRM @ $03d0 ;DOS warmstart entry point +DOS_CLD @ $03d3 ;DOS coldstart entry point +DOS_FM @ $03d6 ;DOS file manager entry point +DOS_RWTS @ $03d9 ;RWTS entry point +DOS_LOCFPL @ $03dc ;loads Y/A with address of FM param list +DOS_LOCRPL @ $03e3 ;loads Y/A with address of RWTS IOB + +; I/O scratchpad RAM addresses +; See Apple II Reference Manual table 26 (page 83) +DOS_BOOT_SLOT @ $05f8 ;disk controller boot slot diff --git a/SourceGen/RuntimeData/Apple/ProDOS8.sym65 b/SourceGen/RuntimeData/Apple/ProDOS8.sym65 index 37ec578..8997bdd 100644 --- a/SourceGen/RuntimeData/Apple/ProDOS8.sym65 +++ b/SourceGen/RuntimeData/Apple/ProDOS8.sym65 @@ -1,13 +1,16 @@ ; Copyright 2018 faddenSoft. All Rights Reserved. ; See the LICENSE.txt file for distribution terms (Apache 2.0). ; -; Source: Beneath Apple ProDOS +; Sources: +; Beneath Apple ProDOS +; ProDOS 8 Technical Reference Manual *SYNOPSIS ProDOS 8 public addresses and constants. -P8_MLI @ $BF00 ;ProDOS MLI entry point +; ; ProDOS 8 MLI function codes. +; *TAG ProDOS8-MLI-Functions P8_ALLOC_INTERRUPT = $40 @@ -38,3 +41,88 @@ P8_SET_EOF = $D0 P8_GET_EOF = $D1 P8_SET_BUF = $D2 P8_GET_BUF = $D3 + +*TAG + + +; +; System global page. Labels and comments are from the ProDOS 8 +; Technical Reference Manual (section 5.2.4). +; +P8_MLI @ $BF00 ;ProDOS MLI call entry point + +; "do not use these" +P8_JSPARE @ $BF03 ;jump vector to cold start, selector pgm, etc. +P8_DATETIME @ $BF06 ;clock calendar routine +P8_SYSERR @ $BF09 ;error reporting hook +P8_SYSDEATH @ $BF0C ;system failure hook +P8_SERR @ $BF0F ;err code, 0=no error + +; disk device driver vectors +; two bytes each; slot 0-7 drive 1, then slot 0-7 drive 2 +; (s0d1/s0d2 are reserved; s3d2 @BF26-7 is /RAM) +P8_DEVADR01 @ $BF10 $20 ;device driver vectors + +; list of active devices by unit number +P8_DEVNUM @ $BF30 ;most recent accessed device +P8_DEVCNT @ $BF31 ;number of on-line devices (-1) +P8_DEVLST @ $BF32 14 ;up to 14 units may be active + +; copyright notice at $BF40-4A + +; routines reserved for MLI and subject to change +;P8_MLIENT1 @ $BF4B +;P8_AFTIRQ @ $BF50 +;P8_OLD45 @ $BF56 +;P8_AFBANK @ $BF57 + +; memory in-use map, one bit per 256-byte page +P8_MEMTABL @ $BF58 24 ;memory map of lower 48K + +; buffer addresses for 8 open files +P8_GL_BUFF @ $BF70 16 + +; interrupt vectors +P8_INTRUPT1 @ $BF80 2 +P8_INTRUPT2 @ $BF82 2 +P8_INTRUPT3 @ $BF84 2 +P8_INTRUPT4 @ $BF86 2 +P8_INTAREG @ $BF88 ;A-register +P8_INTXREG @ $BF89 ;X-register +P8_INTYREG @ $BF8A ;Y-register +P8_INTSREG @ $BF8B ;stack register +P8_INTPREG @ $BF8C ;status register +P8_INTBANKID @ $BF8D ;ROM, RAM1, or RAM2 ($D000 in LC) +P8_INTADDR @ $BF8E 2 ;program counter retn addr + +; the following options can be changed before calls to the MLI +P8_DATELO @ $BF90 2 ;bits 15-9=yr, 8-5=mo, 4-0=day +P8_TIMELO @ $BF92 2 ;bits 12-8=hr, 5-0=min; low-hi format +P8_LEVEL @ $BF94 ;file level: used in open, flush, close +P8_BUBIT @ $BF95 ;backup bit disable, SetFileInfo only +P8_SPARE1 @ $BF96 2 ;reserved for MLI use + +P8_MACHID @ $BF98 ;machine identification +P8_SLTBYT @ $BF99 ;'1' bits indicate ROM in slot(bit#) +P8_PFIXPTR @ $BF9A ;if = 0, no prefix active +P8_MLIACTV @ $BF9B ;if <> 0, MLI call in progress +P8_CMDADR @ $BF9C 2 ;return address of last call to MLI +P8_SAVEX @ $BF9E ;X-reg on entry to MLI +P8_SAVEY @ $BF9F ;Y-reg on entry to MLI + +; the following space is reserved for Language Card bank-switching routines +; $BFA0..BFCF + +; interrupt exit and entry routines +P8_IRQXIT @ $BFD0 +P8_IRQENT @ $BFEB + +P8_BNKBYT1 @ $BFF4 +P8_BNKBYT2 @ $BFF5 +P8_SYS_RTS @ $BFF6 + +; each system program should set IVERSION to its own current version number +P8_IBAKVER @ $BFFC ;undefined; reserved for future use +P8_IVERSION @ $BFFD ;version # of currently running Interpreter +P8_KBAKVER @ $BFFE ;undefined; reserved for future use +P8_KVERSION @ $BFFF ;version no. (release ID)