trunk/src/mess/drivers/pc9801.c
| r19462 | r19463 | |
| 680 | 680 | UINT8 attr,pen; |
| 681 | 681 | UINT32 tile_addr; |
| 682 | 682 | UINT8 knj_tile; |
| 683 | UINT8 gfx_mode; |
| 683 | 684 | |
| 684 | 685 | tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1)); |
| 685 | 686 | |
| r19462 | r19463 | |
| 713 | 714 | //blink = attr & 2; |
| 714 | 715 | reverse = attr & 4; |
| 715 | 716 | u_line = attr & 8; |
| 716 | | v_line = attr & 0x10; |
| 717 | v_line = (state->m_video_ff[ATTRSEL_REG]) ? 0 : attr & 0x10; |
| 718 | gfx_mode = (state->m_video_ff[ATTRSEL_REG]) ? attr & 0x10 : 0; |
| 717 | 719 | color = (attr & 0xe0) >> 5; |
| 718 | 720 | |
| 719 | | if(state->m_video_ff[ATTRSEL_REG]) |
| 720 | | v_line = 0; |
| 721 | | |
| 722 | 721 | for(yi=0;yi<lr;yi++) |
| 723 | 722 | { |
| 724 | 723 | for(xi=0;xi<8;xi++) |
| r19462 | r19463 | |
| 735 | 734 | |
| 736 | 735 | if(!secret) |
| 737 | 736 | { |
| 738 | | if(kanji_sel) |
| 737 | /* TODO: priority */ |
| 738 | if(gfx_mode) |
| 739 | { |
| 740 | int gfx_bit; |
| 741 | tile_data = 0; |
| 742 | |
| 743 | /* |
| 744 | gfx strip mode: |
| 745 | |
| 746 | number refers to the bit number in the tile data. |
| 747 | This mode is identical to the one seen in PC-8801 |
| 748 | 00004444 |
| 749 | 11115555 |
| 750 | 22226666 |
| 751 | 33337777 |
| 752 | */ |
| 753 | |
| 754 | gfx_bit = (xi & 4); |
| 755 | gfx_bit+= (yi & (2 << (char_size == 16)))>>(1+(char_size == 16)); |
| 756 | gfx_bit+= (yi & (4 << (char_size == 16)))>>(1+(char_size == 16)); |
| 757 | |
| 758 | tile_data = ((tile >> gfx_bit) & 1) ? 0xff : 0x00; |
| 759 | } |
| 760 | else if(kanji_sel) |
| 739 | 761 | tile_data = (state->m_kanji_rom[tile*0x20+yi*2+pcg_lr]); |
| 740 | 762 | else if(pcg_sel) |
| 741 | 763 | tile_data = (state->m_pcg_ram[0xac000+tile*0x20+yi*2+pcg_lr]); |