PHenegan / GameboyEmulator

A gameboy emulator written in Rust
0 stars 0 forks source link

Data Structure for Cartridges #6

Open PHenegan opened 2 months ago

PHenegan commented 2 months ago

Cartridges need some sort of data structure, since there are multiple types of possible memory controllers on them, so implementing them isn't as simple as an array of u8 values.

This website goes over each of the different cartridge types pretty well (though it is kind of hard to read): https://www.devrs.com/gb/files/gbspec.txt (there are 26 types listed there, though some of them might be niche enough to ignore for now, or maybe be merged into one data type)

PHenegan commented 1 month ago

Things to prioritize:

PHenegan commented 1 month ago

Another good link: https://gbdev.io/pandocs/MBC1.html

PHenegan commented 1 month ago

Worth noting that the constructor for these data types will kind of get into #5 - How do I want to load a ROM in through a constructor? Is it worth doing some sort of abstracted builder system? This seems like I might be making it overly complex

PHenegan commented 6 minutes ago

Closing this once I write a builder that parses the cartridge header and creates the cartridges