Game sometimes crashes upon exit (Developers)
> Hello KarlG, hello Japheth,
> (1) Why does KillSound()
want to write to port
> 0x40
? This port controls PIT 0, the timer that controls IRQ 0
> — and has nothing to do with sound, which is controlled by PIT 2.
> The program should not need to reprogram PIT 0.
Good question. That comes from me copying from an example that I didn't fully understand.
> (2) At the same time, the program probably does need to temporarily
> disable interrupts while starting or stopping sound, so that an IRQ does
> not mess up the ongoing port I/O.
Good point. I will follow both of your suggestions here. Thank you for your advice!
Complete thread:
- Game sometimes crashes upon exit - KarlG, 28.05.2022, 21:59 (Developers)
- Game sometimes crashes upon exit - Japheth, 29.05.2022, 06:21
- Game sometimes crashes upon exit - tkchia, 29.05.2022, 09:53
- Game sometimes crashes upon exit - KarlG, 29.05.2022, 15:26
- Game sometimes crashes upon exit - KarlG, 29.05.2022, 15:24
- Game sometimes crashes upon exit - tkchia, 29.05.2022, 09:53
- Game sometimes crashes upon exit - Japheth, 29.05.2022, 06:21