forked from mirror/joycontrol
@@ -40,7 +40,7 @@ Options:
|
|||||||
|
|
||||||
--spi_flash <spi_flash_memory_file> Memory dump of a real Switch controller. Required for joystick emulation.
|
--spi_flash <spi_flash_memory_file> Memory dump of a real Switch controller. Required for joystick emulation.
|
||||||
Allows displaying of JoyCon colors.
|
Allows displaying of JoyCon colors.
|
||||||
Memory dumbs can be created using the dump_spi_flash.py script.
|
Memory dumps can be created using the dump_spi_flash.py script.
|
||||||
|
|
||||||
-r --reconnect_bt_addr <console_bluetooth_address> Previously connected Switch console Bluetooth address in string
|
-r --reconnect_bt_addr <console_bluetooth_address> Previously connected Switch console Bluetooth address in string
|
||||||
notation (e.g. "FF:FF:FF:FF:FF:FF") for reconnection.
|
notation (e.g. "FF:FF:FF:FF:FF:FF") for reconnection.
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class DataReader:
|
|||||||
output_file.write(bytes(spi_data))
|
output_file.write(bytes(spi_data))
|
||||||
|
|
||||||
|
|
||||||
async def dumb_spi_flash(hid_device, output_file=None):
|
async def dump_spi_flash(hid_device, output_file=None):
|
||||||
SPI_FLASH_SIZE = 0x80000
|
SPI_FLASH_SIZE = 0x80000
|
||||||
|
|
||||||
spi_flash_reader = DataReader()
|
spi_flash_reader = DataReader()
|
||||||
@@ -163,10 +163,10 @@ async def _main(args, loop):
|
|||||||
if args.output:
|
if args.output:
|
||||||
with open(args.output, 'wb') as output:
|
with open(args.output, 'wb') as output:
|
||||||
with AsyncHID(path=controller['path'], loop=loop) as hid_controller:
|
with AsyncHID(path=controller['path'], loop=loop) as hid_controller:
|
||||||
await dumb_spi_flash(hid_controller, output_file=output)
|
await dump_spi_flash(hid_controller, output_file=output)
|
||||||
else:
|
else:
|
||||||
with AsyncHID(path=controller['path'], loop=loop) as hid_controller:
|
with AsyncHID(path=controller['path'], loop=loop) as hid_controller:
|
||||||
await dumb_spi_flash(hid_controller)
|
await dump_spi_flash(hid_controller)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user