From 08d742e336d99b716936b367d285ff6122839426 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sat, 6 Jan 2018 22:18:02 +0000 Subject: [PATCH] Linux compatibility changes. Signed-off-by: Adrian Conlon --- M6502/src/Makefile | 4 ++-- M6502/src/stdafx.h | 2 ++ M6502/test/Board.cpp | 4 ++++ M6502/test/stdafx.h | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/M6502/src/Makefile b/M6502/src/Makefile index 68b2668..11b36f0 100644 --- a/M6502/src/Makefile +++ b/M6502/src/Makefile @@ -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 diff --git a/M6502/src/stdafx.h b/M6502/src/stdafx.h index 9b131a4..8101ea0 100644 --- a/M6502/src/stdafx.h +++ b/M6502/src/stdafx.h @@ -1,4 +1,6 @@ +#ifdef _MSC_VER #pragma once +#endif #include #include diff --git a/M6502/test/Board.cpp b/M6502/test/Board.cpp index 6455339..d396977 100644 --- a/M6502/test/Board.cpp +++ b/M6502/test/Board.cpp @@ -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 } \ No newline at end of file diff --git a/M6502/test/stdafx.h b/M6502/test/stdafx.h index 2fcbda5..21e169a 100644 --- a/M6502/test/stdafx.h +++ b/M6502/test/stdafx.h @@ -8,5 +8,6 @@ #include -// Windows!! +#ifdef _MSC_VER #include +#endif \ No newline at end of file