I worked on the Metal Gear Solid port from PSX to PC, and Konami programmers chose a wild trick to store how the "C4" bomb was planted - either on the wall, or on the ground.
Essentially the pointer pointed to the same physical memory address, but if it was planted on the wall (or on the ground, I forgot) - then it was OR-ing it with 80000000h or was A0000000h - or maybe something else - lol was long time ago.
It was fun porting this on PC, and right now I don't even remember what I did exactly - hahaha
boricj 11 minutes ago [-]
Usually, that kind of stunt nowadays is done by using the lowest significant bits and masking them off when dereferencing the pointer, trading off for a higher alignment (so 4 bits gives you 16-byte alignment).
The PS1 also happens to have RAM aliasing, because there's not enough RAM to cover the entire decoding window for the RAM. I don't know the details, but I've seen PS1 executables setting their stack pointer to the end of the devkit's 8 MiB of RAM and yet they work on retail units, because it ends up at the end of the retail's 2 MiB of RAM. So theoretically, you could stuff bits in there too (and without messing with different memory regions with different cache behaviors).
So? That was 5-7 years ago. I haven't seen this before, so I appreciate it being posted :)
MrDOS 3 hours ago [-]
Yep! Just that the post title should have a (2019) in it. Or maybe (2021) or (2025), given the most recent revision dates.
kthartic 2 hours ago [-]
Fair enough!
giancarlostoro 2 hours ago [-]
Not only that, for a device from 1995... It's still amazing to learn about this, its not as if most people will read this once, and remember everything on the page in one go.
brcmthrowaway 2 minutes ago [-]
I love a pre-Claude article
Forgeties79 5 hours ago [-]
Love Copetti. Even as someone who is not particularly knowledgeable of everything he’s talking about, I I really enjoy thumbing through his writing and diagrams. There’s just something really fun about trying to understand what is going on under the hood with these machines, especially fifth and sixth generation consoles
rideontime 42 minutes ago [-]
Copetti enjoyers should also checkout everything Fabien Sanglard has done, including the Wolfenstein and Doom Black Books, the Another World port analyses, and the other dozens of code reviews he's posted. https://fabiensanglard.net/
dnnddidiej 5 hours ago [-]
1994 always gets me too. It feels like they are more a late 90s thing.
tapoxi 4 hours ago [-]
They didn't launch outside of Japan until late 1995, so most people got one in '96.
kaycebasques 4 hours ago [-]
Which means that we're really talking about hardware from 91-93, right? I.e. if launch was 94 then they were designing in 91-93ish.
doubled112 5 hours ago [-]
PS2 didn't come out until 2000. Most of the games I remember are from later too.
Scroll_Swe 4 hours ago [-]
These articles are always excellent.
PS1 games do not hold up so good, but PS2 games uprezzed to 1440p-4k are basically perfect imo.
boricj 4 minutes ago [-]
Graphically, either play on a CRT (or with CRT filters) or use an emulator that has PGXP geometry correction to eliminate vertex jittering at higher rendering resolutions.
As for gameplay, that console has a massive library, with thousands of commercially released games (and a lot of hidden gems). I'd be surprised if any gamer wouldn't find at least one to their taste in that catalog.
Narishma 4 hours ago [-]
They hold up pretty well when you play them as they were originally supposed to: on a CRT if you can or using emulators' CRT filters if you can't. Trying to play them at very high resolutions on crisp LCD displays is the worst way to go IMO.
babypuncher 2 minutes ago [-]
What I find truly ironic is how CRT shaders work best on a 4k display with good HDR performance.
4k lets you scale the image and insert scanlines without scaling artifacts and with enough extra pixels to make the scanlines feel properly soft.
HDR lets the shader compensate for the brightness lost to the CRT filter without desaturating the color.
patmorgan23 2 hours ago [-]
Yeah, any 8/16-bit pixel are t wasn't made to be viewed on a screen with that high a resolution. CRTs smoosh/blur the image a bit so you don't see all the hardlines.
stuxnet79 3 hours ago [-]
> They hold up pretty well when you play them as they were originally supposed to: on a CRT if you can or using emulators' CRT filters if you can't
On the emulator side I would definitely recommend Duckstation. It's performant, has great UI / UX and also has a CRT filter available by default that more or less recreates the original look, even slightly warping the image to make you feel like you are staring into a TV tube.
hmry 3 hours ago [-]
It's interesting how different it is from the N64, which was seemingly designed to produce perfectly correct pixels even though no player would own displays that could really show the difference. I guess that's what you get when you let SGI design the GPU.
stuxnet79 3 hours ago [-]
> PS1 games do not hold up so good
Eeh ... speak for yourself. PS1 did mark the dawn of the 3D era for home consoles. There are lots of people who are into the low poly 3D models with the characteristic PS1 "wobble".
Sure a lot of it may be nostalgia but it does have its charm and I can say it's grown a lot on me over time. Especially once I learned about the PS1's unique hardware limitations. If my social media feed is anything to go by "PS1 graphics" are having a bit of a revival with lots of people trying to recreate that look.
Dwedit 2 hours ago [-]
I had the N64. It did not wobble. Seeing a Playstation in action with its wobble was so weird.
thenthenthen 3 hours ago [-]
It is quite amazing to me to see the specs and what developers managed to squeeze out of that!
stuxnet79 2 hours ago [-]
Yes an entire generation of games running on a mere 2MB of RAM and 1MB of VRAM.
The crazy thing too was how much a step up PS2 was compared to PS1 in terms of available compute and sheer horsepower. But even that wasn't enough for a sandbox game like GTA 3 to run without a lot of clever tricks [1]
Love the 2D games of the PS1 era. I still replay Mega Man X4/5/6 every once in a while.
vortegne 4 hours ago [-]
Did read this years ago and read it today again. Just so happy that there are people producing such quality work. Even if I personally don't know much about any of it, I still find myself being totally sucked in while reading.
I worked on the Metal Gear Solid port from PSX to PC, and Konami programmers chose a wild trick to store how the "C4" bomb was planted - either on the wall, or on the ground.
Essentially the pointer pointed to the same physical memory address, but if it was planted on the wall (or on the ground, I forgot) - then it was OR-ing it with 80000000h or was A0000000h - or maybe something else - lol was long time ago.
It was fun porting this on PC, and right now I don't even remember what I did exactly - hahaha
The PS1 also happens to have RAM aliasing, because there's not enough RAM to cover the entire decoding window for the RAM. I don't know the details, but I've seen PS1 executables setting their stack pointer to the end of the devkit's 8 MiB of RAM and yet they work on retail units, because it ends up at the end of the retail's 2 MiB of RAM. So theoretically, you could stuff bits in there too (and without messing with different memory regions with different cache behaviors).
PS1 games do not hold up so good, but PS2 games uprezzed to 1440p-4k are basically perfect imo.
As for gameplay, that console has a massive library, with thousands of commercially released games (and a lot of hidden gems). I'd be surprised if any gamer wouldn't find at least one to their taste in that catalog.
4k lets you scale the image and insert scanlines without scaling artifacts and with enough extra pixels to make the scanlines feel properly soft.
HDR lets the shader compensate for the brightness lost to the CRT filter without desaturating the color.
On the emulator side I would definitely recommend Duckstation. It's performant, has great UI / UX and also has a CRT filter available by default that more or less recreates the original look, even slightly warping the image to make you feel like you are staring into a TV tube.
Eeh ... speak for yourself. PS1 did mark the dawn of the 3D era for home consoles. There are lots of people who are into the low poly 3D models with the characteristic PS1 "wobble".
Sure a lot of it may be nostalgia but it does have its charm and I can say it's grown a lot on me over time. Especially once I learned about the PS1's unique hardware limitations. If my social media feed is anything to go by "PS1 graphics" are having a bit of a revival with lots of people trying to recreate that look.
The crazy thing too was how much a step up PS2 was compared to PS1 in terms of available compute and sheer horsepower. But even that wasn't enough for a sandbox game like GTA 3 to run without a lot of clever tricks [1]
[1] https://youtu.be/cIbCxbrBCys?si=cLMr4-7ubGD4fNWi