From 6d5a4cdb7d6cf1c2c634bc698b86bc351c1de06d Mon Sep 17 00:00:00 2001 From: David Schmidt <1110325+david-schmidt@users.noreply.github.com> Date: Fri, 28 Sep 2018 19:10:05 -0400 Subject: [PATCH] Framework for Apple /// (#4) * Skeletal support for Apple /// --- .gitignore | 3 ++ SourceGen/RuntimeData/Apple/A3-IO.sym65 | 29 +++++++++++++++ SourceGen/RuntimeData/Apple/A3-ROM.sym65 | 18 +++++++++ SourceGen/RuntimeData/Apple/SOS.sym65 | 47 ++++++++++++++++++++++++ SourceGen/RuntimeData/SystemDefs.json | 17 +++++++++ 5 files changed, 114 insertions(+) create mode 100644 SourceGen/RuntimeData/Apple/A3-IO.sym65 create mode 100644 SourceGen/RuntimeData/Apple/A3-ROM.sym65 create mode 100644 SourceGen/RuntimeData/Apple/SOS.sym65 diff --git a/.gitignore b/.gitignore index 30f0112..19a8890 100644 --- a/.gitignore +++ b/.gitignore @@ -310,3 +310,6 @@ __pycache__/ # OpenCover UI analysis results OpenCover/ + +# Eclipse gorp +/.project diff --git a/SourceGen/RuntimeData/Apple/A3-IO.sym65 b/SourceGen/RuntimeData/Apple/A3-IO.sym65 new file mode 100644 index 0000000..f5b8fee --- /dev/null +++ b/SourceGen/RuntimeData/Apple/A3-IO.sym65 @@ -0,0 +1,29 @@ +; Copyright 2018 David Schmidt. All Rights Reserved. +; See the LICENSE.txt file for distribution terms (Apache 2.0). +; +; Adapted from Apple /// reference materials +; + +*SYNOPSIS Symbols from hardware I/O areas + +KBD @ $C000 ;last key pressed + 128 + +; Other hardware registers +Z_REG @ $FFD0 +D_DDRB @ $FFD2 +D_DDRA @ $FFD3 +TIMER1L @ $FFD8 +TIMLATCH @ $FFD9 +D_ACR @ $FFDB +D_PCR @ $FFDC +D_IFR @ $FFDD +D_IER @ $FFDE +E_REG @ $FFDF ;environment register (r/w) +E_IORB @ $FFE0 +E_DDRB @ $FFE2 +E_DDRA @ $FFE3 +E_ACR @ $FFEB +E_PCR @ $FFEC +E_IFR @ $FFED +E_IER @ $FFEE +B_REG @ $FFEF diff --git a/SourceGen/RuntimeData/Apple/A3-ROM.sym65 b/SourceGen/RuntimeData/Apple/A3-ROM.sym65 new file mode 100644 index 0000000..d2433a2 --- /dev/null +++ b/SourceGen/RuntimeData/Apple/A3-ROM.sym65 @@ -0,0 +1,18 @@ +; Copyright 2018 David Schmidt. All Rights Reserved. +; See the LICENSE.txt file for distribution terms (Apache 2.0). +; +; Sources: +; David T. Craig's disassembly projects + +*SYNOPSIS Symbols from the Apple /// monitor ROM + +LMARGIN @ $58 ;left viewport margin +RMARGIN @ $59 ;right viewport margin +WINTOP @ $5A ;top of viewport +WINBTM @ $5B ;bottom of viewport + +; +; Useful ROM routines. +; +REGRWTS @ $F000 ; +DRIVSEL @ $F035 ; diff --git a/SourceGen/RuntimeData/Apple/SOS.sym65 b/SourceGen/RuntimeData/Apple/SOS.sym65 new file mode 100644 index 0000000..e6c6a6a --- /dev/null +++ b/SourceGen/RuntimeData/Apple/SOS.sym65 @@ -0,0 +1,47 @@ +; Copyright 2018 David Schmidt. All Rights Reserved. +; See the LICENSE.txt file for distribution terms (Apache 2.0). +; +; Source: SOS programmer's guide + +*SYNOPSIS SOS public addresses and constants. + +; SOS MLI function codes. +*TAG SOS-MLI-Functions + +SOS_REQUEST_SEG = $40 +SOS_FIND_SEG = $41 +SOS_CHANGE_SEG = $42 +SOS_GET_SEG_INFO = $43 +SOS_GET_SEG_NUM = $44 +SOS_RELEASE_SEG = $45 + +SOS_QUIT = $65 + +SOS_READBLOCK = $80 +SOS_WRITEBLOCK = $81 +SOS_GET_TIME = $82 +SOS_D_STATUS = $82 +SOS_D_CONTROL = $83 +SOS_GET_DEV_NUM = $84 +SOS_D_INFO = $85 + +SOS_CREATE = $C0 +SOS_DESTROY = $C1 +SOS_RENAME = $C2 +SOS_SET_FILE_INFO = $C3 +SOS_GET_FILE_INFO = $C4 +SOS_VOLUME = $C5 +SOS_SET_PREFIX = $C6 +SOS_GET_PREFIX = $C7 +SOS_OPEN = $C8 +SOS_NEWLINE = $C9 +SOS_READFILE = $CA +SOS_WRITEFILE = $CB +SOS_CLOSE = $CC +SOS_FLUSH = $CD +SOS_SET_MARK = $CE +SOS_GET_MARK = $CF +SOS_SET_EOF = $D0 +SOS_GET_EOF = $D1 +SOS_SET_LEVEL = $D2 +SOS_GET_LEVEL = $D3 diff --git a/SourceGen/RuntimeData/SystemDefs.json b/SourceGen/RuntimeData/SystemDefs.json index 70f842d..243f66e 100644 --- a/SourceGen/RuntimeData/SystemDefs.json +++ b/SourceGen/RuntimeData/SystemDefs.json @@ -78,6 +78,23 @@ "entry-flags":"native-long" } }, + { + "Name" : "Apple ///", + "GroupName" : "Apple", + "Cpu" : "6502", + "Speed" : "2", + "Description" : "Apple /// system, configured for SOS.", + "SymbolFiles" : [ + "RT:Apple/A3-ROM.sym65", + "RT:Apple/A3-IO.sym65", + "RT:Apple/SOS.sym65" + ], + "ExtensionScripts" : [ + ], + "Parameters" : { + "load-address":"0x2000" + } + }, { "Name" : "Atari 800", "GroupName" : "Atari",