Git Product home page Git Product logo

Comments (8)

ekeeke avatar ekeeke commented on June 29, 2024

Genesis Plus GX libretro port uses

  • RETRO_DEVICE_POINTER for lightgun screen position (RETRO_DEVICE_ID_POINTER_X & RETRO_DEVICE_ID_POINTER_Y)
  • RETRO_DEVICE_LIGHTGUN for lightgun buttons (LIGHTGUN_TRIGGER, LIGHTGUN_START, ...)

So it's either that:

  • RETRO_DEVICE_POINTER support is missing in the Retroarch driver used on Raspberry Pi

or

  • mouse driver available on Raspberry Pi is incomplete and doesn't work with Retroarch RETRO_DEVICE_POINTER implementation

As for why RETRO_DEVICE_LIGHTGUN is not used for getting lightgun screen position, the X / Y values returned by this libretro device are actually relative coordinates, which is not very usable for a gun position on screen when you have no idea of the initial position.

from genesis-plus-gx.

davidj1987 avatar davidj1987 commented on June 29, 2024

I tried just now after I originally posted this seeing that Retropie and Retroarch has had updates since I posted. I can report that a mouse does work in other emulators for light gun games but not Genesis Plus GX. However, I did find the mouse sort of works in Genesis Plus GX.

Body Count for example does work with a mouse, if you set it to Mega Drive mouse. It doesn't matter if Player 1 or 2 is set to use a mouse. However, Menacer and light phaser games don't work with a mouse. All you can do is just press the left mouse button and it will register as a fire button.

It is fine in the Windows version though.

from genesis-plus-gx.

wraybowling avatar wraybowling commented on June 29, 2024

I'm very interested to see how this thread plays out. I was just looking at the EMS Top Gun 3 to find out if It would be possible to play Snatcher with a gun. The other missing link of course, is menacer/enforcer support.

from genesis-plus-gx.

dankcushions avatar dankcushions commented on June 29, 2024

RETRO_DEVICE_POINTER is not for mice but for absolute coordinate devices (trackpads, touchscreens, etc). It should use RETRO_DEVICE_MOUSE, really (or ideally, both). any mouse device plugged in to a raspberry pi will work with RETRO_DEVICE_MOUSE if it's used.

You can see an implementation of RETRO_DEVICE_MOUSE here: https://github.com/libretro/mame2003-libretro/blob/master/src/libretro/libretro.c#L358

from genesis-plus-gx.

ekeeke avatar ekeeke commented on June 29, 2024

You are not teaching me anything I don't already know, read my previous answers. Sega Mouse is emulated using RETRO_DEVICE_MOUSE but lightguns ARE absolute coordinates devices so it makes more sense to use RETRO_DEVICE_POINTER for emulating them.

It is supported by libretro API so it's perfectly valid to use it in a libretro core.This is not my problem if it is not yet implemented by Retroarch in every drivers (lightguns work fine with a physical mouse in Windows port of Retroarch by the way so it's definitively possible to implement it in other drivers).

Keep in mind a libretro core is meant to be portable across platforms, it doesn't have to know or guess which physical device you are using as pointing device and it is not necessarely limited to mouse as with a raspberry pi, it could use wii remote or touchable screen.

from genesis-plus-gx.

dankcushions avatar dankcushions commented on June 29, 2024

agreed. but i reckon we could spoof an absolute coord from a relative coord in the RA udev driver. eg https://msdn.microsoft.com/en-us/library/windows/desktop/ee418779(v=vs.85).aspx

ie, take 0,0 to be the start value and use the relative coords passed in by the mouse to move from that.

maybe i will have a play with it later :)

from genesis-plus-gx.

BGallagherHollywood avatar BGallagherHollywood commented on June 29, 2024

Hey everyone. I came across this thread while looking for information about light gun games working on Retropie. I have gotten it to work with a Wiimote/DolphinBar combo on various AdvMame games (Operation Wolf, Operation Thunderbolt) with relative ease (i.e. without tweaking code).

However, I don't know much about changing settings within the emulator itself, and the SMS/Genesis (probably NES too) shooter games haven't recognize my Wiimote/DolphinBar setup. I assume I have to change settings within the emulator cores. I'm wondering if someone here could point me in the right direction. Thanks!

from genesis-plus-gx.

BGallagherHollywood avatar BGallagherHollywood commented on June 29, 2024

Actually.... the plot thickens, sorta. When I switched my emulator for the shooting games over, it recognized the Wiimote as a gun, and the trigger would actually fire... but I couldn't actually move the crosshairs/target. It was just stuck in the same place. Any advice would be more than welcome!

from genesis-plus-gx.

Related Issues (20)

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.