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