static void DrawStripM1(const u8 *nametab, const u8 *pattab, int cells_dx, int tilex_ty)
{
// Draw tiles across screen:
- for (; cells_dx > 0; cells_dx += 6, tilex_ty++, cells_dx -= 0x10000)
+ for (; cells_dx >= 0; cells_dx += 6, tilex_ty++, cells_dx -= 0x10000)
{
unsigned int pack, pal;
unsigned code;
pattab += (scanline & 0x7);
tilex = cellskip & 0x1f;
- cells = maxcells - cellskip;
+ cells = maxcells - cellskip - 1;
dx = 8 + (cellskip << 3) + line_offset;
// tiles
static void DrawStripM2(const u8 *nametab, const u8 *pattab, int cells_dx, int tilex_ty)
{
// Draw tiles across screen:
- for (; cells_dx > 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
+ for (; cells_dx >= 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
{
unsigned int pal;
unsigned code;
pattab += (scanline>>2) & 0x7;
tilex = cellskip & 0x1f;
- cells = maxcells - cellskip;
+ cells = maxcells - cellskip - 1;
dx = (cellskip << 3) + line_offset;
// tiles
static void DrawStripM3(const u8 *nametab, const u8 *coltab, const u8 *pattab, int cells_dx, int tilex_ty)
{
// Draw tiles across screen:
- for (; cells_dx > 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
+ for (; cells_dx >= 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
{
unsigned int pack, pal;
unsigned code;
pattab += ((scanline>>6) <<11) + (scanline & 0x7);
tilex = cellskip & 0x1f;
- cells = maxcells - cellskip;
+ cells = maxcells - cellskip - 1;
dx = (cellskip << 3) + line_offset;
// tiles
static void DrawStripM0(const u8 *nametab, const u8 *coltab, const u8 *pattab, int cells_dx, int tilex_ty)
{
// Draw tiles across screen:
- for (; cells_dx > 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
+ for (; cells_dx >= 0; cells_dx += 8, tilex_ty++, cells_dx -= 0x10000)
{
unsigned int pack, pal;
unsigned code;
pattab += (scanline & 0x7);
tilex = cellskip & 0x1f;
- cells = maxcells - cellskip;
+ cells = maxcells - cellskip - 1;
dx = (cellskip << 3) + line_offset;
// tiles