Skip to content

Commit 6480947

Browse files
authored
Merge pull request #7 from mywave82/even-data-express
Ensure that writes to GPIO extended writes both bank A and B (needed for OPL3 Express)
2 parents 1b0995b + aed3c7f commit 6480947

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

RetroWaveLib/Board/OPL3.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void retrowave_opl3_emit_port1(RetroWaveContext *ctx, uint8_t reg, uint8_t val)
8282
}
8383

8484
void retrowave_opl3_reset(RetroWaveContext *ctx) {
85-
uint8_t buf[] = {RetroWave_Board_OPL3, 0x12, 0xfe};
85+
uint8_t buf[] = {RetroWave_Board_OPL3, 0x12, 0xfe, 0x00};
8686
ctx->callback_io(ctx->user_data, transfer_speed / 10, buf, NULL, sizeof(buf));
8787
buf[2] = 0xff;
8888
ctx->callback_io(ctx->user_data, transfer_speed / 10, buf, NULL, sizeof(buf));
@@ -93,4 +93,4 @@ void retrowave_opl3_mute(RetroWaveContext *ctx) {
9393
retrowave_opl3_emit_port0(ctx, i, i >= 0x40 && i <= 0x55 ? 0xFF : 0x00);
9494
retrowave_opl3_emit_port1(ctx, i, i >= 0x40 && i <= 0x55 ? 0xFF : 0x00);
9595
}
96-
}
96+
}

RetroWaveLib/RetroWave.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ void retrowave_io_init(RetroWaveContext *ctx) {
6161
uint8_t init_sequence_1[] = {
6262
0x00,
6363
0x0a, // IOCON register
64-
0x28 // Enable: HAEN, SEQOP
64+
0x28, // Enable: HAEN, SEQOP
65+
0x28
6566
};
6667

6768
uint8_t init_sequence_2[] = {

0 commit comments

Comments
 (0)