diff --git a/examples/LinkCard_demo/#loader/README.md b/examples/LinkCard_demo/#loader/README.md index 5c32378..dfa592f 100644 --- a/examples/LinkCard_demo/#loader/README.md +++ b/examples/LinkCard_demo/#loader/README.md @@ -4,8 +4,10 @@ This loader scans cards with the **e-Reader** (or in Japan, the **e-Reader+**) a ## Required tools for compiling +- Windows - _devkitARM_ with _GCC 14.1.0_ -- `nevpk.exe`, `neflmake.exe`, `nedcmake.exe`, `nedcenc.exe`, `raw2bmp.exe` +- `nedcmake.exe`, `nevpk.exe`, `nedcenc.exe`, `raw2bmp.exe`, `neflmake.exe` + * Cross-platform versions are available [here](https://github.com/AkBKukU/e-reader-dev) and [here](https://github.com/breadbored/nedclib) - _Git Bash_ or some way to run Unix commands like `dd` ## Compile @@ -28,4 +30,9 @@ nedcmake -i testcard.txt -o testcard.bin -type 3 -bin -raw -fill 1 -region 1 -na # region 2 = JAP ``` +## Convert cards to BMP for distribution +```bash +raw2bmp -i testcard.bin-01.raw -o testcard.bin-01 +# generates testcard.bin-01.bmp +``` diff --git a/examples/LinkCard_demo/#loader/src/protocol.h b/examples/LinkCard_demo/#loader/src/protocol.h index ec9c6c3..6f36f82 100644 --- a/examples/LinkCard_demo/#loader/src/protocol.h +++ b/examples/LinkCard_demo/#loader/src/protocol.h @@ -1,16 +1,15 @@ #ifndef PROTOCOL_H #define PROTOCOL_H -#include "def.h" - // This protocol is only meant to be used by homebrew games using // gba-link-connection's LinkCard library and its loader. It's highly inspired -// by `4-e`, but not compatible with it since SMA4 sends the cards from offset -// `0x72`, and this sends them from offset `0x4E` (no-individual-titles format). -// That said, you could make it compatible by changing `CARD_OFFSET` and -// `CARD_SIZE` to the commented values. +// by `4-e`, but not compatible with it since SMA4 cards start from offset +// `0x72`, while cards generated with `nedcmake v1.4` start from offset `0x4e`. +// Both card formats are valid, though. That said, you could make it compatible +// by changing `CARD_OFFSET` and `CARD_SIZE` to the commented values, or by just +// recompiling `4-e` to skip 0x4e bytes (no pun intended) instead of 0x72. -#define CARD_OFFSET /*0x72*/ 0x4E +#define CARD_OFFSET /*0x72*/ 0x4e #define CARD_SIZE /*2112*/ 2076 #define HANDSHAKE_1 0xfbfb diff --git a/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin-01.bmp b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin-01.bmp new file mode 100644 index 0000000..8835f22 Binary files /dev/null and b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin-01.bmp differ diff --git a/examples/LinkCard_demo/#testcards/bin-raw/testcard.jap.bin-01.raw b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin-01.raw similarity index 100% rename from examples/LinkCard_demo/#testcards/bin-raw/testcard.jap.bin-01.raw rename to examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin-01.raw diff --git a/examples/LinkCard_demo/#testcards/bin-raw/testcard.jap.bin.01.bin b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin.01.bin similarity index 100% rename from examples/LinkCard_demo/#testcards/bin-raw/testcard.jap.bin.01.bin rename to examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.jap.bin.01.bin diff --git a/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin-01.bmp b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin-01.bmp new file mode 100644 index 0000000..f6421a9 Binary files /dev/null and b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin-01.bmp differ diff --git a/examples/LinkCard_demo/#testcards/bin-raw/testcard.usa.bin-01.raw b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin-01.raw similarity index 100% rename from examples/LinkCard_demo/#testcards/bin-raw/testcard.usa.bin-01.raw rename to examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin-01.raw diff --git a/examples/LinkCard_demo/#testcards/bin-raw/testcard.usa.bin.01.bin b/examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin.01.bin similarity index 100% rename from examples/LinkCard_demo/#testcards/bin-raw/testcard.usa.bin.01.bin rename to examples/LinkCard_demo/#testcards/bin-raw-bmp/testcard.usa.bin.01.bin