-improved jpg support, now the cover width and height dont need

to be divisible with 4 anymore, you can use what you want
-moved sound buffers back in mem2, idk but for wiiflow it gives
a better result
-added mem2 memalign placeholder for new memory manager (after
a week still everything but finished)
-updated other small things, cleaned up source structure a bit
This commit is contained in:
fix94.1 2012-08-05 13:48:15 +00:00
parent e6522473d2
commit 971b5bdb52
116 changed files with 465 additions and 508 deletions

View File

@ -19,17 +19,20 @@ TARGET := boot
BUILD := build BUILD := build
SOURCES := source \ SOURCES := source \
source/banner \ source/banner \
source/channel \
source/cheats \ source/cheats \
source/config \ source/config \
source/data \ source/data \
source/devicemounter \ source/devicemounter \
source/devicemounter/libwbfs \
source/fileOps \
source/gc \ source/gc \
source/gecko \ source/gecko \
source/gui \ source/gui \
source/homebrew \
source/libwbfs \
source/list \ source/list \
source/loader \ source/loader \
source/channel \
source/homebrew \
source/memory \ source/memory \
source/menu \ source/menu \
source/music \ source/music \
@ -37,35 +40,14 @@ SOURCES := source \
source/plugin \ source/plugin \
source/unzip \ source/unzip \
source/xml \ source/xml \
source/wstringEx \ source/wstringEx
source/devicemounter/libwbfs
DATA := data \ DATA := data \
data/images \ data/images \
data/sounds \ data/sounds \
data/help data/help
INCLUDES := source \ INCLUDES := source
source/banner \
source/cheats \
source/config \
source/devicemounter \
source/gc \
source/gecko \
source/gui \
source/list \
source/loader \
source/channel \
source/homebrew \
source/memory \
source/menu \
source/music \
source/network \
source/plugin \
source/unzip \
source/wstringEx \
source/xml
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Default build shell script options # Default build shell script options
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

View File

@ -22,12 +22,12 @@ misrepresented as being the original software.
distribution. distribution.
*/ */
#include <malloc.h> #include <malloc.h>
#include "U8Archive.h"
#include "LanguageCode.h" #include "LanguageCode.h"
#include "AnimatedBanner.h" #include "AnimatedBanner.h"
#include "text.hpp" #include "gui/text.hpp"
#include "lz77.h" #include "unzip/U8Archive.h"
#include "ash.h" #include "unzip/lz77.h"
#include "unzip/ash.h"
AnimatedBanner::AnimatedBanner() AnimatedBanner::AnimatedBanner()
{ {

View File

@ -26,8 +26,8 @@ distribution.
#define _ANIMATEDBANNER_H_ #define _ANIMATEDBANNER_H_
#include "Layout.h" #include "Layout.h"
#include "disc.h"
#include "channel/banner.h" #include "channel/banner.h"
#include "loader/disc.h"
class AnimatedBanner class AnimatedBanner
{ {

View File

@ -25,7 +25,7 @@ distribution.
#define BANNER_TOOLS_H_ #define BANNER_TOOLS_H_
#include <gctypes.h> #include <gctypes.h>
#include "gecko.h" #include "gecko/gecko.h"
#define MAKE_FOURCC(a, b, c, d) ((a) * (1 << 24) + (b) * (1 << 16) + (c) * (1 << 8) + (d) * (1 << 0)) #define MAKE_FOURCC(a, b, c, d) ((a) * (1 << 24) + (b) * (1 << 16) + (c) * (1 << 8) + (d) * (1 << 0))

View File

@ -16,10 +16,10 @@
****************************************************************************/ ****************************************************************************/
#include <unistd.h> #include <unistd.h>
#include "BannerWindow.hpp" #include "BannerWindow.hpp"
#include "menu.hpp"
#include "utils.h"
#include "gx_addons.h" #include "gx_addons.h"
#include "gecko.h" #include "gecko/gecko.h"
#include "loader/utils.h"
#include "menu/menu.hpp"
BannerWindow *m_banner; BannerWindow *m_banner;

View File

@ -19,11 +19,11 @@
#include <gccore.h> #include <gccore.h>
#include "disc.h"
#include "AnimatedBanner.h" #include "AnimatedBanner.h"
#include "gui_sound.h"
#include "video.hpp"
#include "channel/banner.h" #include "channel/banner.h"
#include "gui/video.hpp"
#include "loader/disc.h"
#include "music/gui_sound.h"
#define FAVORITE_STARS 5 #define FAVORITE_STARS 5

View File

@ -23,7 +23,7 @@ distribution.
*/ */
#include "Layout.h" #include "Layout.h"
#include "WiiFont.h" #include "WiiFont.h"
#include "U8Archive.h" #include "unzip/U8Archive.h"
Layout::Layout(u8 *font1, u8 *font2) Layout::Layout(u8 *font1, u8 *font2)
: header(0) : header(0)

View File

@ -84,7 +84,6 @@
#include <ctype.h> #include <ctype.h>
#include "MD5.h" #include "MD5.h"
#include "mem2.hpp"
/* -------------------------------------------------------------------------- ** /* -------------------------------------------------------------------------- **
* Static Constants: * Static Constants:

View File

@ -32,12 +32,12 @@
#include <ogc/conf.h> #include <ogc/conf.h>
#include <ogc/isfs.h> #include <ogc/isfs.h>
#include "memory/smartptr.hpp"
#include "banner.h" #include "banner.h"
#include "MD5.h" #include "MD5.h"
#include "gecko/gecko.h"
#include "loader/fs.h" #include "loader/fs.h"
#include "gecko.h" #include "memory/smartptr.hpp"
#include "U8Archive.h" #include "unzip/U8Archive.h"
#define IMET_OFFSET 0x40 #define IMET_OFFSET 0x40
#define IMET_SIGNATURE 0x494d4554 #define IMET_SIGNATURE 0x494d4554

View File

@ -1,18 +1,18 @@
#include "channel_launcher.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include "disc.h" #include "channel_launcher.h"
#include "patchcode.h" #include "gecko/gecko.h"
#include "videopatch.h" #include "loader/disc.h"
#include "fst.h" #include "loader/fs.h"
#include "lz77.h" #include "loader/fst.h"
#include "utils.h" #include "loader/patchcode.h"
#include "fs.h" #include "loader/utils.h"
#include "gecko.h" #include "loader/videopatch.h"
#include "unzip/lz77.h"
void __Disc_SetLowMem(void); void __Disc_SetLowMem(void);
void __Disc_SetTime(void); void __Disc_SetTime(void);

View File

@ -25,22 +25,19 @@
* *
* for WiiXplorer 2010 * for WiiXplorer 2010
***************************************************************************/ ***************************************************************************/
#include "mem2.hpp"
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include "channel_launcher.h"
#include "channels.h" #include "channels.h"
#include "banner.h" #include "banner.h"
#include "wstringEx.hpp" #include "config/config.hpp"
#include "gecko.h" #include "gecko/gecko.h"
#include "fs.h" #include "gui/text.hpp"
#include "config.hpp" #include "loader/fs.h"
#include "text.hpp" #include "memory/mem2.hpp"
#include "wstringEx/wstringEx.hpp"
#include "channel_launcher.h"
#define DOWNLOADED_CHANNELS 0x00010001 #define DOWNLOADED_CHANNELS 0x00010001
#define SYSTEM_CHANNELS 0x00010002 #define SYSTEM_CHANNELS 0x00010002

View File

@ -32,7 +32,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "smartptr.hpp" #include "memory/smartptr.hpp"
#include "banner.h" #include "banner.h"
#define IMET_MAX_NAME_LEN 0x2a #define IMET_MAX_NAME_LEN 0x2a

View File

@ -36,9 +36,9 @@
#include <malloc.h> #include <malloc.h>
#include "nand.hpp" #include "nand.hpp"
#include "wbfs.h" #include "fileOps/fileOps.h"
#include "gecko.h" #include "gecko/gecko.h"
#include "fileOps.h" #include "loader/wbfs.h"
u8 *confbuffer ATTRIBUTE_ALIGN(32); u8 *confbuffer ATTRIBUTE_ALIGN(32);
u8 CCode[0x1008]; u8 CCode[0x1008];

View File

@ -2,9 +2,8 @@
#include <fstream> #include <fstream>
#include "config.hpp" #include "config.hpp"
#include "text.hpp" #include "gecko/gecko.h"
#include "DeviceHandler.hpp" #include "gui/text.hpp"
#include "gecko.h"
static const char *g_whitespaces = " \f\n\r\t\v"; static const char *g_whitespaces = " \f\n\r\t\v";
static const int g_floatPrecision = 10; static const int g_floatPrecision = 10;

View File

@ -4,13 +4,10 @@
#include <map> #include <map>
#include <string> #include <string>
#include <vector>
#include "video.hpp" #include "gui/vector.hpp"
#include "smartptr.hpp" #include "gui/video.hpp"
#include "wstringEx.hpp" #include "wstringEx/wstringEx.hpp"
class CColor;
class Vector3D;
class Config class Config
{ {

View File

@ -29,11 +29,11 @@
#include <ogc/mutex.h> #include <ogc/mutex.h>
#include <ogc/system.h> #include <ogc/system.h>
#include <sdcard/gcsd.h> #include <sdcard/gcsd.h>
#include "cios.h"
#include "DeviceHandler.hpp" #include "DeviceHandler.hpp"
#include "wbfs.h"
#include "usbstorage.h"
#include "sdhc.h" #include "sdhc.h"
#include "usbstorage.h"
#include "loader/cios.h"
#include "loader/wbfs.h"
DeviceHandler * DeviceHandler::instance = NULL; DeviceHandler * DeviceHandler::instance = NULL;

View File

@ -28,15 +28,15 @@
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>
#include <sdcard/gcsd.h> #include <sdcard/gcsd.h>
#include "cios.h"
#include "PartitionHandle.h" #include "PartitionHandle.h"
#include "utils.h"
#include "ntfs.h" #include "ntfs.h"
#include "fat.h" #include "fat.h"
#include "ext2.h" #include "ext2.h"
#include "wbfs.h"
#include "usbstorage.h"
#include "sdhc.h" #include "sdhc.h"
#include "usbstorage.h"
#include "loader/cios.h"
#include "loader/utils.h"
#include "loader/wbfs.h"
#define PARTITION_TYPE_DOS33_EXTENDED 0x05 /* DOS 3.3+ extended partition */ #define PARTITION_TYPE_DOS33_EXTENDED 0x05 /* DOS 3.3+ extended partition */
#define PARTITION_TYPE_WIN95_EXTENDED 0x0F /* Windows 95 extended partition */ #define PARTITION_TYPE_WIN95_EXTENDED 0x0F /* Windows 95 extended partition */

View File

@ -27,15 +27,13 @@
distribution. distribution.
-------------------------------------------------------------*/ -------------------------------------------------------------*/
#include <gccore.h> #include <gccore.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "usbstorage.h"
#include "memory/mem2.hpp"
#include "gecko.h"
#include "usbstorage.h"
#include "gecko/gecko.h"
/* IOCTL commands */ /* IOCTL commands */
#define UMS_BASE (('U'<<24)|('M'<<16)|('S'<<8)) #define UMS_BASE (('U'<<24)|('M'<<16)|('S'<<8))

View File

@ -17,9 +17,9 @@ en exposed s_fsop fsop structure can be used by callback to update operation sta
#include <unistd.h> #include <unistd.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include "fileOps.h" #include "fileOps/fileOps.h"
#include "utils.h" #include "gecko/gecko.h"
#include "gecko.h" #include "loader/utils.h"
#define SET(a, b) a = b; DCFlushRange(&a, sizeof(a)); #define SET(a, b) a = b; DCFlushRange(&a, sizeof(a));
#define STACKSIZE 8192 #define STACKSIZE 8192

View File

@ -1,3 +1,19 @@
/****************************************************************************
* Copyright (C) 2012 FIX94
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include <gccore.h> #include <gccore.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
@ -11,10 +27,10 @@
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
#include "gc.h" #include "gc/gc.hpp"
#include "gecko.h" #include "gecko/gecko.h"
#include "fileOps.h" #include "fileOps/fileOps.h"
#include "utils.h" #include "loader/utils.h"
#include "loader/disc.h" #include "loader/disc.h"
// DIOS-MIOS // DIOS-MIOS
@ -142,7 +158,7 @@ void DML_New_WriteOptions()
// Devolution // Devolution
u8 *loader_bin = NULL; u8 *loader_bin = NULL;
extern void __exception_closeall(); extern "C" { extern void __exception_closeall(); }
static gconfig *DEVO_CONFIG = (gconfig*)0x80000020; static gconfig *DEVO_CONFIG = (gconfig*)0x80000020;
#define DEVO_Entry() ((void(*)(void))loader_bin)() #define DEVO_Entry() ((void(*)(void))loader_bin)()
@ -182,8 +198,9 @@ void DEVO_SetOptions(const char *isopath, const char *partition, const char *loa
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);
u32 size = ftell(f); u32 size = ftell(f);
rewind(f); rewind(f);
loader_bin = malloc(size); loader_bin = (u8*)memalign(32, size);
fread(loader_bin, 1, size, f); fread(loader_bin, 1, size, f);
DCFlushRange(loader_bin, ALIGN32(size));
fclose(f); fclose(f);
} }
else else
@ -301,9 +318,11 @@ void DEVO_Boot()
#define SRAM_ITALIAN 4 #define SRAM_ITALIAN 4
#define SRAM_DUTCH 5 #define SRAM_DUTCH 5
extern "C" {
syssram* __SYS_LockSram(); syssram* __SYS_LockSram();
u32 __SYS_UnlockSram(u32 write); u32 __SYS_UnlockSram(u32 write);
u32 __SYS_SyncSram(void); u32 __SYS_SyncSram(void);
}
void GC_SetVideoMode(u8 videomode, u8 videoSetting) void GC_SetVideoMode(u8 videomode, u8 videoSetting)
{ {

View File

@ -1,10 +1,23 @@
#ifdef __cplusplus /****************************************************************************
extern "C" * Copyright (C) 2012 FIX94
{ *
#endif * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#ifndef _GC_HPP_
#define _GC_HPP_
#ifndef GC_H_ #include <gccore.h>
#define GC_H_
// DIOS-MIOS // DIOS-MIOS
typedef struct DML_CFG typedef struct DML_CFG
@ -76,8 +89,4 @@ void GC_SetVideoMode(u8 videomode, u8 videoSetting);
void GC_SetLanguage(u8 lang); void GC_SetLanguage(u8 lang);
int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir); int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
#endif //GC_H_ #endif //_GC_HPP_
#ifdef __cplusplus
}
#endif

View File

@ -19,11 +19,11 @@
#include <string.h> #include <string.h>
#include <string> #include <string>
#include "gc.hpp"
#include "gcdisc.hpp" #include "gcdisc.hpp"
#include "loader/gc_disc_dump.hpp" #include "loader/gc_disc_dump.hpp"
#include "mem2.hpp" #include "gecko/gecko.h"
#include "gecko.h" #include "memory/mem2.hpp"
#include "gc.h"
using namespace std; using namespace std;

View File

@ -10,8 +10,9 @@
#include <sys/iosupport.h> #include <sys/iosupport.h>
#include <stdarg.h> #include <stdarg.h>
#include "mem2.hpp" #include "gecko.h"
#include "wifi_gecko.h" #include "wifi_gecko.h"
#include "memory/mem2.hpp"
/* init-globals */ /* init-globals */
bool geckoinit = false; bool geckoinit = false;
@ -175,11 +176,11 @@ bool InitGecko()
u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1); u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1);
if(geckoattached) if(geckoattached)
{ {
geckoinit = true;
usb_flush(EXI_CHANNEL_1); usb_flush(EXI_CHANNEL_1);
return true; puts("USB Gecko inited.");
} }
else return geckoinit;
return false;
} }
void AllocSDGeckoBuffer() void AllocSDGeckoBuffer()

View File

@ -6,7 +6,8 @@
extern "C" { extern "C" {
#endif #endif
extern bool geckoinit; #include <gccore.h>
extern bool bufferMessages; extern bool bufferMessages;
extern bool WriteToSD; extern bool WriteToSD;

View File

@ -31,6 +31,7 @@
#include <network.h> #include <network.h>
#include <errno.h> #include <errno.h>
#include "wifi_gecko.h" #include "wifi_gecko.h"
#include "loader/utils.h"
// set to use TCP socket instead of UDP // set to use TCP socket instead of UDP
#define WIFI_GECKO_USE_TCP (0) #define WIFI_GECKO_USE_TCP (0)

View File

@ -26,8 +26,6 @@
#ifndef WIFI_GECKO_H_ #ifndef WIFI_GECKO_H_
#define WIFI_GECKO_H_ #define WIFI_GECKO_H_
#include "utils.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -18,12 +18,9 @@
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with FreeTypeGX. If not, see <http://www.gnu.org/licenses/>. * along with FreeTypeGX. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "FreeTypeGX.h"
#include "mem2.hpp"
#include <stdio.h> #include <stdio.h>
#include "FreeTypeGX.h"
#include "memory/mem2.hpp"
/** /**
* Default constructor for the FreeTypeGX class. * Default constructor for the FreeTypeGX class.

View File

@ -155,7 +155,7 @@
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_BITMAP_H #include FT_BITMAP_H
#include "utils.h" #include "loader/utils.h"
#include <malloc.h> #include <malloc.h>
#include <string.h> #include <string.h>

View File

@ -26,11 +26,11 @@
#include <string> #include <string>
#include <cstring> #include <cstring>
#include "GameTDB.hpp" #include "GameTDB.hpp"
#include "config.hpp"
#include "video.hpp" #include "video.hpp"
#include "gecko.h"
#include "defines.h" #include "defines.h"
#include "text.hpp" #include "text.hpp"
#include "config/config.hpp"
#include "gecko/gecko.h"
#define NAME_OFFSET_DB "gametdb_offsets.bin" #define NAME_OFFSET_DB "gametdb_offsets.bin"
#define MAXREADSIZE 1024*1024 //Cache size only for parsing the offsets: 1MB #define MAXREADSIZE 1024*1024 //Cache size only for parsing the offsets: 1MB

View File

@ -27,11 +27,10 @@
***************************************************************************/ ***************************************************************************/
#include <unistd.h> #include <unistd.h>
#include <asndlib.h> #include <asndlib.h>
#include "wiiuse/wpad.h"
#include "WiiMovie.hpp" #include "WiiMovie.hpp"
#include "gecko.h" #include "gecko/gecko.h"
#include "mem2.hpp" #include "memory/mem2.hpp"
#define SND_BUFFERS 8 #define SND_BUFFERS 8
#define FRAME_BUFFERS 8 #define FRAME_BUFFERS 8

View File

@ -4,7 +4,7 @@
#include "gcvid.h" #include "gcvid.h"
#include "Timer.h" #include "Timer.h"
#include "texture.hpp" #include "texture.hpp"
#include "BufferCircle.hpp" #include "music/BufferCircle.hpp"
using namespace std; using namespace std;

View File

@ -11,11 +11,11 @@
#include "coverflow.hpp" #include "coverflow.hpp"
#include "pngu.h" #include "pngu.h"
#include "boxmesh.hpp" #include "boxmesh.hpp"
#include "wstringEx.hpp"
#include "lockMutex.hpp" #include "lockMutex.hpp"
#include "fonts.h" #include "fonts.h"
#include "gecko.h"
#include "types.h" #include "types.h"
#include "gecko/gecko.h"
#include "wstringEx/wstringEx.hpp"
extern const u8 dvdskin_jpg[]; extern const u8 dvdskin_jpg[];
extern const u32 dvdskin_jpg_size; extern const u32 dvdskin_jpg_size;

View File

@ -11,13 +11,13 @@
#include <ogc/pad.h> #include <ogc/pad.h>
#include "video.hpp" #include "video.hpp"
#include "smartptr.hpp"
#include "FreeTypeGX.h" #include "FreeTypeGX.h"
#include "text.hpp" #include "text.hpp"
#include "config.hpp" #include "config/config.hpp"
#include "gui_sound.h" #include "loader/disc.h"
#include "disc.h" #include "loader/utils.h"
#include "utils.h" #include "memory/smartptr.hpp"
#include "music/gui_sound.h"
using namespace std; using namespace std;

View File

@ -2,7 +2,7 @@
#include "pngu.h" #include "pngu.h"
#include "boxmesh.hpp" #include "boxmesh.hpp"
#include "text.hpp" #include "text.hpp"
#include "gecko.h" #include "gecko/gecko.h"
using namespace std; using namespace std;

View File

@ -7,9 +7,9 @@
#include <gccore.h> #include <gccore.h>
#include <string> #include <string>
#include "config.hpp"
#include "texture.hpp"
#include "gui.hpp" #include "gui.hpp"
#include "texture.hpp"
#include "config/config.hpp"
class CFanartElement class CFanartElement
{ {

View File

@ -32,8 +32,8 @@
#include <cassert> #include <cassert>
#include "gcvid.h" #include "gcvid.h"
#include "utils.h" #include "loader/utils.h"
#include "mem2.hpp" #include "memory/mem2.hpp"
using namespace std; using namespace std;
@ -784,18 +784,13 @@ void decodeRealJpeg(const u8* data, int size, VideoFrame& dest)
jpeg_read_header(&cinfo, TRUE); jpeg_read_header(&cinfo, TRUE);
#if 1 cinfo.do_fancy_upsampling = TRUE;
//set quality/speed parameters to speed: cinfo.do_block_smoothing = TRUE;
cinfo.do_fancy_upsampling = FALSE; cinfo.dct_method = JDCT_ISLOW;
cinfo.do_block_smoothing = FALSE;
//this actually slows decoding down:
//cinfo.dct_method = JDCT_FASTEST;
#endif
jpeg_start_decompress(&cinfo); jpeg_start_decompress(&cinfo);
dest.resize(cinfo.output_width, cinfo.output_height); dest.resize(ALIGN(4, cinfo.output_width), ALIGN(4, cinfo.output_height));
if(cinfo.num_components == 3) if(cinfo.num_components == 3)
{ {

View File

@ -4,15 +4,15 @@
#ifndef __GUI_HPP #ifndef __GUI_HPP
#define __GUI_HPP #define __GUI_HPP
#include "wiiuse/wpad.h"
#include <ogc/pad.h> #include <ogc/pad.h>
#include "wiiuse/wpad.h"
#include "video.hpp" #include "video.hpp"
#include "FreeTypeGX.h" #include "FreeTypeGX.h"
#include "wstringEx.hpp"
#include "smartptr.hpp"
#include "text.hpp" #include "text.hpp"
#include "gui_sound.h" #include "memory/smartptr.hpp"
#include "music/gui_sound.h"
#include "wstringEx/wstringEx.hpp"
struct SButtonTextureSet struct SButtonTextureSet
{ {

View File

@ -13,15 +13,14 @@ More info : http://frontier-dev.net
#include "pngu.h" #include "pngu.h"
#include "png.h" #include "png.h"
#include "mem2.hpp"
#include "utils.h"
#include "gecko/gecko.h" #include "gecko/gecko.h"
#include "loader/utils.h"
#include "memory/mem2.hpp"
// Constants // Constants
#define PNGU_SOURCE_BUFFER 1 #define PNGU_SOURCE_BUFFER 1
#define PNGU_SOURCE_DEVICE 2 #define PNGU_SOURCE_DEVICE 2
// Prototypes of helper functions // Prototypes of helper functions
int pngu_info (IMGCTX ctx); int pngu_info (IMGCTX ctx);
int pngu_decode (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, PNGU_u32 stripAlpha, int force32bits); int pngu_decode (IMGCTX ctx, PNGU_u32 width, PNGU_u32 height, PNGU_u32 stripAlpha, int force32bits);
@ -30,7 +29,6 @@ void pngu_read_data_from_buffer (png_structp png_ptr, png_bytep data, png_size_t
void pngu_write_data_to_buffer (png_structp png_ptr, png_bytep data, png_size_t length); void pngu_write_data_to_buffer (png_structp png_ptr, png_bytep data, png_size_t length);
int pngu_clamp (int value, int min, int max); int pngu_clamp (int value, int min, int max);
// PNGU Image context struct // PNGU Image context struct
struct _IMGCTX struct _IMGCTX
{ {

View File

@ -5,11 +5,10 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include "wstringEx.hpp"
#include "FreeTypeGX.h" #include "FreeTypeGX.h"
#include "video.hpp" #include "video.hpp"
#include "memory/smartptr.hpp"
#include "smartptr.hpp" #include "wstringEx/wstringEx.hpp"
using namespace std; using namespace std;

View File

@ -4,7 +4,7 @@
#include <gccore.h> #include <gccore.h>
#include "smartptr.hpp" #include "memory/smartptr.hpp"
struct STexture struct STexture
{ {

View File

@ -1,9 +1,11 @@
#include "pngu.h"
#include "video.hpp"
#include <string.h> #include <string.h>
#include "video.hpp"
#include "pngu.h"
#include "Gekko.h" #include "Gekko.h"
#include "gecko.h" #include "gecko/gecko.h"
#include "utils.h" #include "loader/utils.h"
#define DEFAULT_FIFO_SIZE (256 * 1024) #define DEFAULT_FIFO_SIZE (256 * 1024)
@ -119,11 +121,9 @@ void CVideo::setAA(u8 aa, bool alpha, int width, int height)
void CVideo::init(void) void CVideo::init(void)
{ {
VIDEO_Init(); VIDEO_Init();
VIDEO_SetBlack(TRUE);
m_wide = CONF_GetAspectRatio() == CONF_ASPECT_16_9; m_wide = CONF_GetAspectRatio() == CONF_ASPECT_16_9;
m_rmode = VIDEO_GetPreferredMode(NULL); m_rmode = VIDEO_GetPreferredMode(NULL);
u32 type = CONF_GetVideo(); u32 type = CONF_GetVideo();
m_50hz = false; m_50hz = false;
if(m_rmode == &TVPal528IntDf) if(m_rmode == &TVPal528IntDf)
{ {
@ -133,7 +133,7 @@ void CVideo::init(void)
m_rmode->viWidth = m_wide ? 700 : 672; m_rmode->viWidth = m_wide ? 700 : 672;
//CONF_VIDEO_NTSC and CONF_VIDEO_MPAL and m_rmode TVEurgb60Hz480IntDf are the same max height and width. //CONF_VIDEO_NTSC and CONF_VIDEO_MPAL and m_rmode TVEurgb60Hz480IntDf are the same max height and width.
if (type == CONF_VIDEO_PAL && m_rmode != &TVEurgb60Hz480IntDf) if(type == CONF_VIDEO_PAL && m_rmode != &TVEurgb60Hz480IntDf)
{ {
m_rmode->viHeight = VI_MAX_HEIGHT_PAL; m_rmode->viHeight = VI_MAX_HEIGHT_PAL;
m_rmode->viXOrigin = (VI_MAX_WIDTH_PAL - m_rmode->viWidth) / 2; m_rmode->viXOrigin = (VI_MAX_WIDTH_PAL - m_rmode->viWidth) / 2;
@ -147,15 +147,22 @@ void CVideo::init(void)
} }
s8 hoffset = 0; //Use horizontal offset set in wii menu. s8 hoffset = 0; //Use horizontal offset set in wii menu.
if (CONF_GetDisplayOffsetH(&hoffset) == 0) if(CONF_GetDisplayOffsetH(&hoffset) == 0)
m_rmode->viXOrigin += hoffset; m_rmode->viXOrigin += hoffset;
VIDEO_Configure(m_rmode);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(m_rmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
else while(VIDEO_GetNextField())
VIDEO_WaitVSync();
m_frameBuf[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode)); m_frameBuf[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode));
m_frameBuf[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode)); m_frameBuf[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode));
VIDEO_Configure(m_rmode);
VIDEO_Flush();
m_curFB = 0; m_curFB = 0;
m_fifo = MEM1_memalign(32, DEFAULT_FIFO_SIZE); m_fifo = memalign(32, DEFAULT_FIFO_SIZE);
memset(m_fifo, 0, DEFAULT_FIFO_SIZE); memset(m_fifo, 0, DEFAULT_FIFO_SIZE);
GX_Init(m_fifo, DEFAULT_FIFO_SIZE); GX_Init(m_fifo, DEFAULT_FIFO_SIZE);
GX_SetCopyClear(CColor(0), 0x00FFFFFF); GX_SetCopyClear(CColor(0), 0x00FFFFFF);
@ -185,15 +192,9 @@ void CVideo::init(void)
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
for(u32 i = 0; i < 8; i++) for(u32 i = 0; i < 8; i++)
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0+i, GX_TEX_ST, GX_F32, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0+i, GX_TEX_ST, GX_F32, 0);
_clearScreen(); m_stencil = memalign(32, CVideo::_stencilWidth * CVideo::_stencilHeight);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(m_rmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
m_stencil = MEM1_memalign(32, CVideo::_stencilWidth * CVideo::_stencilHeight);
memset(m_stencil, 0, CVideo::_stencilWidth * CVideo::_stencilHeight); memset(m_stencil, 0, CVideo::_stencilWidth * CVideo::_stencilHeight);
_clearScreen();
} }
void CVideo::_clearScreen() void CVideo::_clearScreen()

View File

@ -5,7 +5,7 @@
#include <gccore.h> #include <gccore.h>
#include <vector> #include <vector>
#include "smartptr.hpp" #include "memory/smartptr.hpp"
#include "vector.hpp" #include "vector.hpp"
#include "texture.hpp" #include "texture.hpp"

View File

@ -5,9 +5,9 @@
#include <ogc/machine/processor.h> #include <ogc/machine/processor.h>
#include <vector> #include <vector>
#include <string> #include <string>
#include "smartptr.hpp" #include "gecko/gecko.h"
#include "gecko.h" #include "memory/mem2.hpp"
#include "mem2.hpp" #include "memory/smartptr.hpp"
#define EXECUTE_ADDR ((u8 *)0x92000000) #define EXECUTE_ADDR ((u8 *)0x92000000)
#define BOOTER_ADDR ((u8 *)0x93000000) #define BOOTER_ADDR ((u8 *)0x93000000)

View File

@ -9,10 +9,10 @@
#include <gccore.h> #include <gccore.h>
#include <malloc.h> #include <malloc.h>
#include "utils.h"
#include "mem2.hpp"
#include "gecko/gecko.h" #include "gecko/gecko.h"
#include "loader/disc.h" #include "loader/disc.h"
#include "loader/utils.h"
#include "memory/mem2.hpp"
#define wbfs_fatal(x) do { gprintf(x); wd_last_error = 1; } while(0) #define wbfs_fatal(x) do { gprintf(x); wd_last_error = 1; } while(0)
#define wbfs_error(x) do { gprintf(x); wd_last_error = 2; } while(0) #define wbfs_error(x) do { gprintf(x); wd_last_error = 2; } while(0)

View File

@ -5,7 +5,7 @@
#include <ogcsys.h> #include <ogcsys.h>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include "disc.h" #include "loader/disc.h"
//#include "gecko.h" //#include "gecko.h"
using namespace std; using namespace std;

View File

@ -97,10 +97,8 @@ void CachedList<T>::Load(string path, string containing, string m_lastLanguage,
m_update = false; m_update = false;
if(!music && pathlist.size() > 0) if(!music && pathlist.size() > 0)
{
Save(); Save();
pathlist.clear(); pathlist.clear();
}
} }
else else
{ {

View File

@ -3,8 +3,8 @@
#include "list.hpp" #include "list.hpp"
#include "cache.hpp" #include "cache.hpp"
#include "gecko.h"
#include "config/config.hpp" #include "config/config.hpp"
#include "gecko/gecko.h"
using namespace std; using namespace std;

View File

@ -1,11 +1,11 @@
#include "list.hpp" #include "list.hpp"
#include "gecko.h"
#include "GameTDB.hpp"
#include "config.hpp"
#include "types.h" #include "types.h"
#include "channels.h" #include "channel/channels.h"
#include "gc.h" #include "config/config.hpp"
#include "fileOps.h" #include "fileOps/fileOps.h"
#include "gecko/gecko.h"
#include "gc/gc.hpp"
#include "gui/GameTDB.hpp"
template <typename T> template <typename T>
void CList<T>::GetPaths(vector<string> &pathlist, string containing, string directory, bool wbfs_fs, bool dml, bool depth_limit) void CList<T>::GetPaths(vector<string> &pathlist, string containing, string directory, bool wbfs_fs, bool dml, bool depth_limit)

View File

@ -8,13 +8,13 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "DeviceHandler.hpp"
#include "wbfs_ext.h"
#include "libwbfs/libwbfs.h"
#include "disc.h"
#include "text.hpp"
#include "cache.hpp" #include "cache.hpp"
#include "config/config.hpp" #include "config/config.hpp"
#include "devicemounter/DeviceHandler.hpp"
#include "gui/text.hpp"
#include "loader/disc.h"
#include "loader/wbfs_ext.h"
#include "libwbfs/libwbfs.h"
template <typename T> template <typename T>
class CList class CList

View File

@ -1,16 +1,16 @@
#include <ogc/machine/processor.h> #include <ogc/machine/processor.h>
#include "DeviceHandler.hpp"
#include "wdvd.h"
#include "disc.h"
#include "usbstorage.h"
#include "mem2.hpp"
#include "alt_ios.h" #include "alt_ios.h"
#include "cios.h"
#include "disc.h"
#include "sys.h" #include "sys.h"
#include "wbfs.h" #include "wbfs.h"
#include "gecko.h" #include "wdvd.h"
#include "cios.h" #include "devicemounter/DeviceHandler.hpp"
#include "devicemounter/usbstorage.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
#include "types.h" #include "types.h"
// mload from uloader by Hermes // mload from uloader by Hermes

View File

@ -1,6 +1,8 @@
#include <stdio.h> #include <stdio.h>
#include <ogcsys.h> #include <ogcsys.h>
#include <string.h> #include <string.h>
#include "mload_modules.h" #include "mload_modules.h"
#include "apploader.h" #include "apploader.h"
#include "wdvd.h" #include "wdvd.h"
@ -10,10 +12,10 @@
#include "wip.h" #include "wip.h"
#include "wbfs.h" #include "wbfs.h"
#include "sys.h" #include "sys.h"
#include "gecko.h"
#include "fst.h" #include "fst.h"
#include "cios.h" #include "cios.h"
#include "types.h" #include "types.h"
#include "gecko/gecko.h"
/* Apploader function pointers */ /* Apploader function pointers */
typedef int (*app_main)(void **dst, int *size, int *offset); typedef int (*app_main)(void **dst, int *size, int *offset);

View File

@ -23,7 +23,6 @@
* 3. This notice may not be removed or altered from any source * 3. This notice may not be removed or altered from any source
* distribution. * distribution.
***************************************************************************/ ***************************************************************************/
#include <gctypes.h> #include <gctypes.h>
#include <malloc.h> #include <malloc.h>
#include <string.h> #include <string.h>
@ -31,9 +30,10 @@
#include "cios.h" #include "cios.h"
#include "utils.h" #include "utils.h"
#include "gecko.h"
#include "fs.h" #include "fs.h"
#include "mload.h" #include "mload.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
static bool checked = false; static bool checked = false;
static bool neek = false; static bool neek = false;
@ -83,10 +83,9 @@ signed_blob *GetTMD(u8 ios, u32 *TMD_Length)
if(ES_GetStoredTMDSize(TITLE_ID(1, ios), TMD_Length) < 0) if(ES_GetStoredTMDSize(TITLE_ID(1, ios), TMD_Length) < 0)
return NULL; return NULL;
signed_blob *TMD = (signed_blob*)memalign(32, ALIGN32(*TMD_Length)); signed_blob *TMD = (signed_blob*)MEM2_alloc(*TMD_Length);
if(TMD == NULL) if(TMD == NULL)
return NULL; return NULL;
if(ES_GetStoredTMD(TITLE_ID(1, ios), TMD, *TMD_Length) < 0) if(ES_GetStoredTMD(TITLE_ID(1, ios), TMD, *TMD_Length) < 0)
{ {
free(TMD); free(TMD);
@ -149,13 +148,13 @@ int get_ios_type(u8 slot)
free(TMD_Buffer); free(TMD_Buffer);
return IOS_TYPE_NO_CIOS; return IOS_TYPE_NO_CIOS;
} }
u32 title_rev = iosTMD->title_version;
free(TMD_Buffer);
iosTMD = NULL;
iosinfo_t *info = GetInfo(slot); iosinfo_t *info = GetInfo(slot);
if(info == NULL) if(info == NULL)
{
free(TMD_Buffer);
return IOS_TYPE_NO_CIOS; return IOS_TYPE_NO_CIOS;
}
free(info); free(info);
u8 base = 0; u8 base = 0;
@ -165,7 +164,7 @@ int get_ios_type(u8 slot)
case 223: case 223:
case 224: case 224:
case 225: case 225:
if(iosTMD->title_version == 1) if(title_rev == 1)
return IOS_TYPE_KWIIRK; return IOS_TYPE_KWIIRK;
else else
return IOS_TYPE_HERMES; return IOS_TYPE_HERMES;
@ -186,7 +185,6 @@ int get_ios_type(u8 slot)
else else
return IOS_TYPE_NO_CIOS; return IOS_TYPE_NO_CIOS;
} }
free(TMD_Buffer);
} }
int is_ios_type(int type, u8 slot) int is_ios_type(int type, u8 slot)

View File

@ -5,7 +5,6 @@
#include <unistd.h> #include <unistd.h>
#include <ogc/lwp_threads.h> #include <ogc/lwp_threads.h>
#include <ogc/lwp_watchdog.h> #include <ogc/lwp_watchdog.h>
#include "wiiuse/wpad.h"
#include <ogc/machine/processor.h> #include <ogc/machine/processor.h>
#include "apploader.h" #include "apploader.h"
@ -18,13 +17,15 @@
#include "wbfs.h" #include "wbfs.h"
#include "patchcode.h" #include "patchcode.h"
#include "frag.h" #include "frag.h"
#include "usbstorage.h"
#include "wip.h" #include "wip.h"
#include "memory.h"
#include "gecko.h"
#include "utils.h" #include "utils.h"
#include "cios.h" #include "cios.h"
#include "devicemounter/usbstorage.h"
#include "gecko/gecko.h"
#include "memory/memory.h"
/* Constants */ /* Constants */
#define PTABLE_OFFSET 0x40000 #define PTABLE_OFFSET 0x40000

View File

@ -7,17 +7,17 @@
#include "ntfs.h" #include "ntfs.h"
#include "ntfsfile_frag.h" #include "ntfsfile_frag.h"
#include "libwbfs/libwbfs.h"
#include "wbfs.h" #include "wbfs.h"
#include "wbfs_ext.h" #include "wbfs_ext.h"
#include "usbstorage.h"
#include "frag.h" #include "frag.h"
#include "utils.h" #include "utils.h"
#include "sys.h" #include "sys.h"
#include "wdvd.h" #include "wdvd.h"
#include "gecko.h"
#include "ext2_frag.h" #include "ext2_frag.h"
#include "fatfile_frag.h" #include "fatfile_frag.h"
#include "devicemounter/usbstorage.h"
#include "gecko/gecko.h"
#include "libwbfs/libwbfs.h"
FragList *frag_list = NULL; FragList *frag_list = NULL;

View File

@ -18,26 +18,24 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <gccore.h> #include <gccore.h>
#include <sys/unistd.h> #include <sys/unistd.h>
#include <ogc/ipc.h> #include <ogc/ipc.h>
#include "fst.h"
#include "gecko.h" #include "fst.h"
#include "sys.h" #include "sys.h"
#include "mem2.hpp"
#include "patchcode.h" #include "patchcode.h"
#include "codehandler.h" #include "codehandler.h"
#include "codehandleronly.h" #include "codehandleronly.h"
#include "multidol.h" #include "multidol.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
#define FSTDIRTYPE 1 #define FSTDIRTYPE 1
#define FSTFILETYPE 0 #define FSTFILETYPE 0
#define ENTRYSIZE 0xC #define ENTRYSIZE 0xC

View File

@ -29,17 +29,17 @@
#include <ogcsys.h> #include <ogcsys.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include "mem2.hpp"
#include "gc_disc_dump.hpp" #include "gc_disc_dump.hpp"
#include "DeviceHandler.hpp"
#include "disc.h" #include "disc.h"
#include "utils.h" #include "utils.h"
#include "wdvd.h" #include "wdvd.h"
#include "text.hpp" #include "devicemounter/DeviceHandler.hpp"
#include "gecko.h" #include "fileOps/fileOps.h"
#include "fileOps.h" #include "gecko/gecko.h"
#include "gui/Gekko.h"
#include "gui/text.hpp"
#include "memory/mem2.hpp"
#include "defines.h" #include "defines.h"
#include "Gekko.h"
using namespace std; using namespace std;

View File

@ -16,7 +16,7 @@
*/ */
#include "mload.h" #include "mload.h"
#include "gecko.h" #include "gecko/gecko.h"
static const char mload_fs[] ATTRIBUTE_ALIGN(32) = "/dev/mload"; static const char mload_fs[] ATTRIBUTE_ALIGN(32) = "/dev/mload";

View File

@ -28,10 +28,10 @@
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>
#include "mem2.hpp"
#include "nk.h" #include "nk.h"
#include "cios.h" #include "cios.h"
#include "armboot.h" #include "armboot.h"
#include "memory/mem2.hpp"
s32 Launch_nk(u64 TitleID, const char *nandpath) s32 Launch_nk(u64 TitleID, const char *nandpath)
{ {

View File

@ -26,7 +26,7 @@
#include "apploader.h" #include "apploader.h"
#include "patchcode.h" #include "patchcode.h"
#include "gecko.h" #include "gecko/gecko.h"
extern void patchhook(u32 address, u32 len); extern void patchhook(u32 address, u32 len);
extern void patchhook2(u32 address, u32 len); extern void patchhook2(u32 address, u32 len);

View File

@ -12,7 +12,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ogcsys.h> #include <ogcsys.h>
#include "gecko.h" #include "gecko/gecko.h"
#define PLAYRECPATH "/title/00000001/00000002/data/play_rec.dat" #define PLAYRECPATH "/title/00000001/00000002/data/play_rec.dat"
#define SECONDS_TO_2000 946684800LL #define SECONDS_TO_2000 946684800LL

View File

@ -12,7 +12,7 @@
#include <ctype.h> #include <ctype.h>
#include "splits.h" #include "splits.h"
#include "gecko.h" #include "gecko/gecko.h"
#define off64_t off_t #define off64_t off_t
#define FMT_llu "%llu" #define FMT_llu "%llu"

View File

@ -3,7 +3,7 @@
extern "C" { extern "C" {
#endif #endif
#include "devicemounter/libwbfs/libwbfs.h" #include "libwbfs/libwbfs.h"
#define MAX_SPLIT 10 #define MAX_SPLIT 10

View File

@ -7,16 +7,15 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "wiiuse/wpad.h"
#include "memory/mem2.hpp"
#include "memory/memory.h"
#include "sys.h"
#include "gecko.h"
#include "channel_launcher.h"
#include "sha1.h" #include "sha1.h"
#include "fs.h" #include "fs.h"
#include "mem2.hpp"
#include "mload.h" #include "mload.h"
#include "sys.h"
#include "channel/channel_launcher.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
#include "memory/memory.h"
#include "wiiuse/wpad.h"
/* Variables */ /* Variables */
static bool reset = false; static bool reset = false;

View File

@ -2,8 +2,6 @@
#include <ogcsys.h> #include <ogcsys.h>
#include <string.h> #include <string.h>
#include "gecko.h"
#define MAX_BLOCKSIZE 0x10000 #define MAX_BLOCKSIZE 0x10000
u64 le64(u64 x) u64 le64(u64 x)

View File

@ -34,9 +34,6 @@ u64 le64(u64);
u32 le32(u32); u32 le32(u32);
u16 le16(u16); u16 le16(u16);
typedef volatile unsigned short vu16;
typedef volatile unsigned int vu32;
bool str_replace(char *str, const char *olds, const char *news, int size); bool str_replace(char *str, const char *olds, const char *news, int size);
bool str_replace_all(char *str, const char *olds, const char *news, int size); bool str_replace_all(char *str, const char *olds, const char *news, int size);

View File

@ -9,9 +9,6 @@
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <ctype.h> #include <ctype.h>
#include "libwbfs/libwbfs.h"
#include "sdhc.h"
#include "usbstorage.h"
#include "utils.h" #include "utils.h"
#include "wbfs.h" #include "wbfs.h"
#include "wdvd.h" #include "wdvd.h"
@ -20,8 +17,12 @@
#include "wbfs_ext.h" #include "wbfs_ext.h"
#include "sys.h" #include "sys.h"
#include "disc.h" #include "disc.h"
#include "gecko.h"
#include "mem2.hpp" #include "devicemounter/sdhc.h"
#include "devicemounter/usbstorage.h"
#include "libwbfs/libwbfs.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
/* Constants */ /* Constants */
#define MAX_NB_SECTORS 32 #define MAX_NB_SECTORS 32

View File

@ -12,7 +12,6 @@ extern "C" {
#define WBFS_MIN_DEVICE 1 #define WBFS_MIN_DEVICE 1
#define WBFS_MAX_DEVICE 2 #define WBFS_MAX_DEVICE 2
//also menu.hpp
#define PART_FS_WBFS 0 #define PART_FS_WBFS 0
#define PART_FS_FAT 1 #define PART_FS_FAT 1
#define PART_FS_NTFS 2 #define PART_FS_NTFS 2

View File

@ -11,17 +11,18 @@
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <ctype.h> #include <ctype.h>
#include "libwbfs/libwbfs.h"
#include "sdhc.h"
#include "usbstorage.h"
#include "wbfs.h" #include "wbfs.h"
#include "wdvd.h" #include "wdvd.h"
#include "splits.h" #include "splits.h"
#include "wbfs_ext.h" #include "wbfs_ext.h"
#include "utils.h" #include "utils.h"
#include "disc.h" #include "disc.h"
#include "gecko.h"
#include "gc/fileOps.h" #include "devicemounter/sdhc.h"
#include "devicemounter/usbstorage.h"
#include "fileOps/fileOps.h"
#include "gecko/gecko.h"
#include "libwbfs/libwbfs.h"
#define MAX_FAT_PATH 1024 #define MAX_FAT_PATH 1024
#define TITLE_LEN 64 #define TITLE_LEN 64

View File

@ -2,7 +2,7 @@
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>
#include <ogcsys.h> #include <ogcsys.h>
#include "gecko.h" #include "gecko/gecko.h"
/* Constants */ /* Constants */
#define IOCTL_DI_READID 0x70 #define IOCTL_DI_READID 0x70

View File

@ -3,9 +3,10 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "mem2.hpp"
#include "gecko.h"
#include "wip.h" #include "wip.h"
#include "gecko/gecko.h"
#include "memory/mem2.hpp"
static WIP_Code * CodeList = NULL; static WIP_Code * CodeList = NULL;
static u32 CodesCount = 0; static u32 CodesCount = 0;

View File

@ -1,21 +1,23 @@
#include "video.hpp"
#include "menu/menu.hpp"
#include "loader/disc.h"
#include <ogc/system.h>
#include <unistd.h>
#include "defines.h"
#include "svnrev.h"
#include "channel/nand.hpp"
#include "devicemounter/DeviceHandler.hpp"
#include "gecko/gecko.h"
#include "gecko/wifi_gecko.h"
#include "gui/video.hpp"
#include "gui/text.hpp"
#include "homebrew/homebrew.h"
#include "loader/disc.h"
#include "loader/alt_ios.h" #include "loader/alt_ios.h"
#include "loader/sys.h" #include "loader/sys.h"
#include "loader/wbfs.h" #include "loader/wbfs.h"
#include "text.hpp" #include "loader/cios.h"
#include <ogc/system.h> #include "menu/menu.hpp"
#include <unistd.h>
#include "DeviceHandler.hpp"
#include "homebrew.h"
#include "gecko.h"
#include "wifi_gecko.h"
#include "cios.h"
#include "nand.hpp"
#include "defines.h"
#include "svnrev.h"
CMenu *mainMenu; CMenu *mainMenu;
@ -30,7 +32,7 @@ extern "C"
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
__exception_setreload(5); __exception_setreload(5);
geckoinit = InitGecko(); InitGecko();
// Init video // Init video
CVideo vid; CVideo vid;
@ -105,7 +107,6 @@ int main(int argc, char **argv)
#else #else
bool deviceAvailable = true; bool deviceAvailable = true;
DeviceHandler::Instance()->MountAll(); DeviceHandler::Instance()->MountAll();
sleep(1);
#endif #endif
bool dipOK = Disc_Init() >= 0; bool dipOK = Disc_Init() >= 0;

View File

@ -5,8 +5,8 @@
#include "mem2.hpp" #include "mem2.hpp"
#include "mem2alloc.hpp" #include "mem2alloc.hpp"
#include "gecko.h" #include "gecko/gecko.h"
#include "utils.h" #include "loader/utils.h"
// Forbid the use of MEM2 through malloc // Forbid the use of MEM2 through malloc
u32 MALLOC_MEM2 = 0; u32 MALLOC_MEM2 = 0;
@ -74,6 +74,12 @@ void *MEM2_alloc(unsigned int s)
return g_mem2gp.allocate(s); return g_mem2gp.allocate(s);
} }
/* Placeholder, will be needed with new memory manager */
void *MEM2_memalign(unsigned int /* alignment */, unsigned int s)
{
return MEM2_alloc(s);
}
void *MEM2_realloc(void *p, unsigned int s) void *MEM2_realloc(void *p, unsigned int s)
{ {
return g_mem2gp.reallocate(p, s); return g_mem2gp.reallocate(p, s);

View File

@ -22,6 +22,7 @@ void MEM2_cleanup(void);
void MEM2_clear(void); void MEM2_clear(void);
void MEM2_free(void *p); void MEM2_free(void *p);
void *MEM2_alloc(unsigned int s); void *MEM2_alloc(unsigned int s);
void *MEM2_memalign(unsigned int /* alignment */, unsigned int s);
void *MEM2_realloc(void *p, unsigned int s); void *MEM2_realloc(void *p, unsigned int s);
unsigned int MEM2_usableSize(void *p); unsigned int MEM2_usableSize(void *p);
unsigned int MEM2_freesize(); unsigned int MEM2_freesize();

View File

@ -7,9 +7,9 @@
#include <algorithm> #include <algorithm>
#include <malloc.h> #include <malloc.h>
#include "utils.h"
#include "mem2.hpp" #include "mem2.hpp"
#include "gui_sound.h" #include "loader/utils.h"
#include "music/gui_sound.h"
template <class T> class SmartPtr template <class T> class SmartPtr
{ {

View File

@ -1,9 +1,3 @@
#include "menu.hpp"
#include "loader/sys.h"
#include "loader/wbfs.h"
#include "loader/alt_ios.h"
#include "network/gcard.h"
#include <fstream> #include <fstream>
#include <sys/stat.h> #include <sys/stat.h>
@ -13,20 +7,24 @@
#include <network.h> #include <network.h>
#include <errno.h> #include <errno.h>
#include "gecko.h" #include "menu.hpp"
#include "types.h" #include "types.h"
#include "fonts.h" #include "fonts.h"
#include "music/SoundHandler.hpp" #include "banner/BannerWindow.hpp"
#include "fs.h" #include "channel/nand.hpp"
#include "U8Archive.h" #include "fileOps/fileOps.h"
#include "nand.hpp" #include "gc/gc.hpp"
#include "cios.h" #include "gui/Gekko.h"
#include "gui/GameTDB.hpp"
#include "loader/alt_ios.h"
#include "loader/cios.h"
#include "loader/fs.h"
#include "loader/playlog.h" #include "loader/playlog.h"
#include "gc/fileOps.h" #include "loader/sys.h"
#include "gc/gc.h" #include "loader/wbfs.h"
#include "Gekko.h" #include "music/SoundHandler.hpp"
#include "GameTDB.hpp" #include "network/gcard.h"
#include "BannerWindow.hpp" #include "unzip/U8Archive.h"
// Sounds // Sounds
extern const u8 click_wav[]; extern const u8 click_wav[];

View File

@ -2,33 +2,29 @@
#define __MENU_HPP #define __MENU_HPP
//#define SHOWMEM 1 //#define SHOWMEM 1
//#define SHOWMEMGECKO //#define SHOWMEMGECKO
#include "wiiuse/wpad.h"
#include <ogc/pad.h> #include <ogc/pad.h>
#include <vector> #include <vector>
#include "cachedlist.hpp"
#include "plugin/plugin.hpp"
#include <map> #include <map>
#include "gui_sound.h"
#include "cursor.hpp"
#include "gui.hpp"
#include "coverflow.hpp"
#include "fanart.hpp"
#include "loader/disc.h"
#include "btnmap.h"
#include "banner.h"
#include "channels.h"
#include "gct.h"
#include "DeviceHandler.hpp"
#include "musicplayer.h"
#include "loader/gc_disc_dump.hpp"
//Also in wbfs.h #include "btnmap.h"
#define PART_FS_WBFS 0 #include "channel/banner.h"
#define PART_FS_FAT 1 #include "channel/channels.h"
#define PART_FS_NTFS 2 #include "cheats/gct.h"
#define PART_FS_EXT 3 #include "devicemounter/DeviceHandler.hpp"
#include "gecko/gecko.h"
#include "gui/coverflow.hpp"
#include "gui/cursor.hpp"
#include "gui/fanart.hpp"
#include "gui/gui.hpp"
#include "list/cachedlist.hpp"
#include "loader/disc.h"
#include "loader/gc_disc_dump.hpp"
#include "loader/wbfs.h"
#include "music/gui_sound.h"
#include "music/musicplayer.h"
#include "plugin/plugin.hpp"
#include "wiiuse/wpad.h"
using namespace std; using namespace std;

View File

@ -1,12 +1,11 @@
#include "menu.hpp" #include "menu.hpp"
#include "nand.hpp"
#include "svnrev.h"
#include "sys.h"
#include "alt_ios.h"
#include "defines.h" #include "defines.h"
#include "cios.h" #include "svnrev.h"
#include "channel/nand.hpp"
#include "loader/alt_ios.h"
#include "loader/cios.h"
#include "loader/sys.h"
const int pixels_to_skip = 10; const int pixels_to_skip = 10;

View File

@ -1,12 +1,11 @@
#include <string.h> #include <string.h>
#include <gccore.h> #include <gccore.h>
#include "text.hpp"
#include "lockMutex.hpp"
#include "menu.hpp" #include "menu.hpp"
#include "http.h" #include "lockMutex.hpp"
#include "sys.h" #include "gui/text.hpp"
#include "loader/sys.h"
#include "network/http.h"
#define GECKOURL "http://geckocodes.org/codes/%c/%s.txt" #define GECKOURL "http://geckocodes.org/codes/%c/%s.txt"
#define CHEATSPERPAGE 4 #define CHEATSPERPAGE 4

View File

@ -1,10 +1,9 @@
#include "menu.hpp" #include "menu.hpp"
#include "nand.hpp" #include "channel/nand.hpp"
#include "sys.h"
#include "loader/cios.h"
#include "loader/alt_ios.h" #include "loader/alt_ios.h"
#include "gecko/gecko.h" #include "loader/cios.h"
#include "loader/sys.h"
const int CMenu::_nbCfgPages = 6; const int CMenu::_nbCfgPages = 6;
static const int g_curPage = 1; static const int g_curPage = 1;

View File

@ -1,9 +1,6 @@
#include "menu.hpp" #include "menu.hpp"
#define ARRAY_SIZE(a) (sizeof a / sizeof a[0])
static const int g_curPage = 3; static const int g_curPage = 3;
template <class T> static inline T loopNum(T i, T s) template <class T> static inline T loopNum(T i, T s)

View File

@ -1,11 +1,11 @@
#include "menu.hpp" #include "menu.hpp"
#include "loader/sys.h"
#include "channels.h"
#include "gecko.h"
#include "defines.h" #include "defines.h"
#include "nand.hpp" #include "channel/channels.h"
#include "cios.h" #include "channel/nand.hpp"
#include "gecko/gecko.h"
#include "loader/cios.h"
#include "loader/sys.h"
static const int g_curPage = 4; static const int g_curPage = 4;

View File

@ -1,13 +1,12 @@
#include "menu.hpp"
#include "wbfs.h"
#include <dirent.h> #include <dirent.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "menu.hpp"
#include "loader/wbfs.h"
using namespace std; using namespace std;
static const int g_curPage = 2; static const int g_curPage = 2;

View File

@ -1,10 +1,10 @@
#include "loader/wbfs.h"
#include "libwbfs/wiidisc.h"
#include "menu.hpp" #include "menu.hpp"
#include "types.h" #include "types.h"
#include "gecko/gecko.h"
#include "loader/wbfs.h"
#include "loader/sys.h" #include "loader/sys.h"
#include "gecko.h" #include "libwbfs/wiidisc.h"
#define ARRAY_SIZE(a) (sizeof a / sizeof a[0]) #define ARRAY_SIZE(a) (sizeof a / sizeof a[0])

View File

@ -1,27 +1,24 @@
#include "menu.hpp"
#include "svnrev.h"
#include "loader/sys.h"
#include "loader/wbfs.h"
#include "http.h"
#include "pngu.h"
#include "types.h"
#include "loader/fs.h"
#include "loader/wdvd.h"
#include "usbstorage.h"
#include "unzip/ZipFile.h"
#include <network.h> #include <network.h>
#include "gecko.h"
#include "wifi_gecko.h"
#include <fstream>
#include "lockMutex.hpp"
#include "nand.hpp"
#include "GameTDB.hpp"
#include <ogc/lwp_watchdog.h> #include <ogc/lwp_watchdog.h>
#include <time.h> #include <time.h>
#include <fstream>
#include "menu.hpp"
#include "svnrev.h"
#include "types.h"
#include "lockMutex.hpp"
#include "channel/nand.hpp"
#include "devicemounter/usbstorage.h"
#include "gecko/gecko.h"
#include "gecko/wifi_gecko.h"
#include "gui/GameTDB.hpp"
#include "gui/pngu.h"
#include "loader/fs.h"
#include "loader/sys.h"
#include "loader/wbfs.h"
#include "loader/wdvd.h"
#include "network/http.h"
#include "unzip/ZipFile.h"
#define TAG_GAME_ID "{gameid}" #define TAG_GAME_ID "{gameid}"
#define TAG_LOC "{loc}" #define TAG_LOC "{loc}"
@ -31,13 +28,6 @@
#define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE" #define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE"
#define UPDATE_URL_VERSION "http://dl.dropbox.com/u/25620767/WiiflowMod/versions.txt" #define UPDATE_URL_VERSION "http://dl.dropbox.com/u/25620767/WiiflowMod/versions.txt"
#define STACK_ALIGN(type, name, cnt, alignment) \
u8 _al__##name[((sizeof(type)*(cnt)) + (alignment) + \
(((sizeof(type)*(cnt))%(alignment)) > 0 ? ((alignment) - \
((sizeof(type)*(cnt))%(alignment))) : 0))]; \
type *name = (type*)(((u32)(_al__##name)) + ((alignment) - (( \
(u32)(_al__##name))&((alignment)-1))))
static const char FMT_BPIC_URL[] = "http://art.gametdb.com/{console}/coverfullHQ/{loc}/{gameid}.png"\ static const char FMT_BPIC_URL[] = "http://art.gametdb.com/{console}/coverfullHQ/{loc}/{gameid}.png"\
"|http://art.gametdb.com/{console}/coverfull/{loc}/{gameid}.png"; "|http://art.gametdb.com/{console}/coverfull/{loc}/{gameid}.png";
static const char FMT_PIC_URL[] = "http://art.gametdb.com/{console}/cover/{loc}/{gameid}.png"; static const char FMT_PIC_URL[] = "http://art.gametdb.com/{console}/cover/{loc}/{gameid}.png";

View File

@ -1,6 +1,6 @@
#include "menu.hpp" #include "menu.hpp"
#include "gecko.h" #include "gecko/gecko.h"
extern const u8 error_png[]; extern const u8 error_png[];
u16 m_errorLblMessage; u16 m_errorLblMessage;

View File

@ -1,47 +1,41 @@
#include "menu.hpp"
#include "loader/patchcode.h"
#include "loader/sys.h"
#include "loader/wdvd.h"
#include "loader/alt_ios.h"
#include "loader/playlog.h"
#include <ogc/machine/processor.h> #include <ogc/machine/processor.h>
#include <ogc/lwp_threads.h> #include <ogc/lwp_threads.h>
#include <unistd.h> #include <unistd.h>
#include <time.h> #include <time.h>
#include "network/http.h"
#include "network/gcard.h"
#include "DeviceHandler.hpp"
#include "loader/wbfs.h"
#include "wip.h"
#include "channel_launcher.h"
#include "BannerWindow.hpp"
#include <network.h> #include <network.h>
#include <errno.h> #include <errno.h>
#include "loader/frag.h" #include "menu.hpp"
#include "loader/fst.h" #include "types.h"
#include "cios.h" #include "banner/BannerWindow.hpp"
#include "channel/channel_launcher.h"
#include "channel/channels.h"
#include "channel/nand.hpp"
#include "devicemounter/DeviceHandler.hpp"
#include "devicemounter/usbstorage.h"
#include "fileOps/fileOps.h"
#include "gc/gc.hpp"
#include "gc/gcdisc.hpp"
#include "gecko/gecko.h"
#include "gui/WiiMovie.hpp" #include "gui/WiiMovie.hpp"
#include "gui/GameTDB.hpp" #include "gui/GameTDB.hpp"
#include "channels.h" #include "gui/Gekko.h"
#include "nand.hpp" #include "homebrew/homebrew.h"
#include "alt_ios.h" #include "loader/alt_ios.h"
#include "gecko.h" #include "loader/patchcode.h"
#include "homebrew.h" #include "loader/sys.h"
#include "types.h" #include "loader/wdvd.h"
#include "nk.h" #include "loader/alt_ios.h"
#include "gc/gc.h" #include "loader/playlog.h"
#include "gc/fileOps.h" #include "loader/wbfs.h"
#include "gc/gcdisc.hpp" #include "loader/wip.h"
#include "Gekko.h" #include "loader/frag.h"
#include "loader/fst.h"
#ifndef DOLPHIN #include "loader/cios.h"
#include "devicemounter/usbstorage.h" #include "loader/nk.h"
#endif #include "network/http.h"
#include "network/gcard.h"
extern const u8 btngamecfg_png[]; extern const u8 btngamecfg_png[];
extern const u8 btngamecfgs_png[]; extern const u8 btngamecfgs_png[];

View File

@ -1,11 +1,9 @@
#include "menu.hpp" #include "menu.hpp"
#include "wiiuse/wpad.h" #include "gui/GameTDB.hpp"
#include "loader/alt_ios.h"
#include "GameTDB.hpp" #include "loader/sys.h"
#include "alt_ios.h"
#include "gecko.h"
#include "sys.h"
extern const u8 wifi1_png[]; extern const u8 wifi1_png[];
extern const u8 wifi2_png[]; extern const u8 wifi2_png[];

View File

@ -1,8 +1,8 @@
#include "menu.hpp" #include "menu.hpp"
#include "svnrev.h" #include "svnrev.h"
#include "cios.h" #include "loader/cios.h"
#include "nk.h" #include "loader/nk.h"
u32 m_homeLblTitle; u32 m_homeLblTitle;
u32 m_exittoLblTitle; u32 m_exittoLblTitle;

View File

@ -1,7 +1,8 @@
#include "menu.hpp"
#include "gecko.h"
#include <stdlib.h> #include <stdlib.h>
#include "menu.hpp"
static const u32 g_repeatDelay = 25; static const u32 g_repeatDelay = 25;
void CMenu::SetupInput(bool reset_pos) void CMenu::SetupInput(bool reset_pos)

View File

@ -1,20 +1,19 @@
#include "menu.hpp"
#include "nand.hpp"
#include "loader/wdvd.h"
#include "network/gcard.h"
#include "DeviceHandler.hpp"
#include <unistd.h> #include <unistd.h>
#include <fstream> #include <fstream>
#include <sys/stat.h> #include <sys/stat.h>
#include "wbfs.h" #include "menu.hpp"
#include "gecko.h" #include "channel/nand.hpp"
#include "sys.h" #include "devicemounter/DeviceHandler.hpp"
#include "disc.h" #include "gui/GameTDB.hpp"
#include "loader/cios.h"
#include "loader/alt_ios.h" #include "loader/alt_ios.h"
#include "GameTDB.hpp" #include "loader/cios.h"
#include "loader/disc.h"
#include "loader/sys.h"
#include "loader/wbfs.h"
#include "loader/wdvd.h"
#include "network/gcard.h"
extern const u8 btnconfig_png[]; extern const u8 btnconfig_png[];
extern const u8 btnconfigs_png[]; extern const u8 btnconfigs_png[];

View File

@ -1,13 +1,12 @@
#include "menu.hpp" #include "menu.hpp"
#include "nand.hpp"
#include "sys.h"
#include "loader/cios.h"
#include "loader/alt_ios.h"
#include "lockMutex.hpp"
#include "gecko/gecko.h"
#include "defines.h" #include "defines.h"
#include "fileOps.h" #include "lockMutex.hpp"
#include "channel/nand.hpp"
#include "fileOps/fileOps.h"
#include "loader/alt_ios.h"
#include "loader/cios.h"
#include "loader/sys.h"
// NandEmulation menu // NandEmulation menu
u16 m_nandemuLblTitle; u16 m_nandemuLblTitle;

View File

@ -1,13 +1,10 @@
#include "svnrev.h"
#include "menu.hpp"
#include "menu.hpp"
#include "svnrev.h"
#include "defines.h"
#include "lockMutex.hpp"
#include "loader/sys.h" #include "loader/sys.h"
#include "loader/wbfs.h" #include "loader/wbfs.h"
#include "gecko.h"
#include "lockMutex.hpp"
#include "defines.h"
#define newIOS 249
extern int mainIOS; extern int mainIOS;

View File

@ -1,14 +1,14 @@
#include "menu.hpp" #include "menu.hpp"
#include "loader/wbfs.h"
#include "lockMutex.hpp"
#include "loader/gc_disc_dump.hpp"
#include "gc.h"
#include "fileOps.h"
#include "music/SoundHandler.hpp"
#include "channel/nand.hpp"
#include "types.h" #include "types.h"
#include "wdvd.h" #include "lockMutex.hpp"
#include "channel/nand.hpp"
#include "gc/gc.hpp"
#include "fileOps/fileOps.h"
#include "loader/wbfs.h"
#include "loader/wdvd.h"
#include "loader/gc_disc_dump.hpp"
#include "music/SoundHandler.hpp"
void CMenu::_hideWBFS(bool instant) void CMenu::_hideWBFS(bool instant)
{ {

View File

@ -23,10 +23,9 @@
* *
* for WiiXplorer 2010 * for WiiXplorer 2010
***************************************************************************/ ***************************************************************************/
#include <malloc.h>
#include "BufferCircle.hpp" #include "BufferCircle.hpp"
#include "utils.h" #include "loader/utils.h"
#include "memory/mem2.hpp"
BufferCircle::BufferCircle() BufferCircle::BufferCircle()
{ {
@ -52,9 +51,9 @@ void BufferCircle::SetBufferBlockSize(int size)
for(int i = 0; i < Size(); i++) for(int i = 0; i < Size(); i++)
{ {
if(SoundBuffer[i] != NULL) if(SoundBuffer[i] != NULL)
free(SoundBuffer[i]); MEM2_free(SoundBuffer[i]);
SoundBuffer[i] = (u8 *)malloc(BufferBlockSize); SoundBuffer[i] = (u8 *)MEM2_memalign(32, BufferBlockSize);
memset(SoundBuffer[i], 0, BufferBlockSize); memset(SoundBuffer[i], 0, BufferBlockSize);
BufferSize[i] = 0; BufferSize[i] = 0;
BufferReady[i] = false; BufferReady[i] = false;
@ -76,7 +75,7 @@ void BufferCircle::Resize(int size)
{ {
if(BufferBlockSize > 0) if(BufferBlockSize > 0)
{ {
SoundBuffer[i] = (u8 *)malloc(BufferBlockSize); SoundBuffer[i] = (u8 *)MEM2_memalign(32, BufferBlockSize);
memset(SoundBuffer[i], 0, BufferBlockSize); memset(SoundBuffer[i], 0, BufferBlockSize);
} }
else else
@ -92,7 +91,7 @@ void BufferCircle::RemoveBuffer(int pos)
return; return;
if(SoundBuffer[pos] != NULL) if(SoundBuffer[pos] != NULL)
free(SoundBuffer[pos]); MEM2_free(SoundBuffer[pos]);
SoundBuffer.erase(SoundBuffer.begin()+pos); SoundBuffer.erase(SoundBuffer.begin()+pos);
BufferSize.erase(BufferSize.begin()+pos); BufferSize.erase(BufferSize.begin()+pos);
@ -114,7 +113,7 @@ void BufferCircle::FreeBuffer()
for(int i = 0; i < Size(); i++) for(int i = 0; i < Size(); i++)
{ {
if(SoundBuffer[i] != NULL) if(SoundBuffer[i] != NULL)
free(SoundBuffer[i]); MEM2_free(SoundBuffer[i]);
BufferSize[i] = 0; BufferSize[i] = 0;
BufferReady[i] = false; BufferReady[i] = false;
} }

Some files were not shown because too many files have changed in this diff Show More