English Amiga Board


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

 
 
Thread Tools
Old 26 April 2020, 00:20   #41
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
is IRA amiga only? is there a windows version?
BippyM is offline  
Old 26 April 2020, 00:26   #42
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
There is a Windows executable in the archive.
kamelito is offline  
Old 26 April 2020, 01:14   #43
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
Quote:
Originally Posted by kamelito View Post
There is a Windows executable in the archive.

Found it thanks, ? might have to create a gui
BippyM is offline  
Old 26 April 2020, 01:16   #44
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
It's portable C99 using only standard clib functions, so it will run on any system with a working C compiler.
phx is offline  
Old 02 May 2021, 23:27   #45
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
@PHX
A nice option to add to IRA would be for example if a program is only for 68000 but there's code in there for other 68k it would be nice to be able to add a comment line in the config file to say this hex code at offset x to y are for the instructions z.
kamelito is offline  
Old 31 July 2022, 09:46   #46
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
BASEREG value when code is modified

@PHX
If you add code to an IRA disassembly do you’ve to move the BASEREG by adding the value of the size of the added code /2? Something else ? To correct the value loaded to A4?
kamelito is offline  
Old 31 July 2022, 14:01   #47
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by kamelito View Post
If you add code to an IRA disassembly do you’ve to move the BASEREG by adding the value of the size of the added code /2?
Once you achieved a perfect reassembly, where all code/data regions and label-references have been found, including the small-data base location and offset, you can easily modify and extend the source, without having to fix anything.

With a valid BASEREG, BASEADR and BASEOFF in your config file (or -basereg option), IRA will generate labels for small data references. These labels will still be correct after you add code.


Sorry missed that:
Quote:
Originally Posted by kamelito View Post
A nice option to add to IRA would be for example if a program is only for 68000 but there's code in there for other 68k it would be nice to be able to add a comment line in the config file to say this hex code at offset x to y are for the instructions z.
I guess that this might be possible, because IRA also decides not to reassemble instructions like
move.l (a0,d0.l*8),d0
in 68000 mode, although it would be valid and execute (without scaling) on the 68000.
I'm not too keen on digging into the disassembler part, though, because this is what Nicolas Bastien rewrote completely over the last years. Maybe we can ask him.
phx is offline  
Old 31 July 2022, 21:42   #48
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
I guess then something is missing in my disassembly. I’ll have to check again. There’s part where adding code works, others parts not.
Thx for answering
kamelito is offline  
Old 03 December 2023, 16:51   #49
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Quote:
Originally Posted by phx View Post
That's a bug. There should be no automatic file format detection when you clearly specified it as raw binary. Fixed.


Yes. Seems that Nicolas prepared IRA for some more formats like Atari, Megadrive and ELF executables. Your binary definitely has an Atari header.


Might be a second bug, but as Atari is not yet implemented I would ignore it for now.
I've been enjoying using ira recently, but I've just hit the "Atari's executable files not yet supported." issue on an amiga binary which is being preprocessed with -binary

Code:
C:\Amiga>tools\ira\ira -a -compat=bi -binary -offset=$400 -preproc Loader

IRA V2.09 (Sep 19 2017)
(c)1993-1995 Tim Ruehsen (SiliconSurfer/PHANTASM)
(c)2009-2015 Frank Wille
(c)2014-2017 Nicolas Bastien

Atari's executable files not yet supported.
Am I using an old version of the executable? It looks like the version number is the same, but the date is older than mentioned in this thread. Is the code with the fix available? I am using the exe from https://aminet.net/package/dev/asm/ira Perhaps I need to build the source from the lha, but it looks like it was last updated in 2018 (predating this thread).

Thanks for any pointers.
hop is offline  
Old 03 December 2023, 17:52   #50
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Not sure where phx publishes new, official releases, but you can get the source for a newer version here: https://eab.abime.net/showpost.php?p...8&postcount=62
paraj is offline  
Old 03 December 2023, 17:57   #51
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
this atari file detection is buggy. If there's a "bra" instruction at the start of the binary IRA may detect it as an Atari ST (and deletes the file as a bonus bug!!)

-binary switch is overridden by the Atari ST detection... which isn't supported...

My workaround is to change the first byte of the binary file to 0. But changing to e.g. $67 so bra => beq could be even better (and restore bra manually)

Even with the bugs, IRA remains an invaluable tool for me.
jotd is offline  
Old 03 December 2023, 18:12   #52
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Thanks very much. I'll try the new source code and if that doesn't work I'll try a workaround. Perhaps adding a NOP at the start of the binary and offsetting by a couple of bytes would work.
hop is offline  
Old 03 December 2023, 18:18   #53
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Let's fix the code if it's still an issue with the latest version (which may not be what I linked). Looks like Atari is detected if first two bytes are $60,$1a.

If you could upload the offending file to the zone I'll check if it works for me.
paraj is offline  
Old 03 December 2023, 18:20   #54
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Quote:
Originally Posted by paraj View Post
Let's fix the code if it's still an issue with the latest version (which may not be what I linked). Looks like Atari is detected if first two bytes are $60,$1a.

If you could upload the offending file to the zone I'll check if it works for me.
Thanks. I haven't uploaded to the Zone before. The link at the top doesn't work but I am connected to the ftp and ftp2. Do I have to put the file somewhere specific so you can find it?
hop is offline  
Old 03 December 2023, 18:25   #55
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Quote:
Originally Posted by hop View Post
Thanks. I haven't uploaded to the Zone before. The link at the top doesn't work but I am connected to the ftp and ftp2. Do I have to put the file somewhere specific so you can find it?

First join the user group:



https://eab.abime.net/faq.php?faq=vb...ezone_faq_item


Then you can click the zone link and upload (at the bottom)
paraj is offline  
Old 03 December 2023, 18:28   #56
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Quote:
Originally Posted by paraj View Post
First join the user group:



https://eab.abime.net/faq.php?faq=vb...ezone_faq_item


Then you can click the zone link and upload (at the bottom)
Thanks for that. I've uploaded Stage2Loader

EDIT: May contain a TVD, but hope ira can make a start.

Last edited by hop; 03 December 2023 at 18:46. Reason: Context
hop is offline  
Old 03 December 2023, 19:12   #57
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Yep that starts w/ $601a, but works fine w/ the version I have (which I think I compiled from the source I linked). Added windows (64-bit) exe to the zone just in case.
paraj is offline  
Old 03 December 2023, 19:27   #58
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 172
Quote:
Originally Posted by paraj View Post
Yep that starts w/ $601a, but works fine w/ the version I have (which I think I compiled from the source I linked). Added windows (64-bit) exe to the zone just in case.
Thanks testing and for the new ira.exe. Disassembles just fine now thanks. Sorry I missed the updated source in the other thread.

Code:
C:\Amiga\>tools\ira\ira -a -compat=bi -binary -offset=$400 -preproc Stage2Loader

IRA V2.10 (Jan 16 2022)
(c)1993-1995 Tim Ruehsen (SiliconSurfer/PHANTASM)
(c)2009-2015 Frank Wille
(c)2014-2019 Nicolas Bastien

SOURCE : "Stage2Loader"
TARGET : "Stage2Loader.asm"
BINARY : "Stage2Loader"
MACHINE: MC68000
OFFSET : $00000400
Pass 0: scanning for data in code
Areas:    3
codeAdrs: 0   codeAdrMax: 16
CodeArea[0]: 00000400 - 00000402
CodeArea[1]: 0000041c - 00000456
CodeArea[2]: 00000490 - 0000054c
CodeArea[3]: 00001a00 - 00001a00


Pass 1: 100%
Pass 2: correcting labels
Pass 2: writing mnemonics
100%
hop is offline  
Old 03 December 2023, 19:50   #59
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Glad you got it working
Maybe this will spur phx to make an "official" 2.10 release or educate us on where to get it
paraj is offline  
Old 03 December 2023, 21:42   #60
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by paraj View Post
Maybe this will spur phx to make an "official" 2.10 release
Yes, indeed, I should do that! The last modification of the source was June 2022, so I should have done the realease back then...

Will upload to Aminet tomorrow (if I don't forget it).

Looking at the list of modifications I probably wanted to finish
HUNK_RELRELOC32
support. But this hunk is very rare. I wouldn't be surprised if vasm is the only assembler which can create it.

Code:
Bug fixes:
- Fixed parsing of HUNK_RELOC32SHORT/HUNK_DREL32.
- Renamed itoa() to avoid conflicts with compilers providing that function.
- -binary option always overrides the automatic format detection.
- Fixed detection of memory rotate instructions.
- Instructions with 32-bit absolute addressing, but with a relocation
  which extends into the following instruction, cannot be valid.
- Fixed ROMTag detection with a NULL-pointer for the Init-code.

New features:
- Supports HUNK_RELRELOC32 and EXT_RELREF32 in executables and object files.
  But cannot create labels for such references at this time.
phx 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
ira for Windows jotd Coders. General 63 12 December 2023 10:53
New tutorial on sprites Yragael Coders. Tutorials 8 04 September 2023 21:00
Debugging messages in serial (small tutorial, mainly for cross-dev) alkis Coders. Asm / Hardware 7 22 February 2016 14:16
68020 to 68000 code convertion using Ira and PhxAss gulliver Coders. Asm / Hardware 18 12 April 2014 01:09
Looking for IRA v1.07 or newer :-) voxel request.Apps 7 30 July 2008 01:39

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 18:35.

Top

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