![]() |
#41 |
Re: Source code for older games
Funny you link to Keen:Modding, the disassembly of Keen produced a large number of patches, but the "C" version was still rewritten from scratch because it was far easier than reconstructing anything. Advanced disassemblers like IDA Pro will automatically recognise common code signatures and convert them to familiar C statements (while loops, switch blocks, etc.) but even with that help it's still easier to do a rewrite from scratch instead.
The problem is that most people don't realise just how low-level the disassembly still is. Using the keyboard as an example, you need to be familiar with the protocol used by a chip on the motherboard just to recognise when some part of the code is dealing with the keyboard. Take a look at some documentation on the keyboard interface and you'll see what I mean. You need to be familiar with much of that before you can hope to understand the disassembly - for just the keyboard routines! Those are also by far the simplest, once you start looking at the video card or even worse setting up DMA transfers for digitised sounds you'll be tearing your hair out... The 'easy tweaks for fun' is about the most you could reasonably hope to achieve, but that's still very, very time consuming... |
|
![]() |
![]() |
#42 | |||
Re: Source code for older games
Quote:
If you are interested in the exact behaviour of the games (like I am), starting from scratch is not an option. Quote:
Quote:
http://www.osdever.net/FreeVGA/vga/vga.htm http://www.qzx.com/pc-gpe/ Like I said. With some patience and time, it is quite possible to create a well-commented and documented disassembly. I already said I have a copy of Herman Perk's Supaplex disassembly. Supaplex may be a fairly simple game, but Monster Bash and the Keen series aren't really that much different.
__________________
~ Psycho ~ |
||||
![]() |
![]() |
#43 |
DOSBox Advisor
|
Re: Source code for older games
In the above:
s/some/'a lot'/ Thanks. |
![]() |
![]() |
#44 |
Re: Source code for older games
Well, it depends on the program, and how patient you are
![]() For these 16-bit games: 1) Clean up disassembly, data into arrays etc., make sure all code is properly disassembled, create offsets where necessary. At this point you should be able to reassemble the program, test if all is ok by shifting parts of the code and data segments. 2) Interpret code and comment functions and data accordingly. (Takes the most time, but quite doable if you have the knowledge, patience and time) And if you want, 3) Port disassembly to C
__________________
~ Psycho ~
Last edited by Psycho87; 06-28-2010 at 11:16 AM.
|
|
![]() |
![]() |
#45 |
Re: Source code for older games
Exactly my point. You can't just download a disassembler, run it and be done. You need to know almost enough to have written the game in the first place, or at least be very familiar with the hardware it used.
Also since (AFAIK) most ID games did everything themselves (no external code/libraries used) then that part of a disassembler wouldn't be much help. Your step 2 of "interpret code" also belies the true complexity of such a task. If you think it is that easy, why not try it with Monster Bash? Plenty of people would love to see a properly annotated disassembled version, but I suspect you would find it much harder than it seems... (although it certainly sounds like you have the skills to get it done eventually!) Re the C version of Keen I was referring to Commander Genius, it has gotten the furthest of the handful of remakes. |
|
![]() |
![]() |
#46 | |
Re: Source code for older games
Quote:
One problem, would 3DR/Apogee allow me to put it online when I'm done?
__________________
~ Psycho ~ |
||
![]() |
![]() |
#47 |
Re: Source code for older games
As long as you don't post the game data files, it will be impossible for anyone to use your disassembled version without owning the game already. So I don't think 3DRealms will have a problem with it. They've certainly never complained about the various Commander Keen disassemblies and patches floating around.
Having so many little functions is one of the things I found annoying when I disassembled Bio Menace to discover the cheats. Many of the functions are so small that there is no clue what they are for, until you have figured out what many other functions do first - and following the execution path through all these little functions can get really confusing! |
|
![]() |
![]() |
#48 |
Re: Source code for older games
Hello,
I'm starting a reverse project on a certain unmentionable game (II). I have a few questions about the source code from the old EGA 2D scrollers. First, I was wondering if any of the source of the 16-colour 2D EGA games has been found (particularly those of the Duke/Cosmo/MajorStryker family). From the responses in this thread, it doesn't look like it. I'm interested in what appears to be an EGA graphics library for drawing tiles+sprites (it is in the same segment as the borland std c libraries), but using IDA sigmake on any of the borland libraries doesn't identify these functions. Anyways, I was wondering if anyone might have the source for that library. Second, is the source of Jason Blochowiak's sound module available somewhere? |
|
![]() |
![]() |
#49 |
Re: Source code for older games
Hmmmmmm.....Amazing of this kind of idea. Having the source codes. I thought of HD remake of them. But oh well.
|
|
![]() |
![]() |
#50 |
Re: Source code for older games
Making HD remakes of old EGA sidescrollers would be easier by starting from scratch instead of trying to fit HD graphics into old 1991-era engines.
|
|
![]() |
![]() |
#51 | |
Re: Source code for older games
Quote:
Last edited by IceColdDuke; 03-11-2011 at 12:22 PM.
|
||
![]() |
![]() |
#52 | |
Re: Source code for older games
Quote:
Having said that, the source code for Xargon is available, and they did use a third party library for parts of it (such as the audio) but in that case all the sprite/tile code was still custom. |
||
![]() |
![]() |
#53 |
Re: Source code for older games
I think the Wolf3D sound code was written by Jason Blochowiak, so this might be worth a shot. Thinking about it, Duke II offers the same sound features (PC Speaker/AdLib/Digitized sound effects) as Wolf3D.
|
|
![]() |
![]() |
#54 | |
Re: Source code for older games
Quote:
Unpacking the executable: http://en.wikipedia.org/wiki/Executable_packer And yes, I am using IDA, as I mentioned in a post above as well. Anyway, I stopped working on this project months ago. I still believe that with a lot of patience it is quite doable, but like I said, the game has a lot more code than I expected and a disassembly of Monster Bash is not important enough for me to spend the required time on.
__________________
~ Psycho ~ |
||
![]() |
![]() |
#55 |
Re: Source code for older games
|
|
![]() |
![]() |
#56 |
Re: Source code for older games
Having them and having a working copy are two different things, knowing John Carmack if he had a working copy that he could release he probably would have done it ages ago.
You really can't expect to use IDA to reverse a complete working copy of any executable module. The best route would be to identify specific functions that used by the engine to load in assets, and any game specific functions you need(timing etc) and reprogram the entire the game based on your findings from IDA. |
|
![]() |
![]() |
#57 | |
Re: Source code for older games
Quote:
Monster Bash and other old Apogee/Id games are a little more complex, but with patience, these games can be reverse engineered as well.
__________________
~ Psycho ~ |
||
![]() |
Bookmarks |
Tags |
source code |
|
|