aboutsummaryrefslogtreecommitdiff
path: root/source/sa1.c
diff options
context:
space:
mode:
authorJoão Silva2017-01-29 04:55:23 +0000
committerJoão Silva2017-01-29 04:55:23 +0000
commit0e59b999fa976de2d00490f552a1ff0a27d40f63 (patch)
treeadce7b06d1acc25f52c6e10616451bba02f9f7a5 /source/sa1.c
parent813fc89d37d1d8c8d2fa090a28f74aa0fdcea5df (diff)
downloadsnes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.gz
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.bz2
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.zip
Converted most types to stdint-style (fixing a few in the process).
Diffstat (limited to 'source/sa1.c')
-rw-r--r--source/sa1.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/sa1.c b/source/sa1.c
index 17e7258..a0d4bba 100644
--- a/source/sa1.c
+++ b/source/sa1.c
@@ -65,7 +65,7 @@ void S9xSA1Reset()
void S9xSA1SetBWRAMMemMap(uint8_t val)
{
- int c;
+ int32_t c;
if (val & 0x80)
{
@@ -147,15 +147,15 @@ uint16_t S9xSA1GetWord(uint32_t address)
void S9xSA1SetByte(uint8_t byte, uint32_t address)
{
- uint8_t* Setaddress = SA1.WriteMap [(address >> MEMMAP_SHIFT) & MEMMAP_MASK];
+ uint8_t* SetAddress = SA1.WriteMap [(address >> MEMMAP_SHIFT) & MEMMAP_MASK];
- if (Setaddress >= (uint8_t*) MAP_LAST)
+ if (SetAddress >= (uint8_t*) MAP_LAST)
{
- *(Setaddress + (address & 0xffff)) = byte;
+ *(SetAddress + (address & 0xffff)) = byte;
return;
}
- switch ((intptr_t) Setaddress)
+ switch ((intptr_t) SetAddress)
{
case MAP_PPU:
S9xSetSA1(byte, address & 0xffff);
@@ -248,10 +248,10 @@ void S9xSA1SetPCBase(uint32_t address)
void S9xSetSA1MemMap(uint32_t which1, uint8_t map)
{
- int c;
- int i;
- int start = which1 * 0x100 + 0xc00;
- int start2 = which1 * 0x200;
+ int32_t c;
+ int32_t i;
+ int32_t start = which1 * 0x100 + 0xc00;
+ int32_t start2 = which1 * 0x200;
if (which1 >= 2)
start2 += 0x400;
@@ -508,18 +508,18 @@ static void S9xSA1CharConv2()
{
uint32_t dest = Memory.FillRAM [0x2235] | (Memory.FillRAM [0x2236] << 8);
uint32_t offset = (SA1.in_char_dma & 7) ? 0 : 1;
- int depth = (Memory.FillRAM [0x2231] & 3) == 0 ? 8 :
- (Memory.FillRAM [0x2231] & 3) == 1 ? 4 : 2;
- int bytes_per_char = 8 * depth;
+ int32_t depth = (Memory.FillRAM [0x2231] & 3) == 0 ? 8 :
+ (Memory.FillRAM [0x2231] & 3) == 1 ? 4 : 2;
+ int32_t bytes_per_char = 8 * depth;
uint8_t* p = &Memory.FillRAM [0x3000] + dest + offset * bytes_per_char;
uint8_t* q = &Memory.ROM [MAX_ROM_SIZE - 0x10000] + offset * 64;
if (depth == 8)
{
- int l;
+ int32_t l;
for (l = 0; l < 8; l++, q += 8)
{
- int b;
+ int32_t b;
for (b = 0; b < 8; b++)
{
uint8_t r = *(q + b);