Skip to content

Commit

Permalink
breakasm refuck
Browse files Browse the repository at this point in the history
  • Loading branch information
ogamespec committed Sep 9, 2023
1 parent 7bc1dc4 commit 5620281
Show file tree
Hide file tree
Showing 19 changed files with 732 additions and 687 deletions.
4 changes: 2 additions & 2 deletions Breaknes/BreaksCore/CoreApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Breaknes::Board* board = nullptr;
extern "C"
{
#ifdef _WIN32
DLL_EXPORT int Assemble(char* str, uint8_t* buffer)
DLL_EXPORT int Assemble(char* str, char *source_name, uint8_t* buffer)
{
return assemble(str, buffer);
return assemble(str, source_name, buffer);
}
#endif

Expand Down
10 changes: 6 additions & 4 deletions Breaknes/BreaksCore/Scripts/VS2022/BreaksCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\Tools\Breakasm\ASM.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\ASMOPS.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asm.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmexpr.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmops.cpp" />
<ClCompile Include="..\..\AbstractBoard.cpp" />
<ClCompile Include="..\..\APUPlayerBoard.cpp" />
<ClCompile Include="..\..\APUPlayerBoardDebug.cpp" />
Expand All @@ -45,8 +46,9 @@
<ClCompile Include="..\..\SignalDefs.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\Tools\Breakasm\ASM.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\ASMOPS.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asm.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmexpr.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmops.h" />
<ClInclude Include="..\..\AbstractBoard.h" />
<ClInclude Include="..\..\APUPlayerBoard.h" />
<ClInclude Include="..\..\BoardFactory.h" />
Expand Down
33 changes: 21 additions & 12 deletions Breaknes/BreaksCore/Scripts/VS2022/BreaksCore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Breakasm">
<UniqueIdentifier>{e4e69843-2c65-42d3-843f-5b956f5045d1}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\dllmain.cpp">
Expand Down Expand Up @@ -45,12 +48,6 @@
<ClCompile Include="..\..\APUPlayerBoardDebug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Breaks6502\Breakasm\ASM.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Breaks6502\Breakasm\ASMOPS.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\PPUPlayerBoard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -72,6 +69,15 @@
<ClCompile Include="..\..\RegDumpEmitter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asm.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmexpr.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmops.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\FamicomBoard.h">
Expand All @@ -98,12 +104,6 @@
<ClInclude Include="..\..\APUPlayerBoard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Breaks6502\Breakasm\ASM.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Breaks6502\Breakasm\ASMOPS.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\PPUPlayerBoard.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand All @@ -119,6 +119,15 @@
<ClInclude Include="..\..\RegDumpEmitter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asm.h">
<Filter>Breakasm</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmexpr.h">
<Filter>Breakasm</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmops.h">
<Filter>Breakasm</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Readme.md" />
Expand Down
10 changes: 6 additions & 4 deletions Breaknes/BreaksCore/Scripts/VS2022/BreaksCoreStatic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\Tools\Breakasm\ASM.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\ASMOPS.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asm.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmexpr.cpp" />
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmops.cpp" />
<ClCompile Include="..\..\AbstractBoard.cpp" />
<ClCompile Include="..\..\APUPlayerBoard.cpp" />
<ClCompile Include="..\..\APUPlayerBoardDebug.cpp" />
Expand All @@ -44,8 +45,9 @@
<ClCompile Include="..\..\SignalDefs.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\Tools\Breakasm\ASM.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\ASMOPS.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asm.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmexpr.h" />
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmops.h" />
<ClInclude Include="..\..\AbstractBoard.h" />
<ClInclude Include="..\..\APUPlayerBoard.h" />
<ClInclude Include="..\..\BoardFactory.h" />
Expand Down
33 changes: 21 additions & 12 deletions Breaknes/BreaksCore/Scripts/VS2022/BreaksCoreStatic.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Breakasm">
<UniqueIdentifier>{f0945310-014f-439c-b125-26ed5dac2f8e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\FamicomBoard.cpp">
Expand Down Expand Up @@ -42,12 +45,6 @@
<ClCompile Include="..\..\APUPlayerBoardDebug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Breaks6502\Breakasm\ASM.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Breaks6502\Breakasm\ASMOPS.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\PPUPlayerBoard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -69,6 +66,15 @@
<ClCompile Include="..\..\RegDumpEmitter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asm.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmexpr.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\Tools\Breakasm\asmops.cpp">
<Filter>Breakasm</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\FamicomBoard.h">
Expand All @@ -95,12 +101,6 @@
<ClInclude Include="..\..\APUPlayerBoard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Breaks6502\Breakasm\ASM.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Breaks6502\Breakasm\ASMOPS.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\PPUPlayerBoard.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand All @@ -116,6 +116,15 @@
<ClInclude Include="..\..\RegDumpEmitter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asm.h">
<Filter>Breakasm</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmexpr.h">
<Filter>Breakasm</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\Tools\Breakasm\asmops.h">
<Filter>Breakasm</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Readme.md" />
Expand Down
5 changes: 3 additions & 2 deletions Breaknes/BreaksCore/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
#include <Windows.h>
#endif

#include "../../Tools/Breakasm/ASM.h"
#include "../../Tools/Breakasm/ASMOPS.h"
#include "../../Tools/Breakasm/asm.h"
#include "../../Tools/Breakasm/asmops.h"
#include "../../Tools/Breakasm/asmexpr.h"

// Very basic

Expand Down
5 changes: 2 additions & 3 deletions Common/SharpTools/BreaksCoreInterop.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using static SharpTools.CoreDebug;

namespace SharpTools
{
public class BreaksCore
{
[DllImport("BreaksCore.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int Assemble(string text, byte[] buffer);
public static extern int Assemble(string text, string source_name, byte[] buffer);

[DllImport("BreaksCore.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void CreateBoard(string boardName, string apu, string ppu, string p1);
Expand Down
5 changes: 3 additions & 2 deletions Tools/Breakasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(CMAKE_BUILD_TYPE Release)

add_executable (breakasm
main.cpp
ASM.cpp
ASMOPS.cpp
asm.cpp
asmops.cpp
asmexpr.cpp
)
13 changes: 9 additions & 4 deletions Tools/Breakasm/Scripts/VS2022/Breakasm.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,25 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\ASM.cpp" />
<ClCompile Include="..\..\ASMOPS.cpp" />
<ClCompile Include="..\..\asm.cpp" />
<ClCompile Include="..\..\asmexpr.cpp" />
<ClCompile Include="..\..\asmops.cpp" />
<ClCompile Include="..\..\main.cpp" />
<ClCompile Include="..\..\pch.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\ASM.h" />
<ClInclude Include="..\..\ASMOPS.h" />
<ClInclude Include="..\..\asm.h" />
<ClInclude Include="..\..\asmexpr.h" />
<ClInclude Include="..\..\asmops.h" />
<ClInclude Include="..\..\pch.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\Readme.md" />
<None Include="..\..\ReadmeRus.md" />
</ItemGroup>
<ItemGroup>
<Text Include="..\..\CMakeLists.txt" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
Expand Down
23 changes: 16 additions & 7 deletions Tools/Breakasm/Scripts/VS2022/Breakasm.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,41 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\ASM.cpp">
<ClCompile Include="..\..\pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\ASMOPS.cpp">
<ClCompile Include="..\..\main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\pch.cpp">
<ClCompile Include="..\..\asm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\main.cpp">
<ClCompile Include="..\..\asmops.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\asmexpr.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\ASM.h">
<ClInclude Include="..\..\pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\pch.h">
<ClInclude Include="..\..\asm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\asmops.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\ASMOPS.h">
<ClInclude Include="..\..\asmexpr.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Readme.md" />
<None Include="..\..\ReadmeRus.md" />
</ItemGroup>
<ItemGroup>
<Text Include="..\..\CMakeLists.txt" />
</ItemGroup>
</Project>
Loading

0 comments on commit 5620281

Please sign in to comment.