src/mess/video/abc80x.c
| r3365 | r3366 | |
| 174 | 174 | |
| 175 | 175 | static MC6845_UPDATE_ROW( abc800m_update_row ) |
| 176 | 176 | { |
| 177 | abc800_state *state = device->machine->driver_data; |
| 178 | |
| 177 | 179 | int column; |
| 178 | | const UINT8 *charrom = memory_region(device->machine, "chargen"); |
| 179 | 180 | |
| 180 | 181 | for (column = 0; column < x_count; column++) |
| 181 | 182 | { |
| 182 | 183 | int bit; |
| 183 | 184 | |
| 184 | 185 | UINT16 address = (videoram[(ma + column) & 0x7ff] << 4) | (ra & 0x0f); |
| 185 | | UINT8 data = (charrom[address & 0x7ff] & 0x3f); |
| 186 | UINT8 data = (state->char_rom[address & 0x7ff] & 0x3f); |
| 186 | 187 | |
| 187 | 188 | if (column == cursor_x) |
| 188 | 189 | { |
| r3365 | r3366 | |
| 219 | 220 | abc802_state *state = device->machine->driver_data; |
| 220 | 221 | |
| 221 | 222 | int column; |
| 222 | | const UINT8 *charrom = memory_region(device->machine, "chargen"); |
| 223 | 223 | |
| 224 | 224 | for (column = 0; column < x_count; column++) |
| 225 | 225 | { |
| r3365 | r3366 | |
| 235 | 235 | ra_latch = 0x0f; |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | | data = charrom[(address + ra_latch) & 0x1fff]; |
| 238 | data = state->char_rom[(address + ra_latch) & 0x1fff]; |
| 239 | 239 | |
| 240 | 240 | if (data & ABC802_ATE) |
| 241 | 241 | { |
| r3365 | r3366 | |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | // reload data and mask out two bottom bits |
| 275 | | data = charrom[(address + ra_latch) & 0x1fff] & 0xfc; |
| 275 | data = state->char_rom[(address + ra_latch) & 0x1fff] & 0xfc; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | data <<= 2; |
| r3365 | r3366 | |
| 361 | 361 | /* find devices */ |
| 362 | 362 | |
| 363 | 363 | state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG); |
| 364 | |
| 365 | /* find memory regions */ |
| 366 | |
| 367 | state->char_rom = memory_region(machine, "chargen"); |
| 364 | 368 | } |
| 365 | 369 | |
| 366 | 370 | static VIDEO_START( abc802 ) |
| r3365 | r3366 | |
| 371 | 375 | |
| 372 | 376 | state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG); |
| 373 | 377 | |
| 378 | /* find memory regions */ |
| 379 | |
| 380 | state->char_rom = memory_region(machine, "chargen"); |
| 381 | |
| 374 | 382 | /* allocate timer */ |
| 375 | 383 | |
| 376 | 384 | state->flash_timer = timer_alloc(abc802_flash_tick, NULL); |
src/mess/video/abc806.c
| r3365 | r3366 | |
| 205 | 205 | abc806_state *state = device->machine->driver_data;
|
| 206 | 206 | |
| 207 | 207 | int column;
|
| 208 | | const UINT8 *charrom = memory_region(device->machine, "chargen");
|
| 209 | 208 | |
| 210 | 209 | UINT8 old_data = 0xff;
|
| 211 | 210 | int fg_color = 7;
|
| r3365 | r3366 | |
| 286 | 285 | else
|
| 287 | 286 | {
|
| 288 | 287 | rad_addr = (e6 << 8) | (e5 << 7) | (flash << 6) | (underline << 5) | (state->flshclk << 4) | ra;
|
| 289 | | rad_data = memory_region(device->machine, "rad")[rad_addr] & 0x0f;
|
| 288 | rad_data = state->rad_prom[rad_addr] & 0x0f;
|
| 290 | 289 | |
| 291 | 290 | rad_data = ra; // HACK because the RAD prom is not dumped yet
|
| 292 | 291 | }
|
| 293 | 292 | |
| 294 | 293 | chargen_addr = (th << 12) | (data << 4) | rad_data;
|
| 295 | | chargen_data = charrom[chargen_addr & 0xfff] << 2;
|
| 294 | chargen_data = state->char_rom[chargen_addr & 0xfff] << 2;
|
| 296 | 295 | x = column * ABC800_CHAR_WIDTH;
|
| 297 | 296 | |
| 298 | 297 | for (bit = 0; bit < ABC800_CHAR_WIDTH; bit++)
|
| r3365 | r3366 | |
| 426 | 425 | |
| 427 | 426 | state->mc6845 = device_list_find_by_tag(machine->config->devicelist, MC6845, MC6845_TAG);
|
| 428 | 427 | |
| 428 | /* find memory regions */
|
| 429 | |
| 430 | state->char_rom = memory_region(machine, "chargen");
|
| 431 | state->rad_prom = memory_region(machine, "rad");
|
| 432 | |
| 429 | 433 | /* allocate memory */
|
| 430 | 434 | |
| 431 | 435 | state->charram = auto_malloc(ABC806_CHAR_RAM_SIZE);
|
src/mess/includes/abc80x.h
| r3365 | r3366 | |
| 45 | 45 | const device_config *z80dart; |
| 46 | 46 | const device_config *z80sio; |
| 47 | 47 | const device_config *mc6845; |
| 48 | |
| 49 | /* memory regions */ |
| 50 | const UINT8 *char_rom; /* character generator ROM */ |
| 48 | 51 | }; |
| 49 | 52 | |
| 50 | 53 | typedef struct _abc802_state abc802_state; |
| r3365 | r3366 | |
| 66 | 69 | const device_config *z80dart; |
| 67 | 70 | const device_config *z80sio; |
| 68 | 71 | const device_config *mc6845; |
| 72 | |
| 73 | /* memory regions */ |
| 74 | const UINT8 *char_rom; /* character generator ROM */ |
| 69 | 75 | }; |
| 70 | 76 | |
| 71 | 77 | typedef struct _abc806_state abc806_state; |
| r3365 | r3366 | |
| 104 | 110 | const device_config *z80dart; |
| 105 | 111 | const device_config *z80sio; |
| 106 | 112 | const device_config *mc6845; |
| 113 | |
| 114 | /* memory regions */ |
| 115 | const UINT8 *rad_prom; /* line address PROM */ |
| 116 | const UINT8 *char_rom; /* character generator ROM */ |
| 107 | 117 | }; |
| 108 | 118 | |
| 109 | 119 | /*----------- defined in video/abc80x.c -----------*/ |