Reply 80 of 82, by aVd
aVd wrote on 2026-07-12, 07:11:With my basic assembly skills I found, that in CMI8738 driver version 1.98 the value for register 0x21 is not 5, but 4. This is […]
With my basic assembly skills I found, that in CMI8738 driver version 1.98 the value for register 0x21 is not 5, but 4. This is what my disassembler shows as code (comment on first three lines are added by me):
mov dh,cs:data_20 ; data_20 seems like BASE ADDRESS var.mov dl,21h ; seems like BASE ADDRESS + 21hmov al,4 ; IS THIS WRONG VALUE???out dx,al ; port 21h, 8259-1 int comands
I checked again the register settings in driver version 1.98 and this code is actually a dead one. Possibly result of previous version patching or very bad code writing regarding the quality of DOS driver and mixer:
...mov dh,cs:data_20mov dl,21hmov al,5 ; 0x05 is set for 0x21 registerout dx,al ; 0x05 is written in 0x21 registerjmp short $+2jmp short loc_23nop ; |mov dh,cs:data_20 ; |mov dl,21h ; |--> this the dead code and no 0x04 is set for 0x21 register,mov al,4 ; | it was already set to 0x05 aboveout dx,al ; |jmp short loc_23 ; |loc_23:mov dh,cs:data_20...
Register settings values in the driver seems Ok to me from what I managed to compare to the information from the official documentation. The only concern remains the IRQ, DMA, etc. settings code routines, which I'm not able to check or patch.
I like the quieter planets, this one became pretty noisy 😀