English Amiga Board


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

 
 
Thread Tools
Old 28 March 2020, 21:26   #21
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
Thanks I’ll test it. Does is also work if the base library pointer is known in the source file prior to the OS call?
kamelito is offline  
Old 28 March 2020, 22:42   #22
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
?? I don't understand, sorry
jotd is online now  
Old 28 March 2020, 22:58   #23
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
If I have move.l execbase, a6 then later jsr -30(a6) same with other base lib etc will it work,

For cheapres.py is the usage is python cheapres.py sourcefile? Any dependencies?

Last edited by kamelito; 28 March 2020 at 23:09.
kamelito is offline  
Old 28 March 2020, 23:33   #24
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
it will if the base lib is set before -30(a6) is called. I thought I protected the scan when RTS is encountered but it doesn't seem to be the case (working on the script right now so it might be done tonight)

usage is: cheapres.py -i input_file.asm -o output_file.asm.

Omitting the output overwrites the input (which can be regenerated at will probably)

Dependencies are kept to their minimum (no other python modules than already existing builtins, maybe it would even run on amiga in python 2.4 with minimum adaptations). Maybe time not to divert this thread any further. You can PM me if you have issues, or open a separate thread.

Last edited by jotd; 29 March 2020 at 12:50.
jotd is online now  
Old 29 March 2020, 11:14   #25
zenox98
Komakino

zenox98's Avatar
 
Join Date: Nov 2006
Location: East Yorkshire
Age: 55
Posts: 182
Many thanks, Jotd - very useful.

BTW I think this is relevant to this thread as it is enhancing IRA output.

#my2cents
zenox98 is offline  
Old 29 March 2020, 12:18   #26
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
thanks if someone has issues with the scripts please yell. I have updated them several times since yesterday on my github page. Now cheapres.py is able to insert named offsets from $DFF000 base too as someone suggested.
jotd is online now  
Old 29 March 2020, 12:44   #27
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,600
Quote:
Originally Posted by kamelito View Post
One feature could be to be able to set the value of the indentation when using the -a so all offsets could be aligned and so have a more readable output.
Hm... but all offset-comments are aligned at position 40! Maybe you have an editor or viewer which is not set to the standard tab-width of 8?

Quote:
Is there a way to change data size of dc.x ? .b .w .l
Not yet. But I already have that on my ToDo-list for future additions. I mentioned the new directives DATAB, DATAW and DATAL for this purpose. Also on this list: a directive to insert user comments, an option to output mnemonics in lower-case.

Quote:
Is it also possible to change to binary, hex and decimal the values?
No. A global option would be easy, but I guess you would like to see it as a directive for certain regions?

Quote:
Say A5 point to $DFF000, then something like move.w D6,98(A5) is there a way for IRA to put the Amiga chipset EQU instead?
Like library LVOs, this should be done by a post-processor. Jotd has currently the best options for it!

Quote:
VASM seems to do not like label with a ., like jmp .label
Labels starting with a dot are local labels in many 68k assemblers. So this would be a bad choice.

Quote:
Originally Posted by redblade View Post
Were you the person who did Syndicate? I remember ending up on a Syndicate source code on some site.
What do you mean with "did"? But anyway, the answer is no!
phx is offline  
Old 29 March 2020, 23:08   #28
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
@PHX
>Maybe you have an editor or viewer which is not set to the standard tab-width of 8?
Right thanks notepad++ default is 4 with 8 it is perfect!

>Not yet. But I already have that on my ToDo-list for future additions. I mentioned the new directives DATAB, DATAW and DATAL for this purpose. Also on this list: a directive to insert user comments, an option to output mnemonics in lower-case.
>No. A global option would be easy, but I guess you would like to see it as a directive for certain regions?

I think your directives DATAB DATAW DATAL are the way to go but you could add a char like DATAW_B for word as binary or DATAB_D for decimal, DATAW_H for hex something like that. (Not sure if ascii is needed)


>Like library LVOs, this should be done by a post-processor. Jotd has currently >the best options for it!
I’ve seen he made updates, I’ll test tomorrow.

>Labels starting with a dot are local labels in many 68k assemblers. So this >would be a bad choice.
Not my choice it is IRA who did this I guess it choosed this because of symbols present in the exe.

@jotd
> dated them several times since yesterday on my github page. Now cheapres.py is able to insert named offsets from $DFF000 base too as someone suggested.

Thanks! Does your repo contains minimal info about how to use your tools?

Last edited by kamelito; 29 March 2020 at 23:13.
kamelito is offline  
Old 30 March 2020, 02:37   #29
redblade
Zone Friend

redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 36
Posts: 1,458
Quote:
Originally Posted by phx View Post
What do you mean with "did"? But anyway, the answer is no!
Someone did an amiga disassembly of Syndicate and they used IRA to do it. Must of been someone from the WHDLoad team.
redblade is offline  
Old 02 April 2020, 17:47   #30
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
tried this basereg stuff, can't seem to make it work

defender of the crown:

Code:
	MOVEA.L	(A7)+,A1		;0FE4A: 225F
	SUBA	#$000A,A1		;0FE4C: 92FC000A
	MOVE.L	(A1),D1			;0FE50: 2211
	ADD.L	D1,D1			;0FE52: D281
	ADD.L	D1,D1			;0FE54: D281
	MOVEA.L	D1,A4			;0FE56: 2841
	ADDA.L	#$00008002,A4		;0FE58: D9FC00008002

...

	SECTION S_1,DATA,CHIP

	DC.W	$4EF9			;11618
...
LAB_0C50:
	DS.L	132			;13B30
	END
A4 (before add) matches first section. Adding $8002 is as Frank said to benefit from full 64k range. But I can't seem to put the proper values

Code:
BASEADR  $11618
BASEOFF $8002
this fails (mapping like section 1 minus 55000 values or something). Note that section isn't that big. All offsets are negative. I've tried just BASEADDR $1961A but in that case I get "out of range". I think this is the proper value, but IRA doesn't allow it.
jotd is online now  
Old 02 April 2020, 18:34   #31
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
@jotd
I guess it’s 32766, have you seen my PMs?
kamelito is offline  
Old 02 April 2020, 21:37   #32
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,600
Quote:
Originally Posted by jotd View Post
Code:
    MOVE.L    (A1),D1            ;0FE50: 2211
    ADD.L    D1,D1            ;0FE52: D281
    ADD.L    D1,D1            ;0FE54: D281
    MOVEA.L    D1,A4            ;0FE56: 2841
    ADDA.L    #$00008002,A4        ;0FE58: D9FC00008002
This looks like reading the BPTR which links the next section. I guess that the $8002 skips the first four bytes which would be the BPTR to the next section. So the real offset is $7ffe, as Kamelito mentioned.

Also a base offset >$8000 makes no sense.
phx is offline  
Old 04 April 2020, 16:42   #33
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
BTW I found a very annoying bug in last version of IRA (2.09). I tried to disassemble a binary file (start $80000) like this:

Code:
>ira -a -offset=$80000 -binary heimsp.bin

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

Atari's executable files not yet supported.
WTF Atari???
And second IRA HAS DELETED THE FILE! I tried several times, same thing. Version 2.00 works well on that file. I have zoned it if you want to check.
jotd is online now  
Old Yesterday, 17:10   #34
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
@jotd how cheapres recognize the different libraries bases? Do you look for specific text like ExecBase, IntuitionBase is their a list? Or is it done differently?
kamelito is offline  
Old Yesterday, 17:31   #35
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
yeah, good question. ExecBase, IntuitionBase, GraphicsBase... basically name of the lib with first letter uppercased. Ex: lowlevel.library => LowlevelBase.

You can manually set them if the program uses a proxy routine to open the libraries (often happens in C programs)
jotd is online now  
Old Yesterday, 19:24   #36
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,070
@jotd
Thanks is PotgoBase handled?
kamelito is offline  
Old Yesterday, 19:37   #37
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,684
devices aren't supported ATM.
jotd is online now  
 


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
BippyM
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New tutorial on sprites Yragael Coders. Tutorials 7 10 July 2018 12:11
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
ira for Windows jotd Coders. General 2 04 November 2010 09:48
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 13:33.


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