void carpolo_generate_car_goal_interrupt(int car, int right_goal) { car_goal_collision_cause = car | (right_goal ? 0x08 : 0x00); TTL74148_input_line_w(TTL74148_3S, CAR_GOAL_PRIORITY_LINE, 0); TTL74148_update(TTL74148_3S); }
void carpolo_generate_car_car_interrupt(int car1, int car2) { car_car_collision_cause = ~((1 << (3 - car1)) | (1 << (3 - car2))); TTL74148_input_line_w(TTL74148_3S, CAR_CAR_PRIORITY_LINE, 0); TTL74148_update(TTL74148_3S); }
void carpolo_generate_ball_screen_interrupt(UINT8 cause) { ball_screen_collision_cause = cause; TTL74148_input_line_w(TTL74148_3S, BALL_SCREEN_PRIORITY_LINE, 0); TTL74148_update(TTL74148_3S); }
void carpolo_generate_car_border_interrupt(int car, int horizontal_border) { car_border_collision_cause = car | (horizontal_border ? 0x04 : 0x00); priority_0_extension = CAR_BORDER_EXTRA_BITS; TTL74148_input_line_w(TTL74148_3S, PRI0_PRIORTITY_LINE, 0); TTL74148_update(TTL74148_3S); }
void carpolo_generate_car_ball_interrupt(int car, int car_x, int car_y) { car_ball_collision_cause = car; car_ball_collision_x = car_x; car_ball_collision_y = car_y; priority_0_extension = CAR_BALL_EXTRA_BITS; TTL74148_input_line_w(TTL74148_3S, PRI0_PRIORTITY_LINE, 0); TTL74148_update(TTL74148_3S); }
/* the outputs of the flip-flops are connected to the priority encoder */ static void TTL7474_2S_1_cb(void) { TTL74148_input_line_w(TTL74148_3S, COIN1_PRIORITY_LINE, TTL7474_output_comp_r(TTL7474_2S_1)); TTL74148_update(TTL74148_3S); }
static void update_irq_encoder(int line, int state) { TTL74148_input_line_w(0, line, !state); TTL74148_update(0); }