Skip to content

Commit

Permalink
Merge pull request #64 from ianhan/sbwinfix
Browse files Browse the repository at this point in the history
SB: Fix Windows 9x support (unimplemented DSP read and write status port bits should be pulled high)
  • Loading branch information
polpo authored Nov 23, 2024
2 parents 0fa4d05 + 4624ea6 commit e3e0c02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sw/sbdsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e3e0c02

Please sign in to comment.