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.
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.
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.
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.
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…).
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…)
This “webster” site has a lot of other cool assembly stuff, too!
- This reply was modified 11 years ago by RunnerPack.
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!