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

[SUGGESTION] Python coding on HBL

This is the development forum of the half-byte loader project. For general Half Byte Loader questions, visit the Half Byte Loader forum.
Forum rules
This forum is for HBL Development discussions ONLY. For User support or HBL general discussions, go to viewforum.php?f=3 . Messages that are not development related will be deleted.
SunnyAutumn
Posts: 171
Joined: Thu Jan 20, 2011 7:33 pm
Location: I want to be in Cun-uh-duh

[SUGGESTION] Python coding on HBL

Post by SunnyAutumn » Wed Feb 02, 2011 5:16 pm

Some of you may not know this, but there is a great programming language called Python. It is noob friendly, easy to learn and also has a simple syntax, so you won't get a lot of "stupid" errors :)
I have always wondered, there are lots of people who don't know C, but would like to be part of the HBL Dev community. Some of them can't test a lot of homebrews, some can't test newest HBL revs (who knows, why). So how can they help? And I got this idea. WHat if the HBL Devs "ported" Python to HBL as a scripting language? A bright example for that is Counter Strike 2D, which has Lua ported to it, so users can make their own mods (the game was made in Blitz3D).
So, I guess this is my suggestion :) Port Python so people, like me, could script some HBL features.
EDIT: Sorry for posting it here. Wrong forum.
Advertising
PSP 2004 6.20 TN-HEN D Permanent
iPad 1g 16gb wifi 3.2.2 + jailbreak
xbox360 Pro latest official dashboard
LG Optimus One: Android 2.2.1: Gonna' root soon
Playing Runescape since 2004!
I support the movement for democracy in Syria! What about you?

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [SUGGESTION] Python coding on HBL

Post by m0skit0 » Wed Feb 02, 2011 5:35 pm

You don't seem to understand what HBL is or how it works. Usually people who only touched high-level programming (Python, LUA, VB, Java...) doesn't understand what a homebrew loader actually does. HBL cannot be coded on Python because:

1) HBL is not a menu. That's wMenu or others. HBL is the core that actually loads homebrews. Menus are just a front-end. Real code is HBL core. Menus just send what homebrew should be loaded
2) Python is an interpreted language and need an interpreter. This makes it unsuitable for low-level developing such as HBL.
3) Python has no pointers.
4) Python is not as fast as C.
5) HBL needs no plugin extension. It's meant to run other homebrews, not offer fancy options. That's why there's a menu, which in fact can be coded on Python or LUA (or anything else giving it's an EBOOT).

Conclusion: if you want to develop HBL, you need to know C (very well) and PSP architecture (well).

And no, it's not wrong forum ;)
Advertising
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

SunnyAutumn
Posts: 171
Joined: Thu Jan 20, 2011 7:33 pm
Location: I want to be in Cun-uh-duh

Re: [SUGGESTION] Python coding on HBL

Post by SunnyAutumn » Wed Feb 02, 2011 5:40 pm

Oh dang.
So, it would be just pointless to port scripting/coding languages :( Too bad.
P.S. The menu can be coded on Python? :shock: Didn't know that.
PSP 2004 6.20 TN-HEN D Permanent
iPad 1g 16gb wifi 3.2.2 + jailbreak
xbox360 Pro latest official dashboard
LG Optimus One: Android 2.2.1: Gonna' root soon
Playing Runescape since 2004!
I support the movement for democracy in Syria! What about you?

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [SUGGESTION] Python coding on HBL

Post by m0skit0 » Wed Feb 02, 2011 6:24 pm

SunnyAutumn wrote:So, it would be just pointless to port scripting/coding languages
HBL can be ported to other low-level languages. For example C++, Pascal and such. You just need to find an SDK for them (AFAIK PSPSDK supports C++).
SunnyAutumn wrote:The menu can be coded on Python?
If you include a Python interpreter, I don't see why not. LUA should work as well or any other scripting language.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

JJS
Big Beholder
Posts: 1416
Joined: Mon Sep 27, 2010 2:18 pm
Contact:

Re: [SUGGESTION] Python coding on HBL

Post by JJS » Wed Feb 02, 2011 6:44 pm

The scripting language must allow you to construct a pointer to an arbitrary memory address so that you can access the menu API. This is the only problem I could see with writing a menu in an interpreted language.

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [SUGGESTION] Python coding on HBL

Post by m0skit0 » Wed Feb 02, 2011 7:03 pm

Didn't you implement an HBL API? Aren't they called like other system calls (through stubs)?
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Strangelove
Posts: 286
Joined: Thu Nov 25, 2010 6:32 pm

Re: [SUGGESTION] Python coding on HBL

Post by Strangelove » Wed Feb 02, 2011 7:07 pm

Well, games usually use LUA because the interpreter have a relatively small memory footprint. The PSP already has limited memory so slapping a big python interpreter in HBL probably won't make homebrew coders happy.

I guess LUA is ok-ish for the menu, but you'd still have to write function for graphics, image loading, HBL interface etc. so that means more space and of course work for whoever does it. Since these things can also be written in C I doubt anyone will care enough to put in the hours.

Edit: Actually most of the needed support libraries for a LUA menu should be possible to write in C. I don't know LUA's C API but if it's anything like the Python C interface it should be a thin piece of glue code.
Last edited by Strangelove on Wed Feb 02, 2011 7:22 pm, edited 1 time in total.
"If you have specific questions ... don't hesitate to ask as the more generic the question is the more philosophic the answer will be" - PSPWizard

JJS
Big Beholder
Posts: 1416
Joined: Mon Sep 27, 2010 2:18 pm
Contact:

Re: [SUGGESTION] Python coding on HBL

Post by JJS » Wed Feb 02, 2011 7:19 pm

m0skit0 wrote:Didn't you implement an HBL API? Aren't they called like other system calls (through stubs)?
I must shamefully admit that the new API is not yet in place :oops: .

SunnyAutumn
Posts: 171
Joined: Thu Jan 20, 2011 7:33 pm
Location: I want to be in Cun-uh-duh

Re: [SUGGESTION] Python coding on HBL

Post by SunnyAutumn » Wed Feb 02, 2011 7:37 pm

Strangelove wrote:Well, games usually use LUA because the interpreter have a relatively small memory footprint. The PSP already has limited memory so slapping a big python interpreter in HBL probably won't make homebrew coders happy.

I guess LUA is ok-ish for the menu, but you'd still have to write function for graphics, image loading, HBL interface etc. so that means more space and of course work for whoever does it. Since these things can also be written in C I doubt anyone will care enough to put in the hours.

Edit: Actually most of the needed support libraries for a LUA menu should be possible to write in C. I don't know LUA's C API but if it's anything like the Python C interface it should be a thin piece of glue code.
Grrrr! I dislike Lua for some reason. Probably because it uses a lot of "." and ",". Always got lost in those.
PSP 2004 6.20 TN-HEN D Permanent
iPad 1g 16gb wifi 3.2.2 + jailbreak
xbox360 Pro latest official dashboard
LG Optimus One: Android 2.2.1: Gonna' root soon
Playing Runescape since 2004!
I support the movement for democracy in Syria! What about you?

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: [SUGGESTION] Python coding on HBL

Post by m0skit0 » Wed Feb 02, 2011 7:39 pm

JJS wrote:I must shamefully admit that the new API is not yet in place :oops: .
Oh, ok ;)
SunnyAutumn wrote:Grrrr! I dislike Lua for some reason. Probably because it uses a lot of "." and ",". Always got lost in those.
That should not be a reason. Almost all programming languages use a lot of . and , For example I hate LISP's parenthesis, but it's a language I just love.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Post Reply

Return to “Half Byte Loader Development”