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
MBR Game Resources
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: MBR Game Resources
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:Where can I find more resources on programming the BIOS/MBR?
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:I would like to learn more ways of initializing the screen,
With CGA, there are 16 colors.XxSNIPER2000xX wrote:more on text video mode ie what colours are available,
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.
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.XxSNIPER2000xX wrote:and more on pushing to video memory.
Re: MBR Game Resources
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
The author also goes by the moniker nanochess and is a legendary master in this subject
https://github.com/nanochess?tab=repositories
Good luck