aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authortwinaphex2017-01-29 06:04:05 +0100
committertwinaphex2017-01-29 06:04:05 +0100
commitb6006bc542f89ad1b7086268f851f0ba880ad6cd (patch)
tree975d43d5e1baff2a035928fd20cbd6b5fbd0d068 /source
parentb9ad67f2d3f5bc1f7ebaad2eeb225d669aa7f58b (diff)
downloadsnesemu-b6006bc542f89ad1b7086268f851f0ba880ad6cd.tar.gz
snesemu-b6006bc542f89ad1b7086268f851f0ba880ad6cd.tar.bz2
snesemu-b6006bc542f89ad1b7086268f851f0ba880ad6cd.zip
Cleanup
Diffstat (limited to 'source')
-rw-r--r--source/sa1.c50
1 files changed, 25 insertions, 25 deletions
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)