alttpo / sni

SNES Interface with gRPC API
MIT License
46 stars 11 forks source link

[Feature Request] NWA support? #17

Closed ShneekeyTheLost closed 2 years ago

ShneekeyTheLost commented 2 years ago

So, BizHawk's LUA implementation in Linux is... well, it has problems finding the appropriate path and cpath for the lua-socket module. Someone wrote an External Tool which implements a link to QUSB via NWA instead of LUA.

However, I prefer SNI's implementation, as well as the native linux releases so I don't have to constantly compile QUSB every time it releases. Would it be possible to implement NWA support?

JamesDunne commented 2 years ago

Skars wrote the BizHawk external tool. Yup NWA is already supported in SNI but needs testing as I think the NWA protocol has evolved slightly beyond when SNI originally implemented it.

ShneekeyTheLost commented 2 years ago

Well, when I tried using it with SNI, it kept disconnecting and attempting to reconnect. However, there may be something I have to enable with SNI? There doesn't seem to be a config file in home/.sni folder and the apps.yaml file doesn't reference NWA that I can discern.

JamesDunne commented 2 years ago

i don't think there's anything to do as an end user. as i mentioned before, the nwa protocol evolved slightly so I just need to update the nwa handling code per the latest version.

JamesDunne commented 2 years ago

Okay I got this working in main, pushing out a release build now.

ShneekeyTheLost commented 2 years ago

NWA now connects to SNI but not to AP. Will have to explore further on my end.

JamesDunne commented 2 years ago

Closing this unless there's further info to demonstrate an issue

ShneekeyTheLost commented 1 year ago

Additional information on this issue:

Attempting to connect to SNI via NWA results in the following being spammed:

Connecting to SNI at ws://localhost:23074 ... Connecting to SNI at ws://localhost:23074 ... Attaching to emunwa://127.0.0.1:48881 Attached to emunwa://127.0.0.1:48881 Lost connection to the snes, type /snes to reconnect ...reconnecting in 5s

Not sure what is causing this or where the issue is. I am using the second beta of the NWA tool from Bizhawk

JamesDunne commented 1 year ago

Discovered the issue is with the bizhawk bsnes v115 core's libsnes target. The libsnes defines memory "regions" which the NWA External Tool translates to NWA memory domain names, except bsnes uses names like CARTRIDGE_ROM where NWA expects CARTROM. This needs translating in the NWA External Tool because SNI already uses the CARTROM which works for the bizhawk snes9x core.