Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Update to v3.80: AT3 and AT3P support
Browse files Browse the repository at this point in the history
- AT3 and AT3P support
- Fully switch to SceLibc
- Fixed FLAC seeking issues
  • Loading branch information
GrapheneCt authored Nov 11, 2020
1 parent a05b0b8 commit 24bb372
Show file tree
Hide file tree
Showing 26 changed files with 750 additions and 134 deletions.
47 changes: 31 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@ endif()

include("$ENV{DOLCESDK}/share/dolce.cmake" REQUIRED)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
COMMAND dolce-make-bootparam app_memsize 0x4000 attribute 0x08 ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
)

project(ElevenMPV)
dolce_gen_libs(SceLibc_stubs
SceLibc.yml
LIB SceLibc_stub_weak)
dolce_gen_libs(SceShellSvc_stubs
SceShellSvc.yml
LIB SceShellSvc_stub_weak)
set(VITA_APP_NAME "Eleven Music Player")
set(VITA_TITLEID "GRVA00008")
set(VITA_VERSION "03.80")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -Wl,--no-wchar-size-warning,--no-enum-size-warning -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Os -Wl,--no-wchar-size-warning,--no-enum-size-warning -nostdlib")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include_directories(
Expand Down Expand Up @@ -61,10 +50,13 @@ add_executable(${PROJECT_NAME}
source/audio/xm.c
source/audio/aac.c
source/audio/at9.c
source/audio/at3.c
source/audio/id3.c
source/menus/menu_audioplayer.c
source/menus/menu_displayfiles.c
source/menus/menu_settings.c
source/psp2_compat.c
source/fios2_common.c
)

target_link_libraries(${PROJECT_NAME}
Expand All @@ -75,36 +67,58 @@ target_link_libraries(${PROJECT_NAME}
vorbis
ogg
xmp-lite
png
png16v2ds
z
ShellAudio
SceLibKernel_stub
SceSysmem_stub
SceKernelThreadMgr_stub
SceKernelModuleMgr_stub
SceProcessMgr_stub
SceIofilemgr_stub
SceLibRng_stub
taihen_stub
SceAppMgr_stub
SceSharedFb_stub
SceAppUtil_stub
SceAudio_stub
SceCtrl_stub
SceDisplayUser_stub
SceDisplay_stub
SceNotificationUtilProgress_stub
SceGxm_stub
SceGxmInternalForVsh_stub
SceGxmInternal_stub
ScePower_stub
SceShellSvc_stub
SceSysmodule_stub
SceTouch_stub
SceShellSvc_stub_weak
SceShellUtil_stub
SceSystemGesture_stub
SceIme_stub
SceMotion_stub
SceVshBridge_stub
SceLibc_stub_weak
SceNotificationUtil_stub
SceJpegArm_stub
ScePvf_stub
SceDbg_stub
SceFios2_stub
SceKernelDmacMgr_stub
SceLibm_stub
SceLibc_stub
SceRtabi_stub
SceAudiocodec_stub
VarHelper_stub
gcc
)

set(DOLCE_MKSFOEX_FLAGS "${DOLCE_MKSFOEX_FLAGS} -d ATTRIBUTE=17338760 -s CATEGORY=gdc")
set(DOLCE_ELF_CREATE_FLAGS "${DOLCE_ELF_CREATE_FLAGS} -h 544288")
set(DOLCE_ELF_CREATE_FLAGS "${DOLCE_ELF_CREATE_FLAGS} -h 2097152")

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
COMMAND dolce-make-bootparam app_memsize 0x4000 attribute 0x10 ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
)

dolce_create_self(eboot.bin ${PROJECT_NAME} UNSAFE BOOT_PARAM ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin)

Expand Down Expand Up @@ -134,4 +148,5 @@ dolce_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} eboot.bin
FILE ${CMAKE_CURRENT_BINARY_DIR}/exit_module.skprx module/kernel/exit_module.skprx
FILE res/tex_common.gxt tex_common.gxt
FILE res/tex_dirbrowse.gxt tex_dirbrowse.gxt
FILE libs/lib/VarHelper.suprx module/user/VarHelper.suprx
)
15 changes: 15 additions & 0 deletions include/audio/at3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef _ELEVENMPV_AUDIO_AT3_H_
#define _ELEVENMPV_AUDIO_AT3_H_

#include <psp2/types.h>

int AT3_Init(const char *path);
SceUInt32 AT3_GetSampleRate(void);
SceUInt8 AT3_GetChannels(void);
void AT3_Decode(void *buf, unsigned int length, void *userdata);
SceUInt64 AT3_GetPosition(void);
SceUInt64 AT3_GetLength(void);
SceUInt64 AT3_Seek(SceUInt64 index);
void AT3_Term(void);

#endif
1 change: 1 addition & 0 deletions include/audio/vitaaudiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ void vitaAudioSetChannelCallback(vitaAudioCallback_t callback, void *userdata);
int vitaAudioInit(int frequency, SceAudioOutMode mode);
void vitaAudioEndPre(void);
void vitaAudioEnd(void);
void vitaAudioPreSetGrain(int grain);

#ifdef __cplusplus
}
Expand Down
10 changes: 10 additions & 0 deletions include/fios2_common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef _ELEVENMPV_FIOS2_H_
#define _ELEVENMPV_FIOS2_H_

#include <psp2/fios2.h>
#include <psp2/types.h>

int fios2Init(void);
int fios2CommonOpDeleteCB(void *pContext, SceFiosOp op, SceFiosOpEvent event, int err);

#endif
6 changes: 6 additions & 0 deletions include/psp2_compat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _ELEVENMPV_PSP2_COMPAT_H_
#define _ELEVENMPV_PSP2_COMPAT_H_

void psp2CompatInit(void);

#endif
2 changes: 2 additions & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <psp2/notificationutil.h>
#include <psp2/kernel/iofilemgr.h>

#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))

#define JPEGDEC_SIZE_LIMIT 262144 //500x500

#define SCE_KERNEL_ATTR_MULTI (0x00001000U)
Expand Down
2 changes: 1 addition & 1 deletion libs/include/dr_flac.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ typedef drflac_uint32 drflac_bool32;
#define DRFLAC_FALSE 0

#define DRFLAC_DEPRECATED
#define DR_FLAC_NO_STDIO
//#define DR_FLAC_NO_STDIO

int module_stop(SceSize argc, const void *args) {
sceClibPrintf("ShellAudio module stop\n");
Expand Down
Binary file added libs/lib/VarHelper.suprx
Binary file not shown.
Binary file added libs/lib/libVarHelper_stub.a
Binary file not shown.
Loading

0 comments on commit 24bb372

Please sign in to comment.