Timers are now 64-bit.

This commit is contained in:
OBattler
2017-10-09 01:48:36 +02:00
parent 08bf9109d7
commit 02bbfb26eb
67 changed files with 508 additions and 499 deletions

View File

@@ -19,7 +19,7 @@ typedef struct ps1_audio_t
uint8_t status, ctrl;
int timer_latch, timer_count, timer_enable;
int64_t timer_latch, timer_count, timer_enable;
uint8_t fifo[2048];
int fifo_read_idx, fifo_write_idx;
@@ -89,7 +89,7 @@ static void ps1_audio_write(uint16_t port, uint8_t val, void *p)
break;
case 3: /*Timer reload value*/
ps1->timer_latch = val;
ps1->timer_count = (0xff-val) * TIMER_USEC;
ps1->timer_count = (int64_t) ((0xff-val) * TIMER_USEC);
ps1->timer_enable = (val != 0);
break;
case 4: /*Almost empty*/