Previous 15994 Revisions Next

r2388 Sunday 13th April, 2008 at 13:30:16 UTC by Dirk Best
[VECTREX] Fixed compilation with current code
[src/mess/includes]vectrex.h
[src/mess/machine]vectrex.c
[src/mess/video]vectrex.c

src/mess/includes/vectrex.h
r2387r2388
2121extern int vectrex_reset_refresh;
2222
2323TIMER_CALLBACK(vectrex_imager_eye);
24void vectrex_configuration(void);
24void vectrex_configuration(running_machine *machine);
2525READ8_HANDLER (v_via_pa_r);
2626READ8_HANDLER(v_via_pb_r );
2727void v_via_irq (int level);
src/mess/video/vectrex.c
r2387r2388
106106   }
107107}
108108
109static int lightpen_check (void)
109
110static int lightpen_check(running_machine *machine)
110111{
111112   int dx, dy;
112113   if (vectrex_lightpen_port != 0)
113114   {
114      lightpen_down = readinputportbytag("LPENCONF") & 0x10;
115      lightpen_down = input_port_read(machine, "LPENCONF") & 0x10;
115116
116117      if (lightpen_down)
117118      {
118         pen_x = readinputportbytag("LPENX") * (x_max / 0xff);
119         pen_y = readinputportbytag("LPENY") * (y_max / 0xff);
119         pen_x = input_port_read(machine, "LPENX") * (x_max / 0xff);
120         pen_y = input_port_read(machine, "LPENY") * (y_max / 0xff);
120121
121122         dx = abs(pen_x - x_int);
122123         dy = abs(pen_y - y_int);
r2387r2388
196197{
197198   int i;
198199
199   vectrex_configuration();
200   vectrex_configuration(screen->machine);
200201
201202   /* start black */
202203   vector_add_point(vectrex_points[display_start].x,
r2387r2388
454455
455456   if (cb2 != data)
456457   {
457      if (data & lightpen_check())
458      if (data & lightpen_check(machine))
458459         timer_set(attotime_zero, NULL, 0, lightpen_trigger);
459460
460461      timer_set(attotime_zero, &blank, data, update_signal);
src/mess/machine/vectrex.c
r2387r2388
123123
124124*********************************************************************/
125125
126void vectrex_configuration(void)
126void vectrex_configuration(running_machine *machine)
127127{
128   unsigned char cport = readinputportbytag("3DCONF");
128   unsigned char cport = input_port_read(machine, "3DCONF");
129129
130130   /* Vectrex 'dipswitch' configuration */
131131
r2387r2388
202202      vectrex_beam_color = RGB_WHITE;
203203      imager_colors[0]=imager_colors[1]=imager_colors[2]=imager_colors[3]=imager_colors[4]=imager_colors[5]=RGB_WHITE;
204204   }
205   vectrex_lightpen_port = readinputportbytag("LPENCONF") & 0x03;
205   vectrex_lightpen_port = input_port_read(machine, "LPENCONF") & 0x03;
206206}
207207
208208/*********************************************************************
r2387r2388
219219READ8_HANDLER( v_via_pb_r )
220220{
221221   int pot;
222   pot = readinputport(((vectrex_via_out[PORTB] & 0x6) >> 1)) - 0x80;
222   pot = input_port_read_indexed(machine, ((vectrex_via_out[PORTB] & 0x6) >> 1)) - 0x80;
223223
224224   if (pot > (signed char)vectrex_via_out[PORTA])
225225      vectrex_via_out[PORTB] |= 0x20;
r2387r2388
242242
243243READ8_HANDLER( s1_via_pb_r )
244244{
245   return (vectrex_via_out[PORTB] & ~0x40) | (readinputportbytag("COIN") & 0x40);
245   return (vectrex_via_out[PORTB] & ~0x40) | (input_port_read(machine, "COIN") & 0x40);
246246}
247247
248248

Previous 15994 Revisions Next


© 1998-2018 The MESS Team