commit 618212a

neauoire  ·  2023-08-25 16:48:14 +0000 UTC
parent 2c56068
Connected link device
2 files changed,  +7, -2
+2, -1
 1@@ -267,9 +267,10 @@ main(int argc, char **argv)
 2 	system_connect(0xa, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK);
 3 	system_connect(0xb, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK);
 4 	system_connect(0xc, DATETIME_VERSION, DATETIME_DEIMASK, DATETIME_DEOMASK);
 5+	system_connect(0xf, LINK_VERSION, LINK_DEIMASK, LINK_DEOMASK);
 6 	/* Read flags */
 7 	if(argv[i][0] == '-' && argv[i][1] == 'v')
 8-		return system_version("Uxn11 - Graphical Varvara Emulator", "17 Aug 2023");
 9+		return system_version("Uxn11 - Graphical Varvara Emulator", "25 Aug 2023");
10 	if(!emu_init())
11 		return system_error("Init", "Failed to initialize varvara.");
12 	if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
+5, -1
 1@@ -6,6 +6,7 @@
 2 #include "devices/console.h"
 3 #include "devices/file.h"
 4 #include "devices/datetime.h"
 5+#include "devices/link.h"
 6 
 7 /*
 8 Copyright (c) 2021-2023 Devine Lu Linvega, Andrew Alderwick
 9@@ -24,6 +25,7 @@ emu_dei(Uxn *u, Uint8 addr)
10 	switch(addr & 0xf0) {
11 	case 0x00: return system_dei(u, addr);
12 	case 0xc0: return datetime_dei(u, addr);
13+	case 0xf0: return link_dei(u, addr);
14 	}
15 	return u->dev[addr];
16 }
17@@ -37,6 +39,7 @@ emu_deo(Uxn *u, Uint8 addr)
18 	case 0x10: console_deo(&u->dev[d], p); break;
19 	case 0xa0: file_deo(0, u->ram, &u->dev[d], p); break;
20 	case 0xb0: file_deo(1, u->ram, &u->dev[d], p); break;
21+	case 0xf0: link_deo(u, &u->dev[d], p); break;
22 	}
23 }
24 
25@@ -70,9 +73,10 @@ main(int argc, char **argv)
26 	system_connect(0xa, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK);
27 	system_connect(0xb, FILE_VERSION, FILE_DEIMASK, FILE_DEOMASK);
28 	system_connect(0xc, DATETIME_VERSION, DATETIME_DEIMASK, DATETIME_DEOMASK);
29+	system_connect(0xf, LINK_VERSION, LINK_DEIMASK, LINK_DEOMASK);
30 	/* Read flags */
31 	if(argv[i][0] == '-' && argv[i][1] == 'v')
32-		return system_version("Uxncli - Console Varvara Emulator", "19 Aug 2023");
33+		return system_version("Uxncli - Console Varvara Emulator", "25 Aug 2023");
34 	if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
35 		return system_error("Init", "Failed to initialize uxn.");
36 	/* Game Loop */