mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-11-04 11:07:00 +00:00
Allocate seq buffer on heap and keep ints disabled durin aux memory move
This commit is contained in:
parent
43a03d2882
commit
f11a1470f0
@ -75,7 +75,7 @@ def compiler(defptr)#0
|
||||
*$003C = defptr=>bytecodeaddr
|
||||
*$003E = *$003C + defptr->bytecodesize
|
||||
*$0042 = bytecode
|
||||
call($C311, 0, 0, 0, $00) // CALL XMOVE with carry clear (AUX->MAIN)
|
||||
call($C311, 0, 0, 0, $04) // CALL XMOVE with carry clear (AUX->MAIN) and ints disabled
|
||||
//^$C053 // MIX TEXT
|
||||
//puts("Addr Xlate: $"); puth(addrxlate); putln
|
||||
//puts("Bytecode: $"); puth(bytecode); putln
|
||||
|
@ -6,8 +6,8 @@ include "inc/sndseq.plh"
|
||||
//
|
||||
// These are utility sequences/routines needed to test the music sequencer code.
|
||||
//
|
||||
word arg
|
||||
word ref
|
||||
word arg, seq, len
|
||||
byte ref
|
||||
//
|
||||
// Sample background process to show it's working
|
||||
//
|
||||
@ -19,9 +19,11 @@ arg = argNext(argFirst)
|
||||
if ^arg
|
||||
ref = fileio:open(arg)
|
||||
if ref
|
||||
fileio:read(ref, heapmark(), heapavail())
|
||||
seq = heapalloc(heapavail - 256)
|
||||
len = fileio:read(ref, seq, heapmark - seq)
|
||||
fileio:close(ref)
|
||||
musicPlay(heapmark(), TRUE)
|
||||
heaprelease(seq + len)
|
||||
musicPlay(seq, TRUE)
|
||||
musicGetKey(8, @backgroundProc) // Yield every 8/16 second
|
||||
musicStop
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user