Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
ui.c
Go to the documentation of this file.
1 /* A work-in-progess MEGA65 (Commodore 65 clone origins) emulator
2  Part of the Xemu project, please visit: https://github.com/lgblgblgb/xemu
3  Copyright (C)2016-2022 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18 
19 
20 #include "xemu/emutools.h"
21 #include "ui.h"
22 #include "xemu/emutools_gui.h"
23 #include "mega65.h"
24 #include "xemu/emutools_files.h"
25 #include "sdcard.h"
26 #include "sdcontent.h"
27 #include "xemu/emutools_hid.h"
28 #include "xemu/c64_kbd_mapping.h"
29 #include "inject.h"
30 #include "input_devices.h"
31 #include "matrix_mode.h"
32 #include "uart_monitor.h"
33 #include "xemu/f011_core.h"
34 #include "dma65.h"
35 #include "memory_mapper.h"
36 #include "xemu/basic_text.h"
37 #include "audio65.h"
38 #include "vic4.h"
39 #include "configdb.h"
40 #include "rom.h"
41 #include "hypervisor.h"
42 #include "xemu/cpu65.h"
43 
44 
45 #ifdef CONFIG_DROPFILE_CALLBACK
46 void emu_dropfile_callback ( const char *fn )
47 {
48  DEBUGGUI("UI: file drop event, file: %s" NL, fn);
49  switch (QUESTION_WINDOW("Cancel|Mount as D81|Run/inject as PRG", "What to do with the dropped file?")) {
50  case 1:
51  sdcard_force_external_mount(0, fn, "D81 mount failure");
52  break;
53  case 2:
54  reset_mega65();
56  break;
57  }
58 }
59 #endif
60 
61 static void ui_cb_attach_default_d81 ( const struct menu_st *m, int *query )
62 {
65 }
66 
67 static void ui_cb_attach_d81 ( const struct menu_st *m, int *query )
68 {
70  const int drive = VOIDPTR_TO_INT(m->user_data) & 1; // only two possible drives (or units, or WTF ...)
71  const int creat = !!(VOIDPTR_TO_INT(m->user_data) & 0x80);
72  char fnbuf[PATH_MAX + 1];
73  static char dir[PATH_MAX + 1] = "";
74  if (!dir[0])
75  strcpy(dir, sdl_pref_dir);
78  creat ? "Create new D81 to attach" : "Select D81 to attach",
79  dir,
80  fnbuf,
81  sizeof fnbuf
82  )) {
83  if (creat) {
84  // append .d81 extension if user did not specify that ...
85  const int fnlen = strlen(fnbuf);
86  static const char d81_ext[] = ".d81";
87  char fnbuf2[fnlen + strlen(d81_ext) + 1];
88  strcpy(fnbuf2, fnbuf);
89  if (strcasecmp(fnbuf2 + fnlen - strlen(d81_ext), d81_ext)) {
90  strcpy(fnbuf2 + fnlen, d81_ext);
91  // FIXME: when we appended .d81 we should check if file exists! file sel dialog only checks for the base name of course
92  // However this is a bit lame this way, that there are two different kind of question, one from the save filesel dailog,
93  // at the other case, we check here ...
94  if (xemu_os_file_exists(fnbuf2)) {
95  if (!ARE_YOU_SURE("Overwrite existing D81 image?", ARE_YOU_SURE_DEFAULT_YES)) {
96  return;
97  }
98  }
99  }
100  sdcard_force_external_mount_with_image_creation(drive, fnbuf2, 1, "D81 mount failure"); // third arg: allow overwrite existing D81
101  } else
102  sdcard_force_external_mount(drive, fnbuf, "D81 mount failure");
103  } else {
104  DEBUGPRINT("UI: file selection for D81 mount was cancelled." NL);
105  }
106 }
107 
108 static void ui_cb_detach_d81 ( const struct menu_st *m, int *query )
109 {
112 }
113 
114 static void ui_run_prg_by_browsing ( void )
115 {
116  char fnbuf[PATH_MAX + 1];
117  static char dir[PATH_MAX + 1] = "";
120  "Select PRG to directly load and run",
121  dir,
122  fnbuf,
123  sizeof fnbuf
124  )) {
125  reset_mega65();
126  inject_register_prg(fnbuf, 0);
127  } else
128  DEBUGPRINT("UI: file selection for PRG injection was cancelled." NL);
129 }
130 
131 #ifdef CBM_BASIC_TEXT_SUPPORT
132 static void ui_save_basic_as_text ( void )
133 {
134  Uint8 *start = main_ram + 0x2001;
135  Uint8 *end = main_ram + 0x4000;
136  Uint8 *buffer;
137  int size = xemu_basic_to_text_malloc(&buffer, 1000000, start, 0x2001, end, 0, 0);
138  if (size < 0)
139  return;
140  if (size == 0) {
141  INFO_WINDOW("BASIC memory is empty.");
142  free(buffer);
143  return;
144  }
145  printf("%s", buffer);
146  FILE *f = fopen("/tmp/prgout.txt", "wb");
147  if (f) {
148  fwrite(buffer, size, 1, f);
149  fclose(f);
150  }
151  size = SDL_SetClipboardText((const char *)buffer);
152  free(buffer);
153  if (size)
154  ERROR_WINDOW("Cannot set clipboard: %s", SDL_GetError());
155 }
156 #endif
157 
158 static void ui_format_sdcard ( void )
159 {
160  if (ARE_YOU_SURE(
161  "Formatting your SD-card image file will cause ALL your data,\n"
162  "system files (etc!) to be lost, forever!\n"
163  "Are you sure to continue this self-destruction sequence? :)"
164  ,
165  0
166  )) {
167  if (!sdcontent_handle(sdcard_get_size(), NULL, SDCONTENT_FORCE_FDISK))
168  INFO_WINDOW("Your SD-card file has been partitioned/formatted\nMEGA65 emulation is about to RESET now!");
169  }
170  reset_mega65();
171 }
172 
173 static char dir_rom[PATH_MAX + 1] = "";
174 
175 static void ui_update_sdcard ( void )
176 {
177  char fnbuf[PATH_MAX + 1];
178  xemu_load_buffer_p = NULL;
179  // Try default ROM
180  snprintf(fnbuf, sizeof fnbuf, "%sMEGA65.ROM", sdl_pref_dir);
181  int ask_rom;
182  if (xemu_os_file_exists(fnbuf))
183  ask_rom = QUESTION_WINDOW("Yes|No", "Use the previously installed ROM?");
184  else
185  ask_rom = 1;
186  if (ask_rom) {
187  if (!*dir_rom)
188  strcpy(dir_rom, sdl_pref_dir);
189  // Select ROM image
192  "Select your ROM image",
193  dir_rom,
194  fnbuf,
195  sizeof fnbuf
196  )) {
197  WARNING_WINDOW("Cannot update: you haven't selected a ROM image");
198  goto ret;
199  }
200  }
201  // Load selected ROM image into memory, also checks the size!
202  if (xemu_load_file(fnbuf, NULL, 0x20000, 0x20000, "Cannot start updating, bad C65/M65 ROM image has been selected!") != 0x20000)
203  goto ret;
204  // Check the loaded ROM: let's warn the user if it's open-ROMs, since it seems users are often confused to think,
205  // that's the right choice for every-day usage.
207  if (rom_date < 0) {
208  if (!ARE_YOU_SURE("Selected ROM cannot be identified as a valid C65/MEGA65 ROM. Are you sure to continue?", ARE_YOU_SURE_DEFAULT_NO)) {
209  INFO_WINDOW("SD-card system files update was aborted by the user.");
210  goto ret;
211  }
212  } else {
213  if (rom_is_openroms) {
214  if (!ARE_YOU_SURE(
215  "Are you sure you want to use Open-ROMs on your SD-card?\n\n"
216  "You've selected a ROM for update which belongs to the\n"
217  "Open-ROMs projects. Please note, that Open-ROMs are not\n"
218  "yet ready for usage by an average user! For general usage\n"
219  "currently, closed-ROMs are recommended! Open-ROMs\n"
220  "currently can be interesting for mostly developers and\n"
221  "for curious minds.",
223  ))
224  goto ret;
225  }
226  if (rom_is_stub) {
227  ERROR_WINDOW(
228  "The selected ROM image is an Xemu-internal ROM image.\n"
229  "This cannot be used to update your emulated SD-card."
230  );
231  goto ret;
232  }
233  }
234  DEBUGPRINT("UI: upgrading SD-card system files, ROM %d (%s)" NL, rom_date, rom_name);
235  // Copy file to the pref'dir (if not the same as the selected file)
236  char fnbuf_target[PATH_MAX];
237  strcpy(fnbuf_target, sdl_pref_dir);
238  strcpy(fnbuf_target + strlen(sdl_pref_dir), MEGA65_ROM_NAME);
239  if (strcmp(fnbuf_target, MEGA65_ROM_NAME)) {
240  DEBUGPRINT("Backing up ROM image %s to %s" NL, fnbuf, fnbuf_target);
241  if (xemu_save_file(
242  fnbuf_target,
244  0x20000,
245  "Cannot save the selected ROM file for the updater"
246  ))
247  goto ret;
248  }
249  // store our character ROM
250  strcpy(fnbuf_target + strlen(sdl_pref_dir), CHAR_ROM_NAME);
251  if (xemu_save_file(
252  fnbuf_target,
253  xemu_load_buffer_p + 0xD000,
255  "Cannot save the extracted CHAR ROM file for the updater"
256  ))
257  goto ret;
258  // Call the updater :)
259  if (!sdcontent_handle(sdcard_get_size(), NULL, SDCONTENT_DO_FILES | SDCONTENT_OVERWRITE_FILES)) {
260  INFO_WINDOW(
261  "System files on your SD-card image seems to be updated successfully.\n"
262  "Next time you may need this function, you can use MEGA65.ROM which is a backup copy of your selected ROM.\n\n"
263  "ROM: %d (%s)\n\n"
264  "Your emulated MEGA65 is about to RESET now!", rom_date, rom_name
265  );
266  }
267  reset_mega65();
269 ret:
270  if (xemu_load_buffer_p) {
271  free(xemu_load_buffer_p);
272  xemu_load_buffer_p = NULL;
273  }
274  // make sure we have the correct detected results again based on the actual memory content,
275  // since we've used the detect function on the to-be-loaded ROM to check
276  rom_detect_date(main_ram + 0x20000);
277 }
278 
279 static void reset_via_hyppo ( void )
280 {
281  if (ARE_YOU_SURE("Are you sure to HYPPO-RESET your emulated machine?", i_am_sure_override | ARE_YOU_SURE_DEFAULT_YES)) {
283  ERROR_WINDOW("Currently in hypervisor mode.\nNot possible to trigger a trap now");
284  }
285 }
286 
287 static void reset_into_custom_rom ( void )
288 {
289  char fnbuf[PATH_MAX + 1];
290  if (!*dir_rom)
291  strcpy(dir_rom, sdl_pref_dir);
292  // Select ROM image
295  "Select ROM image",
296  dir_rom,
297  fnbuf,
298  sizeof fnbuf
299  ))
300  return;
301  if (rom_load_custom(fnbuf)) {
302  if (!reset_mega65_asked())
303  WARNING_WINDOW("You refused reset, loaded ROM can be only activated at the next reset.");
304  }
305 }
306 
307 static void reset_into_utility_menu ( void )
308 {
309  ERROR_WINDOW("Currently there are some problems using this function,\nIt's a known problem. You'll get empty screen after utility selection.\nOnce it's resolved this message will be removed from Xemu");
310  if (reset_mega65_asked()) {
313  hwa_kbd_fake_key(0x20);
314  KBD_RELEASE_KEY(0x75);
315  }
316 }
317 
318 static void reset_into_c64_mode ( void )
319 {
320  if (reset_mega65_asked()) {
323  // we need this, because autoboot disk image would bypass the "go to C64 mode" on 'Commodore key' feature
324  // this call will deny disk access, and re-enable on the READY. state.
327  KBD_PRESS_KEY(0x75); // "MEGA" key is pressed for C64 mode
328  }
329 
330 }
331 
332 static void reset_generic ( void )
333 {
334  if (reset_mega65_asked()) {
335  KBD_RELEASE_KEY(0x75);
336  hwa_kbd_fake_key(0);
337  }
338 }
339 
340 static void reset_into_xemu_stubrom ( void )
341 {
342  if (reset_mega65_asked()) {
345  }
346 }
347 
348 static void reset_into_xemu_initrom ( void )
349 {
350  if (reset_mega65_asked()) {
353  }
354 }
355 
356 static void reset_into_c65_mode_noboot ( void )
357 {
358  if (reset_mega65_asked()) {
362  KBD_RELEASE_KEY(0x75);
363  hwa_kbd_fake_key(0);
364  }
365 }
366 
367 static void ui_cb_use_default_rom ( const struct menu_st *m, int *query )
368 {
369  if (query) {
370  if (!rom_is_overriden)
372  return;
373  }
374  if (rom_is_overriden) {
375  if (reset_mega65_asked()) {
377  }
378  }
379 }
380 
381 #ifdef HAS_UARTMON_SUPPORT
382 static void ui_cb_start_umon ( const struct menu_st *m, int *query )
383 {
384  int is_active = uartmon_is_active();
385  XEMUGUI_RETURN_CHECKED_ON_QUERY(query, is_active);
386  if (is_active) {
387  INFO_WINDOW("UART monitor is already active.\nCurrently stopping it is not supported.");
388  return;
389  }
390  if (!uartmon_init(UMON_DEFAULT_PORT))
391  INFO_WINDOW("UART monitor has been starton on " UMON_DEFAULT_PORT);
392 }
393 #endif
394 
395 static void ui_cb_matrix_mode ( const struct menu_st *m, int *query )
396 {
399 }
400 
401 static void ui_cb_hdos_virt ( const struct menu_st *m, int *query )
402 {
406 }
407 
408 static char last_used_dump_directory[PATH_MAX + 1] = "";
409 
410 static void ui_dump_memory ( void )
411 {
412  char fnbuf[PATH_MAX + 1];
415  "Dump main memory content into file",
416  last_used_dump_directory,
417  fnbuf,
418  sizeof fnbuf
419  )) {
420  dump_memory(fnbuf);
421  }
422 }
423 
424 static void ui_dump_colram ( void )
425 {
426  char fnbuf[PATH_MAX + 1];
429  "Dump colour memory content into file",
430  last_used_dump_directory,
431  fnbuf,
432  sizeof fnbuf
433  )) {
434  xemu_save_file(fnbuf, colour_ram, sizeof colour_ram, "Cannot dump colour RAM content into file");
435  }
436 }
437 
438 static void ui_dump_hyperram ( void )
439 {
440  char fnbuf[PATH_MAX + 1];
443  "Dump hyperRAM content into file",
444  last_used_dump_directory,
445  fnbuf,
446  sizeof fnbuf
447  )) {
448  xemu_save_file(fnbuf, slow_ram, SLOW_RAM_SIZE, "Cannot dump hyperRAM content into file");
449  }
450 }
451 
452 static void ui_emu_info ( void )
453 {
454  char td_stat_str[XEMU_CPU_STAT_INFO_BUFFER_SIZE];
455  xemu_get_timing_stat_string(td_stat_str, sizeof td_stat_str);
456  sha1_hash_str rom_now_hash_str;
457  sha1_checksum_as_string(rom_now_hash_str, main_ram + 0x20000, 0x20000);
458  const char *hdos_root;
459  int hdos_virt = hypervisor_hdos_virtualization_status(-1, &hdos_root);
460  INFO_WINDOW(
461  "DMA chip current revision: %d (F018 rev-%s)\n"
462  "ROM version detected: %d %s (%s,%s)\n"
463  "ROM SHA1: %s (%s)\n"
464  "Last RESET type: %s\n"
465  "Hyppo version: %s (%s)\n"
466  "HDOS virtualization: %s, root = %s\n"
467  "Disk8 = %s\nDisk9 = %s\n"
468  "C64 'CPU' I/O port (low 3 bits): DDR=%d OUT=%d\n"
469  "Current PC: $%04X (linear: $%07X)\n"
470  "Current VIC and I/O mode: %s %s, hot registers are %s\n"
471  "\n"
472  "Xemu host CPU usage so far: %s\n"
473  "Xemu's host OS: %s"
474  ,
475  dma_chip_revision, dma_chip_revision ? "B, new" : "A, old",
476  rom_date, rom_name, rom_is_overriden ? "OVERRIDEN" : "installed", rom_is_external ? "external" : "internal",
477  rom_now_hash_str, strcmp(rom_hash_str, rom_now_hash_str) ? "MANGLED" : "intact",
479  hyppo_version_string, hickup_is_overriden ? "OVERRIDEN" : "built-in",
480  hdos_virt ? "ON" : "OFF", hdos_root,
481  sdcard_get_mount_info(0, NULL), sdcard_get_mount_info(1, NULL),
483  cpu65.pc, memory_cpurd2linear_xlat(cpu65.pc),
484  vic_iomode < 4 ? iomode_names[vic_iomode] : "?INVALID?", videostd_name, (vic_registers[0x5D] & 0x80) ? "enabled" : "disabled",
485  td_stat_str,
487  );
488 }
489 
490 static void ui_put_screen_text_into_paste_buffer ( void )
491 {
492  char text[8192];
493  char *result = xemu_cbm_screen_to_text(
494  text,
495  sizeof text,
496  main_ram + ((vic_registers[0x31] & 0x80) ? (vic_registers[0x18] & 0xE0) << 6 : (vic_registers[0x18] & 0xF0) << 6), // pointer to screen RAM, try to audo-tected: FIXME: works only in bank0!
497  (vic_registers[0x31] & 0x80) ? 80 : 40, // number of columns, try to auto-detect it
498  25, // number of rows
499  (vic_registers[0x18] & 2) // lowercase font? try to auto-detect by checking selected address chargen addr, LSB
500  );
501  if (result == NULL)
502  return;
503  if (*result) {
504  if (SDL_SetClipboardText(result))
505  ERROR_WINDOW("Cannot insert text into the OS paste buffer: %s", SDL_GetError());
506  else
507  OSD(-1, -1, "Copied to OS paste buffer.");
508  } else
509  INFO_WINDOW("Screen is empty, nothing to capture.");
510 }
511 
512 static void ui_put_paste_buffer_into_screen_text ( void )
513 {
514  char *t = SDL_GetClipboardText();
515  if (t == NULL)
516  goto no_clipboard;
517  char *t2 = t;
518  while (*t2 && (*t2 == '\t' || *t2 == '\r' || *t2 == '\n' || *t2 == ' '))
519  t2++;
520  if (!*t2)
521  goto no_clipboard;
523  main_ram + ((vic_registers[0x31] & 0x80) ? (vic_registers[0x18] & 0xE0) << 6 : (vic_registers[0x18] & 0xF0) << 6), // pointer to screen RAM, try to audo-tected: FIXME: works only in bank0!
524  (vic_registers[0x31] & 0x80) ? 80 : 40, // number of columns, try to auto-detect it
525  25, // number of rows
526  t2, // text buffer as input
527  (vic_registers[0x18] & 2) // lowercase font? try to auto-detect by checking selected address chargen addr, LSB
528  );
529  SDL_free(t);
530  return;
531 no_clipboard:
532  if (t)
533  SDL_free(t);
534  ERROR_WINDOW("Clipboard query error, or clipboard was empty");
535 }
536 
537 static void ui_cb_mono_downmix ( const struct menu_st *m, int *query )
538 {
541 }
542 
543 static void ui_cb_audio_volume ( const struct menu_st *m, int *query )
544 {
547 }
548 
549 static void ui_cb_video_standard ( const struct menu_st *m, int *query )
550 {
552  if (VOIDPTR_TO_INT(m->user_data))
553  vic_registers[0x6F] |= 0x80;
554  else
555  vic_registers[0x6F] &= 0x7F;
556  configdb.force_videostd = -1; // turn off possible CLI/config dictated force video mode, otherwise it won't work to change video standard ...
557 }
558 
559 static void ui_cb_video_standard_disallow_change ( const struct menu_st *m, int *query )
560 {
563 }
564 
565 static void ui_cb_fullborders ( const struct menu_st *m, int *query )
566 {
569  vic_readjust_sdl_viewport = 1; // To force readjust viewport on the next frame open.
570 }
571 
572 static void ui_cb_sids_enabled ( const struct menu_st *m, int *query )
573 {
574  const int mask = VOIDPTR_TO_INT(m->user_data);
576  configdb.sidmask ^= mask;
577 }
578 
579 static void ui_cb_render_scale_quality ( const struct menu_st *m, int *query )
580 {
582  char req_str[] = { VOIDPTR_TO_INT(m->user_data) + '0', 0 };
583  SDL_SetHintWithPriority(SDL_HINT_RENDER_SCALE_QUALITY, req_str, SDL_HINT_OVERRIDE);
586 }
587 
588 #if 0
589 static void ui_cb_displayenable ( const struct menu_st *m, int *query )
590 {
591  XEMUGUI_RETURN_CHECKED_ON_QUERY(query, vic_registers[0x11] & 0x10);
592  vic_registers[0x11] ^= 0x10;
593 }
594 #endif
595 
596 
597 /**** MENU SYSTEM ****/
598 
599 
600 static const struct menu_st menu_video_standard[] = {
601  { "Disallow change by programs",XEMUGUI_MENUID_CALLABLE | XEMUGUI_MENUFLAG_SEPARATOR |
602  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_video_standard_disallow_change, NULL },
603  { "PAL @ 50Hz", XEMUGUI_MENUID_CALLABLE |
604  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_video_standard, (void*)0 },
605  { "NTSC @ 60Hz", XEMUGUI_MENUID_CALLABLE |
606  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_video_standard, (void*)1 },
607  { NULL }
608 };
609 static const struct menu_st menu_window_size[] = {
610  // TODO: unfinished work, see: https://github.com/lgblgblgb/xemu/issues/246
611 #if 0
612  { "Fullscreen", XEMUGUI_MENUID_CALLABLE |
614  { "Window - 100%", XEMUGUI_MENUID_CALLABLE |
616  { "Window - 200%", XEMUGUI_MENUID_CALLABLE |
618 #endif
619  { "Fullscreen", XEMUGUI_MENUID_CALLABLE, xemugui_cb_windowsize, (void*)0 },
620  { "Window - 100%", XEMUGUI_MENUID_CALLABLE, xemugui_cb_windowsize, (void*)1 },
621  { "Window - 200%", XEMUGUI_MENUID_CALLABLE, xemugui_cb_windowsize, (void*)2 },
622  { NULL }
623 };
624 static const struct menu_st menu_render_scale_quality[] = {
625  { "Nearest pixel sampling", XEMUGUI_MENUID_CALLABLE |
626  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_render_scale_quality, (void*)0 },
627  { "Linear filtering", XEMUGUI_MENUID_CALLABLE |
628  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_render_scale_quality, (void*)1 },
629  { "Anisotropic (Direct3D only)",XEMUGUI_MENUID_CALLABLE |
630  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_render_scale_quality, (void*)2 },
631  { NULL }
632 };
633 static const struct menu_st menu_display[] = {
634  { "Render scale quality", XEMUGUI_MENUID_SUBMENU, NULL, menu_render_scale_quality },
635  { "Window size / fullscreen", XEMUGUI_MENUID_SUBMENU, NULL, menu_window_size },
636  { "Video standard", XEMUGUI_MENUID_SUBMENU, NULL, menu_video_standard },
637  { "Show full borders", XEMUGUI_MENUID_CALLABLE |
638  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_fullborders, NULL },
639  { "Show drive LED", XEMUGUI_MENUID_CALLABLE |
642 #ifdef XEMU_FILES_SCREENSHOT_SUPPORT
644 #endif
645  { "Screen to OS paste buffer", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_put_screen_text_into_paste_buffer },
646  { "OS paste buffer to screen", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_put_paste_buffer_into_screen_text },
647  { NULL }
648 };
649 static const struct menu_st menu_reset[] = {
650  { "Reset back to default ROM", XEMUGUI_MENUID_CALLABLE |
651  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_use_default_rom, NULL },
652  { "Reset", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_generic },
653  { "Reset without autoboot", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_c65_mode_noboot },
654  { "Reset into utility menu", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_utility_menu },
655  { "Reset into C64 mode", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_c64_mode },
656  { "Reset into Xemu stub-ROM", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_xemu_stubrom },
657  { "Reset into boot init-ROM", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_xemu_initrom },
658  { "Reset via HYPPO", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_via_hyppo },
660  { "Reset/use custom ROM file", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, reset_into_custom_rom },
661  { NULL }
662 };
663 static const struct menu_st menu_inputdevices[] = {
664  { "Enable mouse grab + emu", XEMUGUI_MENUID_CALLABLE |
666  { "Use OSD key debugger", XEMUGUI_MENUID_CALLABLE |
668  { "Cursor keys as joystick", XEMUGUI_MENUID_CALLABLE |
670  { "Swap emulated joystick port",XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, input_toggle_joy_emu },
671 #if 0
672  { "Devices as joy port 2 (vs 1)", XEMUGUI_MENUID_SUBMENU, NULL, menu_joy_devices },
673 #endif
674  { NULL }
675 };
676 static const struct menu_st menu_debug[] = {
677 #ifdef HAS_UARTMON_SUPPORT
678  { "Start umon on " UMON_DEFAULT_PORT,
680  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_start_umon, NULL },
681 #endif
682 #ifdef XEMU_ARCH_WIN
683  { "System console", XEMUGUI_MENUID_CALLABLE |
684  XEMUGUI_MENUFLAG_QUERYBACK, xemugui_cb_sysconsole, NULL },
685 #endif
686  { "Allow freezer trap", XEMUGUI_MENUID_CALLABLE |
688  { "Try external ROM first", XEMUGUI_MENUID_CALLABLE |
690  { "HDOS virtualization", XEMUGUI_MENUID_CALLABLE |
691  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_hdos_virt, NULL },
692 #if 0
693  // removed now, because it's misleading, would require an xemu-restart anyway ...
694  { "mega65.d81 mount from SD", XEMUGUI_MENUID_CALLABLE |
696 #endif
697 #if 0
698  { "Display enable VIC reg", XEMUGUI_MENUID_CALLABLE |
699  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_displayenable, NULL },
700 #endif
702  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_matrix_mode, NULL },
703  { "Emulation state info", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_emu_info },
704 #ifdef HAVE_XEMU_EXEC_API
705  { "Browse system folder", XEMUGUI_MENUID_CALLABLE, xemugui_cb_native_os_prefdir_browser, NULL },
706 #endif
707  { "Dump main RAM info file", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_dump_memory },
708  { "Dump colour RAM into file", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_dump_colram },
709  { "Dump hyperRAM into file", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_dump_hyperram },
710  { NULL }
711 };
712 #ifdef HAVE_XEMU_EXEC_API
713 static const struct menu_st menu_help[] = {
714  { "Xemu MEGA65 help page", XEMUGUI_MENUID_CALLABLE, xemugui_cb_web_help_main, "help" },
715  { "Check update / useful MEGA65 links",
716  XEMUGUI_MENUID_CALLABLE, xemugui_cb_web_help_main, "versioncheck" },
717  { "Xemu download page", XEMUGUI_MENUID_CALLABLE, xemugui_cb_web_help_main, "downloadpage" },
718  { "Download MEGA65 book", XEMUGUI_MENUID_CALLABLE, xemugui_cb_web_help_main, "downloadmega65book" },
719  { NULL }
720 };
721 #endif
722 static const struct menu_st menu_sdcard[] = {
723  { "Re-format SD image", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_format_sdcard },
724  { "Update files on SD image", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_update_sdcard },
725  { NULL }
726 };
727 static const struct menu_st menu_drv8[] = {
728  { "Attach D81", XEMUGUI_MENUID_CALLABLE |
729  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_d81, (void*)0 },
730  { "Attach default D81", XEMUGUI_MENUID_CALLABLE |
731  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_default_d81, (void*)0 },
732  { "Detach D81", XEMUGUI_MENUID_CALLABLE |
733  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_detach_d81, (void*)0 },
734  { "Create and attach new D81", XEMUGUI_MENUID_CALLABLE |
735  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_d81, (void*)(0 | 0x80) },
736  { NULL }
737 };
738 static const struct menu_st menu_drv9[] = {
739  { "Attach D81", XEMUGUI_MENUID_CALLABLE |
740  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_d81, (void*)1 },
741 #if 0
742  // Currently, there is no default disk image for drv9 too much.
743  { "Attach default D81", XEMUGUI_MENUID_CALLABLE |
744  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_default_d81, (void*)1 },
745 #endif
746  { "Detach D81", XEMUGUI_MENUID_CALLABLE |
747  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_detach_d81, (void*)1 },
748  { "Create and attach new D81", XEMUGUI_MENUID_CALLABLE |
749  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_attach_d81, (void*)(1 | 0x80) },
750  { NULL }
751 };
752 static const struct menu_st menu_disks[] = {
753  { "Drive-8", XEMUGUI_MENUID_SUBMENU, NULL, menu_drv8 },
754  { "Drive-9", XEMUGUI_MENUID_SUBMENU, NULL, menu_drv9 },
755  { "SD-card", XEMUGUI_MENUID_SUBMENU, NULL, menu_sdcard },
756  { NULL }
757 };
758 static const struct menu_st menu_audio_stereo[] = {
759  { "Hard stereo separation", XEMUGUI_MENUID_CALLABLE |
760  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 100 },
761  { "Stereo separation 80%", XEMUGUI_MENUID_CALLABLE |
762  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 80 },
763  { "Stereo separation 60%", XEMUGUI_MENUID_CALLABLE |
764  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 60 },
765  { "Stereo separation 40%", XEMUGUI_MENUID_CALLABLE |
766  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 40 },
767  { "Stereo separation 20%", XEMUGUI_MENUID_CALLABLE |
768  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 20 },
769  { "Full mono downmix (0%)", XEMUGUI_MENUID_CALLABLE |
770  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) 0 },
771  { "Stereo separation -20%", XEMUGUI_MENUID_CALLABLE |
772  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) -20 },
773  { "Stereo separation -40%", XEMUGUI_MENUID_CALLABLE |
774  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) -40 },
775  { "Stereo separation -60%", XEMUGUI_MENUID_CALLABLE |
776  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) -60 },
777  { "Stereo separation -80%", XEMUGUI_MENUID_CALLABLE |
778  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*) -80 },
779  { "Hard stereo - reserved", XEMUGUI_MENUID_CALLABLE |
780  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_mono_downmix, (void*)-100 },
781  { NULL }
782 };
783 static const struct menu_st menu_audio_volume[] = {
784  { "100%", XEMUGUI_MENUID_CALLABLE |
785  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 100 },
786  { "90%", XEMUGUI_MENUID_CALLABLE |
787  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 90 },
788  { "80%", XEMUGUI_MENUID_CALLABLE |
789  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 80 },
790  { "70%", XEMUGUI_MENUID_CALLABLE |
791  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 70 },
792  { "60%", XEMUGUI_MENUID_CALLABLE |
793  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 60 },
794  { "50%", XEMUGUI_MENUID_CALLABLE |
795  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 50 },
796  { "40%", XEMUGUI_MENUID_CALLABLE |
797  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 40 },
798  { "30%", XEMUGUI_MENUID_CALLABLE |
799  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 30 },
800  { "20%", XEMUGUI_MENUID_CALLABLE |
801  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 20 },
802  { "10%", XEMUGUI_MENUID_CALLABLE |
803  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_audio_volume, (void*) 10 },
804  { NULL }
805 };
806 static const struct menu_st menu_audio_sids[] = {
807  { "SID @ $D400", XEMUGUI_MENUID_CALLABLE |
808  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_sids_enabled, (void*)1 },
809  { "SID @ $D420", XEMUGUI_MENUID_CALLABLE |
810  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_sids_enabled, (void*)2 },
811  { "SID @ $D440", XEMUGUI_MENUID_CALLABLE |
812  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_sids_enabled, (void*)4 },
813  { "SID @ SD460", XEMUGUI_MENUID_CALLABLE |
814  XEMUGUI_MENUFLAG_QUERYBACK, ui_cb_sids_enabled, (void*)8 },
815  { NULL }
816 };
817 static const struct menu_st menu_audio[] = {
818  { "Audio output", XEMUGUI_MENUID_CALLABLE |
820  { "OPL3 emulation", XEMUGUI_MENUID_CALLABLE |
823  { "Emulated SIDs", XEMUGUI_MENUID_SUBMENU, NULL, menu_audio_sids },
824  { "Stereo separation", XEMUGUI_MENUID_SUBMENU, NULL, menu_audio_stereo },
825  { "Master volume", XEMUGUI_MENUID_SUBMENU, NULL, menu_audio_volume },
826  { NULL }
827 };
828 static const struct menu_st menu_config[] = {
829  { "Confirmation on exit/reset", XEMUGUI_MENUID_CALLABLE | XEMUGUI_MENUFLAG_SEPARATOR |
831  //{ "Load saved default config",XEMUGUI_MENUID_CALLABLE, xemugui_cb_cfgfile, (void*)XEMUGUICFGFILEOP_LOAD_DEFAULT },
832  { "Save config as default", XEMUGUI_MENUID_CALLABLE, xemugui_cb_cfgfile, (void*)XEMUGUICFGFILEOP_SAVE_DEFAULT },
833  //{ "Load saved custom config", XEMUGUI_MENUID_CALLABLE, xemugui_cb_cfgfile, (void*)XEMUGUICFGFILEOP_LOAD_CUSTOM },
834  { "Save config as custom file", XEMUGUI_MENUID_CALLABLE, xemugui_cb_cfgfile, (void*)XEMUGUICFGFILEOP_SAVE_CUSTOM },
835  { NULL }
836 };
837 static const struct menu_st menu_main[] = {
838  { "Display", XEMUGUI_MENUID_SUBMENU, NULL, menu_display },
839  { "Input devices", XEMUGUI_MENUID_SUBMENU, NULL, menu_inputdevices },
840  { "Audio", XEMUGUI_MENUID_SUBMENU, NULL, menu_audio },
841  { "Disks", XEMUGUI_MENUID_SUBMENU, NULL, menu_disks },
842  { "Reset / ROM switching", XEMUGUI_MENUID_SUBMENU, NULL, menu_reset },
843  { "Debug / Advanced", XEMUGUI_MENUID_SUBMENU, NULL, menu_debug },
844  { "Configuration", XEMUGUI_MENUID_SUBMENU, NULL, menu_config },
845 #ifdef HAVE_XEMU_EXEC_API
846  { "Help (online)", XEMUGUI_MENUID_SUBMENU, NULL, menu_help },
847 #endif
848  { "Run PRG directly", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_run_prg_by_browsing },
849 #ifdef CBM_BASIC_TEXT_SUPPORT
850  { "Save BASIC as text", XEMUGUI_MENUID_CALLABLE, xemugui_cb_call_user_data, ui_save_basic_as_text },
851 #endif
854  { NULL }
855 };
856 
857 
858 void ui_enter ( void )
859 {
860  DEBUGGUI("UI: handler has been called." NL);
861  if (xemugui_popup(menu_main)) {
862  DEBUGPRINT("UI: oops, POPUP does not worked :(" NL);
863  }
864 }
sdcard_get_mount_info
const char * sdcard_get_mount_info(const int unit, int *is_internal)
Definition: sdcard.c:917
rom_is_openroms
int rom_is_openroms
Definition: rom.c:28
xemugui_cb_toggle_int_inverted
void xemugui_cb_toggle_int_inverted(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:193
ARE_YOU_SURE_DEFAULT_NO
#define ARE_YOU_SURE_DEFAULT_NO
Definition: emutools.h:126
reset_mega65_cpu_only
void reset_mega65_cpu_only(void)
Definition: mega65.c:521
basic_text.h
vic4.h
CHAR_ROM_SIZE
#define CHAR_ROM_SIZE
Definition: mega65.h:36
configdb.h
stereo_separation
int stereo_separation
Definition: audio65.c:34
menu_st
Definition: emutools_gui.h:65
text
const char * text
Definition: basic_text.c:391
rom_date
int rom_date
Definition: dma65.c:55
rom_unset_requests
void rom_unset_requests(void)
Definition: rom.c:58
emutools.h
sha1_hash_str
char sha1_hash_str[41]
Definition: emutools.h:237
sdcard_force_external_mount
int sdcard_force_external_mount(const int unit, const char *filename, const char *cry)
Definition: sdcard.c:925
f011_core.h
rom_detect_date
void rom_detect_date(const Uint8 *rom)
Definition: rom.c:82
rom_hash_str
sha1_hash_str rom_hash_str
Definition: rom.c:30
input_devices.h
xemu_os_file_exists
int xemu_os_file_exists(const char *fn)
Definition: emutools.c:1725
menu_st::user_data
const void * user_data
Definition: emutools_gui.h:69
xemugui_file_selector
int xemugui_file_selector(int dialog_mode, const char *dialog_title, char *default_dir, char *selected, int path_max_size)
Definition: emutools_gui.c:126
xemugui_popup
int xemugui_popup(const struct menu_st desc[])
Definition: emutools_gui.c:135
i_am_sure_override
int i_am_sure_override
Definition: emutools.c:74
rom_load_custom
int rom_load_custom(const char *fn)
Definition: rom.c:240
configdb_st::sidmask
int sidmask
Definition: configdb.h:104
vic_readjust_sdl_viewport
int vic_readjust_sdl_viewport
Definition: vic4.c:89
xemugui_cb_osd_key_debugger
void xemugui_cb_osd_key_debugger(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:169
WARNING_WINDOW
#define WARNING_WINDOW(...)
Definition: xep128.h:115
videostd_name
const char * videostd_name
Definition: vic4.c:83
rom_is_stub
int rom_is_stub
Definition: rom.c:29
colour_ram
Uint8 colour_ram[0x8000]
Definition: memory_mapper.c:65
INFO_WINDOW
#define INFO_WINDOW(...)
Definition: xep128.h:114
fn
const char * fn
Definition: roms.c:42
matrix_mode.h
SLOW_RAM_SIZE
#define SLOW_RAM_SIZE
Definition: memory_mapper.h:44
XEMUGUI_MENUID_CALLABLE
#define XEMUGUI_MENUID_CALLABLE
Definition: emutools_gui.h:30
inject_register_allow_disk_access
void inject_register_allow_disk_access(void)
Definition: inject.c:132
emutools_gui.h
xemugui_cb_set_mouse_grab
void xemugui_cb_set_mouse_grab(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:176
mega65.h
reset_mega65
void reset_mega65(void)
Definition: mega65.c:492
rom_initrom_requested
int rom_initrom_requested
Definition: rom.c:33
configdb_st::fullborders
int fullborders
Definition: configdb.h:71
xemu_cbm_text_to_screen
int xemu_cbm_text_to_screen(Uint8 *v, const int cols, const int rows, const char *buffer, const int lowercase)
Definition: basic_text.c:475
memory_cpurd2linear_xlat
int memory_cpurd2linear_xlat(Uint16 cpu_addr)
Definition: memory_mapper.c:966
xemu_get_uname_string
const char * xemu_get_uname_string(void)
Definition: emutools.c:468
sdcontent.h
hwa_kbd_fake_key
void hwa_kbd_fake_key(Uint8 k)
Definition: input_devices.c:96
rom_from_prefdir_allowed
int rom_from_prefdir_allowed
Definition: rom.c:34
hypervisor_hdos_virtualization_status
int hypervisor_hdos_virtualization_status(const int set, const char **root_ptr)
Definition: hdos.c:829
XEMUGUI_FSEL_FLAG_STORE_DIR
#define XEMUGUI_FSEL_FLAG_STORE_DIR
Definition: emutools_gui.h:28
Uint8
uint8_t Uint8
Definition: fat32.c:51
sha1_checksum_as_string
void sha1_checksum_as_string(sha1_hash_str hash_str, const Uint8 *data, Uint32 size)
Definition: emutools.c:1853
inject.h
main_ram
Uint8 main_ram[512<< 10]
Definition: memory_mapper.c:47
configdb_st::sdlrenderquality
int sdlrenderquality
Definition: configdb.h:35
dma_chip_revision
int dma_chip_revision
Definition: dma65.c:53
sdcard_unmount
int sdcard_unmount(const int unit)
Definition: sdcard.c:959
sdcard_get_size
Uint32 sdcard_get_size(void)
Definition: sdcard.c:305
rom_is_external
int rom_is_external
Definition: rom.c:36
XEMUGUI_MENUFLAG_QUERYBACK
#define XEMUGUI_MENUFLAG_QUERYBACK
Definition: emutools_gui.h:40
drive
char * drive
Definition: commodore_geos.c:151
hyppo_version_string
char hyppo_version_string[64]
Definition: hypervisor.c:41
XEMUGUI_FSEL_SAVE
#define XEMUGUI_FSEL_SAVE
Definition: emutools_gui.h:27
emutools_files.h
memory_get_cpu_io_port
Uint8 memory_get_cpu_io_port(int addr)
Definition: memory_mapper.c:763
audio_volume
int audio_volume
Definition: audio65.c:35
DEBUGPRINT
#define DEBUGPRINT(...)
Definition: emutools_basicdefs.h:171
xemu_save_file
int xemu_save_file(const char *filename_in, void *data, int size, const char *cry)
Definition: emutools_files.c:622
VOIDPTR_TO_INT
#define VOIDPTR_TO_INT(x)
Definition: emutools_basicdefs.h:270
dump_memory
int dump_memory(const char *fn)
Definition: commodore_65.c:754
dir
DIR * dir
Definition: cpmfs.c:46
ERROR_WINDOW
#define ERROR_WINDOW(...)
Definition: xep128.h:116
memory_mapper.h
in_the_matrix
int in_the_matrix
Definition: matrix_mode.c:39
matrix_mode_toggle
void matrix_mode_toggle(int status)
Definition: matrix_mode.c:518
AUDIO_UNCHANGED_VOLUME
#define AUDIO_UNCHANGED_VOLUME
Definition: audio65.h:39
uart_monitor.h
videostd_id
Uint8 videostd_id
Definition: vic4.c:82
configdb_st::force_videostd
int force_videostd
Definition: configdb.h:69
sdcard_force_external_mount_with_image_creation
int sdcard_force_external_mount_with_image_creation(const int unit, const char *filename, const int do_overwrite, const char *cry)
Definition: sdcard.c:951
vic4_disallow_video_std_change
int vic4_disallow_video_std_change
Definition: vic4.c:90
NL
#define NL
Definition: fat32.c:37
hypervisor.h
xemugui_cb_set_integer_to_one
void xemugui_cb_set_integer_to_one(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:187
configdb
struct configdb_st configdb
Definition: configdb.c:34
XEMUGUI_FSEL_OPEN
#define XEMUGUI_FSEL_OPEN
Definition: emutools_gui.h:26
hid_joy_on_cursor_keys
int hid_joy_on_cursor_keys
Definition: emutools_hid.c:35
configdb_st::allowfreezer
int allowfreezer
Definition: configdb.h:74
slow_ram
Uint8 slow_ram[SLOW_RAM_SIZE]
Definition: memory_mapper.c:77
xemu_load_file
int xemu_load_file(const char *filename, void *store_to, int min_size, int max_size, const char *cry)
Definition: emutools_files.c:674
rom.h
cpu65.h
xemu_load_buffer_p
void * xemu_load_buffer_p
Definition: emutools_files.c:34
configdb_st::show_drive_led
int show_drive_led
Definition: configdb.h:73
rom_stubrom_requested
int rom_stubrom_requested
Definition: rom.c:32
xemu_get_timing_stat_string
void xemu_get_timing_stat_string(char *buf, unsigned int size)
Definition: emutools.c:538
ARE_YOU_SURE_DEFAULT_YES
#define ARE_YOU_SURE_DEFAULT_YES
Definition: emutools.h:125
hid_set_autoreleased_key
void hid_set_autoreleased_key(int key)
Definition: emutools_hid.c:66
size
int size
Definition: inject.c:37
emu_dropfile_callback
void emu_dropfile_callback(const char *fn)
Definition: primo.c:675
ARE_YOU_SURE
int ARE_YOU_SURE(const char *s, int flags)
Definition: emutools.c:1202
iomode_names
const char * iomode_names[4]
Definition: vic4.c:37
xemugui_cb_toggle_int
void xemugui_cb_toggle_int(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:199
status
enum @26::@29 status
KBD_RELEASE_KEY
#define KBD_RELEASE_KEY(a)
Definition: emutools_hid.h:47
sdcard.h
reset_mega65_asked
int reset_mega65_asked(void)
Definition: mega65.c:537
vic_iomode
int vic_iomode
Definition: vic4.c:44
audio_set_stereo_parameters
void audio_set_stereo_parameters(int vol, int sep)
Definition: audio65.c:217
OSD
#define OSD(...)
Definition: xep128.h:100
audio65_clear_regs
void audio65_clear_regs(void)
Definition: audio65.c:338
inject_register_prg
int inject_register_prg(const char *prg_fn, int prg_mode)
Definition: inject.c:140
XEMUGUI_MENUID_SUBMENU
#define XEMUGUI_MENUID_SUBMENU
Definition: emutools_gui.h:31
rom_is_overriden
int rom_is_overriden
Definition: rom.c:35
mask
int mask
Definition: dma65.c:83
XEMUGUI_RETURN_CHECKED_ON_QUERY
#define XEMUGUI_RETURN_CHECKED_ON_QUERY(query, status)
Definition: emutools_gui.h:55
rom_name
const char * rom_name
Definition: rom.c:45
xemugui_cb_call_quit_if_sure
void xemugui_cb_call_quit_if_sure(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:79
xemugui_cb_call_user_data
void xemugui_cb_call_user_data(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:29
input_toggle_joy_emu
void input_toggle_joy_emu(void)
Definition: input_devices.c:209
emutools_hid.h
xemu_cbm_screen_to_text
char * xemu_cbm_screen_to_text(char *buffer, const int buffer_size, const Uint8 *v, const int cols, const int rows, const int lowercase)
Definition: basic_text.c:419
dma65.h
XEMU_CPU_STAT_INFO_BUFFER_SIZE
#define XEMU_CPU_STAT_INFO_BUFFER_SIZE
Definition: emutools.h:65
xemugui_cb_windowsize
void xemugui_cb_windowsize(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:97
CHAR_ROM_NAME
#define CHAR_ROM_NAME
Definition: mega65.h:35
XEMUGUI_MENUFLAG_HIDDEN
#define XEMUGUI_MENUFLAG_HIDDEN
Definition: emutools_gui.h:42
QUESTION_WINDOW
#define QUESTION_WINDOW(items, msg)
Definition: xep128.h:124
last_reset_type
const char * last_reset_type
Definition: mega65.c:86
configdb_st::noopl3
int noopl3
Definition: configdb.h:103
xemugui_cb_about_window
void xemugui_cb_about_window(const struct menu_st *m, int *query)
Definition: popular_user_funcs.c:53
sdl_pref_dir
char * sdl_pref_dir
Definition: emutools.c:97
register_new_texture_creation
int register_new_texture_creation
Definition: emutools.c:84
ui_enter
void ui_enter(void)
Definition: ui.c:326
ui.h
configdb_st::defd81fromsd
int defd81fromsd
Definition: configdb.h:48
vic_registers
Uint8 vic_registers[0x80]
Definition: vic4.c:43
registered_screenshot_request
int registered_screenshot_request
Definition: mega65.c:83
KBD_PRESS_KEY
#define KBD_PRESS_KEY(a)
Definition: emutools_hid.h:46
MEGA65_ROM_NAME
#define MEGA65_ROM_NAME
Definition: mega65.h:33
audio65.h
c64_kbd_mapping.h
configdb_st::nosound
int nosound
Definition: configdb.h:102
hickup_is_overriden
int hickup_is_overriden
Definition: hypervisor.c:42
DEBUGGUI
#define DEBUGGUI
Definition: emutools_gui.h:22
hypervisor_level_reset
int hypervisor_level_reset(void)
Definition: hypervisor.c:300
XEMUGUI_MENUFLAG_SEPARATOR
#define XEMUGUI_MENUFLAG_SEPARATOR
Definition: emutools_gui.h:38
sdcard_default_d81_mount
int sdcard_default_d81_mount(const int unit)
Definition: sdcard.c:821