|
Xemu [doxygen]
hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
|
Go to the documentation of this file.
33 static int attach_d81 (
int drive,
const char *
fn )
40 static void ui_attach_d81_by_browsing (
int drive )
42 char fnbuf[PATH_MAX + 1];
43 static char dir[PATH_MAX + 1] =
"";
46 "Select D81 to attach",
51 attach_d81(
drive, fnbuf);
53 DEBUGPRINT(
"UI: file selection for D81 mount was cancelled." NL);
56 static void ui_attach_d81_by_browsing_8 (
void ) { ui_attach_d81_by_browsing(0); }
57 static void ui_attach_d81_by_browsing_9 (
void ) { ui_attach_d81_by_browsing(1); }
59 static void ui_cb_detach_d81 (
const struct menu_st *m,
int *query )
65 static void ui_run_prg_by_browsing (
void )
67 char fnbuf[PATH_MAX + 1];
68 static char dir[PATH_MAX + 1] =
"";
71 "Select PRG to directly load&run",
79 DEBUGPRINT(
"UI: file selection for PRG injection was cancelled." NL);
82 static void ui_dump_memory (
void )
84 char fnbuf[PATH_MAX + 1];
85 static char dir[PATH_MAX + 1] =
"";
88 "Dump memory content into file",
97 static void reset_into_c64_mode (
void )
108 static void reset_into_c65_mode (
void )
115 static void reset_into_c65_mode_noboot (
void )
123 static void ui_cb_show_drive_led (
const struct menu_st *m,
int *query )
129 static void ui_emu_info (
void )
134 "DMA chip current revision: %d (F018 rev-%s)\n"
135 "ROM version detected: %d%s\n"
138 "Current VIC I/O mode: %s\n"
140 "Xemu host CPU usage so far: %s\n"
155 static void load_and_use_rom (
const char *
fn )
161 ERROR_WINDOW(
"Reset has been disallowed, thus you've rejected to load and use the selected ROM");
163 static void ui_load_rom_default (
void )
167 static void ui_load_rom_specified (
void )
172 #ifdef CONFIG_DROPFILE_CALLBACK
176 switch (
QUESTION_WINDOW(
"Cancel|D81 to drv-8|D81 to drv-9|Run as PRG|Use as ROM",
"What to do with the dropped file?")) {
188 load_and_use_rom(
fn);
194 static void ui_load_rom_by_browsing (
void )
196 char fnbuf[PATH_MAX + 1];
197 static char dir[PATH_MAX + 1] =
"";
200 "Select ROM to attach",
205 DEBUGPRINT(
"UI: file selection for loading ROM was cancelled." NL);
207 load_and_use_rom(fnbuf);
211 static void ui_put_screen_text_into_paste_buffer (
void )
225 if (SDL_SetClipboardText(result))
226 ERROR_WINDOW(
"Cannot insert text into the OS paste buffer: %s", SDL_GetError());
228 OSD(-1, -1,
"Copied to OS paste buffer.");
230 INFO_WINDOW(
"Screen is empty, nothing to capture.");
234 static void ui_put_paste_buffer_into_screen_text (
void )
236 char *t = SDL_GetClipboardText();
240 while (*t2 && (*t2 ==
'\t' || *t2 ==
'\r' || *t2 ==
'\n' || *t2 ==
' '))
256 ERROR_WINDOW(
"Clipboard query error, or clipboard was empty");
263 static const struct menu_st menu_display[] = {
272 #ifdef XEMU_FILES_SCREENSHOT_SUPPORT
279 static const struct menu_st menu_debug[] = {
286 static const struct menu_st menu_reset[] = {
292 static const struct menu_st menu_rom[] = {
298 static const struct menu_st menu_drives[] = {
305 static const struct menu_st menu_main[] = {
318 #ifdef HAVE_XEMU_EXEC_API
#define D81ACCESS_AUTOCLOSE
char current_rom_filepath[PATH_MAX]
int register_screenshot_request
int c65_reset_asked(void)
void inject_register_allow_disk_access(void)
int xemu_cbm_text_to_screen(Uint8 *v, const int cols, const int rows, const char *buffer, const int lowercase)
int d81access_attach_fsobj(int which, const char *fn, int mode)
void d81access_close(int which)
Uint8 vic3_registers[0x80]
int dump_memory(const char *fn)
#define ERROR_WINDOW(...)
struct configdb_st configdb
void emu_dropfile_callback(const char *fn)
int inject_register_prg(const char *prg_fn, int prg_mode)
char * xemu_cbm_screen_to_text(char *buffer, const int buffer_size, const Uint8 *v, const int cols, const int rows, const int lowercase)
int c65_load_rom(const char *fn, unsigned int dma_rev)
#define QUESTION_WINDOW(items, msg)