(WIP) PicoDrive for PSP, skinned to look like Sonic's UGC
Find a file
2020-09-23 22:28:30 +02:00
cpu sh2 drc, fix symbol clash 2020-09-18 00:25:54 +02:00
jni libretro, build fixes for android 2020-07-16 19:29:34 +02:00
pico mcd, GenesisPlusGX bugfix 18fca13,33a43e3: report SEEK status while seeking 2020-09-23 22:28:30 +02:00
platform vdp, fix for gfx save/load menu bg 2020-09-21 21:02:51 +02:00
tools sh2 drc, standalone testing tool 2020-09-18 00:26:18 +02:00
unzip use system's zlib 2017-04-17 00:50:49 +03:00
zlib UIQ3 update, some makefile unification, rm old configs, stuff 2008-08-21 10:45:54 +00:00
.gitignore adding ym2413 2020-07-28 22:04:32 +02:00
.gitmodules adding ym2413 2020-07-28 22:04:32 +02:00
AUTHORS update author info 2020-09-18 00:26:34 +02:00
ChangeLog release 1.91 2013-10-12 22:06:29 +03:00
configure configure, fix for newer gcc 2020-07-29 20:41:07 +02:00
COPYING clarify PicoDrive's license 2013-06-26 03:07:07 +03:00
Makefile SDL UI, fix SDL input and SDL window output mode for osx compile 2020-08-02 23:20:09 +02:00
Makefile.libretro libretro, build fixes for android 2020-07-16 19:29:34 +02:00
README Support latest raspberry GLES library name 2017-12-25 17:38:36 +01:00
README.md adding RG350 platform 2020-07-28 22:04:52 +02:00

This is my foray into dynamic recompilation using PicoDrive, a Megadrive / Genesis / Sega CD / Mega CD / 32X / SMS emulator.

I added support for MIPS (mips32r1), ARM64 (aarch64) and RISC-V (RV64IM) to the SH2 recompiler, as well as spent much effort to optimize the DRC-generated code. I also optimized SH2 memory access inside the emulator, and did some work on M68K/SH2 CPU synchronization to fix some problems and speed up the emulator.

It got a bit out of hand. I ended up doing fixes and optimizations all over the place, mainly for 32X and CD, 32X graphics handling, and probably some more, see the commit history. As a result, 32X emulation speed has improved a lot.

compiling

I mainly worked with standalone PicoDrive versions as created by configure/make. A list of platforms for which this is possible can be obtained with

configure --help

If you want to build an executable for a unixoid platform not listed in the platform list, just use

configure --platform=generic

If DRC is available for the platform, it should be enabled automatically.

For other platforms using a cross-compiling toolchain I used this, assuming $TC points to the appropriate cross compile toolchain directory:

platform toolchain configure command
gp2x,wiz,caanoo open2x CROSS_COMPILE=arm-open2x-linux- CFLAGS="-I$TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include" LDFLAGS="--sysroot $TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux -L$TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib" ./configure --platform=gp2x
gp2x,wiz,caanoo open2x with ubuntu arm gcc 4.7 CROSS_COMPILE=arm-linux-gnueabi- CFLAGS="-I$TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/include" LDFLAGS="-B$TC/gcc-4.1.1-glibc-2.3.6/lib/gcc/arm-open2x-linux/4.1.1 -B$TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib -L$TC/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/lib" ./configure --platform=gp2x
opendingux opendingux CROSS_COMPILE=mipsel-linux- CFLAGS="-I$TC/usr/include -I$TC/usr/include/SDL" LDFLAGS="--sysroot $TC -L$TC/lib" ./configure --platform=opendingux
opendingux opendingux with ubuntu mips gcc 5.4 CROSS_COMPILE=mipsel-linux-gnu- CFLAGS="-I$TC/usr/include -I$TC/usr/include/SDL" LDFLAGS="-B$TC/usr/lib -B$TC/lib -Wl,-rpath-link=$TC/usr/lib -Wl,-rpath-link=$TC/lib" ./configure --platform=opendingux
gcw0 gcw0 CROSS_COMPILE=mipsel-gcw0-linux-uclibc- CFLAGS="-I$TC/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include -I$TC/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL" LDFLAGS="--sysroot $TC/usr/mipsel-gcw0-linux-uclibc/sysroot" ./configure --platform=gcw0
rg350 rg350 CROSS_COMPILE=mipsel-linux- CFLAGS="-I$TC/usr/include -I$TC/usr/include/SDL" LDFLAGS="--sysroot $TC -L$TC/lib" ./configure --platform=rg350

For gp2x, wiz, and caanoo you may need to compile libpng first.

After configure, compile with

make opk # for opendingux and gcw0

make # for anything else

helix MP3 decoder

For 32 bit ARM platforms, there is the possibility to compile the helix MP3 decoder into a shared library to be able to use MP3 audio files with CD games. The helix source files aren't supplied because of licensing issues. However, if you have obtained the sources, put them into the platform/common/helix directory, set CROSS to your cross compiler prefix (e.g. arm-linux-gnueabi-) and LIBGCC to your cross compiler's libgcc.a (e.g. /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/libgcc.a), and compile with

make -C platform/common/helix CROSS=$CROSS LIBGCC=$LIBGCC

Copy the resulting ${CROSS}helix_mp3.so as libhelix.so to the directory where the PicoDrive binary is.

installing

You need to install the resulting binary onto your device manually. For opendingux and gcw0, copy the opk to your SD card. For gp2x, wiz and caanoo, the easiest way is to unpack PicoDrive_191.zip on your SD card and replace the PicoDrive binary.

Send bug reports, fixes etc to derkub@gmail.com Kai-Uwe Bloem