Migrated DEIs to device page
This commit is contained in:
parent
dba7b1f486
commit
35391ca247
2
build.sh
2
build.sh
|
@ -23,4 +23,4 @@ fi
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
# echo "Running.."
|
# echo "Running.."
|
||||||
bin/uxn11 ~/roms/left.rom README.md
|
bin/uxn11 ~/roms/catclock.rom README.md
|
||||||
|
|
15
src/uxn11.c
15
src/uxn11.c
|
@ -59,17 +59,14 @@ console_deo(Uint8 *d, Uint8 port)
|
||||||
static Uint8
|
static Uint8
|
||||||
uxn11_dei(struct Uxn *u, Uint8 addr)
|
uxn11_dei(struct Uxn *u, Uint8 addr)
|
||||||
{
|
{
|
||||||
Uint8 p = addr & 0x0f;
|
Uint8 p = addr & 0x0f, *d = &u->dpg[addr >> 4];
|
||||||
Device *d = &u->dev[addr >> 4];
|
|
||||||
switch(addr & 0xf0) {
|
switch(addr & 0xf0) {
|
||||||
case 0x20: return screen_dei(d->dat, p); break;
|
case 0x20: return screen_dei(d, p); break;
|
||||||
case 0x80: return u->dpg[0x80 + p]; break;
|
case 0xa0: return file_dei(0, d, p); break;
|
||||||
case 0x90: return u->dpg[0x90 + p]; break;
|
case 0xb0: return file_dei(1, d, p); break;
|
||||||
case 0xa0: return file_dei(0, d->dat, p); break;
|
case 0xc0: return datetime_dei(d, p); break;
|
||||||
case 0xb0: return file_dei(1, d->dat, p); break;
|
|
||||||
case 0xc0: return datetime_dei(d->dat, p); break;
|
|
||||||
}
|
}
|
||||||
return d->dat[p];
|
return u->dpg[addr];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue