Merge latest TomB version as of 12 Mai 06
This commit is contained in:
parent
e5df4fff90
commit
a33d65dcda
32 changed files with 25926 additions and 44451 deletions
|
@ -37,7 +37,7 @@ static NavigationMap navMap[] =
|
|||
{ "Display", "sldWidth", "sldWidth", "Hard drives", "Sound" },
|
||||
{ "Sound", "sndDisable", "sndDisable", "Display", "Input" },
|
||||
{ "Input", "cboCtrlConfig", "cboCtrlConfig", "Sound", "Miscellaneous" },
|
||||
{ "Miscellaneous", "Status Line", "Status Line", "Input", "Savestates" },
|
||||
{ "Miscellaneous", "StatusLine", "StatusLine", "Input", "Savestates" },
|
||||
{ "Savestates", "State0", "State0", "Miscellaneous", "Reset" },
|
||||
{ "Reset", "Start", "Quit", "Savestates", "Paths" },
|
||||
{ "Quit", "Reset", "Start", "Savestates", "Paths" },
|
||||
|
@ -216,8 +216,9 @@ static NavigationMap navMap[] =
|
|||
#endif
|
||||
|
||||
// PanelMisc
|
||||
{ "Status Line", "Miscellaneous", "Miscellaneous", "BSDSocket", "ShowGUI" },
|
||||
{ "ShowGUI", "Miscellaneous", "Miscellaneous", "Status Line", "BSDSocket" },
|
||||
{ "StatusLine", "Miscellaneous", "Miscellaneous", "BSDSocket", "HideIdle" },
|
||||
{ "HideIdle", "Miscellaneous", "Miscellaneous", "StatusLine", "ShowGUI" },
|
||||
{ "ShowGUI", "Miscellaneous", "Miscellaneous", "HideIdle", "BSDSocket" },
|
||||
{ "BSDSocket", "Miscellaneous", "Miscellaneous", "ShowGUI", "Status Line" },
|
||||
|
||||
// PanelSavestate
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
|
||||
static gcn::UaeCheckBox* chkStatusLine;
|
||||
static gcn::UaeCheckBox* chkHideIdleLed;
|
||||
static gcn::UaeCheckBox* chkShowGUI;
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
static gcn::Label* lblPandoraSpeed;
|
||||
|
@ -38,6 +39,9 @@ class MiscActionListener : public gcn::ActionListener
|
|||
if (actionEvent.getSource() == chkStatusLine)
|
||||
changed_prefs.leds_on_screen = chkStatusLine->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkHideIdleLed)
|
||||
changed_prefs.pandora_hide_idle_led = chkHideIdleLed->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == chkShowGUI)
|
||||
changed_prefs.start_gui = chkShowGUI->isSelected();
|
||||
|
||||
|
@ -67,8 +71,13 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
miscActionListener = new MiscActionListener();
|
||||
|
||||
chkStatusLine = new gcn::UaeCheckBox("Status Line");
|
||||
chkStatusLine->setId("StatusLine");
|
||||
chkStatusLine->addActionListener(miscActionListener);
|
||||
|
||||
chkHideIdleLed = new gcn::UaeCheckBox("Hide idle led");
|
||||
chkHideIdleLed->setId("HideIdle");
|
||||
chkHideIdleLed->addActionListener(miscActionListener);
|
||||
|
||||
chkShowGUI = new gcn::UaeCheckBox("Show GUI on startup");
|
||||
chkShowGUI->setId("ShowGUI");
|
||||
chkShowGUI->addActionListener(miscActionListener);
|
||||
|
@ -94,6 +103,8 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
int posY = DISTANCE_BORDER;
|
||||
category.panel->add(chkStatusLine, DISTANCE_BORDER, posY);
|
||||
posY += chkStatusLine->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(chkHideIdleLed, DISTANCE_BORDER, posY);
|
||||
posY += chkHideIdleLed->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(chkShowGUI, DISTANCE_BORDER, posY);
|
||||
posY += chkShowGUI->getHeight() + DISTANCE_NEXT_Y;
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
|
@ -104,6 +115,7 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
#endif
|
||||
category.panel->add(chkBSDSocket, DISTANCE_BORDER, posY);
|
||||
posY += chkBSDSocket->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
RefreshPanelMisc();
|
||||
}
|
||||
|
||||
|
@ -111,6 +123,7 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
void ExitPanelMisc(void)
|
||||
{
|
||||
delete chkStatusLine;
|
||||
delete chkHideIdleLed;
|
||||
delete chkShowGUI;
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
delete lblPandoraSpeed;
|
||||
|
@ -127,6 +140,7 @@ void RefreshPanelMisc(void)
|
|||
char tmp[20];
|
||||
|
||||
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
|
||||
chkHideIdleLed->setSelected(changed_prefs.pandora_hide_idle_led);
|
||||
chkShowGUI->setSelected(changed_prefs.start_gui);
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
sldPandoraSpeed->setValue(changed_prefs.pandora_cpu_speed);
|
||||
|
|
|
@ -136,6 +136,7 @@ static bool slow_mouse = false;
|
|||
|
||||
static bool cpuSpeedChanged = false;
|
||||
static int lastCpuSpeed = 600;
|
||||
int defaultCpuSpeed = 600;
|
||||
|
||||
|
||||
extern "C" int main( int argc, char *argv[] );
|
||||
|
@ -311,8 +312,9 @@ void target_default_options (struct uae_prefs *p, int type)
|
|||
{
|
||||
p->pandora_horizontal_offset = 0;
|
||||
p->pandora_vertical_offset = 0;
|
||||
p->pandora_cpu_speed = 600;
|
||||
|
||||
p->pandora_cpu_speed = defaultCpuSpeed;
|
||||
p->pandora_hide_idle_led = 0;
|
||||
|
||||
p->pandora_joyConf = 0;
|
||||
p->pandora_joyPort = 2;
|
||||
p->pandora_tapDelay = 10;
|
||||
|
@ -346,6 +348,7 @@ void target_default_options (struct uae_prefs *p, int type)
|
|||
void target_save_options (struct zfile *f, struct uae_prefs *p)
|
||||
{
|
||||
cfgfile_write (f, "pandora.cpu_speed", "%d", p->pandora_cpu_speed);
|
||||
cfgfile_write (f, "pandora.hide_idle_led", "%d", p->pandora_hide_idle_led);
|
||||
cfgfile_write (f, "pandora.joy_conf", "%d", p->pandora_joyConf);
|
||||
cfgfile_write (f, "pandora.joy_port", "%d", p->pandora_joyPort);
|
||||
cfgfile_write (f, "pandora.tap_delay", "%d", p->pandora_tapDelay);
|
||||
|
@ -378,6 +381,7 @@ TCHAR *target_expand_environment (const TCHAR *path)
|
|||
int target_parse_option (struct uae_prefs *p, const char *option, const char *value)
|
||||
{
|
||||
int result = (cfgfile_intval (option, value, "cpu_speed", &p->pandora_cpu_speed, 1)
|
||||
|| cfgfile_intval (option, value, "hide_idle_led", &p->pandora_hide_idle_led, 1)
|
||||
|| cfgfile_intval (option, value, "joy_conf", &p->pandora_joyConf, 1)
|
||||
|| cfgfile_intval (option, value, "joy_port", &p->pandora_joyPort, 1)
|
||||
|| cfgfile_intval (option, value, "tap_delay", &p->pandora_tapDelay, 1)
|
||||
|
@ -748,38 +752,49 @@ void setCpuSpeed()
|
|||
system("sudo /usr/pandora/scripts/op_lcdrate.sh 50");
|
||||
}
|
||||
}
|
||||
int getDefaultCpuSpeed(void)
|
||||
{
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
int speed = 600;
|
||||
FILE* f = fopen ("/etc/pandora/conf/cpu.conf", "rt");
|
||||
if(f)
|
||||
{
|
||||
char line[128];
|
||||
for(int i=0; i<6; ++i)
|
||||
{
|
||||
fscanf(f, "%s\n", &line);
|
||||
if(strncmp(line, "default:", 8) == 0)
|
||||
{
|
||||
int value = 0;
|
||||
sscanf(line, "default:%d", &value);
|
||||
if(value > 500 && value < 1200)
|
||||
{
|
||||
speed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
return speed;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void resetCpuSpeed(void)
|
||||
{
|
||||
#ifndef PANDORA_SPECIFIC
|
||||
return;
|
||||
#endif
|
||||
#ifdef PANDORA_SPECIFIC
|
||||
if(cpuSpeedChanged)
|
||||
{
|
||||
FILE* f = fopen ("/etc/pandora/conf/cpu.conf", "rt");
|
||||
if(f)
|
||||
{
|
||||
char line[128];
|
||||
for(int i=0; i<6; ++i)
|
||||
{
|
||||
fscanf(f, "%s\n", &line);
|
||||
if(strncmp(line, "default:", 8) == 0)
|
||||
{
|
||||
int value = 0;
|
||||
sscanf(line, "default:%d", &value);
|
||||
if(value > 500 && value < 1200)
|
||||
{
|
||||
lastCpuSpeed = value - 10;
|
||||
currprefs.pandora_cpu_speed = changed_prefs.pandora_cpu_speed = value;
|
||||
setCpuSpeed();
|
||||
printf("CPU speed reset to %d\n", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
lastCpuSpeed = defaultCpuSpeed - 10;
|
||||
currprefs.pandora_cpu_speed = changed_prefs.pandora_cpu_speed = defaultCpuSpeed;
|
||||
setCpuSpeed();
|
||||
printf("CPU speed reset to %d\n", defaultCpuSpeed);
|
||||
}
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -808,6 +823,8 @@ int main (int argc, char *argv[])
|
|||
{
|
||||
struct sigaction action;
|
||||
|
||||
defaultCpuSpeed = getDefaultCpuSpeed();
|
||||
|
||||
// Get startup path
|
||||
getcwd(start_path_data, MAX_DPATH);
|
||||
loadAdfDir();
|
||||
|
@ -843,7 +860,7 @@ int main (int argc, char *argv[])
|
|||
rp9_cleanup();
|
||||
|
||||
logging_cleanup();
|
||||
|
||||
|
||||
// printf("Threads at exit:\n");
|
||||
// dbg_list_threads();
|
||||
|
||||
|
|
|
@ -269,9 +269,11 @@ int check_prefs_changed_gfx (void)
|
|||
changed = 1;
|
||||
}
|
||||
if (currprefs.leds_on_screen != changed_prefs.leds_on_screen ||
|
||||
currprefs.pandora_hide_idle_led != changed_prefs.pandora_hide_idle_led ||
|
||||
currprefs.pandora_vertical_offset != changed_prefs.pandora_vertical_offset)
|
||||
{
|
||||
currprefs.leds_on_screen = changed_prefs.leds_on_screen;
|
||||
currprefs.pandora_hide_idle_led = changed_prefs.pandora_hide_idle_led;
|
||||
currprefs.pandora_vertical_offset = changed_prefs.pandora_vertical_offset;
|
||||
changed = 1;
|
||||
}
|
||||
|
@ -329,7 +331,7 @@ void flush_screen ()
|
|||
if(!screen_is_picasso)
|
||||
gfxvidinfo.bufmem = (uae_u8 *)prSDLScreen->pixels;
|
||||
|
||||
if(last_synctime - next_synctime > time_per_frame - 1000)
|
||||
if(last_synctime - next_synctime > time_per_frame - 1000 || next_synctime < start)
|
||||
adjust_idletime(0);
|
||||
else
|
||||
adjust_idletime(next_synctime - start);
|
||||
|
|
|
@ -17,6 +17,9 @@ uae_u32 natmem_size;
|
|||
static uae_u64 totalAmigaMemSize;
|
||||
#define MAXAMIGAMEM 0x6000000 // 64 MB (16 MB for standard Amiga stuff, 16 MG RTG, 64 MB Z3 fast)
|
||||
|
||||
/* JIT can access few bytes outside of memory block of it executes code at the very end of memory block */
|
||||
#define BARRIER 32
|
||||
|
||||
static uae_u8* additional_mem = (uae_u8*) MAP_FAILED;
|
||||
#define ADDITIONAL_MEMSIZE (128 + 16) * 1024 * 1024
|
||||
|
||||
|
@ -56,7 +59,7 @@ void alloc_AmigaMem(void)
|
|||
write_log("Can't allocate 16M of virtual address space!?\n");
|
||||
abort();
|
||||
}
|
||||
additional_mem = (uae_u8*) mmap(natmem_offset + 0x10000000, ADDITIONAL_MEMSIZE,
|
||||
additional_mem = (uae_u8*) mmap(natmem_offset + 0x10000000, ADDITIONAL_MEMSIZE + BARRIER,
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
|
||||
if(additional_mem != MAP_FAILED)
|
||||
{
|
||||
|
@ -70,7 +73,7 @@ void alloc_AmigaMem(void)
|
|||
|
||||
// Second attempt: allocate huge memory block for entire area
|
||||
natmem_size = ADDITIONAL_MEMSIZE + 256 * 1024 * 1024;
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size);
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size + BARRIER);
|
||||
if(natmem_offset)
|
||||
{
|
||||
// Allocation successful
|
||||
|
@ -95,11 +98,11 @@ void alloc_AmigaMem(void)
|
|||
natmem_size = 16 * 1024 * 1024;
|
||||
|
||||
write_log("Total physical RAM %lluM. Attempting to reserve: %uM.\n", total >> 20, natmem_size >> 20);
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size);
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size + BARRIER);
|
||||
|
||||
if (!natmem_offset) {
|
||||
for (;;) {
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size);
|
||||
natmem_offset = (uae_u8*)valloc (natmem_size + BARRIER);
|
||||
if (natmem_offset)
|
||||
break;
|
||||
natmem_size -= 16 * 1024 * 1024;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "options.h"
|
||||
#include "gui.h"
|
||||
#include "disk.h"
|
||||
#include "fsdb.h"
|
||||
#include "memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
|
@ -417,6 +418,8 @@ static void extract_media(struct uae_prefs *p, unzFile uz, xmlNode *node)
|
|||
if(readsize == file_info.uncompressed_size)
|
||||
{
|
||||
char target_file[MAX_DPATH];
|
||||
if(!my_existsdir(rp9tmp_path))
|
||||
my_mkdir(rp9tmp_path);
|
||||
snprintf(target_file, MAX_DPATH, "%s%s", rp9tmp_path, content);
|
||||
FILE *f = fopen(target_file, "wb");
|
||||
if(f != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue