Previous 15994 Revisions Next

r2177 Monday 31st March, 2008 at 02:42:44 UTC by Dirk Best
[COUPE] Use the new device macro
[src/mess/drivers]coupe.c

src/mess/drivers/coupe.c
r2176r2177
116116static READ8_HANDLER( coupe_pen_r )
117117{
118118   UINT8 data;
119   
119
120120   if (offset & 0x100)
121121   {
122122      /* return either the current line or 192 for the vblank area */
123123      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;
125125   }
126126   else
127127   {
128128      /* horizontal position is encoded into bits 3 to 8 */
129129      data = video_screen_get_hpos(machine->primary_screen) & 0xfc;
130130   }
131   
131
132132   return data;
133133}
134134
135135
136136static WRITE8_HANDLER( coupe_clut_w )
137137{   
138   CLUT[(offset >> 8) & 0x0f] = data & 0x7f;   
138   CLUT[(offset >> 8) & 0x0f] = data & 0x7f;
139139}
140140
141141
r2176r2177
143143{
144144   UINT8 data = 0xe0;
145145   UINT8 row = ~(offset >> 8);
146   
146
147147   if (row & 0x80) data &= readinputport(7) & 0xe0;
148148   if (row & 0x40) data &= readinputport(6) & 0xe0;
149149   if (row & 0x20) data &= readinputport(5) & 0xe0;
r2176r2177
577577      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
578578
579579      /* --- 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;
581581
582582      /* --- the following bits of info are returned as NULL-terminated strings --- */
583583      case MESS_DEVINFO_STR_FILE_EXTENSIONS:   strcpy(info->s = device_temp_str(), "dsk"); break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team