Open Luca1991 opened 6 years ago
Okay, what I did: I called AvGetSavedDataAddress and printed the value. It was 0x0. I passed 0x0 to AvSetSavedDataAddress and now it doesn't crash. According to XboxDevWiki 0x00000000 is where main mem start (obviously).
@PatrickvL what do you think about it?
Currently, Cxbx-Reloaded doesn't do anything else but store and retrieve a 32 bit number via AvSetSavedDataAddress/AvGetSavedDataAddress. The real kernel however does much more. The kernel test suite should somehow describe all the things that these API's do in the original kernel. (And what they shouldn't do with certain input.) Until we have a better understanding on that, we best keep it simple. Setting NULL isn't much of a test, but if that's the only way to prevent the real kernel from crashing, then that's what we do. Also, do add a description of why the test is so simple (and possibly create an issue to figure out how the original kernel behaves).
You need to point it at a memory page, ideally one which was made persistent. I don't remember if this takes a physical or virtual address though.
The point of this function is to preserve framebuffer contents across a reboot / XBE change.
As pointed out by @PatrickvL the address 0xFD000000 (NV2A_MMIO_BASE) should be valid.
Instead on my real xbox I get a black screen and the system hangs there.