![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on [Update] NervOS 2.0.5 within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; This is the final version of NervOS for the psp-hacks competition. I have worked this week on 2.0.5 so here ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() ![]() Developer
|
![]() This is the final version of NervOS for the psp-hacks competition. I have worked this week on 2.0.5 so here it is. Changes/Additions:
The scripting system was made to allow users with no programming knowledge to create their own games or programs. Of course this is the first version of the scripting system so a lof things are missing and some bugs may be found. Screenshot (the new icons) ![]() To run scripts at 80% speed, make sure you use 333mhz. Spoiler for Script Sample:
Screenshot (of my sample script running) ![]() Remember this is the first version of the script and it's slow. Only a few functions are available but its all I could do this week. May have some bugs of course. DisplayImage(X,Y(integer variable here won't work), imgname); Here's the documentation of NervOS Script: http://www.consoleworld.net/nervos/i...ting_Functions [Download: NervOS 2.0.5] [Mirror: NervOS 2.0.5] [Download: Theme Pack 1.5] Note: some themes included in v1.0 are not in v1.5 due to NervOS 2.0.5 incompatibility. |
|
|
|
|
|
#5 |
![]() PSP Developer On Break
My Mood:
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
|
wow nice release and i like the idea of it own scripting languese
if you don't mind how do you do it i mean how does the eboot open the file and run each function it seem interesting please tell me where you got the code or idea
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1) |
|
|
|
|
|
#6 |
![]() |
@joseph10444/This is the final release for the contest. Not the last ever release.
@thecobra/For coding help http://www.consoleworld.net/nervos/i...ting_Functions and you save the extention as a .script file and load it with the file browser. Just hit Home and choose the script file. They are made with the text editor too.
__________________
Currently open for Testing. PM me. QJ letter limit is retarded. |
|
|
|
|
|
#7 |
![]() |
Wonderful job Pirata. The scripting system sounds great.
You definitely deserve a place in the comp. Good luck!
__________________
If you ever need me, you can contact me at [URL="**********.net"]**********.net.[/URL] |
|
|
|
|
|
#8 |
![]() ![]() ![]() Developer
|
@the cobra, I created a pre-parser to check all lines and verify them. Gives errors if cannot read something correctly or says "function does not exist" if cannot find the function in its list.
then, I needed to create the real parser (this is what slows down my scripting system and I will improve the pre-parser to do the same as the parser), it checks the while which being read and executes the function inside. Of course the functions I created do not exist for C, they were made by me. The result of the functions I made are the same as C functions but with different looking (DisplayImage, etc). |
|
|
|
|
|
#9 |
![]() PSP Developer On Break
My Mood:
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
|
pirate@thanks for the explaining it
how about a auto updater for the shell that will be cool for the next release m33_user@i meant how its read the code not how to wright a script but thanks anyway
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1) |
|
|
|
|
|
#10 |
![]() ![]() ![]() Developer
|
yeh a auto updater will be added.
|
|
|
|
|
|
#11 | |
![]() PSP Developer On Break
My Mood:
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
|
Quote:
if you want i can help due that i am making one for robot warrior as well
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1) |
|
|
|
|
|
|
#12 |
![]() ![]() ![]() Developer
|
thanks but I want to make myself
|
|
|
|
|
|
#14 |
![]() |
Amazing, this and one other homebrew (apart from the odd UMD) is all I really use my PSP for. Another great release, why havent you got dev status? *hint to mods*
__________________
[FONT="Arial"][B]PSN: headlesslizard[/B][/FONT] |
|
|
|
|
|
#15 |
![]() ![]() ![]() Developer
|
@headlesslizard, i dont know :P
-= Double Post =- also, if someone can post this on the main page.. lol Last edited by PirataNervo; 06-01-2008 at 02:36 PM.. Reason: Automerged Doublepost |
|
|
|
|
|
#16 |
![]() |
Out of curiosty, why do you split each function at the " " instead of the "," That way you can have it be funct(x,y,"blah blah blah")
__________________
There are 10 types of people in the world. Those who can read binary and those who can't. --------------------------------------------------- Thanks Vanden, for giving me 300k for hot club Thanks -DaveyHavok- for donating 1 Million Points --------------------------------------------------- [IMG]http://img170.imageshack.us/img170/9756/sig1qx0.png[/IMG] |
|
|
|
|
|
#17 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
|
Mirrored Download Links Are On My Site Under The Downloads Section
http://psp-networks.ath.cx/ p.s. i love the updates and new themes thanks pirata, keep up the good work
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference. My Website: is down for a while ... I'll bring a new one back soon. Currently working on: (0) PGE Gears Of War - On hold (Very large project). (0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix). |
|
|
|
|
|
#18 |
![]() ![]() ![]() Developer
|
@Firey, I made the current scripting system in one week, I had no time to think of what I was doing wrong or right, just finished the features I thought that needed to be on the first release of the scripting system.
Thanks FaT3oYCG
|
|
|
|
|
|
#19 |
![]() ![]() ![]() Developer
|
PirataNervo, google "shift-reduce" parser design
It's a very simple and yet very powerful. But most explanations of it suck =3 So here I'll "try": Step 1: Load the code Code:
//A variable
int variable;
//A function
int function()
{
}
Code:
int variable;
int function()
{
}
(a linked list if you will) Code:
TEXT(int) -> TEXT(variable) -> OPERATOR(;) -> TEXT(int) -> TEXT(function) -> OPERATOR(() -> OPERATOR()) -> OPERATOR({) -> OPERATOR(})
(where most people fail is right here, but it's simple really) We have a list of patterns: (TEXT_ARG = takes in an argument) (TEXT = EXPECTS a certain text to appear) (OPERATOR_ARG = takes in an OPERATOR) (OPERATOR = EXPECTS a certain operator to appear) Code:
Pattern 1:
--name: VARIABLE_START
--pattern to expect=TEXT_ARG -> TEXT_ARG
--LookAhead CANNOT be one of these:
----OPERATOR(()
Pattern 2:
--name: VARIABLE
--pattern to expect=VARIABLE_START -> OPERATOR(;)
Pattern 3:
--name: FUNCTION_PARAM_START
--pattern to expect=TEXT_ARG -> TEXT_ARG -> OPERATOR(()
Pattern 4:
--name: FUNCTION_PARAM_END
--pattern to expect=FUNCTION_PARAM_START -> OPERATOR())
Pattern 5:
--name: CODE_BLOCK
--pattern to expect=OPERATOR({) -> OPERATOR(})
Pattern 6:
--name: FUNCTION
--pattern to expect=FUNCTION_PARAM_END -> CODE_BLOCK
Code:
TEXT(int) -> TEXT(variable) -> OPERATOR(;) -> TEXT(int) -> TEXT(function) -> OPERATOR(() -> OPERATOR()) -> OPERATOR({) -> OPERATOR(})
1) Reads a token from our list, and 'pushes' it onto a stack 2) So we read the first token, TEXT(int) Stack=TEXT(int) 3) We also set a LOOK AHEAD token which points to the next token LookAhead=TEXT(variable) 4) We then look through our list of patterns to see if we find a match 5) No match found, push the next token onto the stack Code:
Stack=TEXT(int) -> TEXT(variable) LookAhead=OPERATOR(;) Code:
Pattern 1: --name: VARIABLE_START --pattern to expect=TEXT_ARG -> TEXT_ARG --LookAhead CANNOT be one of these: ----OPERATOR(() 7) Now what, that the pattern matched? The stack before was: Code:
Stack=TEXT(int) -> TEXT(variable) LookAhead=OPERATOR(;) --pattern to expect=TEXT_ARG -> TEXT_ARG So we "pop" these two tokens from the stack: Code:
Stack=(blank) LookAhead=OPERATOR(;) Code:
Stack=VARIABLE_START LookAhead=OPERATOR(;) E.g., when a VARIABLE_START pattern is found, we can do: compiler_addVariableToDat abase(getValueOfFirstArgT extOccurance, getVal..etc) 9) Now we continue our pattern searching by getting the next token, "OPERATOR(;)" Which means the stack is now: Code:
Stack=VARIABLE_STACK -> OPERATOR(;) LookAhead=TEXT(int) Code:
Pattern 2: --name: VARIABLE --pattern to expect=VARIABLE_START -> OPERATOR(;) ---------------------------------------------------------- Well, hopefully, this is an interesting read to some. I'm not gonnah kill it to death by manually 'parsing' the rest of the code But that should give some an idea of how compilers do things. I mean, think of it with numbers: Code:
Pattern 1: --name: NUMBER --pattern to expect=NUMBER -> OPERATOR(*) -> NUMBER Pattern 2: --name: NUMBER --pattern to expect=NUMBER -> OPERATOR(/) -> NUMBER Pattern 3: --name: NUMBER --pattern to expect=NUMBER -> OPERATOR(+) -> NUMBER --LookAhead CANNOT be one of these: ----OPERATOR(*) ----OPERATOR(/) Code:
8+2*5 What happens? After the first three tokens are pushed onto the stack, the parser would try to apply pattern #3 BUT, since the LookAhead would be OPERATOR(*): Code:
Stack=8+2 LookAhead=* so pattern 3 does not get applied, and the parser continues: So we eventually get: Code:
Stack=8+2*3 LookAhead=END Since pattern 1 has 3 tokens, this means 3 tokens are popped off the stack, leaving: Code:
Stack=8+ LookAhead=END Code:
Stack=8+NUMBER LookAhead=END And we get: Code:
Stack=NUMBER LookAhead=NULL Fin ---------------------- Important notes: 1) Pattern matching is done from end of stack - and not anywhere in between 2) It is common for Patterns to have the same 'end result' "name" (such as seen above) Last edited by SANiK; 06-12-2008 at 01:44 PM.. |
|
|
|
|
|
#20 |
![]() ![]() ![]() Developer
|
thanks
![]() some of the things you explained are similiar to the ones I am using like stripping comments. the scripting system was made in one week so it's really bad. I will update it for the next version. thanks again for your help |
|
|
|
|
|
#22 |
![]() ![]() ![]() Developer
|
which firmware do you have?
please read the wiki.. |
|
|
|
![]() |
| Tags |
| nervos , update |
| Thread Tools | |
|
|