17 March 2011, 12:10 | #1 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
Fixing Classic BRAT cracktro for more than 512k chip
Hi guys,
I thought trying to fix a small problem with one of my favourite intros would be a good learning experience. With 1mb chip, the scroller becomes invisible for about 50% of the time. If anyone could give me some tips on why this is happening and the best way to go about fixing it, they'd be very greatly appreciated! I have attempted to decrunch it with XFDDecrunch but it results in an unexecutable file, which when disassembled crashes the Amiga when I try to reassemble it. Disassembling the original packed executable and reassembling it works perfectly. It can be downloaded from here if anyone would be willing to take a quick look at it for me: http://ftp.amigascne.org/pub/amiga/G...Classic-CrBrat I have also uploaded the disassembly of both the crunched and decrunched executables to the zone. Thanks in advance Last edited by Hewitson; 17 March 2011 at 14:53. |
17 March 2011, 15:19 | #2 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
I'm pleased to report I've made some slight progress, adding the option "LP" to xfddecrunch resulted in a decrunched executable that works perfectly.
Unfortunately trying to disassemble this with IRA says "Hunk: 0000fffe - Not Supported" and quits. I get the same error with the addresses "00000130 48E7FFFE" from D68k. Last edited by Hewitson; 17 March 2011 at 15:25. |
17 March 2011, 23:07 | #3 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
All that line is doing is the following and there are only 2 instances of this within the code.
Code:
Movem.l d0-d7/a0-a6,-(a7) |
18 March 2011, 08:38 | #4 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Morning Hewitson
I had a quick look at the two disassemblies. If you look at the crunched version, what you're seeing is the disassembled decrunch header for the Defjam packer that was used to crunch the cracktro. The data in that file is the crunched cracktro that gets decrunched by the header. What you can see in the decrunch code is a jmp ext_0000. Which translates as, from looking at the equates, to jmp $48000. This is the absolute address in memory that the cracktro is decrunched to. Ideally you want to make the code relocatable again. What you could try doing is disassembling the uncrunched executable but setting the origin (this is a Resource disassembler term, sorry I've never used IRA) for the code as $48000. That would then let the disassembler work out how to offset all the branches in the code to the correct places as relative offsets. If you then add a: section cracktro,code_c to the very top of the code and then try running it you might find it works OK. I used this exact same method when I disassembled Phenomena's Flight Of Dreams II demo and managed to get it to run OK as a relocatable reassembled executable. Hope that helps |
18 March 2011, 09:52 | #5 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
I gave IRA the -OFFSET=$48000 option and the code now reassembles and runs perfectly! However all this does is add an ".ORG $48000" to the start of the source. I commented this out and the intro still ran fine but the music was very high pitched for some reason.
I'd like to use Resource so I can do exactly as you suggested. I set the origin to $48000 and disassembled and it has hundreds of question marks in it! eg: btst ????$14,a2 How can I get it to produce a usable disassembly? Thanks |
18 March 2011, 10:24 | #6 | |||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
Quote:
Not a very techincal or detailed desciption that I'm afraid. Someone else here will be able to elaborate I'm sure. |
|||
18 March 2011, 10:43 | #7 | |||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
In this case however screens etc are located at absolute addresses ($70000 etc) so you can't just add a "SECTION CODE,CODE_c" and hope for the best. In the best case it might run by luck, in the worst case your code has been loaded to the screenmem area and what happens then should be obvious. Quote:
Quote:
Anyway, you can check this thread, I explained how to disassemble absolute address code there. However, this is no beginner's stuff in my opinion, learn to walk before you try to run! Last edited by StingRay; 18 March 2011 at 10:59. Reason: typo |
|||
18 March 2011, 10:50 | #8 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
OK thanks Stinger.
As I say, I have no great experience at this stuff. Hewitson: best bow to Stinger's superior knowledge in my opinion. |
18 March 2011, 11:22 | #9 | ||
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
Well, stuff trying to make it relocatable. I'd rather put up with it crashing the system every time I exit it than get as frustrated as I am right now.
I would absolutely love to fix the issue with the scroller though. Quote:
Quote:
|
||
18 March 2011, 17:51 | #10 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Fix it using WHDload
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Brat | BippyM | project.Maptapper | 16 | 13 July 2013 19:54 |
Virus by D. Braben working with 512k chip | Photon | Games images which need to be WHDified | 3 | 09 January 2011 22:40 |
Classic cracktro, but where is the tune from? | Leffmann | Nostalgia & memories | 16 | 09 October 2009 21:42 |
Fixing a "leg" of 68010 chip | mk1 | support.Hardware | 33 | 04 April 2009 18:10 |
BRAT docs | andreas | support.Games | 0 | 27 November 2004 01:58 |
|
|