View Single Post
Old 25 May 2008, 19:25   #42
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Hi crabfists

Quote:
Also, I don't quite understand what the rnc code is doing (and I don't know if I need to to work it out to get to the game's code).
Because I never patched games with rnc code ( long time ago I tried to patch ATR demo), so my knowledge about that isn't large. Rnc code simply load data from disk ( kind of trackloader ), that's all what I know and I think that is enough for me ( how its done is other problem ).

Quote:
The WHDLoad slave loads the rnc code to location $10000 but then the rnc code copies most of itself into location $50000 and jumps to there. Later on, when on the game title screen, if I look at location $10000 the rnc code does not exist any more. Why does it relocate itself like this?
Why doesn't it just load itself directly to location $50000 in the first place?
I think that Whdload slave try to emulate some situation. When you put disk into df0: then bootsector is loaded. Now is the question, where is loadad, which address od memory. The answer is simple: somewhere in lower address. Relocation to known address is kind of protection. You know address you are safe. Now you can load data, call some code and always you know where is trackloader address. Relocation is used very often in ndos games. Of course this isn't true relocation its copy routine( true relocation its used in FlyingShark ). This relocation trick is used very often in ndos games. Now you know why Whdload slave choose location $10000. Of course is possible to load rnc code into $50000 and remove copy code. But remember some games can check that relocated code ( another type of protection ).

As always any comments are welcome.

Regards
Asman is offline  
 
Page generated in 0.04692 seconds with 11 queries