pvsneslib icon indicating copy to clipboard operation
pvsneslib copied to clipboard

Error in example "multiplay5"

Open diegoleao opened this issue 5 years ago • 7 comments

I tried to build the "multiplay5" example project, but I get this error:

multiplay5.obj:multiplay5.asm:37: PARSE_STACK: Unresolved reference to "snes_mplay5". make: *** [C:/snesdev/snes-examples/pads/multiplay5/multiplay5.sfc] Error 1 rm multiplay5.asm multiplay5.ps (full log in here: full_log_multiplay5_error.txt)

I noticed that "extern u8 snes_mplay5;" is present pad.h, but adding this header doesn't help.

Am I doing something wrong? Is this example supposed to work, or is it a WIP?

I'm participating in a game jam (since yesterday) and wanted to include 4-player multiplayer to the rom!

Thank you!

diegoleao avatar Oct 11 '20 13:10 diegoleao

That is strange as i'm using it for my last game, are you sure you're using the last obj files from the lib ? Also, try to recompile the lib on your own side, it will be ok ;) !

alekmaul avatar Oct 11 '20 17:10 alekmaul

i just tried and it works from my side but i rebuilt the library

hoit avatar Oct 11 '20 17:10 hoit

Just letting you know that yes, that was the problem :) I went to my pvsneslib path (C:\snesdev\pvsneslib) and built the "pvsneslib.pnproj" project (to those who might have a similar problem).

Thanks!

diegoleao avatar Oct 12 '20 01:10 diegoleao

For some reason, I can only get joystick 0 input using the multiplay5 project... I see the message "USE PADS TO SEE VALUES" (so I know my setup is correct) and snes_mplay5 is true.

But printing the pad0 variable in the loop shows "-1" every time (except for joystick 0, which prints its key values).

A stream of prints for each player, all pressing KEY_A (jump): PLAYER -- 0 COMMAND -- 128 PLAYER -- 0 [JUMP!!] PLAYER -- 1 COMMAND -- -1 PLAYER -- 2 COMMAND -- -1 PLAYER -- 0 COMMAND -- 128 PLAYER -- 0 [JUMP!!] PLAYER -- 1 COMMAND -- -1 PLAYER -- 2 COMMAND -- -1

diegoleao avatar Oct 12 '20 02:10 diegoleao

could you share your code about that ?

alekmaul avatar Oct 12 '20 03:10 alekmaul

This is the folder with the .sfc rom included: multiplay5.zip

PS: A screenshot of no$sns controls screen: image

diegoleao avatar Oct 12 '20 04:10 diegoleao

I made this version to show that I can get joystick 0 and 1 using basically the same code (commenting multi5): regular_joystick_test.zip

In this version if I'm pressing both "space" and "Num 0" (space = key_a for joy 0, num0 = key_a for joy 1) I get them both to print: no multi 5

But I when I do the same test in multi5 example (holding both "space" and keypad "num 0" ), I get this: same test in multi 5

diegoleao avatar Oct 12 '20 04:10 diegoleao

the wiki page on input/output says:

Currently, the only input managed with PVSneslib is the SNES joypad.

jeffythedragonslayer avatar Jan 31 '23 21:01 jeffythedragonslayer

It is not updated. Pvsneslib manage now multitap (but this issue could be related to the emulator config) and super scope (which require to be tested!)

RetroAntho avatar Jan 31 '23 22:01 RetroAntho

Regarding Superscope, it is not working. I need to add a pool function to populate all variables for multiscope. wiki updated

alekmaul avatar Feb 01 '23 12:02 alekmaul

I tested the multi5 example with mesen and it works fine.

alekmaul avatar Aug 25 '23 06:08 alekmaul