From b6006bc542f89ad1b7086268f851f0ba880ad6cd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 29 Jan 2017 06:04:05 +0100 Subject: Cleanup --- source/sa1.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'source') diff --git a/source/sa1.c b/source/sa1.c index a0d4bba..f7324b5 100644 --- a/source/sa1.c +++ b/source/sa1.c @@ -275,33 +275,33 @@ uint8_t S9xGetSA1(uint32_t address) { switch (address) { - case 0x2300: - return ((uint8_t)((Memory.FillRAM [0x2209] & 0x5f) | - (CPU.IRQActive & (SA1_IRQ_SOURCE | SA1_DMA_IRQ_SOURCE)))); - case 0x2301: - return ((Memory.FillRAM [0x2200] & 0xf) | - (Memory.FillRAM [0x2301] & 0xf0)); - case 0x2306: - return ((uint8_t) SA1.sum); - case 0x2307: - return ((uint8_t)(SA1.sum >> 8)); - case 0x2308: - return ((uint8_t)(SA1.sum >> 16)); - case 0x2309: - return ((uint8_t)(SA1.sum >> 24)); - case 0x230a: - return ((uint8_t)(SA1.sum >> 32)); - case 0x230d: - { - uint8_t byte = Memory.FillRAM [0x230d]; + case 0x2300: + return ((uint8_t)((Memory.FillRAM [0x2209] & 0x5f) | + (CPU.IRQActive & (SA1_IRQ_SOURCE | SA1_DMA_IRQ_SOURCE)))); + case 0x2301: + return ((Memory.FillRAM [0x2200] & 0xf) | + (Memory.FillRAM [0x2301] & 0xf0)); + case 0x2306: + return ((uint8_t) SA1.sum); + case 0x2307: + return ((uint8_t)(SA1.sum >> 8)); + case 0x2308: + return ((uint8_t)(SA1.sum >> 16)); + case 0x2309: + return ((uint8_t)(SA1.sum >> 24)); + case 0x230a: + return ((uint8_t)(SA1.sum >> 32)); + case 0x230d: + { + uint8_t byte = Memory.FillRAM [0x230d]; - if (Memory.FillRAM [0x2258] & 0x80) - S9xSA1ReadVariableLengthData(true, false); - return (byte); - } - default: - return (Memory.FillRAM [address]); + if (Memory.FillRAM [0x2258] & 0x80) + S9xSA1ReadVariableLengthData(true, false); + return (byte); + } } + + return (Memory.FillRAM [address]); } void S9xSetSA1(uint8_t byte, uint32_t address) -- cgit v1.2.3