Added mock behavior for the friend port
This commit is contained in:
parent
d2e054346f
commit
83ba7e05ea
|
@ -83,6 +83,13 @@ system_deo(Uxn *u, Uint8 *d, Uint8 port)
|
||||||
case 0x3:
|
case 0x3:
|
||||||
system_cmd(u->ram, PEEK2(d + 2));
|
system_cmd(u->ram, PEEK2(d + 2));
|
||||||
break;
|
break;
|
||||||
|
case 0x5:
|
||||||
|
if(PEEK2(d + 4)){
|
||||||
|
Uxn friend;
|
||||||
|
uxn_boot(&friend, u->ram);
|
||||||
|
uxn_eval(&friend, PEEK2(d + 4));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0xe:
|
case 0xe:
|
||||||
system_inspect(u);
|
system_inspect(u);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -17,7 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
WITH REGARD TO THIS SOFTWARE.
|
WITH REGARD TO THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Uint16 deo_mask[] = {0x6a08, 0x0300, 0xc028, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000};
|
Uint16 deo_mask[] = {0xc028, 0x0300, 0xc028, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000};
|
||||||
Uint16 dei_mask[] = {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07ff, 0x0000, 0x0000, 0x0000};
|
Uint16 dei_mask[] = {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07ff, 0x0000, 0x0000, 0x0000};
|
||||||
|
|
||||||
Uint8
|
Uint8
|
||||||
|
@ -53,8 +53,7 @@ main(int argc, char **argv)
|
||||||
if(!system_load(&u, argv[i++]))
|
if(!system_load(&u, argv[i++]))
|
||||||
return system_error("Load", "Failed");
|
return system_error("Load", "Failed");
|
||||||
u.dev[0x17] = argc - i;
|
u.dev[0x17] = argc - i;
|
||||||
if(!uxn_eval(&u, PAGE_PROGRAM))
|
if(uxn_eval(&u, PAGE_PROGRAM)) {
|
||||||
return u.dev[0x0f] & 0x7f;
|
|
||||||
for(; i < argc; i++) {
|
for(; i < argc; i++) {
|
||||||
char *p = argv[i];
|
char *p = argv[i];
|
||||||
while(*p) console_input(&u, *p++, CONSOLE_ARG);
|
while(*p) console_input(&u, *p++, CONSOLE_ARG);
|
||||||
|
@ -64,5 +63,7 @@ main(int argc, char **argv)
|
||||||
int c = fgetc(stdin);
|
int c = fgetc(stdin);
|
||||||
if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
|
if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
free(u.ram);
|
||||||
return u.dev[0x0f] & 0x7f;
|
return u.dev[0x0f] & 0x7f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ WITH REGARD TO THIS SOFTWARE.
|
||||||
|
|
||||||
#define WIDTH 64 * 8
|
#define WIDTH 64 * 8
|
||||||
#define HEIGHT 40 * 8
|
#define HEIGHT 40 * 8
|
||||||
#define PAD 4
|
#define PAD 2
|
||||||
#define TIMEOUT_MS 334
|
#define TIMEOUT_MS 334
|
||||||
#define BENCH 0
|
#define BENCH 0
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ static SDL_AudioDeviceID audio_id;
|
||||||
static SDL_Rect gRect;
|
static SDL_Rect gRect;
|
||||||
static SDL_Thread *stdin_thread;
|
static SDL_Thread *stdin_thread;
|
||||||
|
|
||||||
Uint16 deo_mask[] = {0xff08, 0x0300, 0xc028, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000};
|
Uint16 deo_mask[] = {0xff28, 0x0300, 0xc028, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x0000, 0x0000, 0xa260, 0xa260, 0x0000, 0x0000, 0x0000, 0x0000};
|
||||||
Uint16 dei_mask[] = {0x0000, 0x0000, 0x003c, 0x0014, 0x0014, 0x0014, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07ff, 0x0000, 0x0000, 0x0000};
|
Uint16 dei_mask[] = {0x0000, 0x0000, 0x003c, 0x0014, 0x0014, 0x0014, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07ff, 0x0000, 0x0000, 0x0000};
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
|
|
Loading…
Reference in New Issue