OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:25 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: MBR Game Resources
PostPosted: Thu Apr 28, 2022 3:36 pm 
Offline

Joined: Thu Apr 28, 2022 3:09 pm
Posts: 2
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 :)


Top
 Profile  
 
 Post subject: Re: MBR Game Resources
PostPosted: Thu Apr 28, 2022 11:23 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
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.


Top
 Profile  
 
 Post subject: Re: MBR Game Resources
PostPosted: Fri Apr 29, 2022 8:37 pm 
Offline

Joined: Thu Apr 28, 2022 3:09 pm
Posts: 2
thanks :D


Top
 Profile  
 
 Post subject: Re: MBR Game Resources
PostPosted: Fri Jun 10, 2022 2:24 pm 
Offline

Joined: Wed Aug 04, 2021 5:31 pm
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 83 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group