Open ITotalJustice opened 2 years ago
the issue seems to be the game trying to read to do rom reads that are OOB. as the game is 16MB, if i mirror the address after 16MB, then the game seems to work.
it's not 100% clear on what should actually happen in this situation when the game reads OOB.
the fix was correctly implemented in https://github.com/ITotalJustice/notorious_beeg/commit/7c1abceec8abfe77f66848a7f0f9665c2c675ea5
this is broken again. the game breaks at different points depending on the bios used (normmatt vs official). likely open bus bs
likely related is #4
the game starts it's first openbus access after this screen fades to black.
it will read from 0xE55EC002, 0xE55EC003, 0xE55EC004, 0xE55EC005
. note that this is a full 32-bit address, not 24. only addresses within 24-bit range are valid on the gba. anything outside it returns openbus!
i forcefully masked addresses to 24-bit, region = (addr >> 24) & 0xF
.
here is a log from my emulator with working openbus behaviour. the log starts from the intro of the game right until zelda walks into the house and the screen fades to black.
[WARN] [MEMORY] openbus read: 0x00000000 value: 0xE55EC002 result: 0xE55EC002
[WARN] [MEMORY] openbus read: 0xE55EC002 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC003 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC004 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC005 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0x00000000 value: 0xE55EC002 result: 0xE55EC002
[WARN] [MEMORY] openbus read: 0xE55EC002 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC003 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC004 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC005 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC006 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC007 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC008 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC009 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC006 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC007 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC008 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC009 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00A value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC00B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00C value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC00D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00A value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC00B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00C value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC00D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00E value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC00F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC010 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC011 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC00E value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC00F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC010 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC011 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC012 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC013 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC014 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC015 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC012 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC013 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC014 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC015 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0x00000018 value: 0xE3A02004 result: 0xE3A02004
[WARN] [MEMORY] openbus read: 0xE3A02004 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02005 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02006 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02007 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC016 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC017 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC018 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC019 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02008 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02009 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0200A value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0200B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC01A value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC01B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC01C value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC01D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0200C value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A0200D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0200E value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0200F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC01E value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC01F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC020 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC021 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02010 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02011 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02012 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02013 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC022 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC023 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC024 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC025 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02014 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02015 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02016 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02017 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC026 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC027 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC028 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC029 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02018 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02019 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0201A value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0201B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC02A value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC02B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC02C value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC02D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0201C value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A0201D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0201E value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0201F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC02E value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC02F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC030 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC031 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02020 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02021 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02022 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02023 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC032 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC033 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC034 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC035 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02024 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02025 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02026 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02027 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC036 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC037 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC038 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC039 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02028 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02029 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0202A value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0202B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC03A value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC03B value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC03C value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC03D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0202C value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A0202D value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A0202E value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A0202F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC03E value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC03F value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC040 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC041 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02030 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE3A02031 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE3A02032 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE3A02033 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC042 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC043 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC044 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC045 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0x00000000 value: 0xE55EC002 result: 0xE55EC002
[WARN] [MEMORY] openbus read: 0xE55EC002 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC003 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC004 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC005 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC006 value: 0x0000004B result: 0x0000004B
[WARN] [MEMORY] openbus read: 0xE55EC007 value: 0x00000054 result: 0x00000054
[WARN] [MEMORY] openbus read: 0xE55EC008 value: 0x00000083 result: 0x00000083
[WARN] [MEMORY] openbus read: 0xE55EC009 value: 0x00000054 result: 0x00000054
seems to freeze at the title screen if i don't hle the bios_div (indicating it's timing related).
if i do get in game, then it freezes here instead music will continue to play, but nothing else happens.