trunk/src/mame/machine/amstrad.cpp
| r250332 | r250333 | |
| 709 | 709 | { |
| 710 | 710 | ma += m_asic.horiz_disp; |
| 711 | 711 | } |
| 712 | |
| 712 | 713 | m_gate_array.address = ( ( ma & 0x3000 ) << 2 ) | ( ( ra & 0x07 ) << 11 ) | ( ( ma & 0x3ff ) << 1 ); |
| 713 | 714 | m_gate_array.data = m_ram->pointer()[ m_gate_array.address ]; |
| 714 | | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 715 | if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick) |
| 716 | caddr = 0x2420; |
| 717 | else |
| 718 | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 715 | 719 | m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 ); |
| 716 | 720 | m_gate_array.colour_ticks = m_gate_array.max_colour_ticks; |
| 717 | 721 | m_gate_array.ticks = 0; |
| r250332 | r250333 | |
| 750 | 754 | UINT16 caddr; |
| 751 | 755 | |
| 752 | 756 | m_gate_array.data <<= 1; |
| 753 | | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 757 | if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick) |
| 758 | caddr = 0x2420; |
| 759 | else |
| 760 | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 754 | 761 | m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 ); |
| 755 | 762 | m_gate_array.colour_ticks = m_gate_array.max_colour_ticks; |
| 756 | 763 | } |
| r250332 | r250333 | |
| 762 | 769 | UINT16 caddr; |
| 763 | 770 | |
| 764 | 771 | m_gate_array.data = m_ram->pointer()[ m_gate_array.address + 1 ]; |
| 765 | | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 772 | if((m_asic.ram[0x2804] & 0x80) && m_asic.hsync_first_tick) |
| 773 | caddr = 0x2420; |
| 774 | else |
| 775 | caddr = 0x2400 + m_gate_array.mode_lookup[m_gate_array.data] * 2; |
| 766 | 776 | m_gate_array.colour = m_asic.ram[caddr] + ( m_asic.ram[caddr+1] << 8 ); |
| 767 | 777 | } |
| 768 | 778 | break; |
| r250332 | r250333 | |
| 776 | 786 | m_gate_array.draw_p++; |
| 777 | 787 | cycles_passed--; |
| 778 | 788 | m_gate_array.line_ticks++; |
| 789 | m_asic.hsync_tick_count++; |
| 790 | if(m_asic.hsync_tick_count > 16) |
| 791 | m_asic.hsync_first_tick = false; |
| 779 | 792 | if ( m_gate_array.line_ticks >= m_gate_array.bitmap->width() ) |
| 780 | 793 | { |
| 781 | 794 | m_gate_array.draw_p = NULL; |
| r250332 | r250333 | |
| 1031 | 1044 | m_gate_array.ma = m_crtc->get_ma(); |
| 1032 | 1045 | m_gate_array.ra = m_crtc->get_ra(); |
| 1033 | 1046 | |
| 1047 | m_asic.hsync_first_tick = true; |
| 1048 | m_asic.hsync_tick_count = 0; |
| 1034 | 1049 | m_asic.h_start = m_gate_array.line_ticks; |
| 1035 | 1050 | if(m_asic.de_start == 0) |
| 1036 | 1051 | m_asic.vpos = 0; |
| r250332 | r250333 | |
| 1039 | 1054 | m_asic.hscroll = m_asic.ram[0x2804] & 0x0f; |
| 1040 | 1055 | if ( m_asic.hscroll == 0 ) |
| 1041 | 1056 | amstrad_plus_gate_array_get_video_data(); |
| 1042 | | // if( m_asic.ram[0x2804] & 0x80 ) // draw border for first character if set (hides graphic mess when using softscroll) |
| 1043 | | // *m_gate_array.draw_p = m_asic.ram[0x2420] + ( m_asic.ram[0x2421] << 8 ); |
| 1044 | 1057 | |
| 1045 | 1058 | /* Start of screen */ |
| 1046 | 1059 | if ( m_asic.vpos == 0 ) |