Added some debugging code
This commit is contained in:
parent
b97d7b7af8
commit
6557728cd2
6 changed files with 64 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,3 +21,4 @@ kickstarts/*.rom
|
|||
*.idx
|
||||
*.dat
|
||||
Amiberry/VisualGDB/Debug/Amiberry
|
||||
Amiberry/VisualGDB/Release/Amiberry
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<AdditionalIncludeDirectories>../../src;../../src/include;../../src/od-pandora;../../src/td-sdl;=/opt/vc/include;=/opt/vc/include/interface/vmcs_host/linux;=/opt/vc/include/interface/vcos/pthreads;=/usr/include/SDL;=/usr/include/libxml2;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG=1;RELEASE=1;_REENTRANT;RASPBERRY;CAPSLOCK_DEBIAN_WORKAROUND;ARMV6T2;PICASSO96;USE_ARMNEON;CPU_arm;ARMV6_ASSEMBLY;PANDORA;WITH_INGAME_WARNING;USE_SDL;ROM_PATH_PREFIX=\"./\";DATA_PREFIX=\"./data/\";SAVE_PREFIX=\"./saves/\";GCCCONSTFUNC="__attribute__((const))";%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions>-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard %(AdditionalOptions)</AdditionalOptions>
|
||||
<OmitFramePointer>true</OmitFramePointer>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
|
|
|
@ -3188,7 +3188,9 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
int roms[] = { 6, 7, 8, 9, 10, 14, 5, 4, 3, 2, 1, -1 };
|
||||
TCHAR zero = 0;
|
||||
struct zfile *f;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running reset_inputdevice_config...\n");
|
||||
#endif
|
||||
reset_inputdevice_config (p);
|
||||
memset (p, 0, sizeof (struct uae_prefs));
|
||||
_tcscpy (p->description, _T("UAE default configuration"));
|
||||
|
@ -3272,19 +3274,11 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
_tcscpy (p->floppyslots[2].df, _T(""));
|
||||
_tcscpy (p->floppyslots[3].df, _T(""));
|
||||
|
||||
#if 0
|
||||
// Choose automatically first rom.
|
||||
if (lstAvailableROMs.size() >= 1)
|
||||
{
|
||||
strncpy(currprefs.romfile,lstAvailableROMs[0]->Path,255);
|
||||
//_tcscpy(currprefs.romfile,lstAvailableROMs[0]->Path,255);
|
||||
}
|
||||
else
|
||||
_tcscpy (p->romfile, _T("kick.rom"));
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running configure_rom...\n");
|
||||
#endif
|
||||
configure_rom (p, roms, 0);
|
||||
|
||||
|
||||
_tcscpy (p->romextfile, _T(""));
|
||||
_tcscpy (p->flashfile, _T(""));
|
||||
|
||||
|
@ -3325,12 +3319,21 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
|
||||
p->key_for_menu = SDLK_F12;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running inputdevice_default_prefs...\n");
|
||||
#endif
|
||||
inputdevice_default_prefs (p);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running blkdev_default_prefs...\n");
|
||||
#endif
|
||||
blkdev_default_prefs (p);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running target_default_options...\n");
|
||||
#endif
|
||||
target_default_options (p, type);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running zfile_fclose...\n");
|
||||
#endif
|
||||
zfile_fclose (default_file);
|
||||
default_file = NULL;
|
||||
f = zfile_fopen_empty (NULL, _T("configstore"));
|
||||
|
|
|
@ -725,6 +725,9 @@ static void set_kbr_default (struct uae_prefs *p, int index, int devnum, struct
|
|||
uae_u32 scancode;
|
||||
|
||||
if (!trans)
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: trans was false, returning...\n");
|
||||
#endif
|
||||
return;
|
||||
for (j = 0; j < MAX_INPUT_DEVICES; j++) {
|
||||
if (devnum >= 0 && devnum != j)
|
||||
|
@ -739,6 +742,9 @@ static void set_kbr_default (struct uae_prefs *p, int index, int devnum, struct
|
|||
for (i = 0; i < id->get_widget_num (j); i++) {
|
||||
id->get_widget_type (j, i, 0, &scancode);
|
||||
kbr->extra[i] = scancode;
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Calling set_kbr_default_event...\n");
|
||||
#endif
|
||||
set_kbr_default_event (kbr, trans, i);
|
||||
}
|
||||
}
|
||||
|
@ -751,6 +757,9 @@ static void inputdevice_default_kb (struct uae_prefs *p, int num)
|
|||
if (p->jports[0].id != JPORT_CUSTOM || p->jports[1].id != JPORT_CUSTOM)
|
||||
reset_inputdevice_slot (p, num);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running set_kbr_default...\n");
|
||||
#endif
|
||||
set_kbr_default (p, num, -1, keyboard_default);
|
||||
}
|
||||
static void inputdevice_default_kb_all (struct uae_prefs *p)
|
||||
|
@ -4578,6 +4587,9 @@ void inputdevice_devicechange (struct uae_prefs *prefs)
|
|||
// set default prefs to all input configuration settings
|
||||
void inputdevice_default_prefs (struct uae_prefs *p)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running inputdevice_init...\n");
|
||||
#endif
|
||||
inputdevice_init ();
|
||||
|
||||
p->input_selected_setting = GAMEPORT_INPUT_SETTINGS;
|
||||
|
@ -4595,6 +4607,9 @@ void inputdevice_default_prefs (struct uae_prefs *p)
|
|||
p->input_autofire_linecnt = 8 * 312;
|
||||
p->input_keyboard_type = 0;
|
||||
keyboard_default = keyboard_default_table[p->input_keyboard_type];
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Running inputdevice_default_kb_all...\n");
|
||||
#endif
|
||||
inputdevice_default_kb_all (p);
|
||||
}
|
||||
|
||||
|
|
30
src/main.cpp
30
src/main.cpp
|
@ -622,24 +622,39 @@ void virtualdevice_init (void)
|
|||
|
||||
static int real_main2 (int argc, TCHAR **argv)
|
||||
{
|
||||
printf("Uae4arm v0.5 for Raspberry Pi by Chips\n");
|
||||
printf("Uae4arm v0.5 for Raspberry Pi by Dimitris (MiDWaN) Panokostas\n");
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
SDL_Init(SDL_INIT_NOPARACHUTE | SDL_INIT_VIDEO);
|
||||
#else
|
||||
#ifdef USE_SDL
|
||||
SDL_Init(SDL_INIT_NOPARACHUTE | SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
|
||||
if (SDL_Init(SDL_INIT_NOPARACHUTE | SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0)
|
||||
{
|
||||
printf("SDL could not initialize! SDL_Error: %s\n", SDL_GetError());
|
||||
abort();
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: setting keyboard mapping...\n");
|
||||
#endif
|
||||
keyboard_settrans();
|
||||
|
||||
if (restart_config[0]) {
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: setting default prefs...\n");
|
||||
#endif
|
||||
default_prefs (&currprefs, 0);
|
||||
fixup_prefs (&currprefs);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Checking graphics_setup()...\n");
|
||||
#endif
|
||||
if (! graphics_setup ()) {
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: graphics_setup() failed...\n");
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
|
@ -648,7 +663,13 @@ static int real_main2 (int argc, TCHAR **argv)
|
|||
else
|
||||
currprefs = changed_prefs;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Checking machdep_init()...\n");
|
||||
#endif
|
||||
if (!machdep_init ()) {
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: machdep_init() failed...\n");
|
||||
#endif
|
||||
restart_program = 0;
|
||||
return -1;
|
||||
}
|
||||
|
@ -669,6 +690,9 @@ static int real_main2 (int argc, TCHAR **argv)
|
|||
no_gui = 0;
|
||||
restart_program = 0;
|
||||
if (! no_gui) {
|
||||
#ifdef DEBUG
|
||||
printf("DEBUG: Attempting to initialize GUI...\n");
|
||||
#endif
|
||||
int err = gui_init ();
|
||||
currprefs = changed_prefs;
|
||||
if (err == -1) {
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace sdl
|
|||
#if defined (RASPBERRY)
|
||||
const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo ();
|
||||
printf("Current resolution: %d x %d %d bpp\n",videoInfo->current_w, videoInfo->current_h, videoInfo->vfmt->BitsPerPixel);
|
||||
gui_screen = SDL_SetVideoMode(videoInfo->current_w, videoInfo->current_h, 16, SDL_SWSURFACE | SDL_FULLSCREEN);
|
||||
gui_screen = SDL_SetVideoMode(videoInfo->current_w, videoInfo->current_h, videoInfo->vfmt->BitsPerPixel, SDL_SWSURFACE | SDL_FULLSCREEN);
|
||||
#else
|
||||
gui_screen = SDL_SetVideoMode(GUI_WIDTH, GUI_HEIGHT, 16, SDL_SWSURFACE);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue