Gravis UltraSound fixes, should no longer make the emulator stop responding.

This commit is contained in:
OBattler
2019-11-01 03:55:43 +01:00
parent 8b7ab32416
commit d79f25c56c

View File

@@ -333,9 +333,9 @@ gus->curx[gus->voice]=(gus->curx[gus->voice]&0xFFF8000)|((val&0x7F)<<8);
if (gus->voices<14) gus->voices=14;
gus->global=val;
if (gus->voices < 14)
gus->samp_latch = (int)(TIMER_USEC * (1000000.0 / 44100.0));
gus->samp_latch = (uint64_t)(TIMER_USEC * (1000000.0 / 44100.0));
else
gus->samp_latch = (int)(TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14]));
gus->samp_latch = (uint64_t)(TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14]));
break;
case 0x41: /*DMA*/
@@ -746,7 +746,7 @@ void gus_poll_timer_1(void *p)
{
gus_t *gus = (gus_t *)p;
timer_advance_u64(&gus->timer_1, TIMER_USEC * 80);
timer_advance_u64(&gus->timer_1, (uint64_t)(TIMER_USEC * 80));
if (gus->t1on)
{
gus->t1++;
@@ -777,7 +777,7 @@ void gus_poll_timer_2(void *p)
{
gus_t *gus = (gus_t *)p;
timer_advance_u64(&gus->timer_2, TIMER_USEC * 320);
timer_advance_u64(&gus->timer_2, (uint64_t)(TIMER_USEC * 320));
if (gus->t2on)
{
gus->t2++;