Update to latest core with multiple file devices

This commit is contained in:
Bad Diode 2022-05-16 17:09:47 +02:00
parent 31b867f9ef
commit 0e7a4d7ab7
2 changed files with 11 additions and 6 deletions

View File

@ -32,6 +32,11 @@ halt(int stub) {
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
int
uxn_interrupt(void) {
return 1;
}
Time Time
time_now(){ time_now(){
struct timespec t; struct timespec t;
@ -434,7 +439,7 @@ system_deo_special(Device *d, u8 port) {
} }
void void
load_rom(char *file_name) { load_uxn_rom(char *file_name) {
FILE *file = fopen(file_name, "r"); FILE *file = fopen(file_name, "r");
if (!file) { if (!file) {
fprintf(stderr, "error: couldn't open file: %s\n", file_name); fprintf(stderr, "error: couldn't open file: %s\n", file_name);
@ -460,7 +465,7 @@ init_uxn(Uxn *u, char *file_name) {
uxn_boot(u, calloc(0x10000, sizeof(u8))); uxn_boot(u, calloc(0x10000, sizeof(u8)));
// Copy rom to VM. // Copy rom to VM.
load_rom(file_name); load_uxn_rom(file_name);
// Initialize framebuffer. // Initialize framebuffer.
ppu_init(); ppu_init();
@ -484,9 +489,9 @@ init_uxn(Uxn *u, char *file_name) {
/* unused */ uxn_port(u, 0x7, nil_dei, nil_deo); /* unused */ uxn_port(u, 0x7, nil_dei, nil_deo);
/* control */ devctrl = uxn_port(u, 0x8, nil_dei, nil_deo); /* control */ devctrl = uxn_port(u, 0x8, nil_dei, nil_deo);
/* mouse */ devmouse = uxn_port(u, 0x9, nil_dei, nil_deo); /* mouse */ devmouse = uxn_port(u, 0x9, nil_dei, nil_deo);
/* file */ uxn_port(u, 0xa, nil_dei, file_deo); /* file0 */ uxn_port(u, 0xa, file_dei, file_deo);
/* datetime */ uxn_port(u, 0xb, datetime_dei, nil_deo); /* file1 */ uxn_port(u, 0xb, file_dei, file_deo);
/* unused */ uxn_port(u, 0xc, nil_dei, nil_deo); /* datetime */ uxn_port(u, 0xc, datetime_dei, nil_deo);
/* unused */ uxn_port(u, 0xd, nil_dei, nil_deo); /* unused */ uxn_port(u, 0xd, nil_dei, nil_deo);
/* unused */ uxn_port(u, 0xe, nil_dei, nil_deo); /* unused */ uxn_port(u, 0xe, nil_dei, nil_deo);
/* unused */ uxn_port(u, 0xf, nil_dei, nil_deo); /* unused */ uxn_port(u, 0xf, nil_dei, nil_deo);

@ -1 +1 @@
Subproject commit 5057dd160a8a1672f25d6fc73eeb2379b87b86e1 Subproject commit e00e74b9d043fef03a3692251fb792eabfcb4cd9