Do not pass memory to file_deo

This commit is contained in:
Devine Lu Linvega 2024-06-30 21:26:47 -08:00
parent 8d73001e86
commit 9b9aae555e
6 changed files with 7 additions and 12 deletions

View File

@ -9,8 +9,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE. WITH REGARD TO THIS SOFTWARE.
*/ */
#define CONTROL_VERSION 1
void controller_down(Uint8 mask); void controller_down(Uint8 mask);
void controller_up(Uint8 mask); void controller_up(Uint8 mask);
void controller_key(Uint8 key); void controller_key(Uint8 key);

View File

@ -9,6 +9,4 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE. WITH REGARD TO THIS SOFTWARE.
*/ */
#define DATETIME_VERSION 1
Uint8 datetime_dei(Uint8 addr); Uint8 datetime_dei(Uint8 addr);

View File

@ -245,10 +245,11 @@ file_delete(UxnFile *c)
/* IO */ /* IO */
void void
file_deo(Uint8 id, Uint8 *d, Uint8 port) file_deo(Uint8 id, Uint8 port)
{ {
UxnFile *c = &uxn_file[id]; UxnFile *c = &uxn_file[id];
Uint16 addr, len, res; Uint16 addr, len, res;
Uint8 *d = id ? &uxn.dev[0xb0] : &uxn.dev[0xa0];
switch(port) { switch(port) {
case 0x5: case 0x5:
addr = PEEK2(d + 0x4); addr = PEEK2(d + 0x4);

View File

@ -9,9 +9,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE. WITH REGARD TO THIS SOFTWARE.
*/ */
#define FILE_VERSION 1
#define POLYFILEY 2 #define POLYFILEY 2
#define DEV_FILE0 0xa #define DEV_FILE0 0xa
void file_deo(Uint8 id, Uint8 *d, Uint8 port); void file_deo(Uint8 id, Uint8 port);

View File

@ -69,8 +69,8 @@ emu_deo(Uint8 addr, Uint8 value)
break; break;
case 0x10: console_deo(p); break; case 0x10: console_deo(p); break;
case 0x20: screen_deo(p); break; case 0x20: screen_deo(p); break;
case 0xa0: file_deo(0, &uxn.dev[d], p); break; case 0xa0: file_deo(0, p); break;
case 0xb0: file_deo(1, &uxn.dev[d], p); break; case 0xb0: file_deo(1, p); break;
} }
} }

View File

@ -39,8 +39,8 @@ emu_deo(Uint8 addr, Uint8 value)
switch(d) { switch(d) {
case 0x00: system_deo(p); break; case 0x00: system_deo(p); break;
case 0x10: console_deo(p); break; case 0x10: console_deo(p); break;
case 0xa0: file_deo(0, &uxn.dev[d], p); break; case 0xa0: file_deo(0, p); break;
case 0xb0: file_deo(1, &uxn.dev[d], p); break; case 0xb0: file_deo(1, p); break;
} }
} }