Removed PEKDEV macro
This commit is contained in:
parent
53f3c18dcf
commit
486a60b1bd
|
@ -75,18 +75,15 @@ void
|
|||
audio_start(int instance, Uint8 *d, Uxn *u)
|
||||
{
|
||||
UxnAudio *c = &uxn_audio[instance];
|
||||
Uint16 addr, adsr;
|
||||
Uint8 pitch;
|
||||
PEKDEV(adsr, 0x8);
|
||||
PEKDEV(c->len, 0xa);
|
||||
PEKDEV(addr, 0xc);
|
||||
Uint8 pitch = d[0xf] & 0x7f;
|
||||
Uint16 addr = PEEK16(d + 0xc), adsr = PEEK16(d + 0x8);
|
||||
c->len = PEEK16(d + 0xa);
|
||||
if(c->len > 0x10000 - addr)
|
||||
c->len = 0x10000 - addr;
|
||||
c->addr = &u->ram[addr];
|
||||
c->volume[0] = d[0xe] >> 4;
|
||||
c->volume[1] = d[0xe] & 0xf;
|
||||
c->repeat = !(d[0xf] & 0x80);
|
||||
pitch = d[0xf] & 0x7f;
|
||||
if(pitch < 108 && c->len)
|
||||
c->advance = advances[pitch % 12] >> (8 - pitch / 12);
|
||||
else {
|
||||
|
|
|
@ -237,8 +237,8 @@ file_deo(Uint8 id, Uint8 *ram, Uint8 *d, Uint8 port)
|
|||
Uint16 addr, len, res;
|
||||
switch(port) {
|
||||
case 0x5:
|
||||
PEKDEV(addr, 0x4);
|
||||
PEKDEV(len, 0xa);
|
||||
addr = PEEK16(d + 0x4);
|
||||
len = PEEK16(d + 0xa);
|
||||
if(len > 0x10000 - addr)
|
||||
len = 0x10000 - addr;
|
||||
res = file_stat(c, &ram[addr], len);
|
||||
|
@ -249,21 +249,21 @@ file_deo(Uint8 id, Uint8 *ram, Uint8 *d, Uint8 port)
|
|||
POKDEV(0x2, res);
|
||||
break;
|
||||
case 0x9:
|
||||
PEKDEV(addr, 0x8);
|
||||
addr = PEEK16(d + 0x8);
|
||||
res = file_init(c, (char *)&ram[addr], 0x10000 - addr, 0);
|
||||
POKDEV(0x2, res);
|
||||
break;
|
||||
case 0xd:
|
||||
PEKDEV(addr, 0xc);
|
||||
PEKDEV(len, 0xa);
|
||||
addr = PEEK16(d + 0xc);
|
||||
len = PEEK16(d + 0xa);
|
||||
if(len > 0x10000 - addr)
|
||||
len = 0x10000 - addr;
|
||||
res = file_read(c, &ram[addr], len);
|
||||
POKDEV(0x2, res);
|
||||
break;
|
||||
case 0xf:
|
||||
PEKDEV(addr, 0xe);
|
||||
PEKDEV(len, 0xa);
|
||||
addr = PEEK16(d + 0xe);
|
||||
len = PEEK16(d + 0xa);
|
||||
if(len > 0x10000 - addr)
|
||||
len = 0x10000 - addr;
|
||||
res = file_write(c, &ram[addr], len, d[0x7]);
|
||||
|
|
Loading…
Reference in New Issue