From 7ce8cc1d243120d6d0657f926fec6018b58c6ac5 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Thu, 17 Mar 2022 19:03:41 +0000 Subject: [PATCH] Add file reading with .File/read DEI(2). --- src/devices/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/devices/file.c b/src/devices/file.c index 2363b74..d31d88e 100644 --- a/src/devices/file.c +++ b/src/devices/file.c @@ -198,5 +198,14 @@ file_i_deo(int instance, Device *d, Uint8 port) Uint8 file_i_dei(int instance, Device *d, Uint8 port) { + UxnFile *c = &uxn_file[instance]; + Uint16 res; + switch(port) { + case 0xc: + case 0xd: + res = file_read(c, &d->dat[port], 1); + DEVPOKE16(0x2, res); + break; + } return d->dat[port]; }