Git Product home page Git Product logo

libretro / retroarch Goto Github PK

View Code? Open in Web Editor NEW
9.3K 327.0 1.7K 484.38 MB

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.

Home Page: http://www.libretro.com

License: GNU General Public License v3.0

Makefile 0.12% C 83.92% Java 0.16% Shell 0.22% Perl 0.03% Assembly 0.40% JavaScript 0.13% HTML 0.06% C++ 12.89% Python 0.30% Objective-C 1.25% Lua 0.02% GLSL 0.13% Batchfile 0.01% CSS 0.01% HLSL 0.02% CoffeeScript 0.01% Metal 0.02% CMake 0.11% OpenQASM 0.20%
libretro c retroarch

retroarch's Introduction

Build Status Coverity Scan Build Status Crowdin

RetroArch

RetroArch is the reference frontend for the libretro API. Popular examples of implementations for this API includes video game system emulators and game engines as well as more generalized 3D programs. These programs are instantiated as dynamic libraries. We refer to these as "libretro cores".

XMB menu driver

rgui menu driver

glui menu driver

ozone menu driver

libretro

libretro is an API that exposes generic audio/video/input callbacks. A frontend for libretro (such as RetroArch) handles video output, audio output, input and application lifecycle. A libretro core written in portable C or C++ can run seamlessly on many platforms with very little to no porting effort.

While RetroArch is the reference frontend for libretro, several other projects have used the libretro interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use.

libretro API header

Binaries

Latest binaries are currently hosted on the buildbot.

Support

To reach developers, either make an issue here on GitHub, make a thread on the forum, chat on discord, or visit our IRC channel: #retroarch @ irc.freenode.org. You could create a post in Reddit with Technical Support flair.

Documentation

See our Documentation Center. On Unix, man-pages are provided. More developer-centric stuff is found here.

Related projects

Philosophy

RetroArch attempts to be small and lean while still having all the useful core features expected from an emulator. It is designed to be very portable and features a gamepad-centric and touchscreen UI. It also has a full-featured command-line interface.

In some areas, RetroArch goes beyond and emphasizes on not-so-common technical features such as multi-pass shader support, real-time rewind (Braid-style), video recording (using FFmpeg), run-ahead input latency removal, etc.

RetroArch also emphasizes being easy to integrate into various launcher frontends.

Platforms

RetroArch has been ported to the following platforms:

  • Android (2.x to most recent version)
  • Apple iOS
  • Apple macOS (PPC, x86-32 and x86-64)
  • Apple tvOS
  • Blackberry
  • DOS
  • Emscripten (WebAssembly and JavaScript)
  • FreeBSD
  • Haiku
  • Linux
  • Microsoft Xbox 360 (Libxenon/XeXDK)
  • Microsoft Xbox One
  • Microsoft Xbox Series S/X
  • Miyoo
  • NetBSD
  • Nintendo 3DS/2DS
  • Nintendo GameCube
  • Nintendo NES/SNES Classic Edition
  • Nintendo Switch
  • Nintendo Wii
  • Nintendo Wii U
  • OpenBSD
  • OpenDingux
  • Original Microsoft Xbox
  • PlayStation2
  • PlayStation3
  • PlayStation4
  • PlayStation Portable
  • PlayStation Vita
  • Raspberry Pi
  • ReactOS
  • RetroFW
  • RS90
  • SerenityOS
  • Solaris
  • Windows 10
  • Windows 11
  • Windows 2000
  • Windows 7
  • Windows 8
  • Windows 95
  • Windows 98
  • Windows Millennium
  • Windows NT 3.5
  • Windows Vista
  • Windows XP

Dependencies (PC)

There are no true hard dependencies per se.

On Windows, RetroArch can run with only Win32 as dependency.

On Linux, there are no true dependencies. For optimal usage, the following dependencies come as recommended:

  • GL headers / Vulkan headers
  • X11 headers and libs, or EGL/KMS/GBM

OSX port of RetroArch requires latest versions of XCode to build.

RetroArch can utilize these libraries if enabled:

  • nvidia-cg-toolkit
  • libfreetype2 (TTF font rendering on screen)

RetroArch needs at least one of these audio driver libraries:

  • ALSA
  • OSS
  • RoarAudio
  • RSound
  • OpenAL
  • JACK
  • SDL
  • PulseAudio
  • XAudio2 (Win32, Xbox 360)
  • DirectSound (Win32, Xbox 1)
  • CoreAudio (OSX, iOS)

To run properly, RetroArch requires a libretro implementation present; however, as it's typically loaded dynamically, it's not required at build time.

Dependencies (Console ports, mobile)

Console ports have their own dependencies, but generally do not require anything other than what the respective SDKs provide.

Requirements

OpenGL1

Your videocard needs to at least support the OpenGL 1.1 spec.

Shaders: N/A

Menu driver support: MaterialUI, XMB, Ozone and RGUI should all work correctly. XMB won't have shader pipeline effects because of the aforementioned lack of shader support.

OpenGL2

Your videocard needs to at least support the OpenGL 2.1 spec.

Shaders: You can choose between either NVIDIA Cg shaders (deprecated, requires separate runtime to be installed on your system), or GLSL shaders.

Menu driver support: MaterialUI, XMB, Ozone and RGUI should all work correctly.

OpenGL3

Your videocard needs to at least support the OpenGL 3.2 core feature spec.

Shaders: You will be able to use modern Slang shaders with this driver.

Menu driver support: MaterialUI, XMB, Ozone and RGUI should all work correctly.

Direct3D 11

Your videocard needs to at least support the Direct3D11 11.0 spec. The card also needs to support at least the Shader Model 4.0.

Shaders: You will be able to use modern Slang shaders with this driver.

Menu driver support: MaterialUI, XMB, Ozone and RGUI should all work correctly.

Vulkan

Your videocard needs to at least support the Vulkan 1.0 spec.

Shaders: You will be able to use modern Slang shaders with this driver.

Menu driver support: MaterialUI, XMB, Ozone and RGUI should all work correctly.

Configuring

The default configuration is defined in config.def.h. It is not recommended to change this unless you know what you're doing. These can later be tweaked by using a config file. A sample configuration file is installed to /etc/retroarch.cfg. This is the system-wide config file.

RetroArch will on startup create a config file in $XDG\_CONFIG\_HOME/retroarch/retroarch.cfg if it does not exist. Users only need to configure a certain option if the desired value deviates from the value defined in config.def.h.

To configure joypads, use the built-in menu or manually configure them in retroarch.cfg.

Compiling and installing

Instructions for compiling and installing RetroArch can be found in the Libretro/RetroArch Documentation Center.

CRT 15Khz Resolution Switching

CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.

If you are running Windows, before enabling the CRT SwitchRes options please make sure you have installed CRTEmudriver and installed some modelines. The minimum modelines for all games to switch correctly are:

  • 2560 x 192 @ 60.000000
  • 2560 x 200 @ 60.000000
  • 2560 x 240 @ 60.000000
  • 2560 x 224 @ 60.000000
  • 2560 x 237 @ 60.000000
  • 2560 x 256 @ 50.000000
  • 2560 x 254 @ 55.000000
  • 2560 x 448 @ 60.000000
  • 2560 x 480 @ 60.000000

Install these modelines replacing 2560 with your desired super resolution. The above resolutions are NTSC only so if you would be playing any PAL content please add PAL modelines:

  • 2560 x 192 @ 50.000000
  • 2560 x 200 @ 50.000000
  • 2560 x 240 @ 50.000000
  • 2560 x 224 @ 50.000000
  • 2560 x 288 @ 50.000000
  • 2560 x 237 @ 50.000000
  • 2560 x 254 @ 55.000000
  • 2560 x 448 @ 50.000000
  • 2560 x 480 @ 50.000000

Some games will require higher PAL resolutions which should also be installed:

  • 2560 x 512 @ 50.000000
  • 2560 x 576 @ 50.000000

Ideally install all these modelines and everything will work great.

Super Resolutions

The default super resolution is 2560. It is displayed just under the CRT switch option, which can be found in video settings. This can be changed within the retroarch.cfg. The only compatible resolutions are 1920, 2560 and 3840. Any other resolutions will be ignored and native switching will be activated.

Native Resolutions

If native resolutions are activated you will need a whole new set of modelines:

  • 256 x 240 @ 50.006977 SNESpal

  • 256 x 448 @ 50.006977 SNESpal

  • 512 x 224 @ 50.006977 SNESpal

  • 512 x 240 @ 50.006977 SNESpal

  • 512 x 448 @ 50.006977 SNESpal

  • 256 x 240 @ 60.098812 SNESntsc

  • 256 x 448 @ 60.098812 SNESntsc

  • 512 x 240 @ 60.098812 SNESntsc

  • 512 x 224 @ 60.098812 SNESntsc

  • 512 x 448 @ 60.098812 SNESntsc

  • 256 x 192 @ 59.922745 MDntsc

  • 256 x 224 @ 59.922745 MDntsc

  • 320 x 224 @ 59.922745 MDntsc

  • 320 x 240 @ 59.922745 MDntsc

  • 320 x 448 @ 59.922745 MDntsc

  • 320 x 480 @ 59.922745 MDntsc

  • 256 x 192 @ 49.701458 MDpal

  • 256 x 224 @ 49.701458 MDpal

  • 320 x 224 @ 49.701458 MDpal

  • 320 x 240 @ 49.701458 MDpal

  • 320 x 288 @ 49.701458 MDpal

  • 320 x 448 @ 49.701458 MDpal

  • 320 x 480 @ 49.701458 MDpal

  • 320 x 576 @ 49.701458 MDpal

  • 256 x 288 @ 49.701458 MSYSpal

  • 256 x 240 @ 60.098812 NESntsc

  • 256 x 240 @ 50.006977 NESpal

  • 640 x 237 @ 60.130001 N64ntsc

  • 640 x 240 @ 60.130001 N64ntsc

  • 640 x 480 @ 60.130001 N64ntsc

  • 640 x 288 @ 50.000000 N64pal

  • 640 x 480 @ 50.000000 N64pal

  • 640 x 576 @ 50.000000 N64pal

  • 256 x 252 @ 49.759998 PSXpal

  • 320 x 252 @ 49.759998 PSXpal

  • 384 x 252 @ 49.759998 PSXpal

  • 640 x 252 @ 49.759998 PSXpal

  • 640 x 540 @ 49.759998 PSXpal

  • 384 x 240 @ 59.941002 PSXntsc

  • 256 x 480 @ 59.941002 PSXntsc

  • 352 x 240 @ 59.820000 Saturn/SGFX_NTSCp

  • 704 x 240 @ 59.820000 SaturnNTSCp

  • 352 x 480 @ 59.820000 SaturnNTSCi

  • 704 x 480 @ 59.820000 SaturnNTSCi

  • 352 x 288 @ 49.701458 SaturnPALp

  • 704 x 288 @ 49.701458 SaturnPALp

  • 352 x 576 @ 49.701458 SaturnPALi

  • 704 x 576 @ 49.701458 SaturnPALi

  • 240 x 160 @ 59.730000 GBA

  • 320 x 200 @ 60.000000 Doom

// Arcade

  • 400 x 254 @ 54.706841 MK
  • 384 x 224 @ 59.637405 CPS1

These modelines are more accurate giving exact hz. However, some games may have unwanted results. This is due to mid-scanline resolution changes on the original hardware. For the best results super resolutions are the way to go.

CRT resolution switching & MAME

Some arcade resolutions can be very different from consumer CRTs. There is resolution detection to ensure MAME games will be displayed in the closest available resolution but drawn at their native resolution within this resolution. Meaning that the MAME game will look just like the original hardware.

MAME ROMs that run in a vertical aspect like DoDonPachi need to be rotated within MAME before resolution switching and aspect correction will work. Do this before enabling CRT SwitchRes so that RetroArch will run in your desktop resolution. Once you have rotated any games that may need it turn CRT SwitchRes on.

Socials

The links below belong to our official channels. Links other than this may have been created by fans, independent members or followers. We seriously recommend using our original resources.

retroarch's People

Contributors

alcaro avatar alfrix avatar aliaspider avatar alphanu1 avatar andres-asm avatar fjtrujy avatar fr500 avatar frangarcj avatar gblues avatar gregorr avatar heuripedes avatar inactive123 avatar jamiras avatar jdgleaver avatar kivutar avatar leiradel avatar libretroadmin avatar lioncash avatar meancoot avatar natinusala avatar orbea avatar robloach avatar sonninnos avatar tatsuya79 avatar themaister avatar toadking avatar warmenhoven avatar weedyweedsmoker avatar yoshisuga avatar zoltanvb 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retroarch's Issues

Take inspiration from mednafen's filtering of SNES/SFC video

Only mednafen does the filtering really well. The image is consistent and is always smooth regardless of whether it's lowres or hires:

mednafen lowres: http://i.imgur.com/l5bb9.png
mednafen hires: http://i.imgur.com/lFvDT.png
mednafen hires 2: http://i.imgur.com/WzUV6.png

Retroarch's bsnes accuracy core produces an image that is consistent but not really pretty at all:

retroarch-bsnes-accuracy lowres: http://i.imgur.com/irjxp.png
retroarch-bsnes-accuracy hires: http://i.imgur.com/4EjVt.png
retroarch-bsnes-accuracy hires 2: http://i.imgur.com/17mMN.png

The other cores produce an inconsistent image that is pretty fine in lowres mode, but not so in hires mode:

retroarch-bsnes-compatibility lowres: http://i.imgur.com/9QeFn.png
retroarch-bsnes-compatibility hires: http://i.imgur.com/1cwDD.png
retroarch-bsnes-compatibility hires 2: http://i.imgur.com/stQu8.png

retroarch-bsnes-performance lowres: http://i.imgur.com/3Y0Ip.png
retroarch-bsnes-performance hires: http://i.imgur.com/Qw4lb.png
retroarch-bsnes-performance hires 2: http://i.imgur.com/wlx1D.png

retroarch-snes9x lowres: http://i.imgur.com/xkLpu.png
retroarch-snes9x hires: http://i.imgur.com/lt58S.png
retroarch-snes9x hires 2: http://i.imgur.com/aXZpi.png

retroarch-snes9x-next lowres: http://i.imgur.com/Rg7zA.png
retroarch-snes9x-next hires: http://i.imgur.com/ayWVm.png
retroarch-snes9x-next hires 2: http://i.imgur.com/ahV3X.png

I know very little about coding and can't tell you exactly what mednafen is doing different, but since it's the only emulator that does this well there must be something. I suggest taking a look at mednafen's SNES/SFC emulation and taking inspiration from its handling of different resolutions, and then "fixing" either RetroArch or all of its SNES/SFC cores. Another option could be to just add a mednafen-snes core, but since the emulation is based on bsnes there is probably no way it could run on anything but a PC.

Sorry about the different proportions. I intended to take all the screenshots in fullscreen, but both mednafen and RetroArch just gave me a solid black picture when I tried. The issue should be quite visible anyway though.

I am only using bilinear filtering in these examples, but other filters and shaders tend to give the same effect in all of RetroArch's cores.

Configuration error for no pkg-config is confusing

If a user tries to run the configuration script without pkg-config installed, they get a confusing warning that doesn't tell them what's missing.

Checking operating system ... Linux
Checking for suitable working C compiler ... /usr/bin/gcc
Checking for suitable working C++ compiler ... /usr/bin/g++
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
Checking function bcm_host_init in -lbcm_host ... yes
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... yes
Checking function getopt_long in -lc ... yes
Not found. Exiting ...

System environment dir not populated in retroarch.cfg (PC)

Users are running into a problem when updating RetroArch on PC that retroarch.cfg doesn't contain a 'system_directory' entry - hence libretro cores like Genesis Plus GX will not even work.

On consoles I autogenerate default values in retroarch.cfg if the config file does not exist - I suggest you should do some similar thing if you don't want to run into lots of bug reports like these - had to help a guy with this issue on IRC (#retroarch) the other day and it only dawned on me later that it was simply missing a default value for the system dir all this time.

Compiling with --disable-netplay configured fails

command.c: In function ‘socket_nonblock’:
command.c:54:4: warning: implicit declaration of function ‘fcntl’ [-Wimplicit-function-declaration]
command.c:54:21: error: ‘F_SETFL’ undeclared (first use in this function)
command.c:54:21: note: each undeclared identifier is reported only once for each function it appears in
command.c:54:40: error: ‘F_GETFL’ undeclared (first use in this function)
command.c:54:51: error: ‘O_NONBLOCK’ undeclared (first use in this function)
command.c: In function ‘rarch_cmd_new’:
command.c:109:41: error: ‘STDIN_FILENO’ undeclared (first use in this function)
command.c:117:4: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
command.c:117:17: error: ‘res’ undeclared (first use in this function)
command.c: In function ‘rarch_cmd_free’:
command.c:131:14: error: ‘rarch_cmd_t’ has no member named ‘net_fd’
command.c:132:7: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
command.c:132:19: error: ‘rarch_cmd_t’ has no member named ‘net_fd’
command.c: In function ‘read_stdin’:
command.c:324:7: warning: implicit declaration of function ‘read’ [-Wimplicit-function-declaration]
command.c:324:26: error: ‘STDIN_FILENO’ undeclared (first use in this function)
make: *** [command.o] Error 1

Note here for maister to read

We really, desperately need a decent solution for libretro updates on PC - in a way that more than one person could update if deemed necessary.

Just an excerpt from the IRC chan -

[quote]
Elysium - anyone else having problems with 2 player support in fceu, genplus and fba?
hunterk - with the 0.9.6 release from themaister.net?
Elysium - mostly works in fba but some of the buttons are different on the 2nd player than the first
Elysium - yeah
Elysium - i'm just getting the emulation cores from the retroarch updater
Elysium - so i'm not sure if those are out of date or what
hunterk - i think they're pretty recent. It works in other cores, though? like snes9x/next?
Elysium - snes works fine
Elysium - but in genplus / fceu the 2nd player doesn't seem to work at all
hunterk - hmm. I thought I remembered this being a problem that was fixed at some point, but perhaps something regressed
hunterk - Squarepusher, do you have any input on this?
Squarepusher - I'm pretty sure those versions are outdated as hell
[/quote]

Give me commit access to this server and I'll make sure it gets updated alright.

We should either do this update service right or not at all - as it is, having outdated builds with no way for anyone else to update when a person is away on vacation for over 3 weeks is just going to drive people away.

Perhaps a buildbot being kept up-to-date by dedicated general end-users like hunterk or Lex could be a solution.

"Enable external command interface" crash

If "Enable external command interface" is disabled, upon running, RetroArch displays an external command interface and subsequently crashes, with "RetroArch: Bringing up command interface on port 55355." as the last line in the log. This is despite "Enable external command interface" being disabled, which it is by default.

Enabling "Enable external command interface" works around the crash, causing RetroArch to run normally and the external command interface being present. Currently, it can't be disabled.

My test environment is Windows.

Note here for maister to read

We really, desperately need a decent solution for libretro updates.

Just an excerpt from the IRC chan -

[quote]
anyone else having problems with 2 player support in fceu, genplus and fba?
with the 0.9.6 release from themaister.net?
mostly works in fba but some of the buttons are different on the 2nd player than the first
yeah
i'm just getting the emulation cores from the retroarch updater
so i'm not sure if those are out of date or what
i think they're pretty recent. It works in other cores, though? like snes9x/next?
snes works fine
but in genplus / fceu the 2nd player doesn't seem to work at all

  • Elysium is now known as Elysium_
    hmm. I thought I remembered this being a problem that was fixed at some point, but perhaps something regressed
    Squarepusher, do you have any input on this?
    I'm pretty sure those versions are outdated as hell
    [/quote]

Give me commit access to this server and I'll make sure it gets updated alright.

We should either do this update service right or not at all - as it is, having outdated builds with no way for anyone else to update is just going to drive people away.

Can't build from master

command.h is missing and I have no idea where it should come from.

This was introduced in commit:

commit 38f7673
Author: Themaister [email protected]
Date: Tue Jul 24 02:47:28 2012 +0200

Add command functionality to stdin.

Builds just fine before that

undefined reference to texture_image_load

gfx/context/x11_common.o: In function 'x11_set_window_icon': /.../.../RetroArch/gfx/context/x11_common.c:115: undefined reference to 'texture_image_load'
collect2: error: ld returned 1 exit status
make: *** [retroarch] Error 1

When I tried compiling linux on ubuntu 64bit 12.10

no audio? and missing icon?

Map_LoROMMap
RetroArch [ERROR] :: [X11]: Failed to load icon from: /usr/share/icons/retroarch.png
RetroArch [WARN] :: [GLX]: glXSwapInterval() failed.
Failed to open connection to "session" message bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
open: No such file or directory
RetroArch [ERROR] :: Failed to initialize audio driver. Will continue without audio.

Feature Request: Multiple Config Files

It would be nice to have an include directive for the configuration files, thus allowing the main config file to be split into smaller, easier to read files (i.e.: ~/.ssnes/master.cfg, ~/.ssnes/input.cfg, ~/.ssnes/video.cfg). Doesn't have to be this particularly, but especially when using a mouse-less/pointer-less terminal to edit the files, it would make life easier.

email for maister

Hi, I've done some work on a libretro wrapper around libmame. It's in github, bji/libretromame.

For the time being I'm just spinning a MAME thread rather than hacking the MAME source to support running the game one frame at a time. It's not impossible to do that, it's just more work than I am interested in at the moment. And getting anything at all to work is more important than refining the implementation at the moment.

I've stumbled quite alot on the lack of specificity in the libretro API. I'm making lots of assumptions that aren't explicity called out in the libretro.h header file (such as, I assume that nobody is ever going to call retro_game_load() if a game is already loaded and hasn't been unloaded by a call to retro_game_unload(); and I assume that nobody will ever call any of the retro methods except retro_get_system_av_info() in any of the retro callbacks). Also I have no idea how to map keyboard keys to controls since the retro header file doesn't give any indication of what id values to use for keys (i.e. what should I pass into the retro_input_state_t callback to get the state of key 'a'?).

And, I'm not sure how I am going to test this. Without digging into the code in the RetroArch project I have no idea how to integrate what I am doing into a frontend that will let me run and test out my libretro implementation.

Any hints you could offer would be helpful. I hope you can take some honest constructive criticism: you need much more documentation before I think you can expect anyone to be able to contribute to RetroArch effectively. As it is, it's turning into more guesswork than anything else, and that's no fun ...

You might consider some more structure to your API and less undocumented #defined constants. As an example, libmame.h LibMame_PerPlayerControlState and LibMame_SharedControlState are structured and documented well enough that I think that just about anyone could figure out what they are and how to use them without having to read example code or (worse) dig into the libmame library code itself.

Also, not being able to contact you by email, and having to submit issues to a github project as a means of communication, is not ideal.

Thanks,
Bryan

D3D error Intel GMA

Crappy video card I know, but DirectX 9 compatible. I already tried copying over the D3D9X_43.DLL file. Using 0.98 beta 2

LOG:
RetroArch CMD: Q:/RetroArch/0.98/retroarch.exe Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/Aero the Acro-Bat 2 (Europe).md -c Q:\RetroArch\0.98b2\retroarch.cfg -v -S Q:/RetroArch/Savestates/Aero the Acro-Bat 2 (Europe).state

RetroArch: Opening file: "Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/Aero the Acro-Bat 2 (Europe).md"
=== Build =======================================
Compiler: MinGW (4.7.1) 64-bit

Built: Nov 8 2012

RetroArch: [CPUID]: Vendor: GenuineIntel
RetroArch: [CPUID]: SSE: 1
RetroArch: [CPUID]: SSE2: 1
RetroArch: [CPUID]: AVX: 0
=== Config ===
video_driver = "d3d9"
audio_driver = "dsound"
video_fullscreen = "true"
video_windowed_fullscreen = "false"
video_disable_composition = "true"
video_aspect_ratio_auto = "true"
libretro_path = "Q:/RetroArch/0.98/libretro-git-genplus-x86_64.dll"
stdin_cmd_enable = "true"
system_directory = "Q:/RetroArch/Bios/"
screenshot_directory = "Q:/RetroArch/Screenshot/"
=== Config end ===
RetroArch: Loading dynamic libretro from: "Q:/RetroArch/0.98/libretro-git-genplus-x86_64.dll"
RetroArch: Version of libretro API: 1
RetroArch: Compiled against API: 1
RetroArch: Environ PERFORMANCE_LEVEL: 1.
RetroArch: Environ SET_PIXEL_FORMAT: RGB565.
Frontend supports RGB565 - will use that instead of XRGB1555.
RetroArch: ROM loading skipped. Implementation will load it on its own.
RetroArch: Environ SYSTEM_DIRECTORY: "Q:/RetroArch/Bios/".
Sega CD EU BRAM should be located at: Q:/RetroArch/Bios/\scd_E.brm
Sega CD US BRAM should be located at: Q:/RetroArch/Bios/\scd_U.brm
Sega CD JP BRAM should be located at: Q:/RetroArch/Bios/\scd_J.brm
Sega CD EU BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_E.bin
Sega CD US BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_U.bin
Sega CD JP BIOS should be located at: Q:/RetroArch/Bios/\bios_CD_J.bin
Master System EU BIOS should be located at: Q:/RetroArch/Bios/\bios_E.sms
Master System US BIOS should be located at: Q:/RetroArch/Bios/\bios_U.sms
Master System JP BIOS should be located at: Q:/RetroArch/Bios/\bios_J.sms
Game Gear BIOS should be located at: Q:/RetroArch/Bios/\bios.gg
S&K upmem ROM should be located at: Q:/RetroArch/Bios/\sk2chip.bin
S&K ROM should be located at: Q:/RetroArch/Bios/\sk.bin
Game Genie ROM should be located at: Q:/RetroArch/Bios/\ggenie.bin
Action Replay ROM should be located at: Q:/RetroArch/Bios/\areplay.bin
BRAM file is located at: Q:/Sega/SEGAMegaDrive/MDNoIntro 22-9-2012/cart.brm
INFORMATION - Loading 2097152 bytes ...
RetroArch: Timings deviate too much. Will not adjust. (Display = 59.95 Hz, Game = 49.70 Hz)
RetroArch: Set audio input rate to: 44100.00 Hz.
RetroArch: Adjusting aspect ratio to 1.43
RetroArch: Video @ fullscreen
RetroArch: Setting multimedia scheduling for DWM.
RetroArch: [D3D9]: Monitor size: 1680x1050.
RetroArch [ERROR] :: [D3D9]: Failed to init D3D9 (Failed to init device).
RetroArch [ERROR] :: Cannot open video driver ... Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"

D3D9 video driver issue

Pokemon Gold/Silver Version
retroarch.exe crashes at the status screen.

[RetroArch]
Version: 0.9.8 beta1

Trace debugging with GDB
Program received signal SIGSEGV, Segmentation fault.
0x75f9a048 in msvcrt!memmove () from C:\Windows\system32\msvcrt.dll

backtrace
#0 0x75f9a048 in msvcrt!memmove () from C:\Windows\system32\msvcrt.dll
#1 0x75f9a00b in msvcrt!memmove () from C:\Windows\system32\msvcrt.dll
#2 0x0042f738 in RenderChain::blit_to_texture (this=0x1d8b1c8, frame=0x0,

width=160, height=144, pitch=512) at gfx/d3d9/render_chain.cpp:554

#3 0x0042dbb6 in RenderChain::render (this=0x1d8b1c8, data=0x0, width=160,

height=144, pitch=512, rotation=0) at gfx/d3d9/render_chain.cpp:198

#4 0x00427709 in D3DVideo::frame (this=0x3bc678, frame=0x0, width=160,

height=144, pitch=512, msg=0x0) at gfx/d3d9/d3d9.cpp:483

#5 0x0042c174 in d3d9_frame (data=0x3bc678, frame=0x0, width=160,

height=144, pitch=512, msg=0x0) at gfx/d3d9/d3d9.cpp:1134

#6 0x00402012 in video_frame (data=0x0, width=160, height=144, pitch=512)

at retroarch.c:309

#7 0x68ceb116 in retro_run () at libretro/libretro.cpp:205
#8 0x00408086 in rarch_main_iterate () at retroarch.c:2778
#9 0x0040816e in rarch_main (argc=9, argv=0x3b19b8) at retroarch.c:2853
#10 0x004081a8 in main (argc=9, argv=0x3b19b8) at retroarch.c:2868

Thanks.

dylib_load() failed:

/usr/local/lib/libretro/libretro-bsnes.so: cannot open shared object file: No such file or directory
/usr/local/lib/libretro: cannot open shared object file: No such file or directory

I cannot link the library files.

High cpu usage with pulse

At default settings, just 'audio_driver = pulse' will cost about 3 times cpu power than 'audio_driver = al',
even if 'audio_enable = false'.

Save/Load State crash/close

After a few save and/or load states, the emulator closes abruptly after finishing. BSNES compatibility 88, on SMW.

Build broken without --disable-libpng on Debian (at least)

I had this issue before and recently bumped into it again after re-installing my machine. When RetroArch is configured with plain ./configure, the build will fail with something like this:

sam@gorbachov:/usr/src/RetroArch$ make -j3
CC file_path.c
CC file.c
CC hash.c
CC driver.c
CC settings.c
CC retroarch.c
CC dynamic.c
CC message.c
CC rewind.c
CC compat/compat.c
CC patch.c
In file included from /usr/include/libpng12/png.h:538:0,
from screenshot.c:30:
/usr/include/libpng12/pngconf.h:371:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘.’ token
/usr/include/libpng12/pngconf.h:372:12: error: unknown type name ‘dont
/usr/include/libpng12/pngconf.h:372:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘it’
/usr/include/libpng12/pngconf.h:372:29: error: unknown type name ‘it’
make: *** [screenshot.o] Error 1
make: *** Waiting for unfinished jobs....
CC gfx/gfx_common.c
CC audio/null.c
sam@gorbachov:/usr/src/RetroArch$

Configuring with the --disable-libpng makes the build work. dpkg says my version of libpng is 1.2.49-1, if it helps. This is on Debian Wheezy and the problem existed on Debian Squeeze as well.

Audio timing.sample_rate =audio_out_rate glitch

Initially I've tryed to use higher (48000) samplerate in GenPlusGX libretro port, and got very buggy sound - depending on audio_driver and audio_rate_control settings it can be crackles/pops, or no sound at all, or 1/2 framerate drop.
After some experiments I've found glich is happens then timing.sample_rate in libretro port and audio_out_rate in retroarch.cfg is equal, so even with "clean git" GenPlusGX compile I've got this bug with audio_out_rate = "44100"
I've also checked FCEUX port and got the same bug with audio_out_rate = "32050"
So this is definitely RetroArch core bug, and not ports-related.

also this ekeeke/Genesis-Plus-GX#2 is probably a result of same issue.
changing timing.sample_rate to 44100 (instead of retroarch-default 48000) kind of fixed it.

Steps to reproduce:

  1. set audio_out_rate to libretro-port samplerate (44100 for GenPlus, 32050 for FCEUX, etc)
  2. run it

Force 16-bit color mode is silly and should probably go away.

Is there any reason this options needs to be here still? It was added to SDL driver way back in the day because it was simple enough at the time, but for one reason I cannot recall now.

What the option essentially does it forcing a backbuffer of 16-bit. This is horribly slow on any computer that's not from the stone age (Windows 98 and older I expect, but I doubt RetroArch runs on that anyways). Now, only SDL GL context and software SDL driver supports this mode, and I don't really feel like adding 16-bit backbuffer modes to all contexts unless there is a real need for this mode.

Removing it would simplify the SDL software driver a great deal, and remove some clutter in context API in the process.

Add meancoot to AUTHORS

Someone should add meancoot with full name, email and contributions to AUTHORS. A pull request from meancoot with this information is fine.

In file included from gfx/gl.c:36:

In file included from gfx/gl.c:36:
gfx/gl_common.h:54:19: error: GL/gl.h: No such file or directory
gfx/gl_common.h:55:22: error: GL/glext.h: No such file or directory
In file included from gfx/gl.c:36:
gfx/gl_common.h: In function ‘gl_query_extension’:
gfx/gl_common.h:90: warning: implicit declaration of function ‘glGetString’
gfx/gl_common.h:90: error: ‘GL_EXTENSIONS’ undeclared (first use in this function)
gfx/gl_common.h:90: error: (Each undeclared identifier is reported only once
gfx/gl_common.h:90: error: for each function it appears in.)
gfx/gl_common.h: In function ‘gl_check_error’:
gfx/gl_common.h:100: warning: implicit declaration of function ‘glGetError’
gfx/gl_common.h:103: error: ‘GL_INVALID_ENUM’ undeclared (first use in this function)
gfx/gl_common.h:106: error: ‘GL_INVALID_VALUE’ undeclared (first use in this function)
gfx/gl_common.h:109: error: ‘GL_INVALID_OPERATION’ undeclared (first use in this function)
gfx/gl_common.h:112: error: ‘GL_OUT_OF_MEMORY’ undeclared (first use in this function)
gfx/gl_common.h:115: error: ‘GL_NO_ERROR’ undeclared (first use in this function)
gfx/gl_common.h: At top level:
gfx/gl_common.h:165: error: expected specifier-qualifier-list before ‘GLfloat’
gfx/gl_common.h:171: warning: struct has no members
gfx/gl_common.h:175: error: expected specifier-qualifier-list before ‘GLuint’
gfx/gl_common.h:179: warning: struct has no members
gfx/gl_common.h:183: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘attribute’ before ‘’ token
gfx/gl_common.h:187: warning: struct has no members
gfx/gl_common.h:206: error: expected specifier-qualifier-list before ‘GLuint’
gfx/gl_common.h:340: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vertexes_flipped’
gfx/gl_common.h:341: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘white_color’
gfx/gl.c:57: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vertexes_flipped’
gfx/gl.c:62: warning: ISO C does not allow extra ‘;’ outside of a function
gfx/gl.c:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vertexes’
gfx/gl.c:71: warning: ISO C does not allow extra ‘;’ outside of a function
gfx/gl.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘tex_coords’
gfx/gl.c:78: warning: ISO C does not allow extra ‘;’ outside of a function
gfx/gl.c:80: error: expected ‘)’ before ‘
’ token
gfx/gl.c:88: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘white_color’
gfx/gl.c:93: warning: ISO C does not allow extra ‘;’ outside of a function
gfx/gl.c:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
gfx/gl.c:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
gfx/gl.c: In function ‘gl_set_coords’:
gfx/gl.c:283: warning: implicit declaration of function ‘glClientActiveTexture’
gfx/gl.c:283: error: ‘GL_TEXTURE0’ undeclared (first use in this function)
gfx/gl.c:285: warning: implicit declaration of function ‘glVertexPointer’
gfx/gl.c:285: error: ‘GL_FLOAT’ undeclared (first use in this function)
gfx/gl.c:285: error: ‘const struct gl_coords’ has no member named ‘vertex’
gfx/gl.c:286: warning: implicit declaration of function ‘glEnableClientState’
gfx/gl.c:286: error: ‘GL_VERTEX_ARRAY’ undeclared (first use in this function)
gfx/gl.c:288: warning: implicit declaration of function ‘glColorPointer’
gfx/gl.c:288: error: ‘const struct gl_coords’ has no member named ‘color’
gfx/gl.c:289: error: ‘GL_COLOR_ARRAY’ undeclared (first use in this function)
gfx/gl.c:291: warning: implicit declaration of function ‘glTexCoordPointer’
gfx/gl.c:291: error: ‘const struct gl_coords’ has no member named ‘tex_coord’
gfx/gl.c:292: error: ‘GL_TEXTURE_COORD_ARRAY’ undeclared (first use in this function)
gfx/gl.c:294: error: ‘GL_TEXTURE1’ undeclared (first use in this function)
gfx/gl.c:295: error: ‘const struct gl_coords’ has no member named ‘lut_tex_coord’
gfx/gl.c: In function ‘gl_set_mvp’:
gfx/gl.c:304: warning: implicit declaration of function ‘glMatrixMode’
gfx/gl.c:304: error: ‘GL_PROJECTION’ undeclared (first use in this function)
gfx/gl.c:305: warning: implicit declaration of function ‘glLoadMatrixf’
gfx/gl.c:306: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
gfx/gl.c:307: warning: implicit declaration of function ‘glLoadIdentity’
gfx/gl.c: In function ‘gl_set_projection’:
gfx/gl.c:612: error: ‘struct gl_ortho’ has no member named ‘left’
gfx/gl.c:612: error: ‘struct gl_ortho’ has no member named ‘right’
gfx/gl.c:613: error: ‘struct gl_ortho’ has no member named ‘bottom’
gfx/gl.c:613: error: ‘struct gl_ortho’ has no member named ‘top’
gfx/gl.c:613: error: ‘struct gl_ortho’ has no member named ‘znear’
gfx/gl.c:613: error: ‘struct gl_ortho’ has no member named ‘zfar’
gfx/gl.c:618: error: ‘gl_t’ has no member named ‘rotation’
gfx/gl.c:622: error: ‘gl_t’ has no member named ‘mvp’
gfx/gl.c:623: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:623: error: ‘gl_t’ has no member named ‘mvp’
gfx/gl.c: In function ‘gl_set_viewport’:
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:629: warning: excess elements in struct initializer
gfx/gl.c:629: warning: (near initialization for ‘ortho’)
gfx/gl.c:631: error: ‘gl_t’ has no member named ‘keep_aspect’
gfx/gl.c:674: warning: implicit declaration of function ‘glViewport’
gfx/gl.c:675: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:676: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:677: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:678: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:685: error: ‘gl_t’ has no member named ‘vp_out_width’
gfx/gl.c:686: error: ‘gl_t’ has no member named ‘vp_out_height’
gfx/gl.c: In function ‘gl_set_rotation’:
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:694: warning: excess elements in struct initializer
gfx/gl.c:694: warning: (near initialization for ‘ortho’)
gfx/gl.c:697: error: ‘gl_t’ has no member named ‘rotation’
gfx/gl.c: In function ‘gl_update_resize’:
gfx/gl.c:844: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:844: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c: In function ‘gl_update_input_size’:
gfx/gl.c:851: error: ‘gl_t’ has no member named ‘last_width’
gfx/gl.c:851: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:851: error: ‘gl_t’ has no member named ‘last_height’
gfx/gl.c:851: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:851: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:853: error: ‘gl_t’ has no member named ‘last_width’
gfx/gl.c:853: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:854: error: ‘gl_t’ has no member named ‘last_height’
gfx/gl.c:854: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:862: warning: implicit declaration of function ‘glPixelStorei’
gfx/gl.c:862: error: ‘GL_UNPACK_ALIGNMENT’ undeclared (first use in this function)
gfx/gl.c:864: warning: implicit declaration of function ‘glTexSubImage2D’
gfx/gl.c:864: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:865: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:865: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:865: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:866: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c:866: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:869: error: ‘GLfloat’ undeclared (first use in this function)
gfx/gl.c:869: error: expected ‘;’ before ‘xamt’
gfx/gl.c:870: error: expected ‘;’ before ‘yamt’
gfx/gl.c:872: warning: implicit declaration of function ‘set_texture_coords’
gfx/gl.c:872: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c:872: error: ‘xamt’ undeclared (first use in this function)
gfx/gl.c:872: error: ‘yamt’ undeclared (first use in this function)
gfx/gl.c:875: error: ‘gl_t’ has no member named ‘last_width’
gfx/gl.c:875: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:876: error: ‘gl_t’ has no member named ‘last_height’
gfx/gl.c:876: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:878: error: expected ‘;’ before ‘xamt’
gfx/gl.c:879: error: expected ‘;’ before ‘yamt’
gfx/gl.c:880: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c: In function ‘gl_convert_frame_rgb16_32’:
gfx/gl.c:888: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:888: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:890: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:891: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:892: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:893: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:894: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:895: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:896: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:897: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:900: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:901: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c:902: error: ‘gl_t’ has no member named ‘scaler’
gfx/gl.c: In function ‘gl_init_textures_data’:
gfx/gl.c:910: error: ‘gl_t’ has no member named ‘last_width’
gfx/gl.c:910: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:911: error: ‘gl_t’ has no member named ‘last_height’
gfx/gl.c:911: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:916: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:916: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:916: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:917: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:917: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:918: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:918: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:919: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:919: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:920: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:920: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:921: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:921: error: ‘tex_coords’ undeclared (first use in this function)
gfx/gl.c: In function ‘gl_copy_frame’:
gfx/gl.c:1010: error: ‘GL_UNPACK_ALIGNMENT’ undeclared (first use in this function)
gfx/gl.c:1011: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1014: error: ‘gl_t’ has no member named ‘conv_buffer’
gfx/gl.c:1015: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:1016: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:1017: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c:1017: error: ‘gl_t’ has no member named ‘conv_buffer’
gfx/gl.c:1021: error: ‘GL_UNPACK_ROW_LENGTH’ undeclared (first use in this function)
gfx/gl.c:1021: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1023: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:1024: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c: In function ‘gl_init_textures’:
gfx/gl.c:1039: warning: implicit declaration of function ‘glGenTextures’
gfx/gl.c:1039: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1042: warning: implicit declaration of function ‘glBindTexture’
gfx/gl.c:1042: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:1042: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1044: warning: implicit declaration of function ‘glTexParameteri’
gfx/gl.c:1044: error: ‘GL_TEXTURE_WRAP_S’ undeclared (first use in this function)
gfx/gl.c:1044: error: ‘gl_t’ has no member named ‘border_type’
gfx/gl.c:1045: error: ‘GL_TEXTURE_WRAP_T’ undeclared (first use in this function)
gfx/gl.c:1045: error: ‘gl_t’ has no member named ‘border_type’
gfx/gl.c:1046: error: ‘GL_TEXTURE_MAG_FILTER’ undeclared (first use in this function)
gfx/gl.c:1046: error: ‘gl_t’ has no member named ‘tex_filter’
gfx/gl.c:1047: error: ‘GL_TEXTURE_MIN_FILTER’ undeclared (first use in this function)
gfx/gl.c:1047: error: ‘gl_t’ has no member named ‘tex_filter’
gfx/gl.c:1049: error: ‘gl_t’ has no member named ‘egl_images’
gfx/gl.c:1051: warning: implicit declaration of function ‘glTexImage2D’
gfx/gl.c:1052: error: ‘gl_t’ has no member named ‘internal_fmt’
gfx/gl.c:1052: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1052: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1052: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:1053: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c:1053: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1053: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1056: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1056: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c: In function ‘gl_next_texture_index’:
gfx/gl.c:1062: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:1062: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:1063: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:1064: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:1064: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c: In function ‘gl_set_shader_viewport’:
gfx/gl.c:1070: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1070: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c: In function ‘gl_frame’:
gfx/gl.c:1105: error: ‘gl_t’ has no member named ‘frame_count’
gfx/gl.c:1107: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:1107: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1107: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:1120: error: ‘gl_t’ has no member named ‘should_resize’
gfx/gl.c:1122: error: ‘gl_t’ has no member named ‘should_resize’
gfx/gl.c:1123: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1123: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c:1139: warning: excess elements in struct initializer
gfx/gl.c:1139: warning: (near initialization for ‘tex_info’)
gfx/gl.c:1140: error: ‘struct gl_tex_info’ has no member named ‘tex’
gfx/gl.c:1140: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1140: error: ‘gl_t’ has no member named ‘tex_index’
gfx/gl.c:1141: error: ‘struct gl_tex_info’ has no member named ‘input_size’
gfx/gl.c:1142: error: ‘struct gl_tex_info’ has no member named ‘input_size’
gfx/gl.c:1143: error: ‘struct gl_tex_info’ has no member named ‘tex_size’
gfx/gl.c:1143: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1144: error: ‘struct gl_tex_info’ has no member named ‘tex_size’
gfx/gl.c:1144: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1146: error: ‘struct gl_tex_info’ has no member named ‘coord’
gfx/gl.c:1146: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c:1146: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c:1148: warning: implicit declaration of function ‘glClear’
gfx/gl.c:1148: error: ‘GL_COLOR_BUFFER_BIT’ undeclared (first use in this function)
gfx/gl.c:1150: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1150: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1151: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1151: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1152: error: ‘gl_t’ has no member named ‘frame_count’
gfx/gl.c:1153: error: ‘gl_t’ has no member named ‘prev_info’
gfx/gl.c:1155: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1155: error: ‘gl_t’ has no member named ‘mvp’
gfx/gl.c:1156: warning: implicit declaration of function ‘glDrawArrays’
gfx/gl.c:1156: error: ‘GL_TRIANGLE_STRIP’ undeclared (first use in this function)
gfx/gl.c: In function ‘gl_disable_client_arrays’:
gfx/gl.c:1205: warning: implicit declaration of function ‘glDisableClientState’
gfx/gl.c:1205: error: ‘GL_VERTEX_ARRAY’ undeclared (first use in this function)
gfx/gl.c:1206: error: ‘GL_TEXTURE_COORD_ARRAY’ undeclared (first use in this function)
gfx/gl.c:1207: error: ‘GL_COLOR_ARRAY’ undeclared (first use in this function)
gfx/gl.c: In function ‘gl_free’:
gfx/gl.c:1227: warning: implicit declaration of function ‘glDeleteTextures’
gfx/gl.c:1227: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c:1248: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1249: error: ‘gl_t’ has no member named ‘conv_buffer’
gfx/gl.c: In function ‘resolve_extensions’:
gfx/gl.c:1275: error: ‘gl_t’ has no member named ‘border_type’
gfx/gl.c:1275: error: ‘GL_CLAMP_TO_BORDER’ undeclared (first use in this function)
gfx/gl.c: In function ‘gl_reinit_textures’:
gfx/gl.c:1298: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1299: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1300: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1301: error: ‘gl_t’ has no member named ‘internal_fmt’
gfx/gl.c:1301: error: ‘GL_RGBA’ undeclared (first use in this function)
gfx/gl.c:1302: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:1302: error: ‘GL_BGRA’ undeclared (first use in this function)
gfx/gl.c:1303: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c:1303: error: ‘GL_UNSIGNED_INT_8_8_8_8_REV’ undeclared (first use in this function)
gfx/gl.c:1304: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1306: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1306: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1308: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1308: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1308: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1308: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1309: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1310: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1310: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1310: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1312: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1312: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1312: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1314: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1314: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1314: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1322: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:1323: error: ‘gl_t’ has no member named ‘texture’
gfx/gl.c: In function ‘gl_init’:
gfx/gl.c:1419: error: ‘gl_t’ has no member named ‘full_x’
gfx/gl.c:1419: error: ‘gl_t’ has no member named ‘full_y’
gfx/gl.c:1420: error: ‘gl_t’ has no member named ‘full_x’
gfx/gl.c:1420: error: ‘gl_t’ has no member named ‘full_y’
gfx/gl.c:1428: error: ‘gl_t’ has no member named ‘full_x’
gfx/gl.c:1429: error: ‘gl_t’ has no member named ‘full_y’
gfx/gl.c:1440: warning: implicit declaration of function ‘glBlendFunc’
gfx/gl.c:1440: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
gfx/gl.c:1440: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
gfx/gl.c:1451: error: ‘gl_t’ has no member named ‘fullscreen’
gfx/gl.c:1454: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1454: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c:1455: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1455: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c:1457: error: ‘gl_t’ has no member named ‘full_x’
gfx/gl.c:1457: error: ‘gl_t’ has no member named ‘full_y’
gfx/gl.c:1459: error: ‘gl_t’ has no member named ‘full_x’
gfx/gl.c:1459: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1460: error: ‘gl_t’ has no member named ‘full_y’
gfx/gl.c:1460: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c:1482: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1483: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1490: error: ‘gl_t’ has no member named ‘keep_aspect’
gfx/gl.c:1498: error: ‘gl_t’ has no member named ‘tex_filter’
gfx/gl.c:1498: error: ‘GL_LINEAR’ undeclared (first use in this function)
gfx/gl.c:1498: error: ‘GL_NEAREST’ undeclared (first use in this function)
gfx/gl.c:1500: error: ‘gl_t’ has no member named ‘tex_filter’
gfx/gl.c:1502: error: ‘gl_t’ has no member named ‘internal_fmt’
gfx/gl.c:1502: error: ‘GL_RGBA’ undeclared (first use in this function)
gfx/gl.c:1503: error: ‘gl_t’ has no member named ‘texture_type’
gfx/gl.c:1503: error: ‘GL_BGRA’ undeclared (first use in this function)
gfx/gl.c:1504: error: ‘gl_t’ has no member named ‘texture_fmt’
gfx/gl.c:1504: error: ‘GL_UNSIGNED_INT_8_8_8_8_REV’ undeclared (first use in this function)
gfx/gl.c:1505: error: ‘gl_t’ has no member named ‘base_size’
gfx/gl.c:1508: warning: implicit declaration of function ‘glEnable’
gfx/gl.c:1508: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
gfx/gl.c:1511: warning: implicit declaration of function ‘glDisable’
gfx/gl.c:1511: error: ‘GL_DEPTH_TEST’ undeclared (first use in this function)
gfx/gl.c:1512: error: ‘GL_DITHER’ undeclared (first use in this function)
gfx/gl.c:1514: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c:1514: error: ‘tex_coords’ undeclared (first use in this function)
gfx/gl.c:1515: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1515: error: ‘vertex_ptr’ undeclared (first use in this function)
gfx/gl.c:1516: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1516: error: ‘gl_t’ has no member named ‘tex_coords’
gfx/gl.c:1517: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1517: error: ‘white_color’ undeclared (first use in this function)
gfx/gl.c:1518: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1519: error: ‘gl_t’ has no member named ‘coords’
gfx/gl.c:1519: error: ‘gl_t’ has no member named ‘mvp’
gfx/gl.c:1522: error: ‘gl_t’ has no member named ‘empty_buf’
gfx/gl.c:1522: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1522: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1525: error: ‘gl_t’ has no member named ‘conv_buffer’
gfx/gl.c:1525: error: ‘gl_t’ has no member named ‘tex_w’
gfx/gl.c:1525: error: ‘gl_t’ has no member named ‘tex_h’
gfx/gl.c:1526: error: ‘gl_t’ has no member named ‘conv_buffer’
gfx/gl.c: In function ‘gl_alive’:
gfx/gl.c:1557: error: ‘gl_t’ has no member named ‘win_width’
gfx/gl.c:1557: error: ‘gl_t’ has no member named ‘win_height’
gfx/gl.c:1557: error: ‘gl_t’ has no member named ‘frame_count’
gfx/gl.c:1562: error: ‘gl_t’ has no member named ‘quitting’
gfx/gl.c:1564: error: ‘gl_t’ has no member named ‘should_resize’
gfx/gl.c:1566: error: ‘gl_t’ has no member named ‘quitting’
gfx/gl.c: In function ‘gl_viewport_info’:
gfx/gl.c:1625: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c: In function ‘gl_read_viewport’:
gfx/gl.c:1672: error: ‘GL_PACK_ROW_LENGTH’ undeclared (first use in this function)
gfx/gl.c:1672: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1673: error: ‘GL_PACK_ALIGNMENT’ undeclared (first use in this function)
gfx/gl.c:1673: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1675: warning: implicit declaration of function ‘glReadPixels’
gfx/gl.c:1675: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1675: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1676: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1676: error: ‘gl_t’ has no member named ‘vp’
gfx/gl.c:1677: error: ‘GL_BGR’ undeclared (first use in this function)
gfx/gl.c:1677: error: ‘GL_UNSIGNED_BYTE’ undeclared (first use in this function)
At top level:
cc1: warning: unrecognized command line option "-Wno-language-extension-token"
cc1: warning: unrecognized command line option "-Wno-unused-result"
make: *** [gfx/gl.o] Error 1

Input system refactoring suggestion

I've already hit an issue with the psx backend where I want to choose between dual analog and a regular gamepad but the retroarch frontend only gives me SNES specific options

I suggest having a way for the implementation to expose the input types it supports

each input is specified by:

  • a human readable name for printing and cmdline parsing.
  • an ID with a scheme similar to the current one where the 1st byte tells retroach weather it needs the mouse abstraction \ joypad abstraction \ raw keyboard (for amiga \ c64 \ dosbox) and the rest is for the emulator to to use internally.

Also making the connection of mutitaps an implementation detail of the emulator. Meaning that if it gets mappings for port 3 - 8 it's up for the backend to make sure that this makes sense.

the cmdline will be --port 1 gamepad --port 2 dualshock

I don't mind helping in getting this change done. I just want to see what you guys think about it.

[OS X] Build issue (linking OpenGL)

This is a pretty minor issue. Line 193 of the Makefile causes the build to fail on OS X. Changing the line to LIBS += -framework OpenGL solves the build for OS X, but will probably mess it up for Linux. An ifeq checking for OS X should fix it up nicely.

info->size returns 0 when need_fullpath = true

Think we discovered an issue in RetroArch while testing Stella-

Seems that if need_fullpath was true, info->size would return 0.

I believe the pointer to the rom data was a null pointer as well.

GLSL todos for GLES Android

More issues -

it seems Google in their infinite wisdom decided not to offer libxml as standard in the NDK- for something that uses XML for the most basic of activities in their OS, you would have thought they would have at least offered that - but oh noes - can't have that.

So that means - if we want to get glsl_shader.c compiling - we need to build libxml separately as a dependency for the RetroArch Android port.

As if it isn't bad enough that it has crap sound and that there are no clear-cut 'line in the sand' standards for 'GL' (GL_UNPACK_ROW_LENGTH missing, no CLAMP_FOR_BORDER), now we have to deal with XML 'not being exposed' (just like how Google doesn't want to expose ALSA to NDK too - you know, just so that we might get decent sound - or just like how it doesn't want to 'expose' Freetype - because you know, that might give you too much flexibility and all that). 'Android/iOS is the future' my ass - at least where Android is concerned - future of what? A bypassed dark alternate universe created by a time paradox? Is Google sending its Droid Terminators (powered by Google Maps) back in time to 'stop' decent computing from having happened in the present - 'there can only be Android and Google'.

ffmpeg support broken in mingw64 builds

retroarch must be compiled with HAVE_FFMPEG=0, else it will fail with:

record/ffemu.c: In function 'encode_video':
record/ffemu.c:695:4: warning: implicit declaration of function 'avcodec_encode_video2' [-Wimplicit-function-declaration]
record/ffemu.c: In function 'encode_audio':
record/ffemu.c:789:9: error: 'AVFrame' has no member named 'nb_samples'
record/ffemu.c:792:28: error: 'AVFrame' has no member named 'nb_samples'
record/ffemu.c:796:4: warning: implicit declaration of function 'avcodec_fill_audio_frame' [-Wimplicit-function-declaration]
record/ffemu.c:797:36: error: 'AV_SAMPLE_FMT_FLTP' undeclared (first use in this function)
record/ffemu.c:797:36: note: each undeclared identifier is reported only once for each function it appears in
record/ffemu.c:802:4: warning: implicit declaration of function 'avcodec_encode_audio2' [-Wimplicit-function-declaration]
record/ffemu.c:805:7: warning: implicit declaration of function 'avcodec_free_frame' [-Wimplicit-function-declaration]
CC command.c
make: *** [record/ffemu.o] Error 1

IPS error with mednafen-wswan core

RetroArch CMD: retroarch D:/Roms/Wonderswan/Alchemist Marie & Elie - Futari no Atelier.wsc -c D:\Emu\RetroArch\retroarch.cfg -v --no-patch

RetroArch: Opening file: "D:/Roms/Wonderswan/Alchemist Marie & Elie - Futari no Atelier.wsc"
=== Build =======================================
Compiler: MinGW (4.7.1) 64-bit

Built: Nov 8 2012

RetroArch: [CPUID]: Vendor: GenuineIntel
RetroArch: [CPUID]: SSE: 1
RetroArch: [CPUID]: SSE2: 1
RetroArch: [CPUID]: AVX: 0
=== Config ===
video_driver = "d3d9"
audio_driver = "xaudio"
libretro_path = "D:/Emu/RetroArch/libretro-0922-mednafen-wswan-x86_64.dll"
video_aspect_ratio = "1.777800"
video_fullscreen = "true"
input_player1_joypad_index = "0"
input_player1_a_axis = "nul"
input_player1_a_btn = "2"
input_player1_a = "nul"
input_player1_b_axis = "nul"
input_player1_b_btn = "1"
input_player1_b = "nul"
input_player1_y_axis = "nul"
input_player1_y_btn = "0"
input_player1_y = "nul"
input_player1_x_axis = "nul"
input_player1_x_btn = "3"
input_player1_x = "nul"
input_player1_start_axis = "nul"
input_player1_start_btn = "9"
input_player1_start = "nul"
input_player1_select_axis = "nul"
input_player1_select_btn = "8"
input_player1_select = "nul"
input_player1_l_axis = "nul"
input_player1_l_btn = "4"
input_player1_l = "nul"
input_player1_r_axis = "nul"
input_player1_r_btn = "5"
input_player1_r = "nul"
input_player1_left_axis = "nul"
input_player1_left_btn = "h0left"
input_player1_left = "nul"
input_player1_right_axis = "nul"
input_player1_right_btn = "h0right"
input_player1_right = "nul"
input_player1_up_axis = "nul"
input_player1_up_btn = "h0up"
input_player1_up = "nul"
input_player1_down_axis = "nul"
input_player1_down_btn = "h0down"
input_player1_down = "nul"
video_shader_type = "auto"
video_render_to_texture = "false"
video_xscale = "2.000000"
video_yscale = "2.000000"
video_second_pass_smooth = "false"
video_shader_dir = "D:/Emu/RetroArch/shaders/"
video_smooth = "true"
input_player1_l2_axis = "nul"
input_player1_l2_btn = "6"
input_player1_l2 = "nul"
input_player1_r2_axis = "nul"
input_player1_r2_btn = "7"
input_player1_r2 = "nul"
input_player1_l3_axis = "nul"
input_player1_l3_btn = "10"
input_player1_l3 = "nul"
input_player1_r3_axis = "nul"
input_player1_r3_btn = "11"
input_player1_r3 = "nul"
input_player1_l_x_plus_axis = "+0"
input_player1_l_x_plus_btn = "nul"
input_player1_l_x_plus = "nul"
input_player1_l_y_plus_axis = "+1"
input_player1_l_y_plus_btn = "nul"
input_player1_l_y_plus = "nul"
input_player1_l_x_minus_axis = "-0"
input_player1_l_x_minus_btn = "nul"
input_player1_l_x_minus = "nul"
input_player1_l_y_minus_axis = "-1"
input_player1_l_y_minus_btn = "nul"
input_player1_l_y_minus = "nul"
input_player1_r_x_plus_axis = "+2"
input_player1_r_x_plus_btn = "nul"
input_player1_r_x_plus = "nul"
input_player1_r_y_plus_axis = "+5"
input_player1_r_y_plus_btn = "nul"
input_player1_r_y_plus = "nul"
input_player1_r_x_minus_axis = "-2"
input_player1_r_x_minus_btn = "nul"
input_player1_r_x_minus = "nul"
input_player1_r_y_minus_axis = "-5"
input_player1_r_y_minus_btn = "nul"
input_player1_r_y_minus = "nul"
system_directory = "D:/Emu/RetroArch/system/"
video_disable_composition = "true"
stdin_cmd_enable = "true"
=== Config end ===
RetroArch: Loading dynamic libretro from: "D:/Emu/RetroArch/libretro-0922-mednafen-wswan-x86_64.dll"
RetroArch: Version of libretro API: 1
RetroArch: Compiled against API: 1
Internal emulation modules: wswan
RetroArch: Environ SYSTEM_DIRECTORY: "D:/Emu/RetroArch/system/".
RetroArch: Environ SET_PIXEL_FORMAT: RGB565.
Frontend supports RGB565 - will use that instead of XRGB1555.
RetroArch: Environ PERFORMANCE_LEVEL: 0.
RetroArch: ROM loading skipped. Implementation will load it on its own.
Loading D:/Roms/Wonderswan/Alchemist Marie & Elie - Futari no Atelier.wsc...
[Mednafen]: Path request:
Applying IPS file ""...
Failed: Invalid argument
Error opening IPS file: Invalid argument
RetroArch [ERROR] :: Failed to load game.
[Mednafen WonderSwan]: Samples / Frame: nan
[Mednafen WonderSwan]: Estimated FPS: nan

GL driver TODOs for GLES.

There are a couple of issues to be properly solved for GLES.

  • GLES doesn't have GL_UNPACK_ROW_LENGTH. To properly do texture copies, we'll have to use PBOs. It's kinda what you're supposed to do in the first place, but PBO availability cannot be assumed.
  • Is GLES able to upload data to a texture without an PBO? (FBO textures, LUT textures and stuff are kinda static, and really shouldn't need any dummy PBO or anything ...)
  • How will vertex attributes be passed to the shader? GLES would require more modern GLSL without magic stuff such as gl_TexCoord, etc.
  • There is a lot of #ifdeffing (it's a horrible mess) going on there.

SuperGameBoy broken

commandline:

retroarch.exe "R:_Super Gameboy (J) (V1.2) [R-Euro+USA][!].sfc" --gameboy "R:\Super Mario Land (W) (V1.1) [!].gb"
The same rom dumps were working with the latest SSNES (although buggy).

(PS3) Windows Build Problems

I am unable to build SSNES for the PS3 using Windows and MSYS. Building fine with Linux.

$ make -f makefile.ps3
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -g -DHAVE_OPENGL=1 -DHAVE_CG=
1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.3"
-Dmain=ssnes_main -c -o fifo_buffer.o fifo_buffer.c
make: /usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc: Command not found
make: *** [fifo_buffer.o] Error 127

half screen in genplus+ntsc filter

When using:

  • the Genesis Plus GX core
  • bsnes NTSC filter
  • a Genesis ROM (strangely this does not happen with SMS ROMs)
    only half screen is rendered!

PS3 Build

I am unable to compile the PS3 version of SSNES. I have downloaded and built libsnes and placed LIBSNES.A into the SSNES make folder but get the following when trying to build:

evilsperm@evil-jtanner:~/ssnes$ make -f Makefile.ps3
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o fifo_buffer.o fifo_buffer.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ps3/ps3_audio.o ps3/ps3_audio.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ps3/ps3_input.o ps3/ps3_input.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ps3/pad_input.o ps3/pad_input.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o getopt.o getopt.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ssnes.o ssnes.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o driver.o driver.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o file.o file.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o settings.o settings.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o message.o message.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o rewind.o rewind.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o movie.o movie.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o gfx/gfx_common.o gfx/gfx_common.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ps3/ps3_video_psgl.o ps3/ps3_video_psgl.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o gfx/shader_cg.o gfx/shader_cg.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o gfx/snes_state.o gfx/snes_state.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ups.o ups.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o bps.o bps.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o strl.o strl.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o screenshot.o screenshot.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o audio/hermite.o audio/hermite.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o dynamic.o dynamic.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o ps3/main.o ps3/main.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o audio/utils.o audio/utils.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o conf/config_file.o conf/config_file.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-gcc -O3 -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION="0.9.2" -Dmain=ssnes_main -c -o gfx/image.o gfx/image.c
/usr/local/cell/host-linux/ppu/bin/ppu-lv2-g++ -o ssnes.elf fifo_buffer.o ps3/ps3_audio.o ps3/ps3_input.o ps3/pad_input.o getopt.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o gfx/gfx_common.o ps3/ps3_video_psgl.o gfx/shader_cg.o gfx/snes_state.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o ps3/main.o audio/utils.o conf/config_file.o gfx/image.o -L. -L/usr/local/cell/target/ppu/lib/PSGL/RSX/ultra-opt -ldbgfont -lPSGL -lPSGLcgc -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread
fixme:process:GetProcessWorkingSetSize (0xffffffff,0x33fc7c,0x33fc78): stub
fixme:process:GetProcessWorkingSetSize (0xffffffff,0x33fc7c,0x33fc78): stub
ps3ppuld 330.1.3884.0 (rel,ps3,330.1,ppu,src @77474 #334747 ) "Z:\usr\local\cell\host-linux\sn\bin\ps3ppuld"
Command line : error: L0039: reference to undefined symbol snes_init' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_set_video_refresh' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_set_audio_sample' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_set_input_poll' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_set_input_state' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_library_revision_minor' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_library_revision_major' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_library_id' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_cheat_reset' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_cheat_set' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_reset' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_run' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_get_region' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_load_cartridge_normal' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_load_cartridge_super_game_boy' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_load_cartridge_bsx' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_load_cartridge_bsx_slotted' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_load_cartridge_sufami_turbo' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_set_controller_port_device' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_serialize_size' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_serialize' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_unserialize' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_set_cartridge_basename' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_get_memory_data' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_get_memory_size' in file "Z:\home\evilsperm\ssnes\dynamic.o" Command line : error: L0039: reference to undefined symbolsnes_unload_cartridge' in file "Z:\home\evilsperm\ssnes\dynamic.o"
Command line : error: L0039: reference to undefined symbol snes_term' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_init' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_set_video_refresh' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_set_audio_sample' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_set_input_poll' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_set_input_state' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_library_revision_minor' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_library_revision_major' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_library_id' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_cheat_reset' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_cheat_set' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_reset' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_run' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_get_region' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_load_cartridge_normal' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_load_cartridge_super_game_boy' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_load_cartridge_bsx' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_load_cartridge_bsx_slotted' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_load_cartridge_sufami_turbo' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_set_controller_port_device' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_serialize_size' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_serialize' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_unserialize' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_set_cartridge_basename' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_get_memory_data' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_get_memory_size' in file "Z:\home\evilsperm\ssnes\dynamic.o"
dynamic.c(1) : error: L0039: reference to undefined symbol snes_unload_cartridge' in file "Z:\home\evilsperm\ssnes\dynamic.o" dynamic.c(1) : error: L0039: reference to undefined symbolsnes_term' in file "Z:\home\evilsperm\ssnes\dynamic.o"
collect2: ps3ppuld returned 1 exit status
make: *** [ssnes.elf] Error 1

configurable manpage directory

On OpenBSD and some other systems, manpages are installed to /usr/local/man by default, not /usr/share/man or /usr/local/share/man. This path should be configurable.

RetroArch-360

I'm trying to build RetroArch-360 and seem to have encountered a couple of errors:

"error X1001: Could not connect to Xbox360" (I'm just ignoring this as I guess it's trying to connect to the 360 I haven't got )

"error C1070: mismatched #if/#endif pair in file "g:\retroarch\console\salamander\main.c" (line 424)

I also take it that there is no Packaging required like on the PS3. How should I pack it and what files should I include?
And are the Cores named the same as they are on the PS3?

Sorry for asking all of this, but as I have said before I haven't got a 360 to do any testing with.

Pete

(PS3) Build issue

I am unable to build the PS3 version of SSNES with the Genesis-next Libsnes.A
Output log: http://pastebin.com/tKk73Ryb

Also, to get SSNES to PKG with psn_package_npdrm, I had to edit PS3/PKG/package.conf to the following:

Content_ID = UP0001-SSNE10000_00-0000000000000001
K_licensee = 0xc0a3b3641c2ad1ef23153a48a3e12fe7
DRMType = Free
ContentType = GameExec
PackageVersion = 00.01
APP_VER = 00.01

unnecessary save battery files created and wrong extensions

I've noticed the emulator always creates a 64KB savegame filled with 1s even when the game does not make use of it.

Also, the save battery files usually have different extensions:
.srm -> used for SNES and Genesis
.sav -> used for GBx, NES and SMS

Regarding timings

Hi there, I was told that the best way to contact 'maister', who would be able to address questions about libretro, is via an Issue on this project. So here I go ...

I'm planning on implementing a libretro wrapper around libmame, as per some email discussions. I think that all of my questions have been answered in the emails and IRC chat (and also by reading the up-to-date libretro.h file instead of the old crufty one I had been referencing!), but there is one important issue that needs to have full clarity.

Can you please confirm my understanding that the libretro design is such that the caller to retro_run() is expected to run at whatever rate the frontend wants to (probably dictated by waiting for vertical refresh intervals on the display), and the libretro implementation is supposed to always call back with the frame that should be rendered at that moment?

So if the emulated game originally ran at 59.97 Hz, and retro_run() is being called at 60 Hz, it is the responsibility of the libretro implementation to occasionally deliver the same frame of video twice (and skip a frame of audio) in order to match the emulated game's frame rate? And likewise, if the original game ran at 61 Hz and retro_run() is being called at 60 Hz, it is the responsibility of libretro to occasionally drop frames of video internally in order to match the emulated game's frame rate?

If so, can you please explain what RETRO_ENVIRONMENT_GET_CAN_DUPE is for, as I don't understand what it would do in this design. Thank you!

Shaders do not build on OS X 10.6.6

I think that there is an issue with the include preprocessor directives in the GLSL code that causes a compile to fail (see error log below). They are pointing to OpenGL/gl.h and OpenGL/glext.h for APPLE, but this path does not exist in a standard Snow Leopard + Xcode installation. The following locations should give a better indication of the library paths:
$ sudo find / -name 'gl.h'
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/gl.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/GL/gl.h
/System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h
/usr/X11/include/GL/gl.h

$ sudo find / -name 'glext.h'
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/glext.h
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/glext.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/glext.h
/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/GL/glext.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/glext.h
/usr/X11/include/GL/glext.h

make failure:

$ make
CC ssnes.c
CC file.c
CC driver.c
CC settings.c
CC dynamic.c
CC message.c
CC rewind.c
CC movie.c
CC autosave.c
CC netplay.c
CC audio/hermite.c
CC conf/config_file.c
CC audio/openal.c
CC gfx/gl.c
CC input/sdl.c
CC audio/sdl.c
CC audio/buffer.c
gfx/shader_glsl.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglCreateProgram’
gfx/shader_glsl.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglUseProgram’
gfx/shader_glsl.c:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglCreateShader’
gfx/shader_glsl.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglDeleteShader’
gfx/shader_glsl.c:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglShaderSource’
gfx/shader_glsl.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglCompileShader’
gfx/shader_glsl.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglAttachShader’
gfx/shader_glsl.c:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglDetachShader’
gfx/shader_glsl.c:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglLinkProgram’
gfx/shader_glsl.c:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglGetUniformLocation’
gfx/shader_glsl.c:55: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglUniform1i’
gfx/shader_glsl.c:56: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglUniform2fv’
gfx/shader_glsl.c:57: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglUniform4fv’
gfx/shader_glsl.c:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglGetShaderiv’
gfx/shader_glsl.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglGetShaderInfoLog’
gfx/shader_glsl.c:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglGetProgramiv’
gfx/shader_glsl.c:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘pglGetProgramInfoLog’
gfx/shader_glsl.c: In function ‘print_shader_log’:
gfx/shader_glsl.c:158: warning: implicit declaration of function ‘pglGetShaderiv’
gfx/shader_glsl.c:161: warning: implicit declaration of function ‘pglGetShaderInfoLog’
gfx/shader_glsl.c: In function ‘print_linker_log’:
gfx/shader_glsl.c:172: warning: implicit declaration of function ‘pglGetProgramiv’
gfx/shader_glsl.c:175: warning: implicit declaration of function ‘pglGetProgramInfoLog’
gfx/shader_glsl.c: In function ‘gl_glsl_init’:
gfx/shader_glsl.c:184: error: ‘pglCreateProgram’ undeclared (first use in this function)
gfx/shader_glsl.c:184: error: (Each undeclared identifier is reported only once
gfx/shader_glsl.c:184: error: for each function it appears in.)
gfx/shader_glsl.c:185: error: ‘pglUseProgram’ undeclared (first use in this function)
gfx/shader_glsl.c:186: error: ‘pglCreateShader’ undeclared (first use in this function)
gfx/shader_glsl.c:187: error: ‘pglDeleteShader’ undeclared (first use in this function)
gfx/shader_glsl.c:188: error: ‘pglShaderSource’ undeclared (first use in this function)
gfx/shader_glsl.c:189: error: ‘pglCompileShader’ undeclared (first use in this function)
gfx/shader_glsl.c:190: error: ‘pglAttachShader’ undeclared (first use in this function)
gfx/shader_glsl.c:191: error: ‘pglDetachShader’ undeclared (first use in this function)
gfx/shader_glsl.c:192: error: ‘pglLinkProgram’ undeclared (first use in this function)
gfx/shader_glsl.c:193: error: ‘pglGetUniformLocation’ undeclared (first use in this function)
gfx/shader_glsl.c:194: error: ‘pglUniform1i’ undeclared (first use in this function)
gfx/shader_glsl.c:195: error: ‘pglUniform2fv’ undeclared (first use in this function)
gfx/shader_glsl.c:196: error: ‘pglUniform4fv’ undeclared (first use in this function)
gfx/shader_glsl.c:197: error: ‘pglGetShaderiv’ undeclared (first use in this function)
gfx/shader_glsl.c:198: error: ‘pglGetShaderInfoLog’ undeclared (first use in this function)
gfx/shader_glsl.c:199: error: ‘pglGetProgramiv’ undeclared (first use in this function)
gfx/shader_glsl.c:200: error: ‘pglGetProgramInfoLog’ undeclared (first use in this function)
gfx/shader_glsl.c:215: warning: implicit declaration of function ‘pglCreateProgram’
gfx/shader_glsl.c:224: warning: implicit declaration of function ‘pglCreateShader’
gfx/shader_glsl.c:225: warning: implicit declaration of function ‘pglShaderSource’
gfx/shader_glsl.c:226: warning: implicit declaration of function ‘pglCompileShader’
gfx/shader_glsl.c:229: warning: implicit declaration of function ‘pglAttachShader’
gfx/shader_glsl.c:245: warning: implicit declaration of function ‘pglLinkProgram’
gfx/shader_glsl.c:246: warning: implicit declaration of function ‘pglUseProgram’
gfx/shader_glsl.c:249: warning: implicit declaration of function ‘pglGetUniformLocation’
gfx/shader_glsl.c:250: warning: implicit declaration of function ‘pglUniform1i’
gfx/shader_glsl.c: In function ‘gl_glsl_set_params’:
gfx/shader_glsl.c:273: warning: implicit declaration of function ‘pglUniform2fv’
make: *** [gfx/shader_glsl.o] Error 1

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.