Live data from Hacker News

Tetris-OS: An operating system that only plays Tetris

github.com

121–126 of 126 posts

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

#121

I wonder why the choice of SB16

Because it's widely supported by emulators, and supports the 16 bit sample size at the 48 kHz sample rate that is needed for high quality music, which is more than enough for Tetris. The SB16 also features FM synthesis, though this program doesn't appear to use it; it rolls its own wave table method. However, that would be a particular reason to target it specifically, rather than some more modern card that lacks FM…

non-PnP SB16 max out at 44.1KHz, only Vibra and later PnP models supported up to 48KHz.

The real reason is that SB16 is the lowest common denominator for DOS stereo compatibility with higher models. You might think SBPRo also supports stereo playback, but SB16, SB32, SB64, and SB128 do not support SBPro Stereo mode playback. SB16 DSP 4.x removed support for DSP 2.x 3.x "High Speed" modes. Anything using SBPro Stereo mode will not work in SB16 an newer at all.

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

#122
post #19

This is cool, but I think it's misleading to call it an operating system. It's Tetris that runs without an operating system, which is to say, on bare metal, old school. Writing programs that run on bare metal is a cool and worthwhile thing to do, but calling any such program an "operating system" is confusing. This probably sounds like I'm picking a nit, but I think it matters for the sake of newbies just starting to…

Alternatively, it's Tetris with bits of a minimal OS mixed in, just enough to support it, which is not unlike what a lot of OSs in embedded systems are like. A lot of software was written in this format several decades ago, including many games: https://en.wikipedia.org/wiki/Self-booting_disk https://en.wikipedia.org/wiki/List_of_PC_booter_games I think the boundaries are quite fuzzy; while something like the mask-RO…

It's a Tetris unikernel

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

#123
post #120

Earlier quoted context omitted.

Also if you take 1 generation step back into the 2600 or intelivision there was a very simple API they did use that was built in. It was usually little more than fill out some memory in a particular way and flick an interrupt or particular instruction and it would either run something in bios or hardware. Also many did not need much in the way of an OS as they usually just either memory mapped themselves into the add…

The Atari 2600 has no BIOS or any other built-in ROM. Maybe you're thinking of the 5200 or 7800?

I was thinking more along the lines of fill in this memory set these registers and stuff happens. Which is not really bios but from a programmer POV it kinda acts like it (just in hardware). Like I pointed out it was a very simple API. Not even sure you could call it that. Re-reading what I wrote yeah I probably should have made that more clear. Intelivision did have a BIOS which they had to have because of the lack of chips they could get their hands on (mostly due to atari buying the capacity for locking out compettors).

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

#124
post #96

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'd recommend every serious programmer to write their own OS. Um, I do extremely well working exclusively with higher level languages like Python and JavaScript. If we're talking about pure salary, a senior web dev will probably make more than the vast majority of embedded engineers. I'm totally nitpicking here, but I don't like the gatekeeping of saying you need to be able to use a low level language to be a progra…

That was a recommendation, not a gatekeep.

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

#125
post #59

Earlier quoted context omitted.

If you already know that it's Turing complete, isn't it automatically also NP-complete? (I also read the paper: to clarify, they are referring to different problems you can build on top of Tetris, and prove some of them NP-complete and some Turing complete. (They don't mention Turing completeness directly, but they do a reduction to Post's correspondence problem.))

Right, my comment was the other way around; I don't know whether infinite Tetris is Turing complete.

Running a Turing machine reduces to Post's correspondence problem (which the paper shows reduces to answering some peculiar questions about Tetris).

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

#126
post #10

"Windows - Absolutely no idea." QEMU works on WSL and WSL2 now, that would be one way.

Getting X and PulseAudio working is less than fun though... hoping MS or someone comes up with an "easy" button for that one. Managed to get X11 working, but not PulseAudio then kind of gave up on the experiment.

Looks like there's an easy button in the insiders channel now... will have to wait a while for GA though.
Post reply on HN