Skip to content

Conversation

@DeCoded-Void
Copy link

  • Added "Net Gate" functionality for parity with Add Net Gate functionality shonumi/gbe-plus#87 .
  • Fixed an issue where the non-japanese versions of Mega Man Battle Network 6 are not getting the BattleChip Gate working as a result of qtitle changes, the ROM header was used to identify the game instead.
  • Changed chip insertion behavior to be "hotswapped" rather than being kept inserted.
  • Changes are only done in the qt end of things, battlechip.c and io related code is untouched.

This allows developers to create apps to easily interface with mGBA via TCP to insert chips in the chip gate.
Potential applications include: creating a wireless reader that reads real battlechips, using NFC tags to substitute as battle chips, phone/web app to use for chip selection, livestream chat to control inserted chips, etc.

Tested on Windows 11 64-bit with the windows:w64 build.

Screenshot 2025-08-22 091513

- Edited via QT Creator
- Added an additional vertical separator for the "Net Gate" section in "show advanced"
- "Inserted" was renamed to "Keep Inserted" to reflect new behavior
- By default, address and port strings are 127.0.0.1 and 2000
- Tooltips were added in gate options in Gate Type and Enable Net Gate checkbox

There may be some enum conflicts as a result of using a later version of qt, some affected enums were modified to work with the current branch of mGBA.
- Utilizes GBA memory to identify game version by using bytes from the ROM header

- Something in "qtitle" seems to have broken from 10.5 --> 11.0, I left a statement there which may correct it if there is preference for that instead. Since there isn't a member in QString for ASCII, fromLatin1 was used instead.

- As a result of the "qtitle" issue, the current master branch does not autoselect the gate and has caused the US version of MMBN6 to not work with the chip gate as a result of the chip gate providing the incorrect chip gate identifier to that version.

- Added behavior that allows for the chip name spinner to update when the Chip ID is changed

- Insertion behavior was modified since Battle Chips with the Chip Gate is intended to be hotswapped rather than being kept inserted. 

- In order to prevent the issue where swapped chips are not read while "Inserted" is checked, there is a momentary un-insert of the chip before the new chip is inserted and held.

- For the Net Gate functionality, the accepted bytes are for parity with shonumi/gbe-plus#87, The 0x80 byte is there as the starting byte for that. It is also used in mGBA to decide to accept the buffer or not.
- Added "onChipIdChanged", used to update the Chip Name spinner when Chip ID is manually changed
- Added Net Gate state (no persistence; initialized from UI at runtime)
- Default IP and Port is used from the UI file so it wasn't asserted in the header, it may be a good idea to have it here instead
@DeCoded-Void DeCoded-Void changed the title Add Net Gate Functionality & Fix Chip Gate for non-JP versions of Battle Network 6 Qt: Add Net Gate Functionality & Fix Chip Gate for non-JP versions of Battle Network 6 Aug 22, 2025
@endrift
Copy link
Member

endrift commented Sep 1, 2025

Please back out the "qtitle" fix. It was a trivial one line fix when done properly, so instead of complicating the review process I just went ahead and did it myself. I can review this properly afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants