Page 1 of 1
MBR Game Resources
Posted: Thu Apr 28, 2022 3:36 pm
by XxSNIPER2000xX
Hi, I would like to try my hand at making a simple game that runs from the MBR.
I am inspired by the projects Tetros (and it's similar projects):
https://github.com/daniel-e/tetros and lightsout:
https://github.com/XlogicX/lightsout
Where can I find more resources on programming the BIOS/MBR? After skimming the source code of these projects and trying my hand at it myself. I am still unsure about a few things.
I would like to learn more ways of initializing the screen, more on text video mode ie what colours are available, and more on pushing to video memory.
Thanks
Re: MBR Game Resources
Posted: Thu Apr 28, 2022 11:23 pm
by Octocontrabass
XxSNIPER2000xX wrote:Where can I find more resources on programming the BIOS/MBR?
If you're programming games instead of a bootloader, you probably only need
old IBM manuals and
Ralf Brown's Interrupt List. For VGA, you'll also need
slightly less-old IBM manuals and possibly
Michael Abrash's Graphics Programming Black Book.
XxSNIPER2000xX wrote:I would like to learn more ways of initializing the screen,
With such a limited amount of space, you'll probably rely on INT 0x10 to do most of the initialization. You actually can do a lot that way - remember those BIOS POST screens that were clearly in text mode yet somehow had a logo in the corner of the screen? That's done entirely with INT 0x10.
XxSNIPER2000xX wrote:more on text video mode ie what colours are available,
With CGA,
there are 16 colors.
With EGA,
there are 64 colors, and you may choose 16 of them. The BIOS functions select CGA-compatible colors by default.
With VGA,
there are 262144 colors, and you may choose 16 of them. The BIOS functions select EGA-compatible color mappings to select CGA-compatible colors by default... yes, it's confusing.
XxSNIPER2000xX wrote:and more on pushing to video memory.
Michael Abrash explains most of the tricks, but I'm not sure how many of them will be useful to you if you're in text mode and limited to 512 bytes.
Re: MBR Game Resources
Posted: Fri Apr 29, 2022 8:37 pm
by XxSNIPER2000xX
thanks
Re: MBR Game Resources
Posted: Fri Jun 10, 2022 2:24 pm
by EduBat
Hi, look for the book "Programming Boot Sector Games" by Oscar Toledo Gutierrez.
The author also goes by the moniker nanochess and is a legendary master in this subject
https://github.com/nanochess?tab=repositories
Good luck