Whoops, forgot a few timer_add's there. Crashy!

This commit is contained in:
waltje
2019-04-25 21:09:47 -05:00
parent 00f13aff16
commit 756d227f7a
5 changed files with 15 additions and 17 deletions

View File

@@ -8,7 +8,7 @@
* *
* Implementation of the floppy drive emulation. * Implementation of the floppy drive emulation.
* *
* Version: @(#)fdd.c 1.0.18 2019/02/10 * Version: @(#)fdd.c 1.0.19 2019/04/25
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -738,10 +738,10 @@ fdd_reset(void)
curdrive = 0; curdrive = 0;
fdd_period = 32; fdd_period = 32;
timer_add(fdd_poll_0, &(fdd_poll_time[0]), &(motoron[0]), NULL); timer_add(fdd_poll_0, NULL, &fdd_poll_time[0], &motoron[0]);
timer_add(fdd_poll_1, &(fdd_poll_time[1]), &(motoron[1]), NULL); timer_add(fdd_poll_1, NULL, &fdd_poll_time[1], &motoron[1]);
timer_add(fdd_poll_2, &(fdd_poll_time[2]), &(motoron[2]), NULL); timer_add(fdd_poll_2, NULL, &fdd_poll_time[2], &motoron[2]);
timer_add(fdd_poll_3, &(fdd_poll_time[3]), &(motoron[3]), NULL); timer_add(fdd_poll_3, NULL, &fdd_poll_time[3], &motoron[3]);
} }

View File

@@ -399,7 +399,7 @@ read_done(void *arg, int num)
} }
/* We have data waiting for us.. delay a little, and then read it. */ /* We have data waiting for us.. delay a little, and then read it. */
// timer_add(ser_timer, &dev->delay, &dev->delay, dev); // timer_add(ser_timer, dev, &dev->delay, &dev->delay);
} }
#endif #endif

View File

@@ -8,13 +8,13 @@
* *
* Sound emulation core. * Sound emulation core.
* *
* Version: @(#)sound.c 1.0.17 2018/11/11 * Version: @(#)sound.c 1.0.18 2019/04/25
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk> * Sarah Walker, <tommowalker@tommowalker.co.uk>
* *
* Copyright 2017,2018 Fred N. van Kempen. * Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca. * Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker. * Copyright 2008-2018 Sarah Walker.
* *
@@ -345,7 +345,7 @@ sound_reset(void)
/* Reset OpenAL. */ /* Reset OpenAL. */
openal_reset(); openal_reset();
timer_add(sound_poll, &poll_time, TIMER_ALWAYS_ENABLED, NULL); timer_add(sound_poll, NULL, &poll_time, TIMER_ALWAYS_ENABLED);
sound_cd_set_volume(65535, 65535); sound_cd_set_volume(65535, 65535);

View File

@@ -13,7 +13,7 @@
* B4 to 40, two writes to 43, then two reads * B4 to 40, two writes to 43, then two reads
* - value _does_ change! * - value _does_ change!
* *
* Version: @(#)pit.c 1.0.13 2019/04/11 * Version: @(#)pit.c 1.0.14 2019/04/25
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -555,8 +555,7 @@ pit_init(void)
pit.gate[i] = 1; pit.gate[i] = 1;
pit.using_timer[i] = 1; pit.using_timer[i] = 1;
timer_add(timer_over, timer_add(timer_over, &pit.pit_nr[i], &pit.c[i], &pit.running[i]);
&pit.c[i], &pit.running[i], (void *)&pit.pit_nr[i]);
} }
io_sethandler(0x0040, 4, io_sethandler(0x0040, 4,
@@ -612,8 +611,7 @@ pit_ps2_init(void)
pit2.pit_nr[0].nr = 0; pit2.pit_nr[0].nr = 0;
pit2.pit_nr[0].pit = &pit2; pit2.pit_nr[0].pit = &pit2;
timer_add(timer_over, timer_add(timer_over, &pit2.pit_nr[0], &pit2.c[0], &pit2.running[0]);
&pit2.c[0], &pit2.running[0], (void *)&pit2.pit_nr[0]);
io_sethandler(0x0044, 1, io_sethandler(0x0044, 1,
pit_read,NULL,NULL, pit_write,NULL,NULL, &pit2); pit_read,NULL,NULL, pit_write,NULL,NULL, &pit2);

View File

@@ -83,7 +83,7 @@ timer_process(void)
enable[c] = *timers[c].enable; enable[c] = *timers[c].enable;
if (enable[c]) { if (enable[c]) {
*timers[c].count = *timers[c].count - diff; *timers[c].count = *timers[c].count - diff;
if (*timers[c].count <= 0) if (*timers[c].count <= 0LL)
process = 1; process = 1;
} }
} }
@@ -91,8 +91,8 @@ timer_process(void)
if (! process) if (! process)
return; return;
while (1) { for (;;) {
int64_t lowest = 1; int64_t lowest = 1LL;
int lowest_c; int lowest_c;
for (c = 0; c < present; c++) { for (c = 0; c < present; c++) {