~ fixed a regression that broke STOP instruction behavior

~ modified LFO implementation to make it handles signed displacement value correctly (is that correct ? still need to be verified against real hardware)
This commit is contained in:
ekeeke31 2009-06-16 15:51:29 +00:00
parent 0c8c30e3a2
commit 72ec155b38
2 changed files with 12 additions and 12 deletions

View File

@ -836,13 +836,6 @@ extern uint32 count_m68k;
void m68k_run (int cyc) void m68k_run (int cyc)
{ {
/* Make sure we're not stopped */
if(CPU_STOPPED)
{
count_m68k = cyc;
return;
}
int temp; int temp;
/* Return point if we had an address error */ /* Return point if we had an address error */
@ -870,6 +863,13 @@ void m68k_run (int cyc)
CPU_INT_CYCLES = 0; CPU_INT_CYCLES = 0;
} }
/* Make sure we're not stopped */
if(CPU_STOPPED)
{
count_m68k = cyc;
return;
}
/* execute a single instruction */ /* execute a single instruction */
count_m68k += m68k_execute(); count_m68k += m68k_execute();
} }

View File

@ -30,7 +30,7 @@
** - implemented correct SSG-EG emulation (Asterix, Beavis&Butthead, Bubba'n Six & many others) ** - implemented correct SSG-EG emulation (Asterix, Beavis&Butthead, Bubba'n Six & many others)
** - adjusted some EG rates ** - adjusted some EG rates
** - modified address/data port behavior ** - modified address/data port behavior
** - fixed LFO implementation (only 11 bits of precision) ** - fixed Phase Modulation (LFO) calculations (precision reduced to 11 bits)
** **
** TODO: complete SSG-EG documentation ** TODO: complete SSG-EG documentation
** **
@ -1244,8 +1244,8 @@ INLINE void update_phase_lfo_slot(FM_SLOT *SLOT , INT32 pms, UINT32 block_fnum)
/* retrieve BLOCK register value */ /* retrieve BLOCK register value */
UINT8 blk = (block_fnum >> 11) & 7; UINT8 blk = (block_fnum >> 11) & 7;
/* increase FNUM register value */ /* apply phase modulation to FNUM register value */
UINT32 fn = (block_fnum + lfo_fn_table_index_offset) & 0x7ff; UINT32 fn = (block_fnum + (UINT32)lfo_fn_table_index_offset) & 0x7ff;
/* recalculate keyscale code */ /* recalculate keyscale code */
int kc = (blk<<2) | opn_fktable[fn >> 7]; int kc = (blk<<2) | opn_fktable[fn >> 7];
@ -1277,8 +1277,8 @@ INLINE void update_phase_lfo_channel(FM_CH *CH)
/* retrieve BLOCK register value */ /* retrieve BLOCK register value */
UINT8 blk = (block_fnum >> 11) & 7; UINT8 blk = (block_fnum >> 11) & 7;
/* increase FNUM register value */ /* apply phase modulation to FNUM register value */
UINT32 fn = (block_fnum + lfo_fn_table_index_offset)& 0x7ff; UINT32 fn = (block_fnum + (UINT32)lfo_fn_table_index_offset) & 0x7ff;
/* recalculate keyscale code */ /* recalculate keyscale code */
int kc = (blk<<2) | opn_fktable[fn >> 7]; int kc = (blk<<2) | opn_fktable[fn >> 7];