Commit 98c0789c authored by GnoStiC's avatar GnoStiC

puae 2.3.1

parent 9657f1c9
...@@ -119,7 +119,7 @@ puae_MainWindow::puae_MainWindow(QWidget *parent) : ...@@ -119,7 +119,7 @@ puae_MainWindow::puae_MainWindow(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
QString myPath; QString myPath;
myPath = QDir::currentPath(); myPath = QDir::currentPath ();
// Paths Tab // Paths Tab
PATHS_ROM = myPath; PATHS_ROM = myPath;
...@@ -129,6 +129,13 @@ puae_MainWindow::puae_MainWindow(QWidget *parent) : ...@@ -129,6 +129,13 @@ puae_MainWindow::puae_MainWindow(QWidget *parent) :
PATHS_AVIOUTPUT = myPath; PATHS_AVIOUTPUT = myPath;
PATHS_SAVEIMAGE = myPath; PATHS_SAVEIMAGE = myPath;
PATHS_RIP = myPath; PATHS_RIP = myPath;
// USER
values_to_expansiondlg ();
enable_for_expansiondlg ();
values_to_memorydlg ();
enable_for_memorydlg ();
} }
puae_MainWindow::~puae_MainWindow() puae_MainWindow::~puae_MainWindow()
...@@ -902,53 +909,6 @@ int puae_MainWindow::getcpufreq (int m) ...@@ -902,53 +909,6 @@ int puae_MainWindow::getcpufreq (int m)
return f * (m >> 8) / 8; return f * (m >> 8) / 8;
} }
void puae_MainWindow::fix_values_memorydlg()
{
if (workprefs.chipmem_size > 0x200000)
workprefs.fastmem_size = 0;
}
void puae_MainWindow::updatez3 (unsigned int *size1p, unsigned int *size2p)
{
int i;
unsigned int s1, s2;
// no 2GB Z3 size so we need 2x1G
if (*size1p >= 0x80000000) {
*size2p = *size1p - 0x40000000;
*size1p = 0x40000000;
return;
}
s1 = *size1p;
*size1p = 0;
*size2p = 0;
s2 = 0;
for (i = 32; i >= 0; i--) {
if (s1 & (1 << i))
break;
}
if (i < 20)
return;
if (s1 == (1 << i)) {
*size1p = s1;
return;
}
s2 = s1 & ((1 << i) - 1);
s1 = 1 << i;
i--;
while (i >= 0) {
if (s2 & (1 << i)) {
s2 = 1 << i;
break;
}
i--;
}
if (i < 19)
s2 = 0;
*size1p = s1;
*size2p = s2;
}
void puae_MainWindow::out_floppyspeed() void puae_MainWindow::out_floppyspeed()
{ {
char spe[30]; char spe[30];
...@@ -975,6 +935,7 @@ void puae_MainWindow::values_to_memorydlg() ...@@ -975,6 +935,7 @@ void puae_MainWindow::values_to_memorydlg()
case 0x00800000: mem_size = 6; break; case 0x00800000: mem_size = 6; break;
} }
ui->IDC_CHIPMEM->setValue(mem_size); ui->IDC_CHIPMEM->setValue(mem_size);
ui->IDC_CHIPRAM->setText(memsize_names[msi_chip[mem_size]]);
mem_size = 0; mem_size = 0;
switch (workprefs.fastmem_size) { switch (workprefs.fastmem_size) {
...@@ -986,6 +947,7 @@ void puae_MainWindow::values_to_memorydlg() ...@@ -986,6 +947,7 @@ void puae_MainWindow::values_to_memorydlg()
case 0x01000000: mem_size = 5; break; case 0x01000000: mem_size = 5; break;
} }
ui->IDC_FASTMEM->setValue(mem_size); ui->IDC_FASTMEM->setValue(mem_size);
ui->IDC_FASTRAM->setText(memsize_names[msi_fast[mem_size]]);
mem_size = 0; mem_size = 0;
switch (workprefs.bogomem_size) { switch (workprefs.bogomem_size) {
...@@ -996,6 +958,7 @@ void puae_MainWindow::values_to_memorydlg() ...@@ -996,6 +958,7 @@ void puae_MainWindow::values_to_memorydlg()
case 0x001C0000: mem_size = 4; break; case 0x001C0000: mem_size = 4; break;
} }
ui->IDC_SLOWMEM->setValue(mem_size); ui->IDC_SLOWMEM->setValue(mem_size);
ui->IDC_SLOWRAM->setText(memsize_names[msi_bogo[mem_size]]);
mem_size = 0; mem_size = 0;
v = workprefs.z3fastmem_size + workprefs.z3fastmem2_size; v = workprefs.z3fastmem_size + workprefs.z3fastmem2_size;
...@@ -1036,6 +999,28 @@ void puae_MainWindow::values_to_memorydlg() ...@@ -1036,6 +999,28 @@ void puae_MainWindow::values_to_memorydlg()
else else
mem_size = 17; mem_size = 17;
ui->IDC_Z3FASTMEM->setValue(mem_size); ui->IDC_Z3FASTMEM->setValue(mem_size);
ui->IDC_Z3FASTRAM->setText(memsize_names[msi_z3fast[mem_size]]);
mem_size = 0;
v = workprefs.z3chipmem_size;
if (v < 0x01000000)
mem_size = 0;
else if (v < 0x02000000)
mem_size = 1;
else if (v < 0x04000000)
mem_size = 2;
else if (v < 0x08000000)
mem_size = 3;
else if (v < 0x10000000)
mem_size = 4;
else if (v < 0x20000000)
mem_size = 5;
else if (v < 0x40000000)
mem_size = 6;
else
mem_size = 7;
// ui->IDC_Z3CHIPMEM->setValue(mem_size);
// ui->IDC_Z3CHIPRAM->setText(memsize_names[msi_z3chip[mem_size]]);
mem_size = 0; mem_size = 0;
switch (workprefs.gfxmem_size) { switch (workprefs.gfxmem_size) {
...@@ -1052,8 +1037,136 @@ void puae_MainWindow::values_to_memorydlg() ...@@ -1052,8 +1037,136 @@ void puae_MainWindow::values_to_memorydlg()
case 0x20000000: mem_size = 10; break; case 0x20000000: mem_size = 10; break;
case 0x40000000: mem_size = 11; break; case 0x40000000: mem_size = 11; break;
} }
//ui->IDC_P96MEM->setValue(mem_size); ui->IDC_P96MEM->setValue(mem_size);
//ui->IDC_P96RAM->setValue(memsize_names[msi_gfx[mem_size]]); ui->IDC_P96RAM->setText(memsize_names[msi_gfx[mem_size]]);
/*
ui->IDC_RTG_8BIT->setValue ((workprefs.picasso96_modeflags & RGBFF_CLUT) ? 1 : 0, 0);
ui->IDC_RTG_16BIT->setValue (
(manybits (workprefs.picasso96_modeflags, RGBFF_R5G6B5PC | RGBFF_R5G6B5PC | RGBFF_R5G6B5 | RGBFF_R5G5B5 | RGBFF_B5G6R5PC | RGBFF_B5G5R5PC)) ? 1 :
(workprefs.picasso96_modeflags & RGBFF_R5G6B5PC) ? 2 :
(workprefs.picasso96_modeflags & RGBFF_R5G5B5PC) ? 3 :
(workprefs.picasso96_modeflags & RGBFF_R5G6B5) ? 4 :
(workprefs.picasso96_modeflags & RGBFF_R5G5B5) ? 5 :
(workprefs.picasso96_modeflags & RGBFF_B5G6R5PC) ? 6 :
(workprefs.picasso96_modeflags & RGBFF_B5G5R5PC) ? 7 : 0, 0);
ui->IDC_RTG_24BIT->setValue (
(manybits (workprefs.picasso96_modeflags, RGBFF_R8G8B8 | RGBFF_B8G8R8)) ? 1 :
(workprefs.picasso96_modeflags & RGBFF_R8G8B8) ? 2 :
(workprefs.picasso96_modeflags & RGBFF_B8G8R8) ? 3 : 0, 0);
ui->IDC_RTG_32BIT->setValue (
(manybits (workprefs.picasso96_modeflags, RGBFF_A8R8G8B8 | RGBFF_A8B8G8R8 | RGBFF_R8G8B8A8 | RGBFF_B8G8R8A8)) ? 1 :
(workprefs.picasso96_modeflags & RGBFF_A8R8G8B8) ? 2 :
(workprefs.picasso96_modeflags & RGBFF_A8B8G8R8) ? 3 :
(workprefs.picasso96_modeflags & RGBFF_R8G8B8A8) ? 4 :
(workprefs.picasso96_modeflags & RGBFF_B8G8R8A8) ? 5 : 0, 0);
*/
if (workprefs.win32_rtgvblankrate <= 0 ||
workprefs.win32_rtgvblankrate == 50 ||
workprefs.win32_rtgvblankrate == 60 ||
workprefs.win32_rtgvblankrate == 70 ||
workprefs.win32_rtgvblankrate == 75)
{
ui->IDC_RTG_VBLANKRATE->setCurrentIndex(
(workprefs.win32_rtgvblankrate == 0) ? 1 :
(workprefs.win32_rtgvblankrate == -1) ? 2 :
(workprefs.win32_rtgvblankrate == -2) ? 0 :
(workprefs.win32_rtgvblankrate == 50) ? 3 :
(workprefs.win32_rtgvblankrate == 60) ? 4 :
(workprefs.win32_rtgvblankrate == 70) ? 5 :
(workprefs.win32_rtgvblankrate == 75) ? 6 : 0);
} else {
char tmp[10];
printf (tmp, "%d", workprefs.win32_rtgvblankrate);
//ui->IDC_RTG_VBLANKRATE->setText(tmp);
}
/*
workprefs.win32_rtgscaleifsmall = ui->IDC_RTG_SCALE->getValue();
workprefs.win32_rtgallowscaling = ui->IDC_RTG_SCALE_ALLOW->getValue();
workprefs.win32_rtgmatchdepth = ui->IDC_RTG_MATCH_DEPTH->getValue();
ui->IDC_RTG_SCALE_ASPECTRATIO->setCurrentIndex (
(workprefs.win32_rtgscaleaspectratio == 0) ? 0 :
(workprefs.win32_rtgscaleaspectratio == 4 * 256 + 3) ? 2 :
(workprefs.win32_rtgscaleaspectratio == 5 * 256 + 4) ? 3 :
(workprefs.win32_rtgscaleaspectratio == 15 * 256 + 9) ? 4 :
(workprefs.win32_rtgscaleaspectratio == 16 * 256 + 9) ? 5 :
(workprefs.win32_rtgscaleaspectratio == 16 * 256 + 10) ? 6 : 1);
*/
mem_size = 0;
switch (workprefs.mbresmem_low_size) {
case 0x00000000: mem_size = 0; break;
case 0x00100000: mem_size = 1; break;
case 0x00200000: mem_size = 2; break;
case 0x00400000: mem_size = 3; break;
case 0x00800000: mem_size = 4; break;
case 0x01000000: mem_size = 5; break;
case 0x02000000: mem_size = 6; break;
case 0x04000000: mem_size = 7; break;
}
ui->IDC_MBMEM1->setValue(mem_size);
ui->IDC_MBRAM1->setText(memsize_names[msi_gfx[mem_size]]);
mem_size = 0;
switch (workprefs.mbresmem_high_size) {
case 0x00000000: mem_size = 0; break;
case 0x00100000: mem_size = 1; break;
case 0x00200000: mem_size = 2; break;
case 0x00400000: mem_size = 3; break;
case 0x00800000: mem_size = 4; break;
case 0x01000000: mem_size = 5; break;
case 0x02000000: mem_size = 6; break;
case 0x04000000: mem_size = 7; break;
}
ui->IDC_MBMEM2->setValue(mem_size);
ui->IDC_MBRAM2->setText(memsize_names[msi_gfx[mem_size]]);
}
void puae_MainWindow::fix_values_memorydlg()
{
if (workprefs.chipmem_size > 0x200000)
workprefs.fastmem_size = 0;
}
void puae_MainWindow::updatez3 (unsigned int *size1p, unsigned int *size2p)
{
int i;
unsigned int s1, s2;
// no 2GB Z3 size so we need 2x1G
if (*size1p >= 0x80000000) {
*size2p = *size1p - 0x40000000;
*size1p = 0x40000000;
return;
}
s1 = *size1p;
*size1p = 0;
*size2p = 0;
s2 = 0;
for (i = 32; i >= 0; i--) {
if (s1 & (1 << i))
break;
}
if (i < 20)
return;
if (s1 == (1 << i)) {
*size1p = s1;
return;
}
s2 = s1 & ((1 << i) - 1);
s1 = 1 << i;
i--;
while (i >= 0) {
if (s2 & (1 << i)) {
s2 = 1 << i;
break;
}
i--;
}
if (i < 19)
s2 = 0;
*size1p = s1;
*size2p = s2;
} }
void puae_MainWindow::enable_for_memorydlg () void puae_MainWindow::enable_for_memorydlg ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment