Previous 15994 Revisions Next

r7372 Tuesday 16th February, 2010 at 12:59:58 UTC by Fabio Priuli
[P500] added crosshair enable/disable to remove the annoying crosshair (no progresses on p500 inputs, though)
[src/mess/machine]cbmb.c

src/mess/machine/cbmb.c
r7371r7372
1414#include "machine/ieee488.h"
1515
1616#include "includes/cbmb.h"
17#include "crsshair.h"
1718
1819#include "devices/cartslot.h"
1920
r7371r7372
367368}
368369
369370
371static TIMER_CALLBACK( p500_lightpen_tick )
372{
373   if ((input_port_read_safe(machine, "CTRLSEL", 0x00) & 0x07) == 0x04)
374   {
375      /* enable lightpen crosshair */
376      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL);
377   }
378   else
379   {
380      /* disable lightpen crosshair */
381      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE);
382   }
383}
384
370385static TIMER_CALLBACK(cbmb_frame_interrupt)
371386{
372387   static int level = 0;
r7371r7372
469484// 128u4 FIXME
470485//  vic2_frame_interrupt (device);
471486
487   /* for p500, check if lightpen has been chosen as input: if so, enable crosshair (but c64-like inputs for p500 are not working atm) */
488   timer_set(machine, attotime_zero, NULL, 0, p500_lightpen_tick);
489
472490   set_led_status(machine, 1, input_port_read(machine, "SPECIAL") & 0x04 ? 1 : 0);      /* Shift Lock */
473491}
474492

Previous 15994 Revisions Next


© 1998-2018 The MESS Team