Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → (PokeRed) Unable to use MGBDIS to disassemble my own projects

#1 2019-03-19 10:58:25

NitroHedgehog
Member
Registered: 2017-06-25
Post 41/53

(PokeRed) Unable to use MGBDIS to disassemble my own projects

It's been a while. As I said I am unable to use MGBDIS, a disassembler run with Python to disassemble my own projects which I lost the source code a long time ago... On the Github page, it says to type: ./mgbdis.py some-game.gb with Python to decompile it... But I am unable to do so, even if I rename my own rom as ''some-game.gb'' Here's what I do, and tell me what I am doing wrong.

1 - Run ''cmd'' command (the cmd.exe is in the same folder as python.exe, mgbdis.py and some-game.gb)

2 - Type ''py'' to activate python command

3 - Type Q:\mgbdis-master\mgbdis.py some-game.gb (where my files are stored)

...and I get a blank syntax error and nothing else. Could anyone help?

Offline

#2 2019-03-19 23:41:00

Tauwasser
Member
Registered: 2010-10-16
Post 454/457

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

Which python version do you use? Typing "py" to activate python sounds very strange to me. Usually, you'd either have python in your path and type python mgbdis.py <arguments> or activate a virtual environment (venv) using venv\Scripts\activate on windows or venv/bin/activate on linux.

Offline

#3 2019-03-20 00:03:55

NitroHedgehog
Member
Registered: 2017-06-25
Post 42/53

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

I use Python 2.7. And no, having Python in my path and typing ''python mgbdis.py some-game.gb'' gives me the exact same error as before so I'm kinda stuck...

Offline

#4 2019-03-21 21:31:54

Tauwasser
Member
Registered: 2010-10-16
Post 455/457

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

MGBDIS is made for Python 3. Also, posting the exact error message would really help.

Offline

#5 2019-03-21 23:32:23

NitroHedgehog
Member
Registered: 2017-06-25
Post 43/53

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

I upgraded to Python 3.7.2 and here's the error message I get:
untitled.png

Offline

#6 2019-03-24 11:12:51

Tauwasser
Member
Registered: 2010-10-16
Post 456/457

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

You're already inside the python shell in that screenshot. The command is meant to be run from the Windows Command Window and should be

mgbdis_python.png

So you would open the Command Window and write "python Q:\mgbdis-master\mgbdis.py test.gb" there.

Offline

#7 2019-03-25 08:09:41

NitroHedgehog
Member
Registered: 2017-06-25
Post 45/53

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

Thank you. I did it but... I only get tons of empty .asm files, not a full disassembly like PokeRed. I wanted to fix a sprite or two in a Green hack that are messed-up, but seems I have no choice to do it via hex and find the values by myself... :(

Offline

#8 2019-03-29 22:53:57

Tauwasser
Member
Registered: 2010-10-16
Post 457/457

Re: (PokeRed) Unable to use MGBDIS to disassemble my own projects

That's actually to be expected. You have to tell the disassembler a lot of information in order for it to disassemble useful stuff. PokéRed took years to get to the current level. That means people disassembled a routine, figured out what it did, coordinated the function labels, constant names etc. and collaborated on the disassembly. You don't get that automatically.

However, I'm pleased to hear that you got it running in the end even if it did not match your expectation.
If it's just two hex values, then a hex editor will be faster. However, it might be good to disassemble the routines using the values for documentation purposes.

Offline

  • Index
  • → Help/Question
  • → (PokeRed) Unable to use MGBDIS to disassemble my own projects

Board footer

Powered by FluxBB