First post, by jmk
Wizball should have a bit of PC speaker sampled audio in it, according to this:
http://www.oldskool.org/sound/pc
Here is the routine which might be trying to do it. It is using a PIT mode which has not been added into the emulation - the Hardware Retriggerable One Shot.
0F63:4463 "routine". DI = 09 (usually) SI = Source? CX = Length?4463 cli4464 in al,61 or al,2 out 61,al (Speaker data enable).446A in al,62 or al,20 out 62,al ("timer 2 channel out").4470 in al,61 and al,FE out 61,al (Speaker data disable).4476 mov al,92 out 43,al (PIT mode port: counter 2, counter latch, mode 1 (one shot), binary.447A mov al,FF out 42,al (PIT counter 2, cassette & speaker).447E mov dl,04480 push cx4481 in al,61 or al,01 out 61,al ("timer 2 gate to speaker enable").4487 and al,FE out 61,al ("timer 2 gate to speaker disable").448B mov al,[si] out 42,al -> big table of "sample timing data" (usually 1A-2E).448F mov cx,di4491 loop 44914493 pop cx4494 inc si4495 loop 44804497 sti4498 ret
I'm no expert on the timers and their interaction with the internal speaker... I think it may be trying some sort of pulse-width modulation?
Anyway, if someone who knows better would like to investigate, then I'd be grateful. 😉