11 ms·
Notris: A Tetris clone for the PlayStation 1
- laweijfmvo 2y agointeresting perspective of someone who is presumably quite competent in javascript and learning/seeing c for the first time. i guess i'm just old but i'm used to everyone having exposure to c (or a c-style language) as their first language.
- badsectoracula 2y agoI am used to thinking that if i want to post code that "anyone" would understand it'd be in C but i wonder if nowadays JavaScript would be a better choice (as long as it applies to JS anyway) for a "lingua franca". (Python might be another choice but i don't really like writing it :-P)
- cubefox 2y agoOne problem with C or C style code like JavaScript is that it often uses opaque special characters like various different brackets where the meaning isn't self-explanatory. E.g. "if (A) {B}". This can be expressed more naturally with "if A then B end if" in pseudocode. Or another C offender: "a = b". In pseudocode this would typically be "a ← b" or perhaps "a := b".
- deleted 2y ago[deleted]
- HanClinto 2y agoExcellent accomplishment, and wonderful writeup! I appreciate the quote at the bottom of the article: > Those of us who love computers need to have something slightly wrong with us, an irrationality to our rationality, a way to deny all the evidence of our eyes and ears that the hostile box of silicon is dead and unyielding. And fashion by cunning machinery the illusion that it lives.
- pragma_x 2y agoThat and this wonderful tongue-in-cheek advice: > Writing your own PlayStation game in C is actually very simple: all it requires is to make no mistakes whatsoever.
- minasmorath 2y agoAnother great reminder to the rest of us that simple and complex are not analogous to easy and hard.
- deleted 2y ago[deleted]
- pwillia7 2y agoI saved that quote too!
- spicyjpeg 2y agoI'm late to the party but, as a prolific contributor to PSn00bSDK and the PS1 homebrew scene more in general, I feel obliged to shamelessly plug my own "PlayStation 1 demystified at the absolute lowest level" repo: https://github.com/spicyjpeg/ps1-bare-metal https://github.com/spicyjpeg/ps1-bare-metal It's still very work in progress - I have only covered a tiny fraction of what the console's hardware can do - but I find it fascinating to explore how little code you actually need to get started on such a simple platform, even with no external SDKs or tools (aside from a completely standard MIPS GCC toolchain).
- seism 2y agoProps for doing a self organised retro hardware hack and writing up in so much glorious and gory detail! You might mention some of the PSX game jams on itch.io and GGJ for those preferring a more social setting.
- stodor89 2y agoIn case someone wants a PS1 programming course in 2024: https://pikuma.com/courses/ps1-programming-mips-assembly-language https://pikuma.com/courses/ps1-programming-mips-assembly-lan...
- atan2 2y agosecond that. i'm taking the pikuma.com course and it is WAY better than i first thought it would be.
- rgbrgb 2y ago> Last year I got my hands on a rare, black PlayStation 1. This is called a Net Yaroze and is a special console that can play homebrew games as well as ordinary PSX titles. It was part of a special Sony project to get hobbyists and students into the games industry. I wonder what the post-mortem on this initiative was like. Seems like they didn't pursue it in future consoles but dang it would be pretty cool if there was a hobbyist section of the PS5 store that anyone could put small games in.
- favorited 2y agoMicrosoft offers a an Xbox "developer mode" that lets users run their own software on their consoles. https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devkit-activation https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devk...
- paulmd 2y agoit's unfortunately quite gimped, basically UWP-only and running with the system capped to around 1/4th of the typical performance, so it's not really that useful. if the EU hadn't specifically exempted games consoles, it would be legally incompliant with the gatekeeping requirements.
- favorited 2y agoThe Net Yaroze had similar limitations. You couldn't access the disc drive, so all of your game's data had to live inside your executable binary, which needed to fit in RAM. It was hobbyist hardware, not intended to compete with actual dev kits, which were ISA cards that contained real PlayStation hardware, which you would slot into your PC.
- JD557 2y ago> Seems like they didn't pursue it in future consoles I don't think this is entirely true. Sure, there was nothing like the Net Yaroze, but the PS2 came with Yabasic[1] on the demo disk and had a Linux distro[2], and the PS3 also had a Unix support[3]. While some of this might have been for tax benefits, I still think it fits in the spirit of Net Yaroze. 1: https://en.wikipedia.org/wiki/Yabasic#PlayStation_2 https://en.wikipedia.org/wiki/Yabasic#PlayStation_2 2: https://en.wikipedia.org/wiki/Linux_for_PlayStation_2 https://en.wikipedia.org/wiki/Linux_for_PlayStation_2 3: https://en.wikipedia.org/wiki/OtherOS https://en.wikipedia.org/wiki/OtherOS
- djmips 2y agoI did a PS1 project for GGJ 2024 and found it rather difficult to do in the 2 days I allocated! I did get as far as building and running and used the ps1n00b. I'm the end I was able to burn a CD and launch into a 3D environment where you could fly around a checkerboard flat plane. Very exhausting but fun. Next time I'll budget more time for a PS1 project, especially 3D even if my original goal was just a simple flight around some very simple terrain I barely got anything working. Nevertheless it was magical to see the project boot on real hardware!
- dietrichepp 2y agoThat’s a difficult project. Congratulations for even getting a 3D environment you can fly around! My own experience is that it’s so difficult to make homebrew games not just because of the technical challenges you have to solve making the game, but also because of the poor experience with tools and debugging. Pretty soon, you find your project taking up more time than you can reasonably spare. I think it’s impressive when people manage to get something interactive working on these old consoles, anything at all beyond a “hello world” template.
- djmips 2y agoIndeed the art pipeline alone is a huge challenge - and particularly so on these first generation 3D consoles. There is some GL like aspects to the rendering side as well but with a _lot_ of idiosyncracies. I was sweating it. I feel like N64 would be slightly easier.
- dietrichepp 2y agoI’m not sure the N64 would be easier. The graphics hardware in the N64 is complicated. In some ways the console is really modern (perspective-correct texture interpolation, z-buffering, subpixel positioning). On paper, it seems a lot like a more modern system. But the hardware complexity is a beast. and the design is permeated with bottlenecks. Half of the graphics pipeline is taken up by the RSP, which is a fully programmable vector processor--sounds cool, but in practice it is unapproachable. 4 KiB of texture memory (and if you use a palette, half of it is the palette). RAM bandwidth is barely fast enough to handle 3D scenes. https://www.copetti.org/writings/consoles/nintendo-64/ https://www.copetti.org/writings/consoles/nintendo-64/ The folks working on LibDragon have done a lot of work to make homebrew a better experience, but you’ll note that support for 3D graphics is still only in a preview branch. https://github.com/DragonMinded/libdragon https://github.com/DragonMinded/libdragon
- TheMagicHorsey 2y agoIs there an open, simple, handheld gaming platform that is cheap, and has good documentation so hobbyists and kids can make games for it? I know people will say pick up a cheap Android phone. And perhaps they're right, but Android is not simple. It has so many things going on that you just can't write a C program and start playing with it. You have to learn a dozen Android quirks and deal with the Android operating system. Is there something where you can just upload a program to flash and the device just boots into the program and you start playing?
- lwansbrough 2y agoIdk if it’s the best recommendation in the space but there are consoles like the Miyoo Mini (and many more) that are capable of running anything from Atari to PSX in the palm of your hand.
- mindcandy 2y agohttps://www.lexaloffle.com/pico-8.php https://www.lexaloffle.com/pico-8.php
- snvzz 2y agoNot open. They specifically asked for open.
- clktmr 2y agoYou might want to take a look at the Analogue Pocket.
- snvzz 2y agoI'd rather suggest miSTer[0], rather than a parasite leeching on its ecosystem. 0. https://github.com/MiSTer-devel/Wiki_MiSTer/wiki https://github.com/MiSTer-devel/Wiki_MiSTer/wiki
- deleted 2y ago[deleted]
- 2y ago
- a-dub 2y agonotably sony also made a handful of "yaroze" units for hobbyist developers. you couldn't ship, but you could write, compile, run and i believe share within the yaroze community. yaroze was outside of my budget, but thankfully there was another option, there was a commercial game cheat device that could be reflashed with a "caetla" rom which when hooked up to the parallel port on a pc, could be used to ship binaries over from linux. the gcc-mips toolchain worked a treat and there was a header file laying around that implemented the user space wrappers for making system calls into the in-rom kernel. my fun exploratory project: porting the mpg123 decoder over to the psx1, thereby bringing mp3s to the living room. i was able to get it to decode one frame at a time very slowly on the r3000 (25mhz) cpu with no fpu, but didn't have the skill at the time to embark on an optimization project that maybe could have made use of the rudimentary graphics acceleration (it was some kind of limited integer math accelerator, iirc).
- jdboyd 2y agoI wanted one of those things so badly. It inspired me to buy a used DECstation 5000 to get my hands on something with an R3000 CPU to try writing code for the CPU until I could hopefully someday get a Yaroze. That idea didn't really go anywhere though. Thinking that the DECstation was a useful step towards a Yaroze was probably only wishful thinking. I wish I still had the computer, but then there are a lot of things I wish I still had.
- AlyssaRowan 2y agoYou didn't even need Caetla. You could do that straight-up with the original ROMs for some of the cartridge series (FCD), and X-Link from DOS (or, if you were prepared to get involved with a bit of spicy linux 2.3, bitbang the parallel port yourself from the /dev/ interface for it at the time, the protocol was really simple). You get a live memory monitor you can watch (made it really easy to make cheat codes or look inside stuff for fun), and you can write and debug anything you want - in many ways it was nicer than the official Psy-Q kit Sony adopted, I thought. Except to be fair, I didn't have a C toolchain, but R3000 assembly language is really nice when you get used to the delay slot.
- 2y ago
- herpderperator 2y agoIs there any information about the tilting in the demo video? How does that work?
- avensec 2y agoIt has to do with the laser being worn out. This method slows the CD motor down, helping the burned game be read. People have done it by pressing firmly on the lid, which puts pressure on the top of the spindle, causing motor strain. Some people put the whole unit on its side. Other methods include adding two CDs to the spindle, obviously with the data one on the bottom, to add the strain. There is also a 3D-printed weight disk people use at https://www.thingiverse.com/thing:4838168 https://www.thingiverse.com/thing:4838168 .
- herpderperator 2y agoHow does a worn out laser/motor affect how a burned game is read compared to the genuine discs? I don't follow.
- urbandw311er 2y agoPresumably the laser is dimmer and less efficient and therefore giving it more time to scan and read each bit compensates for this.
- recursivecaveat 2y agoI think burned discs are of lower quality generally, so that's the distinction.
- slowhadoken 2y agoI used to think writing a game to PC was the best idea but the more I write the more I respect consoles. Especially considering all the retro game preservation going on, both in terms of emulation and FPGA.
- m4tthumphrey 2y agoGreat write up and very interesting! Slightly off-topic but I literally just bought a PS2 purely to play the original Track and Field games. So much nostalgia! I really wish they would redo these games for the modern consoles!
- Robelius 2y agoThis is brining back memories of playing with my older siblings. For the long jump, I would smash the buttons as quick as possible and then my sibling would time (triangle?) to jump before the line....looking back at it they probably just wanted me to do the most tiring task.
- m4tthumphrey 2y agoThe button mashing is the best part! So many interesting techniques to get faster !
- BaculumMeumEst 2y agoGod damn do I love playstation 1. I just dug up my old PS4 controller, installed OpenEmu on my Mac, and started on Silent Hill 1. I used OpenEmu way back in the day, it was the best emulator experience I'd ever had. Glad to see it is actively supported and as good as ever.
- 101008 2y agoWait, is that easy? I have a Mac, and a old PS4 controller.
- newzisforsukas 2y agoYou need a PS1 bios and a rom or disk image as well.
- BaculumMeumEst 2y agoLike the other dude said you need a bios. OpenEmu will tell you exactly what files it needs and ask you to drag and drop them into the app window, you'll easily find them on GitHub. Other than that, it has all the emulators you'll ever need built-in, and controller pairing/config is super easy. For a PS4 controller, you just hold down the PS button and share button until the light starts flickering to put it in pairing mode, then bring up the bluetooth menu on your Mac to connect. The whole process is super quick and painless. The interface looks so good too. Add roms and you get a nice little UI with all the box art for each game automagically. I implore you to set aside a few minutes and give it a try, you won't be disappointed.
- 101008 2y agoI installed OpenEmu and evreything but I couldn't find supported games for PS1 :-( I downloaded a few 7z files, but when I tried to drag them to app they failed. I gave up
- commodoreboxer 2y ago7z is an archive format. You have to extract it first. PSX games will usually be an iso, a bin, or bin and cue files.
- lxgr 2y agoWhat a great writeup! For anyone wanting to dive deeper on the PS1 hardware, I can't recommend this writeup enough: https://www.copetti.org/writings/consoles/playstation https://www.copetti.org/writings/consoles/playstation It's part of a great series on various retro and not-so-retro game console.
- 486sx33 2y ago“More precisely: I was worried that if I tried to learn C, and failed, I'd discover that I wasn't actually a very good programmer after all.” To everyone reading HN: Most people feel this way when they step into something new. Please don’t ever let it stop you from trying
- commodoreboxer 2y ago"Sucking at something is the first step towards being sorta good at something."
- firesteelrain 2y agoCan the SDK used allow you to run the games in a PS1 emulator like Sony PS1 Classic ?
- philistine 2y agoEvery. Single. Tetris clone which has -tris in the title ends up receiving a very scary cease and desist. Rename your project if you don’t want to receive such a letter or worse, if you don’t want GitHub to be hit with a DMCA against your project. I know. It sucks.
- bena 2y agoMine never was. Literally called it “clonetris”.
- philistine 2y agoWell it seems you last released yours in 2002. That's literally 20 years ago. Things have changed a bunch since then.
- bena 2y ago> Every. Single. Tetris clone which has -tris in the title ends up receiving a very scary cease and desist. But I did the first and the second didn't happen. So not "Every. Single. Tetris clone which has -tris in the title". You emphasized that it will happen and has happened to everyone who did the thing. I'm literally an exception to your statement. Because they don't care if you're not looking to make money off of it.
- Nzen 2y agoThe author of Setris was obliged [0] to change its name to Sandtrix, when it exploded in popularity. [0] https://news.ycombinator.com/item?id=37218685 https://news.ycombinator.com/item?id=37218685
- atan2 2y agoThere was another good blog post on the PlayStation earlier this month: https://pikuma.com/blog/how-to-make-ps1-graphics https://pikuma.com/blog/how-to-make-ps1-graphics