diff options
author | twinaphex | 2017-12-25 06:42:01 +0100 |
---|---|---|
committer | twinaphex | 2017-12-25 06:42:01 +0100 |
commit | e3dbf33f0a4c7e4256772b7c5da7e909e5424819 (patch) | |
tree | 1db4b6766fa33065ea5308b789a5893583e8e0ac /source | |
parent | e6cb60ee424a8efb237150f937b026eaffb3c2eb (diff) | |
download | snesemu-e3dbf33f0a4c7e4256772b7c5da7e909e5424819.tar.gz snesemu-e3dbf33f0a4c7e4256772b7c5da7e909e5424819.tar.bz2 snesemu-e3dbf33f0a4c7e4256772b7c5da7e909e5424819.zip |
Turn getset into C file
Diffstat (limited to 'source')
-rw-r--r-- | source/getset.c (renamed from source/getset.h) | 20 | ||||
-rw-r--r-- | source/memmap.c | 2 | ||||
-rw-r--r-- | source/ppu.h | 2 |
3 files changed, 9 insertions, 15 deletions
diff --git a/source/getset.h b/source/getset.c index 6c4142a..eefc5b5 100644 --- a/source/getset.h +++ b/source/getset.c @@ -1,8 +1,5 @@ #include "../copyright" -#ifndef _GETSET_H_ -#define _GETSET_H_ - #include "ppu.h" #include "dsp1.h" #include "cpuexec.h" @@ -11,11 +8,9 @@ #include "obc1.h" #include "seta.h" -#include <retro_inline.h> - extern uint8_t OpenBus; -static INLINE uint8_t S9xGetByte(uint32_t Address) +uint8_t S9xGetByte(uint32_t Address) { int32_t block; uint8_t* GetAddress = Memory.Map [block = (Address >> MEMMAP_SHIFT) & MEMMAP_MASK]; @@ -67,7 +62,7 @@ static INLINE uint8_t S9xGetByte(uint32_t Address) } } -static INLINE uint16_t S9xGetWord(uint32_t Address) +uint16_t S9xGetWord(uint32_t Address) { int32_t block; uint8_t* GetAddress; @@ -138,7 +133,7 @@ static INLINE uint16_t S9xGetWord(uint32_t Address) } } -static INLINE void S9xSetByte(uint8_t Byte, uint32_t Address) +void S9xSetByte(uint8_t Byte, uint32_t Address) { int32_t block; uint8_t* SetAddress = Memory.WriteMap [block = ((Address >> MEMMAP_SHIFT) & MEMMAP_MASK)]; @@ -209,7 +204,7 @@ static INLINE void S9xSetByte(uint8_t Byte, uint32_t Address) } } -static INLINE void S9xSetWord(uint16_t Word, uint32_t Address) +void S9xSetWord(uint16_t Word, uint32_t Address) { int32_t block; uint8_t* SetAddress; @@ -313,7 +308,7 @@ static INLINE void S9xSetWord(uint16_t Word, uint32_t Address) } } -static INLINE uint8_t* GetBasePointer(uint32_t Address) +uint8_t* GetBasePointer(uint32_t Address) { uint8_t* GetAddress = Memory.Map [(Address >> MEMMAP_SHIFT) & MEMMAP_MASK]; if (GetAddress >= (uint8_t*) MAP_LAST) @@ -347,7 +342,7 @@ static INLINE uint8_t* GetBasePointer(uint32_t Address) } } -static INLINE uint8_t* S9xGetMemPointer(uint32_t Address) +uint8_t* S9xGetMemPointer(uint32_t Address) { uint8_t* GetAddress = Memory.Map [(Address >> MEMMAP_SHIFT) & MEMMAP_MASK]; if (GetAddress >= (uint8_t*) MAP_LAST) @@ -384,7 +379,7 @@ static INLINE uint8_t* S9xGetMemPointer(uint32_t Address) } } -static INLINE void S9xSetPCBase(uint32_t Address) +void S9xSetPCBase(uint32_t Address) { int32_t block; uint8_t* GetAddress = Memory.Map [block = (Address >> MEMMAP_SHIFT) & MEMMAP_MASK]; @@ -421,4 +416,3 @@ static INLINE void S9xSetPCBase(uint32_t Address) CPU.PC = CPU.PCBase + (Address & 0xffff); } -#endif diff --git a/source/memmap.c b/source/memmap.c index cfdc997..209b6cd 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -3044,5 +3044,3 @@ void ParseSNESHeader(uint8_t* RomHeader) else sprintf(Memory.CompanyId, "%02X", RomHeader[0x2A]); } - -#include "getset.h" diff --git a/source/ppu.h b/source/ppu.h index e04c4ad..447f7f1 100644 --- a/source/ppu.h +++ b/source/ppu.h @@ -2,6 +2,8 @@ #define _PPU_H_ #include "../copyright" +#include <stdint.h> +#include <boolean.h> #include <retro_inline.h> #define FIRST_VISIBLE_LINE 1 |