Do not pass memory to system_deo
This commit is contained in:
parent
576d9b6b89
commit
f8ec872f63
|
@ -101,12 +101,12 @@ system_dei(Uint8 addr)
|
|||
}
|
||||
|
||||
void
|
||||
system_deo(Uint8 *d, Uint8 port)
|
||||
system_deo(Uint8 port)
|
||||
{
|
||||
Uint16 addr;
|
||||
switch(port) {
|
||||
case 0x3:
|
||||
addr = PEEK2(d + 2);
|
||||
addr = PEEK2(uxn.dev + 2);
|
||||
if(uxn.ram[addr] == 0x0) {
|
||||
Uint8 value = uxn.ram[addr + 7];
|
||||
Uint16 i, length = PEEK2(uxn.ram + addr + 1);
|
||||
|
@ -132,10 +132,10 @@ system_deo(Uint8 *d, Uint8 port)
|
|||
fprintf(stderr, "Unknown Expansion Command 0x%02x\n", uxn.ram[addr]);
|
||||
break;
|
||||
case 0x4:
|
||||
uxn.wst.ptr = d[4];
|
||||
uxn.wst.ptr = uxn.dev[4];
|
||||
break;
|
||||
case 0x5:
|
||||
uxn.rst.ptr = d[5];
|
||||
uxn.rst.ptr = uxn.dev[5];
|
||||
break;
|
||||
case 0xe:
|
||||
system_inspect();
|
||||
|
|
|
@ -9,7 +9,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|||
WITH REGARD TO THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#define SYSTEM_VERSION 2
|
||||
#define RAM_PAGES 0x10
|
||||
|
||||
void system_reboot(char *rom, int soft);
|
||||
|
@ -18,6 +17,6 @@ int system_error(char *msg, const char *err);
|
|||
int system_boot(Uint8 *ram, char *rom);
|
||||
|
||||
Uint8 system_dei(Uint8 addr);
|
||||
void system_deo(Uint8 *d, Uint8 port);
|
||||
void system_deo(Uint8 port);
|
||||
|
||||
extern char *boot_rom;
|
|
@ -63,7 +63,7 @@ emu_deo(Uint8 addr, Uint8 value)
|
|||
uxn.dev[addr] = value;
|
||||
switch(d) {
|
||||
case 0x00:
|
||||
system_deo(&uxn.dev[d], p);
|
||||
system_deo(p);
|
||||
if(p > 0x7 && p < 0xe)
|
||||
screen_palette(&uxn.dev[0x8]);
|
||||
break;
|
||||
|
|
|
@ -37,7 +37,7 @@ emu_deo(Uint8 addr, Uint8 value)
|
|||
Uint8 p = addr & 0x0f, d = addr & 0xf0;
|
||||
uxn.dev[addr] = value;
|
||||
switch(d) {
|
||||
case 0x00: system_deo(&uxn.dev[d], p); break;
|
||||
case 0x00: system_deo(p); break;
|
||||
case 0x10: console_deo(&uxn.dev[d], p); break;
|
||||
case 0xa0: file_deo(0, &uxn.dev[d], p); break;
|
||||
case 0xb0: file_deo(1, &uxn.dev[d], p); break;
|
||||
|
|
Loading…
Reference in New Issue