mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
Support both types of lightgun in lost world. 2nd type fixes some missing fx. Thanks to Any for pointing this out. To use the old type change analog_gun1 to gun1 in the xml file.
This commit is contained in:
parent
6bc4224154
commit
10cefb7c61
|
@ -918,8 +918,8 @@
|
|||
<stepping>1.5</stepping>
|
||||
<inputs>
|
||||
<input type="common" />
|
||||
<input type="gun1" />
|
||||
<input type="gun2" />
|
||||
<input type="analog_gun1" />
|
||||
<input type="analog_gun2" />
|
||||
</inputs>
|
||||
</hardware>
|
||||
<roms>
|
||||
|
|
|
@ -520,7 +520,12 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
|||
return serialFIFO2;
|
||||
|
||||
case 0x34: // Serial FIFO full/empty flags
|
||||
return 0x0C;
|
||||
if (m_game.inputs & (Game::INPUT_GUN1 | Game::INPUT_GUN2)) {
|
||||
return 0x0C;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
case 0x3C: // ADC
|
||||
|
||||
|
@ -541,12 +546,19 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
|||
adc[1] = (UINT8)Inputs->analogJoyX->value;
|
||||
}
|
||||
|
||||
if ((m_game.inputs & Game::INPUT_ANALOG_GUN1)||(m_game.inputs & Game::INPUT_ANALOG_GUN2))
|
||||
if (m_game.inputs & (Game::INPUT_ANALOG_GUN1 | 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 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;
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_game.inputs & Game::INPUT_SKI))
|
||||
|
@ -850,7 +862,7 @@ void CModel3::WriteSystemRegister(unsigned reg, UINT8 data)
|
|||
case 0x0D:
|
||||
case 0x0E:
|
||||
case 0x0F:
|
||||
case 0x1C: // LED control?
|
||||
case 0x1C: // LED control
|
||||
break;
|
||||
default:
|
||||
//DebugLog("System register %02X=%02X\n", reg, data);
|
||||
|
|
|
@ -1333,7 +1333,7 @@ static Util::Config::Node DefaultConfig()
|
|||
static void Title(void)
|
||||
{
|
||||
puts("Supermodel: A Sega Model 3 Arcade Emulator (Version " SUPERMODEL_VERSION ")");
|
||||
puts("Copyright 2011-2017 by Bart Trzynadlowski, Nik Henson, and Ian Curtis\n");
|
||||
puts("Copyright 2011-2018 by Bart Trzynadlowski, Nik Henson, Ian Curtis, Harry Tuttle and Spindizzi\n");
|
||||
}
|
||||
|
||||
static void Help(void)
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
#ifndef INCLUDED_VERSION_H
|
||||
#define INCLUDED_VERSION_H
|
||||
|
||||
#define SUPERMODEL_VERSION "0.3a-WIP"
|
||||
#define SUPERMODEL_VERSION "0.7-WIP"
|
||||
|
||||
#endif // INCLUDED_SUPERMODEL_H
|
||||
|
|
Loading…
Reference in a new issue