It's super interesting to write your first emulator. I wrote a GBC emulator too once, and I wrote down all the problems I encountered that weren't easy to solve:
https://github.com/fwsGonzo/gamebro/blob/master/POSTERITY.md
Many of the issues are not documented anywhere, and it is just about guessing what the hardware did - and thus, what the developers back in the day relied on!