6 #include "hwregs.h" /* XXX */
11 void draw_tile(int tid, int x, int y, int light);
33 int i, j, xoffs, yoffs, ntiles;
36 for(i=0; i<YTILES; i++) {
37 xoffs = i & 1 ? TILE_W / 2 : 0;
38 ntiles = i & 1 ? XTILES - 1 : XTILES;
39 for(j=0; j<ntiles; j++) {
40 draw_tile(0, xoffs, yoffs, 0);
48 void draw_tile(int tid, int x, int y, int light)
50 unsigned char *dest = bplptr[0] + (y * SCANSZ * NBPL) + x / 8;
51 unsigned char *src = test_tile;
55 REG32_BLTCON = BLTCON_USEA | BLTCON_USEB | BLTCON_USEC | BLTCON_USED |
57 REG32_BLTAFLWM = 0xffffffff;
60 REG_BLTCMOD = SCANSZ - TILE_W / 8;
61 REG_BLTDMOD = SCANSZ - TILE_W / 8;
62 REG32_BLTAPT = (intptr_t)test_tile_mask;
63 REG32_BLTBPT = (intptr_t)src;
64 REG32_BLTCPT = (intptr_t)dest;
65 REG32_BLTDPT = (intptr_t)dest;
66 REG_BLTSIZE = BLTSIZE(TILE_W, TILE_H * NBPL);