Merge pull request #64 from ianhan/sbwinfix

SB: Fix Windows 9x support (unimplemented DSP read and write status port bits should be pulled high)
This commit is contained in:
Ian Scott authored and GitHub committed 2024-11-23 12:31:31 -07:00
commit e3e0c023f5
1 file changed
+4 -2
+4 -2
View File
@@ -59,6 +59,8 @@ static dma_inst_t dma_config;
#define DSP_DMA_FIFO_SIZE 1024
#define DSP_UNUSED_STATUS_BITS_PULLED_HIGH 0x7F
typedef struct sbdsp_t {
uint8_t inbox;
uint8_t outbox;
@@ -475,9 +477,9 @@ uint8_t sbdsp_read(uint8_t address) {
case DSP_READ_STATUS: //e
PIC_DeActivateIRQ();
//printf("i");
return (sbdsp.dav_pc << 7);
return sbdsp.dav_pc << 7 | DSP_UNUSED_STATUS_BITS_PULLED_HIGH;
case DSP_WRITE_STATUS://c
return (sbdsp.dav_dsp | sbdsp.dsp_busy | sbdsp.dac_resume_pending) << 7;
return (sbdsp.dav_dsp | sbdsp.dsp_busy | sbdsp.dac_resume_pending) << 7 | DSP_UNUSED_STATUS_BITS_PULLED_HIGH;
default:
//printf("SB READ: %x\n\r",address);
return 0xFF;