buffering, PCM DMA, memcpy12bswap
[picodrive.git] / platform / readme.txt
1 \r
2 About\r
3 -----\r
4 \r
5 This version of PicoDrive is another enhanced version of Dave's\r
6 Megadrive / Genesis emulator for Pocket PC, which now can also emulate\r
7 Sega/Mega CD. The original Dave's code was heavily modified (including\r
8 Cyclone core), parts of it were rewritten in asm, many features added,\r
9 accuracy increased. Sega/Mega CD emulation is mostly based on Gens code.\r
10 This version is aimed at ARM-based handheld devices, so ports exist for\r
11 GP2X handheld console, Symbian smartphones and other devices.\r
12 \r
13 \r
14 How to make it run\r
15 ------------------\r
16 \r
17 Copy PicoDrive.gpe, code940.bin and mmuhack.o to any place in your filesystem\r
18 (all 3 files must be in the same directory) and run PicoDrive.gpe.\r
19 Then load a ROM and enjoy! ROMs can be in .smd or .bin format and can be zipped.\r
20 \r
21 If you have any problems (game does not boot, sound is glitchy, broken graphics),\r
22 make sure you enable "Accurate timing", "Emulate Z80" and then disable\r
23 "Fast renderer". This way you will get the best compatibility this emulator can\r
24 provide.\r
25 \r
26 \r
27 How to run Sega/Mega CD games\r
28 -----------------------------\r
29 \r
30 To play any game, you need BIOS files. These files must be copied to the same\r
31 directory as PicoDrive.gpe. Files can be named as follows:\r
32 US: us_scd1_9210.bin us_scd2_9306.bin SegaCDBIOS9303.bin\r
33 EU: eu_mcd1_9210.bin eu_mcd2_9303.bin eu_mcd2_9306.bin\r
34 JP: jp_mcd1_9112.bin jp_mcd1_9111.bin\r
35 these files can also be zipped.\r
36 \r
37 The game must be dumped to ISO format, but BIN can be used too. If you want\r
38 CD music, you must use ISO+mp3 files. Audio from BIN files won't be read at\r
39 all due to SD access issues. Also BIN files are usually larger, so it's better\r
40 to use ISO. ISO+mp3 files can be named similarly as for other emus.\r
41 Here are some examples:\r
42 \r
43 SonicCD.iso             data track\r
44 SonicCD_02.mp3          audio track 1 (CD track 2)\r
45 SonicCD_03.mp3\r
46 ...\r
47 \r
48 Sonic the Hedgehog CD (US) - Track 01.iso\r
49 Sonic the Hedgehog CD (US) - Track 02.mp3\r
50 Sonic the Hedgehog CD (US) - Track 03.mp3\r
51 ...\r
52 \r
53 ISO files can also be zipped (but not mp3 files, as they are already\r
54 compressed). Note that this can cause very long loading times, which may\r
55 take up to several minutes. File naming is similar as with uncompressed ISOs.\r
56 Example:\r
57 \r
58 SonicCD.zip             data track\r
59 SonicCD_02.mp3          audio track 1 (CD track 2)\r
60 SonicCD_03.mp3\r
61 ...\r
62 \r
63 \r
64 Configuration\r
65 -------------\r
66 \r
67 See config.txt file.\r
68 \r
69 \r
70 Other important stuff\r
71 ---------------------\r
72 \r
73 * When you use both GP2X CPUs, keep in mind that you can't overclock as high as\r
74   when using ARM920 only. For example my GP2X when run singlecore can reach\r
75   280MHz, but with both cores it's about 250MHz. When overclocked too much,\r
76   it may start hanging and producing random noise.\r
77 * PicoDrive is not a mp3 player, so all mp3s MUST be encoded at 44.1kHz stereo.\r
78   Otherwise mp3s will play too fast or too slow.\r
79 * Due to internal implementation mp3s must not be larger that ~15MB\r
80   (15548416 bytes). Larger mp3s will not be fully loaded.\r
81 * Use lower bitrate for better performance (96 or 128kbps CBRs recommended).\r
82 * RAM timings option is good for dualcore operation (it is disabled by\r
83   default because it doesn't work on every GP2X, so enable it in advanced\r
84   options).\r
85 \r
86 \r
87 Cheat support\r
88 -------------\r
89 \r
90 To use GG/patch codes, you must type them into your favorite text editor, one\r
91 per line. Comments may follow code after a whitespace. Only GameGenie and\r
92 Genecyst patch formats are supported.\r
93 Examples:\r
94 \r
95 Genecyst patch (this example is for Sonic):\r
96 \r
97 00334A:0005 Start with five lives\r
98 012D24:0001 Keep invincibility until end of stage\r
99 009C76:5478 each ring worth 2\r
100 009C76:5678 each ring worth 3\r
101 ...\r
102 \r
103 Game Genie patch (for Sonic 2):\r
104 \r
105 ACLA-ATD4 Hidden palace instead of death egg in level select\r
106 ...\r
107 \r
108 Both GG and patch codes can be mixed in one file.\r
109 \r
110 When the file is ready, name it just like your ROM file, but with additional\r
111 .pat extension, making sure that case matches.\r
112 \r
113 Examples:\r
114 \r
115 ROM: Sonic.zip\r
116 PATCH FILE: Sonic.zip.pat\r
117 \r
118 ROM: Sonic 2.bin\r
119 PATCH FILE: Sonic 2.bin.pat\r
120 \r
121 Put the file into your ROMs directory. Then load the .pat file as you would\r
122 a ROM. Then Cheat Menu Option should appear in main menu.\r
123 \r
124 \r
125 What is emulated?\r
126 -----------------\r
127 \r
128 Genesis/MegaDrive:\r
129 main 68k @ 7.6MHz: yes, Cyclone core\r
130 z80 @ 3.6MHz: yes, DrZ80 core\r
131 VDP: yes, except some quirks not used by games\r
132 YM2612 FM: yes, optimized MAME core\r
133 SN76489 PSG: yes, MAME core\r
134 \r
135 Sega/Mega CD:\r
136 another 68k @ 12.5MHz: yes, Cyclone too\r
137 gfx scaling/rotation chip (custom ASIC): not yet (faked only)\r
138 PCM sound source: yes\r
139 CD-ROM controller: yes (mostly)\r
140 bram (internal backup RAM): yes\r
141 \r
142 \r
143 Problems / limitations\r
144 ----------------------\r
145 \r
146 * 32x and SVP are not emulated.\r
147 * Various VDP quirks (window bug, scroll size 2, etc.) are not emulated,\r
148   as very few games use this (if any at all).\r
149 * Some games don't work or have glitches because of inaccurate timing and sync\r
150   between the emulated chips.\r
151 \r
152 \r
153 Credits\r
154 -------\r
155 \r
156 This emulator uses code from these people/projects:\r
157 \r
158 Dave\r
159 Cyclone 68000 core, Pico emulation library\r
160 Homepage: http://www.finalburn.com/\r
161 \r
162 notaz\r
163 GP2X port, Cyclone 68000 hacks, lots of additional coding (see changelog).\r
164 \r
165 Reesy & FluBBa\r
166 DrZ80, the Z80 emulator written in ARM assembly.\r
167 Homepage: http://reesy.gp32x.de/\r
168 \r
169 Tatsuyuki Satoh, Jarek Burczynski, MultiArcadeMachineEmulator development\r
170 software implementation of Yamaha FM sound generator\r
171 \r
172 MultiArcadeMachineEmulator (MAME) development\r
173 Texas Instruments SN76489 / SN76496 programmable tone /noise generator\r
174 Homepage: http://www.mame.net/\r
175 \r
176 Stephane Dallongeville\r
177 Gens, MD/Mega CD/32X emulator. Most Sega CD code is based on this emu.\r
178 \r
179 Helix community\r
180 Helix mp3 decoder\r
181 \r
182 \r
183 Additional thanks\r
184 -----------------\r
185 \r
186 * Charles MacDonald (http://cgfm2.emuviews.com/) for old but still very useful\r
187   info about genesis hardware.\r
188 * Steve Snake for all that he has done for Genesis emulation scene.\r
189 * Bart Trzynadlowski for his SSFII and 68000 docs.\r
190 * Haze for his research (http://haze.mameworld.info).\r
191 * Mark and Jean-loup for zlib library.\r
192 * Anyone else I forgot. You know who you are.\r
193 \r
194 GP2X:\r
195 * rlyeh and all the other people behind the minimal library.\r
196 * Squidge for his famous squidgehack(tm).\r
197 * Dzz for his ARM940 sample code.\r
198 * GnoStiC & Puck2099 for USB joystick support.\r
199 * Hermes PS2R, god_at_hell for the CpuCtrl library.\r
200 * craigix for supplying the GP2X hardware and making this port possible.\r
201 \r
202 Symbian:\r
203 * Peter van Sebille for his various open-source Symbian projects to learn from.\r
204 * Steve Fischer for his open-source Motorola projects.\r
205 * The development team behind "Symbian GCC Improvement Project"\r
206   (http://www.inf.u-szeged.hu/symbian-gcc/) for their updated pre-SymbianOS9\r
207   compile tools.\r
208 * AnotherGuest for all his Symbian stuff and support.\r
209 * Inder for the icons.\r
210 \r
211 \r
212 Changelog\r
213 ---------\r
214 1.2x\r
215   + ISO files now can be zipped. Note that this causes VERY long loading times.\r
216   + Added data pre-buffering support, this allows to reduce frequency of short pauses\r
217     in FMV games, but makes those pauses longer.\r
218   * Fixed PCM DMA transfers (intro FMV in Popful Mail).\r
219 \r
220 1.201\r
221   + Added basic cheat support (GameGenie and Genecyst patches).\r
222 \r
223 1.20\r
224   * Fixed a long-standing problem in audio mixing code which caused slight distortions\r
225     at lower sample rates.\r
226   * Changed the way 920 and 940 communicates (again), should be more reliable and give\r
227     slight performance increase.\r
228   * Some optimizations in audio mixing code.\r
229   * Some menu changes (background added, smaller font in ROM browser, savestate loader\r
230     now can select slots).\r
231   + 1M mode DMA transfers implemented (used by FMV games like Night Trap and Sewer Shark).\r
232   + Games now can run code from WORD RAM in 1M mode (fixes Adventures of Willy Beamish).\r
233   + "Cell arrange" address mapping is now emulated (Heart of the alien).\r
234   + "Color numeric operation" is now emulated (text in Lunar 2, Silpheed intro graphics).\r
235   + "Better sync" option added (prevents some games from hanging).\r
236 \r
237 1.14\r
238   + Region autodetection now can be customized.\r
239   * When CDDA music tracks changed, old buffer contents were incorrectly played. Fixed.\r
240   * BRAM is now automatically formatted (no need to enter BIOS menu and format any more).\r
241   * Games now can be reset, CDDA music no longer breaks after loading another ISO.\r
242   * Fixed a race condition between 920 and 940 which sometimes caused CDDA music not to play.\r
243   + Savestates implemented for Sega/Mega CD.\r
244   + PCM sound added.\r
245   * Some mixer code rewritten in asm. 22kHz and 11kHz sound rates are now supported in\r
246     Mega CD mode (but mp3s must still be 44kHz stereo).\r
247   + Timer emulation added.\r
248   * CDC DMA tansfers fixed. Snatcher and probably some more games now boot.\r
249   * 2M word RAM -> VDP transfers fixed, no more corruption in Ecco and some other games.\r
250 \r
251 1.10\r
252   + GP2X: Added experimental Sega CD support.\r
253   + GP2X: Added partial gmv movie playback support.\r
254 \r
255 0.964\r
256   * GP2X: Fixed a sound buffer underflow issue on lower sample rate modes, which was\r
257           happening for NTSC games and causing sound clicks.\r
258   * GP2X: Redone key config to better support USB joysticks (now multiple joysticks\r
259           should be useable and configurable).\r
260   + GP2X: Added save confirmation option.\r
261   + GP2X: Added 940 CPU crash detection.\r
262   + ALL:  UIQ3 port added.\r
263 \r
264 0.963\r
265   * GP2X: Gamma-reset-on-entering-menu bug fixed.\r
266   * GP2X: Recompiled PicoDrive with gcc profiling option set as described here:\r
267           http://www.gp32x.com/board/index.php?showtopic=28490\r
268 \r
269 0.962\r
270   * GP2X: Fixed an issue with incorrect sounds in some games when dualcore operation\r
271           was enabled (for example punch sound in SOR).\r
272   * GP2X: Limited max volume to 90, because higher values often cause distortions.\r
273   * GP2X: Fixed a bug with lower res scaling.\r
274   * GP2X: Gamma is now reset on exit.\r
275 \r
276 0.96\r
277   * ALL:  Severely optimized MAME's YM2612 core, part of it is now rewritten in asm.\r
278   + GP2X: The YM2612's code now can be run in GP2X's ARM940T CPU, what causes large\r
279           performance increase.\r
280   * ALL:  Accurate renderers are slightly faster now.\r
281   + GP2X: Using quadruple buffering instead of doublebuffer now, also updated\r
282           framelimitter, this should eliminate some scrolling and tearing problems.\r
283   * GP2X: Fixed some flickering issues of 8bit accurate renderer.\r
284   + GP2X: craigix's RAM timings now can be enabled in the menu (see advanced options).\r
285   + GP2X: Added ability to save config for specific games only.\r
286   + GP2X: Gamma control added (using GP2X's hardware capabilities for this).\r
287   * GP2X: Volume keys are now configurable.\r
288   + GP2X: GnoStiC added USB joystick support, I made it possible to use it for\r
289           player 2 control (currently untested).\r
290   * GP2X: squidgehack is now applied through kernel module (cleaner way).\r
291 \r
292 0.95\r
293   * ALL:  Fixed a bug in sprite renderer which was causing slowdowns for some games.\r
294   + GP2X: Added command line support\r
295   + GP2X: Added optional hardware scaling for lower-res games like Shining Force.\r
296   * ALL:  Sound chips are now sampled 2 times per frame. This fixed some games which\r
297           had missing sounds (Vectorman 2 1st level, Thunder Force 3 water level,\r
298               etc.).\r
299   + ALL:  Added another accurate 8-bit renderer which is slightly faster and made it\r
300           default.\r
301 \r
302 0.945\r
303   + GP2X: Added frame limiter for frameskipped modes.\r
304   * GP2X: Increased brightness a bit (unused pixel bits now also contain data).\r
305   * GP2X: Suidgehack was not applied correctly (was applied before allocating some\r
306           high memory and had no effect).\r
307 \r
308 0.94\r
309   + Added GP2X port.\r
310   * Improved interrupt timing, Mazin Saga and Burning Force now works.\r
311   * Rewritten renderer code to better suit GP2X, should be faster on other\r
312     ports too.\r
313   + Added support for banking used by 12-in-1 and 4-in-1 ROMs (thanks Haze).\r
314   + Added some protection device faking, used by some unlicensed games like\r
315     Super Bubble Bobble, King of Fighters, Elf Wor, ... (thanks to Haze again)\r
316   + Added primitive Virtua Racing SVP faking, so menus can be seen now.\r
317 \r
318 0.93\r
319   * Fixed a problem with P900/P910 key configuration in FC mode.\r
320   * Improved shadow/hilight mode emulation. Still not perfect, but should be\r
321     enough for most games.\r
322   + Save state slots added.\r
323   + Region selector added.\r
324 \r
325 0.92\r
326   VDP changes:\r
327   * VDP emulation is now more accurate (fixes flickering in Chase HQ II,\r
328     Super Hang-On and some other problems in other games).\r
329   * HV counter emulation is now much more accurate. Fixes the Asterix games,\r
330     line in Road Rash 3, etc.\r
331   * Minor sprite and layer scroll masking bugs fixed.\r
332   + Added partial interlace mode renderer (Sonic 2 vs mode)\r
333   * Fixed a crash in both renderers when certain size window layers were used.\r
334   + Added emulation of shadow/hilight operator sprites. Other shadow/hilight\r
335     effects are still unemulated.\r
336   + Sprite emulation is more accurate, sprite limit is emulated.\r
337   + Added "accurate sprites" option, which always draws sprites in correct\r
338     order and emulates sprite collision bit, but is significantly slower.\r
339 \r
340   Emulation changes:\r
341   * Improved interrupt handling, added deferred interrupt emulation\r
342     (Lemmings, etc).\r
343   + Added serial EEPROM SRAM support (Wonder Boy in Monster World,\r
344     Megaman - The Wily Wars and many EA sports games like NBA Jam).\r
345   + Implemented ROM banking for Super Street Fighter II - The New Challengers\r
346   * Updated to the latest version of DrZ80 core, integrated memory handlers\r
347     in it for better performance. A noticeable performance increase, but save\r
348         states may not work from the previous version (you can only use them with\r
349         sound disabled in that case).\r
350   + SRAM word read handler was using incorrect byte order, fixed.\r
351 \r
352   Changes in Cyclone 0.0086:\r
353   + Added missing CHK opcode handler (used by SeaQuest DSV).\r
354   + Added missing TAS opcode handler (Gargoyles,Bubba N Stix,...). As in real genesis,\r
355     memory write-back phase is ignored (but can be enabled in config.h if needed).\r
356   + Added missing NBCD and TRAPV opcode handlers.\r
357   + Added missing addressing mode for CMP/EOR.\r
358   + Added some minor optimizations.\r
359   - Removed 216 handlers for 2927 opcodes which were generated for invalid addressing modes.\r
360   + Fixed flags for ASL, NEG, NEGX, DIVU, ADDX, SUBX, ROXR.\r
361   + Bugs fixed in MOVEP, LINK, ADDQ, DIVS handlers.\r
362   * Undocumented flags for CHK, ABCD, SBCD and NBCD are now emulated the same way as in Musashi.\r
363   + Added Uninitialized Interrupt emulation.\r
364   + Altered timing for about half of opcodes to match Musashi's.\r
365 \r
366 0.80\r
367   * Nearly all VDP code was rewritten in ARM asm. Gives ~10-25% performance\r
368     increase (depends on game).\r
369   * Optimized 32-column renderer not to render tiles offscreen, games which\r
370     use 32-column display (like Shining Force) run ~50% faster.\r
371   + Added new "Alternative renderer", which gives another ~30-45% performance\r
372     increase (in addition to mentioned above), but works only with some games,\r
373     because it is missing some features (it uses tile-based renderering\r
374     instead of default line-based and disables H-ints).\r
375   + Added "fit2" display mode for all FC gamers. It always uses 208x146 for\r
376     P800 and 208x208 for all other phones.\r
377   + Added volume control for Motorolas (experimental).\r
378 \r
379   VDP changes:\r
380   + Added support for vertical window (used by Vapor Trail, Mercs, GRIND\r
381     Stormer and others).\r
382   + Added sprite masking (hiding), adds some speed.\r
383   + Added preliminary H counter emulation. Comix Zone and Sonic 3D Blast\r
384     special stage are now playable.\r
385   + Added column based vertical scrolling (Gunstar Heroes battleship level,\r
386     Sonic and Knuckles lava boss, etc).\r
387 \r
388   Emulation changes:\r
389   + Re-added and improved Z80 faking when Z80 is disabled. Many games now can\r
390     be played without enabling Z80 (Lost Vikings, Syndicate, etc), but some\r
391     still need it (International Superstar Soccer Deluxe).\r
392   * Improved ym2612 timers, Outrun music plays at correct speed, voices in\r
393     Earthworm Jim play better, more games play sound.\r
394   * I/O registers now remember their values (needed for Pirates! Gold)\r
395   + Added support for 6 button pad.\r
396 \r
397   Changes in Cyclone 0.0083wip:\r
398   + Added missing CHK opcode (used by SeaQuest DSV).\r
399   + Added missing TAS opcode (Gargoyles). As in real genesis, write-back phase\r
400     is ignored (but is enabled for other systems).\r
401 \r
402   Backported stuff from Snes9x:\r
403   * Fixed Pxxx jog up/down which were not working in game.\r
404   + Added an option to gzip save states to save space.\r
405   + The emulator now pauses whenever it is loosing focus, so it will now pause\r
406     when alarm/ponecall/battery low/... windows come up.\r
407   - Removed 'pause on phonecall' feature, as it is no longer needed.\r
408   + Video fix for asian A1000s.\r
409 \r
410 0.70\r
411   * Started using tools from "Symbian GCC Improvement Project", which give\r
412     considerable speed increase (~4fps in "center 90" mode).\r
413   * Rewrote some drawing routines in ARM assembly (gives ~6 more fps in\r
414     "center 90" mode).\r
415   * Minor improvement to 0 and 180 "fit" modes. Now they look slightly better\r
416     and are faster.\r
417   * Minor stability improvements (emulator is less likely to crash).\r
418   + Added some background for OSD text for better readability.\r
419   + Added Pal/NTSC detection. This is needed for proper sound speed.\r
420   + Implemented Reesy's DrZ80 Z80 emu. Made some changes to it with hope to make\r
421     it faster.\r
422   + Implemented ym2612 emu from the MAME project. Runs well but sometimes sounds\r
423     a bit weird. Could be a little faster, so made some changes too.\r
424   + Implemented SN76489 emu from the MAME project.\r
425   + Added two separate sound output methods (mediaserver and cmaudiofb) with\r
426     autodetection (needs testing).\r
427   * Fixed VDP DMA fill emulation (as described in Charles MacDonald's docs),\r
428     fixes Contra and some other games.\r
429 \r
430 0.301\r
431   Launcher:\r
432   * Launcher now starts emulation process from current directory,\r
433     not from hardcoded paths.\r
434   * Improved 'pause on call' feature, should hopefully work with Motorola phones.\r
435 \r
436 0.30\r
437   Initial release.\r
438 \r
439 \r
440 Disclaimer\r
441 ----------\r
442 \r
443 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" \r
444 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
445 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
446 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \r
447 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \r
448 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \r
449 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \r
450 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \r
451 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \r
452 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \r
453 POSSIBILITY OF SUCH DAMAGE. \r
454 \r
455 SEGA/Genesis/MegaDrive/SEGA-CD/Mega-CD/32X are trademarks of\r
456 Sega Enterprises Ltd.\r
457 \r