Previous 199869 Revisions Next

r19911 Friday 28th December, 2012 at 22:47:39 UTC by Curt Coder
i8275: Modernized. [Curt Coder]
[src/emu/video]i8275.c i8275.h
[src/mess/drivers]apogee.c ipds.c mikromik.c mikrosha.c partner.c radio86.c rt1715.c sm1800.c tim100.c
[src/mess/includes]mikromik.h radio86.h
[src/mess/machine]partner.c radio86.c
[src/mess/video]mikromik.c radio86.c

trunk/src/emu/video/i8275.c
r19910r19911
5959
6060struct i8275_t
6161{
62   devcb_resolved_write_line   out_drq_func;
63   devcb_resolved_write_line   out_irq_func;
64
65   screen_device *screen;
66
67   const i8275_interface *intf;
68
69   UINT8 status_reg;            /* value of status reggister */
70   UINT8 num_of_params;         /* expected number of parameters */
71   UINT8 current_command;         /* command currently executing */
72   UINT8 param_type;            /* parameter type */
73
74   UINT8 cursor_col;            /* current cursor column */
75   UINT8 cursor_row;            /* current cursor row */
76
77   UINT8 light_pen_col;         /* current light pen column */
78   UINT8 light_pen_row;         /* current light pen row */
79
80   /* reset command parameter values*/
81   /* parameter 0 */
82   UINT8 rows_type;
83   UINT8 chars_per_row;
84   /* parameter 1 */
85   UINT8 vert_retrace_rows;
86   UINT8 rows_per_frame;
87   /* parameter 2 */
88   UINT8 undeline_line_num;
89   UINT8 lines_per_row;
90   /* parameter 3 */
91   UINT8 line_counter_mode;
92   UINT8 field_attribute_mode;
93   UINT8 cursor_format;
94   UINT8 hor_retrace_count;
95
96   /* values for start display command */
97   UINT8 burst_space_code;
98   UINT8 burst_count_code;
99
100   /* buffers */
101   UINT8 row_buffer_1[80];
102   UINT8 row_buffer_2[80];
103   UINT8 row_pos;
104   UINT8 buffer_used;
105
106   UINT8 fifo_buffer_1[16];
107   UINT8 fifo_buffer_2[16];
108   UINT8 fifo_write;
109
110   int ypos;
111   int current_row;
112
113   UINT8 cursor_blink_cnt;
114   UINT8 char_blink_cnt;
115
116   UINT8 next_in_fifo;
117
118   UINT8 lineattr;
119   UINT8 rvv;
120   UINT8 gpa;
121   UINT8 hlgt;
122   UINT8 underline;
123   UINT8 blink;
124
125   UINT8 last_data;
12662};
12763
128INLINE i8275_t *get_safe_token(device_t *device)
129{
130   assert(device != NULL);
131   assert(device->type() == I8275);
132
133   return (i8275_t *)downcast<i8275_device *>(device)->token();
134}
135
136
13764/* Register Access */
138static UINT8 i8275_get_parameter_light_pen(device_t *device, offs_t offset)
65UINT8 i8275_device::get_parameter_light_pen(offs_t offset)
13966{
140   i8275_t *i8275 = get_safe_token(device);
14167   UINT8 val = 0;
14268
14369   switch(offset) {
14470      case 0 :
145            val = i8275->light_pen_col;
71            val = m_light_pen_col;
14672            break;
14773      case 1 :
148            val = i8275->light_pen_row;
74            val = m_light_pen_row;
14975            break;
15076   }
15177   return val;
15278}
15379
154READ8_DEVICE_HANDLER( i8275_r )
80READ8_MEMBER( i8275_device::read )
15581{
15682   UINT8 val;
157   i8275_t *i8275 = get_safe_token(device);
15883
15984   if (offset & 0x01)
16085   {
16186      /* Status register */
162      val = i8275->status_reg;
87      val = m_status_reg;
16388      /* status reset after read */
164      i8275->status_reg &= ~I8275_STATUS_FIFO_OVERRUN;
165      i8275->status_reg &= ~I8275_STATUS_DMA_UNDERRUN;
166      i8275->status_reg &= ~I8275_STATUS_IMPROPER_COMMAND;
167      i8275->status_reg &= ~I8275_STATUS_LIGHT_PEN;
168      i8275->status_reg &= ~I8275_STATUS_INTERRUPT_REQUEST;
89      m_status_reg &= ~I8275_STATUS_FIFO_OVERRUN;
90      m_status_reg &= ~I8275_STATUS_DMA_UNDERRUN;
91      m_status_reg &= ~I8275_STATUS_IMPROPER_COMMAND;
92      m_status_reg &= ~I8275_STATUS_LIGHT_PEN;
93      m_status_reg &= ~I8275_STATUS_INTERRUPT_REQUEST;
16994   }
17095   else
17196   {
17297      /* Parameter register */
17398      val = 0x00;
174      if (i8275->param_type==I8275_PARAM_READ) {
175         if (i8275->num_of_params > 0) {
176            val = i8275_get_parameter_light_pen(device, 2 - i8275->num_of_params);
177            i8275->num_of_params--;
99      if (m_param_type==I8275_PARAM_READ) {
100         if (m_num_of_params > 0) {
101            val = get_parameter_light_pen(2 - m_num_of_params);
102            m_num_of_params--;
178103         } else {
179            i8275->status_reg |= I8275_STATUS_IMPROPER_COMMAND;
104            m_status_reg |= I8275_STATUS_IMPROPER_COMMAND;
180105         }
181106      } else {
182107         LOG(("i8275 : ERROR reading parameter\n"));
183         i8275->status_reg |= I8275_STATUS_IMPROPER_COMMAND;
108         m_status_reg |= I8275_STATUS_IMPROPER_COMMAND;
184109      }
185110   }
186111   return val;
187112}
188113
189static void i8275_recompute_parameters(device_t *device)
114void i8275_device::recompute_parameters()
190115{
191   i8275_t *i8275 = get_safe_token(device);
192116   int horiz_pix_total = 0;
193117   int vert_pix_total = 0;
194118   rectangle visarea;
195119
196   horiz_pix_total = (i8275->chars_per_row + 1) * i8275->intf->width;
197   vert_pix_total  = (i8275->lines_per_row + 1) * (i8275->rows_per_frame + 1);
198   if (i8275->rows_type==1) {
120   horiz_pix_total = (m_chars_per_row + 1) * m_width;
121   vert_pix_total  = (m_lines_per_row + 1) * (m_rows_per_frame + 1);
122   if (m_rows_type==1) {
199123      vert_pix_total *= 2; // Use of spaced rows
200124   }
201125
202126   visarea.set(0, horiz_pix_total - 1, 0, vert_pix_total - 1);
203127
204   i8275->screen->configure(horiz_pix_total, vert_pix_total, visarea,
205            i8275->screen->frame_period().attoseconds);
128   m_screen->configure(horiz_pix_total, vert_pix_total, visarea,
129            m_screen->frame_period().attoseconds);
206130}
207131
208static void i8275_set_parameter_reset(device_t *device, offs_t offset, UINT8 data)
132void i8275_device::set_parameter_reset(offs_t offset, UINT8 data)
209133{
210   i8275_t *i8275 = get_safe_token(device);
211134   switch(offset) {
212135      case 0 :
213            i8275->rows_type = (data >> 7) & 1;
214            i8275->chars_per_row = data & 0x7f;
136            m_rows_type = (data >> 7) & 1;
137            m_chars_per_row = data & 0x7f;
215138            break;
216139      case 1 :
217            i8275->vert_retrace_rows = (data >> 6) & 3;
218            i8275->rows_per_frame = data & 0x3f;
140            m_vert_retrace_rows = (data >> 6) & 3;
141            m_rows_per_frame = data & 0x3f;
219142            break;
220143      case 2 :
221            i8275->undeline_line_num = (data >> 4) & 0x0f;
222            i8275->lines_per_row = data & 0x0f;
144            m_undeline_line_num = (data >> 4) & 0x0f;
145            m_lines_per_row = data & 0x0f;
223146            break;
224147      case 3 :
225            i8275->line_counter_mode = (data >> 7) & 1;
226            i8275->field_attribute_mode = (data >> 6) & 1;
227            i8275->cursor_format  = (data >> 4) & 3;
228            i8275->hor_retrace_count = data & 0x0f;
148            m_line_counter_mode = (data >> 7) & 1;
149            m_field_attribute_mode = (data >> 6) & 1;
150            m_cursor_format  = (data >> 4) & 3;
151            m_hor_retrace_count = data & 0x0f;
229152            break;
230153   }
231154}
232155
233static void i8275_set_parameter_cursor(device_t *device, offs_t offset, UINT8 data)
156void i8275_device::set_parameter_cursor(offs_t offset, UINT8 data)
234157{
235   i8275_t *i8275 = get_safe_token(device);
236158   switch(offset) {
237159      case 0 :
238            i8275->cursor_col = data;
160            m_cursor_col = data;
239161            break;
240162      case 1 :
241            i8275->cursor_row = data;
163            m_cursor_row = data;
242164            break;
243165   }
244166}
245167
246168
247WRITE8_DEVICE_HANDLER( i8275_w )
169WRITE8_MEMBER( i8275_device::write )
248170{
249   i8275_t *i8275 = get_safe_token(device);
250
251171   if (offset & 0x01)
252172   {
253173      /* Command register */
254      if (i8275->num_of_params != 0) {
255         i8275->status_reg |= I8275_STATUS_IMPROPER_COMMAND;
174      if (m_num_of_params != 0) {
175         m_status_reg |= I8275_STATUS_IMPROPER_COMMAND;
256176         return;
257177      }
258      i8275->current_command = (data >> 5) & 7;
259      i8275->num_of_params = I8275_PARAM_NONE;
260      i8275->param_type = I8275_PARAM_NONE;
261      switch(i8275->current_command) {
178      m_current_command = (data >> 5) & 7;
179      m_num_of_params = I8275_PARAM_NONE;
180      m_param_type = I8275_PARAM_NONE;
181      switch(m_current_command) {
262182         case I8275_COMMAND_RESET      :
263                                 i8275->num_of_params = I8275_PARAM_RESET;
264                                 i8275->param_type = I8275_PARAM_WRITE;
183                                 m_num_of_params = I8275_PARAM_RESET;
184                                 m_param_type = I8275_PARAM_WRITE;
265185                                 /* set status register */
266                                 i8275->status_reg &= ~I8275_STATUS_INTERRUPT_ENABLE;
267                                 i8275->status_reg &= ~I8275_STATUS_VIDEO_ENABLE;
186                                 m_status_reg &= ~I8275_STATUS_INTERRUPT_ENABLE;
187                                 m_status_reg &= ~I8275_STATUS_VIDEO_ENABLE;
268188                                 break;
269189         case I8275_COMMAND_START_DISPLAY:
270                                 i8275->burst_space_code = (data >> 2) & 7;
271                                 i8275->burst_count_code = data & 3;
190                                 m_burst_space_code = (data >> 2) & 7;
191                                 m_burst_count_code = data & 3;
272192                                 /* set status register */
273                                 i8275->status_reg |= I8275_STATUS_VIDEO_ENABLE;
274                                 i8275->status_reg |= I8275_STATUS_INTERRUPT_ENABLE;
275                                 i8275_recompute_parameters(device);
193                                 m_status_reg |= I8275_STATUS_VIDEO_ENABLE;
194                                 m_status_reg |= I8275_STATUS_INTERRUPT_ENABLE;
195                                 recompute_parameters();
276196                                 break;
277197         case I8275_COMMAND_STOP_DISPLAY :
278198                                 /* set status register */
279                                 i8275->status_reg &= ~I8275_STATUS_VIDEO_ENABLE;
199                                 m_status_reg &= ~I8275_STATUS_VIDEO_ENABLE;
280200                                 break;
281201         case I8275_COMMAND_READ_LIGHT_PEN:
282                                 i8275->num_of_params = I8275_PARAM_READ_LIGHT_PEN;
283                                 i8275->param_type = I8275_PARAM_READ;
202                                 m_num_of_params = I8275_PARAM_READ_LIGHT_PEN;
203                                 m_param_type = I8275_PARAM_READ;
284204                                 break;
285205         case I8275_COMMAND_LOAD_CURSOR   :
286                                 i8275->num_of_params = I8275_PARAM_LOAD_CURSOR;
287                                 i8275->param_type = I8275_PARAM_WRITE;
206                                 m_num_of_params = I8275_PARAM_LOAD_CURSOR;
207                                 m_param_type = I8275_PARAM_WRITE;
288208                                 break;
289209         case I8275_COMMAND_ENABLE_INTERRUPT   :
290210                                 /* set status register */
291                                 i8275->status_reg |= I8275_STATUS_INTERRUPT_ENABLE;
211                                 m_status_reg |= I8275_STATUS_INTERRUPT_ENABLE;
292212                                 break;
293213         case I8275_COMMAND_DISABLE_INTERRUPT:
294214                                 /* set status register */
295                                 i8275->status_reg &= ~I8275_STATUS_INTERRUPT_ENABLE;
215                                 m_status_reg &= ~I8275_STATUS_INTERRUPT_ENABLE;
296216                                 break;
297217         case I8275_COMMAND_PRESET_COUNTERS   :
298218                                 break;
r19910r19911
301221   else
302222   {
303223      /* Parameter register */
304      if (i8275->param_type==I8275_PARAM_WRITE) {
305         if (i8275->num_of_params > 0) {
306            if (i8275->current_command == I8275_COMMAND_RESET) {
307               i8275_set_parameter_reset(device, 4 - i8275->num_of_params ,data);
224      if (m_param_type==I8275_PARAM_WRITE) {
225         if (m_num_of_params > 0) {
226            if (m_current_command == I8275_COMMAND_RESET) {
227               set_parameter_reset(4 - m_num_of_params ,data);
308228            } else {
309               i8275_set_parameter_cursor(device, 2 - i8275->num_of_params, data);
229               set_parameter_cursor(2 - m_num_of_params, data);
310230            }
311            i8275->num_of_params--;
231            m_num_of_params--;
312232         } else {
313            i8275->status_reg |= I8275_STATUS_IMPROPER_COMMAND;
233            m_status_reg |= I8275_STATUS_IMPROPER_COMMAND;
314234         }
315235      } else {
316236         LOG(("i8275 : ERROR writing parameter\n"));
317         i8275->status_reg |= I8275_STATUS_IMPROPER_COMMAND;
237         m_status_reg |= I8275_STATUS_IMPROPER_COMMAND;
318238      }
319239   }
320240}
321241
322242
323static void i8275_draw_char_line(device_t *device)
243void i8275_device::draw_char_line()
324244{
325   i8275_t *i8275 = get_safe_token(device);
326245   int xpos = 0;
327246   int line = 0;
328247   UINT8 lc = 0;
r19910r19911
330249   UINT8 lten = 0;
331250   UINT8 fifo_read = 0;
332251
333   for(line=0;line<=i8275->lines_per_row;line++) {
252   for(line=0;line<=m_lines_per_row;line++) {
334253      // If line counter is 1 then select right values
335      lc = (i8275->line_counter_mode==1) ? (line - 1) % i8275->lines_per_row : line;
254      lc = (m_line_counter_mode==1) ? (line - 1) % m_lines_per_row : line;
336255      fifo_read = 0;
337      for(xpos=0;xpos<=i8275->chars_per_row;xpos++) {
338         UINT8 chr =   (i8275->buffer_used==0) ? i8275->row_buffer_2[xpos] : i8275->row_buffer_1[xpos];
339         if (i8275->undeline_line_num & 0x08) {
340            vsp = (line==0 || line==i8275->lines_per_row) ? 1 : 0;
256      for(xpos=0;xpos<=m_chars_per_row;xpos++) {
257         UINT8 chr =   (m_buffer_used==0) ? m_row_buffer_2[xpos] : m_row_buffer_1[xpos];
258         if (m_undeline_line_num & 0x08) {
259            vsp = (line==0 || line==m_lines_per_row) ? 1 : 0;
341260         }
342261
343262         if ((chr & 0x80)==0x80) {
344263            if ((chr & 0xc0)==0xc0) {
345264               // character attribute code
346               i8275->lineattr = 0;
265               m_lineattr = 0;
347266            } else {
348267               // field attribute code
349               i8275->hlgt = chr & 1;
350               i8275->blink = (chr >> 1) & 1;
351               i8275->gpa = (chr >> 2) & 3;
352               i8275->rvv = (chr >> 4) & 1;
353               i8275->underline = (chr >> 5) & 1;
268               m_hlgt = chr & 1;
269               m_blink = (chr >> 1) & 1;
270               m_gpa = (chr >> 2) & 3;
271               m_rvv = (chr >> 4) & 1;
272               m_underline = (chr >> 5) & 1;
354273            }
355274
356            if (i8275->field_attribute_mode==0) {
357               chr = (i8275->buffer_used==0) ? i8275->fifo_buffer_2[fifo_read] : i8275->fifo_buffer_1[fifo_read];
275            if (m_field_attribute_mode==0) {
276               chr = (m_buffer_used==0) ? m_fifo_buffer_2[fifo_read] : m_fifo_buffer_1[fifo_read];
358277               fifo_read = (fifo_read + 1 ) % 16;
359278            } else {
360279               vsp = 1;
361280            }
362281         }
363         if (vsp==0 && i8275->blink) {
364            vsp = (i8275->char_blink_cnt < 32)  ? 1: 0;
282         if (vsp==0 && m_blink) {
283            vsp = (m_char_blink_cnt < 32)  ? 1: 0;
365284         }
366         if ((i8275->current_row == i8275->cursor_row) && (xpos ==  i8275->cursor_col - i8275->intf->char_delay)) {
285         if ((m_current_row == m_cursor_row) && (xpos ==  m_cursor_col - m_char_delay)) {
367286            int vis = 1;
368            if ((i8275->cursor_format & 2)==0) {
369               vis = (i8275->cursor_blink_cnt<16) ? 1 : 0;
287            if ((m_cursor_format & 2)==0) {
288               vis = (m_cursor_blink_cnt<16) ? 1 : 0;
370289            }
371            if ((i8275->cursor_format & 1)==1) {
372               lten = (line == i8275->undeline_line_num) ? vis : 0; //underline
290            if ((m_cursor_format & 1)==1) {
291               lten = (line == m_undeline_line_num) ? vis : 0; //underline
373292            } else {
374293               lten = vis; // block cursor
375294            }
r19910r19911
377296            lten = 0;
378297         }
379298
380         i8275->intf->display_pixels(device,
381            xpos * i8275->intf->width, // x position on screen of starting point
382            i8275->ypos, // y position on screen
299         m_display_pixels_func(this, m_bitmap,
300            xpos * m_width, // x position on screen of starting point
301            m_ypos, // y position on screen
383302            lc, // current line of char
384303            (chr & 0x7f),  // char code to be displayed
385            i8275->lineattr,  // line attribute code
386            lten | i8275->underline,  // light enable signal
387            i8275->rvv,  // reverse video signal
304            m_lineattr,  // line attribute code
305            lten | m_underline,  // light enable signal
306            m_rvv,  // reverse video signal
388307            vsp, // video suppression
389            i8275->gpa,  // general purpose attribute code
390            i8275->hlgt  // highlight
308            m_gpa,  // general purpose attribute code
309            m_hlgt  // highlight
391310         );
392311         vsp = 0;
393312      }
394      i8275->ypos++;
313      m_ypos++;
395314   }
396   i8275->current_row++;
315   m_current_row++;
397316}
398317
399WRITE8_DEVICE_HANDLER( i8275_dack_w )
318WRITE8_MEMBER( i8275_device::dack_w )
400319{
401   i8275_t *i8275 = get_safe_token(device);
402
403   if (i8275->next_in_fifo == 1)
320   if (m_next_in_fifo == 1)
404321   {
405      i8275->next_in_fifo = 0;
322      m_next_in_fifo = 0;
406323
407      if(i8275->buffer_used == 0)
324      if(m_buffer_used == 0)
408325      {
409         i8275->fifo_buffer_1[i8275->fifo_write] = data & 0x7f;
326         m_fifo_buffer_1[m_fifo_write] = data & 0x7f;
410327      }
411328      else
412329      {
413         i8275->fifo_buffer_2[i8275->fifo_write] = data & 0x7f;
330         m_fifo_buffer_2[m_fifo_write] = data & 0x7f;
414331      }
415      i8275->fifo_write = (i8275->fifo_write + 1) % 16;
332      m_fifo_write = (m_fifo_write + 1) % 16;
416333
417      if (i8275->last_data == 0xf1) {
418         i8275->row_pos = i8275->chars_per_row + 1;
334      if (m_last_data == 0xf1) {
335         m_row_pos = m_chars_per_row + 1;
419336      }
420337   }
421338   else
422339   {
423      if(i8275->buffer_used == 0)
340      if(m_buffer_used == 0)
424341      {
425         i8275->row_buffer_1[i8275->row_pos++] = data;
342         m_row_buffer_1[m_row_pos++] = data;
426343      }
427344      else
428345      {
429         i8275->row_buffer_2[i8275->row_pos++] = data;
346         m_row_buffer_2[m_row_pos++] = data;
430347      }
431      if (i8275->field_attribute_mode==0)
348      if (m_field_attribute_mode==0)
432349      {
433350         if ((data & 0x80)==0x80)
434351         {
435            i8275->last_data = data;
436            i8275->next_in_fifo = 1;
352            m_last_data = data;
353            m_next_in_fifo = 1;
437354         }
438355      }
439356   }
440357
441   if ((i8275->row_pos - 1)==i8275->chars_per_row )
358   if ((m_row_pos - 1)==m_chars_per_row )
442359   {
443      i8275->buffer_used = (i8275->buffer_used==0) ? 1 : 0;
444      i8275->row_pos = 0;
445      i8275->fifo_write = 0;
446      i8275_draw_char_line(device);
360      m_buffer_used = (m_buffer_used==0) ? 1 : 0;
361      m_row_pos = 0;
362      m_fifo_write = 0;
363      draw_char_line();
447364   }
448   if (i8275->current_row == (i8275->rows_per_frame + 1))
365   if (m_current_row == (m_rows_per_frame + 1))
449366   {
450      i8275->ypos = 0;
451      i8275->current_row = 0;
367      m_ypos = 0;
368      m_current_row = 0;
452369
453      i8275->out_drq_func(0);
370      m_out_drq_func(0);
454371   }
455372}
456373
457374/* Screen Update */
458void i8275_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect)
375UINT32 i8275_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
459376{
460   i8275_t *i8275 = get_safe_token(device);
461   i8275->ypos = 0;
462   i8275->lineattr = 0;
463   i8275->rvv = 0;
464   i8275->gpa = 0;
465   i8275->hlgt = 0;
466   i8275->underline = 0;
467   i8275->blink = 0;
468   i8275->row_pos = 0;
469   i8275->fifo_write = 0;
377   m_ypos = 0;
378   m_lineattr = 0;
379   m_rvv = 0;
380   m_gpa = 0;
381   m_hlgt = 0;
382   m_underline = 0;
383   m_blink = 0;
384   m_row_pos = 0;
385   m_fifo_write = 0;
470386
471   if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
472      bitmap.fill(get_black_pen(device->machine()), cliprect);
387   if ((m_status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
388      bitmap.fill(get_black_pen(machine()), cliprect);
473389   } else {
474390      // if value < 16 it is visible otherwise not
475      i8275->cursor_blink_cnt++;
476      if(i8275->cursor_blink_cnt==32) i8275->cursor_blink_cnt = 0;
391      m_cursor_blink_cnt++;
392      if(m_cursor_blink_cnt==32) m_cursor_blink_cnt = 0;
477393      // if value < 32 it is visible otherwise not
478      i8275->char_blink_cnt++;
479      if(i8275->char_blink_cnt==64) i8275->char_blink_cnt = 0;
394      m_char_blink_cnt++;
395      if(m_char_blink_cnt==64) m_char_blink_cnt = 0;
480396
481      i8275->out_drq_func(1);
397      m_out_drq_func(1);
482398   }
483   if (i8275->status_reg & I8275_STATUS_INTERRUPT_ENABLE) {
484      i8275->status_reg |= I8275_STATUS_INTERRUPT_REQUEST;
399   if (m_status_reg & I8275_STATUS_INTERRUPT_ENABLE) {
400      m_status_reg |= I8275_STATUS_INTERRUPT_REQUEST;
485401   }
402
403   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
404   
405   return 0;
486406}
487407
488408/* Device Interface */
489409
490static DEVICE_START( i8275 )
491{
492   i8275_t *i8275 = get_safe_token(device);
493
494   /* validate arguments */
495   assert(device != NULL);
496   assert(device->tag() != NULL);
497   assert(device->static_config() != NULL);
498
499   i8275->intf = (const i8275_interface*)device->static_config();
500
501   assert(i8275->intf->display_pixels != NULL);
502
503   /* get the screen device */
504   i8275->screen = device->machine().device<screen_device>(i8275->intf->screen_tag);
505
506
507   assert(i8275->screen != NULL);
508
509   /* resolve callbacks */
510   i8275->out_drq_func.resolve(i8275->intf->out_drq_func, *device);
511   i8275->out_irq_func.resolve(i8275->intf->out_irq_func, *device);
512
513   /* register for state saving */
514   device->save_item(NAME(i8275->status_reg));
515   device->save_item(NAME(i8275->num_of_params));
516   device->save_item(NAME(i8275->current_command));
517   device->save_item(NAME(i8275->param_type));
518
519   device->save_item(NAME(i8275->cursor_col));
520   device->save_item(NAME(i8275->cursor_row));
521
522   device->save_item(NAME(i8275->light_pen_col));
523   device->save_item(NAME(i8275->light_pen_row));
524
525   device->save_item(NAME(i8275->rows_type));
526   device->save_item(NAME(i8275->chars_per_row));
527   device->save_item(NAME(i8275->vert_retrace_rows));
528   device->save_item(NAME(i8275->rows_per_frame));
529   device->save_item(NAME(i8275->undeline_line_num));
530   device->save_item(NAME(i8275->lines_per_row));
531   device->save_item(NAME(i8275->line_counter_mode));
532   device->save_item(NAME(i8275->field_attribute_mode));
533   device->save_item(NAME(i8275->cursor_format));
534   device->save_item(NAME(i8275->hor_retrace_count));
535
536   device->save_item(NAME(i8275->burst_space_code));
537   device->save_item(NAME(i8275->burst_count_code));
538}
539
540static DEVICE_RESET( i8275 )
541{
542   i8275_t *i8275 = get_safe_token(device);
543
544   i8275->status_reg = 0;
545   i8275->num_of_params = 0;
546   i8275->current_command = 0;
547   i8275->param_type = 0;
548
549   i8275->cursor_col = 0;
550   i8275->cursor_row = 0;
551
552   i8275->light_pen_col = 0;
553   i8275->light_pen_row = 0;
554
555   i8275->rows_type = 0;
556   i8275->chars_per_row = 0;
557   i8275->vert_retrace_rows = 0;
558   i8275->rows_per_frame = 0;
559   i8275->undeline_line_num = 0;
560   i8275->lines_per_row = 0;
561   i8275->line_counter_mode = 0;
562   i8275->field_attribute_mode = 0;
563   i8275->cursor_format = 0;
564   i8275->hor_retrace_count = 0;
565
566   i8275->burst_space_code = 0;
567   i8275->burst_count_code = 0;
568
569   i8275->row_pos = 0;
570   i8275->buffer_used = 0;
571
572   i8275->fifo_write = 0;
573
574   i8275->ypos = 0;
575   i8275->current_row = 0;
576
577   i8275->cursor_blink_cnt = 0;
578   i8275->char_blink_cnt = 0;
579   i8275->next_in_fifo = 0;
580
581   i8275->lineattr = 0;
582   i8275->rvv = 0;
583   i8275->gpa = 0;
584   i8275->hlgt = 0;
585   i8275->underline = 0;
586   i8275->blink = 0;
587}
588
589410const device_type I8275 = &device_creator<i8275_device>;
590411
591412i8275_device::i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
592413   : device_t(mconfig, I8275, "Intel 8275", tag, owner, clock)
593414{
594   m_token = global_alloc_clear(i8275_t);
595415}
596416
417
597418//-------------------------------------------------
598419//  device_config_complete - perform any
599420//  operations now that the configuration is
r19910r19911
602423
603424void i8275_device::device_config_complete()
604425{
426   // inherit a copy of the static data
427   const i8275_interface *intf = reinterpret_cast<const i8275_interface *>(static_config());
428   if (intf != NULL)
429      *static_cast<i8275_interface *>(this) = *intf;
430
431   // or initialize to defaults if none provided
432   else
433   {
434      memset(&m_out_drq_cb, 0, sizeof(m_out_drq_cb));
435      memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
436      memset(&m_out_hrtc_cb, 0, sizeof(m_out_hrtc_cb));
437      memset(&m_out_vrtc_cb, 0, sizeof(m_out_vrtc_cb));
438   }
605439}
606440
441
607442//-------------------------------------------------
608443//  device_start - device-specific startup
609444//-------------------------------------------------
610445
611446void i8275_device::device_start()
612447{
613   DEVICE_START_NAME( i8275 )(this);
448   /* get the screen device */
449   m_screen = machine().device<screen_device>(m_screen_tag);
450   assert(m_screen != NULL);
451   m_screen->register_screen_bitmap(m_bitmap);
452
453   /* resolve callbacks */
454   m_out_drq_func.resolve(m_out_drq_cb, *this);
455   m_out_irq_func.resolve(m_out_irq_cb, *this);
456   m_out_hrtc_func.resolve(m_out_hrtc_cb, *this);
457   m_out_vrtc_func.resolve(m_out_vrtc_cb, *this);
458
459   /* register for state saving */
460   save_item(NAME(m_status_reg));
461   save_item(NAME(m_num_of_params));
462   save_item(NAME(m_current_command));
463   save_item(NAME(m_param_type));
464
465   save_item(NAME(m_cursor_col));
466   save_item(NAME(m_cursor_row));
467
468   save_item(NAME(m_light_pen_col));
469   save_item(NAME(m_light_pen_row));
470
471   save_item(NAME(m_rows_type));
472   save_item(NAME(m_chars_per_row));
473   save_item(NAME(m_vert_retrace_rows));
474   save_item(NAME(m_rows_per_frame));
475   save_item(NAME(m_undeline_line_num));
476   save_item(NAME(m_lines_per_row));
477   save_item(NAME(m_line_counter_mode));
478   save_item(NAME(m_field_attribute_mode));
479   save_item(NAME(m_cursor_format));
480   save_item(NAME(m_hor_retrace_count));
481
482   save_item(NAME(m_burst_space_code));
483   save_item(NAME(m_burst_count_code));
614484}
615485
616486//-------------------------------------------------
r19910r19911
619489
620490void i8275_device::device_reset()
621491{
622   DEVICE_RESET_NAME( i8275 )(this);
623}
492   m_status_reg = 0;
493   m_num_of_params = 0;
494   m_current_command = 0;
495   m_param_type = 0;
624496
497   m_cursor_col = 0;
498   m_cursor_row = 0;
625499
500   m_light_pen_col = 0;
501   m_light_pen_row = 0;
502
503   m_rows_type = 0;
504   m_chars_per_row = 0;
505   m_vert_retrace_rows = 0;
506   m_rows_per_frame = 0;
507   m_undeline_line_num = 0;
508   m_lines_per_row = 0;
509   m_line_counter_mode = 0;
510   m_field_attribute_mode = 0;
511   m_cursor_format = 0;
512   m_hor_retrace_count = 0;
513
514   m_burst_space_code = 0;
515   m_burst_count_code = 0;
516
517   m_row_pos = 0;
518   m_buffer_used = 0;
519
520   m_fifo_write = 0;
521
522   m_ypos = 0;
523   m_current_row = 0;
524
525   m_cursor_blink_cnt = 0;
526   m_char_blink_cnt = 0;
527   m_next_in_fifo = 0;
528
529   m_lineattr = 0;
530   m_rvv = 0;
531   m_gpa = 0;
532   m_hlgt = 0;
533   m_underline = 0;
534   m_blink = 0;
535}
trunk/src/emu/video/i8275.h
r19910r19911
1212#ifndef __I8275_VIDEO__
1313#define __I8275_VIDEO__
1414
15#include "devcb.h"
15#include "emu.h"
1616
17/***************************************************************************
18    MACROS
19***************************************************************************/
2017
21class i8275_device : public device_t
18
19//**************************************************************************
20//  INTERFACE CONFIGURATION MACROS
21//**************************************************************************
22
23#define MCFG_I8275_ADD(_tag, _intrf) \
24   MCFG_DEVICE_ADD(_tag, I8275, 0) \
25   MCFG_DEVICE_CONFIG(_intrf)
26
27
28#define I8275_INTERFACE(name) \
29   const i8275_interface (name) =
30
31
32
33//**************************************************************************
34//  TYPE DEFINITIONS
35//**************************************************************************
36
37class i8275_device;
38
39// ======================> i8275_display_pixels_func
40
41typedef void (*i8275_display_pixels_func)(i8275_device *device, bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt);
42#define I8275_DISPLAY_PIXELS(name)   void name(i8275_device *device, bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt)
43
44
45// ======================> i8275_interface
46
47struct i8275_interface
2248{
49   const char *m_screen_tag;      /* screen we are acting on */
50   int m_width;               /* char width in pixels */
51   int m_char_delay;            /* delay of display char */
52
53   devcb_write_line m_out_drq_cb;
54   devcb_write_line m_out_irq_cb;
55
56   devcb_write_line m_out_hrtc_cb;
57   devcb_write_line m_out_vrtc_cb;
58
59   i8275_display_pixels_func m_display_pixels_func;
60};
61
62
63class i8275_device : public device_t,
64                public i8275_interface
65{
2366public:
2467   i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
25   ~i8275_device() { global_free(m_token); }
2668
27   // access to legacy token
28   void *token() const { assert(m_token != NULL); return m_token; }
69   DECLARE_READ8_MEMBER( read );
70   DECLARE_WRITE8_MEMBER( write );
71
72   DECLARE_WRITE8_MEMBER( dack_w );
73
74   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
75
2976protected:
3077   // device-level overrides
3178   virtual void device_config_complete();
3279   virtual void device_start();
3380   virtual void device_reset();
34private:
35   // internal state
36   void *m_token;
37};
3881
39extern const device_type I8275;
82   UINT8 get_parameter_light_pen(offs_t offset);
83   void recompute_parameters();
84   void set_parameter_reset(offs_t offset, UINT8 data);
85   void set_parameter_cursor(offs_t offset, UINT8 data);
86   void draw_char_line();
4087
88   devcb_resolved_write_line   m_out_drq_func;
89   devcb_resolved_write_line   m_out_irq_func;
90   devcb_resolved_write_line   m_out_hrtc_func;
91   devcb_resolved_write_line   m_out_vrtc_func;
4192
42/***************************************************************************
43    TYPE DEFINITIONS
44***************************************************************************/
93   screen_device *m_screen;
94   bitmap_rgb32 m_bitmap;
4595
46typedef void (*i8275_display_pixels_func)(device_t *device, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt);
47#define I8275_DISPLAY_PIXELS(name)   void name(device_t *device, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt)
96   UINT8 m_status_reg;            /* value of status reggister */
97   UINT8 m_num_of_params;         /* expected number of parameters */
98   UINT8 m_current_command;         /* command currently executing */
99   UINT8 m_param_type;            /* parameter type */
48100
49/* interface */
50struct i8275_interface
51{
52   const char *screen_tag;      /* screen we are acting on */
53   int width;               /* char width in pixels */
54   int char_delay;            /* delay of display char */
101   UINT8 m_cursor_col;            /* current cursor column */
102   UINT8 m_cursor_row;            /* current cursor row */
55103
56   devcb_write_line out_drq_func;
104   UINT8 m_light_pen_col;         /* current light pen column */
105   UINT8 m_light_pen_row;         /* current light pen row */
57106
58   devcb_write_line out_irq_func;
107   /* reset command parameter values*/
108   /* parameter 0 */
109   UINT8 m_rows_type;
110   UINT8 m_chars_per_row;
111   /* parameter 1 */
112   UINT8 m_vert_retrace_rows;
113   UINT8 m_rows_per_frame;
114   /* parameter 2 */
115   UINT8 m_undeline_line_num;
116   UINT8 m_lines_per_row;
117   /* parameter 3 */
118   UINT8 m_line_counter_mode;
119   UINT8 m_field_attribute_mode;
120   UINT8 m_cursor_format;
121   UINT8 m_hor_retrace_count;
59122
60   i8275_display_pixels_func display_pixels;
61};
123   /* values for start display command */
124   UINT8 m_burst_space_code;
125   UINT8 m_burst_count_code;
62126
63/***************************************************************************
64    FUNCTION PROTOTYPES
65***************************************************************************/
127   /* buffers */
128   UINT8 m_row_buffer_1[80];
129   UINT8 m_row_buffer_2[80];
130   UINT8 m_row_pos;
131   UINT8 m_buffer_used;
66132
67/* register access */
68DECLARE_READ8_DEVICE_HANDLER ( i8275_r );
69DECLARE_WRITE8_DEVICE_HANDLER ( i8275_w );
133   UINT8 m_fifo_buffer_1[16];
134   UINT8 m_fifo_buffer_2[16];
135   UINT8 m_fifo_write;
70136
71/* updates the screen */
72void i8275_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect);
137   int m_ypos;
138   int m_current_row;
73139
74DECLARE_WRITE8_DEVICE_HANDLER( i8275_dack_w );
140   UINT8 m_cursor_blink_cnt;
141   UINT8 m_char_blink_cnt;
75142
76/***************************************************************************
77    DEVICE CONFIGURATION MACROS
78***************************************************************************/
143   UINT8 m_next_in_fifo;
79144
80#define MCFG_I8275_ADD(_tag, _intrf) \
81   MCFG_DEVICE_ADD(_tag, I8275, 0) \
82   MCFG_DEVICE_CONFIG(_intrf)
145   UINT8 m_lineattr;
146   UINT8 m_rvv;
147   UINT8 m_gpa;
148   UINT8 m_hlgt;
149   UINT8 m_underline;
150   UINT8 m_blink;
83151
152   UINT8 m_last_data;
153};
154
155// device type definition
156extern const device_type I8275;
157
158
84159#endif
trunk/src/mess/machine/radio86.c
r19910r19911
147147   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, memory_read_byte),
148148   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, memory_write_byte),
149149   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
150   { DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_HANDLER("i8275", i8275_dack_w), DEVCB_NULL }
150   { DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_MEMBER("i8275", i8275_device, dack_w), DEVCB_NULL }
151151};
152152
153153TIMER_CALLBACK_MEMBER(radio86_state::radio86_reset)
r19910r19911
241241   0,
242242   DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w),
243243   DEVCB_NULL,
244   DEVCB_NULL,
245   DEVCB_NULL,
244246   radio86_display_pixels
245247};
246248
r19910r19911
250252   0,
251253   DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w),
252254   DEVCB_NULL,
255   DEVCB_NULL,
256   DEVCB_NULL,
253257   mikrosha_display_pixels
254258};
255259
r19910r19911
259263   0,
260264   DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w),
261265   DEVCB_NULL,
266   DEVCB_NULL,
267   DEVCB_NULL,
262268   apogee_display_pixels
263269};
264270
r19910r19911
268274   1,
269275   DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w),
270276   DEVCB_NULL,
277   DEVCB_NULL,
278   DEVCB_NULL,
271279   partner_display_pixels
272280};
trunk/src/mess/machine/partner.c
r19910r19911
378378   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, memory_read_byte),
379379   DEVCB_MEMORY_HANDLER("maincpu", PROGRAM, memory_write_byte),
380380   { DEVCB_DEVICE_HANDLER("wd1793", wd17xx_data_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
381   { DEVCB_DEVICE_HANDLER("wd1793", wd17xx_data_w), DEVCB_NULL, DEVCB_DEVICE_HANDLER("i8275", i8275_dack_w), DEVCB_NULL }
381   { DEVCB_DEVICE_HANDLER("wd1793", wd17xx_data_w), DEVCB_NULL, DEVCB_DEVICE_MEMBER("i8275", i8275_device, dack_w), DEVCB_NULL }
382382};
383383
384384
trunk/src/mess/includes/mikromik.h
r19910r19911
103103   const UINT8 *m_key_rom;
104104
105105   // video state
106   bitmap_rgb32 m_bitmap;
107106   const UINT8 *m_char_rom;
108107   int m_llen;
109108
trunk/src/mess/includes/radio86.h
r19910r19911
1717   radio86_state(const machine_config &mconfig, device_type type, const char *tag)
1818      : driver_device(mconfig, type, tag) { }
1919
20   virtual void video_start();
21
22   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
23
24   bitmap_rgb32 m_bitmap;
25
2620   UINT8 m_tape_value;
2721   UINT8 m_mikrosha_font_page;
2822   int m_keyboard_mask;
r19910r19911
3832   DECLARE_DRIVER_INIT(radio86);
3933   DECLARE_MACHINE_RESET(radio86);
4034   DECLARE_PALETTE_INIT(radio86);
41   UINT32 screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
4235   TIMER_CALLBACK_MEMBER(radio86_reset);
4336   DECLARE_READ8_MEMBER(radio86_8255_portb_r2);
4437   DECLARE_READ8_MEMBER(radio86_8255_portc_r2);
trunk/src/mess/video/radio86.c
r19910r19911
1111#include "video/i8275.h"
1212#include "includes/radio86.h"
1313
14void radio86_state::video_start()
15{
16   machine().primary_screen->register_screen_bitmap(m_bitmap);
17}
18
19UINT32 radio86_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
20{
21   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
22   return 0;
23}
24
2514I8275_DISPLAY_PIXELS(radio86_display_pixels)
2615{
2716   radio86_state *state = device->machine().driver_data<radio86_state>();
2817   int i;
29   bitmap_rgb32 &bitmap = state->m_bitmap;
3018   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
3119   UINT8 *charmap = state->memregion("gfx1")->base();
3220   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
4937{
5038   radio86_state *state = device->machine().driver_data<radio86_state>();
5139   int i;
52   bitmap_rgb32 &bitmap = state->m_bitmap;
5340   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
5441   UINT8 *charmap = state->memregion("gfx1")->base() + (state->m_mikrosha_font_page & 1) * 0x400;
5542   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
7158{
7259   radio86_state *state = device->machine().driver_data<radio86_state>();
7360   int i;
74   bitmap_rgb32 &bitmap = state->m_bitmap;
7561   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
7662   UINT8 *charmap = state->memregion("gfx1")->base() + (gpa & 1) * 0x400;
7763   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
9379{
9480   radio86_state *state = device->machine().driver_data<radio86_state>();
9581   int i;
96   bitmap_rgb32 &bitmap = state->m_bitmap;
9782   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9883   UINT8 *charmap = state->memregion("gfx1")->base() + 0x400 * (gpa * 2 + hlgt);
9984   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
11196   }
11297}
11398
114UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
115{
116   device_t *devconf = machine().device("i8275");
117   i8275_update( devconf, bitmap, cliprect);
118   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
119   return 0;
120}
121
12299static const rgb_t radio86_palette[3] = {
123100   MAKE_RGB(0x00, 0x00, 0x00), // black
124101   MAKE_RGB(0xa0, 0xa0, 0xa0), // white
trunk/src/mess/video/mikromik.c
r19910r19911
2929
3030      int color = hlt_in ? 2 : (video_in ^ compl_in);
3131
32      state->m_bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color];
32      bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color];
3333   }
3434}
3535
r19910r19911
4040   0,
4141   DEVCB_DEVICE_LINE_MEMBER(I8237_TAG, am9517a_device, dreq0_w),
4242   DEVCB_NULL,
43   DEVCB_NULL,
44   DEVCB_NULL,
4345   crtc_display_pixels
4446};
4547
r19910r19911
8991{
9092   // find memory regions
9193   m_char_rom = memregion("chargen")->base();
92
93   machine().primary_screen->register_screen_bitmap(m_bitmap);
9494}
9595
9696
r19910r19911
101101UINT32 mm1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
102102{
103103   /* text */
104   i8275_update(m_crtc, bitmap, cliprect);
105   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
104   m_crtc->screen_update(screen, bitmap, cliprect);
106105
107106   /* graphics */
108107   m_hgdc->screen_update(screen, bitmap, cliprect);
trunk/src/mess/drivers/ipds.c
r19910r19911
2929   DECLARE_WRITE8_MEMBER(ipds_b1_w);
3030   DECLARE_WRITE8_MEMBER(kbd_put);
3131   UINT8 m_term_data;
32   bitmap_rgb32 m_bitmap;
33   virtual void video_start();
3432   virtual void machine_reset();
35   UINT32 screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
3633};
3734
3835READ8_MEMBER( ipds_state::ipds_b0_r )
r19910r19911
7875{
7976}
8077
81
82void ipds_state::video_start()
83{
84   machine().primary_screen->register_screen_bitmap(m_bitmap);
85}
86
8778static I8275_DISPLAY_PIXELS(ipds_display_pixels)
8879{
8980   int i;
9081   ipds_state *state = device->machine().driver_data<ipds_state>();
91   bitmap_rgb32 &bitmap = state->m_bitmap;
9282   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9383   UINT8 *charmap = state->memregion("chargen")->base();
9484   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
113103   0,
114104   DEVCB_NULL,
115105   DEVCB_NULL,
106   DEVCB_NULL,
107   DEVCB_NULL,
116108   ipds_display_pixels
117109};
118110
119UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
120{
121   device_t *devconf = machine().device("i8275");
122   i8275_update( devconf, bitmap, cliprect);
123   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
124   return 0;
125}
126
127111/* F4 Character Displayer */
128112static const gfx_layout ipds_charlayout =
129113{
r19910r19911
162146
163147   /* video hardware */
164148   MCFG_SCREEN_ADD("screen", RASTER)
149   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
165150   MCFG_SCREEN_REFRESH_RATE(50)
166151   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
167152   MCFG_SCREEN_SIZE(640, 480)
168153   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
169   MCFG_SCREEN_UPDATE_DRIVER(ipds_state, screen_update_ipds)
170154   MCFG_GFXDECODE(ipds)
171155   MCFG_PALETTE_LENGTH(2)
172156   MCFG_PALETTE_INIT(monochrome_green)
trunk/src/mess/drivers/apogee.c
r19910r19911
3333    //AM_RANGE( 0xec00, 0xecff ) AM_RAM  // Timer
3434    AM_RANGE( 0xed00, 0xed03 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x00fc)
3535    //AM_RANGE( 0xee00, 0xee03 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x00fc)
36    AM_RANGE( 0xef00, 0xef01 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x00fe) // video
36    AM_RANGE( 0xef00, 0xef01 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x00fe) // video
3737    AM_RANGE( 0xf000, 0xf0ff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
3838    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
3939ADDRESS_MAP_END
r19910r19911
174174   MCFG_I8275_ADD   ( "i8275", apogee_i8275_interface)
175175    /* video hardware */
176176   MCFG_SCREEN_ADD("screen", RASTER)
177   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
177178   MCFG_SCREEN_REFRESH_RATE(50)
178179   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
179180   MCFG_SCREEN_SIZE(78*6, 30*10)
180181   MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
181   MCFG_SCREEN_UPDATE_DRIVER(radio86_state, screen_update_radio86)
182182
183183   MCFG_GFXDECODE(apogee)
184184   MCFG_PALETTE_LENGTH(3)
trunk/src/mess/drivers/rt1715.c
r19910r19911
2828   rt1715_state(const machine_config &mconfig, device_type type, const char *tag)
2929      : driver_device(mconfig, type, tag) { }
3030
31   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
32   {
33      return 0;
34   }
35
3631   int m_led1_val;
3732   int m_led2_val;
3833   DECLARE_WRITE8_MEMBER(rt1715_floppy_enable);
r19910r19911
165160   0,
166161   DEVCB_NULL,
167162   DEVCB_NULL,
163   DEVCB_NULL,
164   DEVCB_NULL,
168165   rt1715_display_pixels
169166};
170167
r19910r19911
197194   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("a72", z80pio_device, read_alt, write_alt)
198195   AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("a30", z80ctc_device, read, write)
199196   AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE("a29", z80sio_device, read_alt, write_alt)
200   AM_RANGE(0x18, 0x19) AM_DEVREADWRITE_LEGACY("a26", i8275_r, i8275_w)
197   AM_RANGE(0x18, 0x19) AM_DEVREADWRITE("a26", i8275_device, read, write)
201198   AM_RANGE(0x20, 0x20) AM_WRITE(rt1715_floppy_enable)
202199   AM_RANGE(0x28, 0x28) AM_WRITE(rt1715_rom_disable)
203200ADDRESS_MAP_END
r19910r19911
329326
330327   /* video hardware */
331328   MCFG_SCREEN_ADD("screen", RASTER)
329   MCFG_SCREEN_UPDATE_DEVICE("a26", i8275_device, screen_update)
332330   MCFG_SCREEN_REFRESH_RATE(50)
333331   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
334   MCFG_SCREEN_UPDATE_DRIVER(rt1715_state, screen_update)
335332   MCFG_SCREEN_SIZE(78*6, 30*10)
336333   MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
337334
trunk/src/mess/drivers/partner.c
r19910r19911
3434   AM_RANGE( 0xc000, 0xc7ff ) AM_RAMBANK("bank8")
3535   AM_RANGE( 0xc800, 0xcfff ) AM_RAMBANK("bank9")
3636   AM_RANGE( 0xd000, 0xd7ff ) AM_RAMBANK("bank10")
37   AM_RANGE( 0xd800, 0xd8ff ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w)  // video
37   AM_RANGE( 0xd800, 0xd8ff ) AM_DEVREADWRITE("i8275", i8275_device, read, write)  // video
3838   AM_RANGE( 0xd900, 0xd9ff ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
3939   AM_RANGE( 0xda00, 0xdaff ) AM_WRITE(partner_mem_page_w)
4040   AM_RANGE( 0xdb00, 0xdbff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
r19910r19911
201201   MCFG_I8275_ADD   ( "i8275", partner_i8275_interface)
202202    /* video hardware */
203203   MCFG_SCREEN_ADD("screen", RASTER)
204   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
204205   MCFG_SCREEN_REFRESH_RATE(50)
205206   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
206207   MCFG_SCREEN_SIZE(78*6, 30*10)
207208   MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
208   MCFG_SCREEN_UPDATE_DRIVER(radio86_state, screen_update_radio86)
209209
210210   MCFG_GFXDECODE(partner)
211211   MCFG_PALETTE_LENGTH(3)
trunk/src/mess/drivers/mikromik.c
r19910r19911
9797         break;
9898
9999      case 2:
100         data = i8275_r(m_crtc, space, offset & 0x01);
100         data = m_crtc->read(space, offset & 0x01);
101101         break;
102102
103103      case 3:
r19910r19911
166166         break;
167167
168168      case 2:
169         i8275_w(m_crtc, space, offset & 0x01, data);
169         m_crtc->write(space, offset & 0x01, data);
170170         break;
171171
172172      case 3:
r19910r19911
540540   DEVCB_DRIVER_MEMBER(mm1_state, read),
541541   DEVCB_DRIVER_MEMBER(mm1_state, write),
542542   { DEVCB_NULL, DEVCB_NULL, DEVCB_DRIVER_MEMBER(mm1_state, mpsc_dack_r),  DEVCB_DEVICE_MEMBER(UPD765_TAG, upd765_family_device, mdma_r) },
543   { DEVCB_DEVICE_HANDLER(I8275_TAG, i8275_dack_w), DEVCB_DRIVER_MEMBER(mm1_state, mpsc_dack_w), DEVCB_NULL, DEVCB_DEVICE_MEMBER(UPD765_TAG, upd765_family_device, mdma_w) },
543   { DEVCB_DEVICE_MEMBER(I8275_TAG, i8275_device, dack_w), DEVCB_DRIVER_MEMBER(mm1_state, mpsc_dack_w), DEVCB_NULL, DEVCB_DEVICE_MEMBER(UPD765_TAG, upd765_family_device, mdma_w) },
544544   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_DRIVER_LINE_MEMBER(mm1_state, dack3_w) }
545545};
546546
trunk/src/mess/drivers/mikrosha.c
r19910r19911
3535    AM_RANGE( 0x8000, 0xbfff ) AM_READ(radio_cpu_state_r) // Not connected
3636    AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x07fc)
3737    AM_RANGE( 0xc800, 0xc803 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x07fc)
38    AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x07fe) // video
38    AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x07fe) // video
3939    AM_RANGE( 0xd800, 0xd803 ) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r,pit8253_w) AM_MIRROR(0x07fc) // Timer
4040    AM_RANGE( 0xe000, 0xf7ff ) AM_READ(radio_cpu_state_r) // Not connected
4141   AM_RANGE( 0xf800, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
r19910r19911
213213
214214  /* video hardware */
215215   MCFG_SCREEN_ADD("screen", RASTER)
216   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
216217   MCFG_SCREEN_REFRESH_RATE(50)
217218   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
218219   MCFG_SCREEN_SIZE(78*6, 30*10)
219220   MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
220   MCFG_SCREEN_UPDATE_DRIVER(radio86_state, screen_update_radio86)
221221
222222   MCFG_GFXDECODE(mikrosha)
223223   MCFG_PALETTE_LENGTH(3)
trunk/src/mess/drivers/sm1800.c
r19910r19911
3939   DECLARE_WRITE8_MEMBER(sm1800_8255_portc_w);
4040   DECLARE_READ8_MEMBER(sm1800_8255_porta_r);
4141   DECLARE_READ8_MEMBER(sm1800_8255_portc_r);
42   bitmap_rgb32 m_bitmap;
4342   UINT8 m_irq_state;
4443   virtual void machine_reset();
45   virtual void video_start();
4644   virtual void palette_init();
47   UINT32 screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
4845   INTERRUPT_GEN_MEMBER(sm1800_vblank_interrupt);
4946};
5047
r19910r19911
5855static ADDRESS_MAP_START( sm1800_io, AS_IO, 8, sm1800_state)
5956   ADDRESS_MAP_GLOBAL_MASK(0xff)
6057   ADDRESS_MAP_UNMAP_HIGH
61   AM_RANGE( 0x3c, 0x3d ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w)
58   AM_RANGE( 0x3c, 0x3d ) AM_DEVREADWRITE("i8275", i8275_device, read, write)
6259   AM_RANGE( 0x5c, 0x5c) AM_DEVREADWRITE("i8251", i8251_device, data_r, data_w)
6360   AM_RANGE( 0x5d, 0x5d) AM_DEVREADWRITE("i8251", i8251_device, status_r, control_w)
6461   AM_RANGE( 0x6c, 0x6f ) AM_DEVREADWRITE("i8255", i8255_device, read, write)
r19910r19911
7976   m_maincpu->set_irq_acknowledge_callback(sm1800_irq_callback);
8077}
8178
82void sm1800_state::video_start()
83{
84   machine().primary_screen->register_screen_bitmap(m_bitmap);
85
86}
87
88UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
89{
90   device_t *devconf = machine().device("i8275");
91   i8275_update( devconf, bitmap, cliprect);
92   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
93   return 0;
94}
95
9679INTERRUPT_GEN_MEMBER(sm1800_state::sm1800_vblank_interrupt)
9780{
9881   machine().device("maincpu")->execute().set_input_line(0, m_irq_state ?  HOLD_LINE : CLEAR_LINE);
r19910r19911
10386{
10487   int i;
10588   sm1800_state *state = device->machine().driver_data<sm1800_state>();
106   bitmap_rgb32 &bitmap = state->m_bitmap;
10789   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
10890   UINT8 *charmap = state->memregion("chargen")->base();
10991   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
r19910r19911
126108   0,
127109   DEVCB_NULL,
128110   DEVCB_NULL,
111   DEVCB_NULL,
112   DEVCB_NULL,
129113   sm1800_display_pixels
130114};
131115
r19910r19911
194178
195179   /* video hardware */
196180   MCFG_SCREEN_ADD("screen", RASTER)
181   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
197182   MCFG_SCREEN_REFRESH_RATE(50)
198183   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
199184   MCFG_SCREEN_SIZE(640, 480)
200185   MCFG_GFXDECODE(sm1800)
201186   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
202   MCFG_SCREEN_UPDATE_DRIVER(sm1800_state, screen_update_sm1800)
203187   MCFG_PALETTE_LENGTH(3)
204188
205189   /* Devices */
trunk/src/mess/drivers/tim100.c
r19910r19911
2121      { }
2222
2323   required_device<cpu_device> m_maincpu;
24   UINT32 screen_update_tim100(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
25   bitmap_rgb32 m_bitmap;
2624   virtual void machine_reset();
2725};
2826
r19910r19911
3129   AM_RANGE(0x0000, 0x1fff) AM_ROM // 2764 at U16   
3230   AM_RANGE(0x2000, 0x27ff) AM_RAM // 2KB static ram CDM6116A at U15
3331
34   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("i8276", i8275_r, i8275_w)
32   AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("i8276", i8275_device, read, write)
3533
3634   AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("uart_u17", i8251_device, status_r, control_w)
3735   AM_RANGE(0x6001, 0x6001) AM_DEVREADWRITE("uart_u17", i8251_device, data_r, data_w)
r19910r19911
7876GFXDECODE_END
7977
8078
81
82UINT32 tim100_state::screen_update_tim100(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
83{
84   device_t *devconf = machine().device("i8276");
85   i8275_update( devconf, bitmap, cliprect);
86   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
87   return 0;
88}
89
90
9179// this gets called via a (i8275_dack_w), so does nothing currently
9280// once fixed, pixel count needs adjusting
9381static I8275_DISPLAY_PIXELS(tim100_display_pixels)
9482{
9583   tim100_state *state = device->machine().driver_data<tim100_state>();
9684   int i;
97   bitmap_rgb32 &bitmap = state->m_bitmap;
9885   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9986   UINT8 *charmap = state->memregion("chargen")->base();
10087   UINT8 pixels = charmap[(linecount & 15) + (charcode << 4)];
r19910r19911
125112   0,
126113   DEVCB_CPU_INPUT_LINE("maincpu", I8085_RST65_LINE),
127114   DEVCB_NULL,   
115   DEVCB_NULL,
116   DEVCB_NULL,
128117   tim100_display_pixels
129118};
130119
r19910r19911
136125
137126   /* video hardware */
138127   MCFG_SCREEN_ADD("screen", RASTER)
128   MCFG_SCREEN_UPDATE_DEVICE("i8276", i8275_device, screen_update)
139129   MCFG_SCREEN_REFRESH_RATE(50)
140130   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
141131   MCFG_SCREEN_SIZE(40*16, 16*16)
142132   MCFG_SCREEN_VISIBLE_AREA(0, 40*16-1, 0, 16*16-1)
143   MCFG_SCREEN_UPDATE_DRIVER(tim100_state, screen_update_tim100)
144133
145134   MCFG_GFXDECODE( tim100 )
146135
trunk/src/mess/drivers/radio86.c
r19910r19911
2424    AM_RANGE( 0x1000, 0x7fff ) AM_RAM  // RAM
2525    AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc)
2626    //AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x1ffc)
27    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x1ffe) // video
27    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video
2828    AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
2929    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
3030ADDRESS_MAP_END
r19910r19911
4444    AM_RANGE( 0x1000, 0x7fff ) AM_RAM  // RAM
4545    AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc)
4646    AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x1ffc)
47    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x1ffe) // video
47    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video
4848    AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
4949    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
5050ADDRESS_MAP_END
r19910r19911
5555    AM_RANGE( 0xe000, 0xe7ff ) AM_ROM  // System ROM page 2
5656    AM_RANGE( 0xe800, 0xf5ff ) AM_RAM  // RAM
5757    AM_RANGE( 0xf700, 0xf703 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
58    AM_RANGE( 0xf780, 0xf7bf ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) // video
58    AM_RANGE( 0xf780, 0xf7bf ) AM_DEVREADWRITE("i8275", i8275_device, read, write) // video
5959    AM_RANGE( 0xf684, 0xf687 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write)
6060   AM_RANGE( 0xf688, 0xf688 ) AM_WRITE(radio86_pagesel )
6161    AM_RANGE( 0xf800, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
r19910r19911
6969    AM_RANGE( 0x4000, 0x7fff ) AM_READ(radio_cpu_state_r)
7070    AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc)
7171    //AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE_LEGACY("ppi8255_2", i8255a_r, i8255a_w) AM_MIRROR(0x1ffc)
72    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x1ffe) // video
72    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video
7373    AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
7474    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
7575ADDRESS_MAP_END
r19910r19911
8080    AM_RANGE( 0x1000, 0x7fff ) AM_RAM  // RAM
8181    AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x00fc)
8282    //AM_RANGE( 0xc100, 0xc103 ) AM_DEVREADWRITE_LEGACY("ppi8255_2", i8255a_r, i8255a_w) AM_MIRROR(0x00fc)
83    AM_RANGE( 0xc200, 0xc201 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x00fe) // video
83    AM_RANGE( 0xc200, 0xc201 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x00fe) // video
8484    AM_RANGE( 0xc300, 0xc3ff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
8585    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
8686ADDRESS_MAP_END
r19910r19911
9090    AM_RANGE( 0x1000, 0x7fff ) AM_RAM  // RAM
9191    AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc)
9292    AM_RANGE( 0xa000, 0xbfff ) AM_ROM  // Basic ROM
93    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE_LEGACY("i8275", i8275_r, i8275_w) AM_MIRROR(0x1ffe) // video
93    AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video
9494    AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w)    // DMA
9595    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
9696ADDRESS_MAP_END
r19910r19911
359359   MCFG_I8275_ADD   ( "i8275", radio86_i8275_interface)
360360    /* video hardware */
361361   MCFG_SCREEN_ADD("screen", RASTER)
362   MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
362363   MCFG_SCREEN_REFRESH_RATE(50)
363364   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
364365   MCFG_SCREEN_SIZE(78*6, 30*10)
365366   MCFG_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
366   MCFG_SCREEN_UPDATE_DRIVER(radio86_state, screen_update_radio86)
367367   MCFG_GFXDECODE(radio86)
368368   MCFG_PALETTE_LENGTH(3)
369369   MCFG_PALETTE_INIT_OVERRIDE(radio86_state,radio86)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team