Source code fragment of "Death and Return of Superman" for sega genesis

Started by Metal64, July 12, 2020, 03:27:39 AM

Previous topic - Next topic


I was hacking Death and Return of Superman (USA) for sega genesis and I found this

It's appear to be C programming language, it's start at 0x14600 and end at 0x15600


Have you heard of TCRF?  They have a whole bunch of stuff like this.  Looks like they even have the code you found:

Check out the site for other interesting finds.
The great achievement is to lose one's reason for no reason, and to let my lady know that if I can do this without cause, what should I do if there were cause?
     ~Don Quixote~


As for how the source code got there, I read some interesting speculation about that over here regarding a different game.

QuoteImagine you're writing a Game Boy game, and the resulting ROM with all the code and data is just a little over one megabyte in size. No big deal, just pad the game to two megabytes, and use a 2 MB ROM in the cartridge. Just tell the linker to allocate 2 MB or RAM, put the actual data at the beginning, and then write a 2 MB ".gb" image to disk, which will then be sent to the ROM chip factory.

Now imagine you're doing this in MS-DOS. Your linker, probably written in C, calls malloc() of the runtime library of the C compiler. You already know where this is going?

While modern operating systems will always clear all malloc()ed memory, so that you cannot get to other processes' data, this was uncommon in the single-user MS-DOS days. If you allocate 2 MB of RAM (the linker must have used a DOS extender or XMS), you'd get memory with random data in it: leftovers from whatever was in this memory before. (seppel tells me that this can also be caused by seek()ing over EOF in MS-DOS, in which case the previous data on the hard disk will be in the image.)
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!