psp fixes, gamma
[libpicofe.git] / base_readme.txt
1 #ifdef GP2X\r
2 For help / comments / questions visit GP32X boards at:\r
3 http://www.gp32x.com/board/\r
4 \r
5 #endif\r
6 \r
7 About\r
8 -----\r
9 \r
10 #ifdef PSP\r
11 This is yet another Megadrive / Genesis emulator for PSP, but with\r
12 Sega CD / Mega CD support. Although it has been originally written having\r
13 ARM CPU based devices in mind, it has now been ported to PSP too, by\r
14 replacing ARM specific parts with portable C code.\r
15 The base code originates from Dave's (fdave, finalburn) PicoDrive 0.30 for\r
16 Pocket PC. The Sega/Mega CD code is roughly based on Stephane Dallongeville's\r
17 Gens.\r
18 #else\r
19 This is yet another Megadrive / Genesis / Sega CD / Mega CD emulator, which\r
20 was written having ARM-based handheld devices in mind (such as PDAs,\r
21 smartphones and handheld consoles like GP2X and Gizmondo of course).\r
22 The critical parts (renderer, 68K and Z80 cpu interpreters) and some other\r
23 random code is written in ARM asm, other code is C. The base code originates\r
24 from Dave's (fdave, finalburn) PicoDrive 0.30 for Pocket PC. The Sega/Mega CD\r
25 code is roughly based on Stephane Dallongeville's Gens.\r
26 #endif\r
27 \r
28 \r
29 How to make it run\r
30 ------------------\r
31 \r
32 #ifdef GP2X\r
33 Copy PicoDrive.gpe, pico940.bin and mmuhack.o to any place in your filesystem\r
34 (all 3 files must be in the same directory) and run PicoDrive.gpe.\r
35 Then load a ROM and enjoy! ROMs can be in .smd or .bin format and can be zipped.\r
36 \r
37 #endif\r
38 #ifdef GIZ\r
39 First make sure you have homebrew-enabled Service Pack installed. Then copy\r
40 PicoDrive.exe and KGSDK.dll to any place in your filesystem (both files must\r
41 be in the same directory) and run PicoDrive.exe using the launcher of your choice\r
42 (some of them might require renaming PicoDrive.exe to Autorun.exe, placing it in\r
43 the root of SD, etc). Then load a ROM and enjoy! ROMs can be placed anywhere, can\r
44 be in .smd or .bin format and can be zipped (one ROM per zip).\r
45 \r
46 #endif\r
47 #ifdef PSP\r
48 If you are running a custom firmware, just copy the whole PicoDrive directory to\r
49 /PSP/GAME or /PSP/GAMEXXX directory in your memory stick (it shouldn't matter\r
50 which one GAME* directory to use).\r
51 \r
52 If you are on 1.5, there is a separate KXploited version for it.\r
53 \r
54 #endif\r
55 Note that this emulator may require some tweaking of configuration settings to run\r
56 some games well. For Genesis/MegaDrive, if you have any problems (game does not\r
57 boot, sound is glitchy, broken graphics), try to:\r
58   * enable "Accurate timing" (options menu)\r
59 #ifdef PSP\r
60   * enable "accurate renderer"\r
61 #else\r
62   * enable "16bit accurate renderer"\r
63 #endif\r
64   * make sure Z80 is not disabled (in "advanced options" submenu in options).\r
65 Some games may need to be reset after adjusting settings.\r
66 \r
67 For possible Sega/Mega CD problems, see "Other important stuff" section below.\r
68 \r
69 \r
70 How to run Sega/Mega CD games\r
71 -----------------------------\r
72 \r
73 To play any game, you need BIOS files. These files must be copied to the same\r
74 directory as mentioned PicoDrive files. Files can be named as follows:\r
75 \r
76 US: us_scd1_9210.bin us_scd2_9306.bin SegaCDBIOS9303.bin\r
77 EU: eu_mcd1_9210.bin eu_mcd2_9303.bin eu_mcd2_9306.bin\r
78 JP: jp_mcd1_9112.bin jp_mcd1_9111.bin\r
79 these files can also be zipped.\r
80 \r
81 The game must be dumped to ISO format, but BIN can be used too. If you want\r
82 CD music, you must use ISO+mp3 files. Audio from BIN files won't be read at\r
83 all. Also BIN files are usually larger, so it's better to use ISO. ISO+mp3\r
84 files can be named similarly as for other emus.\r
85 Here are some examples:\r
86 \r
87 SonicCD.iso             data track\r
88 SonicCD_02.mp3          audio track 1 (CD track 2)\r
89 SonicCD_03.mp3\r
90 ...\r
91 \r
92 Sonic the Hedgehog CD (US) - Track 01.iso\r
93 Sonic the Hedgehog CD (US) - Track 02.mp3\r
94 Sonic the Hedgehog CD (US) - Track 03.mp3\r
95 ...\r
96 \r
97 It is very important to have the MP3s encoded at 44kHz sample rate and they\r
98 must be stereo, or else they will play too fast/slow or won't play at all.\r
99 Be sure NOT to use anything but classic mp3 format (don't use things like\r
100 mp3pro).\r
101 \r
102 ISO files can also be zipped (but not mp3 files, as they are already\r
103 compressed). Note that this can cause very long loading times, which may\r
104 take up to several minutes. File naming is similar as with uncompressed ISOs.\r
105 Example:\r
106 \r
107 SonicCD.zip             data track\r
108 SonicCD_02.mp3          audio track 1 (CD track 2)\r
109 SonicCD_03.mp3\r
110 ...\r
111 \r
112 \r
113 Other important stuff\r
114 ---------------------\r
115 \r
116 * If your Genesis/MD game hangs or has glitches, this is most likely because\r
117   "Accurate timing" option is not enabled, or fast renderer is used\r
118   (try the accurate one), or Z80 is disabled in "advanced options".\r
119 * Sega/Mega CD: If the game hangs after Sega logo, you may need to enable\r
120   "better sync" and/or "Scale/Rot. fx" options, found in "Sega/Mega CD options"\r
121   submenu, and then reset the game. Some other games may also require\r
122   "CDDA audio" and "PCM audio" to be enabled to work (enabled by default).\r
123   Incorrectly named/missing mp3s may also be the cause.\r
124 * Sega/Mega CD: If the background music is missing, you might have named your\r
125   MP3s incorrectly. Read "How to run Sega/Mega CD games" section again.\r
126 * Sega/Mega CD: If the game music plays too fast or too slow, you have encoded\r
127   your MP3s incorrectly. You will have to re-encode and/or resample them.\r
128   PicoDrive is not a mp3 player, so all mp3s MUST be encoded at 44.1kHz stereo.\r
129   Badly encoded mp3s can cause various kind of problems, like noises, incorrect\r
130   playback speeds, not repeating music or even prevent game from starting.\r
131 * Sega/Mega CD: If your games hangs at the BIOS screen (with planets shown),\r
132   you may be using a bad BIOS dump. Try another from a different source.\r
133 * Some Sega/Mega CD games don't use Z80 for anything, but they leave it active,\r
134   so disabling Z80 manually (in advanced options) improves performance.\r
135 #ifdef GP2X\r
136 * Sega/Mega CD: if FMV game performance is poor, try adjusting\r
137   "ReadAhead buffer" to something like 2048K.\r
138 * When you use both GP2X CPUs, keep in mind that you can't overclock as high as\r
139   when using ARM920 only. For example my GP2X when run singlecore can reach\r
140   280MHz, but with both cores it's about 250MHz. When overclocked too much,\r
141   it may start hanging and producing random noise, or causing ARM940 crashes\r
142   ("940 crashed" message displayed).\r
143 #endif\r
144 * Use lower bitrate for better performance (96 or 128kbps CBRs recommended).\r
145 #ifdef GP2X\r
146 * Due to internal implementation mp3s must not be larger that 12MB\r
147   (12582912 bytes). Larger mp3s will not be fully loaded.\r
148 * RAM timings option is good for dualcore operation (it is disabled by\r
149   default because it doesn't work on every GP2X, so enable it in advanced\r
150   options).\r
151 #endif\r
152 \r
153 \r
154 Configuration\r
155 -------------\r
156 \r
157 @@0. "Renderer"\r
158 #ifdef GP2X\r
159 8bit fast:\r
160 This enables alternative heavily optimized tile-based renderer, which renders\r
161 pixels not line-by-line (this is what accurate renderers do), but in 8x8 tiles,\r
162 which is much faster. But because of the way it works it can't render any\r
163 mid-frame image changes (raster effects), so it is useful only with some games.\r
164 \r
165 Other two are accurate line-based renderers. The 8bit is faster but does not\r
166 run well with some games like Street Racer.\r
167 \r
168 #endif\r
169 #ifdef GIZ\r
170 This option allows to switch between 16bit and 8bit renderers. The 8bit one is\r
171 a bit faster for some games, but not much, because colors still need to be\r
172 converted to 16bit, as this is what Gizmondo requires. It also introduces\r
173 graphics problems for some games, so it's best to use 16bit one.\r
174 \r
175 #endif\r
176 #ifdef PSP\r
177 This option allows to switch between fast and accurate renderers. The fast one\r
178 is much faster, because it draws the whole frame at a time, instead of doing it\r
179 line by line, like the accurate one does. But because of the way it works it\r
180 can't render any mid-frame image changes (raster effects), so it is useful only\r
181 for some games.\r
182 \r
183 #endif\r
184 #ifdef GIZ\r
185 @@0. "Scanline mode"\r
186 This option was designed to work around slow framebuffer access (the Gizmondo's\r
187 main bottleneck) by drawing every other line (even numbered lines only).\r
188 This improves performance greatly, but looses detail.\r
189 \r
190 #endif\r
191 #ifdef GP2X\r
192 @@0. "Scaling"\r
193 "hw" means GP2X hardware scaler, which causes no performance loss, but scaled\r
194 image looks a bit blocky. "sw" means software scaling, which uses pixel\r
195 averaging and may look a bit nicer, but blurry. Horizontal scaling is only for\r
196 games which use so called "32 column mode" (256x224 or 256x240), and scales\r
197 image width to 320 pixels. Vertical scales height to 240 for games which use\r
198 height 224 (most of them).\r
199 \r
200 #endif\r
201 #ifdef GIZ\r
202 @@0. "Scale low res mode"\r
203 The Genesis/Megadrive had several graphics modes, some of which were only 256\r
204 pixels wide. This option scales their width to 320 by using simple\r
205 pixel averaging scaling. Works only when 16bit renderer is enabled.\r
206 \r
207 #endif\r
208 @@0. "Accurate timing"\r
209 This adds some more emulation precision, but slows the emulation down. Without\r
210 this option some games do not boot (Red Zone for example), others have sound\r
211 problems. This options has no effect for Sega/Mega CD emulation.\r
212 \r
213 @@0. "Accurate sprites"\r
214 This option improves emulation of sprite priorities, it also enables emulation\r
215 of sprite collision bit. If you see one sprite being drawn incorrectly above\r
216 the other (often seen in Sonic 3D Blast), you can enable this to fix the problem.\r
217 This only works with the accurate renderers (see first option).\r
218 \r
219 @@0. "Show FPS"\r
220 Self-explanatory. Format is XX/YY, where XX is the number of rendered frames and\r
221 YY is the number of emulated frames per second.\r
222 \r
223 @@0. "Frameskip"\r
224 How many frames to skip rendering before displaying another.\r
225 "Auto" is recommended.\r
226 \r
227 @@0. "Enable sound"\r
228 Does what it says. You must enable at least YM2612 or SN76496 (in advanced options,\r
229 see below) for this to make sense (already done by default).\r
230 \r
231 @@0. "Sound Quality"\r
232 #ifdef PSP\r
233 Sound sample rate, affects sound quality and emulation performance.\r
234 22050Hz setting is the recommended one.\r
235 #else\r
236 Sound sample rate and stereo mode. Mono is not available in Sega/Mega CD mode.\r
237 #endif\r
238 #ifdef GP2X\r
239 If you want 44100Hz sound, it is recommended to enable the second core (next option).\r
240 \r
241 @@0. "Use ARM940 core for sound"\r
242 This option causes PicoDrive to use ARM940T core (GP2X's second CPU) for sound \r
243 (i.e. to generate YM2612 samples) to improve performance noticeably.\r
244 #endif\r
245 \r
246 @@0. "6 button pad"\r
247 If you enable this, games will think that 6 button gamepad is connected. If you\r
248 go and reconfigure your keys, you will be able to bind X,Y,Z and mode actions.\r
249 \r
250 @@0. "Region"\r
251 This option lets you force the game to think it is running on machine from the\r
252 specified region, or just to set autodetection order. Also affects Sega/Mega CD.\r
253 \r
254 @@0. "Use SRAM/BRAM savestates"\r
255 This will automatically read/write SRAM (or BRAM for Sega/Mega CD) savestates for\r
256 games which are using them. SRAM is saved whenever you enter the menu or exit the\r
257 emulator.\r
258 \r
259 @@0. "Confirm savestate"\r
260 Allows to enable confirmation on savestate saving (to prevent savestate overwrites),\r
261 on loading (to prevent destroying current game progress), and on both or none, when\r
262 using shortcut buttons (not menu) for saving/loading.\r
263 \r
264 @@0. "Save slot"\r
265 This is a slot number to use for savestates. This can also be configured to be\r
266 changed with a button (see "key configuration").\r
267 \r
268 #ifdef GP2X\r
269 @@0. "GP2X CPU clocks"\r
270 Here you can change clocks of both GP2X's CPUs. Larger values increase performance.\r
271 There is no separate option for the second CPU because both CPUs use the same clock\r
272 source. Setting this option to 200 will cause PicoDrive NOT to change GP2X's clocks\r
273 at all (this is if you use external program to set clock).\r
274 \r
275 #endif\r
276 #ifdef PSP\r
277 @@0. "CPU/bus clock"\r
278 This allows to change CPU and bus clocks for PSP. 333MHz is recommended.\r
279 \r
280 @@0. "[Display options]"\r
281 Enters Display options menu (see below).\r
282 \r
283 #endif\r
284 @@0. "[Sega/Mega CD options]"\r
285 Enters Sega/Mega CD options menu (see below).\r
286 \r
287 @@0. "[advanced options]"\r
288 Enters advanced options menu (see below).\r
289 \r
290 @@0. "Save cfg as default"\r
291 If you save your config here it will be loaded on next ROM load, but only if there\r
292 is no game specific config saved (which will be loaded in that case).\r
293 You can press left/right to switch to a different config profile.\r
294 \r
295 @@0. "Save cfg for current game only"\r
296 Whenever you load current ROM again these settings will be loaded\r
297 #ifdef GP2X\r
298 (squidgehack and RAM settings will not take effect until emulator is restarted).\r
299 #endif\r
300 \r
301 \r
302 Advanced configuration\r
303 ----------------------\r
304 \r
305 Enter [advanced options] in config menu to see these options.\r
306 \r
307 #ifdef GP2X\r
308 @@1. "Gamma correction"\r
309 Alters image gamma through GP2X hardware. Larger values make image to look brighter,\r
310 lower - darker (default is 1.0).\r
311 \r
312 @@1. "A_SN's gamma curve"\r
313 If this is enabled, different gamma adjustment method will be used (suggested by A_SN\r
314 from gp32x boards). Basically it makes difference for dark and bright colors.\r
315 \r
316 @@1. "Perfect vsync"\r
317 This one adjusts the LCD refresh rate to better match game's refresh rate and starts\r
318 synchronizing rendering with it. Should make scrolling smoother and eliminate tearing.\r
319 \r
320 #endif\r
321 @@1. "Emulate Z80"\r
322 Enables emulation of Z80 chip, which was mostly used to drive the other sound chips.\r
323 Some games do complex sync with it, so you must enable it even if you don't use\r
324 sound to be able to play them.\r
325 \r
326 @@1. "Emulate YM2612 (FM)"\r
327 This enables emulation of six-channel FM sound synthesizer chip, which was used to\r
328 produce sound effects and music.\r
329 \r
330 @@1. "Emulate SN76496 (PSG)"\r
331 This enables emulation of additional sound chip for additional effects.\r
332 \r
333 Note: if you change sound settings AFTER loading a ROM, you may need to reset\r
334 game to get sound. This is because most games initialize sound chips on\r
335 startup, and this data is lost when sound chips are being enabled/disabled.\r
336 \r
337 #ifdef GIZ\r
338 @@1. "Double buffering"\r
339 Draws the display to offscreen buffer, and flips it with visible one when done.\r
340 Unfortunately this causes serious tearing, unless v-sync is used (next option).\r
341 \r
342 @@1. "Wait for V-sync"\r
343 Waits for vertical sync before drawing (or flipping buffers, if previous option\r
344 is enabled). Emulation is stopped while waiting, so this causes large performance\r
345 hit.\r
346 \r
347 #endif\r
348 @@1. "gzip savestates"\r
349 This will always apply gzip compression on your savestates, allowing you to\r
350 save some space and load/save time.\r
351 \r
352 @@1. "Don't save last used ROM"\r
353 This will disable writing last used ROM to config on exit (what might cause SD\r
354 card corruption according to DaveC).\r
355 \r
356 #ifdef GP2X\r
357 @@1. "craigix's RAM timings"\r
358 This overclocks the GP2X RAM chips, but may cause instability. Recommended if you\r
359 use the second core for sound. Needs emulator restart to take effect.\r
360 See this thread:\r
361 http://www.gp32x.com/board/index.php?showtopic=32319\r
362 \r
363 @@1. "squidgehack"\r
364 Well known way to improve the GP2X performance. You must restart the emulator\r
365 for the change of this option to take effect.\r
366 \r
367 #endif\r
368 \r
369 Sega/Mega CD options \r
370 --------------------\r
371 \r
372 @@2,@@2,@@2. "USA/EUR/JAP BIOS"\r
373 These options just show if your BIOS files were correctly detected by the\r
374 emulator (it shows the filename it is using). If so, you can press Start to\r
375 test your BIOS.\r
376 \r
377 @@2. "CD LEDs"\r
378 The Sega/Mega CD unit had two blinking LEDs (red and green) on it. This option\r
379 will display them on top-left corner of the screen.\r
380 \r
381 @@2. "CDDA audio (using mp3s)"\r
382 This option enables CD audio playback.\r
383 \r
384 @@2. "PCM audio"\r
385 This enables 8 channel PCM sound source. It is required for some games to run,\r
386 because they monitor state of this audio chip.\r
387 \r
388 @@2. "ReadAhead buffer"\r
389 #ifdef GP2X\r
390 This option is for dealing with slow SD card access in GP2X, which makes FMV\r
391 games unplayable. It will allow emulator not to access SD card for longer periods\r
392 of time, but it will take more time to fill the buffer.\r
393 #endif\r
394 #ifdef GIZ\r
395 This option can prefetch more data from the CD then read by the game - not really\r
396 useful for Gizmondo (this is a workaround for SD access problems on GP2X port).\r
397 #endif\r
398 \r
399 @@2. "Save RAM cart"\r
400 Here you can enable 64K RAM cart. Format it in BIOS if you do.\r
401 \r
402 @@2. "Scale/Rot. fx"\r
403 The Sega/Mega CD had scaling/rotation chip, which allows effects similar to\r
404 "Mode 7" effects in SNES. Unfortunately emulating it is slow, and very few games\r
405 used it, so it's better to disable this option, unless game really needs it.\r
406 \r
407 @@2. "Better sync"\r
408 This option is similar to "Perfect synchro" in Gens. Some games require it to run,\r
409 for example most (all?) Wolfteam games, and some other ones. Don't use it for\r
410 games which don't need it, it will just slow them down.\r
411 \r
412 \r
413 #ifdef PSP\r
414 Display options\r
415 ---------------\r
416 \r
417 @@3. "Scale factor"\r
418 This allows to resize the displayed image by using the PSP's hardware. The number is\r
419 used to multiply width and height of the game image to get the size of image to be\r
420 displayed. If you just want to make it fullscreen, just use "Set to fullscreen"\r
421 setting below.\r
422 \r
423 @@3. "Hor. scale (for low res. games)"\r
424 This one works similarly as the previous setting, but can be used to apply additional\r
425 scaling horizontally, and is used for games which use lower (256 pixel wide) Gen/MD\r
426 resolution.\r
427 \r
428 @@3. "Hor. scale (for hi res. games)"\r
429 Same as above, only for higher (320 pixel wide) resolution using games.\r
430 \r
431 @@3. "Bilinear filtering"\r
432 If this is enabled, PSP hardware will apply bilinear filtering on the resulting image,\r
433 making it smoother, but blurry.\r
434 \r
435 @@3. "Wait for vsync"\r
436 Wait for the screen to finish updating before switching to next frame, to avoid tearing.\r
437 There are 3 options:\r
438 * never: don't wait for vsync.\r
439 * sometimes: wait only if emulator is running fast enough.\r
440 * always: always wait (causes emulation slowdown).\r
441 \r
442 @@3. "Set to unscaled centered"\r
443 Adjust the resizing options to set game image to it's original size.\r
444 \r
445 @@3. "Set to fullscreen"\r
446 Adjust the resizing options to make the game image fullscreen.\r
447 \r
448 \r
449 #endif\r
450 Key configuration\r
451 -----------------\r
452 \r
453 Select "Configure controls" from the main menu. Then select "Player 1" and you will\r
454 see two columns. The left column lists names of Genesis/MD controller buttons, and\r
455 #ifdef GP2X\r
456 the right GP2X ones, which are assigned to them. If you bind 2 different GP2X buttons\r
457 #endif\r
458 #ifdef GIZ\r
459 the right Giz ones, which are assigned to them. If you bind 2 different Giz buttons\r
460 #endif\r
461 #ifdef PSP\r
462 the right PSP ones, which are assigned to them. If you bind 2 different PSP buttons\r
463 #endif\r
464 to the same action, you will get a combo (which means that you will have to press\r
465 both buttons for that action to happen.\r
466 \r
467 \r
468 Cheat support\r
469 -------------\r
470 \r
471 To use GG/patch codes, you must type them into your favorite text editor, one\r
472 per line. Comments may follow code after a whitespace. Only GameGenie and\r
473 Genecyst patch formats are supported.\r
474 Examples:\r
475 \r
476 Genecyst patch (this example is for Sonic):\r
477 \r
478 00334A:0005 Start with five lives\r
479 012D24:0001 Keep invincibility until end of stage\r
480 009C76:5478 each ring worth 2\r
481 009C76:5678 each ring worth 3\r
482 ...\r
483 \r
484 Game Genie patch (for Sonic 2):\r
485 \r
486 ACLA-ATD4 Hidden palace instead of death egg in level select\r
487 ...\r
488 \r
489 Both GG and patch codes can be mixed in one file.\r
490 \r
491 When the file is ready, name it just like your ROM file, but with additional\r
492 .pat extension, making sure that case matches.\r
493 \r
494 Examples:\r
495 \r
496 ROM: Sonic.zip\r
497 PATCH FILE: Sonic.zip.pat\r
498 \r
499 ROM: Sonic 2.bin\r
500 PATCH FILE: Sonic 2.bin.pat\r
501 \r
502 Put the file into your ROMs directory. Then load the .pat file as you would\r
503 a ROM. Then Cheat Menu Option should appear in main menu.\r
504 \r
505 \r
506 What is emulated?\r
507 -----------------\r
508 \r
509 Genesis/MegaDrive:\r
510 #ifdef PSP\r
511 main 68k @ 7.6MHz: yes, FAME/C core\r
512 z80 @ 3.6MHz: yes, CZ80 core\r
513 #else\r
514 main 68k @ 7.6MHz: yes, Cyclone core\r
515 z80 @ 3.6MHz: yes, DrZ80 core\r
516 #endif\r
517 VDP: yes, except some quirks not used by games\r
518 YM2612 FM: yes, optimized MAME core\r
519 SN76489 PSG: yes, MAME core\r
520 \r
521 Sega/Mega CD:\r
522 #ifdef PSP\r
523 another 68k @ 12.5MHz: yes, FAME/C too\r
524 #else\r
525 another 68k @ 12.5MHz: yes, Cyclone too\r
526 #endif\r
527 gfx scaling/rotation chip (custom ASIC): yes\r
528 PCM sound source: yes\r
529 CD-ROM controller: yes (mostly)\r
530 bram (internal backup RAM): yes\r
531 \r
532 \r
533 Problems / limitations\r
534 ----------------------\r
535 \r
536 * 32x and SVP are not emulated.\r
537 * Various VDP quirks (window bug, scroll size 2, etc.) are not emulated,\r
538   as very few games use this (if any at all).\r
539 * Some games don't work or have glitches because of inaccurate timing and sync\r
540   between the emulated chips.\r
541 \r
542 \r
543 Credits\r
544 -------\r
545 \r
546 This emulator is made of the code from following people/projects:\r
547 \r
548 notaz\r
549 GP2X, UIQ, PSP, Gizmondo ports, CPU core hacks,\r
550 lots of additional coding (see changelog).\r
551 Homepage: http://notaz.gp2x.de/\r
552 \r
553 Dave\r
554 Cyclone 68000 core, Pico emulation library\r
555 Homepage: http://www.finalburn.com/\r
556 \r
557 #ifdef PSP\r
558 Chui\r
559 FAME/C 68k interpreter core\r
560 (based on C68K by Stephane Dallongeville)\r
561 \r
562 Stephane Dallongeville (written), NJ (optimized)\r
563 CZ80 Z80 interpreter core\r
564 \r
565 #else\r
566 Reesy & FluBBa\r
567 DrZ80, the Z80 interpreter written in ARM assembly.\r
568 Homepage: http://reesy.gp32x.de/\r
569 \r
570 #endif\r
571 Tatsuyuki Satoh, Jarek Burczynski, MAME development\r
572 software implementation of Yamaha FM sound generator\r
573 \r
574 MAME development\r
575 Texas Instruments SN76489 / SN76496 programmable tone/noise generator\r
576 Homepage: http://www.mame.net/\r
577 \r
578 Stephane Dallongeville\r
579 Gens, MD/Mega CD/32X emulator. Most Sega CD code is based on this emu.\r
580 #ifdef PSP\r
581 \r
582 people @ ps2dev.org forums / PSPSDK crew\r
583 libaudiocodec code (by cooleyes)\r
584 other sample code\r
585 #else\r
586 \r
587 Helix community\r
588 Helix mp3 decoder\r
589 #endif\r
590 \r
591 \r
592 Additional thanks\r
593 -----------------\r
594 \r
595 * Charles MacDonald (http://cgfm2.emuviews.com/) for old but still very useful\r
596   info about genesis hardware.\r
597 * Steve Snake for all that he has done for Genesis emulation scene.\r
598 * Bart Trzynadlowski for his SSFII and 68000 docs.\r
599 * Haze for his research (http://haze.mameworld.info).\r
600 * Mark and Jean-loup for zlib library.\r
601 * ketchupgun for the skin.\r
602 #ifdef GP2X\r
603 * rlyeh and all the other people behind the minimal library.\r
604 * Squidge for his famous squidgehack(tm).\r
605 * Dzz for his ARM940 sample code.\r
606 * GnoStiC & Puck2099 for USB joystick support.\r
607 * Hermes PS2R, god_at_hell for the CpuCtrl library.\r
608 * A_SN for his gamma code.\r
609 * craigix for supplying the GP2X hardware and making this port possible.\r
610 * Alex for the icon.\r
611 * All the people from gp32x boards for their support.\r
612 #endif\r
613 #ifdef GIZ\r
614 * Kingcdr's for the SDK and Reesy for the DLL and sound code.\r
615 * jens.l for supplying the Gizmondo hardware and making this port possible.\r
616 #endif\r
617 #ifdef UIQ\r
618 * Peter van Sebille for his various open-source Symbian projects to learn from.\r
619 * Steve Fischer for his open-source Motorola projects.\r
620 * The development team behind "Symbian GCC Improvement Project"\r
621   (http://www.inf.u-szeged.hu/symbian-gcc/) for their updated pre-SymbianOS9\r
622   compile tools.\r
623 * AnotherGuest for all his Symbian stuff and support.\r
624 * Inder for the icons.\r
625 #endif\r
626 * Anyone else I forgot. You know who you are.\r
627 \r
628 \r
629 Changelog\r
630 ---------\r
631 1.35b\r
632   * PSP: mp3 code should no longer fail on 1.5 firmware.\r
633   + PSP: added gamma adjustment option.\r
634   * Fixed a sram bug in memhandlers (fixes Shining in the Darkness saves).\r
635   * PSP: fixed another bug in memhanlers, which crashed the emu for some games\r
636     (like NBA Jam).\r
637 \r
638 1.35a\r
639   * PSP: fixed a bug which prevented to load any ROMs after testing the BIOS.\r
640   * PSP: fixed incorrect CZ80 memory map setup, which caused Z80 crashes and\r
641     graphics corruption in EU Mega CD model1 BIOS menus.\r
642   + PSP: added additional "set to 4:3 scaled" display option for convenience.\r
643   + Added an option to disable frame limitter (works only with non-auto frameskip).\r
644 \r
645 1.35\r
646   + PSP port added. Lots of new code for it. Integrated modified FAME/C, CZ80 cores.\r
647   + Some minor generic optimizations.\r
648   * Patched some code which was crashing under PSP, but was working in GP2X/Giz\r
649     (although it should have crashed there too).\r
650   * Readme updated.\r
651 \r
652 1.34\r
653   + Gizmondo port added.\r
654   + Some new optimizations in memory handlers, and for shadow/hilight mode.\r
655   + Added some hacks to make more games work without enabling "accurate timing".\r
656   * Adjusted timing for "accurate timing" mode and added preliminary VDP FIFO\r
657     emulation. Fixes Double Dragon 2, tearing in Chaos Engine and some other games.\r
658   * Fixed a few games not having sound at startup.\r
659   * Updated serial EEPROM code to support more games. Thanks to EkeEke for\r
660     providing info about additional EEPROM types and game mappers.\r
661   * The above change fixed hang of NBA Jam.\r
662   * Minor adjustments to control configurator.\r
663 \r
664 1.33\r
665   * Updated Cyclone core to 0.0088.\r
666   + Added A r k's usbjoy fix.\r
667   + Added "perfect vsync" option, which adjusts GP2X LCD refresh rate and syncs\r
668     emulation to it to eliminate tearing and ensure smoothest scrolling possible.\r
669   + Added an option to use A_SN's camma curve for gamma correction (improves dark\r
670     and bright color display for mk2s).\r
671   * Sometimes stray sounds were played after loading a savestate. Fixed.\r
672   * Fixed a problem where >6MB mp3s were corrupted in memory (sound glitches in\r
673     Snatcher).\r
674   * PD no longer overwrites video player code in memory, video player now can be\r
675     used after exiting PicoDrive.\r
676   * Fixed a bug which was causing Sonic 3 code to deadlock in some rare conditions\r
677     if "accurate timing" was not enabled.\r
678   * Fixed support for large hacked ROMs like "Ultimate Mortal Kombat Trilogy".\r
679     Upto 10MB hacked ROMs are supported now.\r
680   + Config profiles added (press left/right when saving config).\r
681   * Changed key configuration behavior to the one from gpfce (should be more\r
682     intuitive).\r
683   + Added some skinning capabilities to the menu system with default skin by\r
684     ketchupgun. Delete skin directory if you want old behaviour.\r
685   * Some other little tweaks I forgot about.\r
686 \r
687 1.32\r
688   + Added some new scaling options.\r
689   + Added ability to reload CD images while game is running (needed for games\r
690     with multiple CDs, like Night Trap).\r
691   + Added RAM cart emulation.\r
692   * Fixed DMA timing emulation (caused lock-ups for some genesis games).\r
693   * Idle loop detection was picking up wrong code and causing glitches, fixed.\r
694   * The ym2612 code on 940 now can handle multiple updates per frame\r
695     (fixes Thunger Force III "seiren" level drums for example).\r
696   * Memory handlers were ignoring some writes to PSG chip, fixed (missing sounds in\r
697     Popful Mail, Silpheed).\r
698   * Improved z80 timing, should fix some sound problems.\r
699   * Fixed a bug with sram register (fixes Phantasy Star 4).\r
700   * ROM loader was incorrectly identifying some ROMs as invalid. Fixed.\r
701   * Added code for PRG ram write protection register (Dungeon Explorer).\r
702   * The memory mode register change in 1.31 was unsafe and caused some glitches in\r
703     AH-3 Thunderstrike. Fixed.\r
704   * Fixed a file descriptor leak.\r
705   * Updated documentation, added Gmenu2x manual.\r
706 \r
707 1.31\r
708   * Changed the way memory mode register is read (fixes Lunar 2, broken in 1.30).\r
709   * Fixed TAS opcode on sub-68k side (fixes Batman games).\r
710   * File browser now filters out mp3s, saves and some other files, which are not ROMS.\r
711 \r
712 1.30\r
713   + ISO files now can be zipped. Note that this causes VERY long loading times.\r
714   + Added data pre-buffering support, this allows to reduce frequency of short pauses\r
715     in FMV games (caused by SD access), but makes those pauses longer.\r
716   * Fixed PCM DMA transfers (intro FMV in Popful Mail).\r
717   + Properly implemented "decode" data transformation (Jaguar XJ220).\r
718   * Integrated "better sync" code into cyclone code, what made this mode much faster.\r
719   * Fixed a bug related to game specific config saving.\r
720   * Frameskipper was skipping sound processing, what caused some audio desyncs. Fixed.\r
721   * Fixed reset not working for some games.\r
722   + New assembly optimized memory handlers for CD (gives at least a few fps).\r
723     Also re-enabled all optimizations from 0.964 release.\r
724   + New idle-loop detection code for sub-68k. Speeds up at least a few games.\r
725 \r
726 1.201\r
727   + Added basic cheat support (GameGenie and Genecyst patches).\r
728 \r
729 1.20\r
730   * Fixed a long-standing problem in audio mixing code which caused slight distortions\r
731     at lower sample rates.\r
732   * Changed the way 920 and 940 communicates (again), should be more reliable and give\r
733     slight performance increase.\r
734   * Some optimizations in audio mixing code.\r
735   * Some menu changes (background added, smaller font in ROM browser, savestate loader\r
736     now can select slots).\r
737   + 1M mode DMA transfers implemented (used by FMV games like Night Trap and Sewer Shark).\r
738   + Games now can run code from WORD RAM in 1M mode (fixes Adventures of Willy Beamish).\r
739   + "Cell arrange" address mapping is now emulated (Heart of the alien).\r
740   + "Color numeric operation" is now emulated (text in Lunar 2, Silpheed intro graphics).\r
741   + "Better sync" option added (prevents some games from hanging).\r
742 \r
743 1.14\r
744   + Region autodetection now can be customized.\r
745   * When CDDA music tracks changed, old buffer contents were incorrectly played. Fixed.\r
746   * BRAM is now automatically formatted (no need to enter BIOS menu and format any more).\r
747   * Games now can be reset, CDDA music no longer breaks after loading another ISO.\r
748   * Fixed a race condition between 920 and 940 which sometimes caused CDDA music not to play.\r
749   + Savestates implemented for Sega/Mega CD.\r
750   + PCM sound added.\r
751   * Some mixer code rewritten in asm. 22kHz and 11kHz sound rates are now supported in\r
752     Mega CD mode (but mp3s must still be 44kHz stereo).\r
753   + Timer emulation added.\r
754   * CDC DMA tansfers fixed. Snatcher and probably some more games now boot.\r
755   * 2M word RAM -> VDP transfers fixed, no more corruption in Ecco and some other games.\r
756 \r
757 1.10\r
758   + GP2X: Added experimental Sega CD support.\r
759   + GP2X: Added partial gmv movie playback support.\r
760 \r
761 0.964\r
762   * GP2X: Fixed a sound buffer underflow issue on lower sample rate modes, which was\r
763           happening for NTSC games and causing sound clicks.\r
764   * GP2X: Redone key config to better support USB joysticks (now multiple joysticks\r
765           should be useable and configurable).\r
766   + GP2X: Added save confirmation option.\r
767   + GP2X: Added 940 CPU crash detection.\r
768   + ALL:  UIQ3 port added.\r
769 \r
770 0.963\r
771   * GP2X: Gamma-reset-on-entering-menu bug fixed.\r
772   * GP2X: Recompiled PicoDrive with gcc profiling option set as described here:\r
773           http://www.gp32x.com/board/index.php?showtopic=28490\r
774 \r
775 0.962\r
776   * GP2X: Fixed an issue with incorrect sounds in some games when dualcore operation\r
777           was enabled (for example punch sound in SOR).\r
778   * GP2X: Limited max volume to 90, because higher values often cause distortions.\r
779   * GP2X: Fixed a bug with lower res scaling.\r
780   * GP2X: Gamma is now reset on exit.\r
781 \r
782 0.96\r
783   * ALL:  Severely optimized MAME's YM2612 core, part of it is now rewritten in asm.\r
784   + GP2X: The YM2612's code now can be run in GP2X's ARM940T CPU, what causes large\r
785           performance increase.\r
786   * ALL:  Accurate renderers are slightly faster now.\r
787   + GP2X: Using quadruple buffering instead of doublebuffer now, also updated\r
788           framelimitter, this should eliminate some scrolling and tearing problems.\r
789   * GP2X: Fixed some flickering issues of 8bit accurate renderer.\r
790   + GP2X: craigix's RAM timings now can be enabled in the menu (see advanced options).\r
791   + GP2X: Added ability to save config for specific games only.\r
792   + GP2X: Gamma control added (using GP2X's hardware capabilities for this).\r
793   * GP2X: Volume keys are now configurable.\r
794   + GP2X: GnoStiC added USB joystick support, I made it possible to use it for\r
795           player 2 control (currently untested).\r
796   * GP2X: squidgehack is now applied through kernel module (cleaner way).\r
797 \r
798 0.95\r
799   * ALL:  Fixed a bug in sprite renderer which was causing slowdowns for some games.\r
800   + GP2X: Added command line support\r
801   + GP2X: Added optional hardware scaling for lower-res games like Shining Force.\r
802   * ALL:  Sound chips are now sampled 2 times per frame. This fixed some games which\r
803           had missing sounds (Vectorman 2 1st level, Thunder Force 3 water level,\r
804               etc.).\r
805   + ALL:  Added another accurate 8-bit renderer which is slightly faster and made it\r
806           default.\r
807 \r
808 0.945\r
809   + GP2X: Added frame limiter for frameskipped modes.\r
810   * GP2X: Increased brightness a bit (unused pixel bits now also contain data).\r
811   * GP2X: Suidgehack was not applied correctly (was applied before allocating some\r
812           high memory and had no effect).\r
813 \r
814 0.94\r
815   + Added GP2X port.\r
816   * Improved interrupt timing, Mazin Saga and Burning Force now works.\r
817   * Rewritten renderer code to better suit GP2X, should be faster on other\r
818     ports too.\r
819   + Added support for banking used by 12-in-1 and 4-in-1 ROMs (thanks Haze).\r
820   + Added some protection device faking, used by some unlicensed games like\r
821     Super Bubble Bobble, King of Fighters, Elf Wor, ... (thanks to Haze again)\r
822   + Added primitive Virtua Racing SVP faking, so menus can be seen now.\r
823 \r
824 0.93\r
825   * Fixed a problem with P900/P910 key configuration in FC mode.\r
826   * Improved shadow/hilight mode emulation. Still not perfect, but should be\r
827     enough for most games.\r
828   + Save state slots added.\r
829   + Region selector added.\r
830 \r
831 0.92\r
832   VDP changes:\r
833   * VDP emulation is now more accurate (fixes flickering in Chase HQ II,\r
834     Super Hang-On and some other problems in other games).\r
835   * HV counter emulation is now much more accurate. Fixes the Asterix games,\r
836     line in Road Rash 3, etc.\r
837   * Minor sprite and layer scroll masking bugs fixed.\r
838   + Added partial interlace mode renderer (Sonic 2 vs mode)\r
839   * Fixed a crash in both renderers when certain size window layers were used.\r
840   + Added emulation of shadow/hilight operator sprites. Other shadow/hilight\r
841     effects are still unemulated.\r
842   + Sprite emulation is more accurate, sprite limit is emulated.\r
843   + Added "accurate sprites" option, which always draws sprites in correct\r
844     order and emulates sprite collision bit, but is significantly slower.\r
845 \r
846   Emulation changes:\r
847   * Improved interrupt handling, added deferred interrupt emulation\r
848     (Lemmings, etc).\r
849   + Added serial EEPROM SRAM support (Wonder Boy in Monster World,\r
850     Megaman - The Wily Wars and many EA sports games like NBA Jam).\r
851   + Implemented ROM banking for Super Street Fighter II - The New Challengers\r
852   * Updated to the latest version of DrZ80 core, integrated memory handlers\r
853     in it for better performance. A noticeable performance increase, but save\r
854         states may not work from the previous version (you can only use them with\r
855         sound disabled in that case).\r
856   + SRAM word read handler was using incorrect byte order, fixed.\r
857 \r
858   Changes in Cyclone 0.0086:\r
859   + Added missing CHK opcode handler (used by SeaQuest DSV).\r
860   + Added missing TAS opcode handler (Gargoyles,Bubba N Stix,...). As in real genesis,\r
861     memory write-back phase is ignored (but can be enabled in config.h if needed).\r
862   + Added missing NBCD and TRAPV opcode handlers.\r
863   + Added missing addressing mode for CMP/EOR.\r
864   + Added some minor optimizations.\r
865   - Removed 216 handlers for 2927 opcodes which were generated for invalid addressing modes.\r
866   + Fixed flags for ASL, NEG, NEGX, DIVU, ADDX, SUBX, ROXR.\r
867   + Bugs fixed in MOVEP, LINK, ADDQ, DIVS handlers.\r
868   * Undocumented flags for CHK, ABCD, SBCD and NBCD are now emulated the same way as in Musashi.\r
869   + Added Uninitialized Interrupt emulation.\r
870   + Altered timing for about half of opcodes to match Musashi's.\r
871 \r
872 0.80\r
873   * Nearly all VDP code was rewritten in ARM asm. Gives ~10-25% performance\r
874     increase (depends on game).\r
875   * Optimized 32-column renderer not to render tiles offscreen, games which\r
876     use 32-column display (like Shining Force) run ~50% faster.\r
877   + Added new "Alternative renderer", which gives another ~30-45% performance\r
878     increase (in addition to mentioned above), but works only with some games,\r
879     because it is missing some features (it uses tile-based renderering\r
880     instead of default line-based and disables H-ints).\r
881   + Added "fit2" display mode for all FC gamers. It always uses 208x146 for\r
882     P800 and 208x208 for all other phones.\r
883   + Added volume control for Motorolas (experimental).\r
884 \r
885   VDP changes:\r
886   + Added support for vertical window (used by Vapor Trail, Mercs, GRIND\r
887     Stormer and others).\r
888   + Added sprite masking (hiding), adds some speed.\r
889   + Added preliminary H counter emulation. Comix Zone and Sonic 3D Blast\r
890     special stage are now playable.\r
891   + Added column based vertical scrolling (Gunstar Heroes battleship level,\r
892     Sonic and Knuckles lava boss, etc).\r
893 \r
894   Emulation changes:\r
895   + Re-added and improved Z80 faking when Z80 is disabled. Many games now can\r
896     be played without enabling Z80 (Lost Vikings, Syndicate, etc), but some\r
897     still need it (International Superstar Soccer Deluxe).\r
898   * Improved ym2612 timers, Outrun music plays at correct speed, voices in\r
899     Earthworm Jim play better, more games play sound.\r
900   * I/O registers now remember their values (needed for Pirates! Gold)\r
901   + Added support for 6 button pad.\r
902 \r
903   Changes in Cyclone 0.0083wip:\r
904   + Added missing CHK opcode (used by SeaQuest DSV).\r
905   + Added missing TAS opcode (Gargoyles). As in real genesis, write-back phase\r
906     is ignored (but is enabled for other systems).\r
907 \r
908   Backported stuff from Snes9x:\r
909   * Fixed Pxxx jog up/down which were not working in game.\r
910   + Added an option to gzip save states to save space.\r
911   + The emulator now pauses whenever it is loosing focus, so it will now pause\r
912     when alarm/ponecall/battery low/... windows come up.\r
913   - Removed 'pause on phonecall' feature, as it is no longer needed.\r
914   + Video fix for asian A1000s.\r
915 \r
916 0.70\r
917   * Started using tools from "Symbian GCC Improvement Project", which give\r
918     considerable speed increase (~4fps in "center 90" mode).\r
919   * Rewrote some drawing routines in ARM assembly (gives ~6 more fps in\r
920     "center 90" mode).\r
921   * Minor improvement to 0 and 180 "fit" modes. Now they look slightly better\r
922     and are faster.\r
923   * Minor stability improvements (emulator is less likely to crash).\r
924   + Added some background for OSD text for better readability.\r
925   + Added Pal/NTSC detection. This is needed for proper sound speed.\r
926   + Implemented Reesy's DrZ80 Z80 emu. Made some changes to it with hope to make\r
927     it faster.\r
928   + Implemented ym2612 emu from the MAME project. Runs well but sometimes sounds\r
929     a bit weird. Could be a little faster, so made some changes too.\r
930   + Implemented SN76489 emu from the MAME project.\r
931   + Added two separate sound output methods (mediaserver and cmaudiofb) with\r
932     autodetection (needs testing).\r
933   * Fixed VDP DMA fill emulation (as described in Charles MacDonald's docs),\r
934     fixes Contra and some other games.\r
935 \r
936 0.301\r
937   Launcher:\r
938   * Launcher now starts emulation process from current directory,\r
939     not from hardcoded paths.\r
940   * Improved 'pause on call' feature, should hopefully work with Motorola phones.\r
941 \r
942 0.30\r
943   Initial release.\r
944 \r
945 \r
946 Disclaimer\r
947 ----------\r
948 \r
949 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" \r
950 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
951 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
952 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r
953 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r
954 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r
955 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \r
956 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \r
957 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \r
958 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \r
959 POSSIBILITY OF SUCH DAMAGE. \r
960 \r
961 SEGA/Genesis/MegaDrive/SEGA-CD/Mega-CD/32X are trademarks of\r
962 Sega Enterprises Ltd.\r
963 \r