English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 29 June 2024, 11:15   #121
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by kamelito View Post
I downloaded the latest AMD Adrenaline drivers from yesterday, I installed them and checked the reset option and it fixed the opengl issue
Installation without the reset didn't fixed it, before doing this I uninstalled the driver from device manager.
Thanks for letting me know. I'll add this information to itch and the application in case anyone else hits this.

Quote:
Originally Posted by kamelito View Post
@hop, see in the zone file archon2-airaforce.png

there is a bsr.w _adj_void but this label is in a data section where there is no code so reassembling failed.
Probably an IRA problem?
Yes, this may be a bug in ira. In this case the
_clear_space
symbol is in the HUNK_SYMBOL of code root hunk 39

Code:
ira -INFO ArchonII-ADEPT
Code:
    ...
    Module 37 : DATA ,PUBLIC   ,0 Bytes.

    Module 38 : BSS ,PUBLIC   ,0 Bytes.

    Module 39 : CODE ,PUBLIC   ,888 Bytes.
      Hunk_Reloc32: 36 entries
      hunk_symbol:
        _clear_space = 00006218
        _check_control = 00006296
    ...
However, preprocessing with ira with -keepzh results in the
_clear_space
symbol being output in data section 37 of the disassembly

Code:
ira -a -label=1 -radix=0 -compat=bi -keepbin -keepzh -M68000 -offset=$10000 -entry=$10000 -preproc ArchonII-ADEPT
ArchonII-ADEPT.asm:
Code:
        ...
	SECTION S_37,DATA

_clear_space:


	SECTION S_38,BSS

SECSTRT_38:


	SECTION S_39,CODE

SECSTRT_39:
	LINK.W	A6,#-16			;16218: 4e56fff0
	CLR.L	-8(A6)			;1621c: 42aefff8
        ...
It looks like a symbol at the start of a section may be incorrectly output in previous sections if they are empty.
hop is offline  
Old 29 June 2024, 12:36   #122
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,863
So is it something that need to be reported to PHX? If yes then I’ll let you do it
kamelito is offline  
Old 29 June 2024, 13:40   #123
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by kamelito View Post
So is it something that need to be reported to PHX? If yes then I’ll let you do it
It would be better to investigate it further first. There may be a simple solution. I'll assemble a minimal repro case and debug with a locally built ira.

EDIT: I have hacked together a potential fix. Please find attached a patched ira.exe to replace the one in the AiraForce folder. I hope it works for you. More details in the Small IRA Tutorial thread.
Attached Files
File Type: zip ira_zero_size_hunk_label_fix.zip (49.8 KB, 6 views)

Last edited by hop; 29 June 2024 at 20:17.
hop is offline  
Old 30 June 2024, 18:36   #124
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,863
it worked.
kamelito is offline  
Old 30 June 2024, 19:23   #125
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by kamelito View Post
it worked.
Excellent. Thanks for letting me know. Hopefully this will be rolled into the next ira beta and I'll update the executables in the next release.
hop is offline  
Old 30 June 2024, 19:36   #126
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,863
Thanks.
kamelito is offline  
Old Yesterday, 20:37   #127
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 531
Great tool with huge potential (so far).

A couple of remarks/questions tho:

- It's not saving it's entire configuration (like the analysis behaviours have to be re-entered each time the tool is launched).
- Is there a way to not display the data comments in the generated .asm (it clutters the final source code) ?
- It lacks a way to define data as bytes/words/longwords (it's extremely important, especially to decode/discern data structures).
- It's rare but i've already encountered programs which use 2 base registers.
- Jumps tables' dc.w are still displayed as raw offsets instead of labels even after creating a jump table (unless i missed something obvious somewhere).

I've encountered a crash because i didn't define the proper address of a base register (left it at 0) which created a collision between 2 labels -> program exits.

f.
hitchhikr is offline  
Old Yesterday, 21:48   #128
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,863
@ hitchhikr
I agree with you about data size.I asked twice the last one was answered see https://eab.abime.net/showpost.php?p...1&postcount=65
kamelito is offline  
Old Yesterday, 22:13   #129
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by hitchhikr View Post
Great tool with huge potential (so far).

A couple of remarks/questions
Hi. Thanks very much for giving it a go and providing feedback. Much appreciated...

Quote:
Originally Posted by hitchhikr View Post
- It's not saving it's entire configuration (like the analysis behaviours have to be re-entered each time the tool is launched).
No it doesn't sorry. The settings saving is very ad-hoc at the moment. I would really formalise this stuff to avoid omissions. I'll have a look at the params and see what I can do.

Quote:
Originally Posted by hitchhikr View Post
- Is there a way to not display the data comments in the generated .asm (it clutters the final source code) ?
No, but there should be - thanks very much for mentioning this. I'll make this possible. The address and machine code in the comments are parsed by the tools to build a map of the disassembly, but yes - I often delete them myself when I move the disassembly into a text editor. A solution might be to add File > Export > Disassembly which gives the option to strip this information.

Quote:
Originally Posted by hitchhikr View Post
- It lacks a way to define data as bytes/words/longwords (it's extremely important, especially to decode/discern data structures).
This is an underlying property of ira which has been discussed elsewhere on EAB. I belive that the argument (by the author) against this is that data size is inferred by the usage. If you can provide good examples of when this would be required you may be able to get some traction (but no promises!).

Quote:
Originally Posted by hitchhikr View Post
- It's rare but i've already encountered programs which use 2 base registers.
Interesting. I'll have to try this out. Do you know if this be hand-written assembly language or generated by a compiler? I don't think ira supports more than one, but does support
NBAS
to omit regions.

Quote:
Originally Posted by hitchhikr View Post
- Jumps tables' dc.w are still displayed as raw offsets instead of labels even after creating a jump table (unless i missed something obvious somewhere).
Hm. I thought I'd tested this well. Adding a jump table should cause the disassembler to add the associated labels. Do you have a repro for this?

Quote:
Originally Posted by hitchhikr View Post
I've encountered a crash because i didn't define the proper address of a base register (left it at 0) which created a collision between 2 labels -> program exits.
I'll see if I can repro this, but if you have a repro that would be great thanks.
hop is offline  
Old Yesterday, 22:36   #130
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 531
Quote:
This is an underlying property of ira which has been discussed elsewhere on EAB. I belive that the argument (by the author) against this is that data size is inferred by the usage. If you can provide good examples of when this would be required you may be able to get some traction (but no promises!).
It can be inferred, yes but not always because all data aren't always accessed or only under specific user's input, and modifying those in a text editor can be a very time consuming pita.

Quote:
Interesting. I'll have to try this out. Do you know if this be hand-written assembly language or generated by a compiler? I don't think ira supports more than one, but does support NBAS to omit regions.
Most probably hand-crafted asm, Resource doesn't support that either, as i mentioned it's rare.

Quote:
Hm. I thought I'd tested this well. Adding a jump table should cause the disassembler to add the associated labels. Do you have a repro for this?
Quote:
I'll see if I can repro this, but if you have a repro that would be great thanks.
https://hitchhikr.net/defenderofthecrown.zip

Jump tables aren't resolved in this one (also change the BASEADR to $00000000 and try to open it).
hitchhikr is offline  
Old Today, 11:44   #131
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by hitchhikr View Post
It can be inferred, yes but not always because all data aren't always accessed or only under specific user's input, and modifying those in a text editor can be a very time consuming pita.
The more I think about structured data, the more I think it would be a very worthwhile addition. Maybe even a major omission.

I would like to be clear on what you're trying to achieve. Do you want to be able to define data structures and regions of memory to which they apply in order to make the disassembler automatically format DC.X statements appropriately?

So for example, if the original code used data structure:
Code:
struct Sprite
{
    int16_t x;
    int16_t y;
    uint32_t mask;
    uint8_t tile;
    uint8_t flags;
};
Then at the ira level, adding this to the config:

Code:
STRUCT Sprite WWLBB
ARRAY $4008-$4012 Sprite
Could convert this:

Code:
LAB_4008:
    DC.L $01110022
    DC.L $80000001
    DC.W $1743
To this:

Code:
LAB_4008:
    DC.W $111
    DC.W $22
    DC.L $80000001
    DC.B $17
    DC.B $43
And this would extend to arrays.

Thanks for the jump table repro data. I'll have a look.

Last edited by hop; Today at 11:45. Reason: Clarity
hop is offline  
Old Today, 12:28   #132
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by hitchhikr View Post
https://hitchhikr.net/defenderofthecrown.zip
Jump tables aren't resolved in this one
The problem is that the jump table ranges overlap CODE ranges #. This can be seen by expanding the JMPx node in the ira config window. There is red warning text to the right of the entries stating that they overlap with CODE area 0. Sorry this message is hidden away. I'll try to improve this.

Currently you need to resolve this manually (I'll look into adding a tool to auto fix). This is how I would fix it:
1. Double click the first JMPW entry to select the address in the disassembly window.
2. Press D to convert to data *
3. Repeat for second JMPW entry

--------
# ira doesn't like this. I'll try to find out how this might have happened because adding a jump table should cut into the CODE ranges in the config
* DATA does not exist, it just implies an absence of a CODE or TEXT range, so effectively cuts into the existing CODE range. The convert to data tool stops at the next label, which is the end of the jump table in this case.

Hope this helps. I'll look in the the BASEREG issue for you.

Last edited by hop; Today at 12:32. Reason: More details
hop is offline  
Old Today, 15:23   #133
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 531
Regarding data structure, yes it would be something like that but adding them manually to the configuration file isn't an option as there can be hundreds of them in a file.

A way to define such structures within your tool would be most useful and a command to set contiguous blocks of those in one move would be ideal.

The JMPW solution works, i didn't see those warning messages (didn't know there were warns displayed here).

Quote:
Hope this helps. I'll look in the the BASEREG issue for you.
It's just that i made a mistake when first defining it but perhaps your tool shouldn't exit when such error occurs.
hitchhikr is offline  
Old Today, 18:15   #134
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by hitchhikr View Post
Regarding data structure, yes it would be something like that but adding them manually to the configuration file isn't an option as there can be hundreds of them in a file.

A way to define such structures within your tool would be most useful and a command to set contiguous blocks of those in one move would be ideal.
Great. Yes, with the disassembler updated, the tool could provide a GUI on top to allow data structures to be defined and blocks of them to be added.

The DOC exe is a good test case thanks. I've updated the jump table finder tool to detect this style of jump table, and also the code finder to queue jump table destination addresses. I also fixed the shutdown on duplicate labels in disassembly that ira spits out when the baseregs is incorrectly configured. I'll try to release a patch this weekend.

The DOC exe contains symbols, which can't be overwritten by ira currently. Because a handful of them start with a dot, but are not local labels, VASM fails to reassemble. To fix this, you can filter the Labels in the labels window by those starting with a dot, and find and replace the dot with an underscore in an external hex editor (Aira can't patch yet). Then vasm will reassemble the disassembly just fine.
hop is offline  
Old Today, 18:41   #135
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 531
Nice, i almost forgot, the possibility to use another font or to be able to zoom it would also be nice.
hitchhikr is offline  
Old Today, 18:45   #136
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 265
Quote:
Originally Posted by hitchhikr View Post
Nice, i almost forgot, the possibility to use another font or to be able to zoom it would also be nice.
Added yesterday! https://howprice.itch.io/aira-force/...-now-available
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
Interactive symbolic bitop calculator paraj Coders. Asm / Hardware 2 07 May 2017 22:13
What was that interactive interview with the Sensible Software team? Mark_C Nostalgia & memories 1 10 June 2004 03:38
Amiga Interactive Guide gets a facelift... Amiga1992 Amiga websites reviews 5 22 March 2003 18:50
Amiga Interactive Guide Twistin'Ghost Amiga websites reviews 0 13 July 2002 13:05
Nightbreed Interactive Movie Steve support.Games 19 04 October 2001 18:43

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:14.

Top

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