English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 19 February 2023, 16:02   #321
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 187
An idea for the whole ramjam course in Amiga VSC: (the course was tested with ASMone)

1. make a new project and call the main file:

Open Amiga VSC and Shift+Ctrl+P or F1 and insert --> Amiga Assembly: Create example workspace
open or create a new projectfolder: e.g. asm-kurs
set a programname: e.g. Listings

2. then copy the course folders inside the project
now you have inside the folder asm-kurs the subfolders:
.vscode, build, include, Listings01, Listings02,...,Sources,uae and the mainfile: Listings.s

In Listings.s include the directory and file you want test:

;INCDIR "Listings15"
;INCLUDE "Listing15c3.s"

INCDIR "Listings08"
INCLUDE "Listing8r.s"

3. In Listings8r.s you have to change the path for: include "..\Sources\Startup1.S" and incbin "..\Sources\nice.fnt"
(yes and also the ANDI to AND)

4. In task.json I have also insert the "-nocase" option.
Rock'n Roll is offline  
Old 19 March 2023, 22:25   #322
ChuckR21
Registered User
 
Join Date: Mar 2023
Location: Glasgow
Posts: 3
Huge thanks for this fantastic VS-Code extension, and so happy that there is such an excellent an active Amiga community here.

I do, though, have what I hope is an easily solvable issue with using the FS-UAE option to run my code (and/or vasm to assemble) an old A1200 assembly program I've resurrected on my real A1200 and transferred to my PC. The program is a platform game, with the assembly code incbin'ing a few additional gfx and sfx files. On my real A1200 it still assembles (via AsmOne 1.3) and runs ok. It also assembles and runs in an A1200 I created in WinUAE (again via AsmOne 1.3).
When I transfer the source to VS-Code, adjust the incbin data directory as appropriate, it assembles without an error (green Build Success visible in Terminal tab) and successfully gets to the intro game screen (black screen with some static "Press to play" text). Pressing the PC keyboard right control key gets me to the first game screen. All of the static gfx is ok but some (not all) animated collectibles are wrong, and there are no sprites, no player. Animation is very slow.

Setting the VS-Code Output tab dropdown menu to Amiga Assembly, and rerunning, amongst the text I see the following...
AsmONE AUTO .b #Xexit,5(a1)
AsmONE AUTO 1 btst.b #Yexit,5(a1)

The original two lines in the code are...
btst.b #Xexit,5(a1)
and...
btst.b #Yexit,5(a1)

I'm not sure is something is being substituted here by vasm, or this has any bearing on the game not running correctly. I don't see anything else in this tab text suggesting there's an issue here.
I've also tried copying the vasm executable (in ...\uae\dh0) into the shared PC folder in my A1200 WinUAE build (into the same folder as the AsmOne assembler), then, in the working A1200 WinUAE build, double clicking on the executable. Unfortunately, the same thing happens here - I get to the intro text screen ok, and can get to the first game screen but it's corrupt, as before.
If I then copy the VS-Code source into the WinUAE 'PC' folder and assemble it via AsmOne in WinUAE (adjusting incbin directory), the runs the game ok, no corruption.

I'm thinking this is a vasm issue with my code.
I don't see any code optimise switch in AsmOne that I was using on the real A1200, and I wouldn't want this switched on since I was always looking for a direct 1:1 between assembly opcodes/operand and disassembled machine code (to help with learning the opcode variants, and debugging).

Of course, I can use the Amiga Assembly extension to continue working on the source then run it via my WinUAE install - this gives me almost the full use of the extension...infinitely better than the AsmOne I used to use However, if the fix is simple, it would be very convenient to assemble and run within VS-Code.

Last edited by ChuckR21; 19 March 2023 at 22:44.
ChuckR21 is offline  
Old 19 March 2023, 22:54   #323
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by ChuckR21 View Post
Setting the VS-Code Output tab dropdown menu to Amiga Assembly, and rerunning, amongst the text I see the following...
AsmONE AUTO .b #Xexit,5(a1)
AsmONE AUTO 1 btst.b #Yexit,5(a1)

The original two lines in the code are...
btst.b #Xexit,5(a1)
and...
btst.b #Yexit,5(a1)
There is maybe something wrong with the asmone auto command detection.
Please try to disable it: https://github.com/prb28/vscode-amig...-misc-settings
Do you have some extract of code that you can send me to test ?
prb28 is offline  
Old 20 March 2023, 17:13   #324
ChuckR21
Registered User
 
Join Date: Mar 2023
Location: Glasgow
Posts: 3
Thanks for your help here. In the Amiga Assembly settings, I've tried unticking the AsmOne compatibility to disable it and unfortunately the same issue persists.

I've created a public repository in github at https://github.com/Jock90/PlatformGame and placed all the files here (there's only on .asm file) to get the utility and demo game running in WinUAE (or a real Amiga 1200), and a readme file with hopefully enough detail to help reproduce what I'm seeing for Amiga Assembly.

Last edited by ChuckR21; 20 March 2023 at 17:24.
ChuckR21 is offline  
Old 22 March 2023, 18:03   #325
Tedward
Registered User
 
Join Date: Apr 2020
Location: Newbury
Posts: 7
I have just updated from v1.6 to v1.8.1 of amiga assembly and have a problem with projects containing several source files/modules.
When I debug the executable it shows the correct position in the source for the top module but when I single step through the code to a call to a lower level module the debugger displays an incorrect source line. On continuing the program runs normally.

Otherwise, still the best vscode extension though.
Tedward is offline  
Old 22 March 2023, 21:49   #326
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by ChuckR21 View Post
Thanks for your help here. In the Amiga Assembly settings, I've tried unticking the AsmOne compatibility to disable it and unfortunately the same issue persists.

I've created a public repository in github at https://github.com/Jock90/PlatformGame and placed all the files here (there's only on .asm file) to get the utility and demo game running in WinUAE (or a real Amiga 1200), and a readme file with hopefully enough detail to help reproduce what I'm seeing for Amiga Assembly.
Thanks, I've trying to make it work, I'll get back to you when I'll have something.
prb28 is offline  
Old 22 March 2023, 21:50   #327
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Tedward View Post
I have just updated from v1.6 to v1.8.1 of amiga assembly and have a problem.
Are these the same bugs ?

https://github.com/prb28/vscode-amig...bly/issues/259
https://github.com/prb28/vscode-amig...bly/issues/260
prb28 is offline  
Old 23 March 2023, 08:54   #328
Tedward
Registered User
 
Join Date: Apr 2020
Location: Newbury
Posts: 7
Yes. They describe the problem exactly. Thanks for the prompt response.
Tedward is offline  
Old 23 March 2023, 21:23   #329
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Tedward View Post
Yes. They describe the problem exactly. Thanks for the prompt response.
Fix released.
Thanks for the bug report.
prb28 is offline  
Old 23 March 2023, 21:28   #330
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by ChuckR21 View Post
I've created a public repository in github at https://github.com/Jock90/PlatformGame and placed all the files here (there's only on .asm file) to get the utility and demo game running in WinUAE (or a real Amiga 1200), and a readme file with hopefully enough detail to help reproduce what I'm seeing for Amiga Assembly.
Well, I've tried it and reproduce your problem.
I think it's something to do with the vasm build /options, I'm not an expert in vasm, maybe something in this forum can help you better.
prb28 is offline  
Old 23 March 2023, 23:00   #331
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
Quote:
Originally Posted by prb28 View Post
I think it's something to do with the vasm build /options
What options does the Amiga Assembly Extension use normally when calling vasm? In your
vasm.ts
I see
-m68000
,
-Fhunk
and
-linedebug
, which means generic optimisations will be enabled.

Maybe the original Code expects a certain instruction size at some point, which messes things up. Try to add
-no-opt
for a test.

Otherwise I would take the AsmOne-assembled code and compare it to the vasm-output to find differences.

EDIT: I see jump-tables in the source, consisting of multiple
JMP
instructions which will probably be optimised to
BRA.W
.
Solutions, if you don't want to disable optimisations completey, either disable them temporarily by the Devpac-style
OPT
directive:
Code:
        opt     o-
        jmp     label
        opt     o+
Or use a size extension on the label. Note, that a given size extension always prevents optimisations:
Code:
        jmp     label.l

Last edited by phx; 24 March 2023 at 00:35. Reason: Found possible reason
phx is offline  
Old 24 March 2023, 23:44   #332
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by phx View Post
Maybe the original Code expects a certain instruction size at some point, which messes things up. Try to add
-no-opt
for a test.
Thanks for the hint !

I can confirm with the
-no-opt
option it works.
prb28 is offline  
Old 26 March 2023, 22:21   #333
ChuckR21
Registered User
 
Join Date: Mar 2023
Location: Glasgow
Posts: 3
Sorry for the delay getting back folks. That's fantastic news, it's now working in Amiga Assembly Big thanks to @phx and @prb28
I'll keep it on github, and update the Readme file on the "-no-opt" and "-nocase" requirements in the args section of the tasks.json file, for anyone interested.
VS-Code + Amiga Assembly is a hell of an improvement over using AsmOne on a real Amiga, lol Cheers.
ChuckR21 is offline  
Old 10 July 2023, 17:13   #334
Factor5
Senior Game Dev
 
Factor5's Avatar
 
Join Date: Jun 2023
Location: Cologne /Germany
Age: 58
Posts: 19
Hi,
i must thank you for your great work on that extension.
I'm (re)starting to code on amiga after 30 years and this extension makes life so much easier for me.

Greetings, duke
Factor5 is offline  
Old 12 July 2023, 14:29   #335
desm0
Registered User
 
Join Date: Feb 2020
Location: Germany
Posts: 19
Hi,

I seem to have a problem creating the "Example Workspace" using this extension.

I am running vscode v1.80.0, Amiga Assembly v1.8.2 (fresh install).
As soon as I am trying to create an example workspace (as outlined on the extension page: >Amiga Assembly: Create example workspace -> select folder), vscode responds with:

"Example project creation canceled"

I have no idea what's happening. Any ideas?
desm0 is offline  
Old 13 July 2023, 19:26   #336
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by Factor5 View Post
Hi,
i must thank you for your great work on that extension.
I'm (re)starting to code on amiga after 30 years and this extension makes life so much easier for me.

Greetings, duke
Thanks !
The latest versions have a lot of work from Graham Bates.
prb28 is offline  
Old 13 July 2023, 19:27   #337
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by desm0 View Post
I have no idea what's happening. Any ideas?

I've just tried on Windows, it seems to work.
Which os do you use ? Have you the bartman's extension activated ?
prb28 is offline  
Old 13 July 2023, 21:21   #338
desm0
Registered User
 
Join Date: Feb 2020
Location: Germany
Posts: 19
Quote:
Originally Posted by prb28 View Post
I've just tried on Windows, it seems to work.
Which os do you use ? Have you the bartman's extension activated ?

Hi,


No, I have no other extensions enabled at the moment. I am using Win10, however, I have also tried on MacOS with a fresh vscode install and weirdly enough, same result.


For now I have simply copied the example workspace manually.
desm0 is offline  
Old 14 July 2023, 18:47   #339
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Quote:
Originally Posted by desm0 View Post
No, I have no other extensions enabled at the moment. I am using Win10, however, I have also tried on MacOS with a fresh vscode install and weirdly enough, same result.
I always work with my dev windows 11 platform.
I’ll try on a vm, but i will be far from a computer during a couple of weeks. I’ll do it after.
prb28 is offline  
Old 20 November 2023, 17:33   #340
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 180
Sorry for the dumb question, but is it possible to view the vasm.exe output? For example if I have a view PRINTT and PRINTV statements, it would be great to see these in the Terminal output during assembly.

I can see a Log Level setting, but not sure what the options are and perhaps barking up the wrong tree. Thanks for any pointers to something I've missed.

Last edited by hop; 20 November 2023 at 17:33. Reason: clarity
hop 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
assembly code to test for assign (2.0+) jotd Coders. System 2 27 December 2017 23:16
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 20:15
Amiga Audio/Visual KhneFr request.Other 6 03 January 2015 10:25
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 20:26
amiga visual editor thinlega request.Apps 1 22 January 2003 15:48

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 21:22.

Top

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