uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 7ce8cc1d243120d6d0657f926fec6018b58c6ac5
parent 205cc89bcbafa29c89935aeffd0b4954ec8cf6e3
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Thu, 17 Mar 2022 19:03:41 +0000

Add file reading with .File/read DEI(2).

Diffstat:
Msrc/devices/file.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git 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]; }