summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/nds/tools/ndstool/include
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/arm/nds/tools/ndstool/include')
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_homebrew.h14
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_nintendo.h14
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/banner.h19
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/bigint.h11
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/crc.h175
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/default_icon.h14
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/encryption.h10
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/header.h97
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/hook.h1
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/little.h111
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/loadme.h14
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/logo.h1
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndscreate.h5
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndsextract.h3
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstool.h65
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstree.h60
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/overlay.h17
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme.h1
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_sram.h14
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd1.h55
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd2.h58
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/raster.h56
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/sha1.h70
-rw-r--r--c/src/lib/libbsp/arm/nds/tools/ndstool/include/types.h13
24 files changed, 0 insertions, 898 deletions
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_homebrew.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_homebrew.h
deleted file mode 100644
index 268b55ffcb..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_homebrew.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- This file was autogenerated by raw2c.
-Visit http://www.devkitpro.org
-*/
-
-//---------------------------------------------------------------------------------
-#ifndef _arm7_sha1_homebrew_h_
-#define _arm7_sha1_homebrew_h_
-//---------------------------------------------------------------------------------
-extern const unsigned char arm7_sha1_homebrew[];
-extern const int arm7_sha1_homebrew_size;
-//---------------------------------------------------------------------------------
-#endif //_arm7_sha1_homebrew_h_
-//---------------------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_nintendo.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_nintendo.h
deleted file mode 100644
index 2b44b7a1ca..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/arm7_sha1_nintendo.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- This file was autogenerated by raw2c.
-Visit http://www.devkitpro.org
-*/
-
-//---------------------------------------------------------------------------------
-#ifndef _arm7_sha1_nintendo_h_
-#define _arm7_sha1_nintendo_h_
-//---------------------------------------------------------------------------------
-extern const unsigned char arm7_sha1_nintendo[];
-extern const int arm7_sha1_nintendo_size;
-//---------------------------------------------------------------------------------
-#endif //_arm7_sha1_nintendo_h_
-//---------------------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/banner.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/banner.h
deleted file mode 100644
index e880636bdf..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/banner.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma pack(1)
-
-struct Banner
-{
- unsigned_short version;
- unsigned_short crc;
- unsigned char reserved[28];
- unsigned char tile_data[4][4][8][4];
- unsigned_short palette[16];
- unsigned_short title[6][128]; // max. 3 lines. seperated by linefeed character
-};
-
-#pragma pack()
-
-extern const char *bannerLanguages[];
-
-int InsertTitleString(char *String, FILE *file);
-unsigned short CalcBannerCRC(Banner &banner);
-void IconFromBMP();
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/bigint.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/bigint.h
deleted file mode 100644
index 27d01a26b8..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/bigint.h
+++ /dev/null
@@ -1,11 +0,0 @@
-struct BigInt
-{
- unsigned char data[129*2]; // 128*2 doesn't seem to be enough for 1024 bit keys
-
- int Sub(BigInt &a, BigInt &b, int b_shift);
- void MulMod(BigInt &a, BigInt &b, BigInt &m);
- void PowMod(BigInt &n, BigInt &m);
- void print();
- void Set(unsigned char *data, unsigned int length);
- void Get(unsigned char *data, unsigned int length);
-};
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/crc.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/crc.h
deleted file mode 100644
index 9dbbc71e2b..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/crc.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- Cyclic Redundancy Code (CRC) functions
- by Rafael Vuijk (aka DarkFader)
-*/
-
-#ifndef __CRC_H
-#define __CRC_H
-
-//#include "little.h" // FixCrc is not yet big endian compatible
-
-/*
- * Data
- */
-extern unsigned short ccitt16tab[];
-extern unsigned short crc16tab[];
-extern unsigned long crc32tab[];
-
-/*
- * Defines
- */
-#define CRC_TEMPLATE template <typename CrcType, CrcType *crcTable>
-
-/*
- * CalcCcitt
- * Does not perform final inversion.
- */
-#define CalcCcitt_ CalcCcitt<CrcType, crcTable>
-#define CalcCcitt16 CalcCcitt<typeof(*ccitt16tab), ccitt16tab>
-CRC_TEMPLATE inline CrcType CalcCcitt(unsigned char *data, unsigned int length, CrcType crc = (CrcType)0)
-{
- for (unsigned int i=0; i<length; i++)
- {
- crc = (crc << 8) ^ crcTable[(crc >> 8) ^ data[i]];
- }
- return crc;
-}
-
-/*
- * CalcCrc
- * Does not perform final inversion.
- */
-#define CalcCrc_ CalcCrc<CrcType, crcTable>
-#define CalcCrc16 CalcCrc<typeof(*crc16tab), crc16tab>
-#define CalcCrc32 CalcCrc<typeof(*crc32tab), crc32tab>
-CRC_TEMPLATE inline CrcType CalcCrc(unsigned char *data, unsigned int length, CrcType crc = (CrcType)~0)
-{
- for (unsigned int i=0; i<length; i++)
- {
- crc = (crc >> 8) ^ crcTable[(crc ^ data[i]) & 0xFF];
- }
- return crc;
-}
-
-/*
- * FCalcCrc
- * Does not perform final inversion.
- */
-#define FCalcCrc_ FCalcCrc<CrcType, crcTable>
-#define FCalcCrc16 FCalcCrc<typeof(*crc16tab), crc16tab>
-#define FCalcCrc32 FCalcCrc<typeof(*crc32tab), crc32tab>
-CRC_TEMPLATE inline CrcType FCalcCrc(FILE *f, unsigned int offset, unsigned int length, CrcType crc = (CrcType)~0)
-{
- fseek(f, offset, SEEK_SET);
- for (unsigned int i=0; i<length; i++)
- {
- crc = (crc >> 8) ^ crcTable[(crc ^ fgetc(f)) & 0xFF];
- }
- return crc;
-}
-
-/*
- * RevCrc
- * Reverse table lookup.
- */
-#define RevCrc_ RevCrc<CrcType, crcTable>
-CRC_TEMPLATE inline unsigned char RevCrc(unsigned char x, CrcType *value = 0)
-{
- for (int y=0; y<256; y++)
- {
- if ((crcTable[y] >> (8*sizeof(CrcType)-8)) == x)
- {
- if (value) *value = crcTable[y];
- return y;
- }
- }
- return 0;
-}
-
-/*
- * FixCrc
- */
-#define FixCrc_ FixCrc<CrcType, crcTable>
-#define FixCrc16 FixCrc<typeof(*crc16tab), crc16tab>
-#define FixCrc32 FixCrc<typeof(*crc32tab), crc32tab>
-CRC_TEMPLATE void FixCrc
-(
- unsigned char *data, // data to be patched
- unsigned int patch_offset, unsigned char *patch_data, unsigned int patch_length, // patch data
- unsigned int fix_offset = 0, // position to write the fix. by default, it is immediately after the patched data
- CrcType initial_crc = (CrcType)~0 // useful when manually calculating leading data
-)
-{
- if (!fix_offset) fix_offset = patch_offset + patch_length;
-
- // calculate CRC after leading data
- initial_crc = CalcCrc_(data, patch_offset, initial_crc);
-
- // calculate CRC before fix
- unsigned char buf[2*sizeof(CrcType)];
- CrcType crc_before_fix = CalcCrc_(data + patch_offset, fix_offset - patch_offset);
- *(CrcType *)(buf + 0) = crc_before_fix;
-
- // patch
- memcpy(data + patch_offset, patch_data, patch_length);
-
- // calculate CRC after unfixed
- CrcType crc_after_unfix = CalcCrc_(data + patch_offset, fix_offset - patch_offset + sizeof(CrcType));
- *(CrcType *)(buf + sizeof(CrcType)) = crc_after_unfix;
-
- // fix it
- for (int i=sizeof(CrcType); i>=1; i--)
- {
- CrcType value;
- unsigned char index = RevCrc_(buf[i + sizeof(CrcType) - 1], &value);
- *(CrcType *)(buf + i) ^= value;
- buf[i - 1] ^= index;
- }
- memcpy(data + fix_offset, buf, sizeof(CrcType));
-}
-
-/*
- * FFixCrc
- */
-#define FFixCrc_ FFixCrc<CrcType, crcTable>
-#define FFixCrc16 FFixCrc<typeof(*crc16tab), crc16tab>
-#define FFixCrc32 FFixCrc<typeof(*crc32tab), crc32tab>
-CRC_TEMPLATE void FFixCrc
-(
- FILE *f, // file to be patched
- unsigned int patch_offset, unsigned char *patch_data, unsigned int patch_length, // patch data
- unsigned int fix_offset = 0, // position to write the fix. by default, it is immediately after the patched data
- CrcType initial_crc = (CrcType)~0 // useful when manually calculating leading data
-)
-{
- if (!fix_offset) fix_offset = patch_offset + patch_length;
-
- // calculate CRC after leading data
- initial_crc = FCalcCrc_(f, 0, patch_offset, initial_crc);
-
- // calculate CRC before fix
- unsigned char buf[2*sizeof(CrcType)];
- CrcType crc_before_fix = FCalcCrc_(f, patch_offset, fix_offset - patch_offset);
- *(CrcType *)(buf + 0) = crc_before_fix;
-
- // patch
- fseek(f, patch_offset, SEEK_SET);
- fwrite(patch_data, 1, patch_length, f);
-
- // calculate CRC after unfixed
- CrcType crc_after_unfix = FCalcCrc_(f, patch_offset, fix_offset - patch_offset + sizeof(CrcType));
- *(CrcType *)(buf + sizeof(CrcType)) = crc_after_unfix;
-
- // fix it
- for (int i=sizeof(CrcType); i>=1; i--)
- {
- CrcType value;
- unsigned char index = RevCrc_(buf[i + sizeof(CrcType) - 1], &value);
- *(CrcType *)(buf + i) ^= value;
- buf[i - 1] ^= index;
- }
- fseek(f, fix_offset, SEEK_SET);
- fwrite(buf, sizeof(CrcType), 1, f);
-}
-
-#endif // __CRC_H
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/default_icon.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/default_icon.h
deleted file mode 100644
index 87894e07c6..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/default_icon.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- This file was autogenerated by raw2c.
-Visit http://www.devkitpro.org
-*/
-
-//---------------------------------------------------------------------------------
-#ifndef _default_icon_h_
-#define _default_icon_h_
-//---------------------------------------------------------------------------------
-extern const unsigned char default_icon[];
-extern const int default_icon_size;
-//---------------------------------------------------------------------------------
-#endif //_default_icon_h_
-//---------------------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/encryption.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/encryption.h
deleted file mode 100644
index c34e3fb553..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/encryption.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __ENCRYPTION_H
-#define __ENCRYPTION_H
-
-#include "types.h"
-
-extern void EnDecryptSecureArea(char *ndsfilename, char endecrypt_option);
-extern void encrypt_arm9(u32 cardheader_gamecode, unsigned char *data);
-extern void decrypt_arm9(u32 cardheader_gamecode, unsigned char *data);
-
-#endif // __ENCRYPTION_H
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/header.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/header.h
deleted file mode 100644
index f6bbfcac64..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/header.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#pragma pack(1)
-
-struct Header
-{
- char title[0xC];
- char gamecode[0x4];
- char makercode[2];
- unsigned char unitcode; // product code. 0 = Nintendo DS
- unsigned char devicetype; // device code. 0 = normal
- unsigned char devicecap; // device size. (1<<n Mbit)
- unsigned char reserved1[0x9]; // 0x015..0x01D
- unsigned char romversion;
- unsigned char reserved2; // 0x01F
- unsigned_int arm9_rom_offset; // points to libsyscall and rest of ARM9 binary
- unsigned_int arm9_entry_address;
- unsigned_int arm9_ram_address;
- unsigned_int arm9_size;
- unsigned_int arm7_rom_offset;
- unsigned_int arm7_entry_address;
- unsigned_int arm7_ram_address;
- unsigned_int arm7_size;
- unsigned_int fnt_offset;
- unsigned_int fnt_size;
- unsigned_int fat_offset;
- unsigned_int fat_size;
- unsigned_int arm9_overlay_offset;
- unsigned_int arm9_overlay_size;
- unsigned_int arm7_overlay_offset;
- unsigned_int arm7_overlay_size;
- unsigned_int rom_control_info1; // 0x00416657 for OneTimePROM
- unsigned_int rom_control_info2; // 0x081808F8 for OneTimePROM
- unsigned_int banner_offset;
- unsigned_short secure_area_crc;
- unsigned_short rom_control_info3; // 0x0D7E for OneTimePROM
- unsigned_int offset_0x70; // magic1 (64 bit encrypted magic code to disable LFSR)
- unsigned_int offset_0x74; // magic2
- unsigned_int offset_0x78; // unique ID for homebrew
- unsigned_int offset_0x7C; // unique ID for homebrew
- unsigned_int application_end_offset; // rom size
- unsigned_int rom_header_size;
- unsigned_int offset_0x88; // reserved... ?
- unsigned_int offset_0x8C;
-
- // reserved
- unsigned_int offset_0x90;
- unsigned_int offset_0x94;
- unsigned_int offset_0x98;
- unsigned_int offset_0x9C;
- unsigned_int offset_0xA0;
- unsigned_int offset_0xA4;
- unsigned_int offset_0xA8;
- unsigned_int offset_0xAC;
- unsigned_int offset_0xB0;
- unsigned_int offset_0xB4;
- unsigned_int offset_0xB8;
- unsigned_int offset_0xBC;
-
- unsigned char logo[156]; // character data
- unsigned_short logo_crc;
- unsigned_short header_crc;
-
- // 0x160..0x17F reserved
- unsigned_int offset_0x160;
- unsigned_int offset_0x164;
- unsigned_int offset_0x168;
- unsigned_int offset_0x16C;
- unsigned char zero[0x90];
-};
-
-#pragma pack()
-
-
-struct Country
-{
- const char countrycode;
- const char *name;
-};
-
-struct Maker
-{
- const char *makercode;
- const char *name;
-};
-
-extern Country countries[];
-extern int NumCountries;
-
-extern Maker makers[];
-extern int NumMakers;
-
-unsigned short CalcHeaderCRC(Header &header);
-unsigned short CalcLogoCRC(Header &header);
-void FixHeaderCRC(char *ndsfilename);
-void ShowInfo(char *ndsfilename);
-int HashAndCompareWithList(char *filename, unsigned char sha1[]);
-int DetectRomType();
-unsigned short CalcSecureAreaCRC(bool encrypt);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/hook.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/hook.h
deleted file mode 100644
index 7004bdd067..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/hook.h
+++ /dev/null
@@ -1 +0,0 @@
-void Hook(char *ndsfilename, char *arm7filename);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/little.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/little.h
deleted file mode 100644
index 06ab14acea..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/little.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#pragma pack(1)
-
-#include "types.h"
-
-#ifndef BYTE_ORDER
- #error "BYTE_ORDER not defined"
-#endif
-
-#if BYTE_ORDER != BIG_ENDIAN
- #define NOSWAP
-#endif
-
-//template <typename T> struct Blah32
-//{
-// unsigned T i;
-// #ifdef NOSWAP
-// operator T () { return i; }
-// T & operator = (T i) { return this->i = i; }
-// #else
-// operator T () { return i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
-// T & operator = (T i) { return this->i = i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
-// #endif
-// Blah() {}
-// Blah(T i) { *this = i; }
-//};
-
-struct unsigned_int
-{
- unsigned int i;
- #ifdef NOSWAP
- operator unsigned int () { return i; }
- unsigned int & operator = (unsigned int i) { return this->i = i; }
- #else
- operator unsigned int () { return i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- unsigned int & operator = (unsigned int i) { return this->i = i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- #endif
- unsigned_int() {}
- unsigned_int(unsigned int i) { *this = i; }
-};
-
-struct unsigned_long
-{
- unsigned long i;
- #ifdef NOSWAP
- operator unsigned long () { return i; }
- unsigned long & operator = (unsigned long i) { return this->i = i; }
- #else
- operator unsigned long () { return i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- unsigned long & operator = (unsigned long i) { return this->i = i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- #endif
- unsigned_long() {}
- unsigned_long(unsigned long i) { *this = i; }
-};
-
-struct unsigned_short
-{
- unsigned short i;
- #ifdef NOSWAP
- operator unsigned short () { return i; }
- unsigned short & operator = (unsigned short i) { return this->i = i; }
- #else
- operator unsigned short () { return i>>8 | i<<8; }
- unsigned short & operator = (unsigned short i) { return this->i = i>>8 | i<<8; }
- #endif
- unsigned_short() {}
- unsigned_short(unsigned short i) { *this = i; }
-};
-
-struct signed_int
-{
- unsigned int i;
- #ifdef NOSWAP
- operator signed int () { return i; }
- signed int & operator = (signed int i) { return (signed int &)this->i = i; }
- #else
- operator signed int () { return i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- signed int & operator = (signed int i) { return (signed int &)this->i = i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- #endif
- signed_int() {}
- signed_int(signed int i) { *this = i; }
-};
-
-struct signed_long
-{
- unsigned long i;
- #ifdef NOSWAP
- operator signed long () { return i; }
- signed long & operator = (signed long i) { return (signed long &)this->i = i; }
- #else
- operator signed long () { return i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- signed long & operator = (signed long i) { return (signed long &)this->i = i<<24 | i<<8&0xFF0000 | i>>8&0xFF00 | i>>24; }
- #endif
- signed_long() {}
- signed_long(signed long i) { *this = i; }
-};
-
-struct signed_short
-{
- unsigned short i;
- #ifdef NOSWAP
- operator signed short () { return i; }
- signed short & operator = (unsigned short i) { return (signed short &)this->i = i; }
- #else
- operator signed short () { return i>>8 | i<<8; }
- signed short & operator = (unsigned short i) { return (signed short &)this->i = i>>8 | i<<8; }
- #endif
- signed_short() {}
- signed_short(signed short i) { *this = i; }
-};
-
-#pragma pack()
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/loadme.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/loadme.h
deleted file mode 100644
index d73df9bd86..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/loadme.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- This file was autogenerated by raw2c.
-Visit http://www.devkitpro.org
-*/
-
-//---------------------------------------------------------------------------------
-#ifndef _loadme_h_
-#define _loadme_h_
-//---------------------------------------------------------------------------------
-extern const unsigned char loadme[];
-extern const int loadme_size;
-//---------------------------------------------------------------------------------
-#endif //_loadme_h_
-//---------------------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/logo.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/logo.h
deleted file mode 100644
index e01c2c4dfd..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/logo.h
+++ /dev/null
@@ -1 +0,0 @@
-int LogoConvert(unsigned char *srcp, unsigned char *dstp, unsigned char white);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndscreate.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndscreate.h
deleted file mode 100644
index 679adada47..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndscreate.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "ndstree.h"
-
-void AddFile(char *rootdir, char *prefix, char *entry_name, unsigned int file_id, unsigned int alignmask);
-void AddDirectory(TreeNode *node, char *prefix, unsigned int this_dir_id, unsigned int _parent_id, unsigned int alignmask);
-void Create();
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndsextract.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndsextract.h
deleted file mode 100644
index 5b30f56ff7..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndsextract.h
+++ /dev/null
@@ -1,3 +0,0 @@
-void ExtractFiles(char *ndsfilename);
-void ExtractOverlayFiles();
-void Extract(char *outfilename, bool indirect_offset, unsigned int offset, bool indirect_size, unsigned size, bool with_footer = false);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstool.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstool.h
deleted file mode 100644
index aae1ffdca8..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstool.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <fcntl.h>
-//#include <libelf.h>
-#include "little.h"
-#include "header.h"
-
-#define ROMTYPE_HOMEBREW 0
-#define ROMTYPE_MULTIBOOT 1
-#define ROMTYPE_NDSDUMPED 2 // decrypted secure area
-#define ROMTYPE_ENCRSECURE 3
-#define ROMTYPE_MASKROM 4 // unknown layout
-
-#define MAX_FILEMASKS 16
-
-enum { BANNER_BINARY, BANNER_IMAGE };
-
-extern unsigned int free_file_id;
-extern unsigned int file_end;
-
-extern unsigned int free_dir_id;
-extern unsigned int directory_count;
-extern unsigned int file_count;
-extern unsigned int total_name_size;
-
-extern unsigned int free_file_id;
-extern unsigned int _entry_start;
-extern unsigned int file_top;
-
-extern int verbose;
-extern Header header;
-extern FILE *fNDS;
-extern char *romlistfilename;
-extern char *filemasks[MAX_FILEMASKS];
-extern int filemask_num;
-extern char *ndsfilename;
-extern char *arm7filename;
-extern char *arm9filename;
-extern char *filerootdir;
-extern char *overlaydir;
-extern char *arm7ovltablefilename;
-extern char *arm9ovltablefilename;
-extern char *bannerfilename;
-extern char *bannertext;
-extern int bannertype;
-//extern bool compatibility;
-extern char *headerfilename_or_size;
-extern char *uniquefilename;
-extern char *logofilename;
-extern unsigned int arm9RamAddress;
-extern unsigned int arm7RamAddress;
-extern unsigned int arm9Entry;
-extern unsigned int arm7Entry;
-extern char *title;
-extern char *makercode;
-extern char *gamecode;
-extern int latency1;
-extern int latency2;
-extern int romversion;
-
-extern const char CompileDate[];
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstree.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstree.h
deleted file mode 100644
index 5d86e8cac7..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/ndstree.h
+++ /dev/null
@@ -1,60 +0,0 @@
-inline int cmp(const char *a, bool a_isdir, const char *b, bool b_isdir)
-{
- // oh... directory sort doesn't matter since we write out dir- and filenames seperately
- //if (a_isdir && !b_isdir) return -1;
- //if (b_isdir && !a_isdir) return +1;
- return strcmp(a, b);
-}
-
-struct TreeNode
-{
- unsigned int dir_id; // directory ID in case of directory entry
- const char *name; // file or directory name
- TreeNode *directory; // nonzero indicates directory. first directory node is a dummy
- TreeNode *prev, *next; // linked list
-
- TreeNode()
- {
- dir_id = 0;
- name = "";
- directory = 0;
- prev = next = 0;
- }
-
- // new entry in same directory
- TreeNode *New(const char *name, bool isdir)
- {
- TreeNode *newNode = new TreeNode();
- newNode->name = strdup(name);
-
- TreeNode *node = this;
-
- if (cmp(name, isdir, node->name, node->dir_id) < 0) // prev
- {
- while (cmp(name, isdir, node->name, node->dir_id) < 0)
- {
- if (node->prev)
- node = node->prev;
- else
- break; // insert after dummy node
- }
- }
- else
- {
- while (node->next && (cmp(name, isdir, node->next->name, node->next->dir_id) >= 0))
- {
- node = node->next;
- }
- }
-
- // insert after current node
- newNode->prev = node;
- newNode->next = node->next;
- if (node->next) node->next->prev = newNode;
- node->next = newNode;
-
- return newNode;
- }
-};
-
-TreeNode *ReadDirectory(TreeNode *node, char *path);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/overlay.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/overlay.h
deleted file mode 100644
index 56c5da7db0..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/overlay.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma pack(1)
-
-struct OverlayEntry
-{
- unsigned int id;
- unsigned int ram_address;
- unsigned int ram_size;
- unsigned int bss_size;
- unsigned int sinit_init;
- unsigned int sinit_init_end;
- unsigned int file_id;
- unsigned int reserved;
-};
-
-#pragma pack()
-
-#define OVERLAY_FMT "overlay_%04u.bin"
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme.h
deleted file mode 100644
index 7b612b9b85..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme.h
+++ /dev/null
@@ -1 +0,0 @@
-int PassMe(char *ndsfilename, char *vhdfilename, char *sramfilename);
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_sram.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_sram.h
deleted file mode 100644
index 2088c3741f..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_sram.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- This file was autogenerated by raw2c.
-Visit http://www.devkitpro.org
-*/
-
-//---------------------------------------------------------------------------------
-#ifndef _passme_sram_h_
-#define _passme_sram_h_
-//---------------------------------------------------------------------------------
-extern const unsigned char passme_sram[];
-extern const int passme_sram_size;
-//---------------------------------------------------------------------------------
-#endif //_passme_sram_h_
-//---------------------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd1.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd1.h
deleted file mode 100644
index 37d1c4c3c4..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd1.h
+++ /dev/null
@@ -1,55 +0,0 @@
-"-- standard libraries\n"
-"library IEEE;\n"
-"use IEEE.STD_LOGIC_1164.ALL;\n"
-"use IEEE.STD_LOGIC_ARITH.ALL;\n"
-"use IEEE.STD_LOGIC_UNSIGNED.ALL;\n"
-"\n"
-"entity PassMe is\n"
-"\tport\n"
-"\t(\n"
-"\t\tDSSLOT_CLK\t\t: in std_logic;\n"
-"\t\tDSSLOT_ROMCS\t: in std_logic;\n"
-"\t\tDSSLOT_RESET\t: in std_logic;\n"
-"\t\tDSSLOT_EEPCS\t: in std_logic;\n"
-"\t\tDSSLOT_IRQ\t\t: out std_logic;\n"
-"\t\tDSSLOT_IO\t\t: inout std_logic_vector(7 downto 0);\n"
-"\t\t\n"
-"\t\tDSCART_CLK\t\t: out std_logic;\n"
-"\t\tDSCART_ROMCS\t: out std_logic;\n"
-"\t\tDSCART_RESET\t: out std_logic;\n"
-"\t\tDSCART_EEPCS\t: out std_logic;\n"
-"\t\tDSCART_IRQ \t\t: in std_logic;\n"
-"\t\tDSCART_IO \t\t: inout std_logic_vector(7 downto 0);\n"
-"\t\t\n"
-"\t\tLED0 \t\t\t: out std_logic\n"
-"\t);\n"
-"end entity;\n"
-"\n"
-"architecture rtl of passme is\n"
-"\n"
-"\t-- removes Xilinx mapping errors\n"
-"\tattribute CLOCK_BUFFER : string;\n"
-"\tattribute CLOCK_BUFFER of DSSLOT_CLK: signal is \"ibuf\";\n"
-"\tattribute CLOCK_BUFFER of DSCART_CLK: signal is \"obuf\";\n"
-"\n"
-"\tsignal is_command\t\t: boolean;\n"
-"\tsignal cmddata_cnt \t\t: natural range 0 to 511;\t\t-- 8 + 504\n"
-"\tsignal patched_data\t\t: std_logic_vector(7 downto 0);\n"
-"\tsignal patch_en\t\t\t: boolean;\n"
-"\n"
-"begin\n"
-"\n"
-"\t-- direct passthrough\n"
-"\tDSCART_CLK <= DSSLOT_CLK;\n"
-"\tDSCART_ROMCS <= DSSLOT_ROMCS;\n"
-"\tDSCART_RESET <= DSSLOT_RESET;\n"
-"\tDSSLOT_IRQ <= DSCART_IRQ;\n"
-"\tDSCART_EEPCS <= DSSLOT_EEPCS;\n"
-"\n"
-"\t-- activity LED\n"
-"\tLED0 <= not DSSLOT_ROMCS;\n"
-"\n"
-"\t-- patch\n"
-"\tprocess (cmddata_cnt)\n"
-"\tbegin\n"
-"\t\tcase (cmddata_cnt - 8) is\n"
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd2.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd2.h
deleted file mode 100644
index 7b2f106d92..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/passme_vhd2.h
+++ /dev/null
@@ -1,58 +0,0 @@
-"\n"
-"\t\t\twhen others => \tpatched_data <= DSCART_IO;\n"
-"\t\tend case;\n"
-"\tend process;\n"
-"\n"
-"\t-- dataswitcher\n"
-"\tprocess (DSSLOT_RESET, DSSLOT_ROMCS, DSSLOT_EEPCS, DSSLOT_IO, DSCART_IO, patched_data)\n"
-"\tbegin\n"
-"\t\tDSSLOT_IO <= (others => 'Z');\t\t\t\t-- default is high impedance\n"
-"\t\tDSCART_IO <= (others => 'Z');\t\t\t\t-- default is high impedance\n"
-"\n"
-"\t\tif (DSSLOT_RESET='1') then\t\t\t\t\t-- if not reset\n"
-"\t\t\tif (DSSLOT_ROMCS='0') then\t\t\t\t-- ROM is selected\n"
-"\t\t\t\tif (is_command) then\t\t\t\t-- is command byte\n"
-"\t\t\t\t\tDSCART_IO <= DSSLOT_IO;\t\t\t-- from DS to cartridge\n"
-"\t\t\t\telse\t\t\t\t\t\t\t\t-- is data byte\n"
-"\t\t\t\t\tif (patch_en) then\t\t\t\t-- patch enabled\n"
-"\t\t\t\t\t\tDSSLOT_IO <= patched_data;\n"
-"\t\t\t\t\telse\n"
-"\t\t\t\t\t\tDSSLOT_IO <= DSCART_IO;\n"
-"\t\t\t\t\tend if;\n"
-"\t\t\t\tend if;\n"
-"\t\t\telsif (DSSLOT_EEPCS='0') then\t\t\t-- EEPROM is selected\n"
-"\t\t\t\tDSCART_IO(7) <= DSSLOT_IO(7);\t\t-- pass serial data\n"
-"\t\t\t\tDSSLOT_IO(6) <= DSCART_IO(6);\t\t-- pass serial data in opposite direction\n"
-"\t\t\tend if;\n"
-"\t\tend if;\n"
-"\tend process;\n"
-"\n"
-"\t-- patch_en\n"
-"\tprocess (DSSLOT_RESET, DSSLOT_CLK)\n"
-"\tbegin\n"
-"\t\tif (DSSLOT_RESET='0') then\n"
-"\t\t\tpatch_en <= true;\t\t\t\t\t\t-- patch header\n"
-"\t\telsif (rising_edge(DSSLOT_CLK)) then\n"
-"\t\t\tif (is_command) then\n"
-"\t\t\t\tif (DSCART_IO(5) = '1') then\t\t-- detect 3C command, assume other command bytes are 00\n"
-"\t\t\t\t\tpatch_en <= false;\t\t\t\t-- do not patch other data\n"
-"\t\t\t\tend if;\n"
-"\t\t\tend if;\n"
-"\t\tend if;\n"
-"\tend process;\n"
-"\n"
-"\t-- cmddata_cnt, is_command\n"
-"\tprocess (DSSLOT_ROMCS, DSSLOT_CLK)\n"
-"\tbegin\n"
-"\t\tif (DSSLOT_ROMCS='1') then\n"
-"\t\t\tcmddata_cnt <= 0;\t\t\t\t\t\t-- new transfer\n"
-"\t\t\tis_command <= true;\t\t\t\t\t\t-- start with command\n"
-"\t\telsif (rising_edge(DSSLOT_CLK)) then\n"
-"\t\t\tif (cmddata_cnt mod 8 = 7) then\n"
-"\t\t\t\tis_command <= false;\t\t\t\t-- next byte is data\n"
-"\t\t\tend if;\n"
-"\t\t\tcmddata_cnt <= cmddata_cnt + 1;\t\t\t-- next byte\n"
-"\t\tend if;\n"
-"\tend process;\n"
-"\n"
-"end architecture;\n"
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/raster.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/raster.h
deleted file mode 100644
index db929feafe..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/raster.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#pragma pack(2)
-
-typedef struct tagRGBQUAD
-{
- unsigned char rgbBlue;
- unsigned char rgbGreen;
- unsigned char rgbRed;
- unsigned char rgbReserved;
-} RGBQUAD;
-
-typedef struct tagBITMAPINFOHEADER
-{
- unsigned_int biSize;
- signed_int biWidth;
- signed_int biHeight;
- unsigned_short biPlanes;
- unsigned_short biBitCount;
- unsigned_int biCompression;
- unsigned_int biSizeImage;
- signed_int biXPelsPerMeter;
- signed_int biYPelsPerMeter;
- unsigned_int biClrUsed;
- unsigned_int biClrImportant;
-} BITMAPINFOHEADER;
-
-typedef struct tagBITMAPINFO
-{
- BITMAPINFOHEADER bmiHeader;
- RGBQUAD bmiColors[256];
-} BITMAPINFO, *PBITMAPINFO;
-
-typedef struct tagBITMAPFILEHEADER
-{
- unsigned char bfType[2];
- unsigned_int bfSize;
- unsigned_short bfReserved1;
- unsigned_short bfReserved2;
- unsigned_int bfOffBits;
-} BITMAPFILEHEADER, *PBITMAPFILEHEADER;
-
-#pragma pack()
-
-
-struct CRaster
-{
- unsigned int width, height;
- unsigned char *raster;
- RGBQUAD palette[256];
-
- int LoadBMP(char *filename);
-
- unsigned char * operator [] (unsigned int y)
- {
- return raster + y*width;
- }
-};
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/sha1.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/sha1.h
deleted file mode 100644
index 36d9fdadc0..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/sha1.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- ---------------------------------------------------------------------------
- Copyright (c) 2002, Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
- All rights reserved.
-
- LICENSE TERMS
-
- The free distribution and use of this software in both source and binary
- form is allowed (with or without changes) provided that:
-
- 1. distributions of this source code include the above copyright
- notice, this list of conditions and the following disclaimer;
-
- 2. distributions in binary form include the above copyright
- notice, this list of conditions and the following disclaimer
- in the documentation and/or other associated materials;
-
- 3. the copyright holder's name is not used to endorse products
- built using this software without specific written permission.
-
- ALTERNATIVELY, provided that this notice is retained in full, this product
- may be distributed under the terms of the GNU General Public License (GPL),
- in which case the provisions of the GPL apply INSTEAD OF those given above.
-
- DISCLAIMER
-
- This software is provided 'as is' with no explicit or implied warranties
- in respect of its properties, including, but not limited to, correctness
- and/or fitness for purpose.
- ---------------------------------------------------------------------------
-Issue Date: 30/11/2002
-*/
-
-#ifndef _SHA1_H
-#define _SHA1_H
-
-
-typedef unsigned int sha1_32t;
-
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-#define SHA1_BLOCK_SIZE 64
-#define SHA1_DIGEST_SIZE 20
-#define SHA2_GOOD 0
-#define SHA2_BAD 1
-
-/* type to hold the SHA256 context */
-
-typedef struct
-{ sha1_32t count[2];
- sha1_32t hash[5];
- sha1_32t wbuf[16];
-} sha1_ctx;
-
-void sha1_compile(sha1_ctx ctx[1]);
-
-void sha1_begin(sha1_ctx ctx[1]);
-void sha1_hash(const unsigned char data[], unsigned int len, sha1_ctx ctx[1]);
-void sha1_end(unsigned char hval[], sha1_ctx ctx[1]);
-void sha1(unsigned char hval[], const unsigned char data[], unsigned int len);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif // _SHA1_H
diff --git a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/types.h b/c/src/lib/libbsp/arm/nds/tools/ndstool/include/types.h
deleted file mode 100644
index 2736ec9844..0000000000
--- a/c/src/lib/libbsp/arm/nds/tools/ndstool/include/types.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __TYPES_H
-#define __TYPES_H
-
-typedef unsigned long long u64;
-typedef unsigned long u32;
-typedef unsigned short u16;
-typedef unsigned char u8;
-typedef signed long long s64;
-typedef signed long s32;
-typedef signed short s16;
-typedef signed char s8;
-
-#endif // __TYPES_H