GithubHelp home page GithubHelp logo

libretro / mgba Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mgba-emu/mgba

66.0 19.0 71.0 44.23 MB

mGBA Game Boy Advance Emulator

Home Page: https://mgba.io/

License: Mozilla Public License 2.0

CMake 1.98% Perl 0.01% C 77.80% Assembly 0.10% C++ 15.48% Makefile 0.03% Shell 0.04% GLSL 1.21% Objective-C 0.16% Python 2.79% GDB 0.01% Lua 0.40%

mgba's Introduction

mGBA

mGBA is an emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack. It also supports Game Boy and Game Boy Color games.

Up-to-date news and downloads can be found at mgba.io.

Build status Translation status

Features

  • Highly accurate Game Boy Advance hardware support[1].
  • Game Boy/Game Boy Color hardware support.
  • Fast emulation. Known to run at full speed even on low end hardware, such as netbooks.
  • Qt and SDL ports for a heavy-weight and a light-weight frontend.
  • Local (same computer) link cable support.
  • Save type detection, even for flash memory size[2].
  • Support for cartridges with motion sensors and rumble (only usable with game controllers).
  • Real-time clock support, even without configuration.
  • Solar sensor support for Boktai games.
  • Game Boy Camera and Game Boy Printer support.
  • A built-in BIOS implementation, and ability to load external BIOS files.
  • Scripting support using Lua.
  • Turbo/fast-forward support by holding Tab.
  • Rewind by holding Backquote.
  • Frameskip, configurable up to 10.
  • Screenshot support.
  • Cheat code support.
  • 9 savestate slots. Savestates are also viewable as screenshots.
  • Video, GIF, WebP, and APNG recording.
  • e-Reader support.
  • Remappable controls for both keyboards and gamepads.
  • Loading from ZIP and 7z files.
  • IPS, UPS and BPS patch support.
  • Game debugging via a command-line interface and GDB remote support, compatible with Ghidra and IDA Pro.
  • Configurable emulation rewinding.
  • Support for loading and exporting GameShark and Action Replay snapshots.
  • Cores available for RetroArch/Libretro and OpenEmu.
  • Community-provided translations for several languages via Weblate.
  • Many, many smaller things.

Game Boy mappers

The following mappers are fully supported:

  • MBC1
  • MBC1M
  • MBC2
  • MBC3
  • MBC3+RTC
  • MBC30
  • MBC5
  • MBC5+Rumble
  • MBC7
  • Wisdom Tree (unlicensed)
  • NT "old type" 1 and 2 (unlicensed multicart)
  • NT "new type" (unlicensed MBC5-like)
  • Pokémon Jade/Diamond (unlicensed)
  • Sachen MMC1 (unlicensed)

The following mappers are partially supported:

  • MBC6 (missing flash memory write support)
  • MMM01
  • Pocket Cam
  • TAMA5 (incomplete RTC support)
  • HuC-1 (missing IR support)
  • HuC-3 (missing IR support)
  • Sachen MMC2 (missing alternate wiring support)
  • BBD (missing logo switching)
  • Hitek (missing logo switching)
  • GGB-81 (missing logo switching)
  • Li Cheng (missing logo switching)

Planned features

  • Networked multiplayer link cable support.
  • Dolphin/JOY bus link cable support.
  • MP2k audio mixing, for higher quality sound than hardware.
  • Re-recording support for tool-assist runs.
  • A comprehensive debug suite.
  • Wireless adapter support.

Supported Platforms

  • Windows 7 or newer
  • OS X 10.9 (Mavericks)[3] or newer
  • Linux
  • FreeBSD
  • Nintendo 3DS
  • Nintendo Switch
  • Wii
  • PlayStation Vita

Other Unix-like platforms, such as OpenBSD, are known to work as well, but are untested and not fully supported.

System requirements

Requirements are minimal. Any computer that can run Windows Vista or newer should be able to handle emulation. Support for OpenGL 1.1 or newer is also required, with OpenGL 3.2 or newer for shaders and advanced features.

Downloads

Downloads can be found on the official website, in the Downloads section. The source code can be found on GitHub.

Controls

Controls are configurable in the settings menu. Many game controllers should be automatically mapped by default. The default keyboard controls are as follows:

  • A: X
  • B: Z
  • L: A
  • R: S
  • Start: Enter
  • Select: Backspace

Compiling

Compiling requires using CMake 3.1 or newer. GCC, Clang, and Visual Studio 2019 are known to work for compiling mGBA.

Docker building

The recommended way to build for most platforms is to use Docker. Several Docker images are provided that contain the requisite toolchain and dependencies for building mGBA across several platforms.

Note: If you are on an older Windows system before Windows 10, you may need to configure your Docker to use VirtualBox shared folders to correctly map your current mgba checkout directory to the Docker image's working directory. (See issue #1985 for details.)

To use a Docker image to build mGBA, simply run the following command while in the root of an mGBA checkout:

docker run --rm -it -v ${PWD}:/home/mgba/src mgba/windows:w32

After starting the Docker container, it will produce a build-win32 directory with the build products. Replace mgba/windows:w32 with another Docker image for other platforms, which will produce a corresponding other directory. The following Docker images available on Docker Hub:

  • mgba/3ds
  • mgba/switch
  • mgba/ubuntu:xenial
  • mgba/ubuntu:bionic
  • mgba/ubuntu:focal
  • mgba/ubuntu:groovy
  • mgba/vita
  • mgba/wii
  • mgba/windows:w32
  • mgba/windows:w64

If you want to speed up the build process, consider adding the flag -e MAKEFLAGS=-jN to do a parallel build for mGBA with N number of CPU cores.

*nix building

To use CMake to build on a Unix-based system, the recommended commands are as follows:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make
sudo make install

This will build and install mGBA into /usr/bin and /usr/lib. Dependencies that are installed will be automatically detected, and features that are disabled if the dependencies are not found will be shown after running the cmake command after warnings about being unable to find them.

If you are on macOS, the steps are a little different. Assuming you are using the homebrew package manager, the recommended commands to obtain the dependencies and build are:

brew install cmake ffmpeg libzip qt5 sdl2 libedit lua pkg-config
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=`brew --prefix qt5` ..
make

Note that you should not do a make install on macOS, as it will not work properly.

Windows developer building

MSYS2

To build on Windows for development, using MSYS2 is recommended. Follow the installation steps found on their website. Make sure you're running the 32-bit version ("MSYS2 MinGW 32-bit") (or the 64-bit version "MSYS2 MinGW 64-bit" if you want to build for x86_64) and run this additional command (including the braces) to install the needed dependencies (please note that this involves downloading over 1100MiB of packages, so it will take a long time):

pacman -Sy --needed base-devel git ${MINGW_PACKAGE_PREFIX}-{cmake,ffmpeg,gcc,gdb,libelf,libepoxy,libzip,lua,pkgconf,qt5,SDL2,ntldd-git}

Check out the source code by running this command:

git clone https://github.com/mgba-emu/mgba.git

Then finally build it by running these commands:

mkdir -p mgba/build
cd mgba/build
cmake .. -G "MSYS Makefiles"
make -j$(nproc --ignore=1)

Please note that this build of mGBA for Windows is not suitable for distribution, due to the scattering of DLLs it needs to run, but is perfect for development. However, if distributing such a build is desired (e.g. for testing on machines that don't have the MSYS2 environment installed), running cpack -G ZIP will prepare a zip file with all of the necessary DLLs.

Visual Studio

To build using Visual Studio is a similarly complicated setup. To begin you will need to install vcpkg. After installing vcpkg you will need to install several additional packages:

vcpkg install ffmpeg[vpx,x264] libepoxy libpng libzip lua sdl2 sqlite3

Note that this installation won't support hardware accelerated video encoding on Nvidia hardware. If you care about this, you'll need to install CUDA beforehand, and then substitute ffmpeg[vpx,x264,nvcodec] into the previous command.

You will also need to install Qt. Unfortunately due to Qt being owned and run by an ailing company as opposed to a reasonable organization there is no longer an offline open source edition installer for the latest version, so you'll need to either fall back to an old version installer (which wants you to create an otherwise-useless account, but you can bypass temporarily setting an invalid proxy or otherwise disabling networking), use the online installer (which requires an account regardless), or use vcpkg to build it (slowly). None of these are great options. For the installer you'll want to install the applicable MSVC versions. Note that the offline installers do not support MSVC 2019. For vcpkg you'll want to install it as such, which will take quite a while, especially on quad core or less computers:

vcpkg install qt5-base qt5-multimedia

Next, open Visual Studio, select Clone Repository, and enter https://github.com/mgba-emu/mgba.git. When Visual Studio is done cloning, go to File > CMake and open the CMakeLists.txt file at the root of the checked out repository. From there, mGBA can be developed in Visual Studio similarly to other Visual Studio CMake projects.

Toolchain building

If you have devkitARM (for 3DS), devkitPPC (for Wii), devkitA64 (for Switch), or vitasdk (for PS Vita), you can use the following commands for building:

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../src/platform/3ds/CMakeToolchain.txt ..
make

Replace the -DCMAKE_TOOLCHAIN_FILE parameter for the following platforms:

  • 3DS: ../src/platform/3ds/CMakeToolchain.txt
  • Switch: ../src/platform/switch/CMakeToolchain.txt
  • Vita: ../src/platform/psp2/CMakeToolchain.vitasdk
  • Wii: ../src/platform/wii/CMakeToolchain.txt

Dependencies

mGBA has no hard dependencies, however, the following optional dependencies are required for specific features. The features will be disabled if the dependencies can't be found.

  • Qt 5: for the GUI frontend. Qt Multimedia or SDL are required for audio.
  • SDL: for a more basic frontend and gamepad support in the Qt frontend. SDL 2 is recommended, but 1.2 is supported.
  • zlib and libpng: for screenshot support and savestate-in-PNG support.
  • libedit: for command-line debugger support.
  • ffmpeg or libav: for video, GIF, WebP, and APNG recording.
  • libzip or zlib: for loading ROMs stored in zip files.
  • SQLite3: for game databases.
  • libelf: for ELF loading.
  • Lua: for scripting.
  • json-c: for the scripting storage API.

SQLite3, libpng, and zlib are included with the emulator, so they do not need to be externally compiled first.

Footnotes

[1] Currently missing features are

  • OBJ window for modes 3, 4 and 5 (Bug #5)

[2] Flash memory size detection does not work in some cases. These can be configured at runtime, but filing a bug is recommended if such a case is encountered.

[3] 10.9 is only needed for the Qt port. It may be possible to build or running the Qt port on 10.7 or older, but this is not officially supported. The SDL port is known to work on 10.5, and may work on older.

Copyright

mGBA is Copyright © 2013 – 2023 Jeffrey Pfau. It is distributed under the Mozilla Public License version 2.0. A copy of the license is available in the distributed LICENSE file.

mGBA contains the following third-party libraries:

  • inih, which is copyright © 2009 – 2020 Ben Hoyt and used under a BSD 3-clause license.
  • blip-buf, which is copyright © 2003 – 2009 Shay Green and used under a Lesser GNU Public License.
  • LZMA SDK, which is public domain.
  • MurmurHash3 implementation by Austin Appleby, which is public domain.
  • getopt for MSVC, which is public domain.
  • SQLite3, which is public domain.

If you are a game publisher and wish to license mGBA for commercial usage, please email [email protected] for more information.

mgba's People

Contributors

ahigerd avatar aliaspider avatar andres-asm avatar arves100 avatar bentley avatar ccawley2011 avatar dobyrch avatar eijebong avatar empyreusx avatar endrift avatar extrems avatar felipefpl avatar fr500 avatar hizzlekizzle avatar hunterk avatar inactive123 avatar jdgleaver avatar kddlb avatar leiradel avatar libretroadmin avatar lioncash avatar lotharsm avatar lunadook avatar meepingsnesroms avatar negativeexponent avatar sergiobenrocha2 avatar shinyoyo avatar vanfanel avatar waddlesplash avatar yuriks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mgba's Issues

Strange problem with sound

After recent updates, there is a problem with sound in a lot of games on different devices. It sounds as if one of the sound channels is stumbling. This is especially noticeable in the opening intro of Final Fantasy VI and in all Mother 3 music. (Sorry for my English)

Audio buffer size problem

Hi,

With this core, using an audio latency < 50 ms with max_swapchain = 2 causes distorted audio.
This happens on x86_64 and ARM (rpi3), and it's not related to high CPU usage.
I believe this core has a bigger internal audio buffer than other cores, doesn't it? Can it be somehow reduced so it works fine with low-latency audio?

Problem with fast forward in retropie

hi i use mgba in my retropie...but when i launch the game and i activate fast forward with hotkeys combination the speed don't change....the strange thing is that if i activate fast forward immediately i can see the first written "gamboy nintendo" came faster as if the problem was in the gba image file

Golden Sun Crashing

Hello,

I've been having some problems playing Golden Sun with lr-mgba on a raspberry pi 2B using RetroPie.
I've already created a topic about it on the RetroPie forums https://retropie.org.uk/forum/topic/4967/golden-sun-gba-crashing/6 and they suggested to log the issue here.

Basically, the game randomly crashes while playing sometimes when just walking, sometimes when in battle. There is not a clear reason for when exactly it happens.

The ROM I am using has the following MD5 Hash:
1c dd 7f 33 c9 a2 70 61 20 1e 1d 1c e0 29 a7 00

I also have a RetroArch save stae and saveram file of a point in the game where it is saved in the overworld, and walking around for a second or two causes the game to freeze/crash. Aparantly the behavior on my RPi is different then when dankcushions loads the state on his RPi (See the topic on retropie linked above).

The files are here:
http://www.mediafire.com/file/a08tn5w97w0el8g/Golden_Sun.state1
http://www.mediafire.com/file/fgt8n13r4gu10u1/Golden_Sun.srm

My RetroArch config is here:
http://pastebin.com/x0Jwdkah

I am using mGBA 0.5.1 with RetroPie on a Raspberry Pi 2B running at 900 Mhz (no OC)

Do you require more information, of course i would be happy to give it.

Crash Bandicoot 2 n-tranced doesnt save

I started playing this game and when I choose save from the main menu it doesn't save and I loose my progress, the game saves fine in vba-m. Can someone please look into this and get back to me. Thank you

(Request) mGBA Sound Channel Switches

It would be nice to have a core option to allow switching on and off audio channels in mGBA. This feature exists in the standalone Windows build.

Gundam Seed Destiny end game bug

At the end of main mode, at the credits, i'm supposed to press start & spam "A" for some graphical effects & bonus points; this does not happen/work on retroarch mGBA core.

Sound regression?

I've just noticed some sound issue playing Sonic advance.
It's like the bass is loud but high are really low (sonic dash sound is barely audible) + sound seems imprecise, like there's some noise on top.

win7 x64 current core

VBA-Next/MGBA stand-alone 0.6.1 sounds better

[Wii] Error on loading 32 MB roms

Some 32 MB roms like Kingdom Hearts: Chain of Memories, crash on loading, even if this rom can fit well on MEM2 memory, any other size rom, plays fine.

Frameskip Option for mGBA Core?

Hello,

I have performance issues with my mid-range android device.
I found that mGBA has a frameskip option:
-s, --frameskip N (Skip every N frames)

Can you add this option to the mGBA Core, please?

Pokemon Pinball GBA hangs

It seems to be a libretro only bug I reported upstream by mistake: mgba-emu#820

As soon as you start playing the cpu usage skyrocket and game slows down until it halts.
Just got a blue screen while testing it with task manager open.

Rom is from No-Intro set, different versions act the same.

mGBA-libretro 0.6.0
Windows 7 x64
Core i5-3570K, Nvidia GTX-770, OpenGL


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Segfault with specific ARM optimizations

Platform: Allwinner H3 (armv7-a, NEON, VFP4)

According to spec, this platform supports -mfpu=neon-vfpv4 GCC flag. Compilation succeeds but resulting core segfaults. Removing FPU flag produces working core.

Failing optimization flags set: -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -pipe, this is suggested for this platform by manufacturer.

Other libretro cores work fine with these flags, checked with snes9x-next, mupen64 and desmume.

RetroArch [ERROR] :: rarch_main_init :: Fatal error received in: "load_dynamic()"

running version 8b963ce

building with make -f Makefile.libretro platform=armvhardfloat

rarch_main_init: === Build =======================================RetroArch: rarch_get_cpu_features: [CPUID]: Features:
Built: Jun 24 2015
rarch_main_init: Version: 1.2
rarch_main_init: Git: a7d3975
rarch_main_init: =================================================
RetroArch: rarch_get_cpu_features: [CPUID]: Features:
RetroArch: parse_config_file: Loading config from: /opt/retropie/configs/all/retroarch.cfg.
RetroArch: load_symbols: Loading dynamic libretro from: "/opt/retropie/libretrocores/lr-mgba/mgba_libretro.so"
RetroArch [ERROR] :: load_symbols :: Failed to open dynamic library: "/opt/retropie/libretrocores/lr-mgba/mgba_libretro.so"
RetroArch [ERROR] :: rarch_main_init :: Fatal error received in: "load_dynamic()"

revision e16338f works

had trouble git bisecting as it seems that for many revisions in between e16338f and 8b963ce the Makefile.libretro is missing (is this caused by a forced push or rebase or something ?)

[Android] build fails

/home/buildbot/tools/android/android-ndk-r13b//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -c -o ../src/arm/decoder.android_armeabi-v7a.o ../src/arm/decoder.c -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -Wa,--noexecstack -Wformat -Werror=format-security  -DANDROID -DINLINE=inline -DHAVE_STDINT_H -DBSPF_UNIX -DHAVE_INTTYPES -DLSB_FIRST -D__LIBRETRO__ -DMINIMAL_CORE=2 -DM_CORE_GBA -DM_CORE_GB -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DINLINE=inline -DCOLOR_16_BIT -DCOLOR_5_6_5 -DRESAMPLE_LIBRARY=2 -DM_PI=3.14159265358979323846 -DPATH_MAX=4096 -DSSIZE_MAX=32767 -DGIT_VERSION=\"0.5.1\" -DNDEBUG -DUSE_VFS_FILE -DHAVE_LOCALTIME_R  -I/home/buildbot/tools/android/android-ndk-r13b//platforms/android-3/arch-arm/usr/include -I/home/buildbot/tools/android/android-ndk-r13b//sources/cxx-stl/gnu-libstdc++/4.9/include -I/home/buildbot/tools/android/android-ndk-r13b//sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/home/buildbot/tools/android/android-ndk-r13b//sources/cxx-stl/gnu-libstdc++/4.9/include/backward -I../src -I../src/arm -O3 -DNDEBUG -Wall -std=c99
In file included from ../src/arm/arm.h:9:0,
                 from ../src/arm/decoder.h:9,
                 from ../src/arm/decoder-thumb.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
In file included from ../src/arm/isa-arm.h:9:0,
                 from ../src/arm/isa-arm.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
In file included from ../src/arm/arm.h:9:0,
                 from ../src/arm/arm.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
compilation terminated.
compilation terminated.
compilation terminated.
In file included from ../src/arm/arm.h:9:0,
                 from ../src/arm/decoder.h:9,
                 from ../src/arm/decoder-arm.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
compilation terminated.
Makefile.rules:20: recipe for target '../src/arm/arm.android_armeabi-v7a.o' failed
In file included from ../src/arm/arm.h:9:0,
                 from ../src/arm/decoder.h:9,
                 from ../src/arm/decoder.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
make: *** [../src/arm/arm.android_armeabi-v7a.o] Error 1
compilation terminated.
make: *** Waiting for unfinished jobs....
Makefile.rules:20: recipe for target '../src/arm/isa-arm.android_armeabi-v7a.o' failed
make: *** [../src/arm/isa-arm.android_armeabi-v7a.o] Error 1
Makefile.rules:20: recipe for target '../src/arm/decoder-thumb.android_armeabi-v7a.o' failed
make: *** [../src/arm/decoder-thumb.android_armeabi-v7a.o] Error 1
Makefile.rules:20: recipe for target '../src/arm/decoder-arm.android_armeabi-v7a.o' failed
make: *** [../src/arm/decoder-arm.android_armeabi-v7a.o] Error 1
In file included from ../src/arm/isa-thumb.h:9:0,
                 from ../src/arm/isa-thumb.c:6:
../src/util/common.h:9:19: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
                   ^
compilation terminated.

Add core options and BIOS support for (Super) Game Boy/Color.

Upstream mGBA supports Game Boy, Super Game Boy and Game Boy Color very well. The libretro version can run Game Boy and Game Boy Color games, but doesn't support Super Game Boy, BIOSes for any of these platforms, etc. I've filed an upstream issue for this at mgba-emu#992, but the libretro code is not frequently updated upstream, so I thought this project might be well-suited to make the changes and get them merged upstream.

The major core option that I feel is lacking would be an option to select what console Game Boy (i.e. non-Advance) games should be emulated on, i.e. Game Boy (mono), Super Game Boy, Game Boy Color. An "Auto" option would also be desirable. Since many Game Boy games are cross-compatible, the order for "Auto" play that I'd suggest would be:

Game Boy | Super Game Boy | Game Boy Color || Run as ...
-------------------------------------------------------
    x    |                |                || Game Boy
    x    |       x        |                || Super Game Boy
    x    |       x        |        x       || Game Boy Color
    x    |                |        x       || Game Boy Color
         |                |        x       || Game Boy Color

Basically, this runs using the most-capable Game Boy model a game supports. I believe code to do this should already be in upstream mGBA, so it should just need hooking up to a core setting, it shouldn't need to be written from scratch.

Another core setting that would be nice is whether to run games in "GBA mode". Some GBC games have changes when run on a GBA, which is really just GBC mode with one register changed.

Lastly, it'd be nice to see support for gb_bios.bin, sgb_bios.bin and gbc_bios.bin. libretro's mGBA already supports gba_bios.bin, so support for the Game Boy BIOSes would also be great.

The major benefit of all this is Super Game Boy support, which doesn't exist in lr-gambatte or vba-next. I'm not sure if there are currently any emulators in RetroArch with Super Game Boy support. Perhaps higan, but that's supported on comparatively few platforms due to its high resource requirements. A Super Game Boy emulator for "the rest of us" would be nice, and mGBA perfectly fits the bill: the support is already there, we just need a core option to trigger it.

Array referencing inconsistency

environCallback(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS,&inputDescriptors);

vs

environCallback(RETRO_ENVIRONMENT_SET_VARIABLES, vars);

They are both 1d arrays of a custom type.
So does RetroArch treat arrays as pointers or objects?
Because these 2 functions are doing it differently.

Core is broken

Hi just compiled the latest git revision can no longer launch a game i got this error

RetroArch [ERROR] :: Error(s): /usr/lib/libretro/mgba_libretro.so: undefined symbol: SzAllocTemp
RetroArch [ERROR] :: Fatal error received in: "load_dynamic()"

Video Juddering in Windowed Mode [Regression]

I have a build from 9/18/16 that runs smooth as butter, but the latest buildbot build from today (9/19/16) runs all stuttery. Almost like Vsync isn't working? The difference between the old and new build is easy to tell by just moving around the main town in FF1 in the Dawn of Souls remake.

Problems to run RetroArch with mgba core for Vita -

UPDATE: this issue was originally about problems to compile RetroArch with mgba core for Vita, but it was completely solved after #73 and #75. Now this thread here is about RetroArch crashing when launching with mgba core on Vita.

[Not sure if this issue should be posted here or in RetroArch issue tracker. I posted here because it seems to be enough to reach the guys able to solve.]

I'm trying to compile mgba and then RetroArch to try this core on my PS Vita.

I already installed vitasdk with no issues.

After the fix in #67 (and later @twinaphex's commits) I am able to compile the core with no issues with this command:

make -f Makefile.libretro platform=vita

The command generates the mgba_libretro_vita.a. Then I copy this file to the RetroArch source directory and rename it to libretro_vita.a.

make -f Makefile.vita

And then I get this error:

./libretro_vita.a(thread.o): In function `_frameStarted':
thread.c:(.text+0x50): undefined reference to `mCoreRewindRestore'
./libretro_vita.a(thread.o): In function `_mCoreThreadRun':
thread.c:(.text+0x25c): undefined reference to `mCoreRewindContextInit'
thread.c:(.text+0x442): undefined reference to `mCoreRewindContextDeinit'
./libretro_vita.a(thread.o): In function `_frameStarted':
thread.c:(.text+0x42): undefined reference to `mCoreRewindAppend'
thread.c:(.text+0x60): undefined reference to `mCoreRewindAppend'
./libretro_vita.a(core.o): In function `_GBACoreReset':
core.c:(.text+0x4b2): undefined reference to `GBAVideoProxyRendererCreate'
./libretro_vita.a(core.o): In function `_GBACoreInit':
core.c:(.text+0x702): undefined reference to `mVideoThreadProxyCreate'
./libretro_vita.a(video-software.o): In function `GBAVideoSoftwareRendererDrawScanline':
video-software.c:(.text+0x1d90): undefined reference to `_to16Bit'
collect2: error: ld returned 1 exit status
make: *** [retroarch_vita.elf] Error 1
Makefile.vita:173: recipe for target 'retroarch_vita.elf' failed

I checked the thread.c source file and the functions mentioned by make as "undefined reference" (mCoreRewind*) are declared in rewind.h header file. I tried to #include <mgba/core/rewind.h> in thread.c in a hope to at least clean those "undefined reference" messages but got the same error...

Not sure what to do next... :(

P.S.: Thanks to @frangarcj for the instructions on how to compile for PS Vita.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Update in the future

Just a reminder to me or anyone in the future:

Do a "git reset HEAD^ --hard" until def5a46 first

I merged the stable branch btw

Segmentation Fault libretro-mgba

Hello,

I have this issue
RetroArch [INFO] :: Redirecting save file to "Jeux/GBA/Slime Morimori Dragon Quest - Shougeki no Shippo Dan (Japan).srm".
RetroArch [INFO] :: === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES
Built: Dec 10 2016
RetroArch [INFO] :: Version: 1.3.6
RetroArch [INFO] :: =================================================
RetroArch [INFO] :: Looking for config in: "/home//.config/retroarch/retroarch.cfg".
RetroArch [INFO] :: Config: loading config from: /home/
/.config/retroarch/retroarch.cfg.
RetroArch [INFO] :: Resetting undo buffers.
RetroArch [INFO] :: Loading dynamic libretro core from: "/home//.config/retroarch/cores/mgba_libretro.so"
RetroArch [INFO] :: Overrides: no core-specific overrides found at /home/
/.config/retroarch/config/mGBA/mGBA.cfg.
RetroArch [INFO] :: Overrides: no game-specific overrides found at /home//.config/retroarch/config/mGBA/Slime Morimori Dragon Quest - Shougeki no Shippo Dan (Japan).cfg.
RetroArch [INFO] :: Environ SET_VARIABLES.
RetroArch [INFO] :: Remaps: remap directory: /home/
/.config/retroarch/config/remaps
RetroArch [INFO] :: Remaps: no game-specific remap found at /home//.config/retroarch/config/remaps/mGBA/Slime Morimori Dragon Quest - Shougeki no Shippo Dan (Japan).rmp.
RetroArch [INFO] :: Remaps: no core-specific remap found at /home/
/.config/retroarch/config/remaps/mGBA/mGBA.rmp.
RetroArch [INFO] :: Redirecting save file to "Jeux/GBA/Slime Morimori Dragon Quest - Shougeki no Shippo Dan (Japan).srm".
RetroArch [INFO] :: Environ SET_PIXEL_FORMAT: RGB565.
RetroArch [INFO] :: Environ SET_INPUT_DESCRIPTORS:
RetroArch [INFO] :: RetroPad, User 1, Button "B (bottom)" => "B"
RetroArch [INFO] :: RetroPad, User 1, Button "Y (left)" => "Turbo B"
RetroArch [INFO] :: RetroPad, User 1, Button "Select" => "Select"
RetroArch [INFO] :: RetroPad, User 1, Button "Start" => "Start"
RetroArch [INFO] :: RetroPad, User 1, Button "D-Pad Up" => "Up"
RetroArch [INFO] :: RetroPad, User 1, Button "D-Pad Down" => "Down"
RetroArch [INFO] :: RetroPad, User 1, Button "D-Pad Left" => "Left"
RetroArch [INFO] :: RetroPad, User 1, Button "D-Pad Right" => "Right"
RetroArch [INFO] :: RetroPad, User 1, Button "A (right)" => "A"
RetroArch [INFO] :: RetroPad, User 1, Button "X (up)" => "Turbo A"
RetroArch [INFO] :: RetroPad, User 1, Button "L" => "L"
RetroArch [INFO] :: RetroPad, User 1, Button "R" => "R"
RetroArch [INFO] :: RetroPad, User 1, Button "L2" => "Turbo L"
RetroArch [INFO] :: RetroPad, User 1, Button "R2" => "Turbo R"
RetroArch [INFO] :: RetroPad, User 1, Button "L3" => "Darken Solar Sensor"
RetroArch [INFO] :: RetroPad, User 1, Button "R3" => "Brighten Solar Sensor"
RetroArch [INFO] :: Environ GET_RUMBLE_INTERFACE.
RetroArch [INFO] :: Environ GET_LOG_INTERFACE.
RetroArch [INFO] :: Loading content file: Jeux/GBA/Slime Morimori Dragon Quest - Shougeki no Shippo Dan (Japan).gba.
RetroArch [INFO] :: Did not find a valid content patch.
RetroArch [INFO] :: CRC32: 0x1194d33b .
RetroArch [INFO] :: Environ GET_VARIABLE mgba_use_bios:
RetroArch [INFO] :: ON
RetroArch [INFO] :: Environ GET_VARIABLE mgba_skip_bios:
RetroArch [INFO] :: OFF
RetroArch [INFO] :: Environ GET_VARIABLE mgba_idle_optimization:
RetroArch [INFO] :: Remove Known
Segmentation fault

gdb
GNU gdb (Debian 7.11.1-2+b1) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from retroarch...done.
(gdb) rub
Undefined command: "rub". Try "help".
(gdb) run
Starting program: /usr/local/bin/retroarch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed8cd700 (LWP 7602)]
[New Thread 0x7fffe5c7f700 (LWP 7638)]
[Thread 0x7fffe5c7f700 (LWP 7638) exited]
[New Thread 0x7fffed8cd700 (LWP 7646)]
[Thread 0x7fffed8cd700 (LWP 7602) exited]

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
__strncmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
164 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.

BR,
Wark

Sound Popping in 0.7-WIP Nightly

I noticed sound popping in the latest nightly (4157774). In the beginning of Mega Man Zero 2, when you start a new game and Zero is walking through the desert, the BGM has a constant noticable pop. This doesn't happen in an older 0.6.1 based build I have (b3c4ab2).

I made sure runahead was off to make sure that wasn't causing it.

Retroachievements error

Hi

Running the latest 1.7.1 of Retroarch with the mGBA core (from buildbot), the achievements work, but Leaderboard integration does not work properly, it sends the wrong time to retroachievements.

screenshot at 2018-02-17 21-33-04

Missing assembly optimisations in build script when NEON is enabled

src/gba/renderers/video-software.c contains

#ifdef COLOR_16_BIT
#if defined(__ARM_NEON) && !defined(__APPLE__) && !defined(__aarch64__)
        _to16Bit(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS);
#else
        for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) {
                row[x] = softwareRenderer->row[x];
        }
#endif
#else
        memcpy(row, softwareRenderer->row, VIDEO_HORIZONTAL_PIXELS * sizeof(*row));
#endif
}

so if CFLAGS is set so that GCC will define __ARM_NEON - _to16Bit will be used.

_to16Bit is in src/util/arm-algo.S but this is not currently built so the error retroarch: symbol lookup error: /home/pi/RetroPie-Setup/mgba/mgba_libretro.so: undefined symbol: _to16Bit will be thrown.

so we either need to include this (adding a HAVE_NEON flag to makefiles and including it), or we need to just use the C code.

Distored Audio On Raspberry Pi Zero

Im using gamepiadvance.com board and having issues with the sound on some emulators, mGBA being one of them. The audio is pulled from the GPIO pins.

https://www.youtube.com/watch?v=mgVv7Ae16j4

I can use a different GBA emulator and the audio fine, I prefer mGBA. The same config file is used so im not sure what causes this problem. Hopefully somone knows a fix.

Weirdness with SSIZE_MAX

alcaro@stacked ~/Desktop/minir/cores/mgba $ grep -r SSIZE_MAX
src/util/common.h:#ifndef SSIZE_MAX
src/util/common.h:#define SSIZE_MAX ((ssize_t) (SIZE_MAX >> 1))
src/util/patch-ups.c:   if (inSize > SSIZE_MAX || outSize > SSIZE_MAX) {
Makefile.libretro:DEFINES += [...] -DPROJECT_NAME=\"mGBA\" -DSSIZE_MAX=32767

Given that this is used in exactly nothing relevant whatsoever, why exactly is it redefined in that Makefile?

And why is it given such a weird value? (s)size_t hasn't been two bytes since MS-DOS.

I could remove it myself, but there's a fair amount of Makefile sharing going on between our repos, and I don't know how widespread that one is.

Rumble slows the core way down and messes with retroarch

when i run drill dozer or pokemon pinball ruby and sapphire the game will slow way down when you get to a screen that can do rumble. the title screen on drill dozer and the options screen on pokemon pinball are the easiest and quickest ones you can get to. when it starts slowing down retroarch itself seems to have issues because even opening the quick menu is a chore and inconsistant and sometimes even after a restart the input will be messed up like unable to move certain directions in the menu or moving way too much.

Real Time Clock appears broken in 0.7-WIP

The Real Time Clock displays an incorrect time in Pokemon Liquid Crystal (romhack).

The RTC functions correctly in VBA Next, provided the cart ID is changed to that of Pokemon Ruby using a hex editor (as the hack is based on FireRed, which did not use RTC).

The time displayed should be that of the system clock - instead it is always Thursday, 22:105, and 0:00 if the game ID is not changed to that of Pokemon Ruby.

To reproduce the bug:

  • Start a new game
  • Proceed through the initial dialog, naming the player
  • After this, there will be a dialog to set up the time. Proceeding through this dialog shows that it is incorrect (Either thursday or friday, 22:105).

No Super Game Boy borders with Pokemon Yellow.

Hey!

Love the recent addition of SGB borders for Game Boy games :D However it seems there's a bug with Pokemon Yellow (I tried USA/Europe and French roms) and it seems to be because it is recognized as a GBC game ((GBC,SGB Enhanced) in the filename, AFAIK it's the only GB game with that).

So I tried to go to core options and put Game Boy model to Game Boy but it starts like a normal GB game without borders, and I tried Super Game Boy, the screen is smaller with borders all around but they stay white.

pokemon - yellow version - special pikachu edition usa europe gbc sgb enhanced -180618-102930

RetroArch 1.7.3, latest version of mGBA core (0.7-WIP 9dd7301 as I'm writing), Windows 10 and Linux.

Freeze in metroid zero mission

After the final boss fight you have to run to the space ship to escape.
The final cut scene is freezing, when the mother ship explodes.

Cheats not working

there is no indication that cheats are failing to load or working at all

they work on the standalone version of mgba just not in retroarch

This game will not run on the hardware found

Dragon Ball Z - The Legacy of Goku II

Attempting to go into the overworld map gives the message 'this game will not run on the hardware found' and resets the game. Only solution I've found is to change the save file type to EEPROM which the libretro port doesn't seem to support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.