System 3.x Extension for Visual Studio Code
This extension adds support for AliceSoft's System 3.x language.
Features
- Syntax highlighting for
.ADV
source files
- Documentation appears when you hover over a command name
- Go to Definition
for functions
- Decompiling and compiling (using the bundled xsys35c)
- Debugging (using xsystem35-sdl2)
Prerequisites
- To view command documentation, you'll need the
System 3.9 SDK.
- To use debugging features, you'll need xsystem35-sdl2 (version 2.0.0 or
higher).
Getting Started
After meeting the prerequisites, follow these steps to get started:
- Install this extension.
- Open a folder containing System 3.x game files (
*.ALD
).
- Open the command palette (Ctrl+Shift+P or
F1), and enter
system3x
. Select System3x: Decompile
from the
list that appears. Decompiled source files will be saved in the src
folder, and this extension will automatically open the first .ADV
file.
- If you want to use the debugger, you need xsystem35-sdl2.
- On Windows, copy
xsystem35.exe
to the same folder as the *.ALD
files.
- On other platforms, follow the installation instructions for
xsystem35-sdl2.
- Press F5 to start debugging.
Feature Details
Decompiling
The System3x: Decompile
command decompiles System 3.x game files (*.ALD
and
System39.ain
) located in the workspace folder. This command generates
decompiled source files in a src
subfolder.
Compiling
By default, the Start Debugging
command (F5) automatically
rebuilds the game using source files in the src
folder.
To build the game without running it, use the Run Build Task
command
(Ctrl+Shift+B) and choose xsys35c: build
.
Running
If a launch.json
file doesn't exist, pressing F5 will start
xsystem35 (the game engine) with default settings. But this works only when an
.ADV
file is open in the current tab.
To make F5 consistently functional, or to customize launch settings,
select Add Configuration
from the Run
menu. This will generate a
launch.json
file as follows:
{
"version": "0.2.0",
"configurations": [
{
"type": "xsystem35",
"request": "launch",
"name": "Debug",
"program": "${config:system3x.xsystem35Path}",
"runDir": "${workspaceFolder}",
"srcDir": "${workspaceFolder}/src",
"logLevel": 1,
"stopOnEntry": false,
"preLaunchTask": "xsys35c: build"
}
]
}
Mouse hovering over the attributes will display their descriptions.
For example, to launch the game without building it, comment out the
"preLaunchTask": "xsys35c: build"
line.
Debugging
Refer to the Debugging
documentation in VS Code to learn how to use the debugger.
The System 3.x debugger supports the following operations:
Extension Settings
To access your settings, open the Settings editor (Ctrl+,
or Cmd+,
) and
search for system3x
.