Skip to content

Commit

Permalink
1.4.9
Browse files Browse the repository at this point in the history
- NEW: fixed template project's `TakeSystem`/`FreeSystem` to be compatible with AROS
- NEW: Use AROS if no Kickstart ROM is configured
- CHG: update AROS ROM in WinUAE
  • Loading branch information
BartmanAbyss committed Aug 1, 2022
1 parent 1df4cbf commit c13b310
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

## 1.4.9
- NEW: fixed template project's `TakeSystem`/`FreeSystem` to be compatible with AROS
- NEW: Use AROS if no Kickstart ROM is configured
- CHG: update AROS ROM in WinUAE

## 1.4.8
- FIX: fix 2 seconds delay when starting WinUAE
- NEW: new debug functions `debug_load`, `debug_save` in `gcc8_c_support.h`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here's a video showing off all the new features of v1.1, including the frame pro
0. Install the extension from the Visual Studio Code Marketplace
1. Create a new empty project folder with `File > Open Folder...`
2. From the command palette <kbd>Ctrl+Shift+P</kbd> select `Amiga: Init Project`
3. Open `.vscode/launch.json` and point `"kickstart"` to your *Kickstart 1.3* ROM
3. (optional, but recommended) Open `.vscode/launch.json` and point `"kickstart"` to your *Kickstart 1.3* ROM
3. Hit <kbd>F5</kbd> to build and run a minimal sample project
4. If you prefer C++ instead of C, just rename `main.c` to `main.cpp`

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.4.8",
"version": "1.4.9",
"license": "GPL-3.0-or-later",
"engines": {
"vscode": "^1.46.0"
Expand Down
6 changes: 5 additions & 1 deletion src/amigaDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ export class AmigaDebugSession extends LoggingDebugSession {
return;
}
config.set('kickstart_rom_file', args.kickstart);
} else {
config.delete('kickstart_rom_file');
}

if(args.cpuboard !== undefined) {
Expand All @@ -233,6 +235,8 @@ export class AmigaDebugSession extends LoggingDebugSession {
return;
}
config.set('cpuboard_rom_file', args.cpuboard);
} else {
config.delete('cpuboard_rom_file');
}

// nice
Expand Down Expand Up @@ -1494,7 +1498,7 @@ export class AmigaDebugSession extends LoggingDebugSession {
const rv = node.resultRecords.results[0][1];
const pc = parseInt(rv[0][1][1]);
//const sr = parseInt(rv[1][1][1]);
if(pc >= 0xF80000) {
if(pc >= 0xF8_0000) {
// in Kickstart
await this.miDebugger.sendCommand("break-insert -t *0xffffffff");
await this.miDebugger.sendCommand("exec-continue");
Expand Down
9 changes: 9 additions & 0 deletions template/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "amiga",
"request": "launch",
"preLaunchTask": "compile",
"name": "AROS",
"config": "A500",
"program": "${workspaceFolder}/a.mingw",
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "amiga",
"request": "launch",
Expand Down
40 changes: 23 additions & 17 deletions template/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,33 @@ inline void WaitBlt() {
}

void TakeSystem() {
Forbid();
//Save current interrupts and DMA settings so we can restore them upon exit.
SystemADKCON=custom->adkconr;
SystemInts=custom->intenar;
SystemDMA=custom->dmaconr;
ActiView=GfxBase->ActiView; //store current view

LoadView(0);
WaitTOF();
WaitTOF();

WaitVbl();
WaitVbl();

OwnBlitter();
WaitBlit();
Disable();

//Save current interrupts and DMA settings so we can restore them upon exit.
SystemADKCON=custom->adkconr;
SystemInts=custom->intenar;
SystemDMA=custom->dmaconr;
custom->intena=0x7fff;//disable all interrupts
custom->intreq=0x7fff;//Clear any interrupts that were pending

WaitVbl();
WaitVbl();
custom->dmacon=0x7fff;//Clear all DMA channels

//set all colors black
for(int a=0;a<32;a++)
custom->color[a]=0;

LoadView(0);
WaitTOF();
WaitTOF();

WaitVbl();
WaitVbl();

Expand Down Expand Up @@ -130,16 +133,19 @@ void FreeSystem() {
custom->dmacon=SystemDMA|0x8000;
custom->adkcon=SystemADKCON|0x8000;

LoadView(ActiView);
WaitTOF();
WaitTOF();
WaitBlit();
DisownBlitter();
Enable();

LoadView(ActiView);
WaitTOF();
WaitTOF();

Permit();
}

inline short MouseLeft(){return !((*(volatile UBYTE*)0xbfe001)&64);}
inline short MouseRight(){return !((*(volatile UWORD*)0xdff016)&(1<<10));}
__attribute__((always_inline)) inline short MouseLeft(){return !((*(volatile UBYTE*)0xbfe001)&64);}
__attribute__((always_inline)) inline short MouseRight(){return !((*(volatile UWORD*)0xdff016)&(1<<10));}

// DEMO - INCBIN
volatile short frameCounter = 0;
Expand Down Expand Up @@ -229,7 +235,7 @@ void* doynaxdepack(const void* input, void* output) { // returns end of output d
}
#endif //MUSIC

inline USHORT* copSetPlanes(UBYTE bplPtrStart,USHORT* copListEnd,const UBYTE **planes,int numPlanes) {
__attribute__((always_inline)) inline USHORT* copSetPlanes(UBYTE bplPtrStart,USHORT* copListEnd,const UBYTE **planes,int numPlanes) {
for (USHORT i=0;i<numPlanes;i++) {
ULONG addr=(ULONG)planes[i];
*copListEnd++=offsetof(struct Custom, bplpt[0]) + (i + bplPtrStart) * sizeof(APTR);
Expand Down Expand Up @@ -327,7 +333,7 @@ static __attribute__((interrupt)) void interruptHandler() {
#endif

// set up a 320x256 lowres display
inline USHORT* screenScanDefault(USHORT* copListEnd) {
__attribute__((always_inline)) inline USHORT* screenScanDefault(USHORT* copListEnd) {
const USHORT x=129;
const USHORT width=320;
const USHORT height=256;
Expand Down

0 comments on commit c13b310

Please sign in to comment.