diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-06-27 22:18:11 +0200 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-06-27 22:18:11 +0200 |
| commit | ef776e728cfa67fbca38bb375152b336fa0b5200 (patch) | |
| tree | 4eea0faf910d2671446c3f1ff1b9714d23e53cb7 /examples/io/system573/k573io.c | |
| parent | f56ade9b10c7c2d37f1b0af9191560cd5f0295b4 (diff) | |
| download | psn00bsdk-ef776e728cfa67fbca38bb375152b336fa0b5200.tar.gz | |
Clean up io/system573 example and libpsxpress
Diffstat (limited to 'examples/io/system573/k573io.c')
| -rw-r--r-- | examples/io/system573/k573io.c | 7 |
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(); } |
