aboutsummaryrefslogtreecommitdiff
path: root/examples/io/system573/k573io.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/io/system573/k573io.c')
-rw-r--r--examples/io/system573/k573io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/io/system573/k573io.c b/examples/io/system573/k573io.c
index bc13852..53c109f 100644
--- a/examples/io/system573/k573io.c
+++ b/examples/io/system573/k573io.c
@@ -75,7 +75,7 @@ uint32_t K573_GetJAMMAInputs(void) {
inputs |= ((K573_IO_CHIP[IO_REG_IN1_HIGH] >> 8) & 0x1f) << 24;
inputs |= (K573_IO_CHIP[IO_REG_IN1_LOW] & 0x07) << 29;
- return inputs;
+ return ~inputs;
}
void K573_SetLights(uint32_t lights) {
@@ -120,5 +120,10 @@ void K573_Init(void) {
EXP1_ADDR = 0x1f000000;
EXP1_DELAY_SIZE = 0x24173f47; // 573 BIOS uses this value
+ // Bit 6 of this register controls the audio DAC and must be set, otherwise
+ // no sound will be output. Most of the other bits are data clocks/strobes
+ // and should be pulled high when not in use.
+ K573_IO_CHIP[IO_REG_OUT0] = 0x01e7;
+
K573_RESET_WATCHDOG();
}