Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Bitmap VRAM (8-bit, palette)
- Display buffer: bmp_vram_info.vram2
- Draft buffer: (uintptr_t)(bmp_vram_info.vram2) ^ 0x80000;
How Canon drawing worksEdit
- dialog_draw is called
- this redraws current dialog box to draft buffer
- then, draft buffer is copied to display buffer, either normal or reversed (i.e. flipped horizontally)
Q: When does the firmware decide when to draw normal and when to draw reversed?Edit
DebugMsg(4, 2, 'refresh whole fReverseScreen=%d', *(0x1e7ac))
A: when MEM(0x1e7ac) (in winsys_struct) is nonzero, it draws reversed.
Q: Can we prevent Canon graphics from updating the display buffer, but let them update the draft buffer?Edit
if *(0x1e7a0) == 0: if *(0x1e7ac) == 0: sub_FF2CA694(*(0x1e778), arg0 + MEM(124804), arg1, *(0x1e774)) if *(0x1e7ac) != 0: sub_FF2CA8B4(*(0x1e778), arg0 + MEM(124804), arg1, *(0x1e774)) DebugMsg(4, 2, msg='refresh partly x=%d y=%d w=%d h=%d', arg0, arg1, arg2, arg3, arg3, ...)
MEM(0x1e7a0) = 1 is all we need :)
#define WINSYS_BMP_DIRTY_BIT_NEG MEM(0x1e7a0)
Q: So what?Edit
A: We can do arbitrary transformations on BMP overlay!
e.g. flipping it upside down, rescaling it (hint: HDMI monitors), erasing Canon GUI elements...
... all with 0% flicker :)