YTread Logo
YTread Logo

How Graphics worked on the Nintendo Game Boy | MVG

Jun 06, 2021
Nintendo Gameboy Compared to the Sega Game Gear and Atari Lynx, the Gameboy was a technically inferior handheld, but it became a household brand and sold over 110 million units, completely dominating its competition. Nintendo's philosophy was never to be a leader in technology, but to get the best. Of the existing hardware, the Nintendo Switch continues this legacy today using the NVIDIA Tegra x1 system on a chip that we first saw in 2015, but it was the Gameboy that first appeared in 1989 that started things off right and paid off Yokoi, the Gameboy designer called. In its design, thinking laterally with technology, Gameboy used older technology to keep the cost affordable, but it was used in extremely innovative ways.
how graphics worked on the nintendo game boy mvg
Hardware-wise, the Gameboy comes with a custom system on a chip that houses a crisp 8-bit processor clocked at 4.19 megahertz, while similar to our Dialogue z80 and an Intel 8080, it's actually neither. , is something in the middle of these, the hardware contains only eight kilobytes of RAM and eight kilobytes of video RAM, that's how eight kilobytes was said when it was developed on the Gameboy. One of the biggest challenges that the programmers had to overcome was the limitations of the hardware, but many of them were able to overcome this and achieve amazing results and amazing technical achievements when it comes to


, let's go ahead and take a look. into the Gameboy


system and delve into some of the really cool effects that the programmers were able to take advantage of.
how graphics worked on the nintendo game boy mvg

More Interesting Facts About,

how graphics worked on the nintendo game boy mvg...

The Gameboy system on a chip houses not only the CPU and I/O audio hardware, but also houses the PPU or pixel processing unit, the resolution of Gameboy is 160 pixels wide by 144 pixels vertically and It has four colors or should I say four shades of gray or green depending on the model of Gameboy you are using, so let's do some quick calculations. We just said that Gameboy has eight kilobytes of vram and the screen size is 160 by 144 pixels. If we use a traditional frame buffer method to draw the color value of each pixel sequentially and render the frame buffer, we would need almost 23 kilobytes of RAM to do it, remember I only have eight kilobytes of VRAM to work with, so, How is this limitation overcome?
how graphics worked on the nintendo game boy mvg
The Game Boy doesn't actually have any frame buffer and it's not possible to simply plot pixels in the 160 by 144 frame buffer individually to preserve optimized graphics space. All background images are assembled using tiles. A mosaic is an 8 by 8 pixel square that supports a palette of four colors. The Game Boy can store a maximum of 256 tiles in vram. We said each tile measures 8 by 8 pixels, meaning they are 20. tiles wide by 18 tiles vertically, which would produce a full screen image, but it's actually 360 tiles, so how do we count these tiles? They are reusable, so for example any tile that is an empty space or a white tile would consume no more vram than 8 by 8 pixels, if we took any Game Boy


and placed a grid over it to represent the displacements of the tiles, you can see that many tiles are repeatable, so the tile is only stored in vram once and referenced as needed, providing significant memory savings. compared to a conventional frame buffer, in fact, the entire set of background tiles is stored in one of the two possible memory locations in V RAM that the


can access, since it needs to draw the screen, extract the index of tiles you need based on memory location. of the background tile data, it is also not necessary for games to need the full 256 tiles for a game, some games use less, for example Super Mario Land only needs 128 tiles, which means more via RAM to do other things, so now we have tile based charts.
how graphics worked on the nintendo game boy mvg
This is something that's not exclusive to the Game Boy, so let's move on to something a little more interesting when we move around when you're playing something like Super Mario. Land the bottom. It scrolls as you move Mario in the game, essentially moving the scroll of all the tiles. on the screen and introducing new ones when Mario moves to the right, although we said that Gameboy draws 20 tiles wide by 16 tiles down in vram, it is actually drawing 32 by 32 tiles and the game's voice screen is used as a viewport in other words. As you move Mario to the right, the viewport moves with him and there are two registers to manipulate the shift of x and y to move this viewport.
This is done for one pixel and at 60 frames per second, so it's easy for the Game Boy to achieve a smooth scrolling effect when a viewport reaches the end of the tileset, it simply wraps around the tiles and they can also be loaded. before they are displayed, this means that the entire level data can be stored as tiles and this effect is used in games that have level data larger than the 32 by 32 tile window, the game simply brings new tiles out of the screen when you need them and for other games that scroll in four directions, such as turrican tiles, they are drawn in x and y coordinate space before the game.
The child also has a window layer that is independent of the background tile layer and can scroll independently. The window layer can be enabled and disabled and contains its own x and y position registers. This layer is usually for user interface, such as scoring or status, and sits on top. the mosaic layer and is not transparent. This is a very simple way to set up a static part of the screen and this window layer can also have its own palette independent of the background tile layer. It wouldn't be a game system without sprites. The child can have up to 40 sprites on the screen at any given time.
Each sprite also measures 8 x 8 pixels and can move independently of tile and window layers. Additionally, there can only be 10 sprites on a given line at any time. Sprite data is also stored in vram much like tile data and larger sprites can be stitched together from the 8x8 sprite data. Sprites can also be flipped horizontally and vertically without needing to make a copy of a flipped sprite which would use additional vram. They can also be set to eight pixels wide by 16 pixels tall and the sprites have their own palate independent of the other two layers, okay, so we know that the Game Boy has backgrounds and sprite windows and the three combinations of these can actually generated some good games, but to take the graphics to the next level, programmers started using mid-frame tricks to manipulate scan lines and get some really cool Nintendo Game Boy demo-style effects.
We said earlier that the Game Boy is tile-based, but the LCD displays the graphics line by line. line very similar to a CRT when it reaches the end of the line there is a small pause and it moves to the next line to draw this time is known as horizontal blank period or H blank period once all 144 lines have been drawn the Time needed to go back to line 1 and start drawing again is known as vertical white space. The Game Boy has a register known as l YC that is used to compare the current scan line being rendered to whatever value is in the l YC register and if they match a state interruption of the LCD screen occurs and During this interruption other registers in the middle of the frame can be manipulated to produce some cool and interesting effects.
The intro in Legend of Zelda Links Waking is a great example of manipulating the blank H register in the middle of the frame. On the surface, it looks pretty. standard, but there's more here than meets the eye. Let's look at the waves first. You can see that they move up and down at different speeds. Clouds also move at different speeds to give the illusion of distance. This is known as parallax scrolling and is a subtle effect, so let's consider how Gameboy can try to draw this first. We know that we can easily shift to the right by adjusting the viewport or the X shift register known as SC , but this would mean that the clouds would also appear to move up and down, plus the game puts the value 64 in the LIC register, in other words, when the scan line 64 is drawn. it triggers an interrupt during each blank space during break, the code then simply changes the position of the background after the clouds have been drawn, but before the waves, the amount changed is to compensate for the adjustment in the viewport and then proceeds to draw the remaining scan lines.
This means that the horizon and clouds do not move but the waves do to give the appearance of the storm, but we also have to talk about the parallax shifting effect on both the clouds and the waves. This is the same approach as before. scan lines are being drawn, the ly see register is updated to interrupt on several different sections of the screen, from here the same methodology is applied when an interrupt is triggered during blank H, the background moves at different speeds changing the register SC If this record did not exist, everything would move at the same speed and eliminate immersion.
This is what it would look like if there was no manipulation of the mid frame background, the rain effect was created by simply generating sprites and placing them on top of the background tile set using a simple random number generation and then adding the ship and sprites from lighting, our introduction is complete, doors with cool stuff. Also some simple demo style effects that can be done by simply adjusting the SCX register mid frame. The games could have some really cool demo style effects. Gameboy also has some games that really show off the power of the hardware.
Prehistoric Man is a game that not only has background and window manipulation, but relies on precise timing to achieve some amazing effects, even a simple game like Tetris has been designed beautifully. There's really nothing special about the game, but it uses the strengths of the Gameboy hardware exceptionally well when the pieces fall. They are sprites that then turn into tiles when they fall into place and the next piece to fall is calculated by a simple random number generator using split register and that is what makes the Game Boy such a fascinating system that the hardware It was cheap and low powered compared to its competition and only four colors, however the programmers use the hardware in ingenious ways to produce not only some of the best portable games of all time but also technically impressive and if you are a fan of the Original Gameboy, let me know in the comments.
Below are some of your favorite Gameboy games, there you have it guys, that's the Nintendo Game Boy PPU. It's a fascinating topic to go back and look at, and it's something that really interests me a lot and you know. The developers were really able to make the most of the Gameboy, given the really minuscule requirements and specifications of the hardware itself, so we can actually get some really interesting effects out of the Gameboy. Now obviously there are other things in the game that I haven't covered in this video, like sound and more tricks with graphics, you know, Gameboy has a lot more than just graphics processing, there's a lot more it can do. , but you know that's something I'll probably look at in a future episode, but I'm really interested in covering old retro systems and how they work, so if you like this video and want to see more, let me know in the comments below.
I really want to hear your comments on this one, well guys we'll leave it here. Thank you very much for watching. If you like this video, you know what to do. Give me a thumbs up and, as always, don't forget to like and subscribe. I'll see you in the next video, bye for now.

If you have any copyright issue, please Contact