Update to latest core with multiple file devices
This commit is contained in:
parent
31b867f9ef
commit
0e7a4d7ab7
15
src/main.c
15
src/main.c
|
@ -32,6 +32,11 @@ halt(int stub) {
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
uxn_interrupt(void) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Time
|
||||
time_now(){
|
||||
struct timespec t;
|
||||
|
@ -434,7 +439,7 @@ system_deo_special(Device *d, u8 port) {
|
|||
}
|
||||
|
||||
void
|
||||
load_rom(char *file_name) {
|
||||
load_uxn_rom(char *file_name) {
|
||||
FILE *file = fopen(file_name, "r");
|
||||
if (!file) {
|
||||
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)));
|
||||
|
||||
// Copy rom to VM.
|
||||
load_rom(file_name);
|
||||
load_uxn_rom(file_name);
|
||||
|
||||
// Initialize framebuffer.
|
||||
ppu_init();
|
||||
|
@ -484,9 +489,9 @@ init_uxn(Uxn *u, char *file_name) {
|
|||
/* unused */ uxn_port(u, 0x7, nil_dei, nil_deo);
|
||||
/* control */ devctrl = uxn_port(u, 0x8, nil_dei, nil_deo);
|
||||
/* mouse */ devmouse = uxn_port(u, 0x9, nil_dei, nil_deo);
|
||||
/* file */ uxn_port(u, 0xa, nil_dei, file_deo);
|
||||
/* datetime */ uxn_port(u, 0xb, datetime_dei, nil_deo);
|
||||
/* unused */ uxn_port(u, 0xc, nil_dei, nil_deo);
|
||||
/* file0 */ uxn_port(u, 0xa, file_dei, file_deo);
|
||||
/* file1 */ uxn_port(u, 0xb, file_dei, file_deo);
|
||||
/* datetime */ uxn_port(u, 0xc, datetime_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, 0xf, nil_dei, nil_deo);
|
||||
|
|
2
src/uxn
2
src/uxn
|
@ -1 +1 @@
|
|||
Subproject commit 5057dd160a8a1672f25d6fc73eeb2379b87b86e1
|
||||
Subproject commit e00e74b9d043fef03a3692251fb792eabfcb4cd9
|
Loading…
Reference in New Issue