src/mess/machine/coco.c
| r2111 | r2112 | |
| 3057 | 3057 | coco3_mmu_update(0, 8); |
| 3058 | 3058 | } |
| 3059 | 3059 | |
| 3060 | | INPUT_CHANGED( coco_joystick_mode_changed ) |
| 3060 | static void update_lightgun(running_machine *machine) |
| 3061 | 3061 | { |
| 3062 | 3062 | int is_lightgun = readinputportbytag_safe("joystick_mode", 0x00) == 0x40; |
| 3063 | 3063 | crosshair_set_screen(machine, 0, is_lightgun ? CROSSHAIR_SCREEN_ALL : CROSSHAIR_SCREEN_NONE); |
| 3064 | 3064 | } |
| 3065 | 3065 | |
| 3066 | INPUT_CHANGED( coco_joystick_mode_changed ) |
| 3067 | { |
| 3068 | update_lightgun(machine); |
| 3069 | } |
| 3070 | |
| 3071 | static TIMER_CALLBACK( update_lightgun_timer_callback ) |
| 3072 | { |
| 3073 | update_lightgun(machine); |
| 3074 | } |
| 3075 | |
| 3066 | 3076 | MACHINE_START( coco3 ) |
| 3067 | 3077 | { |
| 3068 | 3078 | machine_init_interface init; |
| r2111 | r2112 | |
| 3096 | 3106 | state_save_register_global(gime_irq); |
| 3097 | 3107 | state_save_register_global(gime_firq); |
| 3098 | 3108 | state_save_register_func_postload(coco3_state_postload); |
| 3109 | |
| 3110 | /* need to specify lightgun crosshairs */ |
| 3111 | timer_set(attotime_zero, NULL, 0, update_lightgun_timer_callback); |
| 3099 | 3112 | } |
| 3100 | 3113 | |
| 3101 | 3114 | |