From d12590497e3972ca0674f818003f02a20b8b4168 Mon Sep 17 00:00:00 2001 From: brandman211 Date: Sun, 4 Mar 2012 00:30:48 +0000 Subject: [PATCH] -Fixed the value to & with the update to determine the difference between a Control and Controller. -Set the buttons to the opposite state when they are updated. --Presumably, this is how this works. -Read the delta bytes. TODO: Figure out where in the world the writing of frames actually comes into play. Bisqwit gave me some insight on this. --- BizHawk.MultiClient/movie/MovieImport.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/BizHawk.MultiClient/movie/MovieImport.cs b/BizHawk.MultiClient/movie/MovieImport.cs index ab200133ad..ab9a74f1cb 100644 --- a/BizHawk.MultiClient/movie/MovieImport.cs +++ b/BizHawk.MultiClient/movie/MovieImport.cs @@ -622,7 +622,6 @@ namespace BizHawk.MultiClient string[] buttons = new string[8] { "Right", "Left", "Up", "Down", "B", "A", "Select", "Start" }; for (long frame = 1; frame <= frames; frame++) { - byte controllerstate; SimpleController controllers = new SimpleController(); controllers.Type = new ControllerDefinition(); controllers.Type.Name = "NES Controller"; @@ -640,7 +639,7 @@ namespace BizHawk.MultiClient player++; if (player != 3) { - controllerstate = r.ReadByte(); + byte controllerstate = r.ReadByte(); byte and = 0x1; for (int button = 0; button < buttons.Length; button++) { @@ -648,9 +647,10 @@ namespace BizHawk.MultiClient and <<= 1; } } - else if (!FDS) + else if (FDS) { // TODO: FDS data handling here. + byte command = r.ReadByte(); } player++; } @@ -805,7 +805,6 @@ namespace BizHawk.MultiClient string[] buttons = new string[6] { "Up", "Down", "Left", "Right", "B1", "B2" }; for (int frame = 1; frame <= frameCount; frame++) { - byte controllerstate; SimpleController controllers = new SimpleController(); controllers.Type = new ControllerDefinition(); controllers.Type.Name = "SMS Controller"; @@ -816,7 +815,7 @@ namespace BizHawk.MultiClient */ for (int player = 1; player <= 2; player++) { - controllerstate = r.ReadByte(); + byte controllerstate = r.ReadByte(); byte and = 1; for (int button = 0; button < buttons.Length; button++) {