trunk/src/mess/drivers/tim100.c
| r19720 | r19721 | |
| 63 | 63 | |
| 64 | 64 | const gfx_layout tim100_charlayout = |
| 65 | 65 | { |
| 66 | | 16, 16, /* 8x16 characters */ |
| 66 | 12, 16, /* 8x16 characters */ |
| 67 | 67 | 128, /* 128 characters */ |
| 68 | 68 | 1, /* 1 bits per pixel */ |
| 69 | 69 | {0}, /* no bitplanes; 1 bit per pixel */ |
| 70 | | {0,1,2,3,4,5,6,7,0+0x4000,1+0x4000,2+0x4000,3+0x4000,4+0x4000,5+0x4000,6+0x4000,7+0x4000}, |
| 70 | {0,1,2,3,4,5,0+0x4000,1+0x4000,2+0x4000,3+0x4000,4+0x4000,5+0x4000}, |
| 71 | 71 | {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8, |
| 72 | 72 | 8 * 8, 9 * 8, 10 * 8, 11 * 8, 12 * 8, 13 * 8, 14 * 8, 15 * 8}, |
| 73 | 73 | 8*16 /* space between characters */ |
| r19720 | r19721 | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
| 91 | | |
| 91 | // this gets called via a (i8275_dack_w), so does nothing currently |
| 92 | // once fixed, pixel count needs adjusting |
| 92 | 93 | static I8275_DISPLAY_PIXELS(tim100_display_pixels) |
| 93 | 94 | { |
| 94 | | |
| 95 | 95 | tim100_state *state = device->machine().driver_data<tim100_state>(); |
| 96 | 96 | int i; |
| 97 | 97 | bitmap_rgb32 &bitmap = state->m_bitmap; |
| 98 | 98 | const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); |
| 99 | 99 | UINT8 *charmap = state->memregion("chargen")->base(); |
| 100 | | UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; |
| 101 | | if (vsp) { |
| 100 | UINT8 pixels = charmap[(linecount & 15) + (charcode << 4)]; |
| 101 | if (vsp) |
| 102 | { |
| 102 | 103 | pixels = 0; |
| 103 | 104 | } |
| 104 | | if (lten) { |
| 105 | |
| 106 | if (lten) |
| 107 | { |
| 105 | 108 | pixels = 0xff; |
| 106 | 109 | } |
| 107 | | if (rvv) { |
| 110 | |
| 111 | if (rvv) |
| 112 | { |
| 108 | 113 | pixels ^= 0xff; |
| 109 | 114 | } |
| 110 | | for(i=0;i<8;i++) { |
| 115 | |
| 116 | for(i=0;i<8;i++) // 6 pixels |
| 117 | { |
| 111 | 118 | bitmap.pix32(y, x + i) = palette[(pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0]; |
| 112 | 119 | } |
| 113 | | |
| 114 | 120 | } |
| 115 | 121 | |
| 116 | 122 | static const i8275_interface tim100_i8276_interface = { |
| 117 | 123 | "screen", |
| 118 | | 16, |
| 124 | 16, //12 |
| 119 | 125 | 0, |
| 120 | 126 | DEVCB_CPU_INPUT_LINE("maincpu", I8085_RST65_LINE), |
| 121 | 127 | DEVCB_NULL, |
| r19720 | r19721 | |
| 140 | 146 | |
| 141 | 147 | MCFG_I8275_ADD ( "i8276", tim100_i8276_interface) |
| 142 | 148 | |
| 143 | | MCFG_PALETTE_LENGTH(2) |
| 144 | | MCFG_PALETTE_INIT(black_and_white) |
| 149 | MCFG_PALETTE_LENGTH(3) |
| 145 | 150 | |
| 146 | 151 | MCFG_I8251_ADD("uart_u17", default_i8251_interface) |
| 147 | 152 | MCFG_I8251_ADD("uart_u18", default_i8251_interface) |
| r19720 | r19721 | |
| 151 | 156 | ROM_START( tim100 ) |
| 152 | 157 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 153 | 158 | ROM_LOAD( "tim 100 v.3.2.0.u16", 0x0000, 0x2000, CRC(4de9c8ad) SHA1(b0914d6e8d618e92a87b4b39c35391541251e8cc)) |
| 154 | | ROM_REGION( 0x2000, "chargen", ROMREGION_ERASEFF ) |
| 159 | ROM_REGION( 0x2000, "chargen", ROMREGION_INVERT ) |
| 155 | 160 | ROM_SYSTEM_BIOS( 0, "212", "v 2.1.2" ) |
| 156 | 161 | ROMX_LOAD( "tim 100kg v.2.1.2.u12", 0x0000, 0x2000, CRC(faf5743c) SHA1(310b662e9535878210f8aaab3e2b846fade60642),ROM_BIOS(1)) |
| 157 | 162 | ROM_SYSTEM_BIOS( 1, "220", "v 2.2.0" ) |