On an MBC1, there are two modes: 16Mb ROM8KB RAM and 4Mb ROM32KB RAM.
![]() By writing values to areas of read-only memory, a game or program is able to specify which ROM banks to access when read operations are performed. There was no MBC on these types of cartridges because the entire game would be able to fit on the cartridge. This types of cartridge could also contain up to 8KB of RAM, mapped to A000-BFFF, though it would require an MBC-like circuit to work. We can see here how simple the game cartridge is, only requiring the ROM chip with the game code. Instead of data lines connecting directly to the ROM, they instead go through a memory bank controller that manages manages the bank switching of the ROM and RAM through intercepting read and write commands to certain addresses. I will explain that once I explain the memory map and bank switching. In this article, I primarily focus on explaining how the MBC1 works. It behaves much the same as the other, with a few exceptions. They are able to be both written to and read from, allowing the game to store data. ![]() This is done by writing a value with the lower 4 bits being 0A somewhere in this address space. It does not matter where it is written, just as long as it within the address range. You will notice that this address range is part of the first ROM bank, which is read only. Because it is ROM, there is obviously no way to actually write data to those memory locations. Instead, the write call is intercepted and interpreted differently by the MBC. This method of writing to ROM is also used for the remaining memory areas Ill explain now. ![]() When these values are written, instead of addressing the correct ROM banks they will address banks 21 41 and 61 respectively. I couldnt find an explanation of why this takes place, but I assume it has something to do with how the lower 5 bits are used when choosing the bank. Each of these numbers have all zeros as the lower 5 bits ( 0x0XX 00000 ).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |