Having gotten my basic GBA prototype working, I attempted to reproduce the first tonc demo and compared the assembly dump of my .o to the one produced by that first code example. Their code results in a blind write to the DISPCNT register, but my Kvasir code results in a read-modify-write to the register. At first I thought this was because I wasn't writing all fields of the register, but even when I did that, I got a read-modify-write implementation.
I thought kvasir would optimize writing to all bits in the register as a blind write?
Perhaps I am not defining my DISPCNT register correctly (see GBA.hpp), or I am doing something wrong in using my register definitions?
My first assumption is user error on my part :)
Is there a shortcut for saying "clear all bits/fields in the register except those explicitly given a value"?
Having gotten my basic GBA prototype working, I attempted to reproduce the first tonc demo and compared the assembly dump of my .o to the one produced by that first code example. Their code results in a blind write to the DISPCNT register, but my Kvasir code results in a read-modify-write to the register. At first I thought this was because I wasn't writing all fields of the register, but even when I did that, I got a read-modify-write implementation.
I thought kvasir would optimize writing to all bits in the register as a blind write?
Perhaps I am not defining my DISPCNT register correctly (see GBA.hpp), or I am doing something wrong in using my register definitions?
My first assumption is user error on my part :)
Is there a shortcut for saying "clear all bits/fields in the register except those explicitly given a value"?