Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Game sometimes crashes upon exit (Developers)

posted by KarlG, 29.05.2022, 15:26

> 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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 182 users online (0 registered, 182 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum