Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux][lostwsga] Aiming problem #155

Open
WebSiteFurbo opened this issue May 31, 2024 · 9 comments
Open

[Linux][lostwsga] Aiming problem #155

WebSiteFurbo opened this issue May 31, 2024 · 9 comments

Comments

@WebSiteFurbo
Copy link

WebSiteFurbo commented May 31, 2024

Hello to everybody,

I noticed that:

  • when moving the mouse along the X-axis, Player 1's crosshair moves on the horizontal plan;
  • when moving the mouse along the Y-axis, Player 2's crosshair moves on the horizontal plan;

I think it is a bug because the following configuration in the ini file works very well with Ocean Hunter but not for The Lost World, so I do not want to modify it:

; Analog guns (Ocean Hunter, LA Machineguns)
InputAnalogGunLeft = "KEY_LEFT" ; digital, move gun left
InputAnalogGunRight = "KEY_RIGHT" ; digital, move gun right
InputAnalogGunUp = "KEY_UP" ; digital, move gun up
InputAnalogGunDown = "KEY_DOWN" ; digital, move gun down
InputAnalogGunX = "MOUSE_XAXIS,JOY1_XAXIS" ; analog, full X axis
InputAnalogGunY = "MOUSE_YAXIS,JOY1_YAXIS" ; analog, full Y axis
InputAnalogTriggerLeft = "KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON"
InputAnalogTriggerRight = "KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON"

I noticed that during the boot an error message appears as well:

Capture d’écran du 2024-05-31 21-26-32

I tried to find this "Sensor Gun!!" warning on the official manual but I did not find it.
00000482.pdf

Any help is greatly appreciated.

@trzy
Copy link
Owner

trzy commented May 31, 2024

Which build are you using and where did you get it from? I’m pretty certain Lost World works fine. You may need to calibrate things in the service menu and then double check your INI file settings.

Can you paste both your INI file as well as Supermodel.log after running lostwsga?

@WebSiteFurbo
Copy link
Author

WebSiteFurbo commented Jun 2, 2024

Hi trzy,

I am using Supermodel 0.3a-WIP, I got it from your Github page running:

git clone https://github.com/trzy/Supermodel.git

My GPU info: 4.6 (Core Profile) Mesa 24.0.5-1ubuntu1 (core profile). The emulator is installed on Ubuntu 24.04 LTS, with gcc 13.2.0 and libglu1-mesa-dev installed. Here are the files you asked. I tried to calibrate the gun in Service Mode but it was moving only on the horizontal plan.

Supermodel.log

Supermodel_INI.txt

I converted the .ini file into a .txt one otherwise Github would not have accepted it.

@ghost
Copy link

ghost commented Aug 20, 2024

I think there's a few issues coming together here that makes this problem keep coming around.

If you look at the OPs log file, you'll see lostwsga is requested and loaded, but on the next line down lostwsgp is called in.

[Info] Supermodel Version 0.3a-WIP
[Info] Started as:
[Info] argv[0] = ./supermodel
[Info] argv[1] = lostwsga.zip
[Info] Opened lostwsga.zip.
[Info] lostwsgp:
[Info] banked_crom: stride=8, chunk size=2, byte layout=10325476

A merged ROM set issue?
In Supermodels defence, the -help output does stipulate ROM set must be a valid ZIP file containing a single game.

The next problem is Supermodel is looking for out dated hard coded game names in Model3.cpp.
lostwsgo became lostwsgp ages ago.

https://github.com/trzy/Supermodel/blob/master/Src/Model3/Model3.cpp#L613

if (m_game.name == "lostwsga" || m_game.name == "lostwsgo")
{ // to do, not a string compare
adc[0] = (UINT8)Inputs->analogGunX[0]->value; // order is different for some reason in lost world
adc[1] = 255 - (UINT8)Inputs->analogGunY[0]->value; // why are values inverted? is this the wrong place to fix this
adc[2] = (UINT8)Inputs->analogGunX[1]->value
adc[3] = 255 - (UINT8)Inputs->analogGunY[1]->value;
}

Btw, There is also hard coded name check in Main.cpp
https://github.com/trzy/Supermodel/blob/master/Src/OSD/SDL/Main.cpp#L966

gameHasLightguns |= game.name == "lostwsga";

Plus, when you add in the fact that users can amend their Games.xml to change the gun type, users mileage really will vary when playing lost world games.

@trzy
Copy link
Owner

trzy commented Aug 24, 2024

This is a really good point! We should not be looking for names but rather checking for the inputs that the game has, in the Game struct.

@WebSiteFurbo
Copy link
Author

WebSiteFurbo commented Aug 31, 2024

Hello Trzy and ToBul, thanks for the explanations. Sorry Trzy, by writing this:

We should not be looking for names but rather checking for the inputs that the game has, in the Game struct

You mean that I should look into Games.xml? Sorry I am still a beginner from this point of view ;) By the way, changing the rom solved the problem. Why my first rom was faulty and why the new one is working?

Regards.

@ghost
Copy link

ghost commented Aug 31, 2024

You're ROMs wouldn't of been faulty, just merged. Supermodel doesn't always handle merged ROMs correctly. Supermodel then fails to identify the ROM it loads due to outdated code.

From reading other posts, I think Supermodel also struggles with ROMs scud and scudau. This means users aren't always getting the version of the game they think they are getting.

Bart has said he would like to improve the game loading logic at some point. I wish him luck as the game loader file is over 1000 lines long, and I don't understand a word of it. 😄

@WebSiteFurbo
Copy link
Author

I wish him luck as well. Anyway he is doing an amazing job on the emulator :)

@trzy
Copy link
Owner

trzy commented Sep 7, 2024 via email

@WarpedPolygon
Copy link

WarpedPolygon commented Oct 23, 2024

I noticed that:

  • when moving the mouse along the X-axis, Player 1's crosshair moves on the horizontal plan;
  • when moving the mouse along the Y-axis, Player 2's crosshair moves on the horizontal plan;

I think it is a bug because the following configuration in the ini file works very well with Ocean Hunter but not for The Lost World, so I do not want to modify it:

@WebSiteFurbo Yooooo, just remove the controller JOY1XAXIS & JOY1YAXIS inputs from the ini file, or unplug/disconnect your controller. You are getting clashing inputs with the controller which causes mouse moment to be stuck on one axis. Simples!

Not linux related btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants