News for hackers. Stuff that matters.
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @07:04AM (#22442187)
Admittedly way less thorough/cool than the YouTube video, but we created a limited pre-emptive multi-tasking system on the original Playstation to run our physics engine at a constant frequency. Sony US and Sony Japan said it couldn't be done.

We eventually figured out how to use the vertical blank interrupt to save all the registers, modify the return addres to return from the interrupt to our physics code, then our physics code would run (not in the interrupt context), then restore the registers and longjmp back to the main game code which had been originally interrupted by the vertical blank interrupt.

This wasn't general-purpose pre-emption and had only fixed divisors of the screen refresh rate available, but was enough to get our physics engine to run close to isochronously.

Side note: our game was comparatively terrible and I remember being in awe of what the Crash Bandicoot team accomplished in gameplay and graphics.

Re:How Crash Bandicoot hacked the original Playstation [video] by weinzierl on Friday February 28, 2020 @09:55AM (#22443136)
Sounds awesome and reminds of the good old times. I don't know much about consoles but in the home computer era, a ton of the awesome stuff was accomplished by clever trickery triggered by interrupts generated by the electron beam.

The Commodore 64 for example could trigger an interrupt at an arbitrary screen position and not just H-blank or V-blank. We used to call these raster interrupts. Graphics on the screen border, simultaneous graphics and text mode, split screen effects, more than 8 hardware sprites and the light pen were all things that were only possible on the C64 because of that capability. If you want to learn about this check out Shallan50k on Twitch, he does awesome streams about these techniques. The Acorn is a good counterexample of a much more powerful machine which lacked the ability to do raster interrupts and that is in my opinion one major reason the Acorn had relatively poor graphics.

Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @10:17AM (#22443293)
I cut my teeth on the Atari 8-bits, where we used vblank and hblank interrupts for all kinds of tricks like you described. The inspiration for this solution came directly from that experience.

Side note: I was always jealous of the way better sound hardware on the C64. It's also crazy to me to think that I paid probably around $1000 in 1981 dollars (equivalent of $3500 today) to buy an 8-bit computer with 48K of RAM.

Re:How Crash Bandicoot hacked the original Playstation [video] by jlarcombe on Friday February 28, 2020 @11:06AM (#22443694)
Yes. It's possible to do on the Acorn but few games at the time took the trouble to do so. It requires very accurate cycle counting. There have been a number of recent demos that take things to the next level though, and someone has even got raster interrupts working on the Electron, which is frankly astonishing: https://www.youtube.com/watch?v=PUl1SGUSkbI
Re:How Crash Bandicoot hacked the original Playstation [video] by weinzierl on Friday February 28, 2020 @11:26AM (#22443881)
I've also heard that there is a hardware mod to give the Acorn true raster interrupts.
Re:How Crash Bandicoot hacked the original Playstation [video] by ddingus on Friday February 28, 2020 @03:31PM (#22446053)
Like the Apple 2, having so much logic exposed, due to use of discrete logic chips, there are mods to do lots of things.
Re:How Crash Bandicoot hacked the original Playstation [video] by dmbaggett on Friday February 28, 2020 @06:07PM (#22447255)
That is super cool. At the time -- I was like 12 -- all those horizontal and vertical blank hacks on the Atari 800 seemed like total black magic to me. I had no idea you could even hook the VBLANK or HBLANK interrupt on PS1. Wow.
Re:How Crash Bandicoot hacked the original Playstation [video] by someperson on Friday February 28, 2020 @07:49AM (#22442399)
Which game was this?
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @08:02AM (#22442455)
NASCAR Racing - https://en.wikipedia.org/wiki/NASCAR_Racing_(video_game)

Even as the tech lead on the product, I have to agree with the critical commentary in the PSX section of that page. Our company's stock in trade was realism and it hurt us with the mainstream gamers on the PC side, but was even more severely limiting on the console audience. (We also didn't crush it on the execution side on the PSX port.)

Re:How Crash Bandicoot hacked the original Playstation [video] by 6374532 on Friday February 28, 2020 @09:54AM (#22443132)
This was one of my favorite games to play as a kid. I played it for many hours. The physics, engine sounds, in-car view were really impressive. It is still my favorite racing games to this day. It left a greater impression on me than any other racing game I played since. One question I had is, why weren't cars able to flip upside down in the game? This wasn't a large negative, as the the way the cars crashed and showed damage was quite good. I laughed so much as a kid playing this game, it was pure excitement for me.
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @10:28AM (#22443380)
The coordinate system for the race management/graphics engine in that game was a 2D system (and in fact was (lat, long) on the track, rather than (X,Y)). We'd convert the (lat, long) into (X, Y, Z) coordinates, take into account the banking and track surface under each tire [painted lines were slightly more slippery than asphalt], do all the physics computations, then cast the (X, Y, Z) back to (lat, long) to send it over to the race/graphics world.

Why? Longitudinal measurements are natural for "who's in the lead?" type of questions and all of our track editing tools also worked in lat/long coordinate space.

Re:How Crash Bandicoot hacked the original Playstation [video] by unwind on Friday February 28, 2020 @10:55AM (#22443589)
Just to clarify, do you mean polar coordinates [1]?

That would absolutely make sense for a game centered (heh) around racing around a closed track, clever!

[1] https://en.wikipedia.org/wiki/Polar_coordinate_system

Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @11:08AM (#22443720)
Not exactly. Polar is r-theta. The system we used was an x-y system, but one where the coordinate system alignment changed for each track segment. So, think of a world where a straight line in y ["longitude"] was projected into a constant path relative to the centerline of the track's racing surface.

(While most NASCAR tracks are ovals and could be represented in polar coordinates fairly naturally, they do have some road courses and the physics and game engine originated in the IndyCar game, which has even more road courses.)

Re:How Crash Bandicoot hacked the original Playstation [video] by raverbashing on Friday February 28, 2020 @11:31AM (#22443937)
Wow, that's amazing, a lot of time spent on that game :) Thanks for a great game!

Your coordinate system make sense, and the 3D engine/physics was pretty good for something running on CPU only. (If I remember there was only one or two non-oval tracks)

Re:How Crash Bandicoot hacked the original Playstation [video] by apearson on Friday February 28, 2020 @10:28AM (#22443384)
I share somewhat the same memories. I remember putting hours and hours into that game to see what was possible and what were the limits. One of the earliest memories I have of figuring out how software works and what it's limits are.
Re:How Crash Bandicoot hacked the original Playstation [video] by jakearmitage on Friday February 28, 2020 @11:02AM (#22443658)
Dude, you have to blog about stories like these. It's amazing. Don't underestimate how interesting and fascinating your experience is!
Re:How Crash Bandicoot hacked the original Playstation [video] by EvanAnderson on Friday February 28, 2020 @01:58PM (#22445297)
Based on the grandparent poster's comment below re: the coordinate system and physics engine I have to second this comment. I never played this game and have little interest from a gaming perspective, but I'd love to hear about it from a development perspective.
Re:How Crash Bandicoot hacked the original Playstation [video] by Lutzb on Friday February 28, 2020 @08:12AM (#22442511)
I have to use this opportunity: Thank you for all the great IndyCar and Nascar titles released over the early years of the PC platform. The Papyrus racing title hold a very special in my heart/childhood.
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @08:21AM (#22442557)
Thanks! There's definitely a cult following and a lot to be proud of, but I have to say that Dave, Randy, Adam, John, Matt, Charles, Anne-Marie, and the rest of the team deserve 99+% of the credit. I played but a bit part (and really enjoyed every moment of it).
Re:How Crash Bandicoot hacked the original Playstation [video] by LoSboccacc on Friday February 28, 2020 @10:08AM (#22443235)
one of my most memorable quotes from childhood is not the halo theme but

"I'm Paul Page, from papyrus, this is Indy car racing two"

Re:How Crash Bandicoot hacked the original Playstation [video] by ploek on Friday February 28, 2020 @08:09AM (#22442492)
Oh wow!

For reasons unbeknownst to me, my father had that game for the PC. It was one of two games in our household at the time (The other being "Mario Is Missing!" https://en.wikipedia.org/wiki/Mario_Is_Missing!).

I played that quite a bit, but I think I spent most time painting the car, because I wasn't any good at the actual racing.

Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @08:18AM (#22442545)
Yeah, you have described the essence of the problem. The game was quite realistic, enough that rookie Cup drivers would use the product to get familiar with tracks they'd not yet raced on, but that level of realism made it not so fun for the casual gamer. (It turns out that racing cars at the top professional level is actually hard and not something you pick up in 15 minutes.)

We would go to NASCAR events, weigh and measure car components, talk to the crews/drivers, and most of us even got the first level of competition license (typically 3 full days of classroom and on-track instruction and then 3-6 more days of individual mostly track time) so we understood what driving a racing car near, at, and slightly over the limit was like.

The PSX product introduced a feature that later made it back to some of our PC titles, called "Arcade Mode". It was still racing (in that skill mattered), but arcade mode gave the cars far better braking, allowed them to slide and pivot more but spin out less (by changing tire slip curves), and gave drag reduction to cars that were losing the race. We also introduced the smoky burnout/donut ability which immediately made it into the PC title (but had a bug that caused a smoky burnout to be the fastest way to launch the car from a standing start, which critics [rightly] hated).

At the end of the day, fairly few people are interested in very realistic racing. (Many of the ex-Papyrus team are over at iRacing now and they're on the ultra-realistic side of things.) If you want to sell a mass-market game, ultra-realism doesn't sell as well as fun and engaging gameplay.

The end state of this drive for realism was https://en.wikipedia.org/wiki/Grand_Prix_Legends which I worked on some of the early code for, but left before it shipped. Even in the early stages, with the best computer and graphics card of the day, a full set of physical controls (including force feedback steering), it was difficult to drive the car around for a single lap at 9/10ths pace, let alone race them in traffic.

Re:How Crash Bandicoot hacked the original Playstation [video] by burnte on Friday February 28, 2020 @09:41AM (#22443044)
Back then you could still sell PCs as a small shop and make money. I had a guy buy an entire PC custom built just for that game. I remember him and this game very clearly because I was cycling, dislocated my kneecap, and had to go to the ER, so his delivery was delayed. I found him in my driveway when I got home from the ER. he looked at my leg in a brace and said, "Oh, I'm so glad you're actually hurt!" He though I was scamming him and waited for me to see if I was really injured.
Re:How Crash Bandicoot hacked the original Playstation [video] by J5892 on Friday February 28, 2020 @03:16PM (#22445925)
Ha. The guy's train of thought was clearly, "If this guy's legs aren't broken, they're going to be."
Re:How Crash Bandicoot hacked the original Playstation [video] by siver_john on Friday February 28, 2020 @11:00AM (#22443647)
I remembered attempting to play this game on my Dad's playstation as a kid and always crashing. Glad I can now blame it on the fact the game was "too" realistic and not my poor skills as a young child. (But let's be honest it was definitely the fact I was a young kid who had no clue what I was doing). This was a fun memory to walk down though so thanks for that!
Re:How Crash Bandicoot hacked the original Playstation [video] by mirsadm on Friday February 28, 2020 @09:05AM (#22442810)
Thanks for taking the time to write that! It's super interesting. Have you stuck with games dev since then?
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @09:15AM (#22442882)
No. If I wanted to stay in games, I’d have 100% stayed with that crew at Papyrus then Sierra and then gone to iRacing with them. Excellent colleagues all around: super talented, super interesting to work and eat/BS with.

I wanted a family and financial security and the game industry wasn’t going to take me where I wanted to go (and I worked on generally successful titles for a successful company; most game devs have it even worse). The Sierra Online acquisition was great; loved meeting and talking about games with Ken and Roberta, but then the subsequent spate of acquisitions just killed a lot of the joy and essence of what made the day-to-day work fun, so that also made it easier to leave.

Re:How Crash Bandicoot hacked the original Playstation [video] by InitialLastName on Friday February 28, 2020 @11:15AM (#22443782)
If it helps, one of those Indycar games got 6-year-old me into a sim racing addiction that has followed me for decades.

I went from driving backwards on track to make crashes happen (thanks for not making rules that stopped me from doing that!), to driving faster than anyone else (because my engine was turned up and I turned down the AI), to actually trying to race as my cognitive abilities (and interest in challenge) improved.

Re:How Crash Bandicoot hacked the original Playstation [video] by nwallin on Friday February 28, 2020 @10:18PM (#22448530)
It was bundled with the matrox millennium, which was the best video card available.

Unbenounced to 14 year old me, the matrox millennium had a flat shaded polygon 3d acceleration capability, which made NASCAR run pretty well if you turned textures off. (which is why it was bundled with the card) I kept textures on because I didn't know any better, and the game ran fairly poorly. Ultimately I never played it very much because the framerate was frustratingly low.

Damn shame. It was years later that I found that out. Of course I was terrible at it anyway, so it probably wouldn't have mattered anyway.

Anyway, that's probably why your dad had the game.

Re:How Crash Bandicoot hacked the original Playstation [video] by agumonkey on Friday February 28, 2020 @05:08PM (#22446867)
Oh you worked at Papyrus !

Man I spent so many hours playing the PC version (Matrox Millenia era) and the physics engine got me hooked (and the car body editor). Saving replays just to see how multi car crashes would look like (sometimes even self cancelling multi agent collisions)

A time traveling thanks

Re:How Crash Bandicoot hacked the original Playstation [video] by ndesaulniers on Friday February 28, 2020 @07:16PM (#22447648)
Ditto, I remember driving around the course backwards and wrecking all opponents. I probably spent many hours as a seven year old just doing that. So much fun!
Re:How Crash Bandicoot hacked the original Playstation [video] by agumonkey on Saturday February 29, 2020 @07:02AM (#22450167)
Same same, although my favorite was trying to bump opponents on there rear wheels, just enough so they'd make long drifts and chaotic spins.
Re:How Crash Bandicoot hacked the original Playstation [video] by ilikecakeandpie on Friday February 28, 2020 @09:50AM (#22443106)
FWIW my dad, who is a lifetime NASCAR fan, loved the realism
Re:How Crash Bandicoot hacked the original Playstation [video] by sokoloff on Friday February 28, 2020 @10:29AM (#22443391)
Cool. I'm not involved with the iRacing team at all, but they have a NASCAR offering and your dad may consider checking that out.
Re:How Crash Bandicoot hacked the original Playstation [video] by zelon88 on Monday March 02, 2020 @08:08AM (#22464021)
I remember playing this on DOS with my dad. It was one of the games that got me into computer gaming, so thank you for that. For me, personally this one was up right up there with Wolfenstein 3D and the Wing Commander series. One of my favorite parts of the game was decorating the cars with paint and decals. Papyrus also had Indy Car Racing which I also enjoyed.
Re:How Crash Bandicoot hacked the original Playstation [video] by beardedwizard on Friday February 28, 2020 @01:29PM (#22445063)
Dude this game was therapy for me as a kid. Thanks.
Re:How Crash Bandicoot hacked the original Playstation [video] by michaelgrafl on Friday February 28, 2020 @09:31AM (#22442989)
I think that's pretty cool.