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