GB: Reset with initial state of DIV register

This commit is contained in:
Vicki Pfau 2017-06-22 01:29:19 -07:00
parent 3a03d180d2
commit d5c5173889
2 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,7 @@ Misc:
- GBA Memory: Remove unused prefetch cruft
- GB: Trust ROM header for number of SRAM banks (fixes mgba.io/i/726)
- Core: Config values can now be hexadecimal
- GB: Reset with initial state of DIV register
0.5.2: (2016-12-31)
Bugfixes:

View File

@ -433,6 +433,7 @@ void GBReset(struct LR35902Core* cpu) {
cpu->e = 0xD8;
cpu->h = 1;
cpu->l = 0x4D;
gb->timer.internalDiv = 0x2AF3;
break;
case GB_MODEL_AGB:
cpu->b = 1;
@ -444,6 +445,7 @@ void GBReset(struct LR35902Core* cpu) {
cpu->e = 0x08;
cpu->h = 0;
cpu->l = 0x7C;
gb->timer.internalDiv = 0x7A8;
break;
}