Game Boy Zelda Comes With Source, Sort Of
Jamie found a fun story about a 90s Zelda Game Boy ROM that shipped with the source code- not so much on purpose, but more because the linker padded out the last meg of ROM with random memory contents, which happened to include game source code.
I guess the only way to really avoid the malloc() calls grabbing your source code would have been to compile, then reboot to link...so the extra data thats padded on the end of the ROM image would just be your emtpy RAM contents.
Obligatory blog plug: http://www.caseybanner.ca/
News Post Comes With Article, Sort Of
Awesome. :) This must be why they always say not to code whilst drunk.
Air Fortress (Famicom version) also included a portion of the source code due to not clearing memory before linking.
Now the site is Wordpressed (like Slashdotting, only the other way around) and you can't get to it, but one of the last posts before it died pointed out that this was from a trainered version. That's where someone adds cheat code to a ROM. As it turns out, the original doesn't have any of the code in question. Dissassembling for the purpose of adding cheats is a completely sensible explanation of the code that was found.
The moral of the story? Start with a known clean dump (look for the "[!]" tag) before assuming that the introns were in the original game.
#naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
This is a non-story. This only applies to a specific Pirate ROM Dump of Zelda DX. The clean dump does not contain any embedded source code.
One of the 'Elite' sequels was shipped with a swap file on the CD-ROM. Opening that swap file with a text editor showed it included much of the C code for the game, which presumably must have been swapped out while they were compiling at some point and then copied to the CD by mistake.
:).
From what I remember the installer copied the swap file to the hard disk, but the first patch either deleted it or zeroed it
"X-Men - Wolverine's Rage" (MD5: b1729716baaea01d4baa795db31800b0), which contains Windows 9x registry keys and INF files, "Mortal Kombat 4 (MD5: 7311f937a542baadf113e9115158cde3), in which you can find some small source fragments, "Gift" (MD5: e6a51088c8fea7980649064bd3a9f9ff), which will tell you that the developers had some Game Boy emulators installed on their system, or the "BIT-MANAGERS" games "Spirou" (MD5:5aa012cf540a5267d6adea6659764441, Turbo C, MAP file, source) and "TinTin in Tibet" (Game Boy Color version, MD5: 8150a3978211939d367f48ffcd49f979), which, amongst other things, contains references to Nintendo's Game Boy Advance (!) SDK ("C:\Cygnus\thumbelf-000512\H-i686-cygwin32\lib\gcc-lib\thumb-elf\2.9-arm-000512, "/tantor/build/nintendo/arm-000512/i686-cygwin32/src/newlib/libc/stdio/stdio.c").
Golden Axe 2 (the arcade ROM) has a good chunk of it's source code contained in there too, including the source for it's security routine (oh the hilarity...)
And the PAL version of ICO (PS2) had an objdump of the entire ELF on the disc, which is basically a disassembly with full symbol information.
Kayamon
"What do they mean by clear the memory? Because when I malloc() (and not calloc()) I seem to get whatever was there before.."
But you don't get anything from another process. When malloc() runs out of memory and asks for a new chunk from the operating system, a modern system will usually zero the block that it returns, whereas some older operating systems (e.g. MS-DOS, I think?) would just give a pointer to a chunk of free memory which could still contain any data that the previous user had left in it; that could be any program which had previously run on the machine.
When you free something and call malloc() again afterwards, you may well get a block with old data from your program. But in most cases you won't get a block with old data from a different program.
The same applies to disk files; with some operating systems in the past you could open a file, write a byte a megabyte into the file and then read a megabyte of old data preceding it in free blocks which had been allocated to you and not cleared. That was obviously a big potential security hole, so most modern operating systems will zero all the data in the file instead (more precisely, they'll probably allocate a sparse file which will return zeros from areas which haven't been written to).
As a kid I had a surplussed computer called the "Interact Model R." All of the game tapes were 8K even, and at the end of many of them I found commented 8080A assembly code for other games and the BASIC interpreter that was supplied with the system (yes, it was on tape for this machine). Starting with 200 lines of source I would eventually reverse assemble the entirety of what I later learned was Tiny BASIC.
Brackets contain world's first nanosig, highly magnified:[.]
"Stuff that matters" is sarcastic.
Actually, I've noticed that lately it says something about going outside. Also sarcastic.
find it amusing that this happened because of the Link-er.
I can't be the only one...
Can I?
I'll get me coat.
memset(ptr,0,size)
Engineering is the art of compromise.
Modern. We're talking about a Gameboy game.
Justice is the sheep getting arrested while an impartial judge declares the vote void.
I think you're giving MS-DOS too much credit when it comes to memory management. Basically, it was single-tasking so you could just use whatever memory you wanted to.
/Mikael
Greylisting is to SMTP as NAT is to IPv4
Posted anonymously to hide my shame of working with visual FoxPro.
.exe It just included a runtime and the source code in the .exe file. If you looked at it ina hex editor, there was the full source code, complete with comments. Apparently there was an option to scramble the source code. The guy responsible for building the installation didn't do that.
FoxPro, I discovered after shipping our product for 2 years, didn't really compile anything when you made an
As for the source code in the ROM, check out some of the comments on our site. The slashdotters above commented on it above. This post is from months ago, too - why on Slashdot now?
Anyway, A Japanese PlayStation game named "Beatmania Best Hits" came with the complete source code to "Beatmania 5th Mix", another PlayStation game in the same series. Supposedly, it was complete enough to actually compile and run.
PlayStation games of the era had to have a ~30 meg file of zeros on them at the outer edge due to a problem with the drive. These were known as "DUMMY" files. Some unknown sneaky programmer at Konami put an LZH archive containing 5th Mix's source code as the DUMMY file. (The contents of the file didn't technically matter, it just had to be at the outer edge.)
"Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
It's not even zeroed.. it doesn't exist.
When you first malloc memory you get a page of memory that's set copy on write and backed from a special page in memory with nothing but zeroes in it. It's only when you first use the memory that physical memory is actually allocated.
Dude, get this...I downloaded this game, I think it was called Quake 3...well, I started poking around on their website and found all the source code! Crazy huh?
This reminds me of one of the several oopsies that led to the demise of Weitek. (This one wasn't the last straw. But it was a pretty big bale.)
An administrator decided that, to save money, those darned resource-wasting engineers would be limited to one new floppy disk per week.
So floppies got reused a lot. And of course eventually somebody got sloppy.
The master for one of their graphics driver distributions was built on a recycled floppy disk. Of course the old files were deleted, rather than the disk being reformatted with a surface-analysis (and data wiping) pass. And of course this master was sector-cloned for production.
Turns out the entire source code for the drivers had previously lived on that disk - and many of the algorithms that made the product cutting-edge were either in the driver or had enough info in the driver source about what the chip was up to that it made reverse-engineering a snap.
So just apply any of several "undelete the lost files" tools to any copy of the distribution disks and you could recover pretty much the whole source code, comments and all.
Shortly after this, the best of Weitek's cutting-edge algorithms became industry standards.
That's one of the characteristics of Trade Secrets. Once it's no longer a secret (especially if the owner managed to leak it himself), it's public domain.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
To convert the Win95 upgrade CD to the full version, just type:
C:\>dir > NTLDR
Now, install your "full" version of Win95 as usual. I got this little tip from Microsoft support.
"Be grateful for what you have. You may never know when you may lose it."
After all the mistakes in today's stories, the editors must have committed ritualistic suicide to end their shame.
I want those 2 minutes of my life back.
The phrase "more better" is acceptable English. suck it grammar Nazis