diff --git a/HD6309Exec.c b/HD6309Exec.c index 31eaf522..3f155e85 100644 --- a/HD6309Exec.c +++ b/HD6309Exec.c @@ -2,7 +2,7 @@ #include "library/HD6309.h" #include "library/HD6309Macros.h" -#include "hd6309opcodes.h" +#include "library/HD6309OpCodes.h" int HD6309Exec(int cycleFor) { diff --git a/Vcc.vcxproj b/Vcc.vcxproj index 9ebaded2..fc0ee05a 100644 --- a/Vcc.vcxproj +++ b/Vcc.vcxproj @@ -171,7 +171,6 @@ - @@ -202,7 +201,6 @@ - diff --git a/hd6309opcodes.h b/hd6309opcodes.h deleted file mode 100644 index 7bd83f05..00000000 --- a/hd6309opcodes.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void HD6309ExecOpCode(int cycleFor, unsigned char opcode); \ No newline at end of file diff --git a/hd6309opcodes.c b/library/HD6309OpCodes.c similarity index 99% rename from hd6309opcodes.c rename to library/HD6309OpCodes.c index 83282d48..cd54beb8 100644 --- a/hd6309opcodes.c +++ b/library/HD6309OpCodes.c @@ -1,7 +1,7 @@ -#include "library/HD6309.h" -#include "library/MMU.h" +#include "HD6309.h" +#include "MMU.h" -#include "library/HD6309Macros.h" +#include "HD6309Macros.h" static HD6309State* hd63096State = GetHD6309State(); @@ -7063,12 +7063,14 @@ void(*JmpVec3[256])(void) = { }; //--Essentially Page_1() -void HD6309ExecOpCode(int cycleFor, unsigned char opcode) { - HD6309State* hd63096State = GetHD6309State(); +extern "C" { + __declspec(dllexport) void __cdecl HD6309ExecOpCode(int cycleFor, unsigned char opcode) { + HD6309State* hd63096State = GetHD6309State(); - hd63096State->gCycleFor = cycleFor; + hd63096State->gCycleFor = cycleFor; - JmpVec1[opcode](); // Execute instruction pointed to by PC_REG + JmpVec1[opcode](); // Execute instruction pointed to by PC_REG + } } void Page_2(void) //10 diff --git a/library/HD6309OpCodes.h b/library/HD6309OpCodes.h new file mode 100644 index 00000000..b2dc2661 --- /dev/null +++ b/library/HD6309OpCodes.h @@ -0,0 +1,3 @@ +#pragma once + +extern "C" __declspec(dllexport) void __cdecl HD6309ExecOpCode(int cycleFor, unsigned char opcode); diff --git a/library/library.vcxproj b/library/library.vcxproj index d4580781..0445e20c 100644 --- a/library/library.vcxproj +++ b/library/library.vcxproj @@ -187,6 +187,7 @@ + @@ -218,6 +219,7 @@ +