Hook up ppi8255 reads in Major League - prevents it from trying to flip screen when it shouldn't be

This commit is contained in:
Barry Harris 2017-02-06 12:30:55 +00:00
parent 97f8935abf
commit ad32529caa
2 changed files with 9 additions and 7 deletions

View File

@ -2063,8 +2063,6 @@ STD_ROM_FN(Wb35d)
Memory Handlers
====================================================*/
static bool Mjleague = false;
void System16APPI0WritePortA(UINT8 data)
{
System16SoundLatch = data & 0xff;
@ -2074,7 +2072,7 @@ void System16APPI0WritePortB(UINT8 data)
{
System16VideoControl = data;
System16VideoEnable = data & 0x10;
if (Mjleague) System16ScreenFlip = data & 0x80;
System16ScreenFlip = data & 0x80;
}
void System16APPI0WritePortC(UINT8 data)
@ -2335,6 +2333,13 @@ static void MjleagueMakeAnalogInputs()
static UINT8 __fastcall MjleagueReadByte(UINT32 a)
{
switch (a) {
case 0xc40001:
case 0xc40003:
case 0xc40005:
case 0xc40007: {
return ppi8255_r(0, (a - 0xc40000) >> 1);
}
case 0xc41001: {
UINT8 buttons = 0x3f - System16Input[0];
UINT8 analog1 = (System16VideoControl & 4) ? MjleagueTrack1Y : MjleagueTrack1X;
@ -2884,8 +2889,6 @@ static INT32 MjleagueInit()
{
System16MakeAnalogInputsDo = MjleagueMakeAnalogInputs;
Mjleague = true;
INT32 nRet = System16Init();
if (!nRet) {
@ -2906,8 +2909,6 @@ static INT32 MjleagueExit()
MjleagueBat1 = 0;
MjleagueBat2 = 0;
Mjleague = false;
return System16Exit();
}

View File

@ -226,6 +226,7 @@
<li>Added 5 bootlegs of SDI to the Sega System 16B driver</li>
<li>Implemented full controls in Ace Attacker in the Sega System 16B driver</li>
<li>Fix outrundxj</li>
<li>Hooked up PPI8255 reads in Major League</li>
</ul></li>
<li>Added a module for Resister Networks (Palette Generation) [Barry]</li>
<li>Update lzma sdk to 16.04 [Barry]</li>