Skip to content

Commit e02816a

Browse files
blixtcopy
authored andcommitted
Report CSP as absent for virtual SoundBlaster 16
1 parent 85961c6 commit e02816a

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

src/sb16.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,12 +784,29 @@ function any_first_digit(base)
784784
return commands;
785785
}
786786

787-
// ASP set register
788-
register_dsp_command([0x0E], 2, function()
787+
// The CSP/ASP coprocessor is reported absent (as on most real SB16 cards);
788+
// drivers that detect one (e.g. Win9x CSPMAN.DLL) crash programming it.
789+
790+
// ASP set mode register
791+
register_dsp_command([0x04], 1);
792+
793+
// ASP set codec parameter
794+
register_dsp_command([0x05], 2);
795+
796+
// ASP get version
797+
register_dsp_command([0x08], 1, function()
789798
{
790-
this.asp_registers[this.write_buffer.shift()] = this.write_buffer.shift();
799+
var sub_command = this.write_buffer.shift();
800+
if(sub_command === 0x03)
801+
{
802+
this.read_buffer.clear();
803+
this.read_buffer.push(0xFF); // no chip installed
804+
}
791805
});
792806

807+
// ASP set register
808+
register_dsp_command([0x0E], 2);
809+
793810
// ASP get register
794811
register_dsp_command([0x0F], 1, function()
795812
{

0 commit comments

Comments
 (0)