src/mess/drivers/pc88va.c
| r9464 | r9465 | |
| 49 | 49 | for(i=0;i<(0x100);i+=(8)) |
| 50 | 50 | { |
| 51 | 51 | int xp,yp,sw,md,xsize,ysize,spda,fg_col,bc; |
| 52 | | int x_i,y_i; |
| 52 | int x_i,y_i,x_s; |
| 53 | int spr_count; |
| 54 | int pen; |
| 53 | 55 | |
| 54 | 56 | ysize = (tvram[(offs + i + 0) / 2] & 0xfc00) >> 10; |
| 55 | 57 | sw = (tvram[(offs + i + 0) / 2] & 0x200) >> 9; |
| r9464 | r9465 | |
| 82 | 84 | xsize = (xsize + 1) * 32; |
| 83 | 85 | ysize = (ysize + 1) * 4; |
| 84 | 86 | |
| 87 | if(!(spda & 0x8000)) // correct? |
| 88 | spda *= 2; |
| 89 | |
| 90 | spr_count = 0; |
| 91 | |
| 85 | 92 | for(y_i=0;y_i<ysize;y_i++) |
| 86 | 93 | { |
| 87 | | for(x_i=0;x_i<xsize;x_i++) |
| 94 | for(x_i=0;x_i<xsize;x_i+=16) |
| 88 | 95 | { |
| 89 | | //UINT8 pen; |
| 96 | for(x_s=0;x_s<16;x_s++) |
| 97 | { |
| 98 | pen = (BITSWAP16(tvram[(spda+spr_count) / 2],7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8) >> (15-x_s)) & 1; |
| 90 | 99 | |
| 91 | | // TODO: hook up drawing routines |
| 100 | pen = pen & 1 ? fg_col : (bc) ? 8 : -1; |
| 92 | 101 | |
| 93 | | *BITMAP_ADDR32(bitmap, yp+y_i, xp+x_i) = machine->pens[fg_col]; |
| 102 | if(pen != -1) //transparent pen |
| 103 | *BITMAP_ADDR32(bitmap, yp+y_i, xp+x_i+(x_s)) = machine->pens[pen]; |
| 104 | } |
| 105 | spr_count+=2; |
| 94 | 106 | } |
| 95 | 107 | } |
| 96 | 108 | } |
| 97 | | else // 4bpp mode |
| 109 | else // 4bpp mode (UNTESTED) |
| 98 | 110 | { |
| 99 | 111 | xsize = (xsize + 1) * 8; |
| 100 | 112 | ysize = (ysize + 1) * 4; |
| 101 | | // ... |
| 113 | |
| 114 | if(!(spda & 0x8000)) // correct? |
| 115 | spda *= 2; |
| 116 | |
| 117 | spr_count = 0; |
| 118 | |
| 119 | for(y_i=0;y_i<ysize;y_i++) |
| 120 | { |
| 121 | for(x_i=0;x_i<xsize;x_i+=2) |
| 122 | { |
| 123 | for(x_s=0;x_s<2;x_s++) |
| 124 | { |
| 125 | pen = (BITSWAP16(tvram[(spda+spr_count) / 2],7,6,5,4,3,2,1,0,15,14,13,12,11,10,9,8)) >> (16-(x_s*8)) & 0xf; |
| 126 | |
| 127 | //if(bc != -1) //transparent pen |
| 128 | *BITMAP_ADDR32(bitmap, yp+y_i, xp+x_i+(x_s)) = machine->pens[pen]; |
| 129 | } |
| 130 | spr_count+=2; |
| 131 | } |
| 132 | } |
| 102 | 133 | } |
| 103 | 134 | } |
| 104 | 135 | } |