mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-11 18:59:07 +01:00
minor fixes with input reset
This commit is contained in:
parent
0db46554ef
commit
2e2c1d2b26
@ -555,6 +555,7 @@ void ConfigureJoypads ()
|
|||||||
input.system[0] = NO_SYSTEM;
|
input.system[0] = NO_SYSTEM;
|
||||||
input.system[1] = SYSTEM_GAMEPAD;
|
input.system[1] = SYSTEM_GAMEPAD;
|
||||||
}
|
}
|
||||||
|
io_reset();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@ -571,6 +572,7 @@ void ConfigureJoypads ()
|
|||||||
input.system[1] = NO_SYSTEM;
|
input.system[1] = NO_SYSTEM;
|
||||||
input.system[0] = SYSTEM_GAMEPAD;
|
input.system[0] = SYSTEM_GAMEPAD;
|
||||||
}
|
}
|
||||||
|
io_reset();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
@ -690,6 +692,7 @@ void ConfigureJoypads ()
|
|||||||
case 6:
|
case 6:
|
||||||
if (config.input[player].device == 1) break;
|
if (config.input[player].device == 1) break;
|
||||||
input.padtype[player] ^= 1;
|
input.padtype[player] ^= 1;
|
||||||
|
io_reset();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
@ -712,7 +715,6 @@ void ConfigureJoypads ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
menu = prevmenu;
|
menu = prevmenu;
|
||||||
io_reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
** - removed unused multichip support and YMxxx support
|
** - removed unused multichip support and YMxxx support
|
||||||
** - fixed CH3 CSM mode (credits to Nemesis)
|
** - fixed CH3 CSM mode (credits to Nemesis)
|
||||||
** - implemented PG overflow, aka "detune bug" (Ariel, Comix Zone, Shaq Fu, Spiderman,...), credits to Nemesis
|
** - implemented PG overflow, aka "detune bug" (Ariel, Comix Zone, Shaq Fu, Spiderman,...), credits to Nemesis
|
||||||
** - fixed SSG-EG support, credits to Nemesis and additional fixes from Alone Coder
|
** - fixed SSG-EG support, credits to Nemesis
|
||||||
** - modified EG rates and frequency, tested by Nemesis on real hardware
|
** - modified EG rates and frequency, tested by Nemesis on real hardware
|
||||||
** - fixed EG attenuation level on KEY ON (Ecco 2 splash sound)
|
** - fixed EG attenuation level on KEY ON (Ecco 2 splash sound)
|
||||||
** - fixed LFO phase update for CH3 special mode (Warlock, Alladin), thanks to AamirM
|
** - fixed LFO phase update for CH3 special mode (Warlock, Alladin), thanks to AamirM
|
||||||
@ -264,10 +264,15 @@ O(16),O(16),O(16),O(16),O(16),O(16),O(16),O(16)
|
|||||||
#define O(a) (a*1)
|
#define O(a) (a*1)
|
||||||
static const UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
|
static const UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
|
||||||
/* 32 infinite time rates */
|
/* 32 infinite time rates */
|
||||||
|
/*O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
||||||
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
||||||
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
||||||
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),*/
|
||||||
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
|
|
||||||
|
O(11),O(11),O(11),O(11),O(11),O(11),O(11),O(11),
|
||||||
|
O(11),O(11),O(11),O(11),O(11),O(11),O(11),O(11),
|
||||||
|
O(11),O(11),O(11),O(11),O(11),O(11),O(11),O(11),
|
||||||
|
O(11),O(11),O(11),O(11),O(11),O(11),O(11),O(11),
|
||||||
|
|
||||||
/* rates 00-11 */
|
/* rates 00-11 */
|
||||||
O(11),O(11),O(11),O(11),
|
O(11),O(11),O(11),O(11),
|
||||||
@ -648,10 +653,8 @@ INLINE void set_timers(int v )
|
|||||||
INLINE void FM_KEYON(FM_CH *CH , int s )
|
INLINE void FM_KEYON(FM_CH *CH , int s )
|
||||||
{
|
{
|
||||||
FM_SLOT *SLOT = &CH->SLOT[s];
|
FM_SLOT *SLOT = &CH->SLOT[s];
|
||||||
//if( !SLOT->key )
|
|
||||||
if(SLOT->state <= EG_REL)
|
if(SLOT->state <= EG_REL)
|
||||||
{
|
{
|
||||||
//SLOT->key = 1;
|
|
||||||
SLOT->phase = 0; /* restart Phase Generator */
|
SLOT->phase = 0; /* restart Phase Generator */
|
||||||
SLOT->ssgn = (SLOT->ssg & 0x04) >> 1;
|
SLOT->ssgn = (SLOT->ssg & 0x04) >> 1;
|
||||||
|
|
||||||
@ -672,15 +675,12 @@ INLINE void FM_KEYON(FM_CH *CH , int s )
|
|||||||
INLINE void FM_KEYOFF(FM_CH *CH , int s )
|
INLINE void FM_KEYOFF(FM_CH *CH , int s )
|
||||||
{
|
{
|
||||||
FM_SLOT *SLOT = &CH->SLOT[s];
|
FM_SLOT *SLOT = &CH->SLOT[s];
|
||||||
//if( SLOT->key )
|
|
||||||
//{
|
|
||||||
//SLOT->key = 0;
|
|
||||||
if (SLOT->state>EG_REL)
|
if (SLOT->state>EG_REL)
|
||||||
{
|
{
|
||||||
SLOT->state = EG_REL; /* phase -> Release */
|
SLOT->state = EG_REL; /* phase -> Release */
|
||||||
SLOT->ssgn = 0; /* reset Invert Flag (from Nemesis) */
|
SLOT->ssgn = 0; /* reset Invert Flag (from Nemesis) */
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set algorithm connection */
|
/* set algorithm connection */
|
||||||
@ -1013,13 +1013,9 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
if ( !(ym2612.OPN.eg_cnt & ((1<<SLOT->eg_sh_rr)-1) ) )
|
if ( !(ym2612.OPN.eg_cnt & ((1<<SLOT->eg_sh_rr)-1) ) )
|
||||||
{
|
{
|
||||||
if (SLOT->ssg&0x08)
|
if (SLOT->ssg&0x08)
|
||||||
{
|
SLOT->volume += 6 * eg_inc[SLOT->eg_sel_rr + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_rr)&7)]; /* from Nemesis */
|
||||||
SLOT->volume += 6 * eg_inc[SLOT->eg_sel_rr + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_rr)&7)]; /* from Nemesis */
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
SLOT->volume += eg_inc[SLOT->eg_sel_rr + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_rr)&7)];
|
SLOT->volume += eg_inc[SLOT->eg_sel_rr + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_rr)&7)];
|
||||||
}
|
|
||||||
|
|
||||||
if ( SLOT->volume >= MAX_ATT_INDEX )
|
if ( SLOT->volume >= MAX_ATT_INDEX )
|
||||||
{
|
{
|
||||||
@ -1031,7 +1027,7 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out = /*SLOT->tl +*/ ((UINT32)SLOT->volume);
|
out = (UINT32)SLOT->volume;
|
||||||
|
|
||||||
/* negate output (changes come from alternate bit, init comes from attack bit) */
|
/* negate output (changes come from alternate bit, init comes from attack bit) */
|
||||||
if ((SLOT->ssg&0x08) && (SLOT->ssgn&2))
|
if ((SLOT->ssg&0x08) && (SLOT->ssgn&2))
|
||||||
|
@ -249,8 +249,8 @@ void vdp_restore(uint8 *vdp_regs)
|
|||||||
bitmap.viewport.changed = 1;
|
bitmap.viewport.changed = 1;
|
||||||
|
|
||||||
/* restore VDP timings */
|
/* restore VDP timings */
|
||||||
fifo_latency = (reg[12] & 1) ? 27 : 30;
|
fifo_latency = (reg[12] & 1) ? 27 : 30;
|
||||||
if ((code & 0x0F) == 0x01) fifo_latency = fifo_latency * 2;
|
if ((code & 0x0F) == 0x01) fifo_latency = fifo_latency * 2;
|
||||||
|
|
||||||
/* remake cache */
|
/* remake cache */
|
||||||
for (i=0;i<0x800;i++)
|
for (i=0;i<0x800;i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user