Skip to content
This repository has been archived by the owner on Mar 17, 2018. It is now read-only.

Commit

Permalink
webMAN MOD 1.43.08
Browse files Browse the repository at this point in the history
- Added /combo.ps3 (it lets call additional features. e.g.
/combo.ps3?r2+triangle  disable cfw syscalls)
- Added more parameters for control fan in /cpursx.ps3

/cpursx.ps3?fan=0 disables fan control (syscon)
/cpursx.ps3?fan=50 sets fan to 50% (manual/constant speed)
/cpursx.ps3?max=65 sets dynamic fan to 65ºC
/cpursx.ps3?mode=dyn  set dynamic fan mode (mode=man sets manual mode)

VSH Menu 0.7

- Added option to disable startup message
- Fixed a bug with left/right on Rebug menu
- New default background image by jriko
  • Loading branch information
Matsumot0 committed Oct 12, 2015
1 parent 9087c06 commit 63ab08b
Show file tree
Hide file tree
Showing 30 changed files with 233 additions and 85 deletions.
42 changes: 18 additions & 24 deletions include/combos.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@

if(!webman_config->nopad)
{
data.len=0;
if(cellPadGetData(0, &data) != CELL_PAD_OK || data.len == 0)
if(cellPadGetData(1, &data) != CELL_PAD_OK || data.len == 0)
if(cellPadGetData(2, &data) != CELL_PAD_OK) {sys_timer_usleep(300000); continue;}
#ifdef VIRTUAL_PAD
if(vcombo)
{
data.len=16; data.button[CELL_PAD_BTN_OFFSET_DIGITAL1] = (vcombo & 0xFF); data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] = (vcombo & 0xFF00) >> 8; vcombo = 0;
}
else
#endif
{
data.len=0;
if(cellPadGetData(0, &data) != CELL_PAD_OK || data.len == 0)
if(cellPadGetData(1, &data) != CELL_PAD_OK || data.len == 0)
if(cellPadGetData(2, &data) != CELL_PAD_OK) {sys_timer_usleep(300000); continue;}
}

if(data.len > 0)
{
Expand Down Expand Up @@ -353,7 +362,7 @@
#else
sprintf(cfw_info, "%s", dex_mode ? "DEX" : "CEX");
#endif
char smax[16]; if(max_temp) sprintf(smax, " MAX: %i°C", max_temp); else sprintf(smax, "");
char smax[16]; if(max_temp) sprintf(smax, " MAX: %i°C", max_temp); else if(webman_config->fanc==0) sprintf(smax, " SYSCON"); else memset(smax, 0, 16);

sprintf((char*)tmp, "CPU: %i°C RSX: %i°C FAN: %i%% \r\n"
"%s: %id %02d:%02d:%02d%s\r\n"
Expand Down Expand Up @@ -394,8 +403,8 @@
else
{
if(data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_R2) webman_config->manu+=5; else webman_config->manu+=1;
webman_config->manu=RANGE(webman_config->manu, 20, 99); //%
webman_config->temp0= (u8)(((float)webman_config->manu * 255.f)/100.f);
webman_config->manu=RANGE(webman_config->manu, 20, 95); //%
webman_config->temp0= (u8)(((float)(webman_config->manu+1) * 255.f)/100.f);
webman_config->temp0=RANGE(webman_config->temp0, 0x33, MAX_FANSPEED);
fan_control(webman_config->temp0, 0);
sprintf((char*) msg, "%s\r\n%s %i%%", STR_FANCH0, STR_FANCH2, webman_config->manu);
Expand All @@ -416,7 +425,7 @@
else
{
if(webman_config->manu>20) {if(data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_R2) webman_config->manu-=5; else webman_config->manu-=1;}
webman_config->temp0= (u8)(((float)webman_config->manu * 255.f)/100.f);
webman_config->temp0= (u8)(((float)(webman_config->manu+1) * 255.f)/100.f);
if(webman_config->temp0<0x33) webman_config->temp0=0x33;
if(webman_config->temp0>MAX_FANSPEED) webman_config->temp0=MAX_FANSPEED;
fan_control(webman_config->temp0, 0);
Expand Down Expand Up @@ -507,22 +516,7 @@
}
else if(!(webman_config->combo & DISABLEFC) && (data.button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_START) ) // L3+R2+START (enable/disable fancontrol)
{
webman_config->fanc = (webman_config->fanc ? 0 : 1);

max_temp=0;
if(webman_config->fanc)
{
if(webman_config->temp0==0) max_temp=webman_config->temp1; else max_temp=0;
fan_control(webman_config->temp0, 0);
sprintf((char*) msg, "%s %s", STR_FANCTRL3, STR_ENABLED);
}
else
{
restore_fan(0); //syscon
sprintf((char*) msg, "%s %s", STR_FANCTRL3, STR_DISABLED);
}
save_settings();
show_msg((char*) msg);
enable_fan_control(2, msg);
sys_timer_sleep(2);
break;
}
Expand Down
15 changes: 10 additions & 5 deletions include/cpursx.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,27 @@ static void cpu_rsx_stats(char *buffer, char *templn, char *param)

if(strstr(param, "?"))
{

if(strstr(param, "?m")) {if(max_temp) max_temp=0; else max_temp=webman_config->temp1;}
char *pos = strstr(param, "fan=");
if(pos) {get_value(templn, pos+4, 2); read=val(templn); max_temp = 0; if(!read) enable_fan_control(0, templn); else {webman_config->manu = read; if(webman_config->fanc==0) enable_fan_control(1, templn);}}
else {pos = strstr(param, "max=");
if(pos) {get_value(templn, pos+4, 2); max_temp = val(templn); max_temp=RANGE(max_temp, 40, 83);}
else
if(strstr(param, "?m")) {if((max_temp && !strstr(param, "dyn")) || strstr(param, "man")) max_temp=0; else {max_temp=webman_config->temp1;} if(webman_config->fanc==0) enable_fan_control(1, templn);}}

if(max_temp) //auto mode
{
if(strstr(param, "?u")) max_temp++;
if(strstr(param, "?d")) max_temp--;
webman_config->temp1=RANGE(max_temp, 40, 85); //°C
webman_config->temp1=RANGE(max_temp, 40, 83); // dynamic fan max temperature in °C
webman_config->temp0=FAN_AUTO;
}
else
{
if(strstr(param, "?u")) webman_config->manu++;
if(strstr(param, "?d")) webman_config->manu--;
webman_config->manu=RANGE(webman_config->manu, 20, 99); //%
webman_config->manu=RANGE(webman_config->manu, 20, 95); //%

webman_config->temp0= (u8)(((float)webman_config->manu * 255.f)/100.f);
webman_config->temp0= (u8)(((float)(webman_config->manu+1) * 255.f)/100.f); // manual fan speed
webman_config->temp0=RANGE(webman_config->temp0, 0x33, MAX_FANSPEED);
fan_control(webman_config->temp0, 0);
}
Expand Down
34 changes: 29 additions & 5 deletions include/fancontrol.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#define MIN_FANSPEED (20)
#define DEFAULT_MIN_FANSPEED (25)
#define MAX_FANSPEED (0xE6)
#define MAX_FANSPEED (0xF4)
#define MAX_TEMPERATURE (85)
#define MY_TEMP (68)

#define FAN_AUTO (0)

static u8 fan_speed=0x33;
static u8 old_fan=0x33;
static u32 max_temp=MY_TEMP;
Expand All @@ -17,7 +20,7 @@ uint64_t set_fan_policy_offset=0;
static bool fan_ps2_mode=false; // temporary disable dynamic fan control

static void get_temperature(u32 _dev, u32 *_temp);
static void fan_control(u8 temp0, u8 maxtemp);
static void fan_control(u8 set_fanspeed, u8 initial);
static void restore_fan(u8 set_ps2_temp);

static void get_temperature(u32 _dev, u32 *_temp)
Expand All @@ -37,7 +40,7 @@ static int sys_sm_get_fan_policy(u8 id, u8 *st, u8 *mode, u8 *speed, u8 *unknown
return_to_user_prog(int);
}

static void fan_control(u8 temp0, u8 initial)
static void fan_control(u8 set_fanspeed, u8 initial)
{
if(fan_ps2_mode) return; //do not change fan settings while PS2 game is mounted

Expand All @@ -61,7 +64,7 @@ static void fan_control(u8 temp0, u8 initial)
}
}

if(temp0<0x33)
if(set_fanspeed<0x33)
{
u8 st, mode, unknown;
u8 fan_speed8=0;
Expand All @@ -70,7 +73,7 @@ static void fan_control(u8 temp0, u8 initial)
fan_speed=fan_speed8;
}
else
fan_speed=temp0;
fan_speed=set_fanspeed;

if(fan_speed<0x33 || fan_speed>0xFC)
{
Expand Down Expand Up @@ -105,3 +108,24 @@ static void restore_fan(u8 set_ps2_temp)
backup[0]=0;
}
}

static void enable_fan_control(u8 enable, char *msg)
{
if(enable < 2) webman_config->fanc = enable;
else webman_config->fanc = (webman_config->fanc ? 0 : 1);

max_temp=0;
if(webman_config->fanc)
{
if(webman_config->temp0==FAN_AUTO) max_temp=webman_config->temp1; else max_temp=0;
fan_control(webman_config->temp0, 0);
sprintf((char*) msg, "%s %s", STR_FANCTRL3, STR_ENABLED);
}
else
{
restore_fan(0); //syscon
sprintf((char*) msg, "%s %s", STR_FANCTRL3, STR_DISABLED);
}
save_settings();
show_msg((char*) msg);
}
18 changes: 9 additions & 9 deletions include/fancontrol2.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void poll_thread(uint64_t poll)
//u8 step_down=2;
u8 smoothstep=0;
int delta=0;
uint8_t msg[200];
char msg[200];

#ifdef WM_REQUEST
CellFsStat stat;
Expand Down Expand Up @@ -133,8 +133,8 @@ static void poll_thread(uint64_t poll)
}
}

if(t1>76 && old_fan<0x43) fan_speed++;
if(t1>84 && fan_speed<0xB0) {old_fan=0; fan_speed=0xB0;}
if(t1>76 && old_fan<0x43) fan_speed++; // <26%
if(t1>=MAX_FANSPEED && fan_speed<0xB0) {old_fan=0; fan_speed=0xB0;} // <69%

if(fan_speed<((webman_config->minfan*255)/100)) fan_speed=(webman_config->minfan*255)/100;
if(fan_speed>MAX_FANSPEED) fan_speed=MAX_FANSPEED;
Expand All @@ -145,14 +145,14 @@ static void poll_thread(uint64_t poll)
{
//if(t1>76 && fan_speed<0x50) fan_speed=0x50;
//if(t1>77 && fan_speed<0x58) fan_speed=0x58;
if(t1>78 && fan_speed<0x50) fan_speed+=2;
if(t1>78 && fan_speed<0x50) fan_speed+=2; // <31%
if(old_fan!=fan_speed)
{
old_fan=fan_speed;
fan_control(fan_speed, 1);
//sprintf(debug, "OFAN: %x | CFAN: %x | TEMP: %i | SPEED APPLIED!\r\n", old_fan, fan_speed, t1); ssend(data_s, mytxt);
stall=0;
}
}
}
else
if( old_fan>fan_speed && (old_fan-fan_speed)>8 && t1<(max_temp-3) )
Expand All @@ -168,18 +168,18 @@ static void poll_thread(uint64_t poll)
get_temperature(0, &t1);
get_temperature(1, &t2);
t1>>=24; t2>>=24;
if(t1>83 || t2>83)
if(t1>(MAX_TEMPERATURE-2) || t2>(MAX_TEMPERATURE-2))
{
if(!webman_config->warn)
{
sprintf((char*) msg, "%s\r\n CPU: %i°C RSX: %i°C", STR_OVERHEAT, t1, t2);
show_msg((char*) msg);
sys_timer_sleep(2);
}
if(t1>85 || t2>85)
if(t1>MAX_TEMPERATURE || t2>MAX_TEMPERATURE)
{
if(!max_temp) max_temp=82;
if(fan_speed<0xB0) fan_speed=0xB0;
if(!max_temp) max_temp=(MAX_TEMPERATURE-3);
if(fan_speed<0xB0) fan_speed=0xB0; // 69%
else
if(fan_speed<MAX_FANSPEED) fan_speed+=8;

Expand Down
2 changes: 1 addition & 1 deletion include/ps3mapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static void ps3mapi_home(char *buffer, char *templn)
if(syscall8_state>=0) {system_call_2(SC_COBRA_SYSCALL8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_CORE_VERSION); version = (int)(p1);}
int versionfw = 0;
if(syscall8_state>=0) {system_call_2(SC_COBRA_SYSCALL8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_FW_VERSION); versionfw = (int)(p1);}
char fwtype[32]; memset(fwtype, 32, 0);
char fwtype[32]; memset(fwtype, 0, 32);
if(syscall8_state>=0) {system_call_3(SC_COBRA_SYSCALL8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_FW_TYPE, (u64)(u32)fwtype);}

//---------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions include/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static void setup_parse_settings(char *param)

webman_config->temp1=val(mytemp);
}
webman_config->temp1=RANGE(webman_config->temp1, 40, 83); //°C
webman_config->temp1=RANGE(webman_config->temp1, 40, MAX_TEMPERATURE); //°C

pos=strstr(param, "fsp0=");
if(pos)
Expand All @@ -188,19 +188,19 @@ static void setup_parse_settings(char *param)
{
get_value(mytemp, pos + 5, 2);

webman_config->manu=val(mytemp);
webman_config->manu=val(mytemp); // manual fan speed in %
}
webman_config->manu=RANGE(webman_config->manu, 20, 99); //%
webman_config->manu=RANGE(webman_config->manu, 20, 95); //%

if(strstr(param, "temp=1"))
webman_config->temp0= (u8)(((float)webman_config->manu * 255.f)/100.f);
webman_config->temp0= (u8)(((float)(webman_config->manu+1) * 255.f)/100.f); // manual fan speed
else
webman_config->temp0=0;
webman_config->temp0=0; // dynamic fan control mode

max_temp=0;
if(webman_config->fanc)
{
if(webman_config->temp0==0) max_temp=webman_config->temp1;
if(webman_config->temp0==0) max_temp=webman_config->temp1; // dynamic fan max temperature in °C
fan_control(webman_config->temp0, 0);
}
else
Expand Down Expand Up @@ -764,7 +764,7 @@ static void reset_settings()
webman_config->manu=35; //manual temp
webman_config->ps2temp=37; //ps2 temp

webman_config->minfan=DEFAULT_MIN_FANSPEED;
webman_config->minfan=DEFAULT_MIN_FANSPEED; // %

//webman_config->bind=0; //enable remote access to FTP/WWW services
//webman_config->ftpd=0; //enable ftp server
Expand Down
6 changes: 5 additions & 1 deletion include/vpad.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#define SC_PAD_SET_DATA_INSERT_MODE (573)
#define SC_PAD_REGISTER_CONTROLLER (574)

static uint32_t vcombo = 0;

static int32_t vpad_handle = -1;

static inline void sys_pad_dbg_ldd_register_controller(uint8_t *data, int32_t *handle, uint8_t addr, uint32_t capability)
Expand Down Expand Up @@ -60,7 +62,7 @@ static int32_t unregister_ldd_controller(void)
return(CELL_PAD_OK);
}

static void parse_pad_command(char *param)
static void parse_pad_command(char *param, u8 is_combo)
{
register_ldd_controller();

Expand Down Expand Up @@ -129,6 +131,8 @@ static void parse_pad_command(char *param)
if(strcasestr(param, "l3")) {data.button[CELL_PAD_BTN_OFFSET_DIGITAL1] |= CELL_PAD_CTRL_L3;}
if(strcasestr(param, "r3")) {data.button[CELL_PAD_BTN_OFFSET_DIGITAL1] |= CELL_PAD_CTRL_R3;}

if(is_combo) {vcombo = (data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] << 8) | (data.button[CELL_PAD_BTN_OFFSET_DIGITAL1]); return;}

// send pad data to virtual pad
cellPadLddDataInsert(vpad_handle, &data);

Expand Down
16 changes: 11 additions & 5 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SYS_MODULE_STOP(wwwd_stop);
#define PS2_CLASSIC_ISO_PATH "/dev_hdd0/game/PS2U10000/USRDIR/ISO.BIN.ENC"
#define PS2_CLASSIC_ISO_ICON "/dev_hdd0/game/PS2U10000/ICON0.PNG"

#define WM_VERSION "1.43.07 MOD" // webMAN version
#define WM_VERSION "1.43.08 MOD" // webMAN version
#define MM_ROOT_STD "/dev_hdd0/game/BLES80608/USRDIR" // multiMAN root folder
#define MM_ROOT_SSTL "/dev_hdd0/game/NPEA00374/USRDIR" // multiman SingStar® Stealth root folder
#define MM_ROOT_STL "/dev_hdd0/tmp/game_repo/main" // stealthMAN root folder
Expand Down Expand Up @@ -347,6 +347,7 @@ typedef struct

static CellRtcTick rTick, gTick;

static void enable_fan_control(u8 enable, char *msg);
static int set_gamedata_status(u8 status, bool do_mount);
static void set_buffer_sizes(int footprint);

Expand Down Expand Up @@ -847,12 +848,13 @@ static void handleclient(u64 conn_s_p)
}

#ifdef VIRTUAL_PAD
if(strstr(param, "/pad.ps3"))
if(strstr(param, "/pad.ps3") || strstr(param, "/combo.ps3"))
{
if(!webman_config->nopad) parse_pad_command(param);
u8 is_combo = (param[1]=='c') ? 2 : 0;
if(!webman_config->nopad) parse_pad_command(param+9+is_combo, is_combo);

is_binary=0;
http_response(conn_s, header, param, 200, param+9);
http_response(conn_s, header, param, 200, (param+9+is_combo));
loading_html--;
sys_ppu_thread_exit(0);
return;
Expand Down Expand Up @@ -1511,7 +1513,11 @@ static void handleclient(u64 conn_s_p)
{
if(cellFsStat((char*)"/dev_hdd0/boot_plugins.txt", &buf)==CELL_FS_SUCCEEDED && buf.st_size<40) cellFsUnlink((char*)"/dev_hdd0/boot_plugins.txt");
cellFsUnlink((char*)"/dev_hdd0/webftp_server.sprx");
cellFsUnlink((char*)"/dev_hdd0/webftp_server_ps3mapi.sprx");
cellFsUnlink((char*)"/dev_hdd0/webftp_server_noncobra.sprx");
cellFsUnlink((char*)"/dev_hdd0/plugins/webftp_server.sprx");
cellFsUnlink((char*)"/dev_hdd0/plugins/webftp_server_ps3mapi.sprx");
cellFsUnlink((char*)"/dev_hdd0/plugins/webftp_server_noncobra.sprx");
cellFsUnlink((char*)WMCONFIG);
del((char*)WMTMP, true);
del((char*)"/dev_hdd0/xmlhost", true);
Expand Down Expand Up @@ -1807,7 +1813,7 @@ static void wwwd_thread(uint64_t arg)

if(webman_config->fanc)
{
if(webman_config->temp0==0) max_temp=webman_config->temp1; else max_temp=0;
if(webman_config->temp0==FAN_AUTO) max_temp=webman_config->temp1; else max_temp=0;
fan_control(webman_config->temp0, 0);
}

Expand Down
2 changes: 1 addition & 1 deletion updater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DATA := data
INCLUDES := include
PKGFILES := $(CURDIR)/pkgfiles

TITLE := webMAN MOD 1.43.07 Updater [Hold R1 for VSH Menu, X for Lite Edition]
TITLE := webMAN MOD 1.43.08 Updater [Hold R1 for VSH Menu, X for Lite Edition]
APPID := UPDWEBMOD
CONTENTID := EP0001-$(APPID)_00-0000000000000000

Expand Down
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu_4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified updater/pkgfiles/USRDIR/images/wm_vsh_menu_5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added updater/pkgfiles/USRDIR/images/wm_vsh_menu_6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion updater/pkgfiles/USRDIR/mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@
</div>

<div id="menu" style="display:none;">
<div id="header"><a id="nav-close" href="javascript:void(0)" onclick="hideMenu();"><span style="position:absolute;left:10px">&#9664;</span> webMAN MOD 1.43.07</a></div>
<div id="header"><a id="nav-close" href="javascript:void(0)" onclick="hideMenu();"><span style="position:absolute;left:10px">&#9664;</span> webMAN MOD 1.43.08</a></div>
<div id="wrapper-menu">
<div id="scroller">
<ul id="thelist">
Expand Down
Binary file modified updater/pkgfiles/USRDIR/webftp_server.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_ccapi.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_english.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_lite.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_noncobra.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_ps3mapi.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_rebug_cobra_english.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_rebug_cobra_multi23.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/webftp_server_rebug_cobra_ps3mapi.sprx
Binary file not shown.
Binary file modified updater/pkgfiles/USRDIR/wm_vsh_menu.sprx
Binary file not shown.

0 comments on commit 63ab08b

Please sign in to comment.