English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 23 November 2008, 11:45   #1
a4k-oerx
Registered User
 
Join Date: Oct 2008
Location: EU
Posts: 163
Question LoadSeg / Relocate to fixed address?

Hello there,

how could I get a ready amiga-exe with one code-hunk relocated to a certain fixed address which I specify, not to run it there right away (would use a cruncher for that) but to grab the data and incbin it in a new amiga-exe which then later will copy it to the fixed address (together with other blocks of memory to other addresses) and run it at a later time. Goal is to create onefile-versions (with no return to AmigaOS).

Any suggestions?
a4k-oerx is offline  
Old 23 November 2008, 12:05   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
There is executable relocator written in assembly in winuae's filesystem loader (filesys.asm)

(I guess there are better solutions but at least this is better than nothing..)
Toni Wilen is offline  
Old 23 November 2008, 15:55   #3
WayneK
Registered User
 
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 364
You could also use some relocator tool, does hunkwiz do this? I know the RSI cruncher "Double Action" has this feature, I've used it before (you can relocate an exe without crunching, don't worry)...
WayneK is online now  
Old 23 November 2008, 17:35   #4
a4k-oerx
Registered User
 
Join Date: Oct 2008
Location: EU
Posts: 163
Thumbs up

Thanks a lot for quick help.

HunkWiz looks promising, DoubleAction as well, and filesys.asm will help me understanding what's going on.
a4k-oerx is offline  
Old 23 November 2008, 18:35   #5
yaqube
Registered User
 
Join Date: Mar 2008
Location: Poland
Posts: 159
Does "reloc" from the WHDLoad package do the job for you?
I use it to generate binary images of exe files to put at specified address in the Minimig bootloader rom.
yaqube is offline  
Old 24 November 2008, 16:16   #6
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
There would also be an old tool used back in the days to one part games which was called "relokit".
hitchhikr is offline  
Old 24 November 2008, 16:39   #7
a4k-oerx
Registered User
 
Join Date: Oct 2008
Location: EU
Posts: 163
Thumbs up

Thanks for suggestions, turns out that HunkWiz is what I need, got it from a Beermon V0.46c distribution.

DoubleAction works but later crashes in my A4000/040 setup in WinUAE, relokit crashes as well, already during its own unpacking, did no further testing. reloc from WHDLoad works but as far as I saw expects addr in decimal format (or did I miss something?), need hex format.
a4k-oerx is offline  
Old 24 November 2008, 17:35   #8
yaqube
Registered User
 
Join Date: Mar 2008
Location: Poland
Posts: 159
Reloc accepts hex values. You must prefix them with $.
For more details see the docs: http://www.whdload.de/docs/en/reloc.html
yaqube 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
DevPac and Absolute Address h0ffman Coders. General 2 14 January 2011 15:32
Sensible Soccer Intl Ed - address error gingerbeardman project.WHDLoad 8 31 May 2010 13:12
NAT address -Rob- support.Other 7 07 April 2008 00:06
loadseg help BippyM Coders. General 4 16 April 2007 13:35

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 11:44.

Top

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