8 ms·
PS1 Programming Course with MIPS Assembly and C
- jsheard 3y ago> We'll also learn how to use the official Sony Psy-Q libraries Is there not a cleanroom SDK for the PS1? I doubt Sony cares too much at this point, but selling a course which relies on leaked proprietary tools still feels a bit dicey. The Portal N64 demake got shut down because it used the leaked N64 SDK rather than cleanroom tools.
- ranger_danger 3y agoyes there are multiple, such as https://github.com/Lameguy64/PSn00bSDK https://github.com/Lameguy64/PSn00bSDK
- spicyjpeg 3y agoPSn00bSDK maintainer here. Unfortunately the project cannot really be considered clean room; the original versions of most libraries contained code that was either lifted straight from Psy-Q disassemblies or heavily inspired by them. I have since rewritten pretty much all of it (with the exception of the GTE library which still has some Sony code) using only Psy-Q API documentation as a reference, but the "ship of Theseus" nature of the rewrite makes it hard to argue that it is a clean and legally safe project. On the flip side, there are plenty of other open source PS1 SDK options that have been written from scratch, do not reimplement the same API as Psy-Q and can thus be considered clean for the most part. Here's a few of them: - https://github.com/grumpycoders/pcsx-redux/tree/main/src/mips/psyqo https://github.com/grumpycoders/pcsx-redux/tree/main/src/mip... - https://github.com/ChenThread/candyk-psx https://github.com/ChenThread/candyk-psx - https://github.com/cuckydev/CKSDK https://github.com/cuckydev/CKSDK - https://github.com/spicyjpeg/ps1-bare-metal https://github.com/spicyjpeg/ps1-bare-metal (shameless plug)
- ranger_danger 3y ago> using only Psy-Q API documentation as a reference Doesn't that mean it's not clean room? Since even having those docs in the first place would not be legal? I've seen others claim that clean room can only be an option if development was done without any input from anyone who has even read their docs, not just whether you have yourself or not. For example in the N64 world some might say development is forever tainted because it's almost impossible to get information that wasn't sourced somehow ultimately from the oman dump.
- VS1999 3y agoThat was interesting because the author didn't receive a legal takedown notice, and the request came from Valve instead of Nintendo. It's possible nintendo didn't care, and likely that sony cares less than nintendo.
- mrbungie 3y agoI think Nintendo cares a lot. In fact I think Nintendo gives so much fucks about its IP (of any kind, not only games/stories/characters, but also SDKs/APIs/console design/etc) that Valve fears any kind of association with potentially illegal or at least dubious origin software related to Nintendo. Remember Valve is a company that normally celebrates and promotes the modding community, even when using their IP directly (i.e. Black Mesa). Valve's decision was totally and exclusively because it included BOTH their and Nintendo's IPs in the equation.
- phire 3y agoI believe what happened is that Valve said something along the lines of: "We are a little concerned that Nintendo might object, you can only continue if you get an official notice from Nintendo saying they don't object." It's entirely possible that Nintendo don't care, but the chance of Nintendo agreeing to go on the record about such things is basically zero.
- boricj 3y agoIf you want a source-compatible reimplementation for modern systems there's https://github.com/OpenDriver2/PsyCross https://github.com/OpenDriver2/PsyCross
- ChrisRR 3y agoThey're definitely out there. They were just questioning whether it's a smart move to base your commercial endeavour around leaked tools.
- ranger_danger 3y agoCourse looks really cool, just wish it wasn't $100 but I know that's unrealistic to expect. It seems most people who want to get into video game programming are poor.
- VS1999 3y agoThe good news is that if you actually do make it into videogame programming, you're still poor
- iforgotpassword 3y agoBut you're getting a nice burnout on top!
- udev4096 3y agoAnd how we casually joke about it :)
- omoikane 3y agoMany modern game engines are free and less frustrating than SDKs for old consoles (e.g. a lot of common tasks are often built-in with new game engines, such as physics). For people who want to get into making games, I would recommend one of those game engines rather than paying $100. That said, I am not sure this course is targeting new game developers.
- danjoredd 3y agoAgreed. Godot, Unity, Unreal, etc. all are better options for beginners. Gamemaker Studio even lets you program for free...you have to pay to make an executable though. If someone is dead-set on making a game for PS1, there are free tutorials out there also: https://www.youtube.com/playlist?list=PLAQybJIBW2UtXJITyUTJipPFxC61Tt-Xv https://www.youtube.com/playlist?list=PLAQybJIBW2UtXJITyUTJi... You won't have as intimate knowledge of PS1 hardware as OP's course, but I think thats a better starting point than paying first and then stopping because you didn't already know programming and it turned out more involved than you thought it would be. Now I DO think that there is a place for a paid course like this. I can see the appeal of getting hyperfixated on extremely specific hardware such as this, and making some cool stuff for it. For that type of person, the 100$ is worth it.
- Solvency 3y agoAs a kid I always dreamt of coding for PS1 on one of those black dev console kits. As an adult.. boy I wish someone made a cozy Javascript transpiler to PS1 tool.
- dijit 3y agoI too remember being mesmerized by the image of the black PS1 “developer” kit. It truly captured my imagination and alongside the movie Hackers from 1995 is probably one of the reasons I ended up wanting to be associated with computers in my future as a child.
- spxneo 3y agoyaroze devkit costs upwards of $10,000 USD now
- sumtechguy 3y agoI just looked they are going from 800 to 10k. The 10k ones are the collectors ones where it is new in box (or at least complete in box). As long as you have the cables, console, and dev card you probably could get in at around 1-2k.
- sumtechguy 3y agoI have one of those yaroze things. I had all sorts of plans for it. Until I realized that the memory on the thing was identical to the size of the normal in store ones and getting at the CD for extra storage was basically broken at the SDK level. That made debugging 'interesting'. Even splurged for the codewarrior dev kit. It was a decent step down in tooling and memory that I could get on other platforms. Kind of fun for a bit.
- stuaxo 3y agoAbout 15 years ago, my friend got about 10 ps1s from a car boot sale, one of the ones from that day was a yaroze.
- 0xcde4c3db 3y ago
- pjmlp 3y agoTo note that PS1 was the first games console on the home market[0] to fully embrace C on its SDK, until then it was Assembly all the way, hence why so many studios were happy to jump into it. [0] - The arcades adopted it much earlier, and there were UNIX and VAX/VMS devkits with cross-compiling capabilities for them.
- boricj 3y agoI'm reverse-engineering a PlayStation video game that is rather unoptimized and I'm amazed that the game managed to do so much with such horrible game code. That SDK really was fairly forgiving for its time to new, inexperienced developers. Yet to squeeze out performance out of the in-order, single-issue 33 MHz MIPS CPU you had to be very mindful of low-level details. The 4 KiB instruction cache hates code bloat, the lack of data cache means spilling registers anywhere but onto the 1 KiB of scratchpad memory is costly, yet the god-awful C compilers of the era liked to do both of these things. That's just for the CPU, the rest of the system also has plenty of details you need to pay attention to for performance. I haven't actually programmed for the console, but the achievements done by talented developers such as Naughty Dogs on this dirt-cheap system are truly impressive. The console might be easy to develop for, but to make it really fly still takes a lot of skill.
- jonhohle 3y agoHave you published anything? There are a few games that I would love to be able to round trip between the original disc contents and a build with a few tweaks or experimental features. I know there is a Wipeout decompile/source leak, but having more examples is always wonderful. Something like the Mario 64 reverse engineering project has made the game playable effectively everywhere with the ability to take advantage of modern hardware (16:9 displays). It would be great to see efforts like that for any console.
- boricj 3y agoI'm documenting my progress on my personal blog (https://boricj.net https://boricj.net). Currently I'm in the process of porting data from a leftover SYM file onto a closely matching EXE, the next article should be out by the end of the week-end. Be warned, I'm going about this with a very different approach than most decompilation projects out there. I want to delink these executables back into working, reusable object files. The plan is to make a native Linux MIPS port on the cheap using PsyCross, then to rewrite each piece Ship-of-Theseus style until I have a complete, portable set of source code for the game. As for why I'm doing it this way, I've written about it here before: https://news.ycombinator.com/item?id=37165533 https://news.ycombinator.com/item?id=37165533. I've also written about the delinking process itself here: https://news.ycombinator.com/item?id=35738758 https://news.ycombinator.com/item?id=35738758.
- deleted 3y ago[deleted]
- Keyframe 3y agoI like the idea, and other courses seem solid in overview too. However, I'm put off by not being able to download the course. I understand it's my old-man mentality kicking in, but I just have this bug in my mind "what if it goes down", "I wanna watch this offline", "what if dude disappears"..). I also understand why there's no option for that. I don't know, anyone else have feelings like these in general? I'd have no issue if it was way cheaper, and I'd have no problem if it was somewhat more expensive if I could download. It's a weird feeling like that that ultimately did affect me not purchasing it. edit: I realized I wouldn't mind it if it was on a big platform like I don't know what would support it, steam? appstore? I know those won't go away and I have stuff there.
- deleted 3y ago[deleted]
- gustavopezzi 3y agoHi! Creator of the course here. This is a really good point, and I honestly did not consider someone's fear of a platform "disappearing" as a potential friction to buy before I read your comment. It makes total sense. I have been doing this for a while, so disappearing was not even in my thoughts. :) But I'll need to think about that and how to make it clear for everyone that visits the school. Thanks!
- fallat 3y agoRelease the videos as lower quality; maybe make the downloadable content not as nice to browse?
- toastercat 3y ago> I have been doing this for a while, so disappearing was not even in my thoughts. :) To be frank, this is not very re-assuring. Every platform that has ever gone offline has at one point told their customers something similar. It's also possible you may go offline for reasons outside of your control.
- 3y ago
- theogravity 3y agoDoes it also require a Net Yaroze? https://en.m.wikipedia.org/wiki/Net_Yaroze https://en.m.wikipedia.org/wiki/Net_Yaroze
- jonhohle 3y agoI started collecting obscure retro consoles almost a decade ago when Net Yarozes could be found for prices that weren’t completely outlandish. Now it’s common to see them on popular marketplaces for $700 or more. Their aesthetic is amazing. The PS1 holds up, imho, as one of the best looking Sony products and consoles of all time and the dark gray color way is a hint of what the next three consoles would look like.
- boricj 3y agoWith modern quality emulators like DuckStation, there's really no reason to use real hardware anymore as the primary target. Besides, you'd probably just have a standard PlayStation console with a modchip on hand and iterating with CD-Rs would be very slow and wasteful.
- Keyframe 3y agoFriend, today we have wonders like ODE and PSIO. No need to burn chemicals on a spinning disc anymore!
- tycho-newman 3y agoWill I learn how to run Crysis?
- transitivebs 3y agoIf anyone's looking for a solid MIPS assembly IDE, I wrote this one ~18 years ago in undergrad http://mipscope.cs.brown.edu http://mipscope.cs.brown.edu wow I'm getting old
- gustavopezzi 3y agoHi! Author of the course here. Thank you so much for sharing. :)
- boricj 3y agoHi, what prompted you to create a 25 hour course about programming the original PlayStation? Don't get me wrong, it's very cool that such a resource exists, but it is a rather peculiar topic for a course.
- gustavopezzi 3y agoHey. Good question! People think I'm crazy, but I promise you I'm very sober about my approach to my courses. I teach CS & mathematics at a university here in London. Empirically, I've noticed that students can find ways to be productive but they are seriously lacking the fundamentals. To be fair, it is nothing short of overwhelming to try and grok the fundamentals of computing using modern machines, modern OSs, and a modern dev toolchain. So what I try to do with the courses is to go back in time and limit myself with a closed hardware box that is still small and simple (compared to what we have today). Instead of using a fake instruction set, I can have students learn the basics of MIPS, use a very simple assembler, output binary code, and execute those instructions on a hardware that exists (or existed once). That allows me to explain about CPU architecture with real examples, talk about DMA, endianness, interrupts, and so many other concepts that students can read online but they don't really grok until they get their hands dirty with grease. Weirdly enough, so far it's been proven to be a good idea. It's definitely not for everyone, but if someone is at a stage of their career where they think it's fun to learn about RISC pipeline, fixed-point math, game physics, 3D graphics, compressing assets, computer architecture, etc., then I still think this type of course is valid! I'm positive that in 25 hours learning how to program the original PlayStation they'll learn a lot more about computer science than taking an expensive class to read about 'Digital Transformation' or something like that. To each, its own.
- boricj 3y agoThat really makes a lot of sense. Given the constraints, the PlayStation is indeed a good fit (if you want to be sadistic, I can't think of a worse fit than the Atari Jaguar with its numerous pipeline hazards inside its proprietary RISC processors). I do think using a modern SDK would streamline the experience without compromising on the authenticity, it might be a good idea to at least mention this option since the original Sony SDK is technically leaked tooling.
- marai2 3y agoThe author's Learn 3D Graphics Programming is one of those extremely rare courses that takes you from the basics and peels back the curtain to show you the Wizard. https://pikuma.com/courses/learn-3d-computer-graphics-programming https://pikuma.com/courses/learn-3d-computer-graphics-progra... One of the best courses I've ever taken. (Thanks Gustavo!) By the way Gustavo, with your talent for explanation, graphics and Maths, maybe you should do some courses on Machine Learning! (You'll make a lot of money ;-)
- gustavopezzi 3y agoHey, Gustavo here! Thank you so much for your kind words. I'm still deciding what to tackle next. I had a couple of ideas, but since my true background is really math I'll probably consider that. I'm not sure there's much money in what I do, but it sure it's a fun topic. Fun always trumps everything else at the end of the day. :)
- aidenn0 3y agoIf you're taking requests, I'd love a good linear-algebra refresher course. I recently ran into the term "eigenvector" in a professional setting and that's a word I hadn't heard since my freshman year of college, which is over 2 decades at this point.
- singlepaynews 3y agoIs this not adequately covered by khan academy?
- saboot 3y agoMore C stuff, I really enjoy learning these fundamentals using C. I did your game physics course in C and really enjoyed it. I'll be taking this course to learn more about 3D graphics and C together.
- johnnyanmac 3y agoSince you mentioned math: If you can unravel the 4D being that is a quaternion and explain it to mortals, I would shower you with all the money I have on hand. Also, it's probably premature but I would love some Rust courses in the context of game programming. I think that's something I'll need to pick up one day.
- deleted 3y ago[deleted]
- durpleDrank 3y agoI took this dudes Atari 2600 Course on Udemy cause it was only $13 bucks. It is awesome/great. Made the whole thing super simple to learn. Very idiot proof. It's too the point (which I find helpful).
- 0xPIT 3y agoWhat or whose lifetime do they refer to when they offer lifetime access?
- ketralnis 3y agomin(you, the website)
- spicyjpeg 3y agoNot directly related to the course, but, should anybody want to see what programming on the PS1 would look like using only modern tools (latest GCC, CMake, no third party libraries), I've written a few bare metal C examples that explain in depth how the console's hardware works [1]. Currently only graphics and input are covered, but I'm planning to add examples showing how to handle interrupts, play audio and access the CD-ROM next. [1]: https://github.com/spicyjpeg/ps1-bare-metal https://github.com/spicyjpeg/ps1-bare-metal
- gustavopezzi 3y agoGood mention! I actually list your username & your repo at the end of the course as suggested reading. PS: thank you for all the good help on the PSX Discord, as always.
- rafaelgoncalves 3y agoVery good resources, documentation for the tooling, thank you so much!
- mzs 3y agoNice, thanks but how do you run builds on an unmodified PS1 or PS2?
- codetrotter 3y agoOn a PS2 you can use FreeMCBoot memory card to run homebrew Buy one with FMCB preloaded from AliExpress, and take it from there https://consolemods.org/wiki/PS2:FMCB https://consolemods.org/wiki/PS2:FMCB And also check out for example MX4SIO as well You can buy one of those from AliExpress as well, but only certain versions of FMCB are compatible with MX4SIO out of the box
- spicyjpeg 3y agoThere are homebrew tools that can be installed on a PS1 memory card [1] and allow for executables to be loaded from a host machine into RAM through the serial port on the back of the console, in a similar way to what Sony's official Net Yaroze loader did back in the day. These tools can also use undocumented CD-ROM drive commands to disable region checks without the need for a modchip, provide semihosting (host filesystem access) and so on. On the PS2 it's slightly more complicated, as there is no way to launch the "native" PS1 backwards compatibility mode other than to use a modchip (or firmware mod on some models) and burn the executable onto a disc; the serial port is not exposed either, making debugging much harder. It can still be done, but it's much easier to just use an actual PS1. [1]: https://github.com/JonathanDotCel/unirom8_bootdisc_and_firmware_for_ps1 https://github.com/JonathanDotCel/unirom8_bootdisc_and_firmw...
- ketralnis 3y agoThere's something aging about "If you like retro programming & want to learn more about the early days of 3D games..."
- gustavopezzi 3y agoYou're not wrong. The average age of our students is... up there. I guess that's why people shared it on Hacker News and not on Tiktok.
- ketralnis 3y agoThe average age of me is up there :) I mean to say that any 3d programming being "retro" makes me feel old