QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

request for conversions - lua to c converter

This is a discussion on request for conversions - lua to c converter within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; request - conversions lua to c converter i would like as many people as possible to help with this i ...

Reply
 
LinkBack Thread Tools
Old 11-02-2007, 03:11 PM   #1
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default request for conversions - lua to c converter

request - conversions

lua to c converter

i would like as many people as possible to help with this

i would like and and all of the conversions for lua code to c and vice versa

e.g.

screenrint = pspDebugScreenPrintf

and so on for a program that i am makeing to help people who know lua to learn c as i do not yet know c myself i cannot convert them all and even if i could i would probably forget some

the program will help people who know lua to learn c and even if they dont want to lean it it will help them to compile their lua programs into c code

which would be useful for every one and more people would learn lua and c

please if you have any conversions for me or have any suggestions of how to do some of the conversions please pm me !!!!!!!!!
__________________
------ 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).

Last edited by FaT3oYCG; 11-03-2007 at 05:07 AM..
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:28 PM   #2
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Wont work. Think about graphics choices. gu, graphics.c, oslib, sdl. The chioce is vast.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:30 PM   #3
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

it will work i have it working it is quite easy and it auto matically includes files depending on what code you use
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:32 PM   #4
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

you have graphics conversion working already ?
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:32 PM   #5
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Quote:
Think about graphics choices. gu, graphics.c, oslib, sdl. The chioce is vast.
That would only prevent a lot of C programs being converted to LUA,
How many people ever went back to LUA from using C with the PSP?
it could work the other way round for many programs, if not all programs.
LUA is written in C, so there's C syntax for everything LUA does.
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:39 PM   #6
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

basically i want the conversions to convert the lua to c and yes it does work and it does only stop c going to lua

as that would be nearley impossibe

also why would you want to go from c code to lua you wouldnt

by me creating this app lua coders can learn c by coding in lua therefore teaching themselfes this would be a good application for everyone and all im asking is for people to tell me the conversions that they know ill add them in and see if they work and to answer your question the conversion from lua to graphics works in my program it only converts the code tho and i havent tested yet but it is more likeley to work than not
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:41 PM   #7
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Quote:
Originally Posted by FaT3oYCG
request - conversions

i would like as many people as possible to help with this

i would like and and all of the conversions for lua code to c and vice versa

e.g.

screenrint = pspDebugScreenPrintf

and so on for a program that i am makeing to help people who know lua to learn c as i do not yet know c myself i cannot convert them all and even if i could i would probably forget some

the program will help people who know lua to learn c and even if they dont want to lean it it will help them to compile their lua programs into c code

which would be useful for every one and more people would learn lua and c

please if you have any conversions for me or have any suggestions of how to do some of the conversions please pm me !!!!!!!!!
Dont make stupid claims and then completely retract your statement.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:45 PM   #8
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

i meant the conversion if you said

screenrint = pspDebugScreenPrintf

it would mean the same as

pspDebugScreenPrintf = screenrint

of you were makeing an lua to c converter ill add that to the first post sorry
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:47 PM   #9

lol
 
Anti-QuickJay's Avatar
 
Join Date: Aug 2006
Real First Name: Robert
Location: Whittier, CA
Just Played: Madden 10
Posts: 5,791
Trader Feedback: 0
Default

Why did you make a thread AND make a post in the lua help thread AND make a post in the C help thread?
STOP SPAMMING!

I got a suggestion, Learn C/C++ then do the "conversions" yourself.
Anti-QuickJay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:48 PM   #10
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Couldnt you just look at the luaplayer source code ?
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:48 PM   #11

Avada Kedavra
 
Join Date: May 2007
Location: Spain
Posts: 703
Trader Feedback: 0
Default

Quote:
Originally Posted by Anti-QuickJay
Why did you make a thread AND make a post in the lua help thread AND make a post in the C help thread?
STOP SPAMMING!

I got a suggestion, Learn C/C++ then do the "conversions" yourself.
Hell yeah!
Coolj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:53 PM   #12
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
Couldnt you just look at the luaplayer source code ?
yes i could and yes i can and yes i am but there are many files with different code in that most of it i dont understand as i dont know c as i have said which make sit hard for me and justifies why i am asking for conversions

i also hoped to use my own program to help me learn c as it would show me the references between c and lua and help me to associate the relevant c code with the equivelant lua code
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:54 PM   #13
 
Join Date: Sep 2006
Location: Finland
Posts: 752
Trader Feedback: 0
Default

Uhm, the language syntax is completely different. And automated conversions from language to another don't work too well
__________________
[center][B][SIZE="3"]wheeee =:D[/SIZE][/B][/center]
MaTiAz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 03:54 PM   #14

lol
 
Anti-QuickJay's Avatar
 
Join Date: Aug 2006
Real First Name: Robert
Location: Whittier, CA
Just Played: Madden 10
Posts: 5,791
Trader Feedback: 0
Default

You cant just learn C by using "converted" lua functions.
All in all, Your program will be a watse of time.
Plus the syntax is different.
-= Double Post =-
Quote:
Originally Posted by eldiablov
Couldnt you just look at the luaplayer source code ?
That is a very good idea. Even if you dont know C++ you can tell whats what.

Last edited by Anti-QuickJay; 11-02-2007 at 03:56 PM.. Reason: Automerged Doublepost
Anti-QuickJay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 04:17 PM   #15
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Quote:
Originally Posted by MaTiAz
Uhm, the language syntax is completely different. And automated conversions from language to another don't work too well
Agreed, but Isn't that what LUA player is doing at runtime? , and wouldn't it be better happening at compile time?
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2007, 07:18 PM   #16
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

yes it would which is what my program will let you do and it will work because ive already started



that is just a coupple coz ive only added a few as i only started tonight and im going bed now see yall tomorrow i think

oh soz for the big pic
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 01:52 AM   #17

Developer
 
Bubbletune's Avatar
 
Join Date: Apr 2007
Posts: 1,493
Trader Feedback: 0
Default

Just converting the function names isn't enough, the complete syntax needs to be changed, datatypes modified, semicols added, other type of loops, different includes, Makefile needs to be made etc.
The compilers are also very strict, one mistake will stop it from compiling, you could fix it with common sense then, but I doubt you will be able to make it convert precisely enough to make the compiler accept it without any changes.
Learning C is pretty easy, you don't need weird converters for it, take a look at the tutorials at http://www.psp-programming.com/, also take a look in the forums. For some reason I find the C syntax easier then LUA, but that's my opinion.
__________________
Bubbletune's Release Site
Bubbletune is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 02:27 AM   #18
 
Join Date: Sep 2006
Location: Finland
Posts: 752
Trader Feedback: 0
Default

Quote:
Originally Posted by FaT3oYCG
yes it would which is what my program will let you do and it will work because ive already started
Oh wow. That is FAAAAAR away from converting lua to C.
__________________
[center][B][SIZE="3"]wheeee =:D[/SIZE][/B][/center]
MaTiAz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 05:06 AM   #19
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

Quote:
Originally Posted by MaTiAz
Oh wow. That is FAAAAAR away from converting lua to C.
well if people actually did start to make the conversions then it would be easy and wouldnt be "FAAAAAR away" from converting lua to c

all i would like people to do is use this

("PSP LUA Code", "PSP C Code")

and replace them with the relevant data and i can add them in and make the converter actually do something

i am going to make it able to make a simple hello world program just to prove my poc and maybe then you will see that it would be a useful program to have
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 05:11 AM   #20

Avada Kedavra
 
Join Date: May 2007
Location: Spain
Posts: 703
Trader Feedback: 0
Default

Learn C instead of wasting your time with this useless idea.
Coolj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 05:22 AM   #21

sceKernelExitGame();
 
Bronx's Avatar
 
Join Date: Jan 2006
Location: New York
Posts: 3,125
Trader Feedback: 0
Default

I agree, this is a waste. Anyone who is seriously about learning C would never use this (disregarding the fact that you'll never get this to work).

Then only way I could see this working is using a lex, yacc, ANTLER, flex, bison, ect... to generate code for you. You'd need to make the grammer yourself for Lua's syntax. So basically, that's almost like recreating the Lua language, which I can guarantee you won't be able to do.
Bronx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 05:40 AM   #22

Heroes never die
 
hallo007's Avatar
 
Join Date: Aug 2006
Location: ...........
Posts: 1,318
Trader Feedback: 0
Default

why do you want it convert anyway , there is a reason they made LUA
hallo007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 06:12 AM   #23

Developer
 
Bubbletune's Avatar
 
Join Date: Apr 2007
Posts: 1,493
Trader Feedback: 0
Default

Not every function in LUA exists in C directly, you'll need to have like 20 lines of code sometimes, for something LUA would do in one. Unless you create header files that has the complete code, and then have it convert it to one line which then redirects to the header file. But that wouldn't help you to learn at all, it simply changes the syntax (and I doubt you are able to change the syntax anyways) but keeps everything the same speed, functions etc.
Another thing, how are you going to create a converter if you don't even know C yourself? You'll have to ask a question about it for everything you add in the program, making it far from "your" work, more the work of the community who told you how to do all of it.
__________________
Bubbletune's Release Site
Bubbletune is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 06:47 AM   #24
Developer and Tutor.
 
FaT3oYCG's Avatar
 
My Mood: Happy
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
Default

i can look at the code snippets for the translations most are common sense i can use lua player for some otheres <-- the source and ust tuts that are on the internet for the rest then when i have finished if i have missed any out i can ask here

and i am able to make it convert one line of lua code into many lines of c code

i could even make it create a hellow world program if you typed hello world !!! if i wanted to just for poc
__________________
------ 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).
FaT3oYCG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 07:13 AM   #25

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Only one thing: You need a lexical analyzer to write a working LUA to C converter, and unless you know what that is - which I heavily doubt, seeing as you don't even understand what you're trying to do - then the whole project will not work out.

PS: As said many times already: Just replacing function calls with C function calls will not be enough. It will only work out for the LUA scripts that you wrote the replacements for and won't work in general. If you can't understand that, then... well... have fun with wasting lots of time until you'll find out for yourself when you hit the wall.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 07:15 AM   #26
Ænima
 
Judas's Avatar
 
Join Date: Sep 2007
Posts: 587
Trader Feedback: 0
Default

There's already a Lua to C converter. It's for the PC version of lua. And since the source is most likely released as well, you just have to change it to include some of the PSP specific functions.
__________________
[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]

Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
Judas is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 07:25 AM   #27
 
Maxy_PSP's Avatar
 
Join Date: Sep 2007
Location: BELGIUM !!
Posts: 234
Trader Feedback: 0
Default

Lol, i started a few months ago also a Lua to c convertor, but i'm stop working on it.

I think i go back working on it...
Maxy_PSP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 07:43 AM   #28

sceKernelExitGame();
 
Bronx's Avatar
 
Join Date: Jan 2006
Location: New York
Posts: 3,125
Trader Feedback: 0
Default

Quote:
Originally Posted by Raphael
Only one thing: You need a lexical analyzer to write a working LUA to C converter, and unless you know what that is - which I heavily doubt, seeing as you don't even understand what you're trying to do - then the whole project will not work out.

PS: As said many times already: Just replacing function calls with C function calls will not be enough. It will only work out for the LUA scripts that you wrote the replacements for and won't work in general. If you can't understand that, then... well... have fun with wasting lots of time until you'll find out for yourself when you hit the wall.
In case you're wondering what they are, look at my first post. I listed a few of them.
Bronx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 08:47 AM   #29
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Quote:
Originally Posted by Maxy_PSP
Lol, i started a few months ago also a Lua to c convertor, but i'm stop working on it.

I think i go back working on it...
Don't, just dont. Dont work on anything. You are the last person who should be trying to outdo others.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-03-2007, 09:05 AM   #30

Developer
 
Join Date: Aug 2007
Location: Australia
Posts: 657
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
Don't, just dont. Dont work on anything. You are the last person who should be trying to outdo others.
So very true
__________________
Xsjado7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
conversions , converter , lua , request

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 04:41 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us