Skip to content

Releases: afska/gba-link-connection

v8.0.3

21 Apr 07:04

Choose a tag to compare

  • 💳 LinkCard:
    • Improved reliability of card transfers
    • Added English support to the Shift-JIS version of DLC Loader
    • Added debug mode and error codes to DLC Loader

v8.0.2

21 Mar 17:22

Choose a tag to compare

  • 💳 LinkCard:
    • Added ReceiveResult::SCAN_ERROR and improved scan error behavior

v8.0.1

24 Feb 06:14

Choose a tag to compare

  • 📻 LinkWireless:
    • receive(...) now filters messages from hacked servers with invalid player IDs

v8.0.0

20 Feb 01:06
1534677

Choose a tag to compare

You might want to check out the new FAQ section.

  • 💥 Breaking changes:
    • ⚙️ All enum are now enum class, so constructs like LinkCable::BAUD_RATE_1 or to_string(baudRate) should be migrated to LinkCable::BaudRate::BAUD_RATE_1 and to_string((int)baudRate)
    • 👾 In LinkCable, send(...) now returns a boolean that can be false if the data is invalid or the send queue is full (LinkWireless's behavior)
    • 🔧👾 In LinkRawCable, the default baud rate was changed to LinkRawCable::BaudRate::BAUD_RATE_3
    • 📻 The LinkWireless transport-level protocol has been redone from scratch, so it cannot communicate with v7 and below. The new protocol is way more efficient (more details below)
    • 📻 In LinkWireless, the LINK_WIRELESS_END sentinel value has been removed, and now getServers(...), getServersAsyncEnd(...) and receive(...) have an out parameter with the array size
    • 📻 The file lib/LinkWireless.cpp has been moved to lib/iwram_code/LinkWireless.cpp
    • 📻 In LinkWireless, the LINK_WIRELESS_USE_SEND_RECEIVE_LATCH and LINK_WIRELESS_TWO_PLAYERS_ONLY options have been removed, since some of the optimizations they added were applied to the main library
    • 📻 In LinkWireless, LINK_WIRELESS_MAX_SERVER_TRANSFER_LENGTH's default value was changed from 20 to 11
    • 🔧📻 LinkRawWireless::RemoteCommand has been removed and unified with LinkRawWireless::CommandResult with data and dataSize as fields
    • 🔧📻 LinkRawWireless::deactivate() doesn't reset the adapter anymore. Instead, calling bye() is required. This is to allow 'moving' between different libraries while maintaining the connection active (for example, LinkWirelessMultiboot -> LinkUniversal)
    • 🔧📻 LinkRawWireless::acceptConnections(...) was renamed to LinkRawWireless::pollConnections(...)
    • 🔧📻 In LinkRawWireless, command calls now receive pointers instead of std::array
    • 🔧📻 In LinkRawWireless, some internal methods are now private
    • 🌎 In LinkUniversal, when using the non-default constructor, sending the forwarding boolean in the WirelessOptions is now required
    • 🌎 In LinkUniversal, the randomSeed constructor parameter was moved to Link::randomSeed to reuse it in the other libraries
    • 🌎 In LinkUniversal, the fields linkCable and linkWireless are now private. Use getLinkCable() and getLinkWireless() if you need to do platform-exclusive stuff like updating broadcast data, closing a server, or getting signal levels

  • 📺 Added LinkIR:
    • Infrared Adapter (AGB-006)
  • 💳 Added LinkCard:
    • e-Reader integration
  • 👾 LinkCable:
    • 💥 send(...) now returns a boolean that can be false if the data is invalid or the send queue is full (LinkWireless's behavior)
    • playerCount() doesn't flicker between 0 and 1 anymore when disconnected. Now, the minimum is always 1 (LinkWireless's behavior)
    • Messages from interrupt queues are only moved to main queues if they are not full
    • The library has been refactored to use LinkRawCable internally, to avoid having duplicated code
    • Added canSend() method to know if a send(...) call would fail due to the send queue being full
    • Added didQueueOverflow(...) method to know whether the queue hit its full capacity at some point
    • Added resetTimeout() method to allow changing the timeout in real time
    • Added resetTimer() method to allow changing the interval in real time
    • C bindings now support getConfig() and setConfig(...) methods
  • 💻 LinkCableMultiboot:
    • Added LinkCableMultiboot::Async, which makes sending completely interrupt-based and lets games play animations and/or music during the transfer. Based on gba_mem_viewer's implementation
    • Reduced random wait to make detection faster
    • The sync version has now more error checks and validations
    • The LinkUniversal_real example can now send multiboot ROMs asynchronously, while playing audio/video
  • 🔧👾 LinkRawCable:
    • 💥 The default baud rate was changed to LinkRawCable::BaudRate::BAUD_RATE_3
  • 📻 LinkWireless:
    • 💥 The LinkWireless transport-level protocol has been redone from scratch, so it cannot communicate with v7 and below. The new protocol is way more efficient. Some advantages of this new version are:
      • Reduced overhead / more bandwidth: only a 32-bit header is added containing all the ACKs, the rest of the bandwidth is available for user messages. The only exception is when forwarding is enabled, which adds a 16-bit header every 5 messages, but it's still much better than what v7 was doing
      • Reduced CPU usage: since more data is sent in less packets, the number of serial IRQs to attend is reduced. For more details, check the profiler example
      • Reduced RAM usage: entries use half the space in message queues
      • Messages from other players are now forwarded immediately instead of waiting for the next receive(...) call
      • The value 0xFFFF can now be sent
      • Unlimited packet IDs: the previous version supported up to 4194304 packets, which is a lot, but you could easily hit that limit after a 10-hour session
    • 💥 The LINK_WIRELESS_END sentinel value has been removed, and now getServers(...), getServersAsyncEnd(...) and receive(...) have an out parameter with the array size
    • 💥 The file lib/LinkWireless.cpp has been moved to lib/iwram_code/LinkWireless.cpp
    • 💥 The LINK_WIRELESS_USE_SEND_RECEIVE_LATCH and LINK_WIRELESS_TWO_PLAYERS_ONLY options have been removed, since some of the optimizations they added were applied to the main library
    • 💥 LINK_WIRELESS_MAX_SERVER_TRANSFER_LENGTH's default value was changed from 20 to 11
    • The library has been refactored to use LinkRawWireless internally, to avoid having duplicated code
    • When there's packet loss due to queues being full, the newest message is prioritized (LinkCable's behavior)
    • Messages from interrupt queues are only moved to main queues if they are not full
    • Added restoreExistingConnection() method to allow starting the library with the adapter already connected (replaces activate()). This is useful after multiboot, to reuse the existing connection
    • Added getSignalLevel(...) method to allow retrieving the signal level of other peers
    • Added closeServer() method to allow closing a room while keeping the session active, to prevent new users from joining
    • Added canSend() method to know if a send(...) call would fail due to the send queue being full
    • Added didQueueOverflow(...) method to know whether the queue hit its full capacity at some point
    • Added resetTimeout() method to allow changing the timeout in real time
    • Added resetTimer() method to allow changing the interval in real time
    • Added knobs for LINK_WIRELESS_PUT_ISR_IN_IWRAM (like LINK_WIRELESS_PUT_ISR_IN_IWRAM_SERIAL_LEVEL) to control the desired optimization level
    • The LINK_WIRELESS_ENABLE_NESTED_IRQ option doesn't require enabling LINK_WIRELESS_PUT_ISR_IN_IWRAM anymore
    • When hosting a room, the library now uses the SignalLevel command (0x11) instead of PollConnections (0x1a) to update the player count. This is slightly faster and makes getSignalLevel(...) calls free on the server side
    • Removed the 15-scanline wait from serve(...) since we don't need to call 0x1a anymore
    • Improved timeout handling, so if the adapter keeps old data in its buffer after a disconnection, old confirmation numbers still trigger timeouts
    • Fixed a bug when using LINK_WIRELESS_ENABLE_NESTED_IRQ where other IRQs could interrupt the adapter's acknowledgement
    • C bindings now support getConfig() and setConfig(...) methods
    • The recommended default interval was changed to 75
    • The LinkWireless_demo example can now restore a session after multiboot and set up high timeouts with the RIGHT key
    • The LinkWireless_demo example now sends x10 instead of x2 when holding the LEFT key
    • The LinkWireless_demo example now includes a help section with all the button combinations
    • The LinkWireless_demo example now shows the signal levels when serving
    • The LinkWireless_demo example can now change the interval dynamically with the L/R keys
    • The profiler example can now close the server with START+UP
    • The profiler example now measures performance in total cycles consumed by ISRs per frame
    • The profiler example is now included in the multiboot pack
    • The profiler example has been divided in two: LinkWireless_prof_code_iwram and LinkWireless_prof_code_rom
    • The LinkWireless_demo_2player example doesn't exist anymore, since the option has been removed
  • 📡 LinkWirelessMultiboot:
    • Added LinkWirelessMultiboot::Async, which makes sending completely interrupt-based and lets games play animations and/or music during the transfer
    • Added a ready flag to the progress callback to allow starting the transfer before the player count is reached
    • Added an optional keepConnectionAlive parameter to sendRom(...) so users can reuse the existing connection
    • Added reset() method to turn off the adapter
    • Before starting, an EndHost (0x1b) command is now issued to the adapter to prevent unwanted connections during the transfer
    • Added retries to final transfer to improve reliability in noisy environments
    • The LinkWirelessMultiboot_demo example can now start the transfer before the player count is reached with the SELECT key
    • The LinkUniversal_real example can now send multiboot ROMs asynchronously, while playing audio/video
  • 🔧📻 LinkRawWireless:
    • 💥 RemoteCommand has been removed and unified with CommandResult with data and dataSize as fields
    • 💥 deactivate() doesn't reset the adapter anymore. Instead, calling...
Read more

v7.0.3

16 Jan 13:41

Choose a tag to compare

  • 📻 LinkWireless:
    • Fixed a possible lockup when using LinkUniversal::waitFor(...): if start() fails during activation/reset, the timer now keeps running (until deactivate())

v7.0.2

12 Jan 00:55

Choose a tag to compare

  • 📻 LinkWireless:
    • Fixed user name length validation in serve(...)
    • Ensuring a clean RCNT state on activation to prevent incompatibilities with LinkGPIO or other libraries
  • 📡 LinkWirelessMultiboot:
    • Fixed compile script in example to properly show logs
  • 🔧📻 LinkRawWireless:
    • Fixed user name length validation in broadcast(...)
  • 🔧🏛 LinkWirelessOpenSDK:
    • Fixed uninitialized and unaligned reads bug
  • 🌎 LinkUniversal:
    • Fixed random seed initialization

v7.0.1

14 Sep 08:57

Choose a tag to compare

  • 📻 LinkWireless:
    • Fixed a data race check when copying incoming messages (affects v7.0.0 only)
    • Fixed full buffer check in send(...)
    • Fixed potential issues when using LINK_WIRELESS_ENABLE_NESTED_IRQ with low timer intervals

v7.0.0

27 Aug 10:00
31136a8

Choose a tag to compare

  • 💥 Breaking changes:
    • ⚙️ Since libtonc is no longer a dependency, lib/_link_common.hpp needs to be included
    • 👾📻 In LinkCable and LinkWireless, the remoteTimeout parameter has been removed. Now, there's a single timeout, measured in frames. This change simplifies things by making timeouts independent of the interval value
    • 📻 In LinkWireless, the asyncACKTimerId parameter has been removed. With the latest changes, it's no longer needed and actually burns more cycles
    • 🔗 LINK_SPI_8BIT_MODE was moved to a runtime argument to allow using two different data sizes in the same project. Now, to use 8-bit SPI, pass LinkSPI::PacketSize::SIZE_8BIT as last constructor argument

  • 🟪 Added LinkCube:
    • JOYBUS mode
  • 📱 Added LinkMobile:
  • 👾 LinkCable:
    • 💥 The remoteTimeout constructor parameter has been removed. The functionality remains the same, but now both IRQ-timeouts and message timeouts use the timeout parameter, measured in frames
    • Send buffer is cleared after every SERIAL interrupt, preventing duplicate packets
    • Timeout checking was moved to the VBlank handler to avoid extra checks for every timer tick
  • 💻 LinkCableMultiboot:
    • Made some changes to improve stability/reliability of transfers
    • Added an SPI mode, to transfer ROMs using a GBC Link Cable
    • Added a compile-time constant to change the logo's palette data
    • The example can now send multiple ROMs and launch them. It's now bundled with every other gba-link-connection example
  • 📻 LinkWireless:
    • 💥 The remoteTimeout constructor parameter has been removed. The functionality remains the same, but now both IRQ-timeouts and message timeouts use the timeout parameter, measured in frames
    • 💥 The asyncACKTimerId parameter has been removed. With the latest changes, it's no longer needed and actually burns more cycles
    • Communications with the adapter now use timeouts 10 times smaller, so when disconnected, the synchronous methods are faster
    • Added optional turnOff parameter to deactivate()
    • If initialization fails, the timers and SPI serial mode are now stopped
    • When already serving, calling serve(...) to update broadcast data will no longer cause disconnections if the adapter is busy. In such case, the method will return false and getLastError() will be BUSY_TRY_AGAIN
    • Added compile-time constant to enable nested interrupts so time-critical VBlank handlers (e.g. an audio player) can run on time
    • Added compile-time constant to optimize the library for two-player games and allow sending small unchecked packets as fast as possible
    • Fixed bad memory access when a hacked client spoofs its player ID
    • The example now shows the compile-time settings
    • The example can now test quick send/receive (2-player only)
    • The profiler example can now change the broadcast data with the UP key
  • 📡 LinkWirelessMultiboot:
    • Improved disconnection and acknowledgment handling
    • Added cancel option to example
    • The example can now send multiple ROMs and launch them. It's now bundled with every other gba-link-connection example
  • 🔧📻 LinkRawWireless:
    • Added wait to prevent timing issues with clock inversion. This improves wireless multiboot!
  • 🌎 LinkUniversal:
    • Improved performance when the Wireless Adapter is not connected and the protocol is AUTODETECT
    • Now, the Wireless Adapter is put in low consumption mode only on deactivate() and not after every switch
    • Added a constructor parameter to initialize the random seed
    • Added sanity checks to ensure that setting LINK_UNIVERSAL_MAX_PLAYERS to less than 4 won't produce undefined behavior
    • Added a more real stress test using butano, with an audio player, a video, text and sprites
  • 🔗 LinkSPI:
    • 💥 Moved data size from a compile-time constant (LINK_SPI_8BIT_MODE) to a constructor parameter (dataSize)
    • Added 8-bit toggle to the example
  • 🖱️ LinkPS2Mouse:
    • Added cancel option to example
  • ⌨️ LinkPS2Keyboard:
    • Implemented parity check
    • Added Scan Code key and event enums
    • Switched to C-style function pointers to avoid extra dependencies
    • Added clear option to example
  • ⚙️ General:
    • 💥 The libraries no longer depend on libtonc. All the required code was included here inside a namespace
    • Minimized global namespace pollution. All internal API constants are private now
    • Added C bindings for -almost- all libraries
    • Added Link::perFrame(...) helper to easily calculate timer intervals
    • Added Doxygen-style docs for IDE quick info to all libraries
    • Compile-time knobs can be defined from outside without touching any library code
    • Every method that doesn't have a side effect was marked with [[nodiscard]]
    • Improved overall documentation, adding notes about memory usage and other considerations
    • Multiboot ROMs are now included as part of the release
    • Updated examples to libugba v0.3.0
    • Refactored example code
    • All examples have now been tested and compiled using gcc 14

v6.3.0

22 Apr 00:55
bc94951

Choose a tag to compare

  • ⏱️ Added LinkUART:
    • UART mode
  • 🖱️ Added LinkPS2Mouse:
    • PS/2 mouse accessory
  • ⌨️ Added LinkPS2Keyboard:
    • PS/2 keyboard accessory

v6.2.3

01 Mar 20:46

Choose a tag to compare

  • 🌎 LinkUniversal:
    • LINK_UNIVERSAL_MAX_PLAYERS now defaults to 5