mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-13 11:49:06 +01:00
[Core/IO] increased Sega Mouse latency (fixes mouse support in Star Blade)
This commit is contained in:
parent
07f333b1ed
commit
63b0d6a4c1
@ -94,6 +94,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
|
|||||||
* improved HVC latch behavior for gun emulation (fixes "Gunfight - 3 in 1" randomization when using Justifier)
|
* improved HVC latch behavior for gun emulation (fixes "Gunfight - 3 in 1" randomization when using Justifier)
|
||||||
* improved control pad emulation accuracy (verified on real hardware)
|
* improved control pad emulation accuracy (verified on real hardware)
|
||||||
* improved 4 Way-Play emulation (fixes multitap detection in CD games)
|
* improved 4 Way-Play emulation (fixes multitap detection in CD games)
|
||||||
|
* increased Sega Mouse latency (fixes mouse support in Star Blade)
|
||||||
* fixed TeamPlayer emulation (fixes multitap detection in Gauntlet 4)
|
* fixed TeamPlayer emulation (fixes multitap detection in Gauntlet 4)
|
||||||
|
|
||||||
[Core/VDP]
|
[Core/VDP]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/***************************************************************************************
|
/***************************************************************************************
|
||||||
* Genesis Plus
|
* Genesis Plus
|
||||||
* Sega Mouse support
|
* Sega/Mega Mouse support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
@ -113,15 +113,15 @@ unsigned char mouse_read()
|
|||||||
/* TL = busy status */
|
/* TL = busy status */
|
||||||
if (mouse.Wait)
|
if (mouse.Wait)
|
||||||
{
|
{
|
||||||
/* wait before ACK, fix some buggy mouse routine (Cannon Fodder, Shangai 2, Wack World,...) */
|
/* wait before acknowledging handshake request */
|
||||||
mouse.Wait = 0;
|
mouse.Wait--;
|
||||||
|
|
||||||
/* TL = !TR */
|
/* TL = !TR (handshake in progress) */
|
||||||
temp |= (~mouse.State & 0x20) >> 1;
|
temp |= (~mouse.State & 0x20) >> 1;;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* TL = TR (data is ready) */
|
/* TL = TR (handshake completed) */
|
||||||
temp |= (mouse.State & 0x20) >> 1;
|
temp |= (mouse.State & 0x20) >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,25 +133,25 @@ void mouse_write(unsigned char data, unsigned char mask)
|
|||||||
/* update bits set as output only */
|
/* update bits set as output only */
|
||||||
data = (mouse.State & ~mask) | (data & mask);
|
data = (mouse.State & ~mask) | (data & mask);
|
||||||
|
|
||||||
/* TH transition */
|
|
||||||
if ((mouse.State ^ data) & 0x40)
|
|
||||||
{
|
|
||||||
/* start (TH=0) or stop (TH=1) acquisition */
|
|
||||||
mouse.Counter = 1 - ((data & 0x40) >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TR transition */
|
/* TR transition */
|
||||||
if ((mouse.State ^ data) & 0x20)
|
if ((mouse.State ^ data) & 0x20)
|
||||||
{
|
{
|
||||||
/* acquisition in progress */
|
/* check if acquisition is started */
|
||||||
if ((mouse.Counter > 0) && (mouse.Counter < 10))
|
if ((mouse.Counter > 0) && (mouse.Counter < 9))
|
||||||
{
|
{
|
||||||
/* increment phase */
|
/* increment phase */
|
||||||
mouse.Counter++;
|
mouse.Counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TL handshake latency */
|
/* TL handshake latency (fix buggy mouse routine in Cannon Fodder, Shangai 2, Wacky World, Star Blade, ...) */
|
||||||
mouse.Wait = 1;
|
mouse.Wait = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TH transition */
|
||||||
|
if ((mouse.State ^ data) & 0x40)
|
||||||
|
{
|
||||||
|
/* start (TH=1->0) or stop (TH=0->1) data acquisition */
|
||||||
|
mouse.Counter = (mouse.State >> 6) & 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update internal state */
|
/* update internal state */
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/***************************************************************************************
|
/***************************************************************************************
|
||||||
* Genesis Plus
|
* Genesis Plus
|
||||||
* Sega Mouse support
|
* Sega/Mega Mouse support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user