I used the version of clang that was in the Raspbian APT repo, but ended up falling back to GCC. The new_dynarec.c compiles fine with -O2 instead of O3, however, when I run it, I get an Illegal Instruction error as soon as the dynarec core starts up. Below is the output from when I run this:theidealist wrote:HonkeyKong,
That is really exciting! I didn't even try the interpreter as I figured it would not even make 1 fps.
And that was especially brilliant to use clang - I don't know why I didn't think of that!
Did you build clang from source with gcc natively?
The best active arm dynarec project I am aware of is paulscode's android app. The problem there is they are using the android make system which is not very helpful if the main things you are trying to figure out is Makefile madness (which is the whole krux of this whole port to rpi, I think). They are at least using more recent pulls of mupen and the project is in pretty active development. They also have overhauled the normal Makefile build process with a system of their own, but I am not sure if that is supposed to work. Anyway the project is on github:
It runs flawlessly with every rom I've tried on my galaxy s4 phone.
Keep up the good work and let us know when it's hacked!
Code: Select all
[email protected] ~ $ /home/pi/RetroArch-master/retroarch -L /home/pi/mupen64plus-libretro-master/mupen64plus_libretro.so --config /home/pi/n64/mupen64plus.cfg n64/Super\ Mario\ 64\ \(U\)\ \[\!\].z64 RetroArch: Loading default config. RetroArch: Looking for config in: "/home/pi/.config/retroarch/retroarch.cfg". RetroArch: Looking for config in: "/home/pi/.retroarch.cfg". RetroArch: Looking for config in: "/etc/retroarch.cfg". === Config === === Config end === RetroArch [WARN] :: system_directory is not set in config. Assuming system directory is same folder as game: "". RetroArch: Found default config: /etc/retroarch.cfg. === Build ======================================= Compiler: GCC (4.6.3) 32-bit Built: Aug 7 2013 ================================================= RetroArch: Loading dynamic libretro from: "/home/pi/mupen64plus-libretro-master/mupen64plus_libretro.so" RetroArch: Environ SET_VARIABLES. RetroArch: Core option: RetroArch: Description: Texture filtering RetroArch: Key: mupen64-filtering RetroArch: Current value: automatic RetroArch: Possible values: RetroArch: automatic RetroArch: bilinear RetroArch: nearest RetroArch: Version of libretro API: 1 RetroArch: Compiled against API: 1 RetroArch: Environ SET_PIXEL_FORMAT: XRGB8888. RetroArch: Environ SYSTEM_DIRECTORY: "n64/". RetroArch: Loading ROM file: n64/Super Mario 64 (U) [!].z64. RetroArch: Did not find a valid ROM patch. RetroArch: CRC32: 0x3ce60709, SHA256: 17ce077343c6133f8c9f2d6d6d9a4ab62c8cd2aa57c40aea1f490b4c8bb21d91 RetroArch: ROM size: 8388608 bytes. RetroArch: Environ GET_VARIABLE mupen64-filtering: RetroArch: automatic RetroArch: Environ SET_HW_RENDER. RetroArch: Requesting OpenGLES2 context. mupen64plus: Goodname: Super Mario 64 (U) [!] mupen64plus: Name: SUPER MARIO 64 mupen64plus: MD5: 20B854B239203BAF6C961B850A4A51A2 mupen64plus: CRC: 635a2bff 8b022326 mupen64plus: Imagetype: .z64 (native) mupen64plus: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits) mupen64plus: ClockRate = f mupen64plus: Version: 1444 mupen64plus: Manufacturer: Nintendo mupen64plus: Cartridge_ID: 4d53 mupen64plus: Country: USA mupen64plus: PC = 80246000 mupen64plus: Save type: 0 RetroArch: Set audio input rate to: 31973.33 Hz. RetroArch: Adjusting aspect ratio to 1.33 RetroArch: Video @ 1920x1440 RetroArch: [VC/EGL]: Initializing... RetroArch: Found GL context: videocore RetroArch: Detecting screen resolution 1280x720. RetroArch: [GL]: Vendor: Broadcom, Renderer: VideoCore IV HW. RetroArch: Querying GL extension: BGRA8888 => exists RetroArch: [GL]: BGRA8888 extension found for GLES. RetroArch: GL: Using resolution 1280x720 RetroArch: [GL]: Using GLSL shader backend. RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used. RetroArch: Found GLSL vertex shader. RetroArch: Shader log: Compiled RetroArch: Found GLSL fragment shader. RetroArch: Shader log: Compiled RetroArch: Linking GLSL program. RetroArch: Found GLSL vertex shader. RetroArch: Shader log: Compiled RetroArch: Found GLSL fragment shader. RetroArch: Shader log: Compiled RetroArch: Linking GLSL program. RetroArch: Found GLSL vertex shader. RetroArch: Shader log: Compiled RetroArch: Found GLSL fragment shader. RetroArch: Shader log: Compiled RetroArch: Linking GLSL program. RetroArch: GL: Loaded 1 program(s). RetroArch: Querying GL extension: OES_rgb8_rgba8 => exists RetroArch: [GL]: Initializing HW render (1024 x 1024). RetroArch: [GL]: Max texture size: 2048 px, renderbuffer size: 2048 px. RetroArch: Using font rendering backend: freetype. RetroArch: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. RetroArch: [Joypad]: Found pad: SZMy-power LTD CO. Dual Box WII on /dev/input/js0. RetroArch: [Joypad]: Found pad: SZMy-power LTD CO. Dual Box WII on /dev/input/js1. RetroArch: Found joypad driver: "linuxraw". RetroArch: ALSA: Using signed 16-bit format. RetroArch: ALSA: Period size: 384 frames RetroArch: ALSA: Buffer size: 1536 frames RetroArch: Sinc resampler [C] RetroArch: SINC params (8 phase bits, 16 taps). RetroArch: [RGUI]: Opening history: /home/pi/n64/.retroarch-game-history.txt. RetroArch: Environ SYSTEM_DIRECTORY: "n64/". INI_FindSection trying to find name for DEFAULT mupen64plus: No video plugin attached. There will be no video output. mupen64plus: No RSP plugin attached. The video output will be corrupted. mupen64plus: No audio plugin attached. There will be no sound output. mupen64plus: No input plugin attached. You won't be able to control the game. mupen64plus: Memory initialized INI_FindSection trying to find name for DEFAULT INI_FindSection trying to find name for SUPER MARIO 64 &ConfigOpenSection is 0xb05f1da4 mupen64plus: ConfigGetParamBool(): Parameter 'VerticalSync' not found! (II) Setting video mode 640x480... Congratulations, you have 4 auxilliary buffers, we'll use them wisely ! mupen64plus: Starting R4300 emulator: Dynamic Recompiler mupen64plus: Init new dynarec Illegal instruction
Code: Select all
Yes, it runs exactly the same. I believe what it's doing is rendering the frames at 640x480 to a quad that's stretched to the native resolution. I haven't torn through enough of the rendering code to confirm this though.marqs wrote:Great work!
Code: Select all
Yes, that's how the libretro Mupen64Plus core works. By default it renders 640x480 to a framebuffer which is then stretched when drawn to the screen. If you're basing this off the libretro port (it looks like it) there is a way to change the render target size, but I doubt that would help.HonkeyKong wrote:
Code: Select all