mikrosk / usound

Generic / system friendly sound setup for all TOS compatible machines
MIT License
1 stars 0 forks source link

Clock_ext on v4sa #2

Open MedourMehdi opened 1 month ago

MedourMehdi commented 1 month ago

Hi,

Just for information, this is how clock_ext is handled on v4sa in case you'll want to support it.

Regards,

mikrosk commented 1 month ago

Thanks. As far as I can see, it's basically Falcon compatible. I guess I'll have to either think of a (precise) way how to measure the clocks on other than Falcon (so I don't access hardware directly) or introduce hardcoded external clocks in case a specific machine (like V4SA) is detected.

MedourMehdi commented 1 month ago

Yes OL tried to make it that way, but there's a lot of emulation done via v4sa emutos - I used an arbitrary value for clock_value in my code, just in order to compute the prescale value. For example the 44.1khz frequency play in real (on v4sa) at 44.312khz and for 48Khz we have 48,561khz. There're also some asm example here regarding how to play sound on v4sa.