src/mess/video/mbee.c
| r2343 | r2344 | |
| 443 | 443 | |
| 444 | 444 | UINT16 width = crt.horizontal_displayed*8-1; // width in pixels |
| 445 | 445 | UINT16 height = crt.vertical_displayed*(crt.scan_lines+1)-1; // height in pixels |
| 446 | | UINT16 bytes = crt.horizontal_displayed*crt.vertical_displayed-1; // video ram needed -1 |
| 446 | UINT16 bytes = crt.horizontal_displayed*crt.vertical_displayed-1; // video ram needed |
| 447 | 447 | |
| 448 | if (width > 511) width=511; |
| 449 | if (height > 255) height=255; |
| 450 | |
| 448 | 451 | /* Resize the screen */ |
| 449 | 452 | visarea.min_x = 0; |
| 450 | 453 | visarea.max_x = width-1; |
| 451 | 454 | visarea.min_y = 0; |
| 452 | 455 | visarea.max_y = height-1; |
| 453 | | if ((width < 610) && (height < 460) && (bytes < 0x800)) /* bounds checking to prevent an assert or violation */ |
| 454 | | video_screen_set_visarea(machine->primary_screen, 0, width, 0, height); |
| 456 | if (bytes < 0x800) video_screen_set_visarea(machine->primary_screen, 0, width, 0, height); |
| 455 | 457 | } |
| 456 | 458 | |
| 457 | 459 | VIDEO_START( mbee ) |
| r2343 | r2344 | |
| 479 | 481 | framecnt++; |
| 480 | 482 | |
| 481 | 483 | /* Get the graphics of the character under the cursor, xor with the visible cursor scan lines, |
| 482 | | and store as character number 256. If inverse mode, drop bit 7 of character before xoring */ |
| 484 | and store as character number 256. */ |
| 483 | 485 | for ( i = 0; i < ARRAY_LENGTH(mc6845_cursor); i++) |
| 484 | 486 | pcgram[0x1000+i] = pcgram[(videoram[cursor]<<4) + i] ^ mc6845_cursor[i]; |
| 485 | 487 | |
| r2343 | r2344 | |
| 487 | 489 | |
| 488 | 490 | for( i = 0; i < bytes; i++ ) |
| 489 | 491 | { |
| 490 | | int mem = ((i + screen_home) & 0x7ff); |
| 492 | int mem = (i + screen_home) & 0x7ff; |
| 491 | 493 | int sy = (i / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 492 | 494 | int sx = (i % crt.horizontal_displayed) << 3; |
| 493 | 495 | int chr = videoram[mem]; |
| r2343 | r2344 | |
| 502 | 504 | chr = 256; // 256 = cursor character |
| 503 | 505 | |
| 504 | 506 | drawgfx( bitmap, screen->machine->gfx[0],chr,0,0,0,sx,sy, |
| 505 | | cliprect,TRANSPARENCY_NONE,0); // put character on the screen |
| 507 | NULL,TRANSPARENCY_NONE,0); // put character on the screen |
| 506 | 508 | } |
| 507 | 509 | |
| 508 | 510 | return 0; |
| r2343 | r2344 | |
| 521 | 523 | framecnt++; |
| 522 | 524 | |
| 523 | 525 | /* Get the graphics of the character under the cursor, xor with the visible cursor scan lines, |
| 524 | | and store as character number 256. If inverse mode, drop bit 7 of character before xoring */ |
| 526 | and store as character number 256. */ |
| 525 | 527 | for ( i = 0; i < ARRAY_LENGTH(mc6845_cursor); i++) |
| 526 | 528 | pcgram[0x1000+i] = pcgram[(videoram[cursor]<<4) + i] ^ mc6845_cursor[i]; |
| 527 | 529 | |
| r2343 | r2344 | |
| 529 | 531 | |
| 530 | 532 | for( i = 0; i < bytes; i++ ) |
| 531 | 533 | { |
| 532 | | int mem = ((i + screen_home) & 0x7ff); |
| 534 | int mem = (i + screen_home) & 0x7ff; |
| 533 | 535 | int sy = (i / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 534 | 536 | int sx = (i % crt.horizontal_displayed) << 3; |
| 535 | 537 | int chr = videoram[mem]; |