joncampbell123 / doslib

Hackipedia DOSLIB, a general collection of useful libraries for writing MS-DOS software
GNU Lesser General Public License v2.1
210 stars 18 forks source link

Sound Blaster profiling mode #1

Open joncampbell123 opened 8 years ago

joncampbell123 commented 8 years ago

I'm thinking of adding a build mode to the sndsb library so that there are normal builds, and profiling builds. The profiling builds would profile and log each DSP read/write, reset procedure, and how long each took to execute. DSP writes would also block until the DSP signals not busy, and log that as well (so it would log how long it waited for DSP ready, and how long the DSP was busy after writing the byte).

The main loop would also writing profiling data on the speed/timing of the DMA transfers and the timestamp of each IRQ.

The main loop would periodically call a function to dump the profiling data from RAM to disk. In this way, we can get a feel for how long DSP commands take on actual hardware.