Intellectual disassembler

gungun
edited February 2015 in Games
Anybody knows intellectual disassembler for Spectrum programs ? Ie, for a binary file defines - code is here, graphics here, levels, text, etc.
Post edited by gun on

Comments

  • edited February 2015
    I'm fairly certain that ZXSpin might be able to do this, but Marko could enlighten us further. It's not so much an intellectual disassembler though, at least until the philosophical module is finished.

    D.
  • edited February 2015
    gun wrote: »
    Anybody knows intellectual disassembler for Spectrum programs ? Ie, for a binary file defines - code is here, graphics here, levels, text, etc.

    Check out Simon Brattel's ongoing work with Zeus on the PC. It has a companion program called Diana which allows you to do exactly that. Be warned however, it is a bit of work getting to grips with it, but as you get the hang of things, it turns out to be pretty powerful and quite fast. He provides an example which disassembles "Forbidden Planet" in amongst the old Design Design stuff at the link below.

    http://www.desdes.com/products/oldfiles/index.htm
  • edited February 2015
    kphair wrote: »
    Check out Simon Brattel's ongoing work with Zeus on the PC. It has a companion program called Diana which allows you to do exactly that. Be warned however, it is a bit of work getting to grips with it, but as you get the hang of things, it turns out to be pretty powerful and quite fast. He provides an example which disassembles "Forbidden Planet" in amongst the old Design Design stuff at the link below.
    I took a look at it. Diana takes (as far as I can see) a manually constructed definition file for it to describe what is code and what is not.

    So basically i does the exact same thing as Skoolkit.
    Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
    My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
    Twitter: Sokurah
  • edited February 2015
    Spud's disassembler isn't so much intellectual as argumental...
    I wanna tell you a story 'bout a woman I know...
  • edited February 2015
    karingal wrote: »
    Spud's disassembler isn't so much intellectual as argumental...

    detrimental.... or just plain mental, :p
    So far, so meh :)
  • edited February 2015
    gun wrote: »
    Anybody knows intellectual disassembler for Spectrum programs ? Ie, for a binary file defines - code is here, graphics here, levels, text, etc.
    How do you imagine it is supposed to tell the difference?
    Joefish
    - IONIAN-GAMES.com -
  • edited February 2015
    joefish wrote: »
    How do you imagine it is supposed to tell the difference?

    Using its intellect. Duh.

    I can see it being able to split code and data easily enough*. After that, text could be guessed at. Graphics could possibly be identified if the machine was emulated: any data that was read, (lightly modified), then stored to the screen or to a buffer that was then written to the screen. Not so easy.

    * For some definition of easy. It would have to disassemble until it came to a return while storing jump destinations, then disassemble the code at the jump destinations, etc. Of course overlay code or self-modified code would be a problem. For overlays, could just try to disassemble, or detect if a block copy copies the code to a spot where we've identified code already.

    Levels... Can't think of a good way to determine that. I guess I'm not intellectual enough.
  • edited February 2015
    Use your favorite emulator to generate a code execution map while replaying an RZX file.

    It should produce a reasonably accurate distinction between data and code areas (even self-modifying code).
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • edited February 2015
    Spud has on occasion, disassembled the code, thought "That's crap code" and then decided to crash.

    I call that very intellectual.

    Does tend to happen quite often when it's disassembling polo's code...
    I wanna tell you a story 'bout a woman I know...
  • edited February 2015
    :lol:
    Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
    My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
    Twitter: Sokurah
  • gungun
    edited February 2015
    joefish wrote: »
    How do you imagine it is supposed to tell the difference?

    I think a lot of games, for example, Dizzy series, store sprites, and screens maps in the same format. Moving sprites, mixed with a mask can also be quite simple to determine. I saw inside the games graphics Shaw Brothers IE Kosmos, Gunfighter. Gfx also stored in the same format. Perhaps, in a pseudo 3D games from Ultimate we can see same format. As I understand it, there is no any a handy tool. From recommended interesting Skoolkit.
  • edited February 2015
    I understand it, there is no any a handy tool.

    No, there isn't. You are asking for some advanced artificial intelligence which would be able to analyse the code. Maybe it is possible at the moment with a big amount of skill and work but no, nobody did it.

    Yet I like Einar's idea of running the game and marking actually executed instructions. Simple to realize and would give a good approximation in many cases.
  • edited February 2015
    Ralf wrote: »
    Yet I like Einar's idea of running the game and marking actually executed instructions. Simple to realize and would give a good approximation in many cases.

    Skoolkit can already work with some execution maps/logs from several emulators.
  • gungun
    edited February 2015
Sign In or Register to comment.