src/mess/drivers/coupe.c
| r2176 | r2177 | |
| 116 | 116 | static READ8_HANDLER( coupe_pen_r ) |
| 117 | 117 | { |
| 118 | 118 | UINT8 data; |
| 119 | | |
| 119 | |
| 120 | 120 | if (offset & 0x100) |
| 121 | 121 | { |
| 122 | 122 | /* return either the current line or 192 for the vblank area */ |
| 123 | 123 | int line = video_screen_get_vpos(machine->primary_screen); |
| 124 | | data = video_screen_get_vblank(machine->primary_screen) ? 192 : line; |
| 124 | data = video_screen_get_vblank(machine->primary_screen) ? 192 : line; |
| 125 | 125 | } |
| 126 | 126 | else |
| 127 | 127 | { |
| 128 | 128 | /* horizontal position is encoded into bits 3 to 8 */ |
| 129 | 129 | data = video_screen_get_hpos(machine->primary_screen) & 0xfc; |
| 130 | 130 | } |
| 131 | | |
| 131 | |
| 132 | 132 | return data; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | |
| 136 | 136 | static WRITE8_HANDLER( coupe_clut_w ) |
| 137 | 137 | { |
| 138 | | CLUT[(offset >> 8) & 0x0f] = data & 0x7f; |
| 138 | CLUT[(offset >> 8) & 0x0f] = data & 0x7f; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
| r2176 | r2177 | |
| 143 | 143 | { |
| 144 | 144 | UINT8 data = 0xe0; |
| 145 | 145 | UINT8 row = ~(offset >> 8); |
| 146 | | |
| 146 | |
| 147 | 147 | if (row & 0x80) data &= readinputport(7) & 0xe0; |
| 148 | 148 | if (row & 0x40) data &= readinputport(6) & 0xe0; |
| 149 | 149 | if (row & 0x20) data &= readinputport(5) & 0xe0; |
| r2176 | r2177 | |
| 577 | 577 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 578 | 578 | |
| 579 | 579 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 580 | | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_coupe_floppy; break; |
| 580 | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(coupe_floppy); break; |
| 581 | 581 | |
| 582 | 582 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 583 | 583 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |