Minor changes
This commit is contained in:
parent
078fce4b3d
commit
6dfb33191f
@ -32,7 +32,7 @@ INCLUDES := include source/fatfs source/fatfs/sdmmc
|
|||||||
ARCH := -mthumb -mthumb-interwork
|
ARCH := -mthumb -mthumb-interwork
|
||||||
|
|
||||||
CFLAGS := -g -Wall -O2\
|
CFLAGS := -g -Wall -O2\
|
||||||
-march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
|
-march=armv5te -mtune=arm946e-s\
|
||||||
-ffast-math -Wno-main -std=c99\
|
-ffast-math -Wno-main -std=c99\
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ FRESULT sync_fs ( /* FR_OK: successful, FR_DISK_ERR: failed */
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
static DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst /* Cluster# to be converted */
|
DWORD clst /* Cluster# to be converted */
|
||||||
)
|
)
|
||||||
@ -829,7 +829,7 @@ DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
|
static DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst /* FAT index number (cluster number) to get the value */
|
DWORD clst /* FAT index number (cluster number) to get the value */
|
||||||
)
|
)
|
||||||
@ -884,7 +884,7 @@ DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluste
|
|||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
#if !_FS_READONLY
|
#if !_FS_READONLY
|
||||||
FRESULT put_fat (
|
static FRESULT put_fat (
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst, /* FAT index number (cluster number) to be changed */
|
DWORD clst, /* FAT index number (cluster number) to be changed */
|
||||||
DWORD val /* New value to be set to the entry */
|
DWORD val /* New value to be set to the entry */
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "../../types.h"
|
#include "../../types.h"
|
@ -2,8 +2,6 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#include "sdmmc.h"
|
#include "sdmmc.h"
|
||||||
#include "delay.h"
|
#include "delay.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
#include "types.h"
|
||||||
|
|
||||||
#define I2C1_REG_OFF 0x10161000
|
#define I2C1_REG_OFF 0x10161000
|
||||||
#define I2C2_REG_OFF 0x10144000
|
#define I2C2_REG_OFF 0x10144000
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#define PAYLOAD_ADDRESS 0x23F00000
|
#define PAYLOAD_ADDRESS 0x23F00000
|
||||||
|
|
||||||
u32 loadPayload(const char *path){
|
static u32 loadPayload(const char *path){
|
||||||
FIL payload;
|
FIL payload;
|
||||||
unsigned int br;
|
unsigned int br;
|
||||||
if(f_open(&payload, path, FA_READ) == FR_OK)
|
if(f_open(&payload, path, FA_READ) == FR_OK)
|
||||||
@ -19,7 +19,7 @@ u32 loadPayload(const char *path){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(){
|
void main(void){
|
||||||
FATFS fs;
|
FATFS fs;
|
||||||
f_mount(&fs, "0:", 1);
|
f_mount(&fs, "0:", 1);
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
#include "screeninit.h"
|
#include "screeninit.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
|
|
||||||
void initLCD()
|
void initLCD(void){
|
||||||
{
|
|
||||||
vu32 *const arm11 = (u32 *)0x1FFFFFF8;
|
vu32 *const arm11 = (u32 *)0x1FFFFFF8;
|
||||||
|
|
||||||
void __attribute__((naked)) ARM11()
|
void __attribute__((naked)) ARM11(void){
|
||||||
{
|
|
||||||
*(vu32 *)0x10141200 = 0x1007F;
|
*(vu32 *)0x10141200 = 0x1007F;
|
||||||
*(vu32 *)0x10202014 = 0x00000001;
|
*(vu32 *)0x10202014 = 0x00000001;
|
||||||
*(vu32 *)0x1020200C &= 0xFFFEFFFE;
|
*(vu32 *)0x1020200C &= 0xFFFEFFFE;
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
void initLCD();
|
void initLCD(void);
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ FRESULT sync_fs ( /* FR_OK: successful, FR_DISK_ERR: failed */
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
static DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst /* Cluster# to be converted */
|
DWORD clst /* Cluster# to be converted */
|
||||||
)
|
)
|
||||||
@ -829,7 +829,7 @@ DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
|
|||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
|
static DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst /* FAT index number (cluster number) to get the value */
|
DWORD clst /* FAT index number (cluster number) to get the value */
|
||||||
)
|
)
|
||||||
@ -884,7 +884,7 @@ DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluste
|
|||||||
/* Hidden API for hacks and disk tools */
|
/* Hidden API for hacks and disk tools */
|
||||||
|
|
||||||
#if !_FS_READONLY
|
#if !_FS_READONLY
|
||||||
FRESULT put_fat (
|
static FRESULT put_fat (
|
||||||
FATFS* fs, /* File system object */
|
FATFS* fs, /* File system object */
|
||||||
DWORD clst, /* FAT index number (cluster number) to be changed */
|
DWORD clst, /* FAT index number (cluster number) to be changed */
|
||||||
DWORD val /* New value to be set to the entry */
|
DWORD val /* New value to be set to the entry */
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#include "sdmmc.h"
|
#include "sdmmc.h"
|
||||||
#include "delay.h"
|
#include "delay.h"
|
||||||
|
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "firm.h"
|
#include "firm.h"
|
||||||
|
|
||||||
void main(){
|
void main(void){
|
||||||
mountSD();
|
mountSD();
|
||||||
setupCFW();
|
setupCFW();
|
||||||
}
|
}
|
||||||
|
|
||||||
void startCFW(){
|
void startCFW(void){
|
||||||
if(!loadFirm()) return;
|
if(!loadFirm()) return;
|
||||||
if(!patchFirm()) return;
|
if(!patchFirm()) return;
|
||||||
launchFirm();
|
launchFirm();
|
||||||
|
Reference in New Issue
Block a user