src/mess/video/mbee.c
| r9283 | r9284 | |
| 173 | 173 | |
| 174 | 174 | WRITE8_HANDLER( mbeeppc_1c_w ) |
| 175 | 175 | { |
| 176 | | /* d7 extended graphics - not emulated |
| 176 | /* d7 extended graphics (1=allow attributes and pcg banks) |
| 177 | 177 | d5 bankswitch basic rom |
| 178 | 178 | d4 select attribute ram |
| 179 | 179 | d3..d0 select videoram bank */ |
| r9283 | r9284 | |
| 684 | 684 | UINT8 speed = crt.cursor_top&0x20, flash = crt.cursor_top&0x40; // cursor modes |
| 685 | 685 | UINT16 cursor = (crt.cursor_address_hi<<8) | crt.cursor_address_lo; // get cursor position |
| 686 | 686 | UINT16 screen_home = (crt.screen_address_hi<<8) | crt.screen_address_lo; // screen home offset (usually zero) |
| 687 | | UINT16 colourm = (mbee_08 & 0x0e) << 7; |
| 688 | 687 | |
| 689 | 688 | framecnt++; |
| 690 | 689 | |
| r9283 | r9284 | |
| 699 | 698 | UINT8 inv=0; |
| 700 | 699 | mem = (x + screen_home) & 0x7ff; |
| 701 | 700 | chr = videoram[mem]; |
| 702 | | col = colorram[mem] | colourm; // read a byte of colour |
| 701 | col = colorram[mem]; // read a byte of colour |
| 703 | 702 | |
| 704 | | if (chr & 0x80) |
| 705 | | chr += (attribram[mem] << 7); // bump chr to its particular pcg definition |
| 703 | if (mbee_1c & 0x80) // are extended features enabled? |
| 704 | { |
| 705 | UINT8 attr = attribram[mem]; |
| 706 | 706 | |
| 707 | if (chr & 0x80) |
| 708 | chr += ((attr & 15) << 7); // bump chr to its particular pcg definition |
| 709 | |
| 710 | if (attr & 0x40) |
| 711 | inv ^= 0xff; // inverse attribute |
| 712 | |
| 713 | |
| 714 | /* Flashing attribute - flash speed is unknown */ |
| 715 | if ((attr & 0x80) && (framecnt & 8)) |
| 716 | chr = 0x20; |
| 717 | } |
| 718 | |
| 707 | 719 | if ((x & 15) == 0) |
| 708 | 720 | { |
| 709 | 721 | if (mbee_wait_time) |
| r9283 | r9284 | |
| 721 | 733 | |
| 722 | 734 | /* get pattern of pixels for that character scanline */ |
| 723 | 735 | gfx = gfxram[(chr<<4) | ra] ^ inv; |
| 724 | | fg = (col & 0x001f) | 64; // map to foreground palette |
| 725 | | bg = (col & 0x07e0) >> 5; // and background palette |
| 736 | fg = col & 15; // map to foreground palette |
| 737 | bg = (col & 0xf0) >> 4; // and background palette |
| 726 | 738 | |
| 727 | 739 | /* Display a scanline of a character (8 pixels) */ |
| 728 | 740 | *p = ( gfx & 0x80 ) ? fg : bg; p++; |
| r9283 | r9284 | |
| 766 | 778 | palette_set_color(machine, i|64, MAKE_RGB(r, g, b)); |
| 767 | 779 | } |
| 768 | 780 | } |
| 781 | |
| 782 | |
| 783 | PALETTE_INIT( mbeeppc ) |
| 784 | { |
| 785 | UINT16 i; |
| 786 | UINT8 r, b, g; |
| 787 | |
| 788 | /* set up 8 low intensity colours */ |
| 789 | for (i = 0; i < 8; i++) |
| 790 | { |
| 791 | r = (i & 1) ? 0x80 : 0; |
| 792 | g = (i & 2) ? 0x80 : 0; |
| 793 | b = (i & 4) ? 0x80 : 0; |
| 794 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); |
| 795 | } |
| 796 | |
| 797 | /* set up 8 high intensity colours */ |
| 798 | for (i = 9; i < 16; i++) |
| 799 | { |
| 800 | r = (i & 1) ? 0xff : 0; |
| 801 | g = (i & 2) ? 0xff : 0; |
| 802 | b = (i & 4) ? 0xff : 0; |
| 803 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); |
| 804 | } |
| 805 | } |
| 806 | |
src/mess/drivers/mbee.c
| r9283 | r9284 | |
| 364 | 364 | GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 48 ) |
| 365 | 365 | GFXDECODE_END |
| 366 | 366 | |
| 367 | static GFXDECODE_START( mbeeppc ) |
| 368 | GFXDECODE_ENTRY( "gfx", 0x0000, mbee_charlayout, 0, 8 ) |
| 369 | GFXDECODE_END |
| 370 | |
| 367 | 371 | static FLOPPY_OPTIONS_START(mbee) |
| 368 | 372 | FLOPPY_OPTION(ss80, "ss80", "SS80 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 369 | 373 | HEADS([1]) |
| r9283 | r9284 | |
| 502 | 506 | MDRV_CPU_IO_MAP(mbeeppc_io) |
| 503 | 507 | MDRV_VIDEO_START(mbeeppc) |
| 504 | 508 | MDRV_VIDEO_UPDATE(mbeeppc) |
| 509 | MDRV_GFXDECODE(mbeeppc) |
| 510 | MDRV_PALETTE_LENGTH(16) |
| 511 | MDRV_PALETTE_INIT(mbeeppc) |
| 505 | 512 | MACHINE_CONFIG_END |
| 506 | 513 | |
| 507 | 514 | static MACHINE_CONFIG_DERIVED( mbee56, mbeeic ) |