Merge pull request #215 from jgharston/main

Updated memory map and Equates
This commit is contained in:
Bobbi Webber-Manners 2022-12-10 22:03:49 -05:00 committed by GitHub
commit 30d21bb604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 83 deletions

View File

@ -1,11 +1,26 @@
* AUXMEM.AUDIO.S
* (c) Bobbi 2022 GPLv3
*
* Applecorn audio code.
* Applecorn audio and buffer management code.
* This auxiliary memory code implements OSWORD &07 and &08, enqueueing events
* for the audio engine that lives in main memory (MAINMEM.AUDIO.S).
*
BYTE0F
BYTE15
BYTE8A
BYTE91
BYTE98
BYTE99
BUFFLUSH
BUFFLUSHALL
BUFINSERT
BUFREM
BUFINS
BUFCNP
RTS
* OSWORD &07 - Make a sound
* On entry: (OSCTRL),Y points to eight byte parameter block (2 bytes each for
* channel, amplitude, pitch, duration)

View File

@ -1,40 +1,44 @@
* MAINMEM.FSEQU.S
* (c) Bobbi 2021 GPL v3
* (c) Bobbi 2021-2022 GPL v3
*
* Constant definitions for ProDOS filesystem code that
* resides in main memory.
* ProDOS string buffers
RTCBUF EQU $0200 ; Use by RTC calls, 40 bytes
* ; $0228-$023D
* ; $0228-$023D
DRVBUF1 EQU $023E
DRVBUF2 EQU $023F ; Prefix on current drive, len+64
DRVBUF2 EQU $023F ; Prefix on current drive, length
* $0240 ; Prefix path
CMDPATH EQU $0280 ; Path used to start Applecorn
* ; $02C0-$02FF
* Filename string buffers
MOSFILE1 EQU $0300 ; length + 64 bytes
MOSFILE2 EQU $0341 ; length + 64 bytes
MOSFILE EQU MOSFILE1
* ; $0382-$03A3 ROM selection w/s (move?)
* ; $03A4-$03BD
* Control block for OSFILE
FILEBLK EQU $03BE
FBPTR EQU FILEBLK+0 ; Pointer to name (in aux)
FBLOAD EQU FILEBLK+2 ; Load address (4 bytes)
FBEXEC EQU FILEBLK+6 ; Exec address (4 bytes)
FBSIZE EQU FILEBLK+10 ; Size (4 bytes)
FBSTRT EQU FILEBLK+10 ; Start address for SAVE (4 bytes)
FBATTR EQU FILEBLK+14 ; Attributes (4 bytes)
FBEND EQU FILEBLK+14 ; End address for SAVE (4 bytes)
* Control block for OSGBPB
GBPBBLK EQU $0382
GBPBBLK EQU FILEBLK+1
GBPBHDL EQU GBPBBLK+0 ; File handle
GBPBDAT EQU GBPBBLK+1 ; Pointer to data (4 bytes)
GBPBNUM EQU GBPBBLK+5 ; Num bytes to transfer (4 bytes)
GBPBPTR EQU GBPBBLK+9 ; File pointer (4 bytes)
GBPBAUXCB EQU GBPBBLK+13 ; Address of aux control block (2 bytes)
* $0391 ; $2D bytes here
* Control block for OSFILE
FILEBLK EQU $03BE
FBPTR EQU FILEBLK+0 ; Pointer to name (in aux)
FBLOAD EQU FILEBLK+2 ; Load address
FBEXEC EQU FILEBLK+6 ; Exec address
FBSIZE EQU FILEBLK+10 ; Size
FBSTRT EQU FILEBLK+10 ; Start address for SAVE
FBATTR EQU FILEBLK+14 ; Attributes
FBEND EQU FILEBLK+14 ; End address for SAVE
* ; $03D0-$03FF ; ProDOS workspace
* ProDOS MLI command numbers
ALLOCCMD EQU $40
@ -58,55 +62,3 @@ SMARKCMD EQU $CE
GMARKCMD EQU $CF
GEOFCMD EQU $D1

View File

@ -3,19 +3,24 @@
* ; $0000-$00FF Zero page
* ; $0100-$01FF Stack
* ; $0200-$02FF ProDOS string buffers
* ; $0200-$022F Overwritten by RTC routines
* ; $0228-$023D
DRVBUF1 EQU $023E ; $023E Drive
DRVBUF2 EQU $023F ; $022F Prefix on current drive
CMDPATH EQU $0280 ; $0280 Path used to start Applecorn
RTCBUF EQU $0200 ; $0200-$0227 Overwritten by RTC routines
* ; $0228-$023D $15 spare bytes
DRVBUF1 EQU $023E ; $023E Drive
DRVBUF2 EQU $023F ; $023F Prefix on current drive, length
* $0240 Prefix on current drive, path
CMDPATH EQU $0280 ; $0280 Path used to start Applecorn
* ; $02C0-$02FF $40 spare bytes
*
* ; $0300-$03CF File system core workspace
* ; $0300-$0382 Filename string buffers
MOSFILE1 EQU $0300 ; $0300 length
* ; $0301 64 byte string
* ; $0301 64-byte string
MOSFILE2 EQU $0341 ; $0341 length
* ; $0342 64 byte string
* ; $0382-$03BD $3C spare bytes
* ; $0342 64-byte string
ROMTOTL EQU $0382 ; $0382 Maximum ROM number
ROMTHIS EQU $0383 ; $0383 Currently loaded ROM
ROMADDRS EQU $0384 ; $0384 16xaddress of ROM filename
* ; $03A4-$03BD $1A spare bytes
* ;
* ; $03BE-$03CF: local copy of control block
* ; $03BE FPTR FPTR
@ -23,12 +28,12 @@ MOSFILE2 EQU $0341 ; $0341 length
* ; $03C0 LOAD LOAD ADDR
* ; $03C4 EXEC EXEC COUNT
* ; $03C8 SIZE START OFFSET
* ; $03CC ATTR END
* ; $03D0-$03EF: ProDOS - reserved for .SYSTEM programs
* ; $03D0-$03EC Undefined, available
* ; $03CC ATTR END AUXCPY
* ; $03D0-$03EF ProDOS workspace
* ; $03D0-$03EC .SYSTEM workspace?
* ; $03ED-$03EE XFER address
* ; $03EF ProDOS reserved
* ; $03F0-$3FF: Monitor/Applesoft locations
* ; $03F0-$03FF Monitor/Applesoft locations
* ; $03F0-$03F1 BRKV
* ; $03F2-$03F3 RESETV
* ; $03F4 PWDRUP
@ -38,14 +43,15 @@ MOSFILE2 EQU $0341 ; $0341 length
* ; $03FE-$03FF IRQV
*
* EQU $0400 ; $0400-$07FF Text Page 1 & screen holes - not for general use
* ; To do: 8 x 120-byte usable space
SCREEN EQU $0800 ; $0800-$0BFF Text Page 2
IOBUF0 EQU $0C00 ; $0C00-$0FFF For loading ROM, OSFILE, *.
IOBUF1 EQU $1000 ; $1000-$13FF Four open files for langs
IOBUF1 EQU $1000 ; $1000-$13FF Four open files for user program
IOBUF2 EQU $1400 ; $1400-$17FF
IOBUF3 EQU $1800 ; $1800-$1BFF
IOBUF4 EQU $1C00 ; $1C00-$1FFF
* ; $2000-$3FFF Hi-Res screen 1 - used for transient .SYSTEM loader code
* ; $4000- Code, to do: make code move itself
* ; $4000- Code - to do: layout now different as .SYSTEM code
* -$6FFF
BLKBUF EQU $9000 ; $9000-$93FF 512-byte buffer plus channel data
BLKBUFEND EQU $9200
@ -76,6 +82,6 @@ Memory layout in aux memory (Acorn environment)
* ; $03F0-$03FF
* ; $0400-$07FF Language workspace
* ; $0800-$0BFF Screen memory
* ; $0C00-$0DFF --> use as transient command buffer
* ; $0C00-$0DFF --> used as transient command buffer
* ; $0E00 Default PAGE