English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 20 August 2021, 16:07   #101
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 387
If VSCodium allows you to install extensions then you can download the latest installer from GitHub.
Jobbo is online now  
Old 20 August 2021, 16:29   #102
BomberMillz
Registered User
 
Join Date: Mar 2019
Location: Nu Forest UK
Posts: 31
Worked it out now. Thanks!

Last edited by BomberMillz; 20 August 2021 at 16:44.
BomberMillz is offline  
Old 20 December 2021, 23:03   #103
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Update : found the issue it was the Ransomware protection of Windows that prevented the extension to access the foled. I had to switch off the Controlled folder access.

@Bartman,
I tried your extension today and got the following error when hitting F5 to compile.
Any ideas what went wrong?
thx



VSCode is 1.63.2 under Windows 11 21H2

Compiling main.c
Compiling support/gcc8_c_support.c
Assembling support/gcc8_a_support.s
The system cannot find the file specified.
gnumake: *** [Makefile:51: obj/main.o] Error 1
gnumake: *** Waiting for unfinished jobs....
The system cannot find the file specified.
gnumake: *** [Makefile:51: obj/gcc8_c_support.o] Error 1
Assembler messages:
Fatal error: can't create obj/gcc8_a_support.o: No such file or directory
gnumake: *** [Makefile:57: obj/gcc8_a_support.o] Error 1
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command c:\Users\kamelito\.vscode\extensions\bartmanabyss.amiga-debug-1.3.2\bin\gnumake.exe -j4" terminated with exit code: 1.
kamelito is offline  
Old 04 April 2022, 13:38   #104
MihaMarkic
Registered User
 
Join Date: Apr 2022
Location: Nova Gorica/Slovenia
Posts: 1
Hi guys,

I think you should add '${env:PATH};' to compile task in .vscode/tasks.json, like:

Code:
"env": {
 "PATH": "${env:PATH};${command:amiga.bin-path}\\opt\\bin;${command:amiga.bin-path}"
}
I've also created a PR for the project: https://github.com/BartmanAbyss/vsco...-debug/pull/95
MihaMarkic is offline  
Old 06 November 2022, 17:49   #105
emiespo
Registered User
 
Join Date: Jul 2017
Location: Oxford
Posts: 103
Hi guys!
I just discovered that this fabulous extension has been ported to Linux and MacOs, I wonder if anyone is using it on such systems.

I tried the base project and I can see FsUAE starting, but nothing else seems to work (most notably debugging and compiling again).

Am I missing anything? I can see these errors in the output window:

Code:
Reading symbols from /Users/ee/Desktop/Amy/out/a.elf...

warning: 
Section .debug_aranges in /Users/ee/Desktop/Amy/out/a.elf entry at offset 112 has unsupported version 3, ignoring .debug_aranges.
Remote debugging using localhost:2345
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=512;BreakpointCommands+;swbreak+;hwbreak+;QStartNoAckMode+;vContSupported+;
Symbols from "/Users/ee/Desktop/Amy/out/a.elf".
Local exec file:
	`/Users/ee/Desktop/Amy/out/a.elf', file type elf32-m68k.
	Entry point: 0x0
	0x00000000 - 0x00001830 is .text
	0x00001830 - 0x000033fa is .rodata
	0x000033fa - 0x0000347a is .MEMF_CHIP
	0x00004000 - 0x00004000 is .data
	0x00004000 - 0x00012b7d is .INCBIN.MEMF_CHIP
	0x00012b80 - 0x00012ba8 is .bss
Edit: just found it has been updated today, will continue on the apposite thread: https://eab.abime.net/showthread.php?t=112267 (it seems FSUae won't find the SDL libraries now).

Last edited by emiespo; 06 November 2022 at 19:57.
emiespo is offline  
Old 20 February 2023, 08:23   #106
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Hi!
I use this extension for few small private projects for last couple of weeks and it's great.
One question I have today is: How can I change the config of FS-UAE that is used to start/test the code?
I use Mac version of and I looked into .vscode/extensions but couldn't find fs.uae config files. I want to develop for A4000 with 060 and 64Mb of FastRAM and I wanted to make these changes to fs-uae config file.
TIA. Any suggestions appreciated.
carrion is offline  
Old 20 February 2023, 16:15   #107
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
I think you should be able to set the "config" field in `.vscode/launch.json`.
These are the ones natively supported by the extension:
- a1200-fast: 68020, 2MB Chip 4MB FAST
- a1200-030: 68030, 2MB Chip 32MB FAST, Blizzard 1230-IV
- a500

alternatively, set a value supported by FS-UAE for `amiga_model`. See here: https://fs-uae.net/docs/options/amiga-model.

natively, we currently only support max 8mb fast mem (except that a1200-030 config mentioned above).

Here's the code regarding the config file: https://github.com/BartmanAbyss/vsco...aDebug.ts#L371

For any other options, use the "emuargs" field.

Last edited by Bartman; 20 February 2023 at 16:16. Reason: added "emuargs"
Bartman is offline  
Old 20 February 2023, 22:04   #108
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Hi @Bartman
Thanks for reply.
Looks like a4000 config that is build in has 040 CPU already. I just added 8Megs via "fastmem" option and that works for now.
I'm not sure how to use emuargs though. Should all fs-uae commandline options work there? I cant force it to use RAM than 8MB
carrion is offline  
Old 21 February 2023, 12:39   #109
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
I guess all FS-UAE command-line params should work.
Bartman is offline  
Old 24 February 2023, 09:25   #110
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
OK I cant pass the arguments for the built in FS_UAE but I kind of solved by using external FS_UAE for now....
btw: Is it possible that built in FS_UAE uses default .fs-uae config file that I have in my Documents/FS_UAE directory?

I have another thing though that I want to understand. Do I understand correctly that only the elf file has all the debug and symbols information and after doing elf2hgunk all that is gone? TIA
carrion is offline  
Old 24 February 2023, 10:33   #111
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
Yes, your understanding about the elf file is correct. However if you omit the '-s' parameter for 'elf2hunk' symbol information will not be stripped from hunk exe.
Bartman is offline  
Old 24 February 2023, 15:08   #112
gigabates
Registered User
 
Join Date: Jan 2021
Location: Watford, UK
Posts: 57
@carrion Yes it does use the default config if you have one. I'm thinking probably it shouldn't. However you should still be able to override options with emuargs as this takes priority.

You say you can't pass any arguments. Can you share your launch config? This should contain an array of string arguments, the same as if you were starting fs-uae from the command line. e.g.
Code:
"emuargs": ["--floppy_drive_0_sounds=off", "--fast_memory=16384"]
If you're already setting the 'fastmem' option this might conflict, so remove that if you want to set it via 'emuargs'.
gigabates is offline  
Old 27 February 2023, 18:53   #113
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
@Bartman, @gigabates
Thanks for reply. Helps a lot to understnad how it all works.
And forgive me another question, this time probably more generic and GCC related but anyway...
I understand that standard lib is not used. But what happens if I start using math lib (floating points, and lets say sinuses/cos). Is it going to use Amiga math libs or maybe FPU in 040/060 because of -m68040.
I think I could (and will do) try myself anyway but It's always good to ask to experts
TIA
carrion is offline  
Old 02 March 2023, 12:57   #114
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
You'd have to try that. I guess if you set the CPU to 68040 with GCC it will just use the FPU instructions. Sometimes you have to convince compilers to just use the FPU instructions and not stuff from the standard library (they use it by default for IEEE compliance). In the worst case scenario you have to write your own sin/cos functions that use just inline assembly to call the FPU instructions directly.
Bartman is offline  
Old 09 March 2023, 17:52   #115
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
ok I've made some tests
setting 040 like -m68040 isn't enough for FPU to be used. what I had to do was:
-m68060 -mhard-float then it generates FPU asm code. Nice!
but I wasnt able to do sin/cos stuff as there's no stdlib math.h that I can use so I guess it may seam that no chance to use sin/cos C function that will be compiled into FPU sin/cos instructions.

I think there might be some trickery to do a macro #define or something like the INCBIN case, but it's above me ... yet
Oh and btw: Thanks again for the amazing job with this extension. I work on a small private project and it makes me smile many times when I use it
carrion is offline  
Old 10 March 2023, 12:41   #116
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
With gcc you either have to specify `-m68881` or `-mhard-float` to enable the FPU instructions plus the option `-ffast-math`.

This should result into picking up the header `math-68881.h` and the use of the inline macros.

But with a mc68040 or a mc68060 you don't want that for sin,cos,... and some more insns, since these aren't supported directly. Thus these fpu insn will raise an exeception which uses emulation code for these instructions. The exception handling alone wastes lot of time. Better call the math_ieee libs instead (or use a gcc version which does that for you) or call your own functions.
bebbo is offline  
Old 11 March 2023, 19:10   #117
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
@bebbo
thanks for explanation.
actually I've read during this week that 040 and 060 do not fully support 68881/882 FPU features like sin/cos which, to be honest, I didn't believe at first but your post makes me believe now
I guess I (we?) learn every day. right?

I can live without sinuses in the FPU but more questions arise...
What I'm coding at the moment is working fine with fixed point math (shifting back and forth for fixed precisions). So, can I expect any performance increase when using floats with FPU? Does it actually makes sense for a simple muls and divs?
I guess these questions are out of this thread subject so sorry for asking here but maybe you can somehow guide me. TIA
carrion is offline  
Old 11 March 2023, 20:06   #118
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Quote:
Originally Posted by carrion View Post
@bebbo
I can live without sinuses in the FPU but more questions arise...
What I'm coding at the moment is working fine with fixed point math (shifting back and forth for fixed precisions). So, can I expect any performance increase when using floats with FPU? Does it actually makes sense for a simple muls and divs?
I guess these questions are out of this thread subject so sorry for asking here but maybe you can somehow guide me. TIA

Depends on what you're doing and the required precision. You should be aware that the 060 doesn't support 64-bit integer multiplies (32x32 -> 64)/divisions(64/32 -> 32) in hardware, so those operations should be avoided (or changed to use the FPU) if possible. In practice this means that 16.16 fixpoint is not that attractive on 060 unless you're only adding/subtracting.


Probably better to start a new thread if you have further questions regarding optimizations. (As always measurement is king, but WinUAE is far from perfect for 060 in this regard).
paraj is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:55.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10163 seconds with 14 queries