Added position readout to audio devices
This commit is contained in:
parent
67dfbc1a63
commit
d343865471
|
@ -25,10 +25,10 @@
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
|
|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|30 @Audio0 [ &vector $2 &output $1 &pad $5 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|40 @Audio1 [ &vector $2 &output $1 &pad $5 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|50 @Audio2 [ &vector $2 &output $1 &pad $5 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|60 @Audio3 [ &vector $2 &output $1 &pad $5 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &len $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
|
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|30 @Audio0 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|40 @Audio1 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|50 @Audio2 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|60 @Audio3 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
||||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
( devices )
|
( devices )
|
||||||
|
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 ]
|
||||||
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|30 @Audio0 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|40 @Audio1 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|50 @Audio2 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|60 @Audio3 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
||||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|30 @Audio0 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|40 @Audio1 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|50 @Audio2 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|60 @Audio3 [ &vector $2 &output $1 &pad $5 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||||
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
|70 @Midi [ &vector $2 &channel $1 ¬e $1 &velocity $1 ]
|
||||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|
|
|
@ -252,9 +252,12 @@ static void
|
||||||
audio_talk(Device *d, Uint8 b0, Uint8 w)
|
audio_talk(Device *d, Uint8 b0, Uint8 w)
|
||||||
{
|
{
|
||||||
Apu *c = &apu[d - devaudio0];
|
Apu *c = &apu[d - devaudio0];
|
||||||
if(!w && b0 == 0x2) {
|
if(!w) {
|
||||||
d->dat[0x2] = apu_get_vu(c);
|
if(b0 == 0x2)
|
||||||
} else if(w && b0 == 0xf) {
|
mempoke16(d->dat, 0x2, c->i);
|
||||||
|
else if(b0 == 0x4)
|
||||||
|
d->dat[0x4] = apu_get_vu(c);
|
||||||
|
} else if(b0 == 0xf) {
|
||||||
SDL_LockAudioDevice(audio_id);
|
SDL_LockAudioDevice(audio_id);
|
||||||
c->len = mempeek16(d->dat, 0xa);
|
c->len = mempeek16(d->dat, 0xa);
|
||||||
c->addr = &d->mem[mempeek16(d->dat, 0xc)];
|
c->addr = &d->mem[mempeek16(d->dat, 0xc)];
|
||||||
|
|
Loading…
Reference in New Issue