Skip to content

Commit

Permalink
1.2.2: fix multi-frame profile screenshots, alignment error
Browse files Browse the repository at this point in the history
  • Loading branch information
BartmanAbyss committed Oct 23, 2021
1 parent 9cee0b6 commit 0ceb128
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "amiga-debug" extension will be documented in this file.

## 1.2.2
- fix multi-frame profile screenshot thumbnails (broken since 1.2.1 for 32-bit machine models)
- fix multi-frame profile error message "Unable to start profiling: RangeError: start offset of Uint16Array should be a multiple of 2" (broken since 1.2.1)

## 1.2.1
- Updated to WinUAE 4.9.0 (2021.10.14)

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
**One-stop Visual Studio Code Extention to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 11.2 with the bundled WinUAE.**

## Overview
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 and size profiler.
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.

![Debugger](screen_debug.png)
![Frame Profiler](screen_profiler_frame.png)
![Size Profiler](screen_profiler_size.png)

## Video
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

## Quick-start
0. Install the extension from the Visual Studio Code Marketplace
1. Create a new empty project folder with `File > Open Folder...`
Expand Down Expand Up @@ -193,7 +196,7 @@ find /mnt/c/amiga-mingw/opt -name *.exe | xargs strip
## Known Issues/TODOs

### Documentation
* TODO: better documentation, videos for new features
* TODO: better documentation

### Profiler
* lines of functions seem to be off (see template/main.c: function main)
Expand All @@ -214,6 +217,7 @@ find /mnt/c/amiga-mingw/opt -name *.exe | xargs strip
* Terminal doesn't open again once closed

### WinUAE
* execution for A4000 model is very flaky (since 1.2.1)
* TODO: fill memory with $DEAD on startup to better find uninitialized memory bugs
* TODO: debugger: detect more exceptions in a better way (not just setting a single breakpoint at every exception vector)

Expand Down
Binary file modified bin/winuae-gdb.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repository": {
"url": "https://github.com/BartmanAbyss/vscode-amiga-debug"
},
"version": "1.2.1",
"version": "1.2.2",
"license": "GPL-3.0-or-later",
"engines": {
"vscode": "^1.46.0"
Expand Down
7 changes: 6 additions & 1 deletion src/backend/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ export class ProfileFile {
for (let i = 0; i < numFrames; i++) {
const frame = new ProfileFrame();
frame.dmacon = buffer.readUInt16LE(bufferOffset); bufferOffset += 2;
frame.customRegs = new Uint16Array(buffer.buffer, bufferOffset, 256); bufferOffset += 256 * 2;
//frame.customRegs = new Uint16Array(buffer.buffer, bufferOffset, 256); bufferOffset += 256 * 2;
// maybe unaligned, so read manually
frame.customRegs = new Uint16Array(256);
for (let i = 0; i < 256; i++) {
frame.customRegs[i] = buffer.readUInt16LE(bufferOffset); bufferOffset += 2;
}

// DMA
const dmaLen = buffer.readUInt32LE(bufferOffset); bufferOffset += 4;
Expand Down

0 comments on commit 0ceb128

Please sign in to comment.