From 6ea9f6b6c047df7c36ce7930646684b5a7718a78 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Fri, 5 Jan 2007 10:01:36 +0000 Subject: [PATCH] Removed MMCF from repository --- source/disc_io/disc.c | 6 ++- source/disc_io/io_mmcf.c | 104 --------------------------------------- source/disc_io/io_mmcf.h | 45 ----------------- 3 files changed, 4 insertions(+), 151 deletions(-) delete mode 100644 source/disc_io/io_mmcf.c delete mode 100644 source/disc_io/io_mmcf.h diff --git a/source/disc_io/disc.c b/source/disc_io/disc.c index 1bcab66..9c81031 100644 --- a/source/disc_io/disc.c +++ b/source/disc_io/disc.c @@ -68,6 +68,9 @@ 2006-12-25 - Chishm * Added DLDI * Removed experimental interfaces + + 2007-05-01 - Chishm + * Removed FCSR */ #include "disc.h" @@ -87,7 +90,6 @@ #include "io_sccf.h" #include "io_scsd.h" #include "io_m3sd.h" -#include "io_fcsr.h" const IO_INTERFACE* ioInterfaces[] = { &_io_dldi, // Reserved for new interfaces @@ -96,7 +98,7 @@ const IO_INTERFACE* ioInterfaces[] = { &_io_njsd, &_io_nmmc, #endif // Place Slot 2 (GBA Cart) interfaces here - &_io_mpcf, &_io_m3cf, &_io_sccf, &_io_scsd, &_io_m3sd, &_io_fcsr + &_io_mpcf, &_io_m3cf, &_io_sccf, &_io_scsd, &_io_m3sd }; /* diff --git a/source/disc_io/io_mmcf.c b/source/disc_io/io_mmcf.c deleted file mode 100644 index eac0639..0000000 --- a/source/disc_io/io_mmcf.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - io_mmcf.c based on - - compact_flash.c - By chishm (Michael Chisholm) - - Hardware Routines for reading a compact flash card - using the GBA Movie Player - - CF routines modified with help from Darkfader - - Copyright (c) 2006 Michael "Chishm" Chisholm - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - 2006-09-24 - Chishm - * Changed data register address to 0x09000000 -*/ - - -#include "io_mmcf.h" -#include "io_cf_common.h" - -//--------------------------------------------------------------- -// DMA -#ifdef _IO_USE_DMA - #ifndef NDS - #include "gba_dma.h" - #else - #include - #ifdef ARM9 - #include - #endif - #endif -#endif - -//--------------------------------------------------------------- -// Max Media Player CF Addresses -#define REG_MMCF_STS ((vu16*)0x080E0000) // Status of the CF Card / Device control -#define REG_MMCF_CMD ((vu16*)0x080E0000) // Commands sent to control chip and status return -#define REG_MMCF_ERR ((vu16*)0x08020000) // Errors / Features - -#define REG_MMCF_SEC ((vu16*)0x08040000) // Number of sector to transfer -#define REG_MMCF_LBA1 ((vu16*)0x08060000) // 1st byte of sector address -#define REG_MMCF_LBA2 ((vu16*)0x08080000) // 2nd byte of sector address -#define REG_MMCF_LBA3 ((vu16*)0x080A0000) // 3rd byte of sector address -#define REG_MMCF_LBA4 ((vu16*)0x080C0000) // last nibble of sector address | 0xE0 - -#define REG_MMCF_DATA ((vu16*)0x09000000) // Pointer to buffer of CF data transered from card - -static const CF_REGISTERS _MMCF_Registers = { - REG_MMCF_DATA, - REG_MMCF_STS, - REG_MMCF_CMD, - REG_MMCF_ERR, - REG_MMCF_SEC, - REG_MMCF_LBA1, - REG_MMCF_LBA2, - REG_MMCF_LBA3, - REG_MMCF_LBA4 -}; - - -/*----------------------------------------------------------------- -_MMCF_startUp -initializes the CF interface, returns true if successful, -otherwise returns false ------------------------------------------------------------------*/ -bool _MMCF_startup(void) { - return _CF_startup (&_MMCF_Registers); -} - -/*----------------------------------------------------------------- -the actual interface structure ------------------------------------------------------------------*/ -const IO_INTERFACE _io_mmcf = { - DEVICE_TYPE_MMCF, - FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_SLOT_GBA, - (FN_MEDIUM_STARTUP)&_MMCF_startup, - (FN_MEDIUM_ISINSERTED)&_CF_isInserted, - (FN_MEDIUM_READSECTORS)&_CF_readSectors, - (FN_MEDIUM_WRITESECTORS)&_CF_writeSectors, - (FN_MEDIUM_CLEARSTATUS)&_CF_clearStatus, - (FN_MEDIUM_SHUTDOWN)&_CF_shutdown -} ; diff --git a/source/disc_io/io_mmcf.h b/source/disc_io/io_mmcf.h deleted file mode 100644 index 7a2cef6..0000000 --- a/source/disc_io/io_mmcf.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - io_mmcf.h - - Hardware Routines for reading a compact flash card - using the GBA Movie Player - - Copyright (c) 2006 Michael "Chishm" Chisholm - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - 2006-07-11 - Chishm - * Original release -*/ - -#ifndef IO_MMCF_H -#define IO_MMCF_H - -// 'MMCF' -#define DEVICE_TYPE_MMCF 0x46434D4D - -#include "disc_io.h" - -// export interface -extern const IO_INTERFACE _io_mmcf ; - -#endif // define IO_MMCF_H