cas1993per / bizhawk

Automatically exported from code.google.com/p/bizhawk
2 stars 0 forks source link

Virtual Pad does not respect Max Values #369

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open an N64 ROM.  I chose Jet Force Gemini.  Any N64 ROM works (in theory).
2. Enable Input Display.
3. Open Virtual Pad
4. Ensure the Max is 127, 127
4. Move the Virtual Stick to the bottom Left by clicking and dragging.  The 
value in Virtual Pad and Input Display will say, "127, -128"  You can also 
manually enter the X value at 127 and the Y value at -128

Manually setting the value to a greater value (999) will cause the Input X and 
Y to respect the Max Values.

The Top Left Corner will say "-128, 127" at it's Max.
The Bottom Left Corner will say "-128, -128" at it's Max.
The Top Right Corner will say "127,127" at it's Max.
The Bottom Right Corner will say "127, -128" at it's Max.

Original issue reported on code.google.com by hegyak on 15 Jan 2015 at 1:23

GoogleCodeExporter commented 9 years ago
From the description you give, it sounds like everything is working right?  The 
expected extents limit is -128 to 127 in both directions

Original comment by goyu...@gmail.com on 16 Jan 2015 at 3:53

GoogleCodeExporter commented 9 years ago
If the Max is 127, then why is Virtual Pad using -128 as the Negative max?  It 
makes sense if we are counting from 0 as positive.

Original comment by hegyak on 16 Jan 2015 at 3:59

GoogleCodeExporter commented 9 years ago
This is not a bug.

A single signed byte (which is how the N64 analog controls work) allows for 
values -128 to 127 (0 - 127 "positive" values, -128 - -1 negative values, in 
that order).

Original comment by hegyak on 16 Jan 2015 at 4:24