|
|
|
#1
|
|||
|
|||
|
Now that we have a nice pretty section thanks to EnzoTen I'll kick it off.
I've been working on indexing and figuring out all the functions available to use for application creation(and maybe more !). Here(http://en.wikipedia.org/wiki/User:Thieving6/X-FI_2_Lua) you will find many things. A full function list, examples(soon to come), tutorials(soon to come), and more. You might notice a 1.1 Whats needed section that lists some things that need more information on. If you have something to add, please do! I only ask you to follow the format already shown so I don't have to follow up. Once the Whats needed section is done I have planned the creation of a virtual test ground for testing lua scripts on your PC. This way you don't have be going back and forth to your player. I encourage everyone to try and develop applications! Not only will it broaden your view and make your player special, you'll probably make something someone else is interested in! |
|
|
|||
|
|
|
#2
|
||||
|
||||
|
I was looking at the PSP lua wiki.
http://forums.qj.net/psp-development...-snippets.html Wauw alot of nice functions in that thing. |
|
#3
|
|||
|
|||
|
I think a sticky thread would be useful to hold the things that aren't included in the official API documentation from Creative.
I'll contribute this one for now: Despite the explicit statement in the API doc that color.new just takes R, G, B, you can call color.new(r, g, b, a) where a is the alpha channel. A dump of the screen, image, text, etc. tables shows some methods not included in the docs too (I'm sure some of these have been mentioned, but it would be good to collect them.): screen: .clear image: .create .width .setbg .height .setresource .fill os: (all but os.sleep are in the Lua docs) .exit .setlocale .date .difftime .remove .time .clock .ostime .rename .sleep |
|
#4
|
|||
|
|||
|
Too late: http://en.wikipedia.org/wiki/User:Thieving6/X-FI_2_Lua
In the very beginning when there were only 2 of us here, Zap dumped the tables and we worked on the wiki.
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#5
|
||||
|
||||
|
Good idea Theodore - but the wiki already did it. I merged the threads and stickied it
|
|
#6
|
|||
|
|||
|
Anybody want to move this to it's own wiki (e.g. on wikia) rather than squatting on Thieving6's Wikipedia user space?
|
|
#7
|
|||
|
|||
|
I don't use wiki on anything else. So it really doesn't matter.
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#8
|
||||
|
||||
|
Completed os.ostime(). Maybe this helps with an eggtimer app. I remember somebody else having a problem with the timer...
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg http://www.starfare.eu/ - a free real-time strategy game. |
|
#9
|
|||
|
|||
|
So if what you wrote is correct, we have millisecond timing?!?! Although I'm curious of why one would be second timing and the other millisecond timing.
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#10
|
||||
|
||||
|
Ya that's true. Try this app on your Zen and on the simulator:
Code:
screen.clear();
b = color.new(0, 0, 0);
text.size(30);
text.color(color.new(255, 0, 0));
while true do
screen.fillrect(0, 0, 400, 240, b);
text.draw(0, 0, tostring(os.ostime()));
screen.update();
if control.read() == 1 then
if control.isButton() == 1 and button.home() == 1 and button.click() == 1 then break; end;
end;
end;
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg http://www.starfare.eu/ - a free real-time strategy game. |
|
#11
|
|||
|
|||
|
for some reason os.ostime() doesn't show any data on my screen unless i concatenate it with text.
anyway i though this would be as good a place to post this as any. thanks to ZaPx64, this works great for limiting the frame rate in action games for better performance. just add it to a draw screen function... Code:
oldtime = os.ostime()
function drawscreen()
newtime = os.ostime()
if (newtime - oldtime) > 36 then
oldtime = os.ostime()
screen.fillrect(0,370,240,30,bg)
arrows:draw(0,370)
text.draw(0,375,page .. " / 10 ","center")
screen.drawline(0,369,240,369,k)
screen.update()
end
end
this might also help with crashing to a scandisk. i haven't had that kind of crash on any of the apps i tested this with. |
|
#12
|
|||
|
|||
|
Instead of creating a new thread, I figured I'd post my findings here, as it bares some relevance to the wiki.
Quote:
|
|
#13
|
|||
|
|||
|
It has something to do with the "rebuilding" I assume. Does the MicroSD have a "rebuilding" feature like the player?
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#14
|
||||
|
||||
|
No rebuilding as the player does, but it prompts you to "build the library" every time you've restarted your player and try to access files on it.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#15
|
|||
|
|||
|
Quote:
Quote:
All that's needed is a method in the shell that searches the partition table for files and their locations on the disk. Unless of course I'm completely off and flash media don't have partition tables, instead using something else or not at all? |
|
#16
|
||||
|
||||
|
The file system on my Zen is FAT32 and it does have partition tables because it wouldn't work without them. Finding the files via Bruteforce would not work because FAT32 supports file names with a total lenght of 255 characters. Nucleus comes with several distrubutions which possibly support "dir" functions.
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg http://www.starfare.eu/ - a free real-time strategy game. |
|
#17
|
|||
|
|||
|
Quote:
|
|
#18
|
||||
|
||||
|
Why do you focus on the shell? I think LUA does not rely on any shell commands nor does C.
I think the shell might not have any dir functions anyway, but that is not important for LUA then. The most convenient thought is that creative disabled these functions for security reasons. That's just my two cents
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg http://www.starfare.eu/ - a free real-time strategy game. |
|
#19
|
|||
|
|||
|
Quote:
|
|
#20
|
||||
|
||||
|
Quote:
But according to my findings here (http://anythingbutipod.com/forum/sho...1&postcount=14) Zen runs a UNIX based OS (look at cpath in package table) so I still think dir-browsing is disabled for security reasons. How did you find out about that RTOS?
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg http://www.starfare.eu/ - a free real-time strategy game. |
![]() |
| Tags |
| alpha, applications, color, library, lua, method, progamming, wiki, x-fi2 |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 11:31 AM.










!). 


Hybrid Mode
