BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
314 stars 39 forks source link

Mask & Source channels are backwards in the template project when blitting the bob #89

Open davepoo opened 2 years ago

davepoo commented 2 years ago

The mask should be channel A and the source channel B for the blit of the bob, the template is doing the reverse. This doesn't cause any noticeable effect onscreen in the demo because the bob is being drawn over a cleared background, but this is confusing for anyone looking at the code. I've corrected the lines below in main.c, You can verify this is correct by looking at 6.4 in the Amiga Hardware Reference Manual.

custom->bltcon0 = 0xca | SRCA | SRCB | SRCC | DEST | ((x & 15) << ASHIFTSHIFT); // A = mask, B = source, C = background, D = destination
...
custom->bltapt = src + 32 / 8 * 1;
...
custom->bltbpt = src;