Added the test mode entry point requested by gloriouscow.
This commit is contained in:
24
src/86box.c
24
src/86box.c
@@ -210,6 +210,7 @@ int video_fullscreen_scale_maximized = 0; /* (C) Whether
|
|||||||
int do_auto_pause = 0; /* (C) Auto-pause the emulator on focus
|
int do_auto_pause = 0; /* (C) Auto-pause the emulator on focus
|
||||||
loss */
|
loss */
|
||||||
int hook_enabled = 1; /* (C) Keyboard hook is enabled */
|
int hook_enabled = 1; /* (C) Keyboard hook is enabled */
|
||||||
|
int test_mode = 0; /* (C) Test mode */
|
||||||
char uuid[MAX_UUID_LEN] = { '\0' }; /* (C) UUID or machine identifier */
|
char uuid[MAX_UUID_LEN] = { '\0' }; /* (C) UUID or machine identifier */
|
||||||
|
|
||||||
int other_ide_present = 0; /* IDE controllers from non-IDE cards are
|
int other_ide_present = 0; /* IDE controllers from non-IDE cards are
|
||||||
@@ -585,6 +586,7 @@ usage:
|
|||||||
#ifndef USE_SDL_UI
|
#ifndef USE_SDL_UI
|
||||||
printf("-S or --settings - show only the settings dialog\n");
|
printf("-S or --settings - show only the settings dialog\n");
|
||||||
#endif
|
#endif
|
||||||
|
printf("-T or --testmode - test mode: execute the test mode entry point on init/hard reset\n");
|
||||||
printf("-V or --vmname name - overrides the name of the running VM\n");
|
printf("-V or --vmname name - overrides the name of the running VM\n");
|
||||||
printf("-W or --nohook - disables keyboard hook (compatibility-only outside Windows)\n");
|
printf("-W or --nohook - disables keyboard hook (compatibility-only outside Windows)\n");
|
||||||
printf("-X or --clear what - clears the 'what' (cmos/flash/both)\n");
|
printf("-X or --clear what - clears the 'what' (cmos/flash/both)\n");
|
||||||
@@ -656,6 +658,8 @@ usage:
|
|||||||
} else if (!strcasecmp(argv[c], "--settings") || !strcasecmp(argv[c], "-S")) {
|
} else if (!strcasecmp(argv[c], "--settings") || !strcasecmp(argv[c], "-S")) {
|
||||||
settings_only = 1;
|
settings_only = 1;
|
||||||
#endif
|
#endif
|
||||||
|
} else if (!strcasecmp(argv[c], "--testmode") || !strcasecmp(argv[c], "-T")) {
|
||||||
|
test_mode = 1;
|
||||||
} else if (!strcasecmp(argv[c], "--noconfirm") || !strcasecmp(argv[c], "-N")) {
|
} else if (!strcasecmp(argv[c], "--noconfirm") || !strcasecmp(argv[c], "-N")) {
|
||||||
confirm_exit_cmdl = 0;
|
confirm_exit_cmdl = 0;
|
||||||
} else if (!strcasecmp(argv[c], "--missing") || !strcasecmp(argv[c], "-M")) {
|
} else if (!strcasecmp(argv[c], "--missing") || !strcasecmp(argv[c], "-M")) {
|
||||||
@@ -1112,6 +1116,23 @@ pc_send_cae(void)
|
|||||||
pc_send_ca(1);
|
pc_send_ca(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Currently available API:
|
||||||
|
|
||||||
|
extern void prefetch_queue_set_pos(int pos);
|
||||||
|
extern void prefetch_queue_set_ip(uint16_t ip);
|
||||||
|
extern void prefetch_queue_set_prefetching(int p);
|
||||||
|
extern int prefetch_queue_get_pos(void);
|
||||||
|
extern uint16_t prefetch_queue_get_ip(void);
|
||||||
|
extern int prefetch_queue_get_prefetching(void);
|
||||||
|
extern int prefetch_queue_get_size(void);
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
pc_test_mode_entry_point(void)
|
||||||
|
{
|
||||||
|
pclog("Test mode entry point\n=====================\n");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pc_reset_hard_close(void)
|
pc_reset_hard_close(void)
|
||||||
{
|
{
|
||||||
@@ -1313,6 +1334,9 @@ pc_reset_hard_init(void)
|
|||||||
|
|
||||||
update_mouse_msg();
|
update_mouse_msg();
|
||||||
|
|
||||||
|
if (test_mode)
|
||||||
|
pc_test_mode_entry_point();
|
||||||
|
|
||||||
ui_hard_reset_completed();
|
ui_hard_reset_completed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,6 +154,48 @@ x808x_log(const char *fmt, ...)
|
|||||||
static void pfq_add(int c, int add);
|
static void pfq_add(int c, int add);
|
||||||
static void set_pzs(int bits);
|
static void set_pzs(int bits);
|
||||||
|
|
||||||
|
void
|
||||||
|
prefetch_queue_set_pos(int pos)
|
||||||
|
{
|
||||||
|
pfq_pos = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
prefetch_queue_set_ip(uint16_t ip)
|
||||||
|
{
|
||||||
|
pfq_ip = ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
prefetch_queue_set_prefetching(int p)
|
||||||
|
{
|
||||||
|
prefetching = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
prefetch_queue_get_pos(void)
|
||||||
|
{
|
||||||
|
return pfq_pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t
|
||||||
|
prefetch_queue_get_ip(void)
|
||||||
|
{
|
||||||
|
return pfq_ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
prefetch_queue_get_prefetching(void)
|
||||||
|
{
|
||||||
|
return prefetching;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
prefetch_queue_get_size(void)
|
||||||
|
{
|
||||||
|
return pfq_size;
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t
|
uint16_t
|
||||||
get_last_addr(void)
|
get_last_addr(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -821,4 +821,12 @@ extern int cpu_override_interpreter;
|
|||||||
|
|
||||||
extern int is_lock_legal(uint32_t fetchdat);
|
extern int is_lock_legal(uint32_t fetchdat);
|
||||||
|
|
||||||
|
extern void prefetch_queue_set_pos(int pos);
|
||||||
|
extern void prefetch_queue_set_ip(uint16_t ip);
|
||||||
|
extern void prefetch_queue_set_prefetching(int p);
|
||||||
|
extern int prefetch_queue_get_pos(void);
|
||||||
|
extern uint16_t prefetch_queue_get_ip(void);
|
||||||
|
extern int prefetch_queue_get_prefetching(void);
|
||||||
|
extern int prefetch_queue_get_size(void);
|
||||||
|
|
||||||
#endif /*EMU_CPU_H*/
|
#endif /*EMU_CPU_H*/
|
||||||
|
|||||||
Reference in New Issue
Block a user