Late binding with PSPSDK

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Late binding with PSPSDK

Post by biermana »

What is the recommended best practice for late binding (e.g. pspnet libraries) while using the PSPSDK? I could include a startup.s for each project, but based on the example Makefiles that come with the SDK, it would seem the PSPSDK encourages using a "shared" startup.s.

I ask this because I feel our community will evolve as we begin to consistently use the same methods/tools/patterns for developing homebrew.

In reading through the code of some examples that have been posted ( nem's helloword, the wifi example, the httpd example, etc.), we're all doing things a bit differently.

Any thoughts?
madc
Posts: 17
Joined: Mon Jun 27, 2005 3:18 pm
Location: Nanking,China
Contact:

Post by madc »

I ported PspPet's code to SDK based. But the synchronization is still a issue. So I haven't call the linked functions from user mode.
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Post by biermana »

madc wrote:I ported PspPet's code to SDK based. But the synchronization is still a issue. So I haven't call the linked functions from user mode.
Madc,

Is the work you've done refactoring PspPet's code to be PSPSDK-based posted somewhere for download/viewing? Or are you referring the the sample code which can be pulled from subversion?
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Re: Late binding with PSPSDK

Post by mrbrown »

biermana wrote:What is the recommended best practice for late binding (e.g. pspnet libraries) while using the PSPSDK? I could include a startup.s for each project, but based on the example Makefiles that come with the SDK, it would seem the PSPSDK encourages using a "shared" startup.s.
Create a seperate stub .s that's has all late imports. Call them libpspfoo_weak.a or something (the plan for kernel libraries was libpspfoo_kernel.a). Put them up somewhere, we'll add them to PSPSDK, and get you svn access.
biermana wrote:I ask this because I feel our community will evolve as we begin to consistently use the same methods/tools/patterns for developing homebrew.
That's the aim of PSPSDK - and to be frank, I think we've superceded nem's stuff and any derivatives quite nicely. If there's something that doesn't suit you in PSPSDK, let us know and submit a patch and we'll work with you to make it better.
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Post by biermana »

Sounds good mrbrown. Thanks for your reply/guidance.

The PSPSDK is excellent, and defintely evolving quickly.

I'd personally like to pass along my thanks/appreciation to all the folks doing such a nice job on the PSPSDK.
PspPet
Posts: 210
Joined: Wed Mar 30, 2005 2:13 am
Contact:

Post by PspPet »

FWIW: I still believe we are missing something obvious here (ie. the patching should be automatic, *in theory*). The first version of the patch code is rather slimy (hard coded addresses etc). Do what you wish with it, but hopefully it will go away if/when we find the right bits to set.

FWIW2: I have a slightly more elegant solution for system traps (ie. like STUB_FUNC but for calling "ForSystem" entries - using direct calls). Great for system hackery (all thanks to the Kernel memory access module flag)
Post Reply