One-stop Visual Studio Code Extention to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 13.2 with the bundled WinUAE/FS-UAE and GDB.
This fully self-contained extension will help you to quickly develop demos, intros, games, etc. for the Amiga 500, 1200, 4000. It supports C and C++, however no standard library is available. It comes with advanced productivity features like debug overlay, frame profiler, graphics debugger and size profiler.
Here's a video showing off all the new features of v1.1, including the frame profiler and graphics debugger: https://www.youtube.com/watch?v=gQ4tKisnr7Y
C/C++
extension from the Extensions
tab under Recommended
File > Open Folder...
Amiga: Init Project
Extensions
> Amiga C/C++ Compile, Debug & Profile
point Rom-paths: A500
to your Kickstart 1.3 ROM.vscode/launch.json
and point "kickstart"
to your Kickstart 1.3 ROMmain.c
to main.cpp
INCBIN
, INCBIN_CHIP
supportdh1:
, allowing for reading and writing files.Amiga: View Memory
, Amiga: Set Force Disassembly
, Amiga: View Disassembly (Function)
are available from the command palette Ctrl+Shift+PAmiga: Open Terminal
to open a shell with the environment set to use the included tools like elf2hunk
, gcc
, gnumake
etc. (e.g. gnumake clean
)Profile
button on the right of the debug toolbar, and 1 frame will be profiled. Press the rightmost button to profile 50 frames. Mark your WaitVBLs etc with calls to debug_start_idle()
and debug_stop_idle()
to show correct CPU usage under thumbnails.Amiga: Profile File Size
Amiga: Clean Temp Files
Configurations
tab, select default
, and hit Save
Open Gradient Master
: opens the Deadliner's The Amiga Gradient Master tool to assist you creating color gradients for Copperlists).Open Image Tool
opens the Deadliner's Image Tool to assist you converting images to different Amiga formats.Open Color Reducer
opens the Deadliner's Color Reducer tool to assist you reducing the number of colors in images in a smart manner.Open BLTCON Cheat Sheet
: opens the Deadliner's BLTCON Cheat Sheet tool that helps you designing Blitter operations.Open Amiga Hardware Reference Manual
: opens the Amiga Hardware Reference Manual TOC hosted at amigadev.elowar.com."config"
in .vscode/launch.json
:
"A500"
: KS 1.3, ECS Agnus, 0.5MB Chip + 0.5MB Slow; needs Kickstart 1.3 ROM in "kickstart"
"A1200"
: 68020, 2MB Chip; needs Kickstart 3.1 ROM in "kickstart"
"A1200-FAST"
: A1200 with 4MB fast memory"A1200-030"
: A1200 with Blizzard 1230-IV and 32MB board memory. Requires the absolute path to the Blizzard ROM in "cpuboard"
."A3000"
: A3000 (no profiler support); needs Kickstart 2.0 ROM in "kickstart"
"A4000"
: 68030, 68882, 2MB Chip, 8MB FAST; needs Kickstart 3.1 ROM in "kickstart"
"chipmem"
: allowed values: "256k", "512k", "1m", "1.5m" or "2m""fastmem"
: allowed values: "0", "64k", "128k", "256k", "512k", "1m", "2m", "4m", "8m""slowmem"
: allowed values: "0", "512k", "1m", "1.8m"Demos/Intros
Games
Tools
blitter_minterm.c
is based on mini-qmc by Stefan Moebius.68k-dis.ts
is based on binutils-gdb/include/opcode/m68k.h, Copyright (C) 1989-2021 Free Software Foundation, Inc. GPLv3This extension contains binaries of:
cd
, EndCLI
, run
from Workbench 1.3gcc
tries to use a (slow) 32-bit multiply. So if you have performance-critical multiplications, consider using the muluw
and mulsw
functions from gcc8_c_support.h
For development, just install the latest node.js LTS, create a new directory, clone the repository git clone https://github.com/BartmanAbyss/vscode-amiga-debug.git
, then install the dependencies with npm install
. To build, open the directory in VS Code and hit F5
. You can then test the extension without building a .vsix
.
To build a .vsix
, npm install -g vsce
(once), and then vsce package
.
For better testing, install the Mocha Test Explorer extension. The tests should then show up in your Testing
tab.
Here are the command-lines used to compile the external tools (We're building with MinGW on WSL on Windows 10/11 to c:\amiga-mingw\opt
).
Replace the 16
in make -j16
with your number of CPU cores
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
wsl --install -d ubuntu
sudo apt install build-essential flex bison expect dejagnu texinfo mingw-w64
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
# statically link pthread (for GDB) - see https://stackoverflow.com/a/72903594
sudo mv /usr/x86_64-w64-mingw32/lib/libwinpthread.dll.a /usr/x86_64-w64-mingw32/lib/libwinpthread.dll.a.bak
sudo mv /usr/x86_64-w64-mingw32/lib/libpthread.dll.a /usr/x86_64-w64-mingw32/lib/libpthread.dll.a.bak
git clone https://github.com/BartmanAbyss/binutils-gdb.git
cd binutils-gdb
bash ./contrib/download_prerequisites
cd ..
mkdir build-binutils-gdb
cd build-binutils-gdb
LDFLAGS="-static -static-libgcc -static-libstdc++" ../binutils-gdb/configure --prefix=/mnt/c/amiga-mingw/opt --target=m68k-amiga-elf --disable-werror -enable-static --disable-shared --disable-interprocess-agent --disable-libcc --host=x86_64-w64-mingw32
make -j16
make install
wget https://ftp.gwdg.de/pub/misc/gcc/releases/gcc-13.2.0/gcc-13.2.0.tar.xz
tar -xf gcc-13.2.0.tar.xz
cd gcc-13.2.0
patch -p1 < ../gcc-barto.patch
bash ./contrib/download_prerequisites
cd ..
mkdir -p build-gcc-13.2.0
cd build-gcc-13.2.0
LDFLAGS="-static -static-libgcc -static-libstdc++" ../gcc-13.2.0/configure \
--disable-clocale \
--disable-gcov \
--disable-libada \
--disable-libgomp \
--disable-libsanitizer \
--disable-libssp \
--disable-libvtv \
--disable-multilib \
--disable-threads \
--disable-nls \
--enable-languages=c,c++ \
--enable-lto \
--enable-static \
--prefix=/mnt/c/amiga-mingw/opt \
--target=m68k-amiga-elf \
--with-cpu=68000 \
--host=x86_64-w64-mingw32
make all-gcc -j16
# at this point, you're getting an error about not finding gcc-cross. This is okay.
sed 's/selftest # srcextra/# selftest srcextra/' gcc/Makefile >gcc/Makefile.tmp
mv gcc/Makefile.tmp gcc/Makefile
gcc/gcc-cross.exe -dumpspecs >gcc/specs
# continue the build
make all-gcc -j16
make install-gcc
https://github.com/BartmanAbyss/elf2hunk
rm -r /mnt/c/amiga-mingw/opt/include
rm -r /mnt/c/amiga-mingw/opt/share
find /mnt/c/amiga-mingw/opt -name *.exe | xargs strip
amigaDebug.ts
: set DEBUG
to TRUE
to enable GDB/execution tracesprofile_editor_provider.ts
: set DEBUG
to TRUE
to enable preact-devtools
git clone https://github.com/preactjs/preact-devtools.git
npm install
npm run build:inline
<copy dist/inline/* to preact-devtools>
npm install -g npm-check
npm-check -u
WinUAE builds with Visual Studio 2022.
diff -ruN gcc-13.2.0 gcc-13.2.0-barto > gcc-barto.patch
desertdream-dots.uss
: okinterference-stars.uss
: overdraw not correctgods.uss
: blitrects' height not correct due to planar layoutshadesbeat.uss
: not showing any bitplanes due to not setting them in copper. TODO: get bitplanes from custom registersbrianthelion-rotozoom.uss
: some blitrects missingrinkadinkredux-end.uss
: hover over small bits at the right, causes error with 0-sized canvasrinkadinkredux-rotozoom.uss
: no end detected for multiple blits (frame 2)Step Over
may not work in inlined functions (limitation of GDB)turrican2-level1.uss
, desertdream-dots.uss
: sprites 2 pixels too far left