04 November 2019, 14:20 | #61 | |
Registered User
Join Date: Dec 2016
Location: England
Posts: 87
|
Quote:
I'm at work, so can't check |
|
04 November 2019, 14:21 | #62 |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
And it looks like your diagnosis is correct:
Code:
((/* important */ volatile /* here */ UBYTE *)spr)[1]++; |
04 November 2019, 14:31 | #63 |
Registered User
Join Date: Dec 2016
Location: England
Posts: 87
|
|
04 November 2019, 19:40 | #64 |
Registered User
Join Date: Dec 2016
Location: England
Posts: 87
|
|
19 November 2019, 04:01 | #65 |
Registered User
Join Date: Dec 2018
Location: Seattle
Posts: 13
|
Please can you confirm if it works for c++?, I saw a comment before but It wasn't clear enough.
I am trying to find my environment to code on c++ but now I am missing a nice debugger and this could be a great solution. I have been using Bebbo's gdbserver, printf!!, tons of them XD. Thanks! Last edited by Tom_Goblins; 19 November 2019 at 18:04. |
02 December 2019, 15:25 | #66 |
Registered User
Join Date: Jul 2009
Location: UK
Posts: 112
|
I got the addon to work but could not figure out how to include standard C/C++ headers - I could not follow an Amiga C book nor a standard windows C book.
Amiga really hinders my programming experience. |
02 December 2019, 21:05 | #67 |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
That's not what it's for. It's not a full C++ environment with all those libraries. It's a cut down pure Amiga environment for demo / game creators.
|
09 December 2019, 21:54 | #68 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
I've recently found this rather useful extension. It works well, but I have run into a small problem.
Debugging only seems to work once. That is, I can debug to my hearts content, until I stop debugging. When I use the Stop Debugging command from VS Code (prior to the program itself ending), this does stop the debugger. But after that I can't get it to start again. I have to restart Visual Studio Code for it to work once more. Does anyone here know how to fix this? |
18 January 2020, 12:49 | #69 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
For debugging I'm building the object files like
Code:
/opt/amiga/bin/m68k-amigaos-c++ -fno-rtti -fno-exceptions -noixemul -O0 -g -Wl,--amiga-debug-hunk -ldebug -c -o file.o file.cpp Code:
/opt/amiga/bin/m68k-amigaos-c++ -fno-rtti -fno-exceptions -noixemul -O0 -g -Wl,--amiga-debug-hunk -ldebug -o Application *.o Is there something obviously wrong with my gcc/c++ options? |
08 May 2020, 14:31 | #70 |
Registered User
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
|
Update: new version 0.8.1 released, supports C++ now
Download Github |
08 May 2020, 14:48 | #71 | |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Quote:
|
|
08 May 2020, 14:58 | #72 |
WinUAE 4000/40, V4SA
Join Date: Apr 2020
Location: East of Oshawa
Posts: 538
|
@Bartman
Any chance you might get this added to the VS Marketplace? |
11 May 2020, 15:52 | #73 |
Registered User
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
|
Updated. New version 0.9.0 features GCC 10.1, binutils 2.34, GDB 9.1
Download GitHub should improve code performance a bit. |
11 May 2020, 16:17 | #74 | |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Quote:
|
|
12 May 2020, 01:58 | #75 |
WinUAE 4000/40, V4SA
Join Date: Apr 2020
Location: East of Oshawa
Posts: 538
|
|
12 May 2020, 17:33 | #76 |
Registered User
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
|
|
31 May 2020, 20:14 | #77 |
Registered User
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
|
Hey guys,
I just released version 1.0.0 on the Visual Studio Code Marketplace. This is probably the biggest update ever. excerpts from CHANGELOG for 1.0.0:
Here are some screenshots for ya. |
02 June 2020, 09:36 | #78 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
Thank you! I've been using it for a couple of weeks, from your github, and it's insanely cool. Thank you for sharing all your hard work.
|
18 June 2020, 17:58 | #79 |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Hi,
I've got an external assembler file with an exported function, e.g just takes d0 as input and moves to d1 then returns. Code:
xdef MyFunction MyFunction: move.l d0,d1 rts vasmm68k_mot.exe -m68000 -Felf How do I write a C header prototype that can call that function. Tried every example for gcc 6 and they all give errors. It's going to be something like void MyFunction(register const void* input __asm("d0")); But it doesn't like __asm. In the example project with the compiler there's a wrapper around p61 player. It looks like a custom version of p61 has been created and then a jump table has been implemented at the start. So then the C is : Code:
void p61Music() { volatile register const void* _a3 __asm("a3") = player; volatile register const void* _a6 __asm("a6") = (void*)0xdff000; __asm volatile ( "movem.l %%d0-%%d7/%%a0-%%a2/%%a4-%%a5,-(%%sp)\n" "jsr 4(%%a3)\n" "movem.l (%%sp)+,%%d0-%%d7/%%a0-%%a2/%%a4-%%a5" : "+rf"(_a3), "+rf"(_a6) : : "cc", "memory"); } Thanks, driving me nuts Edit: I got the jump table version working but would be nice to know if there's an alternative. Last edited by Antiriad_UK; 18 June 2020 at 20:36. |
19 June 2020, 08:38 | #80 | |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Quote:
Code:
void ClipAndFillPolygon2D(const UWORD n, const Point2D * polygon, const UWORD colour) { WaitForBlitter(); { register APTR * _a0 asm("a0") = display.backBufferBitplanes; register UWORD _d0 asm("d0") = n; register Point2D * _a1 asm("a1") = polygon; register UWORD _d1 asm("d1") = colour; asm volatile ( " jsr _scanlineFill" : // no outputs : "r" (_d0), "r" (_d1), "r" (_a0), "r" (_a1) // inputs : "memory" // changes memory ); } } Function prototypes with parameters mapped to registers is not supported, but you can map variables to registers, so you need to write a little bit of wrapper code like this. The supplied library code wrappers by bartman use macros for this and are probably also worth a look. The gcc assembly syntax is unpleasant, so you probably don't want to use it for much more than wrapping a function. The "cc", "memory"bit says that the assembly code will clobber the condition code register and memory, so disable any optimisations that depend on them. You can specify individual registers that get clobbered as well, which may allow for smarter optimisations. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga Assembly extension for Visual Studio Code | prb28 | Coders. Asm / Hardware | 342 | 15 December 2023 21:22 |
Visual Studio Code Blitz Basic extension | earok | Coders. Blitz Basic | 29 | 16 July 2019 17:59 |
very basic C/ASM/Visual Studio hand holding | Sephnroth | Coders. C/C++ | 2 | 08 March 2016 20:15 |
Profiling WinUAE with Visual Studio 2013 | mark_k | support.WinUAE | 3 | 14 January 2014 20:26 |
|
|