diff --git a/main.lua b/main.lua index f742719..91334c7 100644 --- a/main.lua +++ b/main.lua @@ -856,6 +856,7 @@ local function do_reset() jp = nil screen_scroll_delta = 0 + trial_frames = 0 emu.frameadvance() -- prevents emulator from quirking up. load_next_trial() @@ -942,7 +943,7 @@ local function doit(dummy) if cfg.time_inputs then for i=2,5 do - local v = band(total_frames, lshift(1, i)) == 0 and -256 or 256 + local v = band(trial_frames, lshift(1, i)) == 0 and -256 or 256 insert(extra_input, v) end end @@ -1001,6 +1002,7 @@ local function doit(dummy) nn.reshape(X, 1, gcfg.input_size) nn.reshape(tile_input, 1, gcfg.tile_count) + trial_frames = trial_frames + cfg.frameskip if cfg.enable_network and get_state() == 'playing' or ingame_paused then total_frames = total_frames + cfg.frameskip