-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.
This commit is contained in:
brandman211 2012-03-04 00:30:48 +00:00
parent 63b6004293
commit d12590497e
1 changed files with 4 additions and 5 deletions

View File

@ -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++)
{