deltabeard / Peanut-GB

A Game Boy (DMG) emulator single header library written in C99. Performance is prioritised over accuracy.
https://projects.deltabeard.com/peanutgb/
283 stars 40 forks source link

core: do not require front-end to modify variables in gb_t #12

Open deltabeard opened 5 years ago

deltabeard commented 5 years ago

Currently the joypad input requires setting values in gb_t itself. This should be set by calling a function in peanut-gb which will then set the correct values in gb_t. The framebuffer array will be removed in the PPU rewrite.

deltabeard commented 5 years ago

I decided to continue allowing the front-end to continue modifying values in gb->joypad. I think it's simpler. 4aff06be48c9b5c43cb252fa8237a93b11b166a1

deltabeard commented 5 years ago

Values that may be modified by the front-end should be documented. Modifying other values should be undefined behaviour. The framebuffer array must still be removed.