Skip to content

Commit cc6ebb1

Browse files
PandTomBChips-fr
authored andcommitted
2017-09-09 Release version with help pages in GUI
1 parent 6839afb commit cc6ebb1

39 files changed

+682
-148
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ OBJS = \
234234
src/od-pandora/gui/UaeListBox.o \
235235
src/od-pandora/gui/InGameMessage.o \
236236
src/od-pandora/gui/SelectorEntry.o \
237+
src/od-pandora/gui/ShowHelp.o \
237238
src/od-pandora/gui/ShowMessage.o \
238239
src/od-pandora/gui/SelectFolder.o \
239240
src/od-pandora/gui/SelectFile.o \

Readme_Pandora.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,9 @@ Select the required Amiga CPU (68000 - 68040).
194194
If you select 68020, you can choose between 24-bit addressing (68EC020) or 32-bit addressing (68020).
195195

196196
The option "More compatible" is only available if 68000 or 68010 is selected and emulates simple prefetch of the 68000. This may
197-
improve compatibility in few situations but it's not required for most games and demos.
197+
improve compatibility in few situations but is not required for most games and demos.
198198

199-
JIT enables the Just-in-time compiler. This may breaks compatibility in some games. You will not notice a big performance
200-
improvement as long as you didn't select "Fastest" in "CPU Speed".
199+
JIT enables the Just-in-time compiler. This may breaks compatibility in some games.
201200

202201
What options are available for FPU depends on the selected CPU.
203202

@@ -239,10 +238,10 @@ Select the amount of RAM for each type you want in your Amiga.
239238
3.8 Floppy drives
240239

241240
You can enable/disable each drive by clicking the checkbox next to DFx or select the drive type in the dropdown control.
242-
"3.5'' DD" is the right choose for nearly all ADF and ADZ files.
241+
"3.5'' DD" is the right choise for nearly all ADF and ADZ files.
243242
The option "Write-protected" indicates if the emulator can write to the ADF.
244243
The button "..." opens a dialog to select the required disk file.
245-
With the big dropdown control, you can select one of the disks you recently used.
244+
With the dropdown control, you can select one of the disks you recently used.
246245

247246
You can reduce the loading time for lot of games by increasing the floppy drive emulation speed. A few games will not load
248247
with higher drive speed and you have to select 100%.
@@ -262,7 +261,7 @@ create the new hard disk. You have to format the new HDD in Amiga via the Workbe
262261

263262
If "Master harddrive write protection" is selected, you can't write to any HD.
264263

265-
Select "CD drive" to emulate CD for CD32. Use "Eject"" to remove currentCD and click on "..." to open a dialog to select
264+
Select "CD drive" to emulate CD for CD32. Use "Eject" to remove current CD and click on "..." to open a dialog to select
266265
the iso/cue file for CD emulation.
267266
In current version, WAV, MP3 and FLAC is supported for audio tracks.
268267

@@ -313,7 +312,7 @@ current frame rate. When you have a HDD in your Amiga emulation, the HD indicato
313312
to the HDD. The next values are showing the track number for each disk drive and indicates disk access.
314313

315314
When you deactivate the option "Show GUI on startup" and use this configuration by specifying it with the command line
316-
parameter "-config=<file>", the emulations starts directly without showing the GUI.
315+
parameter "-config=<file>", the emulation starts directly without showing the GUI.
317316

318317
Set the speed for the Pandora CPU to overclock it for games which need more power. Be careful with this parameter.
319318

changelog.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2017-09-09 - Release version
2+
- Fixed frameskip (was broken in last two beta versions)
3+
- Fixed Picasso framerate (Pandora switches now to 60 Hz like the Amiga side)
4+
- Added help page for every panel in GUI (Help button or F1)
5+
- Fixed bug when emulator crashes or hangs after switching configs
6+
17
2017-09-06 - Beta version
28
- Merged lot of changes from WinUAE 3.5.0
39
- Fixed possible segfault and bus error on two locations

src/custom.cpp

+32-19
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ static void record_sprite (int line, int num, int sprxp, uae_u16 *data, uae_u16
22892289
stb1[6] |= state;
22902290
stb1[7] |= state;
22912291
stb1 += 8;
2292-
}
2292+
}
22932293
e->has_attached = 1;
22942294
}
22952295
}
@@ -2688,6 +2688,7 @@ static void compute_framesync (void)
26882688
else
26892689
v = cr->rate;
26902690
changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate = v;
2691+
vsync_switchmode((int)v);
26912692
}
26922693
found = true;
26932694
break;
@@ -4972,6 +4973,7 @@ static bool framewait (void)
49724973
{
49734974
frame_time_t curr_time;
49744975
frame_time_t start;
4976+
frame_time_t time_for_next_frame = vsynctimebase;
49754977
int vs = isvsync_chipset ();
49764978
int status = 0;
49774979

@@ -4984,21 +4986,29 @@ static bool framewait (void)
49844986

49854987
if (vs > 0) {
49864988

4987-
if (!frame_rendered && !picasso_on)
4988-
frame_rendered = render_screen (false);
4989+
if(!nodraw()) {
4990+
if (!frame_rendered && !picasso_on)
4991+
frame_rendered = render_screen (false);
4992+
4993+
if (!frame_shown) {
4994+
show_screen (1);
4995+
}
4996+
curr_time = target_lastsynctime();
4997+
}
4998+
else {
4999+
curr_time = target_lastsynctime() + vsynctimebase;
49895000

4990-
if (!frame_shown) {
4991-
show_screen (1);
4992-
}
5001+
if(read_processor_time () > curr_time)
5002+
time_for_next_frame = curr_time - read_processor_time ();
5003+
}
49935004

4994-
curr_time = target_lastsynctime();
49955005
vsyncwaittime = vsyncmaxtime = curr_time + vsynctimebase;
49965006
vsyncmintime = curr_time;
4997-
5007+
49985008
if (currprefs.m68k_speed < 0) {
4999-
vsynctimeperline = (vsynctimebase) / (maxvpos_display + 1);
5009+
vsynctimeperline = (time_for_next_frame) / (maxvpos_display + 1);
50005010
} else {
5001-
vsynctimeperline = (vsynctimebase) / 3;
5011+
vsynctimeperline = (time_for_next_frame) / 3;
50025012
}
50035013

50045014
if (vsynctimeperline < 1)
@@ -5083,7 +5093,7 @@ void fpscounter_reset (void)
50835093
idletime = 0;
50845094
}
50855095

5086-
static void fpscounter (bool frameok)
5096+
static void fpscounter (void)
50875097
{
50885098
frame_time_t now, last;
50895099

@@ -5094,6 +5104,9 @@ static void fpscounter (bool frameok)
50945104
if ((int)last < 0)
50955105
return;
50965106

5107+
if(currprefs.gfx_framerate)
5108+
idletime >>= 1;
5109+
50975110
mavg (&fps_mavg, last / 10, FPSCOUNTER_MAVG_SIZE);
50985111
mavg (&idle_mavg, idletime / 10, FPSCOUNTER_MAVG_SIZE);
50995112
idletime = 0;
@@ -5109,10 +5122,6 @@ static void fpscounter (bool frameok)
51095122
idle = 0;
51105123
if (idle > 100 * 10)
51115124
idle = 100 * 10;
5112-
if (fake_vblank_hz * 10 > fps) {
5113-
float mult = (float)fake_vblank_hz * 10.0 / fps;
5114-
idle *= mult;
5115-
}
51165125
gui_data.fps = fps;
51175126
gui_data.idle = (int)idle;
51185127
}
@@ -5139,18 +5148,22 @@ static void vsync_handler_pre (void)
51395148
frameskiptime += end - start;
51405149
}
51415150

5142-
bool frameok = framewait ();
5151+
framewait ();
51435152

5144-
if (!picasso_on) {
5153+
if (!picasso_on && !nodraw()) {
51455154
if (!frame_rendered) {
51465155
frame_rendered = render_screen (false);
51475156
}
51485157
if (frame_rendered && !frame_shown) {
51495158
frame_shown = show_screen_maybe (true);
51505159
}
51515160
}
5152-
5153-
fpscounter(frameok);
5161+
#ifdef PICASSO96
5162+
if(!nodraw() || (picasso_on && picasso_rendered))
5163+
#else
5164+
if(!nodraw() )
5165+
#endif
5166+
fpscounter();
51545167

51555168
handle_events ();
51565169

src/include/memory.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ STATIC_INLINE void put_pointer (uaecptr addr, void *v)
547547

548548
STATIC_INLINE uae_u8 *get_real_address(uaecptr addr)
549549
{
550-
return get_mem_bank(addr).xlateaddr(addr);
550+
return get_mem_bank(addr).xlateaddr(addr);
551551
}
552552

553553
STATIC_INLINE int valid_address(uaecptr addr, uae_u32 size)
554554
{
555-
return get_mem_bank(addr).check(addr, size);
555+
return get_mem_bank(addr).check(addr, size);
556556
}
557557

558558
STATIC_INLINE void put_quad_host(void *addr, uae_u64 v)

src/memory.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -935,8 +935,8 @@ static void allocate_memory (void)
935935
}
936936

937937
if (bogomem_bank.reserved_size != currprefs.bogomem_size) {
938-
mapped_free (&bogomem_bank);
939-
bogomem_bank.reserved_size = 0;
938+
mapped_free (&bogomem_bank);
939+
bogomem_bank.reserved_size = 0;
940940

941941
if(currprefs.bogomem_size > 0x1c0000)
942942
currprefs.bogomem_size = 0x1c0000;
@@ -1032,6 +1032,7 @@ void map_overlay (int chip)
10321032
{
10331033
int size;
10341034
addrbank *cb;
1035+
10351036
int currPC = m68k_getpc();
10361037

10371038
size = chipmem_bank.allocated_size >= 0x180000 ? (chipmem_bank.allocated_size >> 16) : 32;
@@ -1165,6 +1166,7 @@ void memory_reset (void)
11651166
int bnk, bnk_end;
11661167
bool gayleorfatgary;
11671168

1169+
11681170
need_hardreset = false;
11691171
/* Use changed_prefs, as m68k_reset is called later. */
11701172
if (last_address_space_24 != changed_prefs.address_space_24)

src/newcpu.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,7 @@ void m68k_go (int may_quit)
17131713

17141714
cpu_prefs_changed_flag = 0;
17151715
in_m68k_go++;
1716+
17161717
for (;;) {
17171718
void (*run_func)(void);
17181719

@@ -1815,6 +1816,12 @@ void m68k_go (int may_quit)
18151816
run_func ();
18161817
}
18171818
protect_roms (false);
1819+
1820+
// Prepare for a restart: reset pc
1821+
regs.pc = 0;
1822+
regs.pc_p = NULL;
1823+
regs.pc_oldp = NULL;
1824+
18181825
in_m68k_go--;
18191826
}
18201827

src/od-pandora/gui/Navigation.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ static NavigationMap navMap[] =
4040
{ "Miscellaneous", "StatusLine", "StatusLine", "Input", "Savestates" },
4141
{ "Savestates", "State0", "State0", "Miscellaneous", "Reset" },
4242
{ "Reset", "Start", "Quit", "Savestates", "Paths" },
43-
{ "Quit", "Reset", "Start", "Savestates", "Paths" },
43+
{ "Quit", "Reset", "Help", "Savestates", "Paths" },
4444
// { "Restart", "Quit", "Start", "Savestates", "Paths" },
45-
{ "Start", "Quit", "Reset", "Savestates", "Paths" },
45+
{ "Help", "Quit", "Start", "Savestates", "Paths" },
46+
{ "Start", "Help", "Reset", "Savestates", "Paths" },
4647

4748
// PanelPaths
4849
{ "SystemROMs", "Paths", "Paths", "RescanROMs", "ConfigPath" },

src/od-pandora/gui/PanelCPU.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,27 @@ void RefreshPanelCPU(void)
404404
else if (changed_prefs.m68k_speed == -1)
405405
optFastest->setSelected(true);
406406
}
407+
408+
409+
bool HelpPanelCPU(std::vector<std::string> &helptext)
410+
{
411+
helptext.clear();
412+
helptext.push_back("Select the required Amiga CPU (68000 - 68040).");
413+
helptext.push_back("If you select 68020, you can choose between 24-bit addressing (68EC020) or 32-bit addressing (68020).");
414+
helptext.push_back("The option \"More compatible\" is only available if 68000 or 68010 is selected and emulates simple prefetch of");
415+
helptext.push_back("the 68000. This may improve compatibility in few situations but is not required for most games and demos.");
416+
helptext.push_back("");
417+
helptext.push_back("JIT enables the Just-in-time compiler. This may breaks compatibility in some games.");
418+
helptext.push_back("");
419+
helptext.push_back("The available FPU models depending on the selected CPU.");
420+
helptext.push_back("The option \"More compatible\" activates more accurate rounding and compare of two floats.");
421+
helptext.push_back("\"Softfloat FPU emul.\" aktivates the FPU emulation from QEMU. This is more accurate, but a bit slower.");
422+
helptext.push_back("");
423+
helptext.push_back("With \"CPU Speed\" you can choose the clock rate of the Amiga.");
424+
helptext.push_back("");
425+
helptext.push_back("In current version, you will not see a difference in the performance for 68020, 68030 and 68040 CPUs. The cpu");
426+
helptext.push_back("cycles for the opcodes are based on 68020. The different cycles for 68030 and 68040 may come in a later");
427+
helptext.push_back("version.");
428+
return true;
429+
}
430+

src/od-pandora/gui/PanelChipset.cpp

+21
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,24 @@ void RefreshPanelChipset(void)
377377
else
378378
optCollFull->setSelected(true);
379379
}
380+
381+
382+
bool HelpPanelChipset(std::vector<std::string> &helptext)
383+
{
384+
helptext.clear();
385+
helptext.push_back("If you want to emulate an Amiga 1200, select AGA. For most Amiga 500 games, select \"Full ECS\". Some older");
386+
helptext.push_back("Amiga games requires \"OCS\" or \"ECS Agnus\". You have to play with these options if a game won't work as");
387+
helptext.push_back("expected. By selecting an entry in \"Extra\", all internal chipset settings will become the required values for the specified");
388+
helptext.push_back("Amiga model.");
389+
helptext.push_back("For some games, you have to activate \"NTSC\" (60 Hz instead of 50 Hz) for correct timing.");
390+
helptext.push_back("");
391+
helptext.push_back("When you see some graphic issues in a game, try \"Immediate\" or \"Wait for blit.\" for blitter and/or disable");
392+
helptext.push_back("\"Fast copper\".");
393+
helptext.push_back("");
394+
helptext.push_back("\"Fast copper\" uses a prediction algorithm instead of checking the copper state on a more regular basis. This may");
395+
helptext.push_back("cause issues but brings a big performance improvement. The option was removed in WinUAE in an early state,");
396+
helptext.push_back("but for most games, it works fine and the better performance is helpful for low powered devices.");
397+
helptext.push_back("");
398+
helptext.push_back("For \"Collision Level\", select \"Sprites and Sprites vs. Playfield\" which is fine for nearly all games.");
399+
return true;
400+
}

src/od-pandora/gui/PanelConfig.cpp

+18-4
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ class ConfigsListModel : public gcn::ListModel
8989
strncpy(tmp, ConfigFilesList[i]->Name, MAX_DPATH);
9090
if(strlen(ConfigFilesList[i]->Description) > 0)
9191
{
92-
strncat(tmp, " (", MAX_DPATH);
93-
strncat(tmp, ConfigFilesList[i]->Description, MAX_DPATH);
94-
strncat(tmp, ")", MAX_DPATH);
92+
strncat(tmp, " (", MAX_DPATH - 1);
93+
strncat(tmp, ConfigFilesList[i]->Description, MAX_DPATH - 1);
94+
strncat(tmp, ")", MAX_DPATH - 1);
9595
}
9696
configs.push_back(tmp);
9797
}
@@ -131,7 +131,7 @@ class ConfigButtonActionListener : public gcn::ActionListener
131131
if(!txtName->getText().empty())
132132
{
133133
fetch_configurationpath(filename, MAX_DPATH);
134-
strncat(filename, txtName->getText().c_str(), MAX_DPATH);
134+
strncat(filename, txtName->getText().c_str(), MAX_DPATH - 1);
135135
strncat(filename, ".uae", MAX_DPATH);
136136
strncpy(changed_prefs.description, txtDesc->getText().c_str(), 256);
137137
if(cfgfile_save(&changed_prefs, filename, 0))
@@ -357,3 +357,17 @@ void RefreshPanelConfig(void)
357357
}
358358
}
359359
}
360+
361+
362+
bool HelpPanelConfig(std::vector<std::string> &helptext)
363+
{
364+
helptext.clear();
365+
helptext.push_back("To load a configuration, select the entry in the list and then click on \"Load\". If you doubleclick on an entry");
366+
helptext.push_back("in the list, the emulation starts with this configuration.");
367+
helptext.push_back("");
368+
helptext.push_back("If you want to create a new configuration, setup all options, enter a new name in \"Name\", provide a short");
369+
helptext.push_back("description and then click on \"Save\".");
370+
helptext.push_back("");
371+
helptext.push_back("\"Delete\" will delete the selected configuration.");
372+
return true;
373+
}

src/od-pandora/gui/PanelDisplay.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,22 @@ void RefreshPanelDisplay(void)
283283
chkLineDbl->setSelected(changed_prefs.gfx_vresolution != VRES_NONDOUBLE);
284284
chkFrameskip->setSelected(changed_prefs.gfx_framerate);
285285
}
286+
287+
288+
bool HelpPanelDisplay(std::vector<std::string> &helptext)
289+
{
290+
helptext.clear();
291+
helptext.push_back("Select the required width and height of the Amiga screen. If you select \"NTSC\" in chipset, a value greater than");
292+
helptext.push_back("240 for \"Height\" makes no sense. When the game, demo or workbench uses Hires mode and you selected a");
293+
helptext.push_back("value for \"Width\" lower than 640, you will only see half of the pixels.");
294+
helptext.push_back("");
295+
helptext.push_back("With \"Vert. offset\" you can adjust the position of the first drawn line of the Amiga screen.");
296+
helptext.push_back("");
297+
helptext.push_back("Enable 4/3 shrink if you want correct aspect ratio on modern 16/9 screen.");
298+
helptext.push_back("");
299+
helptext.push_back("Activate line doubling to remove flicker in interlace modes.");
300+
helptext.push_back("");
301+
helptext.push_back("When you activate \"Frameskip\", only every second frame is drawn. This will improve performance and some");
302+
helptext.push_back("more games are playable.");
303+
return true;
304+
}

0 commit comments

Comments
 (0)