2

For context: I'm using IDA to reverse engineer Gameboy code. I'm using this Gameboy loader to load files. The Gameboy has a 16 bit address space, where addresses $0-$3FFF always point to a fixed portion of ROM in the ROM image, called the home bank, whereas $4000-$7FFF points to a selectable ROM bank. The loader in question emulates this by mapping the 16-bit address space to a virtual memory space where each memory is in a separate segment.

So far, so good. When code in the home bank is calling code in one of the selectable banks, I press alt-R to choose a segment for the target. This is unavoidable since IDA can't know automatically which segment the target is in. However, since the home bank is fixed, I would like to set up IDA in such a way that it automatically understands that all jumps to the area $0-$3FFF area end up in segment 0, without needing to manually assign addresses. $0-$3FFF in the virtual memory space always unambiguously refers to $0-$3FFF in the linear memory space. Is this possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.