pub struct MovieFrame {
pub swcha: u8,
pub joy_fire: u8,
pub swchb: u8,
pub paddle_pos: [u8; 4],
pub paddle_fire: u8,
}Expand description
One frame’s worth of host input — everything a 2600 controller/console panel can drive. Console switches are per-frame fields (not header-level constants) because Select/Reset/Color/Difficulty can all change mid-run on real hardware, unlike a fixed NES controller.
Packed to mirror the RIOT/TIA port-byte conventions
rusty2600-frontend::input already established, so the frontend’s
InputState -> MovieFrame conversion is a direct reuse of that existing
packing logic, not a re-derivation of it.
Fields§
§swcha: u8Packed joystick directions for both ports, same nibble layout as the
RIOT’s SWCHA (rusty2600-frontend::input::Joystick::swcha_nibble):
bits 7-4 = port 0 up/down/left/right, bits 3-0 = port 1. Active-low.
joy_fire: u8The two joystick fire buttons (TIA INPT4/INPT5, not part of
SWCHA): bit 0 = port 0 fire pressed, bit 1 = port 1 fire pressed.
swchb: u8Packed console switches, same layout as the RIOT’s SWCHB
(rusty2600-frontend::input::ConsoleSwitches::swchb).
paddle_pos: [u8; 4]The four paddles’ pot positions (0 full clockwise ..= 255 full
counter-clockwise, the TIA INPTx dump-capacitor value).
paddle_fire: u8The four paddles’ fire buttons, one bit each (bit N = paddle N).
Trait Implementations§
Source§impl Clone for MovieFrame
impl Clone for MovieFrame
Source§fn clone(&self) -> MovieFrame
fn clone(&self) -> MovieFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more