Connected link device

This commit is contained in:
neauoire 2023-08-25 09:48:14 -07:00
parent 2c560686d8
commit 618212a0d7
2 changed files with 7 additions and 2 deletions

View File

@ -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++]))

View File

@ -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 */