GBA NDS FAT: Difference between revisions

From GameBrew
(Created page with "{{Infobox homebrew | title = GBA NDS FAT | image = | type = PC Utility | version = 2005-06-12 | licence = Mixed | author = chishm (Michael Chi...")
 
m (Text replacement - "Category:PC utilities for DS" to "Category:PC Utilities for DS")
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox homebrew
{{Infobox DS Homebrews
| title       = GBA NDS FAT
|title=GBA NDS FAT
| image       =  
|image=Ndspc2.png
| type       = PC Utility
|description=FAT filesystem library for the GBA and NDS.
| version     = 2005-06-12
|author=Chishm (Michael Chisholm)
| licence    = Mixed
|lastupdated=2006/03/03
| author      = chishm (Michael Chisholm)
|type=File Operation
| website     = http://chishm.drunkencoders.com/gba_nds_fat/index.html
|version=2006
| download    = Media:Gbandsfat20060303
|license=Mixed
| source      =
|download=https://dlhb.gamebrew.org/dshomebrew/gbandsfat.7z?k33p0fil35
|website=https://www.chishm.com/gba_nds_fat/index.html
}}
}}
A FAT filesystem library for the GBA and NDS. This allows developers to read and write to FAT filesystems on compact flash, MMC or SD cards, using one of the supported devices. Various people have helped me with this library, so check the readme for contributers.


FAT filesystem library for the GBA and NDS. Routines for reading a compact flash card using the GBA Movie Player or M3 devices. FAT12, FAT16 and FAT32 are supported.
'''Note:''' This has been deprecated in favour of libfat and is no longer in development. It is suggested to upgrade to libfat if you find gba_nds_fat is not for you.
 
This allows developers to read and write to FAT filesystems on compact flash, MMC or SD cards, using one of the supported devices. Various people have helped me with this library, so check the readme for contributers.


==User guide==
==User guide==
Fully supported:
===Supported device===
:GBA Movie Player CF
'''Fully supported:'''
:GBAMP
:Neoflash MK2 and MK3
:Neoflash MK2
:SuperCard CF
:SuperCard CF
:M3 Adapter CF
:M3 Adapter CF


Partially supported devices (read only, disabled by default):
GBA Movie Player CF <br>
:SuperCard SD
GBAMP <br>
:M3 Adapter SD
Neoflash MK2 and MK3 <br>
:EFA 2
Neoflash MK2 <br>
SuperCard CF <br>
SuperCard CF <br>
M3 Adapter CF <br>
M3 Adapter CF <br>


==Changelog==
'''Partially supported devices (read only, disabled by default):'''
'''2005-06-12'''
* Successfully reverse engineered the reading of compact flash cards


'''2005-06-13'''
SuperCard SD <br>
* Started work on file system driver
M3 Adapter SD <br>
EFA 2 <br>


'''2005-06-15'''
===Add support for DLDI===
* First release of file system driver
Download [https://www.chishm.com/DLDI/downloads/gba_nds_fat_io_dldi.zip backported IO_INTERFACE] and extract the contents to your gba_nds_fat source directory.
* File reading implemented


2005-06-24'''
Then add io_dldi as the first driver in the initialization list. In disc_io.c, under the line // Include known io-interfaces:, add the line:
* Second proper release
#include "io_dldi.h"
* All known bugs fixed
* File writing implemented
* File functions behave as expected
* Long filenames now work


'''2005-06-27'''
In the function bool disc_setGbaSlotInterface (void) add the following code before the line #ifdef SUPPORT_M3CF:
* Third release
// check if we have a valid DLDI driver
* Bug fix for small cards
active_interface = DLDI_GetInterface();
* FAT32 implemented
if (active_interface->fn_StartUp())
* Structure packing changed to be more compatible with non GCC compilers
{
    // set the DLDI driver as the default IO
    return true;
};


'''2005-07-12'''
In the function bool disc_setDsSlotInterface(void) add the same block of code just before the line #ifdef SUPPORT_NMMC. You should now be able to patch your application with DLDI files.
* Some bug fixes:
* Reading & writing files on FAT16 cards in the root directory is now fixed
* Accessing files near the end of FAT32 cards is now fixed


'''2005-07-13'''
==Changelog==
* Added option not to use DMA
'''2006/03/03'''
* Improved NMMC (MK2 / MK3) driver.
* Optimised LFNs into loops, thanks to dwedit.
* Optimised SuperCard SD CFC7, thanks to Cory1492.
* Added file attribute support.
* Added read only M3 SD support, thanks to SaTa and Moonlight. Disabled by default due to incompleteness.
* Fixed SuperCard SD reading, thanks to Loopy.
* Added EFA2 support, thanks to CyteX.


'''2005-07-14'''
'''2006/02/09'''
* Fixed FAT_fseek() buffer bug
* Fixed file and directory names starting with a dot ("."), or containing more than one dot.
* Added Neoflash MK2 / MK3 support, thanks to www.neoflash.com.
* Modified CF access routines to mask of the high byte of the status register, hopefully improving compatibility.
* Added disc caching, thanks to www.neoflash.com . It can only be enabled on the DS (not GBA) since it will consume 128KB of memory on the default setting. It is advisable to call FAT_FreeFiles() before shut down if caching is enabled, to flush any writes to disc.
* Added Supercard SD test code. It unfortunately doesn't work, and is disabled by default.
* Added FAT total size and type functions.
* Added file creation and modification functions. Disabled by default, see gba_nds_fat.h for more info.
* Fixed AddDirEntry bugs:
** Should no longer corrupt a directory when adding a new file.
** No longer puts garbage into a short file name's extension, thanks to 0xtob.
** Long file names with less than 12 characters now work, thanks to DragonMinded for pointing it out.


'''2005-07-24'''
'''2006/01/04'''
* Modified for use on the NDS
* Fixed FAT_fwrite when writing in cluster aligned chunks.
* When using it on the ARM9 you don't need to modify anything. On the ARM7 you will have to manually define NDS.


'''2005-08-05'''
'''2005/11/27'''
* Fixed FAT_fopen bug in append mode
* Fixed reading / writing of sector buffer in FAT_fread and FAT_fwrite, thanks to AgentQ.
* Fixed FAT_AddDirEntry bug that created orphen clusters if a directory entry was created that filled the end of a cluster


'''2005-08-07'''
'''2005/11/26'''
* Fixed FAT_CWD bug when changing to ".." from a 1st level subdirectory
* disc_io now has a HostType function, for determining what type of flash cart is inserted.


'''2005-08-21'''
'''2005/11/25'''
* Added FAT_GetFileSize - Returns the size of the last file accessed
* Clusters are now allocated as they are needed.
* Included automatic memory access control setting for the NDS
* Fixed seeking in append mode.
* Removed typedef of bool (not needed with libnds)
* Fixed adding of new directory entries.
* Added support for standard GBA Flash Carts, with SRAM.


'''2005-09-05''
'''2005/11/24'''
* Added FAT_GetFileCluster - Returns the start cluster of the last file accessed
* Fixed FAT_fseek bug, thanks to AgentQ.
* Added cluster allocation in FAT_fseek.
* FAT_fopen now checks for read only files.
* Added FAT_FindFirstFileLFN and FAT_FindNextFileLFN - Long file name versions of FAT_FindFirstFile and FAT_FindNextFile.


'''2005-09-10'''
'''2005/11/21'''
* Fixed problem with FAT_GetDirEntry not initialising the attrib of the returned DIR_ENT
* Removed EOF marking from FAT_fclose.
* FAT_fwrite now takes a const void* buffer. rather than a void* buffer.
* FAT_fwrite initialises new sectors before using them.


'''2005-09-15'''
'''2005/11/17'''
* Added ability to read multiple sectors at once
* Added FAT_fgets and FAT_fputs, with thanks again to MightyMax.
* Improved FAT_fread and FAT_fwrite functions
* Fixed bug when trying to create a file in a non-existant directory


'''2005-09-18'''
'''2005/11/15'''
* Fixed fseek bug with u32 offset instead of s32. Thanks goes to MightyMax for pointing that out
* FAT_fopen uses string functions for checking mode.


'''2005-09-21'''
'''2005/11/14'''
* Improved FAT_fseek speed
* Improved error handling in FAT_fread and FAT_fwrite.
* FAT_GetLongFilename uses strncpy instead of custom code.
* Added DMA support for use on NDS.


'''2005-10-12'''
'''2005/11/09'''
* Fixed long file name bug in FAT_GetDirEntry. Thanks goes to MoonLight for pointing it out
* Long directory entries are now fit amongst old ones, rather than at the end.
* Changed FAT_DeleteFile to FAT_remove and added ability to remove empty directories.
* Added FAT_mkdir to create a new directory.


'''2005-10-15'''
'''2005/11/08'''
* Changed file functions to use FAT_FILE* handles instead of int handles. Please change your code to reflect this change
* Added ability to use unaligned buffers, thanks to wwcube.
* Split source into hardware and disk level files and renamed the files. Include gba_nds_cf.h into your project instead of gbamp_cf.h
* No longer need to define NDS when compiling for the NDS (this is automatically done for you).
* Added M3 adapter support


'''2005-10-16'''
'''2005/11/07'''
* Added file time and date modification for writing, thanks to Joat
* Switched to memcpy instead of copy loops in fread and fwrite.


'''2005-10-17'''
'''2005/11/06'''
* Fixed FAT_fseek when trying to SEEK_END, thanks to MoonLight
* Added FAT12 support and fixed FAT buffer bugs.
* Added FAT_FileExists - returns FT_NONE if no file exists, FT_DIR or FT_FILE if it does.
* Completely changed the hardware interface, with a big thanks to MightyMax for doing most of the work.
* Added SuperCard CF support.


'''2005-10-31'''
'''2005/10/31'''
* Changed FAT_CWD to FAT_chdir
* Changed FAT_CWD to FAT_chdir.
* FAT_ftell now returns u32 instead of long int
* FAT_ftell now returns u32 instead of long int.


'''2005-11-06'''
'''2005/10/17'''
* Added FAT12 support and fixed FAT buffer bugs
* Fixed FAT_fseek when trying to SEEK_END, thanks to MoonLight.
* Added FAT_FileExists - returns FT_NONE if no file exists, FT_DIR or FT_FILE if it does
* Completely changed the hardware interface, with a big thanks to MightyMax for doing most of the work
* Added SuperCard CF support


'''2005-11-07'''
'''2005/10/16'''
* Switched to memcpy instead of copy loops in fread and fwrite
* Added file time and date modification for writing, thanks to Joat.


'''2005-11-08'''
'''2005/10/15'''
* Added ability to use unaligned buffers, thanks to wwcube
* Changed file functions to use FAT_FILE* handles instead of int handles. Please change your code to reflect this change.
* No longer need to define NDS when compiling for the NDS (this is automatically done for you)
* Split source into hardware and disk level files and renamed the files. Include gba_nds_cf.h into your project instead of gbamp_cf.h.
* Added M3 adapter support.


'''2005-11-09'''
'''2005/10/12'''
* Long directory entries are now fit amongst old ones, rather than at the end
* Fixed long file name bug in FAT_GetDirEntry. Thanks goes to MoonLight for pointing it out.
* Changed FAT_DeleteFile to FAT_remove and added ability to remove empty directories
* Added FAT_mkdir to create a new directory


'''2005-11-14'''
'''2005/09/21'''
* Improved error handling in FAT_fread and FAT_fwrite
* Improved FAT_fseek speed.
* FAT_GetLongFilename uses strncpy instead of custom code
* Added DMA support for use on NDS


'''2005-11-15'''
'''2005/09/18'''
* FAT_fopen uses string functions for checking mode
* Fixed fseek bug with u32 offset instead of s32. Thanks goes to MightyMax for pointing that out.


'''2005-11-17'''
'''2005/09/15'''
* Added FAT_fgets and FAT_fputs, with thanks again to MightyMax
* Added ability to read multiple sectors at once.
* Improved FAT_fread and FAT_fwrite functions.
* Fixed bug when trying to create a file in a non-existant directory.


'''2005-11-21'''
'''2005/09/10'''
* Removed EOF marking from FAT_fclose
* Fixed problem with FAT_GetDirEntry not initialising the attrib of the returned DIR_ENT.
* FAT_fwrite now takes a const void* buffer. rather than a void* buffer
* FAT_fwrite initialises new sectors before using them


'''2005-11-24'''
'''2005/09/05''
* Fixed FAT_fseek bug, thanks to AgentQ
* Added FAT_GetFileCluster - Returns the start cluster of the last file accessed.
* Added cluster allocation in FAT_fseek
* FAT_fopen now checks for read only files
* Added FAT_FindFirstFileLFN and FAT_FindNextFileLFN - Long file name versions of FAT_FindFirstFile and FAT_FindNextFile


'''2005-11-25'''
'''2005/08/21'''
* Clusters are now allocated as they are needed.
* Added FAT_GetFileSize - Returns the size of the last file accessed.
* Fixed seeking in append mode
* Included automatic memory access control setting for the NDS.
* Fixed adding of new directory entries
* Removed typedef of bool (not needed with libnds).
* Added support for standard GBA Flash Carts, with SRAM


'''2005-11-26'''
'''2005/08/07'''
* disc_io now has a HostType function, for determining what type of flash cart is inserted.
* Fixed FAT_CWD bug when changing to ".." from a 1st level subdirectory.


'''2005-11-27'''
'''2005/08/05'''
* Fixed reading / writing of sector buffer in FAT_fread and FAT_fwrite, thanks to AgentQ
* Fixed FAT_fopen bug in append mode.
* Fixed FAT_AddDirEntry bug that created orphen clusters if a directory entry was created that filled the end of a cluster.


'''2006-01-04'''
'''2005/07/24'''
* Fixed FAT_fwrite when writing in cluster aligned chunks
* Modified for use on the NDS.
* When using it on the ARM9 you don't need to modify anything. On the ARM7 you will have to manually define NDS.


'''2006-02-09'''
'''2005/07/14'''
* Fixed file and directory names starting with a dot ("."), or containing more than one dot
* Fixed FAT_fseek() buffer bug.
* Added Neoflash MK2 / MK3 support, thanks to www.neoflash.com
* Modified CF access routines to mask of the high byte of the status register, hopefully improving compatibility
* Added disc caching, thanks to www.neoflash.com . It can only be enabled on the DS (not GBA) since it will consume 128KB of memory on the default setting. It is advisable to call FAT_FreeFiles() before shut down if caching is enabled, to flush any writes to disc
* Added Supercard SD test code. It unfortunately doesn't work, and is disabled by default
* Added FAT total size and type functions
* Added file creation and modification functions. Disabled by default, see gba_nds_fat.h for more info
* Fixed AddDirEntry bugs:
* should no longer corrupt a directory when adding a new file
* no longer puts garbage into a short file name's extension, thanks to 0xtob
* long file names with less than 12 characters now work, thanks to DragonMinded for pointing it out


'''2006-03-03'''
'''2005/07/13'''
* Improved NMMC (MK2 / MK3) driver
* Added option not to use DMA.
* Optimised LFNs into loops, thanks to dwedit
* Optimised SuperCard SD CFC7, thanks to Cory1492
* Added file attribute support
* Added read only M3 SD support, thanks to SaTa and Moonlight. Disabled by default due to incompleteness
* Fixed SuperCard SD reading, thanks to Loopy
* Added EFA2 support, thanks to CyteX


==Credits==
'''2005/07/12'''
FAT_NextCluster was based on routines in fat.c, which is part of avrlib by Pascal Stang.
* Some bug fixes:
** Reading & writing files on FAT16 cards in the root directory is now fixed.
** Accessing files near the end of FAT32 cards is now fixed.


Darkfader helped with low level CF reading and writing.
'''2005/06/27'''
* Third release.
* Bug fix for small cards.
* FAT32 implemented.
* Structure packing changed to be more compatible with non GCC compilers.


MightyMax added support for the M3.
'''2005/06/24'''
* Second proper release.
* All known bugs fixed.
* File writing implemented.
* File functions behave as expected.
* Long filenames now work.


MightyMax also gave me a new hardware interface.
'''2005/06/15'''
* First release of file system driver.
* File reading implemented.


Thanks Tepples for answers to my questions.
'''2005/06/13'''
* Started work on file system driver.


The author of maverick-os for the [http://www.maverick-os.dk/FileSystemFormats/FAT16_FileSystem.html documentation] about the FAT16 file system.
'''2005/06/12'''
* Successfully reverse engineered the reading of compact flash cards.


CF routines were modified with help from Darkfader.
==Credits==
 
* FAT_NextCluster was based on routines in fat.c, which is part of avrlib by Pascal Stang.
Dwedit was very helpful in discovering bugs.
* Darkfader helped with low level CF reading and writing.
 
* MightyMax added support for the M3.
SaTa was the first to add automatic memory access control settings.
* MightyMax also provided a new hardware interface.
 
* Thanks Tepples for answering questions.
MoonLight came up with the idea of getting the size of files.
* The author of maverick-os for the [http://www.maverick-os.dk/FileSystemFormats/FAT16_FileSystem.html documentation] about the FAT16 file system.
 
* CF routines were modified with help from Darkfader.
MightyMax has helped with fseek.
* Dwedit was very helpful in discovering bugs.
 
* SaTa was the first to add automatic memory access control settings.
Joat provided system time and date functions.
* MoonLight came up with the idea of getting the size of files.
 
* MightyMax has helped with fseek.
wwcube provided example patches for unaligned buffer support.
* Joat provided system time and date functions.
 
* wwcube provided example patches for unaligned buffer support.
MightyMax wrote FAT_fgets and FAT_fputs.
* MightyMax wrote FAT_fgets and FAT_fputs.
 
* www.neoflash.com provided the routines to access the MK2/MK3. They also added sector caching.
www.neoflash.com provided the routines to access the MK2 / MK3. They also added sector caching.
* 0xtob fixed a bug in AddDirEntry that corrupted short filename extensions.
 
* Dwedit rolled up the LFN loops.
0xtob fixed a bug in AddDirEntry that corrupted short filename extensions.
* cory1492 improved the SuperCard SD driver.
 
* SaTa and Moonlight provided a read only M3 SD driver.
Dwedit rolled up the LFN loops.
* Loopy fixed SuperCard SD reading.
 
* CyteX added EFA2 support.
cory1492 improved the SuperCard SD driver.
 
SaTa and Moonlight provided a read only M3 SD driver.


Loopy fixed SuperCard SD reading.
==External links==
* Author's website - https://www.chishm.com/gba_nds_fat/index.html


CyteX added EFA2 support.


[[Category:Homebrew applications]]
[[Category:PC Utilities for DS]]

Latest revision as of 07:45, 4 May 2024

GBA NDS FAT
Ndspc2.png
General
AuthorChishm (Michael Chisholm)
TypeFile Operation
Version2006
LicenseMixed
Last Updated2006/03/03
Links
Download
Website

A FAT filesystem library for the GBA and NDS. This allows developers to read and write to FAT filesystems on compact flash, MMC or SD cards, using one of the supported devices. Various people have helped me with this library, so check the readme for contributers.

Note: This has been deprecated in favour of libfat and is no longer in development. It is suggested to upgrade to libfat if you find gba_nds_fat is not for you.

User guide

Supported device

Fully supported:

GBA Movie Player CF
GBAMP
Neoflash MK2 and MK3
Neoflash MK2
SuperCard CF
SuperCard CF
M3 Adapter CF
M3 Adapter CF

Partially supported devices (read only, disabled by default):

SuperCard SD
M3 Adapter SD
EFA 2

Add support for DLDI

Download backported IO_INTERFACE and extract the contents to your gba_nds_fat source directory.

Then add io_dldi as the first driver in the initialization list. In disc_io.c, under the line // Include known io-interfaces:, add the line:

#include "io_dldi.h"

In the function bool disc_setGbaSlotInterface (void) add the following code before the line #ifdef SUPPORT_M3CF:

// check if we have a valid DLDI driver
active_interface = DLDI_GetInterface();
if (active_interface->fn_StartUp())
{
    // set the DLDI driver as the default IO
    return true;
};	

In the function bool disc_setDsSlotInterface(void) add the same block of code just before the line #ifdef SUPPORT_NMMC. You should now be able to patch your application with DLDI files.

Changelog

2006/03/03

  • Improved NMMC (MK2 / MK3) driver.
  • Optimised LFNs into loops, thanks to dwedit.
  • Optimised SuperCard SD CFC7, thanks to Cory1492.
  • Added file attribute support.
  • Added read only M3 SD support, thanks to SaTa and Moonlight. Disabled by default due to incompleteness.
  • Fixed SuperCard SD reading, thanks to Loopy.
  • Added EFA2 support, thanks to CyteX.

2006/02/09

  • Fixed file and directory names starting with a dot ("."), or containing more than one dot.
  • Added Neoflash MK2 / MK3 support, thanks to www.neoflash.com.
  • Modified CF access routines to mask of the high byte of the status register, hopefully improving compatibility.
  • Added disc caching, thanks to www.neoflash.com . It can only be enabled on the DS (not GBA) since it will consume 128KB of memory on the default setting. It is advisable to call FAT_FreeFiles() before shut down if caching is enabled, to flush any writes to disc.
  • Added Supercard SD test code. It unfortunately doesn't work, and is disabled by default.
  • Added FAT total size and type functions.
  • Added file creation and modification functions. Disabled by default, see gba_nds_fat.h for more info.
  • Fixed AddDirEntry bugs:
    • Should no longer corrupt a directory when adding a new file.
    • No longer puts garbage into a short file name's extension, thanks to 0xtob.
    • Long file names with less than 12 characters now work, thanks to DragonMinded for pointing it out.

2006/01/04

  • Fixed FAT_fwrite when writing in cluster aligned chunks.

2005/11/27

  • Fixed reading / writing of sector buffer in FAT_fread and FAT_fwrite, thanks to AgentQ.

2005/11/26

  • disc_io now has a HostType function, for determining what type of flash cart is inserted.

2005/11/25

  • Clusters are now allocated as they are needed.
  • Fixed seeking in append mode.
  • Fixed adding of new directory entries.
  • Added support for standard GBA Flash Carts, with SRAM.

2005/11/24

  • Fixed FAT_fseek bug, thanks to AgentQ.
  • Added cluster allocation in FAT_fseek.
  • FAT_fopen now checks for read only files.
  • Added FAT_FindFirstFileLFN and FAT_FindNextFileLFN - Long file name versions of FAT_FindFirstFile and FAT_FindNextFile.

2005/11/21

  • Removed EOF marking from FAT_fclose.
  • FAT_fwrite now takes a const void* buffer. rather than a void* buffer.
  • FAT_fwrite initialises new sectors before using them.

2005/11/17

  • Added FAT_fgets and FAT_fputs, with thanks again to MightyMax.

2005/11/15

  • FAT_fopen uses string functions for checking mode.

2005/11/14

  • Improved error handling in FAT_fread and FAT_fwrite.
  • FAT_GetLongFilename uses strncpy instead of custom code.
  • Added DMA support for use on NDS.

2005/11/09

  • Long directory entries are now fit amongst old ones, rather than at the end.
  • Changed FAT_DeleteFile to FAT_remove and added ability to remove empty directories.
  • Added FAT_mkdir to create a new directory.

2005/11/08

  • Added ability to use unaligned buffers, thanks to wwcube.
  • No longer need to define NDS when compiling for the NDS (this is automatically done for you).

2005/11/07

  • Switched to memcpy instead of copy loops in fread and fwrite.

2005/11/06

  • Added FAT12 support and fixed FAT buffer bugs.
  • Added FAT_FileExists - returns FT_NONE if no file exists, FT_DIR or FT_FILE if it does.
  • Completely changed the hardware interface, with a big thanks to MightyMax for doing most of the work.
  • Added SuperCard CF support.

2005/10/31

  • Changed FAT_CWD to FAT_chdir.
  • FAT_ftell now returns u32 instead of long int.

2005/10/17

  • Fixed FAT_fseek when trying to SEEK_END, thanks to MoonLight.

2005/10/16

  • Added file time and date modification for writing, thanks to Joat.

2005/10/15

  • Changed file functions to use FAT_FILE* handles instead of int handles. Please change your code to reflect this change.
  • Split source into hardware and disk level files and renamed the files. Include gba_nds_cf.h into your project instead of gbamp_cf.h.
  • Added M3 adapter support.

2005/10/12

  • Fixed long file name bug in FAT_GetDirEntry. Thanks goes to MoonLight for pointing it out.

2005/09/21

  • Improved FAT_fseek speed.

2005/09/18

  • Fixed fseek bug with u32 offset instead of s32. Thanks goes to MightyMax for pointing that out.

2005/09/15

  • Added ability to read multiple sectors at once.
  • Improved FAT_fread and FAT_fwrite functions.
  • Fixed bug when trying to create a file in a non-existant directory.

2005/09/10

  • Fixed problem with FAT_GetDirEntry not initialising the attrib of the returned DIR_ENT.

'2005/09/05

  • Added FAT_GetFileCluster - Returns the start cluster of the last file accessed.

2005/08/21

  • Added FAT_GetFileSize - Returns the size of the last file accessed.
  • Included automatic memory access control setting for the NDS.
  • Removed typedef of bool (not needed with libnds).

2005/08/07

  • Fixed FAT_CWD bug when changing to ".." from a 1st level subdirectory.

2005/08/05

  • Fixed FAT_fopen bug in append mode.
  • Fixed FAT_AddDirEntry bug that created orphen clusters if a directory entry was created that filled the end of a cluster.

2005/07/24

  • Modified for use on the NDS.
  • When using it on the ARM9 you don't need to modify anything. On the ARM7 you will have to manually define NDS.

2005/07/14

  • Fixed FAT_fseek() buffer bug.

2005/07/13

  • Added option not to use DMA.

2005/07/12

  • Some bug fixes:
    • Reading & writing files on FAT16 cards in the root directory is now fixed.
    • Accessing files near the end of FAT32 cards is now fixed.

2005/06/27

  • Third release.
  • Bug fix for small cards.
  • FAT32 implemented.
  • Structure packing changed to be more compatible with non GCC compilers.

2005/06/24

  • Second proper release.
  • All known bugs fixed.
  • File writing implemented.
  • File functions behave as expected.
  • Long filenames now work.

2005/06/15

  • First release of file system driver.
  • File reading implemented.

2005/06/13

  • Started work on file system driver.

2005/06/12

  • Successfully reverse engineered the reading of compact flash cards.

Credits

  • FAT_NextCluster was based on routines in fat.c, which is part of avrlib by Pascal Stang.
  • Darkfader helped with low level CF reading and writing.
  • MightyMax added support for the M3.
  • MightyMax also provided a new hardware interface.
  • Thanks Tepples for answering questions.
  • The author of maverick-os for the documentation about the FAT16 file system.
  • CF routines were modified with help from Darkfader.
  • Dwedit was very helpful in discovering bugs.
  • SaTa was the first to add automatic memory access control settings.
  • MoonLight came up with the idea of getting the size of files.
  • MightyMax has helped with fseek.
  • Joat provided system time and date functions.
  • wwcube provided example patches for unaligned buffer support.
  • MightyMax wrote FAT_fgets and FAT_fputs.
  • www.neoflash.com provided the routines to access the MK2/MK3. They also added sector caching.
  • 0xtob fixed a bug in AddDirEntry that corrupted short filename extensions.
  • Dwedit rolled up the LFN loops.
  • cory1492 improved the SuperCard SD driver.
  • SaTa and Moonlight provided a read only M3 SD driver.
  • Loopy fixed SuperCard SD reading.
  • CyteX added EFA2 support.

External links

Advertising: