VOGONS


First post, by Rob Hubbard

User metadata
Rank Newbie
Rank
Newbie

Hi, I am currently trying to reproduce the PC speaker sound from old games using dosbox.

So far I have managed to capture the frequencies from pcspeaker.cpp (PCSPEAKER_SetCounter), and the ticks between each "tone". But I can't seem to find the duration of the pauses in between the speaker tones.

Any help / suggestions would be much appreciated.

Reply 2 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

can't you just save the writes to the ports in question ? (e.g keyboard port and timer port ?) PIT_Fullindex() gives you a millisecond float which you can use to determine the time of the writes.

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 4, by Rob Hubbard

User metadata
Rank Newbie
Rank
Newbie

Thanks for the tip. I already obtain these values from PIC_TICKS in PCSPEAKER_SetCounter. The problem is that each 'tone' lasts until another tone begins. (I can't find the timings for the pauses inbetween.)