Skip to content

Commit

Permalink
webMAN MOD 1.47.21
Browse files Browse the repository at this point in the history
- Support PS3HEN
- Added support for auto-config of PS2 Classics using encrypted CONFIG files stored in /dev_hdd0/game/PS2CONFIG/CONFIG/ENC. The TITLE ID must be in the file name of the .BIN.ENC (encrypted PS2ISO). ENC files provided by @Joonie86
- Reduced wait time on startup when notifcation message is enabled
- Speed improvement in scanning XML
- Add CORS headers to HTTP response (suggested by @xps3riments)
- CD sector size detection of PSXISO not longer use temp file
- Moved prx unload functions to process.h
- Split _mount.h into 3 categories: cobra, noncobra & misc (ps2 classic, roms, nprdm)
- Added dynamic lookup for syscall table offset for future firmware
- Added support for display PIC1 when PSPISO is mounted
  • Loading branch information
aldostools committed May 30, 2019
1 parent f92f3f8 commit 2aad059
Show file tree
Hide file tree
Showing 249 changed files with 1,858 additions and 1,744 deletions.
2 changes: 1 addition & 1 deletion _Make_pkg.bat
Expand Up @@ -24,7 +24,7 @@ title Building webMAN_MOD_1.47.xx_Updater_metalification_theme.pkg ...
rem call Make_PKG_metalification_theme.bat

set ver=1.47
set rev=20
set rev=21

move webMAN_MOD_%ver%.xx_Updater.pkg ..\..\webMAN_MOD_%ver%.%rev%_Installer.pkg
move webMAN_MOD_%ver%.xx_Updater_rebugification_theme.pkg ..\..\webMAN_MOD_%ver%.%rev%_Installer_rebugification_theme.pkg
Expand Down
50 changes: 45 additions & 5 deletions _Projects_/netiso/main.c
Expand Up @@ -80,6 +80,7 @@ SYS_MODULE_STOP(netiso_stop);
#define DEVICE_TYPE_DVD 0x10 /* DVD-ROM, DVD+-R, DVD+-RW etc, they are differenced by booktype field in some scsi command */
#define DEVICE_TYPE_CD 0x08 /* CD-ROM, CD-DA, CD-R, CD-RW, etc, they are differenced somehow with scsi commands */

#define PLAYSTATION "PLAYSTATION "

enum EMU_TYPE
{
Expand Down Expand Up @@ -417,6 +418,24 @@ static int process_read_cd_2352_cmd(uint8_t *buf, uint32_t sector, uint32_t rema
return 0;
}

int strncmp(const char *s1, const char *s2, size_t n)
{
while((n > 0) && *s1 && (*s1==*s2)) {s1++, s2++, n--;} if(n == 0) return 0;

return *(const unsigned char*)s1-*(const unsigned char*)s2;
}

static int detect_cd_sector_size(char *buffer)
{
int sec_size[3] = {2048, 2336, 2448};
for(int n = 0; n < 3; n++)
{
if(!strncmp(buffer + ((sec_size[n]<<4) + 0x20), PLAYSTATION, 0xC)) return sec_size[n];
}

return 2352;
}

static void netiso_thread(uint64_t arg)
{
uint8_t buff[sizeof(netiso_args)]; // 1392 bytes
Expand Down Expand Up @@ -448,12 +467,34 @@ static void netiso_thread(uint64_t arg)
sys_ppu_thread_exit(0);
}

emu_mode = args->emu_mode;

discsize = (uint64_t)size;
cd_sec_size = 2352;

if(!(discsize%2336)) cd_sec_size = 2336;
else if(!(discsize%2448)) cd_sec_size = 2448;
else if(!(discsize%2048)) cd_sec_size = 2048;
if(!(discsize%2352)) cd_sec_size = 2352; else
if(!(discsize%2336)) cd_sec_size = 2336; else
if(!(discsize%2448)) cd_sec_size = 2448; else
if(!(discsize%2048)) cd_sec_size = 2048; else cd_sec_size = 2352;

// detect CD sector size
if((emu_mode == EMU_PSX) && (discsize >= 65536) && (discsize <= 0x35000000UL))
{
sys_addr_t sysmem = NULL; uint32_t size = 65536;
if(sys_memory_allocate(size, SYS_MEMORY_PAGE_SIZE_64K, &sysmem) == CELL_OK)
{
char *buffer = (char*)sysmem;

int bytes_read;

bytes_read = read_remote_file_critical(0, buffer, size);
if(bytes_read)
{
cd_sec_size = detect_cd_sector_size(buffer);
}

sys_memory_free((sys_addr_t)sysmem);
}
}

ret = sys_event_port_create(&result_port, 1, SYS_EVENT_PORT_NO_NAME);
if(ret != CELL_OK)
Expand All @@ -479,7 +520,6 @@ static void netiso_thread(uint64_t arg)
fake_eject_event();
}

emu_mode = args->emu_mode;
if(emu_mode == EMU_PSX)
{
numtracks = args->numtracks;
Expand Down
1 change: 1 addition & 0 deletions _Projects_/ps3netsrv/Makefile
Expand Up @@ -45,6 +45,7 @@ CFLAGS += -static
endif

all: $(OUTPUT)
rm -f *.o

clean:
rm -f $(OUTPUT) *.o
Expand Down
1 change: 1 addition & 0 deletions _Projects_/ps3netsrv/Makefile.linux
Expand Up @@ -45,6 +45,7 @@ CFLAGS += -static
endif

all: $(OUTPUT)
rm -f *.o

clean:
rm -f $(OUTPUT) *.o
Expand Down

0 comments on commit 2aad059

Please sign in to comment.