mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-updated our partition libraries and removed some old mem2 lo testing code
This commit is contained in:
parent
46ed1be2e6
commit
6b2b4d0b30
@ -54,7 +54,7 @@ ios := 249
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS = -g -ggdb -O1 -Wall -Wextra $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
||||
CFLAGS = -g -ggdb -Ofast -Wall -Wextra $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80620000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size
|
||||
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
||||
#define EXT2_FLAG_RW 0x00001 /* Open the filesystem for reading and writing. Without this flag, the filesystem is opened for reading only. */
|
||||
#define EXT2_FLAG_FORCE 0x00400 /* Open the filesystem regardless of the feature sets listed in the superblock */
|
||||
#define EXT2_FLAG_JOURNAL_DEV_OK 0x01000 /* Only open external journal devices if this flag is set (e.g. ext3/ext4) */
|
||||
#define EXT2_FLAG_64BITS 0x20000 /* Use the new style 64-Bit bitmaps. For more information see gen_bitmap64.c */
|
||||
#define EXT2_FLAG_64BITS 0x20000 /* Allow 64-bit bitfields (needed for large filesystems) */
|
||||
#define EXT2_FLAG_PRINT_PROGRESS 0x40000 /* If this flag is set the progress of file operations will be printed to stdout */
|
||||
#define EXT2_FLAG_SKIP_MMP 0x100000 /* Open without multi-mount protection check. */
|
||||
#define EXT2_FLAG_DEFAULT (EXT2_FLAG_RW | EXT2_FLAG_64BITS | EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SKIP_MMP)
|
||||
|
@ -2,7 +2,7 @@
|
||||
fat.h
|
||||
Simple functionality for startup, mounting and unmounting of FAT-based devices.
|
||||
|
||||
Copyright (c) 2006 - 2009
|
||||
Copyright (c) 2006 - 2012
|
||||
Michael "Chishm" Chisholm
|
||||
Dave "WinterMute" Murphy
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "libfatversion.h"
|
||||
|
||||
// When compiling for NDS, make sure NDS is defined
|
||||
#ifndef NDS
|
||||
#if defined ARM9 || defined ARM7
|
||||
@ -49,9 +51,9 @@ extern "C" {
|
||||
# include <ogc/disc_io.h>
|
||||
#else
|
||||
# ifdef NDS
|
||||
# include "nds/disc_io.h"
|
||||
# include <nds/disc_io.h>
|
||||
# else
|
||||
# include "disc_io.h"
|
||||
# include <disc_io.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -97,6 +99,22 @@ Get Volume Label
|
||||
*/
|
||||
extern void fatGetVolumeLabel (const char* name, char *label);
|
||||
|
||||
// File attributes
|
||||
#define ATTR_ARCHIVE 0x20 // Archive
|
||||
#define ATTR_DIRECTORY 0x10 // Directory
|
||||
#define ATTR_VOLUME 0x08 // Volume
|
||||
#define ATTR_SYSTEM 0x04 // System
|
||||
#define ATTR_HIDDEN 0x02 // Hidden
|
||||
#define ATTR_READONLY 0x01 // Read only
|
||||
|
||||
/*
|
||||
Methods to modify DOS File Attributes
|
||||
*/
|
||||
int FAT_getAttr(const char *file);
|
||||
int FAT_setAttr(const char *file, int attr );
|
||||
|
||||
#define LIBFAT_FEOS_MULTICWD
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
10
portlibs/include/libfatversion.h
Normal file
10
portlibs/include/libfatversion.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __LIBFATVERSION_H__
|
||||
#define __LIBFATVERSION_H__
|
||||
|
||||
#define _LIBFAT_MAJOR_ 1
|
||||
#define _LIBFAT_MINOR_ 0
|
||||
#define _LIBFAT_PATCH_ 12
|
||||
|
||||
#define _LIBFAT_STRING "libFAT Release 1.0.12"
|
||||
|
||||
#endif // __LIBFATVERSION_H__
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -23,7 +23,7 @@ INCLUDES := source
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS = -g -ggdb -O1 -Wall -Wextra $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
||||
CFLAGS = -g -ggdb -Ofast -Wall -Wextra $(MACHDEP) $(INCLUDE) -DHAVE_CONFIG_H
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000
|
||||
|
||||
|
@ -46,7 +46,7 @@ bool SDHC_Init(void)
|
||||
|
||||
// allocate buf2
|
||||
if(sdhc_buf2 == NULL)
|
||||
sdhc_buf2 = MEM2_lo_alloc(SDHC_MEM2_SIZE);
|
||||
sdhc_buf2 = MEM2_alloc(SDHC_MEM2_SIZE);
|
||||
if(sdhc_buf2 == NULL) goto err;
|
||||
|
||||
/* Open SDHC device */
|
||||
@ -83,7 +83,7 @@ bool SDHC_Close(void)
|
||||
fd = -1;
|
||||
}
|
||||
if(sdhc_buf2 != NULL)
|
||||
MEM2_lo_free(sdhc_buf2);
|
||||
MEM2_free(sdhc_buf2);
|
||||
sdhc_buf2 = NULL;
|
||||
|
||||
return true;
|
||||
|
@ -79,7 +79,7 @@ s32 USBStorage2_Init(u32 port)
|
||||
{
|
||||
/* allocate buf2 */
|
||||
if(mem2_ptr == NULL)
|
||||
mem2_ptr = MEM2_lo_alloc(USB_MEM2_SIZE);
|
||||
mem2_ptr = MEM2_alloc(USB_MEM2_SIZE);
|
||||
|
||||
if(usb_libogc_mode)
|
||||
{
|
||||
@ -129,7 +129,7 @@ void USBStorage2_Deinit()
|
||||
else if(fd >= 0)
|
||||
IOS_Close(fd); // not sure to close the fd is needed
|
||||
if(mem2_ptr != NULL)
|
||||
MEM2_lo_free(mem2_ptr);
|
||||
MEM2_free(mem2_ptr);
|
||||
mem2_ptr = NULL;
|
||||
|
||||
/* Reset Variables */
|
||||
|
@ -208,7 +208,7 @@ s32 USBStorage_OGC_Initialize()
|
||||
_CPU_ISR_Disable(level);
|
||||
LWP_InitQueue(&__usbstorage_ogc_waitq);
|
||||
if(arena_ptr == NULL)
|
||||
arena_ptr = (u8*)MEM2_lo_alloc(HEAP_SIZE);
|
||||
arena_ptr = (u8*)MEM2_alloc(HEAP_SIZE);
|
||||
if(arena_ptr == NULL)
|
||||
return IPC_ENOMEM;
|
||||
|
||||
@ -952,7 +952,7 @@ static bool __usbstorage_ogc_Shutdown(void)
|
||||
if (__vid != 0 || __pid != 0)
|
||||
USBStorage_OGC_Close(&__usbfd);
|
||||
if(arena_ptr != NULL)
|
||||
MEM2_lo_free(arena_ptr);
|
||||
MEM2_free(arena_ptr);
|
||||
arena_ptr = NULL;
|
||||
|
||||
return true;
|
||||
|
@ -474,7 +474,7 @@ bool sdio_OGC_Deinitialize()
|
||||
if(__sd0_fd>=0)
|
||||
IOS_Close(__sd0_fd);
|
||||
if(rw_buffer != NULL)
|
||||
MEM2_lo_free(rw_buffer);
|
||||
MEM2_free(rw_buffer);
|
||||
rw_buffer = NULL;
|
||||
|
||||
__sd0_fd = -1;
|
||||
@ -486,7 +486,7 @@ bool sdio_OGC_Startup()
|
||||
{
|
||||
if(__sdio_initialized==1) return true;
|
||||
|
||||
if(rw_buffer == NULL) rw_buffer = MEM2_lo_alloc(4*1024);
|
||||
if(rw_buffer == NULL) rw_buffer = MEM2_alloc(4*1024);
|
||||
if(rw_buffer == NULL) return false;
|
||||
|
||||
__sd0_fd = IOS_Open(_sd0_fs,1);
|
||||
|
@ -16,14 +16,10 @@ u32 MALLOC_MEM2 = 0;
|
||||
void *MEM1_lo_start = (void*)0x80004000;
|
||||
void *MEM1_lo_end = (void*)0x80620000;
|
||||
|
||||
/*void *MEM2_lo_start = (void*)0x90000000;
|
||||
void *MEM2_lo_end = (void*)0x90600000;*/
|
||||
|
||||
void *MEM2_start = (void*)0x90200000;
|
||||
void *MEM2_end = (void*)0x93100000;
|
||||
|
||||
static CMEM2Alloc g_mem1lo;
|
||||
/*static CMEM2Alloc g_mem2lo_gp;*/
|
||||
static CMEM2Alloc g_mem2gp;
|
||||
|
||||
extern "C"
|
||||
@ -41,9 +37,6 @@ void MEM_init()
|
||||
g_mem1lo.init(MEM1_lo_start, MEM1_lo_end); //about 6mb
|
||||
g_mem1lo.clear();
|
||||
|
||||
/*g_mem2lo_gp.init(MEM2_lo_start, MEM2_lo_end); //about 6mb
|
||||
g_mem2lo_gp.clear();*/
|
||||
|
||||
g_mem2gp.init(MEM2_start, MEM2_end); //about 47mb
|
||||
g_mem2gp.clear();
|
||||
}
|
||||
@ -94,32 +87,6 @@ unsigned int MEM1_freesize()
|
||||
}
|
||||
|
||||
|
||||
void *MEM2_lo_alloc(unsigned int s)
|
||||
{
|
||||
return MEM2_alloc(s);
|
||||
/*return g_mem2lo_gp.allocate(s);*/
|
||||
}
|
||||
|
||||
void *MEM2_lo_realloc(void *p, unsigned int s)
|
||||
{
|
||||
return MEM2_realloc(p, s);
|
||||
/*return g_mem2lo_gp.reallocate(p, s);*/
|
||||
}
|
||||
|
||||
void MEM2_lo_free(void *p)
|
||||
{
|
||||
MEM2_free(p);
|
||||
/*if(!p)
|
||||
return;
|
||||
g_mem2lo_gp.release(p);*/
|
||||
}
|
||||
|
||||
unsigned int MEM2_lo_freesize()
|
||||
{
|
||||
return 0;//g_mem2lo_gp.FreeSize();
|
||||
}
|
||||
|
||||
|
||||
void MEM2_free(void *p)
|
||||
{
|
||||
if(!p)
|
||||
|
@ -21,11 +21,6 @@ void *MEM1_realloc(void *p, unsigned int s);
|
||||
void MEM1_free(void *p);
|
||||
unsigned int MEM1_freesize();
|
||||
|
||||
void *MEM2_lo_alloc(unsigned int s);
|
||||
void *MEM2_lo_realloc(void *p, unsigned int s);
|
||||
void MEM2_lo_free(void *p);
|
||||
unsigned int MEM2_lo_freesize();
|
||||
|
||||
void MEM2_free(void *p);
|
||||
void *MEM2_alloc(unsigned int s);
|
||||
void *MEM2_memalign(unsigned int /* alignment */, unsigned int s);
|
||||
|
@ -1914,10 +1914,8 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
|
||||
}
|
||||
|
||||
#ifdef SHOWMEM
|
||||
m_btnMgr.setText(m_mem1FreeSize, wfmt(L"Mem1 lo Free:%u, Mem1 Free:%u",
|
||||
MEM1_lo_freesize(), MEM1_freesize()), true);
|
||||
m_btnMgr.setText(m_mem2FreeSize, wfmt(L"Mem2 lo Free:%u, Mem2 Free:%u",
|
||||
MEM2_lo_freesize(), MEM2_freesize()), true);
|
||||
m_btnMgr.setText(m_mem1FreeSize, wfmt(L"Mem1 lo Free:%u, Mem1 Free:%u, Mem2 Free:%u",
|
||||
MEM1_lo_freesize(), MEM1_freesize(), MEM2_freesize()), true);
|
||||
#endif
|
||||
|
||||
#ifdef SHOWMEMGECKO
|
||||
|
Loading…
Reference in New Issue
Block a user