Jump to content

C/C++ [vMBC][WIP] Virtual Memory Bank Controller


Recommended Posts

What is it?

The Virtual Memory Bank Controller is a part of a special kind of Gameboy development kit I'm creating. As simply put, this part of the kit converts memory addresses from the Gameboy's 16-bit address system, to a 64-bit address system stored in the RaspberryPi (Or various other devices), (it also does exactly as the name suggests, it acts as a virtual memory bank controller to grab data based on how the gameboy requests it).

Why did you make this?
As there seems to be an increased interest in the trend of writing classic games with older technology, I have an interest in not only helping the trend develop, but expand upon it. This allows users to create their own custom cartridges to test their games on original systems with making any mods to the system themselves. With this, developers can insert instructions to any given part of the gameboy's ROM data and have the gameboy execute the instructions real time. This is also cool because it allows the gameboy to access features it originally never had, such as.. uhh... TCP sockets and online play.

What further development is there?

Currently, the system is capable of creating up to 2 virtual memory banks effeciently and convert addresses as it should, but some games require more than two banks, to continue development on this, i will next research how the gameboy instructs the cartridge's chips to swap Memory banks. In addition to this, I must also write a conversion system for the Raspberry Pi's GPIO pin data into two bytes, rather than the 16 bytes that represent the data already.

After this, I plan to create a kit that simplifies the deployment of these games and allows communication with this device and a custom design emulator.

Where can I find your project as is?
std::cout << https://github.com/DylanDodds/gbComp << ", Right here" << std::endl;

Information about the current state of the vMBC and why I'm releasing it now.
I'm currently releasing the vMBC as a learning experience for anyone who is interested to learn how the Gameboy managed data. I will be updating a read me very soon to explain the system in organized detail.

Currently the vMBC accepts a rom file, Spits out various information from the header data stored on the addresses $0000 - $01FF on the rom file (or cartridge), and allocates the necessary memory. It then splits that memory into it's designated rom banks and generates the designated SRAM banks, if necessary. When data is written to the SRAM banks, and the vMBC is closed successfully, any data in SRAM banks will be saved to a file. (This is how saving data will work on the system, instead of keeping it on RAM that is always on by a 3v battery)

Libraries, Licenses, and Languages

This software is written in C++, using (So far) only C++ standard and standard template libraries (STL).
This software requires C++11 or higher. (std=c++11)
The makefile included is built for the g++ compiler on debian linux, other operating systems not tested.
License: GNU GPL v3.0 (GNU General Public License) https://github.com/DylanDodds/gbComp/blob/master/LICENSE

And the cartridge?
I'm waiting on my conductive copper tape to come in to expand the pins on the gameboy cartidge to get a proper solder job. After that, I will be releasing information on how to map this to a raspberry pi. I will be using a raspberry pi zero for this project.

Screen Shot of debug information (to see something it's actually doing since most is background work)

So the stuff under the -----------------------------Nintendo area
that's the copyright logo that appears when you turn on a gameboy and the cartridge loads at the very begging when it says GAMEBOY.
More to come as I get the online libraries linked in and the memory banks finished

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...