mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-25 18:51:49 +01:00
fixed default scaling in STRETCH mode, fixed DPAD fast scroll, improved YM2612 enveloppe emulation
This commit is contained in:
parent
a2751bb7f3
commit
0c3c721bd0
@ -3,8 +3,13 @@ Genesis Plus for Gamecube
|
|||||||
|
|
||||||
CURRENT:
|
CURRENT:
|
||||||
---------
|
---------
|
||||||
|
[Genesis]
|
||||||
|
- YM2612(MAME): improved Enveloppe Generator accuracy: fix tracks #3 and #9 in Mega Turrican
|
||||||
|
|
||||||
|
|
||||||
[NGC/Wii]
|
[NGC/Wii]
|
||||||
- improved menu scrolling using Wiimote D-PAD
|
- improved menu scrolling using Wiimote D-PAD
|
||||||
|
- fixed config file incompatibility between GC and Wii versions
|
||||||
|
|
||||||
|
|
||||||
26/08/2008:
|
26/08/2008:
|
||||||
|
@ -71,7 +71,7 @@ static const u16 pad_keys[8] =
|
|||||||
#define PAD_LEFT 2
|
#define PAD_LEFT 2
|
||||||
#define PAD_RIGHT 3
|
#define PAD_RIGHT 3
|
||||||
|
|
||||||
#define MAX_HELD_CNT 100
|
#define MAX_HELD_CNT 10
|
||||||
static u32 held_cnt = 0;
|
static u32 held_cnt = 0;
|
||||||
|
|
||||||
static u32 wpad_dirmap[3][4] =
|
static u32 wpad_dirmap[3][4] =
|
||||||
|
@ -382,19 +382,19 @@ static void gxScale(void)
|
|||||||
{
|
{
|
||||||
int xscale, yscale, xshift, yshift, i;
|
int xscale, yscale, xshift, yshift, i;
|
||||||
|
|
||||||
|
/* borders are emulated */
|
||||||
if (config.overscan)
|
if (config.overscan)
|
||||||
{
|
{
|
||||||
if (config.aspect)
|
if (config.aspect)
|
||||||
{
|
{
|
||||||
/* borders are emulated */
|
xscale = (reg[12] & 1) ? 360 : 358;
|
||||||
xscale = (reg[12] & 1) ? 360 : 358;
|
|
||||||
if (gc_pal) xscale -= 1;
|
if (gc_pal) xscale -= 1;
|
||||||
yscale = (gc_pal && !config.render) ? (vdp_pal ? 144:143) : (vdp_pal ? 121:120);
|
yscale = (gc_pal && !config.render) ? (vdp_pal ? 144:143) : (vdp_pal ? 121:120);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* fullscreen stretch */
|
/* fullscreen stretch */
|
||||||
xscale = gc_pal ? 354 : 367;
|
xscale = bitmap.viewport.w + 2*bitmap.viewport.x;
|
||||||
yscale = (gc_pal && !config.render) ? (vdp_pal ? (268*144 / bitmap.viewport.h):143) : (vdp_pal ? (224*144 / bitmap.viewport.h):120);
|
yscale = (gc_pal && !config.render) ? (vdp_pal ? (268*144 / bitmap.viewport.h):143) : (vdp_pal ? (224*144 / bitmap.viewport.h):120);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,8 +413,8 @@ static void gxScale(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* fullscreen stretch */
|
/* fit screen */
|
||||||
xscale = gc_pal ? 321 : 334;
|
xscale = 320;
|
||||||
yscale = (gc_pal && !config.render) ? 134 : 112;
|
yscale = (gc_pal && !config.render) ? 134 : 112;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
** - 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
|
||||||
** - fixed Attack rate refresh (fix Batman&Robin introduction)
|
** - fixed Attack rate refresh (fix Batman&Robin introduction)$
|
||||||
|
** - fixed attenuation level when starting Substain Phase (Gynoug ?)
|
||||||
|
** - fixed Enveloppe Generator updates in some specific cases (AR maximal and/or Susbstain Level minimal)
|
||||||
**
|
**
|
||||||
** 03-08-2003 Jarek Burczynski:
|
** 03-08-2003 Jarek Burczynski:
|
||||||
** - fixed YM2608 initial values (after the reset)
|
** - fixed YM2608 initial values (after the reset)
|
||||||
@ -660,9 +662,9 @@ INLINE void FM_KEYON(FM_CH *CH , int s )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* directly switch to Decay */
|
/* directly switch to Decay (or Substain) */
|
||||||
SLOT->volume = MIN_ATT_INDEX;
|
SLOT->volume = MIN_ATT_INDEX;
|
||||||
SLOT->state = EG_DEC;
|
SLOT->state = (SLOT->sl == MIN_ATT_INDEX) ? EG_SUS : EG_DEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -933,7 +935,7 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
if (SLOT->volume <= MIN_ATT_INDEX)
|
if (SLOT->volume <= MIN_ATT_INDEX)
|
||||||
{
|
{
|
||||||
SLOT->volume = MIN_ATT_INDEX;
|
SLOT->volume = MIN_ATT_INDEX;
|
||||||
SLOT->state = EG_DEC;
|
SLOT->state = (SLOT->sl == MIN_ATT_INDEX) ? EG_SUS : EG_DEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -947,7 +949,10 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
SLOT->volume += 6 * eg_inc[SLOT->eg_sel_d1r + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_d1r)&7)]; /* from Nemesis */
|
SLOT->volume += 6 * eg_inc[SLOT->eg_sel_d1r + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_d1r)&7)]; /* from Nemesis */
|
||||||
|
|
||||||
if ( SLOT->volume >= (INT32)(SLOT->sl) )
|
if ( SLOT->volume >= (INT32)(SLOT->sl) )
|
||||||
SLOT->state = EG_SUS;
|
{
|
||||||
|
SLOT->volume = (INT32)(SLOT->sl);
|
||||||
|
SLOT->state = EG_SUS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -957,7 +962,10 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
SLOT->volume += eg_inc[SLOT->eg_sel_d1r + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_d1r)&7)];
|
SLOT->volume += eg_inc[SLOT->eg_sel_d1r + ((ym2612.OPN.eg_cnt>>SLOT->eg_sh_d1r)&7)];
|
||||||
|
|
||||||
if ( SLOT->volume >= (INT32)(SLOT->sl) )
|
if ( SLOT->volume >= (INT32)(SLOT->sl) )
|
||||||
|
{
|
||||||
|
SLOT->volume = (INT32)(SLOT->sl);
|
||||||
SLOT->state = EG_SUS;
|
SLOT->state = EG_SUS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -993,14 +1001,14 @@ INLINE void advance_eg_channel(FM_SLOT *SLOT)
|
|||||||
|
|
||||||
if ((SLOT->ar + SLOT->ksr) < 94 /*32+62*/)
|
if ((SLOT->ar + SLOT->ksr) < 94 /*32+62*/)
|
||||||
{
|
{
|
||||||
SLOT->state = EG_ATT; /* phase -> Attack */
|
|
||||||
SLOT->volume = MAX_ATT_INDEX;
|
SLOT->volume = MAX_ATT_INDEX;
|
||||||
|
SLOT->state = EG_ATT; /* phase -> Attack */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Attack Rate is maximal: directly switch to Decay */
|
/* Attack Rate is maximal: directly switch to Decay */
|
||||||
SLOT->state = EG_DEC;
|
|
||||||
SLOT->volume = MIN_ATT_INDEX;
|
SLOT->volume = MIN_ATT_INDEX;
|
||||||
|
SLOT->state = (SLOT->sl == MIN_ATT_INDEX) ? EG_SUS : EG_DEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
swap_flag = (SLOT->ssg&0x02); /* bit 1 = alternate */
|
swap_flag = (SLOT->ssg&0x02); /* bit 1 = alternate */
|
||||||
|
@ -212,7 +212,7 @@ void vdp_reset(void)
|
|||||||
/* reset border area */
|
/* reset border area */
|
||||||
bitmap.viewport.x = config.overscan ? 12 : 0;
|
bitmap.viewport.x = config.overscan ? 12 : 0;
|
||||||
bitmap.viewport.y = config.overscan ? (vdp_pal ? 32 : 8) : 0;
|
bitmap.viewport.y = config.overscan ? (vdp_pal ? 32 : 8) : 0;
|
||||||
bitmap.viewport.changed = 1;
|
bitmap.viewport.changed = 1;
|
||||||
|
|
||||||
/* initialize some registers (normally set by BIOS) */
|
/* initialize some registers (normally set by BIOS) */
|
||||||
if (config.bios_enabled != 3)
|
if (config.bios_enabled != 3)
|
||||||
@ -223,8 +223,8 @@ void vdp_reset(void)
|
|||||||
vdp_reg_w(15, 0x02); /* auto increment */
|
vdp_reg_w(15, 0x02); /* auto increment */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* default latency */
|
/* default latency */
|
||||||
fifo_latency = 27;
|
fifo_latency = 27;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vdp_shutdown(void)
|
void vdp_shutdown(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user