Completed file implementation
This commit is contained in:
parent
96b49d496e
commit
387f3c7e21
|
@ -22,12 +22,12 @@ cc src/devices/datetime.c src/devices/system.c src/devices/file.c src/uxn.c -DND
|
|||
|
||||
- `00` system
|
||||
- `10` console(partial)
|
||||
- `20` screen(partial/vector)
|
||||
- `20` screen
|
||||
- `30` audio(missing)
|
||||
- `70` midi(missing)
|
||||
- `80` controller
|
||||
- `90` mouse(partial/scroll)
|
||||
- `a0` file(missing)
|
||||
- `90` mouse(partial)
|
||||
- `a0` file
|
||||
- `c0` datetime
|
||||
|
||||
## Contributing
|
||||
|
|
18
src/uxn11.c
18
src/uxn11.c
|
@ -19,7 +19,7 @@ static Display *display;
|
|||
static Visual *visual;
|
||||
static Window window;
|
||||
|
||||
static Device *devscreen, *devctrl, *devmouse;
|
||||
static Device *devscreen, *devctrl, *devmouse, *devfile0;
|
||||
|
||||
#define WIDTH 64 * 8
|
||||
#define HEIGHT 40 * 8
|
||||
|
@ -38,6 +38,18 @@ system_deo_special(Device *d, Uint8 port)
|
|||
screen_palette(&uxn_screen, &d->dat[0x8]);
|
||||
}
|
||||
|
||||
static void
|
||||
file_deo(Device *d, Uint8 port)
|
||||
{
|
||||
file_i_deo(d - devfile0, d, port);
|
||||
}
|
||||
|
||||
static Uint8
|
||||
file_dei(Device *d, Uint8 port)
|
||||
{
|
||||
return file_i_dei(d - devfile0, d, port);
|
||||
}
|
||||
|
||||
static int
|
||||
console_input(Uxn *u, char c)
|
||||
{
|
||||
|
@ -195,8 +207,8 @@ start(Uxn *u, char *rom)
|
|||
/* empty */ 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, nil_deo);
|
||||
/* datetime */ uxn_port(u, 0xb, nil_dei, nil_deo);
|
||||
/* file0 */ devfile0 = uxn_port(u, 0xa, file_dei, file_deo);
|
||||
/* file1 */ uxn_port(u, 0xb, file_dei, file_deo);
|
||||
/* empty */ uxn_port(u, 0xc, datetime_dei, nil_deo);
|
||||
/* empty */ uxn_port(u, 0xd, nil_dei, nil_deo);
|
||||
/* empty */ uxn_port(u, 0xe, nil_dei, nil_deo);
|
||||
|
|
Loading…
Reference in New Issue