Hey guys, I thought it'd be appropriate to post this Tetris clone I've made, given the name of this site http://www.sebastianmihai.com/main.php?t=96&n=aSMtris-Tetris-in-assembly-language-x86-16-bit
] You idiot this site took its name from taking electronics apart and assembling them back together. I'm joking I don't know how it got its name. Cool game.
That's really nice. I also enjoyed reading your development log and will try out the game the next time I'm on a Windows computer. It really is amazing what can be packed into a 2 kb file.
The log was the best bit imho, I've played enough Tetris for one lifetime Re: Windows - just get DOSbox on whatever platform you're running, it's likely you'll need to do that on Windows too (as stated, the game runs only on XP or earlier, the latter ones removed the required DOS subsystem).
As someone learning som x86, this is super rad. I have no idea how you are drawing but this is nice work.
Simple. He's setting up a framebuffer: ...and then goes on frobbing individual pixels in there: (Btw, this board is lacking some Code: tags...)
Not exactly, that's actually not a function of the CPU, but of the BIOS - which not every x86 system has. But as long as you're targeting Windows-capable non-UEFI PCs you should be good to go 99.99% of the time.
Is this what get's used by the BIOS to display some sort of interface to a user trying to change it's boot settings?
Beats me - I'm not much of a graphics guy. The BIOS menus are (or at least look like) usually textmode, but even that needs to be rendered to be a framebuffer somewhere afaict. Wether that's the same memory you use in mode13, I have no idea. Other than that, things like "mode 13" don't have much meaning to the BIOS, since that's just an abstraction/a function it provides to OSs - the BIOS itself is one level closer to the HW and can do whatever it feels like. Maybe it uses the mode13 code internally too, maybe it doesn't. If you want in-depth details about this, I believe you want to read up on the VESA standards, which afaik isn't x86-specific so might be outside of your scope. Or you could look at a complete yet reasonably-sized x86 OS like BareMetal.
Graphics cards actually still contain VGA hardware compatibility to some degree, including text modes, specifically for BIOS support. Internally the hardware may rasterize character cells to a bitmap for further processing (necessary for digital displays), but the hardware interface is still there. So using the BIOS for game graphics isn't necessary, but it was perhaps the most "clean" choice since abstracting the output behind a pixel plotting function (BIOS call) decouples the game logic from the platform specific code, at the cost of performance (which is hardly a consideration on today's hardware).