Increasing version to v6.0.1 and cleaning up code/docs

This commit is contained in:
Rodrigo Alfonso 2024-01-02 04:17:31 -03:00
parent 44f2ed5399
commit af29548f5f
9 changed files with 16 additions and 18 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 Rodrigo Alfonso
Copyright (c) 2024 Rodrigo Alfonso
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -196,7 +196,7 @@ Name | Return type | Description
`isActive()` | **bool** | Returns whether the library is active or not.
`activate()` | **bool** | Activates the library. When an adapter is connected, it changes the state to `AUTHENTICATED`. It can also be used to disconnect or reset the adapter.
`deactivate()` | - | Deactivates the library.
`serve([gameName], [userName], [gameId])` | **bool** | Starts broadcasting a server and changes the state to `SERVING`. You can, optionally, provide a `gameId` *(0 ~ 0x7FFF)*, a `gameName` (max `14` characters) and a `userName` (max `8` characters) that games will be able to read.
`serve([gameName], [userName], [gameId])` | **bool** | Starts broadcasting a server and changes the state to `SERVING`. You can, optionally, provide a `gameName` (max `14` characters), a `userName` (max `8` characters), and a `gameId` *(0 ~ 0x7FFF)* that games will be able to read.
`getServers(servers, [onWait])` | **bool** | Fills the `servers` array with all the currently broadcasting servers. This action takes 1 second to complete, but you can optionally provide an `onWait()` function which will be invoked each time VBlank starts.
`getServersAsyncStart()` | **bool** | Starts looking for broadcasting servers and changes the state to `SEARCHING`. After this, call `getServersAsyncEnd(...)` 1 second later.
`getServersAsyncEnd(servers)` | **bool** | Fills the `servers` array with all the currently broadcasting servers. Changes the state to `AUTHENTICATED` again.

View File

@ -384,12 +384,12 @@ Both Pokemon games and the multiboot ROM that the adapter sends when no cartridg
⚠️ When the data is concatenated, the **headers** sent to [SendData](#senddata---0x24) are not included, just the raw data. A single header is included as the first value of the response. This header is as follows:
- Bits `0-6`: Received bytes from host
- Bits `8-12`: Received bytes from client 0
- Bits `13-17`: Received bytes from client 1
- Bits `18-22`: Received bytes from client 2
- Bits `23-27`: Received bytes from client 3
- The rest of the bits are `0`
- Bits `0-6`: # of received bytes from host.
- Bits `8-12`: # of received bytes from client 0.
- Bits `13-17`: # of received bytes from client 1.
- Bits `18-22`: # of received bytes from client 2.
- Bits `23-27`: # of received bytes from client 3.
- The rest of the bits are `0`.
#### Wait - `0x27`
@ -488,6 +488,6 @@ If you know any extra details about the wireless adapter, get in touch!. For spe
2. [Games compatible with the wireless adapter](https://en.wikipedia.org/wiki/Game_Boy_Advance_Wireless_Adapter#Compatible_games) [↩︎](#fnref:list_of_games)
3. [Send me an email if you know more about this](https://blog.kuiper.dev/contact) [↩︎](#fnref:email_me) [2](#fnref:email_me:1) [3](#fnref:email_me:2) [4](#fnref:email_me:3) [5](#fnref:email_me:4)
3. [Send me an email if you know more about this](https://blog.kuiper.dev/contact)
4. Some interesting data about the RFU adapter can be found in Pokemon Games, see the [FireRed Decompilation](https://github.com/pret/pokefirered/blob/49ea462d7f421e75a76b25d7e85c92494c0a9798/include/librfu.h#L44) for more information.

View File

@ -62,7 +62,7 @@
#define LINK_CABLE_BIT_GENERAL_PURPOSE_HIGH 15
#define LINK_CABLE_BARRIER asm volatile("" ::: "memory")
static volatile char LINK_CABLE_VERSION[] = "LinkCable/v6.0.0";
static volatile char LINK_CABLE_VERSION[] = "LinkCable/v6.0.1";
void LINK_CABLE_ISR_VBLANK();
void LINK_CABLE_ISR_SERIAL();

View File

@ -58,7 +58,7 @@
return error(FAILURE_DURING_HANDSHAKE);
static volatile char LINK_CABLE_MULTIBOOT_VERSION[] =
"LinkCableMultiboot/v6.0.0";
"LinkCableMultiboot/v6.0.1";
const u8 LINK_CABLE_MULTIBOOT_CLIENT_IDS[] = {0b0010, 0b0100, 0b1000};

View File

@ -35,7 +35,7 @@
else \
REG &= ~(1 << BIT);
static volatile char LINK_GPIO_VERSION[] = "LinkGPIO/v6.0.0";
static volatile char LINK_GPIO_VERSION[] = "LinkGPIO/v6.0.1";
const u8 LINK_GPIO_DATA_BITS[] = {2, 3, 1, 0};
const u8 LINK_GPIO_DIRECTION_BITS[] = {6, 7, 5, 4};

View File

@ -49,7 +49,7 @@
#define LINK_SPI_BIT_GENERAL_PURPOSE_LOW 14
#define LINK_SPI_BIT_GENERAL_PURPOSE_HIGH 15
static volatile char LINK_SPI_VERSION[] = "LinkSPI/v6.0.0";
static volatile char LINK_SPI_VERSION[] = "LinkSPI/v6.0.1";
class LinkSPI {
public:

View File

@ -54,7 +54,7 @@
#define LINK_UNIVERSAL_SERVE_WAIT_FRAMES 60
#define LINK_UNIVERSAL_SERVE_WAIT_FRAMES_RANDOM 30
static volatile char LINK_UNIVERSAL_VERSION[] = "LinkUniversal/v6.0.0";
static volatile char LINK_UNIVERSAL_VERSION[] = "LinkUniversal/v6.0.1";
void LINK_UNIVERSAL_ISR_VBLANK();
void LINK_UNIVERSAL_ISR_SERIAL();

View File

@ -64,9 +64,6 @@
// Buffer size
#define LINK_WIRELESS_QUEUE_SIZE 30
// Max command response length
#define LINK_WIRELESS_MAX_COMMAND_RESPONSE_LENGTH 30
// Max server transfer length
#define LINK_WIRELESS_MAX_SERVER_TRANSFER_LENGTH 20
@ -96,6 +93,7 @@
#define LINK_WIRELESS_TRANSFER_WAIT 15
#define LINK_WIRELESS_BROADCAST_SEARCH_WAIT_FRAMES 60
#define LINK_WIRELESS_CMD_TIMEOUT 100
#define LINK_WIRELESS_MAX_COMMAND_RESPONSE_LENGTH 30
#define LINK_WIRELESS_MAX_GAME_ID 0x7fff
#define LINK_WIRELESS_MAX_GAME_NAME_LENGTH 14
#define LINK_WIRELESS_MAX_USER_NAME_LENGTH 8
@ -140,7 +138,7 @@
if (!reset()) \
return false;
static volatile char LINK_WIRELESS_VERSION[] = "LinkWireless/v6.0.0";
static volatile char LINK_WIRELESS_VERSION[] = "LinkWireless/v6.0.1";
void LINK_WIRELESS_ISR_VBLANK();
void LINK_WIRELESS_ISR_SERIAL();