Giter VIP home page Giter VIP logo

Comments (9)

samuelgr avatar samuelgr commented on June 2, 2024 1

The emulator is doing something strange in terms of how it figures out the return value from a call to EnumObjects, which is used to enumerate virtual controller objects like axes, buttons, and so on. For axes it seems fine, but for buttons it seems to be reading memory it shouldn't be reading.

For the system's DirectInput implementation and XInput Plus it seems to get back a non-zero value, which is interpreted as "give me more buttons." But with Xidi it is somehow computing zero, which means "stop giving me buttons." This is why it is only seeing one button with Xidi.

I added a workaround that ignores the return code from the application and enumerates all objects regardless of what the application says. It appears to fix this issue.

Please give this development build a try, along with the supplied configuration.

Xidi-v4.1.1-dev.6.0+a8e64f50.zip

Xidi.ini:

[Mapper]
Type = DigitalGamepad

[Workarounds]
IgnoreEnumObjectsCallbackReturnCode = yes

from xidi.

samuelgr avatar samuelgr commented on June 2, 2024

You need to put your customizations into a custom mapper. Try this instead:

[Mapper]
Type = Custom

[CustomMapper]
Template = DigitalGamepad

; These changes are applied on top of the template.
ButtonA             = Button(4)
ButtonB             = Button(3)
ButtonX             = Button(2)
ButtonY             = Button(1)

from xidi.

Hexaae avatar Hexaae commented on June 2, 2024

Doesn't seem to be working: Log
Always shows 1 button only...

from xidi.

samuelgr avatar samuelgr commented on June 2, 2024

You might need to change the mapping scheme then.

Does the application actually support multiple gamepad buttons, and if so does it work with another controller with or without Xidi?

You can try mapping to a keyboard button. For example:

; Maps the A button on the controller to the X key on the keyboard
ButtonA = Keyboard(X)

from xidi.

Hexaae avatar Hexaae commented on June 2, 2024

Thanks...
Yes "forcing" ButtonB = Keyboard(z)... does work as expected and the buttons get mapped to the corresponding key in the emu now. The strange thing is that it always sees one single button joystick only:
image
Of course if I use the XBox One BT controller it shows correctly all the buttons. Same if I use XInputPlus wrapper with the Hori Fighting Stick Mini: the emulator gives me all the expected buttons to be remapped internally...

P.S.
Consider originally emulated ZX Spectrum joystick had one button only, so it's the default for the emulator.

from xidi.

samuelgr avatar samuelgr commented on June 2, 2024

Digging in a little bit more, it looks like there are some bugs that affect how the game enumerates objects (more specifically, buttons).

One of them is an API issue that can be fixed pretty easily, and the other of which might need a workaround.

from xidi.

samuelgr avatar samuelgr commented on June 2, 2024

This is partially addressed by 9efe81a.

from xidi.

Hexaae avatar Hexaae commented on June 2, 2024

Works fine as expected now! All buttons are available and remappable from within the emulator.

from xidi.

samuelgr avatar samuelgr commented on June 2, 2024

Great, glad to hear that this fixes the problem.

from xidi.

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.