From dc8a7133a3ee5d0eb54782034785f194bf271217 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 11 Nov 2020 12:36:02 +0100 Subject: [PATCH] Allow qusb2snes to configure itself (now that it has a menu on first run) and bind to port 23070 --- MultiClient.py | 9 ++------- setup.py | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/MultiClient.py b/MultiClient.py index 9acbdf87..914712bd 100644 --- a/MultiClient.py +++ b/MultiClient.py @@ -635,13 +635,8 @@ async def snes_write(ctx : Context, write_list): if ctx.snes_state != SNES_ATTACHED or ctx.snes_socket is None or not ctx.snes_socket.open or ctx.snes_socket.closed: return False - PutAddress_Request = { - "Opcode" : "PutAddress", - "Operands" : [] - } + PutAddress_Request = {"Opcode": "PutAddress", "Operands": [], 'Space': 'SNES'} - - PutAddress_Request['Space'] = 'SNES' try: #will pack those requests as soon as qusb2snes actually supports that for real for address, data in write_list: @@ -1356,7 +1351,7 @@ async def main(): parser = argparse.ArgumentParser() parser.add_argument('diff_file', default="", type=str, nargs="?", help='Path to a Berserker Multiworld Binary Patch file') - parser.add_argument('--snes', default='localhost:8080', help='Address of the QUsb2snes server.') + parser.add_argument('--snes', default='localhost:23070', help='Address of the QUsb2snes server.') parser.add_argument('--connect', default=None, help='Address of the multiworld host.') parser.add_argument('--password', default=None, help='Password of the multiworld host.') parser.add_argument('--loglevel', default='info', choices=['debug', 'info', 'warning', 'error', 'critical']) diff --git a/setup.py b/setup.py index 03257fa8..2d66383e 100644 --- a/setup.py +++ b/setup.py @@ -128,6 +128,9 @@ else: qusb2sneslog = buildfolder / "QUsb2Snes" / "log.txt" if os.path.exists(qusb2sneslog): os.remove(qusb2sneslog) +qusb2snesconfig = buildfolder / "QUsb2Snes" / "config.ini" +if os.path.exists(qusb2snesconfig): + os.remove(qusb2snesconfig) if signtool: for exe in exes: