src/mess/video/vdc.c
| r890 | r891 | |
| 53 | 53 | int i; |
| 54 | 54 | |
| 55 | 55 | /* our line buffer */ |
| 56 | | UINT16 *line_buffer = ((UINT16 *) vdc.bmp->base) + (vdc.bmp->rowpixels * line); |
| 56 | UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 ); |
| 57 | 57 | |
| 58 | 58 | for(i=0; i<360;i++) |
| 59 | 59 | line_buffer[i]=Machine->pens[0]; |
| r890 | r891 | |
| 64 | 64 | int i; |
| 65 | 65 | |
| 66 | 66 | /* our line buffer */ |
| 67 | | UINT16 *line_buffer = ((UINT16 *) vdc.bmp->base) + (vdc.bmp->rowpixels * line); |
| 67 | UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, line, 0 ); |
| 68 | 68 | |
| 69 | 69 | for(i=0; i<360;i++) |
| 70 | 70 | line_buffer[i]=Machine->pens[0x100]; |
| r890 | r891 | |
| 318 | 318 | int v_width = width_table[(vdc.vdc_data[MWR].w >> 4) & 3]; |
| 319 | 319 | |
| 320 | 320 | /* our line buffer */ |
| 321 | | UINT16 *line_buffer = ((UINT16 *) vdc.bmp->base) + (vdc.bmp->rowpixels * bitmap_line) + center_x; |
| 321 | UINT16 *line_buffer = BITMAP_ADDR16( vdc.bmp, bitmap_line, center_x ); |
| 322 | 322 | #ifdef MAME_DEBUG |
| 323 | 323 | int line_buffer_size; |
| 324 | 324 | #endif |
| 325 | 325 | |
| 326 | 326 | /* pointer to the name table (Background Attribute Table) in VRAM */ |
| 327 | | UINT16 *bat = (UINT16 *)&(vdc.vram[nt_row << (v_width+1)]); |
| 327 | UINT8 *bat = &(vdc.vram[nt_row << (v_width+1)]); |
| 328 | 328 | |
| 329 | 329 | int b0, b1, b2, b3; |
| 330 | 330 | int i0, i1, i2, i3; |
| r890 | r891 | |
| 348 | 348 | for(i=0;i<(vdc.physical_width >> 3)+1;i++) |
| 349 | 349 | { |
| 350 | 350 | nt_index = (i + (scroll_x >> 3)) & ((2 << (v_width-1))-1); |
| 351 | nt_index *= 2; |
| 351 | 352 | |
| 352 | 353 | /* get name table data: */ |
| 353 | 354 | |
| 354 | 355 | /* palette # = index from 0-15 */ |
| 355 | | cell_palette = (bat[nt_index] >> 12) & 0x0F; |
| 356 | cell_palette = ( bat[nt_index + 1] >> 4 ) & 0x0F; |
| 356 | 357 | |
| 357 | 358 | /* This is the 'character number', from 0-0x0FFF */ |
| 358 | 359 | /* then it is shifted left 4 bits to form a VRAM address */ |
| 359 | 360 | /* and one more bit to convert VRAM word offset to a */ |
| 360 | 361 | /* byte-offset within the VRAM space */ |
| 361 | | cell_pattern_index = (bat[nt_index] & 0x0FFF) << 5; |
| 362 | cell_pattern_index = ( ( ( bat[nt_index + 1] << 8 ) | bat[nt_index] ) & 0x0FFF) << 5; |
| 362 | 363 | |
| 363 | 364 | b0 = vram_read((cell_pattern_index) + (v_row << 1) + 0x00); |
| 364 | 365 | b1 = vram_read((cell_pattern_index) + (v_row << 1) + 0x01); |
| r890 | r891 | |
| 441 | 442 | char buf[16]; |
| 442 | 443 | |
| 443 | 444 | UINT8 sprites_drawn=0; |
| 444 | | UINT16 *line_buffer=((UINT16 *) vdc.bmp->base) + (vdc.bmp->rowpixels * bitmap_line) + center_x; |
| 445 | UINT16 *line_buffer= BITMAP_ADDR16( vdc.bmp, bitmap_line, center_x ); |
| 445 | 446 | |
| 446 | 447 | /* 0 -> no sprite pixels drawn, otherwise is sprite #+1 */ |
| 447 | 448 | UINT8 drawn[(0x40 << 3) + 32]; |