English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 18 August 2023, 18:44   #1
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
demo part - try to reverse coding

I love the wizzcat trashcan demo from 1990 since this time and especially the 90 horizontal scroller in the beginning.
I try to reversecoding the demoeffect to understand how it was made, but it works not perfectly. So, maybe someone has the energy and time to help. The first aim is to get it to run.
The second aim is to understand how the code works and what the data is used for.

The link or info to the WizzcatTraschcan.adf can be also found here: https://eab.abime.net/showpost.php?p...1&postcount=72

What I have get out is:
The memory dump gets the following: (only for orientation)
30008 - ; program code (main program)
302FC - ; m302FC: ; the ASCII-text
310e6 - ; m310e6: ; LEA.L m310e6,A5 - any data ?
31212 - ; m31212: ; LEA.L m31212,A3 - any data ?
313a2 - ; m313a2: ; LEA.L m313a2,A0 - adresses to the ascii-scrolltext (I have insert a patch for this)
3151e - ; m3151e: ; LEA.L m3151e,A1 - any data ?
316be - ; m316be: ; LEA.L m316be,A3 - any data ?
316E4 - ; program code (waitblit)
316F8 - ; m316F8: program code Interrupt-Routine (effect code)
3191c - ; m3191c: subroutine (effect code)
31a26 - 32425 ; Copperlist
32426 - ; m32426: program code (clear bitplanes)
3243a ; m3243a ; LEA.L m3243a,A4 - adresses to BPLCON1 values in copperlist
3260c - ; m3260c: ; filled with FC00 from main program - any data ?
32ae4 - ; m32ae4: ; LEA.L m32ae4,A0 - any data ?
32fbc - ; m32fbc: ; LEA.L m32fbc,A1 - any data ?
3358e - ; m3358e: ; LEA.L m3358e,A0 - any data ?
356d6 - ; m356d6: ; LEA.L m356d6,A1 - any data ? ; MOVE.L A1,$00dff050 BLTAPTH
399d0 - ; m399d0 - 4 bitplanes

I save the data at program breakpoint position >f 30008
>S m302fc $302FC !3552 ; Wrote 000302FC - 000310DC (3552 bytes) to 'm302fc'.
>S m310e6 $310e6 !300 ; Wrote 000310E6 - 00031212 (300 bytes) to 'm310e6'.
>S m31212 $31212 !400 ; Wrote 00031212 - 000313A2 (400 bytes) to 'm31212'.
>S m313a2 $313a2 !380 ; Wrote 000313A2 - 0003151E (380 bytes) to 'm313a2'.
>S m3151e $3151e !416 ; Wrote 0003151E - 000316BE (416 bytes) to 'm3151e'.
>S m316be $316be !32 ; Wrote 000316BE - 000316DE (32 bytes) to 'm316be'.
3243a - blk.b 376,0 ; 94*4=376 bytes
3260c - blk.w 620,$0 ; filled with FC00 from main program
>S m32ae4 $32ae4 !992 ; Wrote 00032AE4 - 00032EC4 (992 bytes) to 'm32ae4'. ; (4*(62*2)+4*(31*4)=992 bytes
32fbc - blk.b 992,0 ; filled from main program loop: (4*(62*2)+4*(31*4)
>S m3358e $3358e !25650 ; Wrote 0003358E - 000399C0 (25650 bytes) to 'm3358e'. ; 2*(15*285*3)=25650 bytes
>S m356d6 $356d6 !3420 ; Wrote 000356D6 - 00036432 (3420 bytes) to 'm356d6'. ; 13*$b4=3420 bytes
>S m399d0 $399d0 !266994 ; Wrote 000399D0 - 0007ACC2 (266994 bytes) to 'm399d0'.
>?$1AA90+3*$cd76 ; $000412F2 = %00000000`00000100`00010010`11110010 = 266994 = 266994 or
>?$7acc2-$399d0 ; $000412F2 = %00000000`00000100`00010010`11110010 = 266994 = 266994

Btw. ; Wrote 00031212 - 000313A2 (400 bytes) --> maybe better Wrote 00031212 - 000313A1 (400 bytes)
>S m1 $1 1 ; Wrote 00000001 - 00000002 (1 bytes) to 'm1'. --> maybe better Wrote 00000001 - 00000001 (1 bytes) to 'm1'.
>S m1 $1 0 ; Wrote 00000001 - 00000001 (0 bytes) to 'm1'. --> some error message like 'wrong argument'

My reverse coding program "works" but not correct.
To check: eg. with visual dma debugger
also, if you change this line MOVE.L #m399d0,D1 to MOVE.L m399d0,D1 then you can see that something happens.

So where I have to change something? What I have to do to see the scroller text?
Attached Files
File Type: 7z wizzcat.7z (20.4 KB, 20 views)
Rock'n Roll is offline  
Old 19 August 2023, 00:08   #2
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,004
Copperlist is your main issue here, its massive!

The problem you are having is that the code you have is hard coded to run at a specific memory address, and the copperlist also has lots of hard coded pointers to memory addresses for the scrollers.

You need to understand what all the pointers in the code absolutely refer to, and also you need to write a routine to relocate the hard coded addresses in the copperlist, because again, the copperlist is trying to manipulate and reload graphics at set memory addresses.

Its not impossible, but it is a lot of work to fix.
Galahad/FLT is offline  
Old 19 August 2023, 00:14   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,205
It's probably possible to write a tool to generate code to relocate a copperlist given in input. The tool would disassemble the copperlist and would know which 16-bit words are MSW or LSW for data pointers.
jotd is offline  
Old 19 August 2023, 19:25   #4
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
I realise that this is not a question, but rather a project. And I've reached a point where I've finished my research for now. Maybe I'll dig it out again in two years and then move on.

In my investigations I have already found that through the interrupt routine the bitmap pointer and the BPLCON1 values in the copper list are changed.
>w 0 $31a26 !1700 .W

But where the pointers point to and how everything is connected, that's more work to figure out.

As I said, parts of the programme work. The logo is displayed and the routine seems to work but with wrong datas.
Rock'n Roll 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
Help/Guidance reverse engineering a demo a.nonyme Coders. Asm / Hardware 16 27 May 2018 05:03
Maximum Velocity demo (vector part glitches) amilo3438 support.WinUAE 30 18 July 2013 20:46
Kefrens Sinlge Part Music Demo? h0ffman request.Modules 5 09 June 2010 16:48
c64 vs Amiga demo coding... Plagueis/KRX Coders. General 50 05 December 2009 07:58
Need help to get back a lost demo part trance007 Amiga scene 6 20 September 2006 17:10

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 03:14.

Top

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