Page 2 of 3

Re: Lost World Missing Pointer

PostPosted: Fri Jan 26, 2018 7:45 pm
by any
Lost World can use 2 type of gun hardware
-classic gun style
-CCD gun style

The classic one (unused by game made by Sega) flash the screen when you pull the trigger.
In this mode the "gun pcb" (the same used by Virtua Cop IIRC) is connected to the Model3 via the RS422 bus.

The new one just output the x-y coordinate as analog output. this "gun pcb" also output 2 digital bit
-offscreen
-trigger


I have just give SuperModel source a quick look, it seem you emulate the first (old) type of gun HW, where such effect are missing as the game didn't know where you are aiming at.

MAYBE if you don't use the FIFO (or reply the FIFO buffer is always empty) the game switch to the other mode

Hope it help

Re: Lost World Missing Pointer

PostPosted: Sat Jan 27, 2018 6:09 pm
by Ian
I don't know much at all about that area of the code base. But I had a bit of a poke around with the registers

This register
case 0x1C: // LED control?

Seems to be some sort of count register. It's either counting up or down values. Seems to increment or decrement the value once per frame. Not quite sure what it would be doing

Re: Lost World Missing Pointer

PostPosted: Sat Jan 27, 2018 6:12 pm
by Bart
Ian wrote:I don't know much at all about that area of the code base. But I had a bit of a poke around with the registers

This register
case 0x1C: // LED control?

Seems to be some sort of count register. It's either counting up or down values. Seems to increment or decrement the value once per frame. Not quite sure what it would be doing


That question mark should be removed. It is the LED register and controls 8 LEDs on the CPU board, seen in this video. They are used as a debugging aid. If some sort of crash occurs, you can potentially reconstruct where it happened by the state of the LEDs.

Also note any's post above, which I just got around to approving.

Re: Lost World Missing Pointer

PostPosted: Sun Jan 28, 2018 5:52 am
by Ian
Well,
I tried Any's suggestion. I stubbed the old code to simply return 0 for the serial fifo stuff.
Then I set the game inputs to use the analog gun

and ..

Image

Controls seem inverted or something crazy, but there it is

Re: Lost World Missing Pointer

PostPosted: Sun Jan 28, 2018 9:58 am
by any
Ian wrote:Controls seem inverted or something crazy, but there it is


Keep in mind there is a mirror inside the standard cabinet.
IIRC 0xff-0xff is the bottom left corner

Re: Lost World Missing Pointer

PostPosted: Mon Jan 29, 2018 8:50 am
by Bart
The serial FIFO is the analog gun. Do you mean to say you used the analog joystick?

Re: Lost World Missing Pointer

PostPosted: Mon Jan 29, 2018 9:05 am
by Ian
Just used the same input device as la machine guns etc
It seems lost world actually supports 2 gun types. The first one which we are using is missing some effects for some reason. I notice with the 2nd type it actually gives you a different gun calibration screen

This is what I have so far

Code: Select all
    if ((m_game.inputs & Game::INPUT_ANALOG_GUN1) || (m_game.inputs & Game::INPUT_ANALOG_GUN2))
    {
      adc[0] = (UINT8)Inputs->analogGunX[0]->value;
      adc[2] = (UINT8)Inputs->analogGunY[0]->value;
      adc[1] = (UINT8)Inputs->analogGunX[1]->value;
      adc[3] = (UINT8)Inputs->analogGunY[1]->value;

      if (m_game.name == "lostwsga") {                  // to do, not a string compare
        adc[0] =     (UINT8)Inputs->analogGunX[0]->value;   // order is wired up 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;
     }
    }


Code: Select all
  case 0x34:  // Serial FIFO full/empty flags
    if (m_game.inputs & (Game::INPUT_GUN1 | Game::INPUT_GUN2)) {
      return 0x0C;
    }
    else {
      return 0;
    }


Code: Select all
  <game name="lostwsga">
    <hardware>
      <inputs>
        <input type="common" />
        <input type="analog_gun1" />
        <input type="analog_gun1" />

Re: Lost World Missing Pointer

PostPosted: Mon Jan 29, 2018 11:55 am
by Ian
Well here is the missing head light

Image

Re: Lost World Missing Pointer

PostPosted: Mon Jan 29, 2018 2:22 pm
by Bart
Awesome work! I wonder if this could be cleaned up simply by defining a new input type? It's definitely quite different in its operating principle than the LA Machineguns guns, which are not light guns at all and don't have any sensors. AFAIK, they transmit positional information using potentiometers that measure the orientation of the gun on its mount.

Re: Lost World Missing Pointer

PostPosted: Mon Jan 29, 2018 3:15 pm
by Ian
I've never played lost world in the arcade or ocean hunter etc. But is the input gun actually different? If so yeah it'd make more sense to define an input type for it.
One slightly annoying thing is the mouse position defaults to 128, which is bang in the centre. So the player 2 input is also bang in the centre when it's not used, which shows up on the player selection screen, but also strangely in the t-rex section. The light position for player 2 is active, even though the gun isn't being used. I guess that's a game bug