src/mess/drivers/x1.c
| r5799 | r5800 | |
| 330 | 330 | |
| 331 | 331 | static void draw_gfxbitmap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int w,int plane,int pri) |
| 332 | 332 | { |
| 333 | int xi,yi,x,y; |
| 334 | int pen_r,pen_g,pen_b,color; |
| 335 | int pri_mask_val; |
| 336 | |
| 337 | for (y=0;y<50;y++) |
| 338 | { |
| 339 | for(x=0;x<40*w;x++) |
| 340 | { |
| 341 | for(yi=0;yi<(tile_height+1);yi++) |
| 342 | { |
| 343 | for(xi=0;xi<8;xi++) |
| 344 | { |
| 345 | pen_b = (gfx_bitmap_ram[(((x+(y*40*w)+yi*0x800)+crtc_start_addr) & 0x3fff)+0x0000+plane*0xc000]>>(7-xi)) & 1; |
| 346 | pen_r = (gfx_bitmap_ram[(((x+(y*40*w)+yi*0x800)+crtc_start_addr) & 0x3fff)+0x4000+plane*0xc000]>>(7-xi)) & 1; |
| 347 | pen_g = (gfx_bitmap_ram[(((x+(y*40*w)+yi*0x800)+crtc_start_addr) & 0x3fff)+0x8000+plane*0xc000]>>(7-xi)) & 1; |
| 348 | |
| 349 | color = pen_g<<2 | pen_r<<1 | pen_b<<0; |
| 350 | |
| 351 | pri_mask_val = priority_mixer_ply(machine,color); |
| 352 | if(pri_mask_val & pri) continue; |
| 353 | |
| 354 | if(scrn_reg.v400_mode) |
| 355 | { |
| 356 | if((x+xi)<=video_screen_get_visible_area(machine->primary_screen)->max_x && ((y+yi)*2+0)<=video_screen_get_visible_area(machine->primary_screen)->max_y) |
| 357 | *BITMAP_ADDR16(bitmap, (y+yi)*2+0, x+xi) = machine->pens[color+0x100]; |
| 358 | if((x+xi)<=video_screen_get_visible_area(machine->primary_screen)->max_x && ((y+yi)*2+1)<=video_screen_get_visible_area(machine->primary_screen)->max_y) |
| 359 | *BITMAP_ADDR16(bitmap, (y+yi)*2+1, x+xi) = machine->pens[color+0x100]; |
| 360 | } |
| 361 | else |
| 362 | { |
| 363 | if((x+xi)<=video_screen_get_visible_area(machine->primary_screen)->max_x && (y+yi)<=video_screen_get_visible_area(machine->primary_screen)->max_y) |
| 364 | *BITMAP_ADDR16(bitmap, y*(tile_height+1)+yi, x*8+xi) = machine->pens[color+0x100]; |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | #if 0 |
| 373 | /* Old code for reference, to be removed soon */ |
| 374 | static void draw_gfxbitmap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int w,int plane,int pri) |
| 375 | { |
| 333 | 376 | int count,xi,yi,x,y; |
| 334 | 377 | int pen_r,pen_g,pen_b,color; |
| 335 | 378 | int yi_size; |
| r5799 | r5800 | |
| 397 | 440 | count&=0x3fff; |
| 398 | 441 | } |
| 399 | 442 | } |
| 443 | #endif |
| 400 | 444 | |
| 401 | 445 | static VIDEO_UPDATE( x1 ) |
| 402 | 446 | { |