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:
|
||||
system_cmd(u->ram, PEEK2(d + 2));
|
||||
break;
|
||||
case 0x5:
|
||||
if(PEEK2(d + 4)){
|
||||
Uxn friend;
|
||||
uxn_boot(&friend, u->ram);
|
||||
uxn_eval(&friend, PEEK2(d + 4));
|
||||
}
|
||||
break;
|
||||
case 0xe:
|
||||
system_inspect(u);
|
||||
break;
|
||||
|
|
23
src/uxncli.c
23
src/uxncli.c
|
@ -17,7 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|||
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};
|
||||
|
||||
Uint8
|
||||
|
@ -53,16 +53,17 @@ main(int argc, char **argv)
|
|||
if(!system_load(&u, argv[i++]))
|
||||
return system_error("Load", "Failed");
|
||||
u.dev[0x17] = argc - i;
|
||||
if(!uxn_eval(&u, PAGE_PROGRAM))
|
||||
return u.dev[0x0f] & 0x7f;
|
||||
for(; i < argc; i++) {
|
||||
char *p = argv[i];
|
||||
while(*p) console_input(&u, *p++, CONSOLE_ARG);
|
||||
console_input(&u, '\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA);
|
||||
}
|
||||
while(!u.dev[0x0f]) {
|
||||
int c = fgetc(stdin);
|
||||
if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
|
||||
if(uxn_eval(&u, PAGE_PROGRAM)) {
|
||||
for(; i < argc; i++) {
|
||||
char *p = argv[i];
|
||||
while(*p) console_input(&u, *p++, CONSOLE_ARG);
|
||||
console_input(&u, '\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA);
|
||||
}
|
||||
while(!u.dev[0x0f]) {
|
||||
int c = fgetc(stdin);
|
||||
if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
|
||||
}
|
||||
}
|
||||
free(u.ram);
|
||||
return u.dev[0x0f] & 0x7f;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ WITH REGARD TO THIS SOFTWARE.
|
|||
|
||||
#define WIDTH 64 * 8
|
||||
#define HEIGHT 40 * 8
|
||||
#define PAD 4
|
||||
#define PAD 2
|
||||
#define TIMEOUT_MS 334
|
||||
#define BENCH 0
|
||||
|
||||
|
@ -52,7 +52,7 @@ static SDL_AudioDeviceID audio_id;
|
|||
static SDL_Rect gRect;
|
||||
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};
|
||||
|
||||
/* devices */
|
||||
|
|
Loading…
Reference in New Issue