|
| 1 | +/*------------------------------------------------------------- |
| 2 | +
|
| 3 | +mmce.h -- MMCE support |
| 4 | +
|
| 5 | +Copyright (C) 2022 - 2025 Extrems' Corner.org |
| 6 | +
|
| 7 | +This software is provided 'as-is', without any express or implied |
| 8 | +warranty. In no event will the authors be held liable for any |
| 9 | +damages arising from the use of this software. |
| 10 | +
|
| 11 | +Permission is granted to anyone to use this software for any |
| 12 | +purpose, including commercial applications, and to alter it and |
| 13 | +redistribute it freely, subject to the following restrictions: |
| 14 | +
|
| 15 | +1. The origin of this software must not be misrepresented; you |
| 16 | +must not claim that you wrote the original software. If you use |
| 17 | +this software in a product, an acknowledgment in the product |
| 18 | +documentation would be appreciated but is not required. |
| 19 | +
|
| 20 | +2. Altered source versions must be plainly marked as such, and |
| 21 | +must not be misrepresented as being the original software. |
| 22 | +
|
| 23 | +3. This notice may not be removed or altered from any source |
| 24 | +distribution. |
| 25 | +
|
| 26 | +-------------------------------------------------------------*/ |
| 27 | + |
| 28 | +#ifndef __OGC_MMCE_H__ |
| 29 | +#define __OGC_MMCE_H__ |
| 30 | + |
| 31 | +#include <gctypes.h> |
| 32 | +#include <ogc/disc_io.h> |
| 33 | +#include <ogc/dvd.h> |
| 34 | + |
| 35 | +#define MMCE_RESULT_READY 0 |
| 36 | +#define MMCE_RESULT_BUSY -1 |
| 37 | +#define MMCE_RESULT_WRONGDEVICE -2 |
| 38 | +#define MMCE_RESULT_NOCARD -3 |
| 39 | +#define MMCE_RESULT_FATAL_ERROR -128 |
| 40 | + |
| 41 | +#ifdef __cplusplus |
| 42 | +extern "C" { |
| 43 | +#endif |
| 44 | + |
| 45 | +enum { |
| 46 | + MMCE_MODE_READONLY = 0, |
| 47 | + MMCE_MODE_READWRITE |
| 48 | +}; |
| 49 | + |
| 50 | +s32 MMCE_ProbeEx(s32 chan); |
| 51 | +s32 MMCE_GetDeviceID(s32 chan, u32 *id); |
| 52 | +s32 MMCE_GetAccessMode(s32 chan, u8 *mode); |
| 53 | +s32 MMCE_SetAccessMode(s32 chan, u8 mode); |
| 54 | +s32 MMCE_SetDiskID(s32 chan, const dvddiskid *diskID); |
| 55 | +s32 MMCE_GetDiskInfo(s32 chan, char diskInfo[64]); |
| 56 | +s32 MMCE_SetDiskInfo(s32 chan, const char diskInfo[64]); |
| 57 | +s32 MMCE_GetGameID(s32 chan, char gameID[10]); |
| 58 | +s32 MMCE_SetGameID(s32 chan, const char gameID[10]); |
| 59 | +s32 MMCE_ReadSectors(s32 chan, u32 sector, u16 numSectors, void *buffer); |
| 60 | +s32 MMCE_WriteSectors(s32 chan, u32 sector, u16 numSectors, const void *buffer); |
| 61 | + |
| 62 | +#define DEVICE_TYPE_GAMECUBE_MMCE(x) (('G'<<24)|('M'<<16)|('C'<<8)|('0'+(x))) |
| 63 | + |
| 64 | +extern DISC_INTERFACE __io_mmcea; |
| 65 | +extern DISC_INTERFACE __io_mmceb; |
| 66 | +extern DISC_INTERFACE __io_mmce2; |
| 67 | + |
| 68 | +#ifdef __cplusplus |
| 69 | +} |
| 70 | +#endif |
| 71 | + |
| 72 | +#endif |
0 commit comments