- //_SysWriteAt(m_fd, (dst_y * m_width + dst_x) * 4, width * 4, src);
- SetBufFormat(PTYBUFFMT_FB);
- _SysSeek(m_fd, (dst_y * m_width + dst_x) * 4, SEEK_SET);
- _SysWrite(m_fd, src, width * 4);
+ //_SysDebug("CVideo::BlitLine (%p, %i, %i, %i)", src, dst_y, dst_x, width);
+ //_SysDebugHex("CVideo::BlitLine", src, width*4);
+ size_t cmdlen = (sizeof(struct ptycmd_senddata) + width*4)/4;
+ //_SysDebug(" - Offset = %i, cmdlen = %i", (dst_y * m_width + dst_x) * 4, cmdlen);
+ struct ptycmd_senddata cmd = {
+ {PTY2D_CMD_SEND, uint8_t(cmdlen & 0xFF), uint16_t(cmdlen>>8)},
+ (dst_y * m_width + dst_x)
+ };
+ SetBufFormat(PTYBUFFMT_2DCMD);
+ _SysWrite(m_fd, &cmd, sizeof(cmd));
+ _SysWrite(m_fd, src, width*4);