Live data from Hacker News

Tetris-OS: An operating system that only plays Tetris

github.com

81–90 of 126 posts

Re: Tetris-OS: An operating system that only plays Tetris

#81

“In the 1980s with things like the Amiga computer, for example, every game was a boot disk. It booted into its own customized version of an operating system that ran what it needed to run to make its game work well and be performant and reliable. … We know that in the past, hardware that was very capable and very interesting made it so easy to create an operating system that literally everybody did it. Not a few peop…

It should be again like this. I only truly understood C after I wrote my own fully functional Operating System (e.g. paging, interrupts, user mode, multitasking and multicore etc.) and got it running on bare metal. Programming other things in C now often feels like when you beat the final level in recent Mario games ("Champions Road") and replay the core game again, it just flows is easy and highly enjoyable. I'd rec…

> It should be again like this.

OTOH the time of jumpers and dip-switches for configuring hardware state is over; I am not sure I want to give any gaming company any chance to persist not only in some management layer of my computer but also in peripherals.

Re: Tetris-OS: An operating system that only plays Tetris

#82
post #2

Youtube video that goes over the developer's experience making it: https://www.youtube.com/watch?v=FaILnmUYS_U

In my retirement, watching programming streams has been a guilty pleasure (drives my SO crazy), and this is one of my favorite channels. I especially loved their other video on making Minecraft from scratch* * - https://www.youtube.com/watch?v=4O0_-1NaWnY

I just do this in between, for procrastination.

Re: Tetris-OS: An operating system that only plays Tetris

#84
post #64

Earlier quoted context omitted.

I like to define an OS as something that can execute arbitrary binaries. So if your hypothetical Smalltalk OS has a defined executable format that non-Smalltalk programs can compile to, I’d call it an OS. Note that this also makes for example the uppermost part of the JVM an OS by my definition. I’d argue it’s not a completely incorrect characterization.

I think that definition is a bit too broad and too narrow to be useful. For too narrow: you might have a security focused OS that includes everything like a TCP/IP stack etc, but perhaps doesn't allow arbitrary binaries by construction. (Eg it might only allow binaries that come with a proof of innocence, or some other restriction that's harsh enough to lose the 'arbitrary' rating.) For too broad: https://en.wikipedi…

Obviously, "capable of running arbitrary binaries, but with a check inside exec() to allow only specific binaries run" counts as "capable of running arbitrary binaries".

Re: Tetris-OS: An operating system that only plays Tetris

#87

Earlier quoted context omitted.

I don't think it is essential that there be a clear boundary between an OS and programs. For example, you can have a Smalltalk-based OS, written in Smalltalk. The OS components are simply Smalltalk classes and methods. Your programs/utilities/applications would also be Smalltalk classes and methods. There needn't be any clear boundary between the classes/methods that belong to the OS and those that belong to programs…

I like to define an OS as something that can execute arbitrary binaries. So if your hypothetical Smalltalk OS has a defined executable format that non-Smalltalk programs can compile to, I’d call it an OS. Note that this also makes for example the uppermost part of the JVM an OS by my definition. I’d argue it’s not a completely incorrect characterization.

You've presented a conscientious criterion for what can be classified as an operating system. I think it's clever, I'm not sure I agree though. It's very broad: By this same definition any processor is an operating system, since it will execute arbitrary binary data. Your example of the JVM being an operating system calls to mind the above: It is a virtual machine, it is designed to execute arbitrary bytecode in a similar manner to a processor.

Re: Tetris-OS: An operating system that only plays Tetris

#88

Earlier quoted context omitted.

It should be again like this. I only truly understood C after I wrote my own fully functional Operating System (e.g. paging, interrupts, user mode, multitasking and multicore etc.) and got it running on bare metal. Programming other things in C now often feels like when you beat the final level in recent Mario games ("Champions Road") and replay the core game again, it just flows is easy and highly enjoyable. I'd rec…

I've wanted to do this but had some trouble finding a good reference. Do you have any resources you can share? Thank you! :)

The resource that got me started on this topic was: https://wiki.osdev.org/Main_Page

There's some decent tutorials available on here that provide a good introduction to the topic.

Re: Tetris-OS: An operating system that only plays Tetris

#89

“In the 1980s with things like the Amiga computer, for example, every game was a boot disk. It booted into its own customized version of an operating system that ran what it needed to run to make its game work well and be performant and reliable. … We know that in the past, hardware that was very capable and very interesting made it so easy to create an operating system that literally everybody did it. Not a few peop…

Yet many of these self-booting disks would quite happily work when copied to a reboot-persistent RAM drive (the RAD: drive), which showed that although it was claimed that they did all the OS-ey things themselves, actually there was still quite a lot of the original OS still running there.

At the core of it, the AmigaOS exec was tiny and helpful, and things like device drivers were just separate processes that you sent messages to, so it would make sense to make use of them, but just not bother loading all the other stuff that makes up an OS.

Post reply on HN