frostegater
25.04.2011, 11:15
Здесь будем выкладывать интересные и полезные исходные коды программ, прошивок, хенов, плагинов, игр...
Список исходных кодов:
Game Categories v12 (http://www.pspx.ru/forum/showpost.php?p=983485&postcount=2) by Bubbletune
UMD Dump.prx (http://www.pspx.ru/forum/showpost.php?p=957485&postcount=3)
3.40 Open Edition CFW (http://www.pspx.ru/forum/showpost.php?p=957486&postcount=4)
PSP Module Checker 1.0 (http://www.pspx.ru/forum/showpost.php?p=972851&postcount=5) by J416
sprintf() (http://www.pspx.ru/forum/showpost.php?p=974948&postcount=6) by Frostegater
Воспроизведение WAV файлов (http://www.pspx.ru/forum/showpost.php?p=978077&postcount=7)
Battlegrounds 3 (http://www.pspx.ru/forum/showpost.php?p=978375&postcount=8)
CXMB (http://www.pspx.ru/forum/showpost.php?p=983486&postcount=9) by Poison
frostegater
25.04.2011, 11:15
Здесь будем выкладывать интересные и полезные исходные коды программ, прошивок, хенов, плагинов, игр...
Пожалуй я начну =)
Game Categories v12 от Bubbletune
Тема (http://www.pspx.ru/forum/showthread.php?t=83296)
Источник: psp-hacks.com
frostegater
25.04.2011, 11:19
UMD Dump.prx
Тема (http://www.pspx.ru/forum/showthread.php?t=87283)
Источник: psp-hacks.com
frostegater
25.04.2011, 11:25
Реверс прошивки 3.40 OE
Источник: psp-hacks.com
frostegater
22.07.2011, 06:33
"Реверс", а вернее восстановленый код (причём довольно точно) PSP Module Checker 1.0 by J416..
Написан нубски. Как было, так и восстановил, просто можно было автору не морокаться с index`ами, а завязать на kuKernelGetModel().
2ой аттач - завязал на kubridge, что заметно сократило код.
frostegater
07.08.2011, 21:38
Пришла в голову идея поиграться со sprintf() ^_^ и интересно почему так не сделал J416?
SceUID fd;
char buf[256];
int null, i;
for(i=1;; i++)
{
sprintf(buf, "flash0:/vsh/etc/index_%s%dg.dat", i < 10? "0" : NULL, i);
fd = sceIoOpen(buf, PSP_O_RDONLY, 777);
if(fd > 0)
{
printf("Module: %s%dg\n", i < 10? "0" : NULL, i);
sceIoClose(fd);
break;
}
sceIoClose(fd);
}
Программа запускающая WAV файлы
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#define PSPSAMPLERATE 44100
PSP_MODULE_INFO("WAV Player",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
int exit_callback(int arg1, int arg2, void *common)
{
sceKernelExitGame();
return 0;
}
int CallbackThread(SceSize args, void *argp)
{
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
int SetupCallbacks(void)
{
int thid = 0;
thid=sceKernelCreateThread("update_thread",CallbackThread,0x11,0xFA0,0,0);
if (thid >= 0)
{
sceKernelStartThread(thid,0,0);
}
return thid;
}
short* data;
int dataLength=0,fmtSize=0,dataPos=0,sigBytes=0,numChannels=0,sampleRate=0,BPS=0,dat aLocation=0;
int pause=0;
SceCtrlData pad,lastPad;
FILE* f;
void Seek(int time)
{
dataPos=(int)(time*BPS);
fseek(f,dataPos+dataLocation,SEEK_SET);
}
void updateAudio(void* buf, unsigned int length, void *userdata)
{
int i;
short* mbuf=(short*)buf;
if (pause)
{
for(i=0;i<2*length;i++) mbuf[i]=0;
return;
}
if ((dataPos+numChannels*length)>(dataLength)) sceKernelExitGame();
for(i=0;i<length;i++)
{
mbuf[2*i]=data[numChannels*(int)(i*sampleRate/PSPSAMPLERATE)];
mbuf[2*i+1]=data[numChannels*(int)(i*sampleRate/PSPSAMPLERATE)+((numChannels==2)?1:0)];
}
dataPos+=(length*sigBytes*numChannels*sampleRate/PSPSAMPLERATE);
fread((char*)data,1,length*sigBytes*numChannels*sampleRate/PSPSAMPLERATE,f);
pspDebugScreenSetXY(0,14);
pspDebugScreenPrintf("Time: %i / %i \n",(int)(dataPos/BPS),(int)(dataLength/BPS));
}
int main(void)
{
pspDebugScreenInit();
pspAudioInit();
SetupCallbacks();
int chunksRead=0;
char c[5];
c[4]='\0';
int* i=(int*) malloc(sizeof(int));
f=fopen("./testcase.wav","r");
fread(c,1,4,f);
if (strcmp(c,"RIFF"))
sceKernelExitGame();
else
pspDebugScreenPrintf("'RIFF' Header\n");
fread((char*)i,1,4,f);
pspDebugScreenPrintf("Size: %i Bytes\n",*i);
fread(c,1,4,f);
if (strcmp(c,"WAVE"))
sceKernelExitGame();
else
pspDebugScreenPrintf("RIFF Type: %s\n",c);
while(chunksRead<2)
{
fread(c,1,4,f);
if (!strcmp(c,"fmt "))
{
pspDebugScreenPrintf("'fmt ' Header\n");
fread((char*)i,1,4,f);
pspDebugScreenPrintf("Size: %i Bytes\n",*i);
fmtSize=*i;
*i=0;
fread((char*)i,1,2,f);
if ((*i!=0) && (*i!=1))
sceKernelExitGame();
pspDebugScreenPrintf("Compression Code: %i\n",*i);
*i=0;
fread((char*)i,1,2,f);
pspDebugScreenPrintf("Channels: %i\n",*i);
numChannels=*i;
fread((char*)i,1,4,f);
pspDebugScreenPrintf("Sample Rate: %i\n",*i);
sampleRate=*i;
fread((char*)i,1,4,f);
pspDebugScreenPrintf("Bytes Per Second: %i\n",*i);
BPS=*i;
*i=0;
fread((char*)i,1,2,f);
pspDebugScreenPrintf("Block Align: %i\n",*i);
*i=0;
fread((char*)i,1,2,f);
pspDebugScreenPrintf("Significant Bits Per Sample: %i\n",*i);
sigBytes=*i>>3;
fread(c,1,fmtSize-16,f);
chunksRead++;
continue;
}
if (!strcmp(c,"data"))
{
if (chunksRead==0)
sceKernelExitGame();
pspDebugScreenPrintf("'data' Header\n");
fread((char*)i,1,4,f);
dataLength=*i;
dataLocation=ftell(f);
pspDebugScreenPrintf("Size: %i",dataLength);
data=(short*) malloc(1024*sigBytes*numChannels*sampleRate/PSPSAMPLERATE);
fread((char*)data,1,1024*sigBytes*numChannels*sampleRate/PSPSAMPLERATE,f);
chunksRead++;
continue;
}
fread((char*)i,1,4,f);
fread(c,1,*i,f);
}
pspAudioSetChannelCallback(0,updateAudio,NULL);
while(1)
{
sceCtrlReadBufferPositive(&pad,1);
if((pad.Buttons&PSP_CTRL_SQUARE)&&(!(lastPad.Buttons&PSP_CTRL_SQUARE))) Seek(10);
if((pad.Buttons&PSP_CTRL_START)&&(!(lastPad.Buttons&PSP_CTRL_START))) pause=!pause;
lastPad=pad;
}
return 0;
}
И Makefile естественно
TARGET = wavplayer
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS= -lpspaudiolib -lpspaudio
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = WAV Player
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
FeelCool
31.08.2011, 22:16
Battlegrounds 3
http://pspslimhacks.com/wp-content/uploads/2009/11/Battlegrounds3-04x.jpg
Homebrew разработчик Xfacter выпустила Battlegrounds3 0.4x. Его 3-й танк на воздушной подушке Deathmatch игры. У вас есть разнообразное оружие, чтобы победить своих оппонентов и защищать свою Родину.
Battlegrounds3 0.4x изменений:
BG3 был обновлен. Новое в этой версии
* Настраиваемое управление
* Сохраните вашу статистику игры
* Более настраиваемый игры
* Небольшие хитрости и исправлений
Кроме того, исходный код теперь свободно доступен под лицензией BSD.
Скачать с источника (http://pspslimhacks.com/download/392/) или из вложения (http://www.pspx.ru/forum/attachment.php?attachmentid=4270&d=1318047901)
Источник: pspslimhacks.com
ErikPshat
08.10.2011, 08:57
CXMB by Poison (HBPoison)
PSP XMB CTF Theme enabler
Last changes: r6 - add 5.00 support - Oct 26, 2008
Тема на форуме (http://www.pspx.ru/forum/showthread.php?t=76745) (plugin updated by patpat (http://patpat.blog.35.cn/))
Источник (http://code.google.com/p/cxmb/source/list)
ErikPshat, http://wololo.net/talk/viewtopic.php?f=5&t=8164
6.60 версия.
Updated by <--
Ну и естественно исходники я приложил ))
ErikPshat, вот! Bin + Src (http://www.pspx.ru/forum/attachment.php?attachmentid=4273&d=1318056862).
Redbuled
31.10.2011, 17:58
PSP-Maps-2.0
Источник: psp-hacks.com (http://psp.dashhacks.com/)
Есть ли смысл выкладывать луа?
frostegater
31.10.2011, 18:33
Есть ли смысл выкладывать луа?
Выкладуй, чо.. и лучше лей в аттачи.
Redbuled
01.11.2011, 09:24
Выкладывать все исходники на этот сайт не вижу смысла, если можно дать ссыль на отличный ресурс
P.s. ресурс англоязычный
Сайт с богатым набором исходников(С++) (http://psp.brewology.com/downloads/?dcid=203)
+ Lua (http://psp.brewology.com/downloads/?dcid=194)
frostegater
01.11.2011, 10:05
verGen Source Code
Исходники моей проги для ультимат генерации version.txt... только что выпустил.
+bonus внутри: исходники bin2font - консольная прога, перегоняющая бинарник в шрифт в u8, написана на Visual C++.
Источник: http://psdev.ru/?p=62.
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc. Перевод: zCarot