+//
+// Draw character on screen
+//
+static inline void DrawChar(uint8 * chr, uint8 * ram, uint8 sx, uint8 sy, uint16 scp, uint32 baseAddr, uint32 scrollOffset, bool transparent/*= true*/)
+{
+ uint8 scp_lo = (scp + (sx << 1)) & 0x7F;// Let LO byte wrap only...
+ uint16 sp2 = (scp & 0xFF80) | scp_lo;
+ uint8 tile = ram[sp2++];
+ uint8 index = ram[sp2] & 0x03;
+ uint8 color = ram[sp2];
+ uint32 chind = baseAddr + (((index << 8) + tile) * 64);
+ uint32 sc_addr = (sx * 8) + (sy * 2560) + scrollOffset; // Start addr in my_scr[]
+
+ for(int y=0; y<8; y++)