From ef776e728cfa67fbca38bb375152b336fa0b5200 Mon Sep 17 00:00:00 2001 From: spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> Date: Mon, 27 Jun 2022 22:18:11 +0200 Subject: Clean up io/system573 example and libpsxpress --- examples/io/system573/k573io.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples/io/system573/k573io.c') 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(); } -- cgit v1.2.3