You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
C Decompilers
Posted on: 2005/7/25 7:52
Virtual Jim
Hey everyone,
as of late I've been trying to learn C for the purpose of writing programs (obviously) and eventually do some VB stuff. While looking for a new compiler I stumbled upon something called a decompiler that's supposed to turn executable and some other file types into C-like representation of code. I've never tried using it and am wondering if anyone has tried one and (here comes the part of the question that becomes impractical.) how difficult might it be to decompile a VB game. I mean I don't think I could just get the decompiler change the file extension of the rom and decompile away and have a source, heavens no that'd be too easy! basically I geuss I want to know what the "in between thing" is that's missing to convert a rom back to code that nobody probably has and may never have and how "impractical" it may be to produce. Thanks.
Top

#2
Re: C Decompilers
Posted on: 2005/7/25 8:53
Virtual Jim
ugh wait nevermind I know why that won't work, new question:
anyone working on any kind of gccvb decompiler or anything like that? just curious.
Top

#3
Re: C Decompilers
Posted on: 2005/7/26 17:49
Nintendoid!
Joined 2004/10/25
USA
100 Posts
CoderLong Time User (14 Years) App Coder
There are several dissasemblers for the VB. it would not take to mutch of a coder to sit down and write a perl script to convert the asm code into pseudo C code based on paterns of opcodes. It is pretty easy to spot a loop or brantch, etc in the asm. There is very little optimization to get in the way.

David Tucker
Top

#4
Re: C Decompilers
Posted on: 2005/7/27 2:17
PVB Elite
Joined 2003/7/26
USA
1464 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
It's probably also made much easier than x86 by the fact that the v810 is a RISC chip.

(I've probably mentioned this before, but...) I want to make something like Brian Provinciano's NES assembler for the VB. It has shortcuts and aliases for common programming structures and NES hardware ports.
Top

#5
Re: C Decompilers
Posted on: 2005/7/27 19:14
Nintendoid!
Joined 2004/10/25
USA
100 Posts
CoderLong Time User (14 Years) App Coder
Making an emulator for any of the simpler tile based systems would be trivial, as long as you completely ignore scan line interupts and other trickery. That would be a lot harder to emulate. But getting super mario bros to work on the VB would probably take less than a week of effort.

I would start with the Game Boy/Color, followed by the NES and Master System. Only the daring would move on to the GBA and SNES. Actualy the origional game boy is trivial since the V810 is basicaly a superset of the Z80, the tricky part would be handling all that 8bit data eficiently. And graphicaly the VB is very close to the GB (actualy closer to the SNES but...).

David
Top

#6
Re: C Decompilers
Posted on: 2005/12/21 0:32
PVB Elite
Joined 2003/7/26
USA
1464 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
Umm... Why did you start talking about emulators?

I was talking about this:
http://neshla.sourceforge.net/

If it can be used to make Grand Theft Auto on the NES, imagine what the same technology would enable on the VB!

Amos
Edited by RunnerPack on 2010/1/13 5:45
Top

#7
Re: C Decompilers
Posted on: 2005/12/21 10:29
PVB Elite
Joined 2003/7/26
USA
1464 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
While looking for x86 assemblers, I was reminded that there is one called "HLA."

The developers have made an "assembler kit" for custom assemblers. I haven't looked too closely, but it might be useful for making a VB assembler. (Brian Provinciano might have even used this for NESHLA...)

http://webster.cs.ucr.edu/AsmTools/RollYourOwn/index.html

This "webster" site has a lot of other cool assembly stuff, too!
Edited by RunnerPack on 2010/1/13 5:31
Top

#8
Re: C Decompilers
Posted on: 2005/12/21 18:34
Nintendoid!
Joined 2004/10/25
USA
100 Posts
CoderLong Time User (14 Years) App Coder
Sorry about the emulator thing, I read your post to fast I thought you wanted a NES emulator (not a bad idea, but the gameboy would be easyer).

You could port any assembler you want to the VB but the GAS assembler is already ported (at least 90% of the way, its missing the bitstring opcodes) so why not use that. Pluss you can do inline assembly inside your c files, very nice indead!

David
Top

 Top   Previous Topic   Next Topic


Register To Post