fixed gcc build errors
This commit is contained in:
parent
f2baa96968
commit
cabc0ae639
|
@ -5,12 +5,12 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
|
|
||||||
inline void Push(struct Bus* bus, Byte val)
|
static inline void Push(struct Bus* bus, Byte val)
|
||||||
{
|
{
|
||||||
writeBus(bus, 0x0100 + (bus->cpu->sp--), val);
|
writeBus(bus, 0x0100 + (bus->cpu->sp--), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Byte Pop(struct Bus* bus)
|
static inline Byte Pop(struct Bus* bus)
|
||||||
{
|
{
|
||||||
return readBus(bus, 0x0100 + (++bus->cpu->sp));
|
return readBus(bus, 0x0100 + (++bus->cpu->sp));
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct Opcode
|
||||||
const char str[4];
|
const char str[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct Opcode OPCODE_TABLE[256];
|
extern const struct Opcode OPCODE_TABLE[256];
|
||||||
|
|
||||||
|
|
||||||
struct CPU
|
struct CPU
|
||||||
|
@ -74,7 +74,7 @@ struct CPU
|
||||||
} pc;
|
} pc;
|
||||||
|
|
||||||
char remainingCycles;
|
char remainingCycles;
|
||||||
size_t totalCycles;
|
Qword totalCycles;
|
||||||
|
|
||||||
Byte fetchedVal;
|
Byte fetchedVal;
|
||||||
Word fetchedAddress;
|
Word fetchedAddress;
|
||||||
|
@ -100,4 +100,4 @@ void execute(struct CPU* cpu);
|
||||||
void IRQ(struct CPU* cpu);
|
void IRQ(struct CPU* cpu);
|
||||||
void NMI(struct CPU* cpu);
|
void NMI(struct CPU* cpu);
|
||||||
|
|
||||||
#endif // _CPU_H_
|
#endif // _CPU_H_
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
typedef uint8_t Byte;
|
typedef uint8_t Byte;
|
||||||
typedef uint16_t Word;
|
typedef uint16_t Word;
|
||||||
typedef uint32_t DWord;
|
typedef uint32_t DWord;
|
||||||
|
typedef uint64_t Qword;
|
||||||
|
|
||||||
#endif // _TYPES_H_
|
#endif // _TYPES_H_
|
||||||
|
|
Loading…
Reference in a new issue