src/mess/video/vtvideo.c
| r5049 | r5050 | |
| 152 | 152 | |
| 153 | 153 | WRITE8_DEVICE_HANDLER( vt_video_brightness_w ) |
| 154 | 154 | { |
| 155 | | palette_set_color_rgb(device->machine, 1, data, data, data); |
| 155 | //palette_set_color_rgb(device->machine, 1, data, data, data); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | void vt_video_display_char(const device_config *device,bitmap_t *bitmap, UINT8 code, |
| r5049 | r5050 | |
| 180 | 180 | if (j==0) j=15; else j=j-1; |
| 181 | 181 | |
| 182 | 182 | line = vt->gfx[(code & 0x7f)*16 + j]; |
| 183 | if (vt->basic_attribute==1) { |
| 184 | if ((code & 0x80)==0x80) { |
| 185 | line = line ^ 0xff; |
| 186 | } |
| 187 | } |
| 183 | 188 | |
| 184 | 189 | for (b = 0; b < 8; b++) |
| 185 | 190 | { |
| r5049 | r5050 | |
| 297 | 302 | palette_set_color_rgb(device->machine, 0, 0x00, 0x00, 0x00); // black |
| 298 | 303 | palette_set_color_rgb(device->machine, 1, 0xff, 0xff, 0xff); // white |
| 299 | 304 | |
| 300 | | vt->height = 24; |
| 305 | vt->height = 25; |
| 301 | 306 | vt->lba7 = 0; |
| 302 | 307 | |
| 303 | 308 | vt->scroll_latch = 0; |
src/mess/drivers/vt100.c
| r5049 | r5050 | |
| 44 | 44 | static READ8_HANDLER(vt100_flags_r) |
| 45 | 45 | { |
| 46 | 46 | UINT8 retVal = 0; |
| 47 | | retVal |= lba7_r(devtag_get_device(space->machine, "vt100_video"),0) * 0x40; |
| 47 | retVal |= lba7_r(devtag_get_device(space->machine, "vt100_video"),0) * 0x40; |
| 48 | retVal |= vt100_keyboard_int * 0x80; |
| 48 | 49 | return retVal; |
| 49 | 50 | } |
| 50 | 51 | |
| r5049 | r5050 | |
| 89 | 90 | |
| 90 | 91 | static READ8_HANDLER(vt100_keyboard_r) |
| 91 | 92 | { |
| 92 | | return 0xff; |
| 93 | return 0x7f; |
| 93 | 94 | } |
| 94 | 95 | static WRITE8_HANDLER(vt100_baud_rate_w) |
| 95 | 96 | { |
| r5049 | r5050 | |
| 100 | 101 | vt100_recv_baud_rate = baud_rate[data & 0x0f]; |
| 101 | 102 | } |
| 102 | 103 | |
| 104 | static WRITE8_HANDLER(vt100_nvr_latch_w) |
| 105 | { |
| 106 | } |
| 107 | |
| 103 | 108 | static ADDRESS_MAP_START( vt100_io , ADDRESS_SPACE_IO, 8) |
| 104 | 109 | ADDRESS_MAP_UNMAP_HIGH |
| 105 | 110 | // 0x00, 0x01 PUSART (Intel 8251) |
| r5049 | r5050 | |
| 113 | 118 | // 0x42 Brightness D/A latch |
| 114 | 119 | AM_RANGE (0x42, 0x42) AM_DEVWRITE("vt100_video", vt_video_brightness_w) |
| 115 | 120 | // 0x62 NVR latch |
| 116 | | // AM_RANGE (0x62, 0x62) |
| 121 | AM_RANGE (0x62, 0x62) AM_WRITE(vt100_nvr_latch_w) |
| 117 | 122 | // 0x82 Keyboard UART data output |
| 118 | 123 | AM_RANGE (0x82, 0x82) AM_READ(vt100_keyboard_r) |
| 119 | 124 | // 0x82 Keyboard UART data input |
| r5049 | r5050 | |
| 260 | 265 | static IRQ_CALLBACK(vt100_irq_callback) |
| 261 | 266 | { |
| 262 | 267 | UINT8 retVal = 0xc7 | (0x08 * vt100_keyboard_int) | (0x10 * vt100_receiver_int) | (0x20 * vt100_vertical_int); |
| 263 | | vt100_keyboard_int = 0; |
| 264 | 268 | vt100_receiver_int = 0; |
| 265 | | |
| 266 | 269 | return retVal; |
| 267 | 270 | } |
| 268 | 271 | |
| r5049 | r5050 | |
| 280 | 283 | output_set_value("l4_led", 1); |
| 281 | 284 | |
| 282 | 285 | vt100_key_scan = 0; |
| 283 | | timer_pulse(machine, ATTOTIME_IN_HZ(24), NULL, 0, keyboard_callback); |
| 286 | timer_pulse(machine, ATTOTIME_IN_HZ(240), NULL, 0, keyboard_callback); |
| 284 | 287 | |
| 285 | 288 | cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), vt100_irq_callback); |
| 286 | 289 | } |
| r5049 | r5050 | |
| 324 | 327 | MDRV_SCREEN_REFRESH_RATE(60) |
| 325 | 328 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 326 | 329 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 327 | | MDRV_SCREEN_SIZE(80*10, 24*10) |
| 328 | | MDRV_SCREEN_VISIBLE_AREA(0, 80*10-1, 0, 24*10-1) |
| 330 | MDRV_SCREEN_SIZE(80*10, 30*10) |
| 331 | MDRV_SCREEN_VISIBLE_AREA(0, 80*10-1, 0, 30*10-1) |
| 329 | 332 | MDRV_PALETTE_LENGTH(2) |
| 330 | 333 | MDRV_PALETTE_INIT(black_and_white) |
| 331 | 334 | |
| 332 | | MDRV_DEFAULT_LAYOUT( layout_vt100 ) |
| 335 | //MDRV_DEFAULT_LAYOUT( layout_vt100 ) |
| 333 | 336 | MDRV_VIDEO_START(generic_bitmapped) |
| 334 | 337 | MDRV_VIDEO_UPDATE(vt100) |
| 335 | 338 | |