1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-05 04:28:57 +00:00

Fix cmd conflict with time card (and free up some bytes for soscmd too).

add apple2 compatible sound to Apple3 rogue.
This commit is contained in:
David Schmenk 2014-12-19 13:22:46 -08:00
parent 545eba0e3b
commit 242f7be1b9
3 changed files with 28 additions and 20 deletions

View File

@ -189,6 +189,8 @@ byte noapple1 = "APPLE 1 NOT SUPPORTED."
byte apple2 = "Apple II "
byte apple3 = "Apple /// "
const ENV_REG = $FFDF
const SPEAKER = $C030
const a2rndnum = $4E // ZP location of RND
@ -212,9 +214,6 @@ def a2getkb
return getc()
end
def a3tone(duration, pitch)
end
def a2tone(duration, delay)
byte i
@ -226,6 +225,15 @@ def a2tone(duration, delay)
loop
end
def a3tone(duration, pitch)
byte env
env = ^ENV_REG
^ENV_REG = env | $C0
a2tone(duration, pitch)
^ENV_REG = env
end
//
// Apple /// console routines
//

View File

@ -4,6 +4,7 @@ const databuff = $2000
const MODADDR = $1000
const symtbl = $0C00
const freemem = $0006
const getlnbuf = $01FF
//
// System flags: memory allocator screen holes.
//
@ -38,7 +39,7 @@ word heap
word xheap = $0800
word lastsym = symtbl
byte perr
word cmdptr = $01FF
byte[] cmdln // Overlay exported strings table
//
// Standard Library exported functions.
//
@ -66,6 +67,7 @@ byte loadstr = "MODLOAD"
byte execstr = "MODEXEC"
byte modadrstr = "MODADDR"
byte argstr = "ARGS"
byte[] prefix // overlay with exported symbols table
word exports = @sysstr, @syscall
word = @callstr, @call
word = @putcstr, @cout
@ -87,7 +89,7 @@ word = @loadstr, @loadmod
word = @execstr, @execmod
word = @modadrstr, @lookupstrmod
word = @machidstr, MACHID
word = @argstr, $01FF
word = @argstr, @cmdln
word = 0
word stdlibsym = @exports
//
@ -98,7 +100,6 @@ byte freestr = "MEM FREE:$"
byte errorstr = "ERR:$"
byte okstr = "OK"
byte huhstr = "?\n"
byte[32] prefix = ""
//
// Utility functions
//
@ -1275,10 +1276,11 @@ while *stdlibsym
addsym(heap, stdlibsym=>2)
stdlibsym = stdlibsym + 4
loop
memcpy(@cmdln, getlnbuf, 128)
//
// Print some startup info.
//
if not ^cmdptr
if not cmdln
prstr(@verstr)
prbyte(version.1)
cout('.')
@ -1287,33 +1289,32 @@ if not ^cmdptr
prstr(@freestr)
prword(availheap)
crout
else
getpfx(@prefix)
fin
getpfx(@prefix)
perr = 0
while 1
if ^cmdptr
when toupper(parsecmd(cmdptr))
if cmdln
when toupper(parsecmd(@cmdln))
is 'Q'
reboot()
break
is 'C'
catalog(cmdptr)
catalog(@cmdln)
break
is 'P'
setpfx(cmdptr)
setpfx(@cmdln)
break
is 'V'
volumes()
break
is '-'
execsys(cmdptr)
execsys(@cmdln)
break
is '+'
execmod(cmdptr)
execmod(@cmdln)
break
otherwise
prstr(@huhstr)
prstr(@huhstr)
wend
if perr
prstr(@errorstr)
@ -1325,6 +1326,6 @@ while 1
crout()
fin
prstr(getpfx(@prefix))
cmdptr = rdstr($BA)
memcpy(@cmdln, rdstr($BA), 128)
loop
done

View File

@ -54,7 +54,6 @@ byte errorstr[] = "ERR:$"
byte okstr[] = "OK"
byte huhstr[] = "?\n"
byte devtovol[] = " => /"
byte prefix[64] = ""
byte textmode[] = 16, 0, 15
byte hexchar[] = '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
//
@ -92,6 +91,7 @@ byte loadstr[] = "MODLOAD"
byte execstr[] = "MODEXEC"
byte modadrstr[] = "MODADDR"
byte argstr[] = "ARGS"
byte prefix[] // Overlay with exported symbols table
word exports[] = @sysstr, @syscall
word = @callstr, @call
word = @putcstr, @cout
@ -1297,9 +1297,8 @@ if not ^cmdptr
prstr(@freestr)
prword(availheap)
crout
else
getpfx(@prefix)
fin
getpfx(@prefix)
//
// Handle commands.
//