I guess with something hard to debug like an emulator you can never be paranoid enough with warnings and assertions. This also reminds me that I should start building a proper debugger for this soon.
But when I started this emulator ~1 month ago I had the opportunity to run some tests for this instruction and concluded that it should be good and... removed that warning. If I had kept it around I probably would've noticed earlier that it uses this instruction and might have looked at it much earlier instead of wondering the whole day why the graphics are kinda broken >_<
The bug was in the ARMv5 signed halfword multiply and accumulate instruction that I added to my previous ARMv4 interpreter way back in december. It would accumulate the wrong value if the opcode accumulates the destination register into itself. At that time I apparently didn't think of this edge-case. I added a log message saying that it hit an experimental instruction though.
next goal is to stub the cartridge interface and to implement the DMA controller so that maybe we can get the NDS firmware to boot...
Interesting read on perspective correct interpolation and how the Nintendo DS GPU approximated it. http://melonds.kuribo64.net/comments.php?id=85
I should also note that this strictly is a toolchain problem. Arisotura, the author of this ROM didn't do any wrong.
there are two processors (ARM9 and ARM7) in this system. as part of the initialization process the ARM9 crt0 expects that the ARM7 sends some values over an inter process communication port. however the ARM7 crt0 doesn't contain the code to do that.
also interestingly the crt0 in this ROM is broken and wouldn't work if the developers wouldn't have coded a timeout (after 120 frames / ~2 seconds) in there.