Maybe I should move this discussion to another thread on this forum, but for now I will continue here. Please let me know if is ok or not.
The error above was triggered by a jump over multiple NOPs in the code. Sience I write this code in machine code (editing hex values) I use to let some space in the functions for future code insertion, and it seems that the VSA2 System Manager doesn't like this.
4042:D3CD is the physical address where the error was detected, the Instruction Pointer was at 7AD.. so my VSM was loaded at 4042:D3CD - 7AD = 4042:CC20 = 4:D040 linear address.
After fixing the code I have tried to dump this memory... there was nothing, all zeros - VSA2 is truly invisible to the OS.
And I have made some progress with the SB16 emulation on the WYSE terminal by the means of VSA2 - Audio VSM. I have managed to simulate the SB16 DSP reset procedure, DSP version and speaker on/off control.
(This part only respond to the software as there will be a SB16 installed in the system, no AC97 work done for now)
The attachment 2024-11-11-21-34-24-839.jpg is no longer available
The thing is that not all the software gets tricked by my VSM, and now I don't know what other tests are made by the DOS games to detect the SB16.
Here are some IO debug tests that I've made to the system:
The attachment 2024-11-10-13-23-08-556_1.jpg is no longer available
For now I want my VSM to fully respond to the SB16 IO ports as an original card. After this will work fine I will have to trap the DMA IO access and redirect the instructions to the AC97 controller dedicated DMAs.
CS5536 has this integrated AC97 controller that has its own DMAs that work a little different than the 2 DMAs of the system (integrated Intel 8237).
And in the end I need to process the 8 bit audio data from the games audio buffers to the 16 bit audio, FM audio format and other types of sound data that the SB16 is able to play.
If anyone knows some good reading about SB16 detection scheme used in the DOS games and the PCM data format, FM data format... please let me know.