Fix automation

This commit is contained in:
Lior Halphon 2018-12-15 18:01:30 +02:00
parent e8dfc18d11
commit 7b02b3cb89

View File

@ -69,28 +69,28 @@ static void vblank(GB_gameboy_t *gb)
push_a_twice? frames / 4: push_a_twice? frames / 4:
frames) % combo_length + (start_is_bad? 20 : 0) ) { frames) % combo_length + (start_is_bad? 20 : 0) ) {
case 0: case 0:
gb->keys[push_right? 0 : 7] = true; // Start (Or right) down gb->keys[0][push_right? 0 : 7] = true; // Start (Or right) down
break; break;
case 10: case 10:
gb->keys[push_right? 0 : 7] = false; // Start (Or right) up gb->keys[0][push_right? 0 : 7] = false; // Start (Or right) up
break; break;
case 20: case 20:
gb->keys[b_is_confirm? 5: 4] = true; // A down (or B) gb->keys[0][b_is_confirm? 5: 4] = true; // A down (or B)
break; break;
case 30: case 30:
gb->keys[b_is_confirm? 5: 4] = false; // A up (or B) gb->keys[0][b_is_confirm? 5: 4] = false; // A up (or B)
break; break;
case 40: case 40:
if (push_a_twice) { if (push_a_twice) {
gb->keys[b_is_confirm? 5: 4] = true; // A down (or B) gb->keys[0][b_is_confirm? 5: 4] = true; // A down (or B)
} }
else if (gb->boot_rom_finished) { else if (gb->boot_rom_finished) {
gb->keys[3] = true; // D-Pad Down down gb->keys[0][3] = true; // D-Pad Down down
} }
break; break;
case 50: case 50:
gb->keys[b_is_confirm? 5: 4] = false; // A down (or B) gb->keys[0][b_is_confirm? 5: 4] = false; // A down (or B)
gb->keys[3] = false; // D-Pad Down up gb->keys[0][3] = false; // D-Pad Down up
break; break;
} }
} }