Advertising (This ad goes away for registered users. You can Login or Register)

Help! Porting VHBL

VHBL (Vita Half Byte Loader) is an open source tool to load PSP homebrews on the Playstation Vita.
VHBL can be downloaded at http://wololo.net/vhbl
Post Reply
173210
Guru
Posts: 195
Joined: Fri Jul 15, 2011 11:32 pm

Help! Porting VHBL

Post by 173210 »

I'm porting VHBL to my game exploit.
VHBL froze after this.

Code: Select all

FREE MEM BEFORE CLEARING: 683776 (max: 387584)
Killing module 0x03D35F6B...
So I type "modinfo 0x03D35F6B" in PsPLink to check what it is.
And I got this.

Code: Select all

UID: 0x03D35F6B Attr: 0000 - Name: pspsystem
Entry: 0x08ABA764 - GP: 0x08F9A860 - TextAddr: 0x08804000
TextSize: 0x003D05F0 - DataSize: 0x00000100 BssSize: 0x00F74454
Segment 0: Addr 0x08804040 - Size 0x003D05F0
Segment 1: Addr 0x08F92770 - Size 0x00F74554

I think VHBL froze because pspsystem is main module.
What should I do?

Sorry for my bad English. I'm a Japanese.
Advertising
Last edited by 173210 on Fri Nov 23, 2012 1:21 pm, edited 1 time in total.
Donate!
Bitconin: 1Aq3NruiohEvUsGJAmHoXjTq764HDS5zef
Paypal: http://173210.github.io/
wololo
Site Admin
Posts: 3619
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Help! Porting VHBL

Post by wololo »

remove that module from the list of stuff to kill in your exploit_config file, and try again :)
Advertising
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
173210
Guru
Posts: 195
Joined: Fri Jul 15, 2011 11:32 pm

Re: Help! Porting VHBL

Post by 173210 »

wololo wrote:remove that module from the list of stuff to kill in your exploit_config file, and try again :)
I've not defined that.
Donate!
Bitconin: 1Aq3NruiohEvUsGJAmHoXjTq764HDS5zef
Paypal: http://173210.github.io/
wololo
Site Admin
Posts: 3619
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Help! Porting VHBL

Post by wololo »

somewhere you've defined a list of modules to kill. It can be for example in game_freemem or something like that. Remember that the UID and what you defined are not the same thing. What you defined is where to find the UID in ram, so they will not be the same, you might need to add a few debug statements to see what module address gives you that UID
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
173210
Guru
Posts: 195
Joined: Fri Jul 15, 2011 11:32 pm

Re: Help! Porting VHBL

Post by 173210 »

wololo wrote:somewhere you've defined a list of modules to kill. It can be for example in game_freemem or something like that. Remember that the UID and what you defined are not the same thing. What you defined is where to find the UID in ram, so they will not be the same, you might need to add a few debug statements to see what module address gives you that UID
I've not defined. I'll upload exploit_config.
Attachments
exploit_config.zip
(6.68 KiB) Downloaded 128 times
Donate!
Bitconin: 1Aq3NruiohEvUsGJAmHoXjTq764HDS5zef
Paypal: http://173210.github.io/
173210
Guru
Posts: 195
Joined: Fri Jul 15, 2011 11:32 pm

Re: Help! Porting VHBL

Post by 173210 »

I added log before freeze.
I think it is froze in memory.c (SUSPEND_THEN_DELETE_THREADS is not defined):

Code: Select all

#ifdef SUSPEND_THEN_DELETE_THREADS
	// Delete module here before cleaning the threads,
	// otherwise the main module cannot be unloaded
	UnloadModules();
	SuicideAllThreads();
	UnloadModules();
#else
	UnloadModules();
#endif
Donate!
Bitconin: 1Aq3NruiohEvUsGJAmHoXjTq764HDS5zef
Paypal: http://173210.github.io/
173210
Guru
Posts: 195
Joined: Fri Jul 15, 2011 11:32 pm

Re: Help! Porting VHBL

Post by 173210 »

I couldn't see how to solve this problem.
So I modified memory.c
Before

Code: Select all

for (i = 0; i < (24 << 20); i += 0x400)
	{
		SceUID modid;
		
		/* check if we've got a UID */
		if ((modid = sceKernelGetModuleIdByAddress(MODULES_START_ADDRESS + i)) >= 0)
		{
			/* we do, make sure it's not just the same one */
			/* Before*/
			if (uids[cur_uid - ((cur_uid == 0) ? (0) : (1))] != modid)
			{
				/* okay add it */
				uids[cur_uid++] = modid;
			}

			if (cur_uid == MAX_MODULES_TO_FREE)
			{
				LOGSTR0("\n->WARNING: Max number of modules to unload reached\n");
				break;
			}
		}
	}
	
	/* shutdown the modules in usermode */
	for (i = cur_uid - 1; (int)i >= 0; i--)
	{
		kill_module(uids[i]);
	}
After

Code: Select all

for (i = 0; i < (24 << 20); i += 0x400)
	{
		SceUID modid;
		
		/* check if we've got a UID */
		if ((modid = sceKernelGetModuleIdByAddress(MODULES_START_ADDRESS + i)) >= 0)
		{
			/* we do, make sure it's not just the same one */
			/* After*/
			if (uids[cur_uid - ((cur_uid == 0) ? (0) : (1))] != modid && modid != 0x03D35F6B)
			{
				/* okay add it */
				uids[cur_uid++] = modid;
			}

			if (cur_uid == MAX_MODULES_TO_FREE)
			{
				LOGSTR0("\n->WARNING: Max number of modules to unload reached\n");
				break;
			}
		}
	}
	
	/* shutdown the modules in usermode */
	for (i = cur_uid - 1; (int)i >= 0; i--)
	{
		kill_module(uids[i]);
	}
But I had another problem. See this topic.
viewtopic.php?t=20518
Donate!
Bitconin: 1Aq3NruiohEvUsGJAmHoXjTq764HDS5zef
Paypal: http://173210.github.io/
Post Reply

Return to “Vita Half Byte Loader”