commit aeceaf75bf0eb6c9a55b5095ce601207e7d6e90b
parent 9ac7f06fde2ecacf14e9ce3f0ffaeccd42f40c10
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Fri, 3 Mar 2023 21:04:26 -0800
Removed file dei event
Diffstat:
5 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/src/devices/file.c b/src/devices/file.c
@@ -271,18 +271,3 @@ file_deo(Uint8 id, Uint8 *ram, Uint8 *d, Uint8 port)
break;
}
}
-
-Uint8
-file_dei(Uint8 id, Uint8 *d, Uint8 port)
-{
- UxnFile *c = &uxn_file[id];
- Uint16 res;
- switch(port) {
- case 0xc:
- case 0xd:
- res = file_read(c, &d[port], 1);
- POKE16(d + 0x2, res);
- break;
- }
- return d[port];
-}
diff --git a/src/devices/file.h b/src/devices/file.h
@@ -13,4 +13,3 @@ WITH REGARD TO THIS SOFTWARE.
#define DEV_FILE0 0xa
void file_deo(Uint8 id, Uint8 *ram, Uint8 *d, Uint8 port);
-Uint8 file_dei(Uint8 id, Uint8 *d, Uint8 port);
diff --git a/src/uxn-fast.c b/src/uxn-fast.c
@@ -34,13 +34,16 @@ WITH REGARD TO THIS SOFTWARE.
#define PUT2(o, v) { tmp = (v); s->dat[s->ptr - o - 2] = tmp >> 8; s->dat[s->ptr - o - 1] = tmp; }
#define PUSH(stack, v) { stack->dat[stack->ptr++] = (v); }
#define PUSH2(stack, v) { tmp = (v); stack->dat[stack->ptr] = (v) >> 8; stack->dat[stack->ptr + 1] = (v); stack->ptr += 2; }
-#define SEND(a, b) { u->dev[a] = b; if((callbacks[(a) >> 4] >> ((a) & 0xf)) & 0x1) u->deo(u, a); }
+#define SEND(a, b) { u->dev[a] = b; if((send_events[(a) >> 4] >> ((a) & 0xf)) & 0x1) u->deo(u, a); }
static
-Uint16 callbacks[] = {
+Uint16 send_events[] = {
0x6a08, 0x0300, 0xc028, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000,
- 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000
-};
+ 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000 };
+static
+Uint16 receive_events[] = {
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
int
uxn_eval(Uxn *u, Uint16 pc)
diff --git a/src/uxncli.c b/src/uxncli.c
@@ -52,8 +52,6 @@ emu_dei(Uxn *u, Uint8 addr)
{
Uint8 p = addr & 0x0f, d = addr & 0xf0;
switch(d) {
- case 0xa0: return file_dei(0, &u->dev[d], p);
- case 0xb0: return file_dei(1, &u->dev[d], p);
case 0xc0: return datetime_dei(u, addr);
}
return u->dev[addr];
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -118,8 +118,6 @@ emu_dei(Uxn *u, Uint8 addr)
case 0x40: return audio_dei(1, &u->dev[d], p);
case 0x50: return audio_dei(2, &u->dev[d], p);
case 0x60: return audio_dei(3, &u->dev[d], p);
- case 0xa0: return file_dei(0, &u->dev[d], p);
- case 0xb0: return file_dei(1, &u->dev[d], p);
case 0xc0: return datetime_dei(u, addr);
}
return u->dev[addr];