English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 30 January 2020, 15:37   #21
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,536
Magic Pockets level format was so clear that I reverse engineered it without looking at the source

I agree that trying to look up obvious counters is the way to go. Same goes for lives when you're trying to reverse gameplay, player position vs enemies, etc... Start by something, and work your way up. Instead of staring at the code all day.
jotd is offline  
Old 30 January 2020, 16:04   #22
zero
Registered User

 
Join Date: Jun 2016
Location: UK
Posts: 347
Quote:
Originally Posted by jotd View Post
I use to find mainloops all the time for instance to find levelskips or insert CD-music play. I have a good technique with WinUAE. Let me explain.

Play the game and break with shift+F12.

First get rid of the case where you're in an interrupt with "fi RTE", then "t". Unless there's a trap within an interrupt, that should get you back in non-VBL part of the game.

Note down the value of A7. Then use "fi" instruction to find next RTS and "t" to return from it. See if A7 increases. If it doesn't, that's because the RTS is from a subroutine. So ignore that one.

After a few moments, you find the highest A7 value. Means that you're in the main loop. Put breakpoints here and there to find the point beyond which the breakpoint doesn't hit. There's probably a label, and below a BRA to it.
Thanks, that's great advice and I'll try it!
zero is offline  
Old 30 January 2020, 16:07   #23
zero
Registered User

 
Join Date: Jun 2016
Location: UK
Posts: 347
Quote:
Originally Posted by WayneK View Post
Since the first post was about reversing the level format, if the individual levels are loaded from disk I would find the disk loader (search for writes to DFF07E/DSKSYNC, work back to find the loader entrypoint then find references to this) and breakpoint after loading to find what the game does with the loaded data (typically depack it then parse it, so it should be one of the first few subroutines called after loading).
It pre-loads everything and I think it probably uses AmigaDOS to do it since the disk is standard AmigaDOS format.

My progress so far is to decode the level tiles and tile map, they are in a trivial format on disk. It's just the enemy placement I can't figure out. There must be some data with all the enemies locations and some stuff about what kind they are, what type of shots they have etc. Actually it's probably just indexes to lookup tables because the enemy behaviour changes with the difficulty level. On normal a lot of them don't shoot back, on hard everything does.
zero is offline  
Old 30 January 2020, 16:09   #24
zero
Registered User

 
Join Date: Jun 2016
Location: UK
Posts: 347
Quote:
Originally Posted by hitchhikr View Post
I realize that i didn't include the .rs (for Resource): http://franck.charlet.pagesperso-ora...mp/side_rs.zip
Thanks. What do I open it with?
zero is offline  
Old 30 January 2020, 16:33   #25
hitchhikr
Registered User

 
Join Date: Jun 2008
Location: somewhere else
Posts: 411
The Resource disassembler, i uploaded the latest version in the zone.

Be sure to use "New Syntax" (in "option 1") (fixes a bug).
hitchhikr is offline  
Old 30 January 2020, 18:18   #26
jarre
Registered User

jarre's Avatar
 
Join Date: Sep 2016
Location: Deventer - Netherlands
Posts: 434
and for windows you can use IDA PRO V6.8, which you can find here:

https://ufile.io/bly28
jarre 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
Ghidra disassembler / decompiler supports 68000 mark_k Coders. Asm / Hardware 21 20 March 2019 13:09
68k timing PiCiJi Coders. Asm / Hardware 28 15 January 2017 15:57
MUI 4 / 68k Tarzin support.Apps 2 06 April 2015 12:31
OpenAL 68k arti Coders. General 2 25 April 2014 19:41
Windows/68k Ratte Nostalgia & memories 1 23 August 2011 23:50

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 05:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08958 seconds with 14 queries