Linux compatibility changes.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-01-06 22:18:02 +00:00
parent 2482a7b742
commit 08d742e336
4 changed files with 10 additions and 3 deletions

View File

@ -1,8 +1,8 @@
LIB = libim6502.a
LIB = libm6502.a
CXXFLAGS = -I ../inc -I ../../inc
CXXFILES = Disassembler.cpp Profiler.cpp Symbols.cpp mos6502.cpp
CXXFILES = Disassembly.cpp Profiler.cpp Symbols.cpp mos6502.cpp
include ../../compile.mk
include ../../lib_build.mk

View File

@ -1,4 +1,6 @@
#ifdef _MSC_VER
#pragma once
#endif
#include <cstdint>
#include <functional>

View File

@ -116,7 +116,9 @@ void Board::Memory_ReadingByte_Input(const uint16_t address) {
void Board::Memory_WrittenByte_Output(const uint16_t address) {
if (address == m_configuration.getOutputAddress()) {
#ifdef _MSC_VER
_putch(DATA());
#endif
}
}
@ -128,6 +130,8 @@ void Board::Cpu_ExecutedInstruction_Poll(const EightBit::MOS6502& cpu) {
}
void Board::pollKeyboard() {
#ifdef _MSC_VER
if (_kbhit())
poke(m_configuration.getInputAddress(), _getch());
#endif
}

View File

@ -8,5 +8,6 @@
#include <assert.h>
// Windows!!
#ifdef _MSC_VER
#include <conio.h>
#endif