Skip to content

Commit

Permalink
[TESTS] Add tests for Atari VCS modern controller
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Dec 29, 2024
1 parent 26a5318 commit 186141d
Show file tree
Hide file tree
Showing 2 changed files with 434 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/bit_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def swap16(i):
''' Byte swap a 16bit value i. '''
return struct.unpack("<H", struct.pack(">H", i))[0]

def sswap16(i):
''' Byte swap a 16bit value i. '''
return struct.unpack("<H", struct.pack(">h", i))[0]

def swap24(i):
''' Swap i as if a 32bit value but then shift right by 8. '''
return struct.unpack("<I", struct.pack(">I", i))[0] >> 8
Expand Down
Loading

0 comments on commit 186141d

Please sign in to comment.