×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

200 comments

Giving up. (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21472973)

Stuff that matters!! It says it right at the top. A game sort of containing source code?! Slow news day?

Re:Giving up. (4, Funny)

ceoyoyo (59147) | more than 6 years ago | (#21473527)

"Stuff that matters" is sarcastic.

Actually, I've noticed that lately it says something about going outside. Also sarcastic.

Please give up. (-1, Flamebait)

Anonymous Coward | more than 6 years ago | (#21473683)

I think it's neat. You are welcome to give up and never to return.

HOLD THE PRESSES: I SHAT A CHUNK (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21474131)

I never felt so good. This is prime slashdot material!

oooomph!

EAT IT, VLAD (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21474555)

Oh and just because you think it should be legal to "fuck babies" doesn't mean that the rest of America thinks that way too you fatass

Avoiding the malloc() (4, Informative)

kcbanner (929309) | more than 6 years ago | (#21472979)

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.

Re:Avoiding the malloc() (3, Insightful)

Anonymous Coward | more than 6 years ago | (#21472999)

Or you could, you know, manage your memory properly.

Re:Avoiding the malloc() (2, Insightful)

MBCook (132727) | more than 6 years ago | (#21473009)

Am I missing some reason that you can't just pad with 0s or 1s? Why bother with random data?

Re:Avoiding the malloc() (5, Informative)

simcop2387 (703011) | more than 6 years ago | (#21473083)

thats what calloc is for, it'll clear it for you, malloc just gets it.

Re:Avoiding the malloc() (0)

Anonymous Coward | more than 6 years ago | (#21473105)

We're talking about building the ROM image, not how malloc/calloc works right? It should have been padded with 0s.

Re:Avoiding the malloc() (1)

MBCook (132727) | more than 6 years ago | (#21473221)

That was my point. There is no need to malloc the whole 2MB, just what you need. Pad whatever comes after with 0s or 1s, and any checksumming (unlikely on a GB cart) could be done trivially. You didn't need to allocate that extra space at all.

Re:Avoiding the malloc() (3, Insightful)

simcop2387 (703011) | more than 6 years ago | (#21473395)

it was filled with things in ram, most likely because malloc was used to get the ram needed to link the image, and they didn't bother to clear it, calloc would have cleared it for them

Re:Avoiding the malloc() (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21473419)

Wow, you are pedantic AND redundant. Climb upstairs and fuck your mom's beef-hole, you fat fuck.

Re:Avoiding the malloc() (5, Informative)

billcopc (196330) | more than 6 years ago | (#21473329)

When you're a ROM developer, you don't think in such terms. It's all about mapping this and interleaving that.

Rather than writing the extra few lines to calculate the padding required, set up a 0-filled buffer and truncate the first (or last) buffer, rounding up the fwrite call to 2mb requires 0 extra lines.

Besides, they don't expect many people to actually look at the ROM code. This emulation craze is fairly recent.

Re:Avoiding the malloc() (5, Insightful)

Carrot007 (37198) | more than 6 years ago | (#21473509)

> This emulation craze is fairly recent.

What? I really mean it what?

I remeber running sonic (megadrive) on a low end pentium (133) back in the day, albeit with no sound.

I also remeber using various earlier emulators on my amiga before that (speccy and such).

Maybe you have a differnet definition of recent than me though.

Re:Avoiding the malloc() (2)

KDR_11k (778916) | more than 6 years ago | (#21473595)

A pentium 133 is recent compared to this. When I got my Gameboy my PC was a C64, a bit later we got a 386. Sure, we weren't cutting edge but the best you could get at the time was a really early 486 IIRC.

Re:Avoiding the malloc() (0)

Anonymous Coward | more than 6 years ago | (#21473665)

Link's Awakening was released in 1993...

Re:Avoiding the malloc() (2)

Dogtanian (588974) | more than 6 years ago | (#21473767)

A pentium 133 is recent compared to this. When I got my Gameboy my PC was a C64
That as may be, the game in question was released in *1998*. I bought my Pentium 233 PC that same year- and even then there were much faster processors available.

Re:Avoiding the malloc() (4, Informative)

kevmatic (1133523) | more than 6 years ago | (#21474051)

First release of Zsnes was in 1997. It was designed to run on 486es, and was written in heavily optimized ASM.
NESticle was also released in 1997. These pretty much sparked a craze, and lead to the creation of the Emulation Community and its Golden Age was pretty much in full swing by the middle of 1998.

It has pretty much died, but Zsnes is still under very active development and the new pSX Emulator has revitalized Playstation emulation since ePSXe hasn't been updated in years and leaves MUCH to be desired.

http://www.romhacking.net/ [romhacking.net] for info on ROM hacking.
http://psxemulator.gazaxian.com/ [gazaxian.com] for pSX Emulator. Try it!

Re:Avoiding the malloc() (1)

PhoenixFlare (319467) | more than 6 years ago | (#21474291)

and the new pSX Emulator has revitalized Playstation emulation since ePSXe hasn't been updated in years and leaves MUCH to be desired.

Thanks for this link - had just yesterday decided to try and get espxe working again, 2 hours of tweaking settings didn't achieve what the new one does with no setup besides the gamepad configuration.

Re:Avoiding the malloc() (2)

iamhassi (659463) | more than 6 years ago | (#21474255)

"That as may be, the game in question was released in *1998*."

actually the color-added version was released in 1998 but the original came out in 1993 [wikipedia.org], and since you can play the 1998 version on the old monochrome gameboy methinks it's not truly a title that was entirely redone for the gameboy color and it makes me question whether this left over code could also be found in the 1993 monochrome version of Link's Awakening.

Re:Avoiding the malloc() (0)

Anonymous Coward | more than 6 years ago | (#21473875)

Except that this is about a Game Boy Color game. The Game Boy Color was released in 1998, by which time most gamers had Pentium IIs.

Re:Avoiding the malloc() (5, Insightful)

Anonymous Coward | more than 6 years ago | (#21473855)

"Maybe you have a differnet definition of recent than me though."

No, he just apparently has a different definition of "craze" to you. Being the only person in your state to emulate a megadrive on a low-end Pentium without sound doesn't mean that's when the emulation craze started. That was just you pushing the boundaries of what was available at the time. The average gamer wouldn't have understood you back then if you said the word "emulation" to them.

Only in recent years have so many people been emulating earlier consoles and arcade games on their home PCs, with pretty faithful representation of the original experience.

Re:Avoiding the malloc() (1)

Anonymous Coward | more than 6 years ago | (#21474663)

I've had roms for nintendo and snes for over a decade.

Remember Snes9x?

It's been around and well known for a LONG time, you just seem to have been out of the loop.

Re:Avoiding the malloc() (3, Interesting)

PhoenixFlare (319467) | more than 6 years ago | (#21474117)

Same here, I used to run all sorts of SNES games in ZSNES on a 200 MHz Pentium, at normal speed. Heck, I even managed to get a NES emulator running on a 20 MHz 386 with 2 megs of RAM....Only at about 30% speed, but still.

Re:Avoiding the malloc() (1)

SynapseLapse (644398) | more than 6 years ago | (#21474163)

The parent's point is still valid.
The game boy color hit the market in 1998 and modern video game emulation was just starting to take off about then.
When the developers were working on the Zelda DX they weren't concerned with emulation. Their code has gone unnoticed for 9 years now. Emulation has been around for decades. The emulation "craze" is far more recent.

Re:Avoiding the malloc() (1)

uofitorn (804157) | more than 6 years ago | (#21473197)

RAM contents aren't necessarily zeroed on reboot. In fact, researchers found that physical memory retained data for as long as 30 seconds while powered off on certain laptops.

Re:Avoiding the malloc() (2, Funny)

LiquidCoooled (634315) | more than 6 years ago | (#21473295)

In my first experience with IT, our technology teacher (who was also the metalwork guru) tried to show us the source code to the program.
He spent about 30 minutes loading the (BBC micro) computer and flicking the power switch to try to see under the hood.
"If you do it really fast it comes up and shows you the code"

Incidentally he was also the teacher who taught us about the wankel engine, I am not sure which caused a bigger laugh.

Re:Avoiding the malloc() (1)

zippthorne (748122) | more than 6 years ago | (#21474189)

Um.. the Wankel engine works. There's one in the Mazda RX- series.

Re:Avoiding the malloc() (1)

LiquidCoooled (634315) | more than 6 years ago | (#21474309)

A group of 12-13 year old lads don't care if something "works".
The name set the tone for the entire lesson and every single reference was followed by the entire class breaking down in fits of giggles.
As for the technology itself I never once disparaged it.

Re:Avoiding the malloc() (0)

Anonymous Coward | more than 6 years ago | (#21474313)

Wooosh, you wanker!

Re:Avoiding the malloc() (2, Funny)

arashi no garou (699761) | more than 6 years ago | (#21474377)

I'm pretty sure the laughing was due to the name of the engine and not the question of its efficiency or practicality. Personally I am a fan of rotary engine technology.

Re:Avoiding the malloc() (3, Informative)

antime (739998) | more than 6 years ago | (#21473937)

Malloc isn't the only culprit - some old DOS-era linkers would directly allocate disk blocks but not clear them, so whatever old content that wasn't overwritten remained in the final binary.

Re:Avoiding the malloc() (1)

jmv (93421) | more than 6 years ago | (#21474543)

I guess the only way to really avoid the malloc() calls grabbing your source code would have been to compile, then reboot to link...

How about:
- Using calloc() instead of malloc()
- calling memset() after malloc()
- Using a good ol' for loop

You make it sound like writing (zeros) to memory wasn't invented at that time!

Whoops... (3, Funny)

foldingstock (945985) | more than 6 years ago | (#21473007)

Awesome. :) This must be why they always say not to code whilst drunk.

Re:Whoops... (5, Funny)

mouse_8b (854310) | more than 6 years ago | (#21473141)

Awesome. :) This must be why they always say not to code whilst drunk.
Who says that? They should be shot.

Not true (5, Informative)

Megane (129182) | more than 6 years ago | (#21473067)

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.

Re:Not true (4, Funny)

Kjella (173770) | more than 6 years ago | (#21473117)

Now the site is Wordpressed (like Slashdotting, only the other way around) and you can't get to it,
Uhh, the wordpress site is down and slashdot is up - that's a classic slashdotting. A "wordpressing" would be if the wordpress blog linked to slashdot, and enough people came to slashdot to bring slashdot down (good luck on that).

Re:Not true (1, Interesting)

Anonymous Coward | more than 6 years ago | (#21473143)

Hang out on digg more often, where blogs (powered by wordpress) are linked all the time. A site running wordpress dies after 5 hits, from cpu usage not network usage, and hence the site is "wordpressed". It's backwards because the site is doing it to itself really, not because of slashdot traffic.

Re:Not true (1, Insightful)

Anonymous Coward | more than 6 years ago | (#21473235)

The term DOSsed is sufficient.

Re:Not true (1)

noidentity (188756) | more than 6 years ago | (#21473467)

Or something anyone would understand: overloaded. "The server was overloaded with all the visitors."

Re:Not true (0)

Anonymous Coward | more than 6 years ago | (#21473883)

That kinda was the point of calling it wordpressed. It's not overloaded with visitors, it's overloaded with Wordpress. What good is a content management system which can only serve a few users at a time.

Re:Not true (4, Interesting)

Bert64 (520050) | more than 6 years ago | (#21474041)

Yes, wordpress is rather inefficient...
How do php accelerators such as eaccelerator affect it, and what level of hardware would you need to handle a significant load of wordpress hits?

Partially Not Not true (4, Insightful)

hxnwix (652290) | more than 6 years ago | (#21473187)

Now the site is Wordpressed
When slashdot brings down a site running Apache, we call it slashdotting, not Apache-ing. When slashdot brings down a site running wordpress, we call it slashdotting, not wordpressing.

the original doesn't have any of the code in question
Are the other games mentioned also trainered?

"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").

Re:Partially Not Not true (2, Insightful)

dattaway (3088) | more than 6 years ago | (#21473373)

Wordpress has rightfully earned this term. Wordpress is so script intensive that nearly every web page on a server farm, that a few concurrent hits causes the load average to soar. Wordpress may be responsible for a significant portion of electricity usage in data centers. Want to kill every virtual account on a server? Install Wordpress.

Re:Partially Not Not true (1)

OverlordQ (264228) | more than 6 years ago | (#21473525)

Wordpress has nothing on older versions of moveabletype.

you're both wrong (0)

Anonymous Coward | more than 6 years ago | (#21474523)

Movable Type is extremely resource-intensive while rebuilding pages, but it then serves the pages as static files. OOTB it's much better suited to handling traffic. If an MT site is slashdotted it's because Apache fell down, not MT (unless everyone's visiting, then leaving comments or running searches). MT doesn't enter the picture until content is updated. WP does as soon as someone tries to view a page.

Still, while WP can be a bit server-intense, this is typically due to poorly-written plugins rather than the core. And if you install any of the caching plugins it can perform very well indeed.

Re:Partially Not Not true (0)

Anonymous Coward | more than 6 years ago | (#21473761)

What is the name for your particular annoying brand of stupid?

Re:Partially Not Not true (4, Funny)

ConceptJunkie (24823) | more than 6 years ago | (#21473897)

Now the site is Wordpressed

When slashdot brings down a site running Apache, we call it slashdotting, not Apache-ing. When slashdot brings down a site running wordpress, we call it slashdotting, not wordpressing.

Except Wordpress comes pre-Slashdotted for your convenience.

Re:Not true (3, Informative)

eulernet (1132389) | more than 6 years ago | (#21473319)

Agreed.
The 'disassembled' routines are simply a filling routine with register D and a copy routine.
As a Z80 developer, you really don't need to disassemble this kind of routines.

I guess the source code parts come from the intro, and its coder was not very good either. For example: CALL/RET instead of JP or disassembling a copy routine, and keeping it called L_B000_2914.

Also, (1)

schnipschnap (739127) | more than 6 years ago | (#21473409)

Gamepack ROMs were up to 8 Mbits in size (http://en.wikipedia.org/wiki/Game_Boy), while the article says something about padding a 2 MB ROM with random stuff. Hmm.

This is a non-story (4, Informative)

Dwedit (232252) | more than 6 years ago | (#21473097)

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.

Re:This is a non-story (0)

Anonymous Coward | more than 6 years ago | (#21473399)

Agreed, for this particular Zelda my collection has it labeled as(md5 agrees with the article's md5):
Translations/Legend of Zelda, The - Link's Awakening DX (J) [C][p1][T-Chinese][!].zip

I *think* the (J) in the file name means that they used the Japanese copy as a source.

So, if it was an unofficial translation done by some group(or ambitious fan) it shouldn't be as much of a surprise that that it was disassembled.

Re:This is a non-story (0)

Anonymous Coward | more than 6 years ago | (#21473441)

Dang, should have looked at this before I posted that, of all the Zelda DX copies/translations/hacks I have, all of them are 1048576 byes in size (1MB) *except* that Chinese one. (18 different versions, covering from a few hacks, unofficial translations, to official translations and different versions of the game (1.0, 1.1 that type of versions))

The Chinese one, is the only 2MB (2097152 bytes) in size.

Re:This is a non-story (0)

Anonymous Coward | more than 6 years ago | (#21474499)

This would be a non-story if it were ton the original, too.

What could you possibly do with the code in the 90s? Normal people didn't have a rom reader or writer or whatever and if you intented to make pirate copies, you could as well have copied the binaries.

It happens (5, Funny)

Diomidis Spinellis (661697) | more than 6 years ago | (#21473103)

This used to happen more often than one would expect. In the 1980s I found portions of Ashton Tate's Framework II source code in "blank" sectors of floppy disks containing printer drivers. Those were the days where:
  • each application came with its own display and printer drivers,
  • people were using floppy disks to move around source code, and, worse,
  • other people had enough free time to trawl "blank" sectors for interesting tidbits.

Re:It happens (4, Funny)

urcreepyneighbor (1171755) | more than 6 years ago | (#21473205)

other people had enough free time to trawl "blank" sectors for interesting tidbits.
Eh? I still do that.... Then again, I am urcreepyneighbor....

Re:It happens (2, Interesting)

KDR_11k (778916) | more than 6 years ago | (#21473645)

That's nothing, I bought a pack of supposedly empty 5.25" disks for my C64 in a store, when I looked at them without formatting it turned out they were all filled with warez. Different warez, even, not the same for all disks.

Re:It happens (5, Funny)

PCM2 (4486) | more than 6 years ago | (#21473705)

A company I worked for once participated in the beta test program for Adobe Illustrator ... I think it was version 7. We were primarily a Mac shop, so we were using the Mac versions of the CD-ROMs they sent us. One build they sent us had a funny property... when you put the CD-ROM in the drive, the Trash can would turn full. Oh but wait -- before you old Mac people start going "ho ho ho," there wasn't actually anything important in the Trash can. But that's when I noticed that a couple of extra folders would appear on the desktop, too. ;-) In one of those was about 340MB of source code for Adobe Illustrator, Dimensions, Streamline and some other stuff.

About four days after we received this particular build (and I had noticed its interesting attributes) I got a call from Adobe:

Adobe: There are problems with the latest build of Illustrator. We need to recall those CD-ROMs immediately.

Me: Gosh ... sounds bad. Problems?

Adobe: Yes. We will be sending you a prepaid FedEx return envelope. It's extremely important that you return those discs to us right away.

Me: I see. Oh, my. Look ... can you tell me what the problem is? It's not a virus, is it?

Adobe: I can't really say. It's a technical issue. But if you've installed Build 378468434 on any of your equipment, you should un-install it right away.

Me: Oh, dear. Oh, dear oh dear. I will do so, ma'am, immediately. It ... it wouldn't damage any of our systems, would it?

Adobe: Um... you should be OK. But, just to be on the safe side you should be sure to uninstall it from any of your machines and make sure you send those CDs back to us right away.

Me: Yes ma'am, will do.

Adobe: Thanks, have a nice day.

Me: (pushes eject button on CD-R burner, grabs a Sharpie)

Re:It happens (1)

laughing_badger (628416) | more than 6 years ago | (#21474057)

Wouldn't happen to have the source for Framemaker would you? I'd love to get that working under OSX...

Re:It happens (1)

PCM2 (4486) | more than 6 years ago | (#21474107)

Wouldn't happen to have the source for Framemaker would you? I'd love to get that working under OSX...


Haha, no. And, given that this was probably around 1997, I doubt that the code would be of much use to you anyway. If I remember right, what I got was neatly organized into CodeWarrior projects, but it wasn't complete, i.e. it wouldn't actually build a binary.

Re:It happens (1)

grub (11606) | more than 6 years ago | (#21473947)

Ohh... I really did like Framework. We used that along with dbase III at a few workplaces back them. The two worked together nicely (for the time anyhow)

Re:It happens (4, Interesting)

Deadstick (535032) | more than 6 years ago | (#21474141)

Ashton-Tate wasn't above having somebody ELSE's code in their products either. When they wrote the "laser burn" copy protection routine for dBase III, they needed to put a hook in the BIOS -- which wasn't so easy in those days of expensive memory, because the BIOS used to run directly from ROM instead of being shadowed out into RAM. So they wrote their own BIOS -- by which I mean, they copied some 700 bytes of the IBM Fixed Disk BIOS (which was published in the PC-XT user manual), added the hook, and then hid the dirty deed under an encryption routine that was absurdly simple (although very tedious on a floppy machine) to penetrate.

It was obvious they knew they were writing a pirate product, because they went through the code and swapped arithmetic and logical shift instructions wherever they were certain to produce identical results, presumably in order to get the fraction of identical bytes down.

rj

Not too uncommon (5, Interesting)

0123456 (636235) | more than 6 years ago | (#21473163)

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 :).

Re:Not too uncommon (2, Interesting)

Anonymous Coward | more than 6 years ago | (#21473417)

I purchased the game "Pirates of the Caribbean" a few years back. My original Sid Meier's Pirates was corrupted and the new one was not yet out. The game was not very good at all. However, when I looked at what was on the disk, there were several files with a .c and .h extension. Sure enough the disc had a lot of source code on it. I am not sure if it was the entire game and I do not know which box I packed it in the last time I moved, so I cannot find it at the moment. However, I remember seeing the C code for that game on the disc I purchased at a retail store.

Re:Not too uncommon (5, Interesting)

vranash (594439) | more than 6 years ago | (#21473647)

Having that game (Which was actually Bethesda's Sea Dogs 2 rebadged before release.) It had a *TON* of files with it, although I think they were lua-scripts or something, not actual c-code. Regardless they had a lot of options available in them for modifying core components of the game. You could change your characters starting stats, name, ship type, etc. Given the somewhat frustrating land-side swordplay, I ended up having more fun tweaking the game than playing it.

Having reminded me, I may have to dig it out sometime soon and see what else it's got going.

Re:Not too uncommon (2, Funny)

rucs_hack (784150) | more than 6 years ago | (#21473835)

I bought a bbc model B just to play elite when both where pretty new, and found a text record of a conversation in the BBCs CMOS (think it was there, that was what I was playing with when I found it).

It was two guys sending text back and forth talking about the legs on a woman who'd just entered the office. It was pretty well buried. I'm guessing they just forgot they'd been clowning around and it got left in when the BBC was put into production. I did write it down at the time, but this was in the eighties...

I can't recall how I found it exactly. It was late, I was hacking about trying to find something I could alter as a joke on a friend, and there it was. It made I chuckle.

I gave the BBC away eight years ago, along with Elite (still had it, and it still worked:). Didn't take me long to regret it. For one thing I'd be able to go find that conversation again now.

Re:Not too uncommon (1, Informative)

Anonymous Coward | more than 6 years ago | (#21474481)

The BBC model B didn't have CMOS ram. The operating system ROM did have a chunk of text in the memory-mapped IO area. It read:

(C) 1981 Acorn Computers Ltd.Thanks are due to the following contributors to the development of the BBC Computer (among others too numerous to mention):- David Allen,Bob Austin,Ram Banerjee,Paul Bond,Allen Boothroyd,Cambridge,Cleartone,John Coll,John Cox,Andy Cripps,Chris Curry,6502 designers,Jeremy Dion,Tim Dobson,Joe Dunn,Paul Farrell,Ferranti,Steve Furber,Jon Gibbons,Andrew Gordon,Lawrence Hardwick,Dylan Harris,Hermann Hauser,Hitachi,Andy Hopper,ICL,Martin Jackson,Brian Jones,Chris Jordan,David King,David Kitson,Paul Kriwaczek,Computer Laboratory,Peter Miller,Arthur Norman,Glyn Phillips,Mike Prees,John Radcliffe,Wilberforce Road,Peter Robinson,Richard Russell,Kim Spence-Jones,Graham Tebby,Jon Thackray,Chris Turner,Adrian Warner,Roger Wilson,Alan Wright.

The BASIC ROM didn't have room for any extra text; the only cruft in the whole 16K is the name "Roger" in the last five bytes. The optional disk filing system ROM doesn't have any extra text either (I just checked).

I don't know what you saw, but it wasn't a standard part of the BBC micro.

Malloc clears? (1)

4D6963 (933028) | more than 6 years ago | (#21473219)

While modern operating systems will always clear all malloc()ed memory, so that you cannot get to other processes' data

What do they mean by clear the memory? Because when I malloc() (and not calloc()) I seem to get whatever was there before..

Re:Malloc clears? (4, Informative)

0123456 (636235) | more than 6 years ago | (#21473401)

"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).

Re:Malloc clears? (4, Insightful)

mikael_j (106439) | more than 6 years ago | (#21473765)

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

Re:Malloc clears? (3, Insightful)

Tony Hoyle (11698) | more than 6 years ago | (#21474249)

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.

Re:Malloc clears? (1)

multipartmixed (163409) | more than 6 years ago | (#21474485)

Thanks. I was beginning to think NOBODY online today understood a modern(ish!) VM subsystem.

The rest probably got distracted looking at the dirty pages.

There's more (5, Interesting)

Kayamon (926543) | more than 6 years ago | (#21473251)

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.

Re:There's more (1)

mrbobjoe (830606) | more than 6 years ago | (#21473945)

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.
It is common for Gamecube games to include .map files, which name every function in the game executable.

Mingw32 for the Advance SDK? (0)

Anonymous Coward | more than 6 years ago | (#21473303)

From TFA:

"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")


So the GameBoy Advance SDK uses MinGW32 and Newlib? Neat!

PC-Engine CD-ROM (1)

JensR (12975) | more than 6 years ago | (#21473361)

I remember looking at a PC-Engine CD-ROM ages ago - I think it was Golden Axe - that contained bits and pieces of the source code as well. Probably for the same reason.

In 1978, on cassette tape (2, Interesting)

localroger (258128) | more than 6 years ago | (#21473403)

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.

so... (0, Offtopic)

hitmark (640295) | more than 6 years ago | (#21473533)

what can be seen as a life saver om hardrives (that by default, "deleted" files are still there but not part of the file system) can be a troublesome issue in ram?

oh wait, not zeroing a hardrive can be bad, if one sell of a old one...

Does anyone else... (5, Funny)

achenaar (934663) | more than 6 years ago | (#21473555)

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.

not a new phenonemon (0)

Anonymous Coward | more than 6 years ago | (#21473901)

Old-time ZX Spectrum guy here. IIRC there was some (assembly) source code embedded in the original release of Manic Miner. I guess that would be around 1982... nothing new here :) I remember seeing that and thinking it was pretty cool. (the source code was removed when Software Projects re-released the title... 1983 I think)

FoxPro (5, Interesting)

Anonymous Coward | more than 6 years ago | (#21474031)

Posted anonymously to hide my shame of working with visual FoxPro.

FoxPro, I discovered after shipping our product for 2 years, didn't really compile anything when you made an .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.

Re:FoxPro (2, Interesting)

Shados (741919) | more than 6 years ago | (#21474447)

Java and .NET are almost like that. I mean, you need a decompiler, but the compiled bytecode is so close to the source, you can replicate the original fairly well from the bytecode, thus why many many commercial softwares ship with obfuscated binaries.

Beatmania Best Hits (3, Interesting)

Myria (562655) | more than 6 years ago | (#21474127)

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.)

opensource (5, Funny)

Paul_Hindt (1129979) | more than 6 years ago | (#21474379)

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?
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...