From 618212a0d770c9d3257f26d690746857cdf74e2d Mon Sep 17 00:00:00 2001 From: neauoire Date: Fri, 25 Aug 2023 09:48:14 -0700 Subject: [PATCH] Connected link device --- src/uxn11.c | 3 ++- src/uxncli.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/uxn11.c b/src/uxn11.c index aff7644..515f9b4 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -267,9 +267,10 @@ main(int argc, char **argv) system_connect(0xa, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK); system_connect(0xb, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK); system_connect(0xc, DATETIME_VERSION, DATETIME_DEIMASK, DATETIME_DEOMASK); + system_connect(0xf, LINK_VERSION, LINK_DEIMASK, LINK_DEOMASK); /* Read flags */ if(argv[i][0] == '-' && argv[i][1] == 'v') - return system_version("Uxn11 - Graphical Varvara Emulator", "17 Aug 2023"); + return system_version("Uxn11 - Graphical Varvara Emulator", "25 Aug 2023"); if(!emu_init()) return system_error("Init", "Failed to initialize varvara."); if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++])) diff --git a/src/uxncli.c b/src/uxncli.c index 0bd4877..d6536bf 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -6,6 +6,7 @@ #include "devices/console.h" #include "devices/file.h" #include "devices/datetime.h" +#include "devices/link.h" /* Copyright (c) 2021-2023 Devine Lu Linvega, Andrew Alderwick @@ -24,6 +25,7 @@ emu_dei(Uxn *u, Uint8 addr) switch(addr & 0xf0) { case 0x00: return system_dei(u, addr); case 0xc0: return datetime_dei(u, addr); + case 0xf0: return link_dei(u, addr); } return u->dev[addr]; } @@ -37,6 +39,7 @@ emu_deo(Uxn *u, Uint8 addr) case 0x10: console_deo(&u->dev[d], p); break; case 0xa0: file_deo(0, u->ram, &u->dev[d], p); break; case 0xb0: file_deo(1, u->ram, &u->dev[d], p); break; + case 0xf0: link_deo(u, &u->dev[d], p); break; } } @@ -70,9 +73,10 @@ main(int argc, char **argv) system_connect(0xa, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK); system_connect(0xb, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK); system_connect(0xc, DATETIME_VERSION, DATETIME_DEIMASK, DATETIME_DEOMASK); + system_connect(0xf, LINK_VERSION, LINK_DEIMASK, LINK_DEOMASK); /* Read flags */ if(argv[i][0] == '-' && argv[i][1] == 'v') - return system_version("Uxncli - Console Varvara Emulator", "19 Aug 2023"); + return system_version("Uxncli - Console Varvara Emulator", "25 Aug 2023"); if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++])) return system_error("Init", "Failed to initialize uxn."); /* Game Loop */