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