You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"?
The text was updated successfully, but these errors were encountered:
internally kvasir should be oring all the bitmasks of modified fields with the "has default value" bitmask and if that ends up as 0xFFFFFFFF then it should turn it into a blind write. I'll have a look and get back to you.
Hrm. I see that the mask helper function I was using is generating 32-bit masks. I will adjust my field definitions and see if that gets me to a blind write.
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"?
The text was updated successfully, but these errors were encountered: