src/mess/video/coco.c
| r5310 | r5311 | |
| 29 | 29 | * |
| 30 | 30 | *************************************/ |
| 31 | 31 | |
| 32 | ATTR_CONST UINT8 coco_get_attributes_2(running_machine *machine, UINT8 c, int scanline, int pos) |
| 33 | { |
| 34 | coco_state *state = machine->driver_data; |
| 35 | UINT8 result = 0x00; |
| 36 | UINT8 pia1_pb = pia6821_get_output_b(state->pia_1); |
| 37 | |
| 38 | if (c & 0x40) result |= M6847_INV; |
| 39 | if (c & 0x80) result |= M6847_AS; |
| 40 | if (pia1_pb & 0x08) result |= M6847_CSS; |
| 41 | if (pia1_pb & 0x10) result |= M6847_GM0; |
| 42 | if (pia1_pb & 0x20) result |= M6847_GM1; |
| 43 | if (pia1_pb & 0x40) result |= M6847_GM2; |
| 44 | if (pia1_pb & 0x80) result |= M6847_AG; |
| 45 | return result; |
| 46 | } |
| 47 | |
| 32 | 48 | ATTR_CONST UINT8 coco_get_attributes(running_machine *machine, UINT8 c, int scanline, int pos) |
| 33 | 49 | { |
| 34 | 50 | coco_state *state = machine->driver_data; |
| r5310 | r5311 | |
| 46 | 62 | } |
| 47 | 63 | |
| 48 | 64 | |
| 49 | | |
| 50 | 65 | static void coco_horizontal_sync_callback(running_machine *machine, int data) |
| 51 | 66 | { |
| 52 | 67 | coco_state *state = machine->driver_data; |
| r5310 | r5311 | |
| 79 | 94 | if (machine->gamedrv->name[0] == 'c') |
| 80 | 95 | cfg.cpu0_timing_factor = 4; |
| 81 | 96 | |
| 82 | | cfg.get_attributes = coco_get_attributes; |
| 97 | if (type==M6847_VERSION_M6847T1_NTSC) { |
| 98 | cfg.get_attributes = coco_get_attributes; |
| 99 | } else { |
| 100 | cfg.get_attributes = coco_get_attributes_2; |
| 101 | } |
| 83 | 102 | cfg.get_video_ram = get_video_ram_coco; |
| 84 | 103 | cfg.horizontal_sync_callback = coco_horizontal_sync_callback; |
| 85 | 104 | cfg.field_sync_callback = coco_field_sync_callback; |