Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
19 crawler(s) on-line.
 120 guest(s) on-line.
 1 member(s) on-line.


 AndreasM

You are an anonymous user.
Register Now!
 AndreasM:  4 mins ago
 DiscreetFX:  29 mins ago
 Hypex:  37 mins ago
 kolla:  46 mins ago
 Gunnar:  58 mins ago
 saimo:  1 hr 47 mins ago
 amigakit:  2 hrs 6 mins ago
 OldFart:  2 hrs 6 mins ago
 _ThEcRoW:  2 hrs 25 mins ago
 NutsAboutAmiga:  2 hrs 53 mins ago

/  Forum Index
   /  Amiga Development
      /  ROMTAGs and relocation
Register To Post

PosterThread
Wumpus 
ROMTAGs and relocation
Posted on 8-Oct-2018 16:02:38
#1 ]
Member
Joined: 12-Apr-2018
Posts: 61
From: Unknown

I'm writing a ROM resident module and I'm confused about something.

The RomTag structure is scanned for at boot and among other things, contains the pointers needed to continue scanning and to find the RT_INIT for that module.

That means that it can't be relocatable, right? Those pointers all have to be absolute addresses?

If that's true, how does something like Remus rebuild a ROM in an arbitrary order/location?

 Status: Offline
Profile     Report this post  
Wumpus 
Re: ROMTAGs and relocation
Posted on 8-Oct-2018 16:36:49
#2 ]
Member
Joined: 12-Apr-2018
Posts: 61
From: Unknown

I may have thought through this and found my answer, but confirmation would be nice.

I bet I make it relocatable like a normal library and when Remus builds the ROM, it knows where it's supposed to go so it handles relocating it in advance using the relocation info built into all normal libraries.

The reverse of that is probably why it's hard to split a ROM because the relocation info is stripped out. That's why you need a .dat file to match the ROM you want to split.

If that's correct, I'd sure like to hear confirmation from someone who knows.

 Status: Offline
Profile     Report this post  
Hypex 
Re: ROMTAGs and relocation
Posted on 9-Oct-2018 11:13:03
#3 ]
Elite Member
Joined: 6-May-2007
Posts: 11181
From: Greensborough, Australia

@Wumpus

Looks like some advanced coding there.

You're right. The RomTag structure has to use absolute pointers as they are used to reference direct memory locations.

Without any relocation info with a hard coded RomTag Remus would need to scan inside the module window and locate absolute references. Unless it does something else. Or already knows info about a limited set of RomTags it uses to relocate it.

With a module like a library built as an executable it can use the relocation info built into the hunks so that's easy enough.

Some more info can be found here:
http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node0298.html

 Status: Offline
Profile     Report this post  
kolla 
Re: ROMTAGs and relocation
Posted on 9-Oct-2018 13:46:16
#4 ]
Elite Member
Joined: 20-Aug-2003
Posts: 2859
From: Trondheim, Norway

@Wumpus

Curious, what will your kickstart module do?
I kinda wish for a module that can set up some assigns from boot.

_________________
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC

 Status: Offline
Profile     Report this post  
Wumpus 
Re: ROMTAGs and relocation
Posted on 9-Oct-2018 14:19:18
#5 ]
Member
Joined: 12-Apr-2018
Posts: 61
From: Unknown

@Hypex

I'm pretty sure my second post is correct, I'm just hoping for confirmation.

I've written them before, but that was tested as a separate module first and used Remus to add to the ROM.

This one is a bit odd in that I need to build it for both a static location and for use with Remus for two slightly different use cases.

Sorry if that's cryptic, but I'm not ready to say what it is yet.

 Status: Offline
Profile     Report this post  
Wumpus 
Re: ROMTAGs and relocation
Posted on 9-Oct-2018 14:21:09
#6 ]
Member
Joined: 12-Apr-2018
Posts: 61
From: Unknown

@kolla

I'd rather not say yet. Hopefully it won't be a lot longer and I'll be releasing the first one. It's actually several ROM modules.

I'm curious about your question though. What's different than just assigning early in startup?

 Status: Offline
Profile     Report this post  
Wumpus 
Re: ROMTAGs and relocation
Posted on 9-Oct-2018 18:02:43
#7 ]
Member
Joined: 12-Apr-2018
Posts: 61
From: Unknown

@thread

Doobrey answered my question directly.

My assumption in the second post was correct.

It does the relocation in advance when it prepares the ROM image because it knows where that module will be located.

 Status: Offline
Profile     Report this post  
Hypex 
Re: ROMTAGs and relocation
Posted on 10-Oct-2018 14:41:15
#8 ]
Elite Member
Joined: 6-May-2007
Posts: 11181
From: Greensborough, Australia

@Wumpus

I agree with you there. I thought you might be corect on that one.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle