2019-12-31 22:26:47 +00:00
|
|
|
# 6502bench Source Code Notes #
|
|
|
|
|
|
|
|
All of the code is written in C# .NET, using the (free to download) Visual
|
2022-02-27 15:55:36 +00:00
|
|
|
Studio Community 2022 IDE as the primary development environment. The user
|
2022-05-22 19:48:41 +00:00
|
|
|
interface uses the WPF API, targeted at .NET Framework 4.6.2.
|
|
|
|
To build the sources, clone the git repository and open "WorkBench.sln"
|
|
|
|
in Visual Studio 2019 or later. The Solution file is called
|
|
|
|
"WorkBench.sln" rather than "6502bench.sln" because some things in
|
|
|
|
Visual Studio got weird when it didn't start with a letter.
|
|
|
|
|
|
|
|
When installing Visual Studio, be sure to include ".NET Desktop Development".
|
2022-02-27 15:55:36 +00:00
|
|
|
You may also need to install the .NET Framework 4.6.2 "Dev Pack" (as a
|
|
|
|
separate download, or via the "individual components" tab in the
|
|
|
|
Visual Studio Installer).
|
2019-12-31 22:26:47 +00:00
|
|
|
|
|
|
|
The code style is closer to what Android uses than "standard" C#. Lines
|
|
|
|
are folded to fit 100 columns.
|
|
|
|
|
|
|
|
|
|
|
|
## SourceGen Points of Interest ##
|
|
|
|
|
2020-01-02 02:04:06 +00:00
|
|
|
Places to start...
|
|
|
|
|
2019-12-31 22:26:47 +00:00
|
|
|
The main window UI is in WpfGui/MainWindow.xaml[.cs]. Much of the
|
|
|
|
implementation lives in MainController.cs.
|
|
|
|
|
|
|
|
The top-level object for the project data is DisasmProject.cs. The
|
|
|
|
Analyze() method drives the code and data analysis process. ApplyChanges()
|
|
|
|
is the heart of the undo/redo system.
|
|
|
|
|
|
|
|
Source code generation and assembler execution is routed through
|
|
|
|
AsmGen/AssemblerInfo.cs. If you want to add support for a new
|
|
|
|
cross-assembler, start by adding new entries to the enum and data
|
|
|
|
tables there.
|
2020-01-02 02:04:06 +00:00
|
|
|
|
2022-02-27 15:55:36 +00:00
|
|
|
Nothing specific to a target system is baked into the main application. The
|
|
|
|
SourceGen/RuntimeData directory has the system definitions used for the
|
|
|
|
"new project" list, along with subdirectories with symbol files and extension
|
2020-01-02 02:04:06 +00:00
|
|
|
scripts. The [README file there](SourceGen/RuntimeData/README.md)
|
|
|
|
explains a bit more.
|
2024-07-06 21:54:09 +00:00
|
|
|
|
|
|
|
## Publishing a New Release ##
|
|
|
|
|
|
|
|
Steps:
|
|
|
|
|
|
|
|
1. Run Debug > Source Generation Tests to verify that the code generation
|
|
|
|
tests pass. This requires that all cross-assemblers be installed and
|
|
|
|
configured.
|
|
|
|
2. Remove any existing `DIST_Release` directory from the top level.
|
|
|
|
3. In Visual Studio, change the build configuration to Release, and the startup project
|
|
|
|
to MakeDist.
|
|
|
|
4. Do a full clean build.
|
|
|
|
5. Hit F5 to start MakeDist. Click "Build" to generate a release build. The files will be
|
|
|
|
copied into `DIST_Release`.
|
|
|
|
6. Create an empty ZIP file (e.g. `6502bench123d1.zip`).
|
|
|
|
7. Copy all files from `DIST_Release` into it.
|
|
|
|
8. Submit all changes to git, push them to the server.
|
|
|
|
9. Create a new release on github. Drag the ZIP file into it.
|
|
|
|
10. Update/close any issues that have been addressed by the new release.
|
|
|
|
|
|
|
|
Version numbers should follow the semantic versioning scheme: v1.2.3, v1.2.3-dev1, etc.
|