Lost World Missing Pointer

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Lost World Missing Pointer

Postby any » Fri Jan 26, 2018 7:45 pm

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
any
 
Posts: 2
Joined: Fri Jan 26, 2018 5:17 pm

Re: Lost World Missing Pointer

Postby Ian » Sat Jan 27, 2018 6:09 pm

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
Ian
 
Posts: 1434
Joined: Tue Feb 23, 2016 9:23 am

Re: Lost World Missing Pointer

Postby Bart » Sat Jan 27, 2018 6:12 pm

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.
User avatar
Bart
Site Admin
 
Posts: 2169
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: Lost World Missing Pointer

Postby Ian » Sun Jan 28, 2018 5:52 am

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
Ian
 
Posts: 1434
Joined: Tue Feb 23, 2016 9:23 am

Re: Lost World Missing Pointer

Postby any » Sun Jan 28, 2018 9:58 am

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
any
 
Posts: 2
Joined: Fri Jan 26, 2018 5:17 pm

Re: Lost World Missing Pointer

Postby Bart » Mon Jan 29, 2018 8:50 am

The serial FIFO is the analog gun. Do you mean to say you used the analog joystick?
User avatar
Bart
Site Admin
 
Posts: 2169
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: Lost World Missing Pointer

Postby Ian » Mon Jan 29, 2018 9:05 am

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" />
Ian
 
Posts: 1434
Joined: Tue Feb 23, 2016 9:23 am

Re: Lost World Missing Pointer

Postby Ian » Mon Jan 29, 2018 11:55 am

Well here is the missing head light

Image
Ian
 
Posts: 1434
Joined: Tue Feb 23, 2016 9:23 am

Re: Lost World Missing Pointer

Postby Bart » Mon Jan 29, 2018 2:22 pm

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.
User avatar
Bart
Site Admin
 
Posts: 2169
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: Lost World Missing Pointer

Postby Ian » Mon Jan 29, 2018 3:15 pm

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
Ian
 
Posts: 1434
Joined: Tue Feb 23, 2016 9:23 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 5 guests