Pratyusha’s Status Update for 2/22/2020

This week I worked on understanding the different parts of the DE10 Standard Board, and going through the manual. I also tried setting up my laptop with the board (still ongoing), and procuring a spare windows laptop just in case.

I’ve been looking into how memory works on the game boy, and memory/storage specs on the DE10 Standard Board.

Memory on the GameBoy:

Here is my understanding of the important parts of memory mapping on the game boy/boi. When the Game Boy first boot’s the bottom 256 bytes of memory is occupied with the boot ROM.

Once the Game Boy is done booting, it unmaps the boot ROM from memory. Then the to address 1-> 0x3FFF are occupied by game code loaded in from the cartridge. Inside of this memory are the interrupt table and the cartridge header area. I’m not sure how flash interacts with this cartridge header area, and I’m going to discuss my interpretation with my teammates tomorrow.

The remaining sections of memory are the tile ram (0x8000 – 0x97FF) which  contains data about the graphics that can be displayed to the screen. The Game Boy uses a tiling system for graphics meaning that a game doesn’t control the specific pixels that get drawn to the screen. The placement of tiles at certain positions happens in the “background map” (0x9800 – 0x9FFF).

Next up is Cartridge RAM. I’m looking into whether or not the games we load need this, (0xA000 – 0xBFFF) Cartridge RAM. Since we don’t have the external cartridge, might have to specially map this to some other section of memory.

(0xC000 – 0xDFFF) is Working RAM; it’s function is as you’d expect of working RAM  and (0xE000 – 0xFDFF) is Echo RAM.  This section of memory directly mirrors the working Working RAM section.

0xFE00 – 0xFE9F: OAM (Object Atribute Memory) – Used for special characters (sprites). 0xFEA0 – 0xFEFF: Unused – This area is completely unmapped: reading from it just returns 0s and writing to it does nothing.

0xFF00 – 0xFF7F: I/O Registers

0xFF80 – 0xFFFE: High RAM Area

0xFFFF: Interrupt Enabled Register

Other notes

In total, the above Memory mapping amounts to 64 KB, and we have 1 MB of persistent storage that we can use through the Mircro-SD slot. So we’re more than covered for game switching / random hacks that we may need to put together for our gameboi to work. I am amazingly shocked by how much memory was allocated per game… a mere 64 KB!! Either ways, we have more than enough RAM to work with, considering the 64MB (32Mx16) SDRAM on FPGA, 1GB (2x256Mx16) DDR3 SDRAM on HPS and the MicroSD Card Socket on HPS. Since game switching requires persistant storage, I was thinking of storing the different game states in the Micro SD card Socket, and a table that knows which game maps to which section of memory in there too.

Meanwhile…

I looked into other DE10 Standard Projects, to understand how they employed memory. I also found a project , part of which could be done as a warm up to understand the board better.

I will also be working on some of the CPU Fsms before tomorrow’s group meeting, and have a discussion on whether DDR3 SRAM or the standard RAM is better to use.

 

References:

https://github.com/AntonioND/giibiiadvance/blob/master/docs/TCAGBD.pdf

https://gekkio.fi/files/gb-docs/gbctr.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *