trunk/src/emu/bus/isa/mda.c
r241498 | r241499 | |
44 | 44 | { |
45 | 45 | MDA_TEXT_INTEN = 0, |
46 | 46 | MDA_TEXT_BLINK, |
47 | | HERCULES_GFX_BLINK |
| 47 | HERCULES_GFX_BLINK, |
| 48 | MDA_LOWRES_TEXT_INTEN, |
| 49 | MDA_LOWRES_TEXT_BLINK |
48 | 50 | }; |
49 | 51 | |
50 | 52 | /* F4 Character Displayer */ |
r241498 | r241499 | |
750 | 752 | } |
751 | 753 | return data; |
752 | 754 | } |
| 755 | |
| 756 | // XXX |
| 757 | MACHINE_CONFIG_FRAGMENT( pcvideo_ec1840_0002 ) |
| 758 | MCFG_SCREEN_ADD( MDA_SCREEN_NAME, RASTER) |
| 759 | MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 792, 0, 640, 370, 0, 350 ) |
| 760 | MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update ) |
| 761 | |
| 762 | MCFG_PALETTE_ADD( "palette", 4 ) |
| 763 | |
| 764 | MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_SCREEN_NAME, MDA_CLOCK/8) |
| 765 | MCFG_MC6845_SHOW_BORDER_AREA(false) |
| 766 | MCFG_MC6845_CHAR_WIDTH(8) |
| 767 | MCFG_MC6845_UPDATE_ROW_CB(isa8_mda_device, crtc_update_row) |
| 768 | MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(isa8_mda_device, hsync_changed)) |
| 769 | MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(isa8_mda_device, vsync_changed)) |
| 770 | MACHINE_CONFIG_END |
| 771 | |
| 772 | const device_type ISA8_EC1840_0002 = &device_creator<isa8_ec1840_0002_device>; |
| 773 | |
| 774 | |
| 775 | //------------------------------------------------- |
| 776 | // machine_config_additions - device-specific |
| 777 | // machine configurations |
| 778 | //------------------------------------------------- |
| 779 | |
| 780 | machine_config_constructor isa8_ec1840_0002_device::device_mconfig_additions() const |
| 781 | { |
| 782 | return MACHINE_CONFIG_NAME( pcvideo_ec1840_0002 ); |
| 783 | } |
| 784 | |
| 785 | //------------------------------------------------- |
| 786 | // isa8_ec1840_0002_device - constructor |
| 787 | //------------------------------------------------- |
| 788 | |
| 789 | isa8_ec1840_0002_device::isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 790 | isa8_mda_device( mconfig, ISA8_EC1840_0002, "EC 1840.0002 (MDA)", tag, owner, clock, "ec1840_0002", __FILE__) |
| 791 | { |
| 792 | } |
| 793 | |
| 794 | //------------------------------------------------- |
| 795 | // device_start - device-specific startup |
| 796 | //------------------------------------------------- |
| 797 | |
| 798 | void isa8_ec1840_0002_device::device_start() |
| 799 | { |
| 800 | isa8_mda_device::device_start(); |
| 801 | |
| 802 | m_soft_chr_gen = auto_alloc_array(machine(), UINT8, 0x2000); |
| 803 | m_isa->install_bank(0xdc000, 0xddfff, 0, 0x2000, "bank_chargen", m_soft_chr_gen); |
| 804 | } |
| 805 | |
| 806 | void isa8_ec1840_0002_device::device_reset() |
| 807 | { |
| 808 | isa8_mda_device::device_reset(); |
| 809 | |
| 810 | m_chr_gen = m_soft_chr_gen; |
| 811 | } |
| 812 | |
| 813 | |
| 814 | /*************************************************************************** |
| 815 | Draw text mode with 80x25 characters (default) and intense background. |
| 816 | The character cell size is 8x14. |
| 817 | ***************************************************************************/ |
| 818 | |
| 819 | MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_inten_update_row ) |
| 820 | { |
| 821 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 822 | UINT32 *p = &bitmap.pix32(y); |
| 823 | UINT16 chr_base = ra; |
| 824 | int i; |
| 825 | |
| 826 | if ( y == 0 ) MDA_LOG(1,"mda_lowres_text_inten_update_row",("\n")); |
| 827 | for ( i = 0; i < x_count; i++ ) |
| 828 | { |
| 829 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 830 | UINT8 chr = m_videoram[ offset ]; |
| 831 | UINT8 attr = m_videoram[ offset + 1 ]; |
| 832 | UINT8 data = m_chr_gen[ (chr_base + chr * 16) << 1 ]; |
| 833 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 834 | UINT8 bg = 0; |
| 835 | |
| 836 | if ( ( attr & ~0x88 ) == 0 ) |
| 837 | { |
| 838 | data = 0x00; |
| 839 | } |
| 840 | |
| 841 | switch( attr ) |
| 842 | { |
| 843 | case 0x70: |
| 844 | bg = 2; |
| 845 | fg = 0; |
| 846 | break; |
| 847 | case 0x78: |
| 848 | bg = 2; |
| 849 | fg = 1; |
| 850 | break; |
| 851 | case 0xF0: |
| 852 | bg = 3; |
| 853 | fg = 0; |
| 854 | break; |
| 855 | case 0xF8: |
| 856 | bg = 3; |
| 857 | fg = 1; |
| 858 | break; |
| 859 | } |
| 860 | |
| 861 | if ( ( i == cursor_x && ( m_framecnt & 0x08 ) ) || ( attr & 0x07 ) == 0x01 ) |
| 862 | { |
| 863 | data = 0xFF; |
| 864 | } |
| 865 | |
| 866 | *p = palette[( data & 0x80 ) ? fg : bg]; p++; |
| 867 | *p = palette[( data & 0x40 ) ? fg : bg]; p++; |
| 868 | *p = palette[( data & 0x20 ) ? fg : bg]; p++; |
| 869 | *p = palette[( data & 0x10 ) ? fg : bg]; p++; |
| 870 | *p = palette[( data & 0x08 ) ? fg : bg]; p++; |
| 871 | *p = palette[( data & 0x04 ) ? fg : bg]; p++; |
| 872 | *p = palette[( data & 0x02 ) ? fg : bg]; p++; |
| 873 | *p = palette[( data & 0x01 ) ? fg : bg]; p++; |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | |
| 878 | /*************************************************************************** |
| 879 | Draw text mode with 80x25 characters (default) and blinking characters. |
| 880 | The character cell size is 8x14. |
| 881 | ***************************************************************************/ |
| 882 | |
| 883 | MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_blink_update_row ) |
| 884 | { |
| 885 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 886 | UINT32 *p = &bitmap.pix32(y); |
| 887 | UINT16 chr_base = ra; |
| 888 | int i; |
| 889 | |
| 890 | if ( y == 0 ) MDA_LOG(1,"mda_lowres_text_blink_update_row",("\n")); |
| 891 | for ( i = 0; i < x_count; i++ ) |
| 892 | { |
| 893 | UINT16 offset = ( ( ma + i ) << 1 ) & 0x0FFF; |
| 894 | UINT8 chr = m_videoram[ offset ]; |
| 895 | UINT8 attr = m_videoram[ offset + 1 ]; |
| 896 | UINT8 data = m_chr_gen[ (chr_base + chr * 16) << 1 ]; |
| 897 | UINT8 fg = ( attr & 0x08 ) ? 3 : 2; |
| 898 | UINT8 bg = 0; |
| 899 | |
| 900 | if ( ( attr & ~0x88 ) == 0 ) |
| 901 | { |
| 902 | data = 0x00; |
| 903 | } |
| 904 | |
| 905 | switch( attr ) |
| 906 | { |
| 907 | case 0x70: |
| 908 | case 0xF0: |
| 909 | bg = 2; |
| 910 | fg = 0; |
| 911 | break; |
| 912 | case 0x78: |
| 913 | case 0xF8: |
| 914 | bg = 2; |
| 915 | fg = 1; |
| 916 | break; |
| 917 | } |
| 918 | |
| 919 | if ( ( attr & 0x07 ) == 0x01 ) |
| 920 | { |
| 921 | data = 0xFF; |
| 922 | } |
| 923 | |
| 924 | if ( i == cursor_x ) |
| 925 | { |
| 926 | if ( m_framecnt & 0x08 ) |
| 927 | { |
| 928 | data = 0xFF; |
| 929 | } |
| 930 | } |
| 931 | else |
| 932 | { |
| 933 | if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) ) |
| 934 | { |
| 935 | data = 0x00; |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | *p = palette[( data & 0x80 ) ? fg : bg]; p++; |
| 940 | *p = palette[( data & 0x40 ) ? fg : bg]; p++; |
| 941 | *p = palette[( data & 0x20 ) ? fg : bg]; p++; |
| 942 | *p = palette[( data & 0x10 ) ? fg : bg]; p++; |
| 943 | *p = palette[( data & 0x08 ) ? fg : bg]; p++; |
| 944 | *p = palette[( data & 0x04 ) ? fg : bg]; p++; |
| 945 | *p = palette[( data & 0x02 ) ? fg : bg]; p++; |
| 946 | *p = palette[( data & 0x01 ) ? fg : bg]; p++; |
| 947 | } |
| 948 | } |
| 949 | |
| 950 | WRITE8_MEMBER( isa8_ec1840_0002_device::mode_control_w ) |
| 951 | { |
| 952 | m_mode_control = data; |
| 953 | |
| 954 | switch( m_mode_control & 0x2a ) |
| 955 | { |
| 956 | case 0x08: |
| 957 | m_update_row_type = MDA_LOWRES_TEXT_INTEN; |
| 958 | break; |
| 959 | case 0x28: |
| 960 | m_update_row_type = MDA_LOWRES_TEXT_BLINK; |
| 961 | break; |
| 962 | default: |
| 963 | m_update_row_type = -1; |
| 964 | } |
| 965 | } |
| 966 | |
| 967 | MC6845_UPDATE_ROW( isa8_ec1840_0002_device::crtc_update_row ) |
| 968 | { |
| 969 | if (m_update_row_type == -1) |
| 970 | return; |
| 971 | |
| 972 | switch (m_update_row_type) |
| 973 | { |
| 974 | case MDA_LOWRES_TEXT_INTEN: |
| 975 | mda_lowres_text_inten_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp); |
| 976 | break; |
| 977 | case MDA_LOWRES_TEXT_BLINK: |
| 978 | mda_lowres_text_blink_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp); |
| 979 | break; |
| 980 | } |
| 981 | } |
trunk/src/mame/drivers/peplus.c
r241498 | r241499 | |
141 | 141 | PPnnnn Poker games. Several different types of poker require specific CG graphics + CAP color prom |
142 | 142 | IPnnnn International Poker games. Several different types of poker require specific CG graphics + CAP color prom |
143 | 143 | PSnnnn Slot games. Each slot game requires specific CG graphics + CAP color prom |
144 | | MGnnnn Multi Game programs for the Player's Choice machines that had optional touchscreens and or printers |
145 | 144 | |
146 | 145 | Super PE+ |
147 | 146 | Program Types |
r241498 | r241499 | |
8953 | 8952 | GAMEL(1987, peip0120, peip0031, peplus, peplus_poker, peplus_state, nonplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (IP0120) Standard Draw Poker - French", 0, layout_pe_poker ) |
8954 | 8953 | |
8955 | 8954 | /* Normal board : Blackjack */ |
8956 | | GAMEL(1994, pebe0014, 0, peplus, peplus_bjack, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (BE0014) Blackjack", 0, layout_pe_bjack ) |
| 8955 | GAMEL(1994, pebe0014, 0, peplus, peplus_bjack, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (BE0014) Blackjack", 0, layout_pe_bjack ) |
8957 | 8956 | |
8958 | 8957 | /* Normal board : Keno */ |
8959 | 8958 | GAMEL(1994, peke1012, 0, peplus, peplus_keno, peplus_state, peplus, ROT0, "IGT - International Game Technology", "Player's Edge Plus (KE1012) Keno", 0, layout_pe_keno ) |