“...a few polygons and a few rules, they're incredibly versatile.”
March 2, 2020 2:25 PM   Subscribe

How Crash Bandicoot hacked the original PlayStation [YouTube] “Memory was so short in Crash Bandicoot that I took to stealing little bits and pieces of extra memory from the Sony libraries. I would like just try erasing parts of them that I thought I wasn't using and see if things still worked. If they did, I would mark them as available and I just hacked their code by just changing the byte codes. I'm like, you can do this. Look, I fixed it. If they wouldn't fix it for me, I was just gonna like edit their code. It was free memory. The memory was finite. But you were definitely not supposed to do that.” [via: Ars Technica][Full Transcript]
posted by Fizz (29 comments total) 26 users marked this as a favorite
 
I just wanted to say thanks for including the transcript. :) I never could play the game, but remember the sound design being pretty cool.
posted by Alensin at 2:45 PM on March 2, 2020 [8 favorites]


I'm always fascinated by the tricks that programmers use to hack the limitations of the hardware they are working with, especially from back in the day when necessity is literally the mother of invention.
posted by Fizz at 2:50 PM on March 2, 2020 [1 favorite]


Crash was an early example of dynamic difficulty: if you repeatedly died it'd start changing nearby boxes to include masks that let you take a hit, and eventually a full checkpoint. It was arcane enough that players didn't feel condescended to.
posted by Merus at 2:55 PM on March 2, 2020 [8 favorites]


The game holds up really well too. I have a remastered HD trilogy on the Switch and it's a ton of fun.
posted by Fizz at 3:06 PM on March 2, 2020 [1 favorite]


This is a terrific video. It reminds me of so much with tinkering around computers just at the threshold of what would be come possible in those years. Everything seemed so wide open and possible, if you just could come up with the right approach...
posted by meinvt at 3:40 PM on March 2, 2020 [3 favorites]


It was free memory.

itsfreerealestate.gif
posted by zsazsa at 3:50 PM on March 2, 2020 [16 favorites]


Is this the spot for a repost of the "Story of Mel"?
posted by aleph at 3:52 PM on March 2, 2020 [6 favorites]


1994. It was still the time of heroes, though they no longer had to draw their own sprites on graph paper.
posted by RobotVoodooPower at 4:21 PM on March 2, 2020 [4 favorites]


So now that there is that transcript I can note that there is one very important bit of "hacking" that I am really surprised didn't make it into this video:

Awrite, so Crash got a super-lush look to its levels by constantly pulling geometry and textures and whatnot off the disc while you were going through the level, right? Gavin goes into some detail about this in the video. But what they didn't mention is that nobody had thought about using the disc this much; Sony had assumed that everyone would only hit the disc, like, once at their initial game load, and a few more times for each play through a game. And they had designed the whole thing around a disc drive designed for a certain number of reads in its expected lifetime. X reads per game times Y games times Z games over the expected lifespan of the console, plus a fudge factor, they were sure it'd be fine. But then Naughty Dog brought them this crazy game that was constantly reading stuff off the drive while it was playing. It was loading a lot more than Sony thought anyone would do in one game. A lot more. Like, several orders of magnitude more.

They did the math. You'd blow through that expected number of reads for the entire lifetime of your Playstation before you came anywhere near finishing your first play through of Crash. Was this gonna be killing drives?

They released it anyway, and the drives turned out to be a lot more durable than they'd been rated for. Thankfully.

(I would swear this was mentioned in Gavin's series of blog posts on the making of Crash but I can't find it now.)
posted by egypturnash at 5:38 PM on March 2, 2020 [39 favorites]


I watched this the other day and I was like jaw-on-floor level impressed about how they did shit with this machine that the manufacturer didn’t even really know how to do...when no one really knew how to use this shit at all. Wow.
posted by capnsue at 6:19 PM on March 2, 2020 [1 favorite]


Somewhat more involved follow-up reading would have to include Racing the Beam, now on the Internet Archive, about the completely bananas compendium of shenanigans that was programming the Atari video game system.
posted by range at 8:20 PM on March 2, 2020 [5 favorites]


you were going through the level, right?

Naughty Dog wasn't the only crew to take that approach: ONE also used asynchronous loading in 1997, and apparently this was common at the time?
posted by pwnguin at 9:39 PM on March 2, 2020


True fact: Andy Gavin added a Lisp to the game code so that they could rapidly iterate on the gameplay.
posted by suetanvil at 9:52 PM on March 2, 2020 [4 favorites]


Aleph, Story of Mel was the first thing I thought of.
posted by Horkus at 10:10 PM on March 2, 2020


i kind of miss doing software where i had to care about every single byte, and could get big noticeable improvements from shaving off literally one
that was for big website scale, but from talking with my friend (who works for Naughty Dog!) he felt like my experience was close to that of being a game dev
posted by flaterik at 11:02 PM on March 2, 2020 [2 favorites]


Oh wow! It's great to put a face to a name I've heard so much about. The world streaming for Crash is one of those perfect bits of game tech for me.
posted by inpHilltr8r at 11:06 PM on March 2, 2020


Greenspun's tenth rule: Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
posted by Harald74 at 2:08 AM on March 3, 2020 [5 favorites]


While I appreciate the hackerly sentiment behind this, I was dismayed to hear him say that they had patented the virtual-memory approach to dynamically loading game assets and code. Like, that's what virtual memory is for. You may as well patent using a bag to carry your shopping!

But in the 90s you could take any pre-existing patent, append "...but on the Internet!" to it and get it approved. Software patents threatened to logjam the entire industry for a while, and we forget how many trivial and obvious things were levered (leverage is a noun, people!) by patent trolls over the subsequent two decades.
posted by rum-soaked space hobo at 4:20 AM on March 3, 2020 [8 favorites]


I didn't like the trash talking against Mario at the end, I mean look where Mario is now and look where Crash is, but I was pleased to see Nintendo's Japan-first emphasis really bit them for the N64. Of course, the N64 didn't need CD streaming tricks because all its data was stored in ROM, but it was also, until the end of the system's lifespan, much reduced in terms of maximum game size.

One secret, by the way, of current-day gaming is that some games, even now, are much much smaller than their disks,although of course it depends on the game, and there are some hugely gigantic games out there too.

My particular favorite example of a game that streams data in off disk is Metroid Prime back on the Gamecube. Sometime when you shoot a door in that game it doesn't open right away, but takes a second. This is because that game used doors to mask loading times; if the program hadn't gotten all the data for the next room into memory the door would delay opening until it was ready. Speedruns of the game have to take this into account.

Software patents are rightfully called a scourage on computing. My personal least favorite examples are when Namco got a patent on minigames you could play during loading screens (thus players got used to just waiting bored while initial data loaded) and, supposedly (I've heard at least one person scoff at this item and I got it through hearsay anyway so who knows), that Sega patented the gameplay of Crazy Taxi and used that to get the similar-playing Simpsons Road Rage off the market.
posted by JHarris at 5:31 AM on March 3, 2020 [4 favorites]


Great video. Thanks for posting this.
posted by donpardo at 7:55 AM on March 3, 2020


They released it anyway, and the drives turned out to be a lot more durable than they'd been rated for. Thankfully.

Welllll except that early Playstations did end up frequently failing at the optical head, particularly in the focusing/height springs.

Leading to the innovative home brew fix to put in a disc, close the lid, invert the entire unit so the optical head was hanging upside down on those worn out springs and then hitting the power button so a disc would actually be able to be read and loaded.

I didn't like the trash talking against Mario at the end, I mean look where Mario is now and look where Crash is, but I was pleased to see Nintendo's Japan-first emphasis really bit them for the N64.

Yeah, Crash was fun but it wasn't really free ranging 3D platforming despite wanting to claim the title as first 3D platformer. Crash was really more like 2.5 D or very restricted 3D with very linear play and in the video they talk about using that as a way to work within the limitations and keep graphics load times and sizes down.

The first time I played Mario 64 - and I know this was true for a lot of people - it was so good it was like a religious experience even with the clunky camera controls. You could run around in any direction and do really astoundingly acrobactic things quite easily where Crash was much more limited and difficult. The UI and controls for Mario 64 were pretty amazing with all the different things Mario could be made to do like grabbing on ledges, hanging overhead from grids/ladders, slide attacks, wall jumps and so much more, and there was a really constant level and rate of progression of difficulty that spanned the entire game world, including going back to the earliest levels only to discover that there were much more difficult things to do there, too, like collecting all the red coins, or all 100 of the yellow coins in each level.

I'm actually having difficulty remembering all the different moves Mario could do in 64. I think it's up there in the multiple dozens of different moves and states between the triple jumps, speed jumps, back flips, dive slides, punches, butt-bombs and so on.

If the original Tomb Raider controls and action list were this good it would have been so much more fun to play.
posted by loquacious at 8:18 AM on March 3, 2020 [4 favorites]


While I appreciate the hackerly sentiment behind this, I was dismayed to hear him say that they had patented the virtual-memory approach to dynamically loading game assets and code. Like, that's what virtual memory is for. You may as well patent using a bag to carry your shopping!

The funny thing is, I went looking and found the patent because I was curious about the details of how the process worked -- like how, specifically, the spaces are partitioned to mark the areas where you need to start loading the next zone, whether there's the potential for thrashing in the case of pathological user input and how you might mitigate that, etc. -- and the patent has none of that. It is literally just a verbose description of the idea of dynamically loading assets. Luckily, it is very clear about how the CPU 112 communicates with the GPU 114 over the system bus 144. What a joke.
posted by invitapriore at 10:52 AM on March 3, 2020 [9 favorites]


A friend of mine was a game developer in that era (PS1 and PS2, IIRC; possibly some Nintendo platforms or Sega platforms as well) and has some interesting war stories. One title he worked on (Paris-Dakar Rally for the PS1, IIRC) could only store a small part of the map in the console's RAM, with the rest being on the slow disc; my friend devised a somewhat complicated heuristic which anticipated which part of the map would be needed in the near future, with the effect of eliminating most of the waiting.

The PS2 was by all accounts more of a nightmare to code for; the PS1 was not too far architecturally from the DECstation it had been bootstrapped from, and recent consoles look a lot like gaming PCs (with the exception of the Switch, which looks like a phone/tablet), but the PS2 heralded an era of radical experimentation, with everybody who had to develop for it as a guinea pig. The core of the system was a DMA controller which shuffled data between the CPU and a cluster of coprocessors, and a PS2 program was essentially a bill of logistics for it, with payloads attached. Apparently the reason that there was a steep jump in the quality of PS2 games a few years after it came out was because that's how long it took for developers to figure out how to properly develop for it.
posted by acb at 3:56 PM on March 3, 2020 [2 favorites]


Apparently the reason that there was a steep jump in the quality of PS2 games a few years after it came out was because that's how long it took for developers to figure out how to properly develop for it.

Amazing that Sony's response to this was to up the bar on this even further with the PS3!
posted by invitapriore at 4:46 PM on March 3, 2020


Also in doing a little bit of googling on that I came across this article about developing for various consoles, and I love this sentence from the PS2 paragraph: "There are so many amazing things you can do, but everything requires backflips through invisible blades of segfault."
posted by invitapriore at 4:47 PM on March 3, 2020 [3 favorites]


Amazing that Sony's response to this was to up the bar on this even further with the PS3!

I thought the PS3 was at least more conventional, in the sense that it's coordinated by the main CPU rather than the PS2's bizarre arrangement of dedicated coprocessors.
posted by acb at 5:40 PM on March 3, 2020


Conventional in the sense that it had a conventional GPU and could run unoptimized ports of 360/Windows games poorly on the PowerPC core alone, without engaging any of the SPEs. Using the SPEs effectively is anything but conventional. It's more like working with 6 DSPs running in parallel or maybe old school GPU shader compute before CUDA and OpenCL. Quick at certain things, but with all kinds of fun quirks, at a time when people had little experience with writing multithreaded software.
posted by wierdo at 6:57 PM on March 3, 2020 [1 favorite]


The business about disc player wear was at least tractable. I don't know exactly how Sony made the decisions, but once it became apparent that the assumptions aboud drive use weren't going to be good if the company went with Crash Bandicoot, the trade-off between upping the spec on the unit versus the cost of not doing so, in the context of the revenue from the game being a success, makes for a fairly simple spreadsheet. You're basically revising your build to get a performance boost that will enable a new class of game. And I bet the enhanced wear resilience cost cents in volume, especially given the rapid advance in production engineering with optical drives at the time.

As for patenting the loading in of bins of resource... Sinclair Research once had a storage device called the Microdrive, which was an endless loop of very narrow videotape in a postage-stamp sized cartridge than ran past a fairly ordinary tape head. It was... not good. For lots of reasons. It kinda made sense in the days when floppy disk drives were very expensive, but by the time the Microdrive had been through enough engineering revisions to be reliable, those days had gone.

However, one of the techniques that evolved during the process of maturation was called scatter loading, and it coped with the problem that if you took too long to process a sector and missed the next you had to wait for the loop to go around, with hideous performance consequences. I forget the details, thank goodness, but both the tape and the memory architecture involved multiple small bins of data that were loaded asynchronsouly with the main program operation. A decent patent lawyer, if scatter loading had been patented, would have undoubteldly been able to extract blood from whoever owned the IP behind CB's technique - not because the one was a development of the other or even particularly conceptually close, but because the cost of defending the action would have been greater than the benefits even of winning. I've seen that at first hand, where a large US university did a number on a mixing desk company over the latter's first all-digital design, due to the uni having some DSP patents. The uni freely admitted in discussions with the company that the patents didn't apply and that the uni would probably lose, but that the numbers said that the company would be better off paying a million dollar one-off licensing fee no matter what. And they were right, and got their money, and it was basically extortion.
posted by Devonian at 2:17 AM on March 4, 2020 [3 favorites]


It's more like working with 6 DSPs running in parallel or maybe old school GPU shader compute before CUDA and OpenCL.

Which is to say also before the unification of vector and pixel shader cores as explicit compute shaders? How in the world did that work? Did you just program in a shader language and then interpret frame buffers as your output?
posted by invitapriore at 11:13 AM on March 5, 2020


« Older People make classification schemes and Nature...   |   City of Smiles Newer »


This thread has been archived and is closed to new comments