VS64 - The C64 Development EnvironmentVS64 is an open-source extension for Visual Studio Code. The VS64 extension makes it easy to build, debug, inspect and run C64 assembly code from Visual Studio Code. It provides in-depth editing support for the ACME assembler syntax, an integrated project and build system and support for the Visual Studio Code task and launch system.
Features
Quick and Start (TL;DR)The quickest start is by opening the command palette and run the "VS64: Getting Started" command. If you want to do some manual steps or adjustments, these are the individual things to look at:
SetupACME Cross-AssemblerVS64 supports the ACME Cross-Assembler.
In case you did a manual or custom installation, please make sure you updated the VS64 settings with the correct ACME installation path. CC65 CompilerVS64 also supports the CC65 6502 C Compiler.
In case you did a manual or custom installation, please make sure you updated the VS64 settings with the correct CC65 installation and include paths. LLVM-MOS CompilerVS64 also supports the LLVM-MOS C/C++ Compiler.
Please make sure you updated the VS64 settings with the correct LLVM-MOS installation and include paths.
VICE EmulatorIn addition to the internal 6502 cpu emulator, VS64 also supports debugging using the VICE emulator.
In case you did a manual or custom installation, please make sure you updated the VS64 settings with the correct VICE executable.
Basic UsageThe VS64 extension provides a convienient editing, build and run environment. This is done by providing syntax highlighting, seamless integration to the task, build and launch system, an embedded 6502 CPU emulator for fast and precise evaluation of 6502 code and integration of the VICE C64 emulator for advanced system debugging. For further analysis, an integrated disassembler for C64 program files is provided. For details, please look at the provided example projects for ACME, CC65 or LLVM-MOS. Syntax HighlightingSupport for ACME assember syntax is provided. The recommended file extension is Project ConfigurationThe VS64 extension is mainly controlled and configured using a per-workspace project configuration file The basic structure of the file is like this:
A more extensive project file for CC65 could like like this:
A more extensive project file for CC65 could like like this:
Project name, also defines the name of the output program file
Project description, for information purposes.
Defines all used source files. The build system will keep track of changes of these files.
Can be used instead of 'sources' in simple projects. Defines the main source file which is compiled and used as the entry point for recursive dependency scanning.
Defines either a "release" or "debug" build. Debug builds are the default if not specified.
Optional project specific compiler defines. The project defines are added to the global defines as specified in the settings.
Optional project include paths for the compiler. The project specific include paths are added and overlay the global include paths specified in the settings.
Arguments to be added to the compiler command line arguments.
Overrides the path to the compiler executable. The default path is specified in the settings. IntelliSense SupportThe VS64 build system supports the IntelliSense editing features of Visual Studio Code. In order to provide project information to
the IntelliSense system, VS64 generates a Usually, vscode will ask you to automatically create all the settings for you after first
successful build. In case you want to do this manually, you have to change the settings or create
a Further information can be found here. Background CompilationWhenever a referenced source file or the project settings file is modified and saved, it is automatically compiled to a C64 (cbm) If compilation is successful, that program file can either be run/debugged with the embedded debugger based on a defined launch configuration (see Debugger Launch Configuration), or it can be loaded into a VICE emulator session to run an advanced debugging session. If compilation fails, the ACME outputs are shown in the problems view as well as in the output terminal view. DebuggingDebugging FeaturesThe VS64 extension comes with a built-in 6502 CPU emulator that allows very fast edit-build-run cycles. The limitation is important to understand: it is not a full C64 emulation. It executes 6502 machine code as fast as possible - and integrates nicely to the Visual Studio Code debugger interface. But it does not emulate any of the C64 custom chips (the VIC, SID, CIA, etc.). To still run C64 code similar to what would happen on a real C64, the bank switching and handling of ROM memory areas is supported. Also, basic startup behavior is supported in a way that actual C64 program files can be loaded and executed. As another option for debugging, a VICE emulator session can be launched or attached to perform advanced debugging steps in an acurate C64 system emulation. Supported debugging features:
Debugger Launch ConfigurationIn order to debug a compiled C64 program (
Can be either "6502" to run the integrated 6502 cpu emulator or "vice" to run a VICE emulator based debugging session.
Use "launch" here to run a new emulation session. In case "vice" is selected as debugger type, then a new VICE process is started.
Use "attach" to attach to a running VICE process. VICE needs to have the binary monitor interface enabled, or has to be started with the
Any name you want to use is fine.
The default build output path is ".cache" within the workspace root folder.
A 16-bit address in decimal or $hexadecimal form.
Optional task name, can be Debugger Watch ExpressionsThe debugger supports different kinds of watch expressions: registers, constant values and addresses. Here are a few examples for direct, symbolic and indirect watch expressions:
Preferences/Settings ReferenceTo setup the C64 development environment, go to Preferences>Settings to open the settings window. Build System Settings
Path to Acme installation. Example:
Path to Cc65 installation. Example:
Path to LLVM-MOS installation. Example:
Global build defines.
Global build include paths.
Global build command line options.
Enable auto build before running or debugging. Emulator Settings
Path to Vice emulator executable. Example:
Additional emulator command line options. Misc Settings
Set console output verbosity level (error, warn, info, debug, trace).
Enable the welcome page. This setting is automatically disabled after the welcome page has been shown. Open SourceThis package includes open source from other developers and I would like to thank all of those:
Links
|