Drawing bitmap was not successful and I only modified canon's messages.
To draw vector and text I used this code:
int (*Clean_data_cache_line)() = 0xFC1300B3;
int (*SflwWrpDrawStringWithinRect)() = 0xFC3F1C9B;
int (*JediDraw)() = 0xFC4BB8BB;
void draw_rectangle_mzrm(coord x1, coord y1, coord x2, coord y2, int cl, int flags)
{
int JDarr[96] = {
0x00c00101, 0x02341380, 0xfd82d41c, 0x00000000, 0x02341358, 0x00000004, 0x00000000, 0x00000000,
0x000000c0, 0x00000001, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000,
0x42c80000, 0x42c80000, 0x01180208, 0x00640064, 0x00640064, 0x00000000, 0x00000000, 0x0234134c,
0x00000000, 0x00000000, 0x000000ff, 0x00640064, 0x00640064, 0x00000000, 0x00000000, 0x00000000,
0x00640100, 0x00000000, 0x0003f30c, 0x0000000c, 0x00000001, 0xffa0a0a0, 0x00000000, 0x00000000,
0x000002d0, 0x000001e0, 0xafafafaf, 0xafafafaf, 0xafafafaf, 0xafafafaf, 0xafafafaf, 0xafafafaf
};
int buf[9] = {
0x5652414D, 0x42541000, 0, 0x5000004, 0x3C0, 0x1E0, 0, 0, 0x60
};
JDarr[1] = &JDarr[0];
JDarr[4] = &JDarr[38];
JDarr[23] = &JDarr[35];
*(float*)(&JDarr[16]) = x1;
*(float*)(&JDarr[17]) = y1;
JDarr[18] = x2 + (y2 << 16);
JDarr[37] = cl;
JDarr[25] = 0x20001;
Clean_data_cache_line(JDarr, 0xC0);
JediDraw(buf, JDarr, 0, 0xC0);
}
void draw_string_mzrm(coord x, coord y, const char *s, int cl)
{
int buf[9] = {
0x5652414D, 0x42541000, 0, 0x5000004, 0x3C0, 0x1E0, 0, 0, 0x60
};
SflwWrpDrawStringWithinRect(buf, x << 16, y << 16, 0, 0, s, strlen(s), 0, 0, 0x64, 0);
}
transfer_src_overlay need to be called too.