LoginLogin

Making a PTC Compiler

Root / Talk About Programs / [.]

computableeCreated:
I think it was Mycraft who's already made a SENDFILE command. I'll be borrowing from him (permission and credits given of course).

Without palettes, a lot of programs will break. How do you plan on changing from palette to all colors...?
Nah, only a few colors should be off. It should be a small fix for anybody porting PTC games.
What do you mean by experienced?
Somebody who ideally has worked in every area of SB (algorithms, graphics, sprites, backgrounds). However, these people are rare, so if you know at least one of these areas very well, I would call you experienced in that area (I personally am only experienced in algorithms and graphics).

I think it was Mycraft who's already made a SENDFILE command. I'll be borrowing from him (permission and credits given of course).
Someone .Ade a send file command on smilebasic?!?!

So, is the idea that it compiles PTC code into SB code? If so I'd like to use it to compile Village into SB code. I used Petit Modem to get it onto my 3DS.

So, is the idea that it compiles PTC code into SB code? If so I'd like to use it to compile Village into SB code. I used Petit Modem to get it onto my 3DS.
It would need tweaking, but yes, that's the idea.

We were talking in the chat and decided our best option may just be to have the compiler ignore any commands concerning palettes and allow the user to use the whole RGB grid at once (attribute it to "hardware improvements.") Anyway, work is coming along great. I just added PNLTYPE and PNLSTR (ezpz) and BTRIG won't take more than 20 seconds.
That doesn't seem like a true fix, but I guess if you're only interested in porting it'll do.
So this will be much harder than I anticipated. There are two reasons I say this: 1) The massive amount of commands/functions I have to go through and reprogram. 2) Optional arguments I won't stop going, of course. I'll just need people with the modem working to import PTC programs and test them for me as I go. So, I suppose I'm requesting beta testers? I'd prefer experienced PTC users for this. Don't tell me your email; I'll send you a message via the site if you're accepted (and to send you keys).
On optional arguments, in my PTC interpreter first off I had space removal, and I had "gluing" characters that would always remove spaces to the side of them, so if I had something like visible 0,1,0,1 + 1 - 1, 0, 1 ,0 it would convert that to visible 0,1,0,1+1-1,0,1,0 (Because I had defined , + and - and "gluing" characters) so the interpreter wouldn't get confused. The problem was when I had a -2 it would "glue" the - to the command too, like visible 0,1,0,1 + 1 - 1,0, 1 ,0 to visible-1,1,0,1+1-1,0,1,0 So to fix that I had checks such as "isFunc" that would return either 0 or 1 depending on if the sent string was a function or not (as defined by checking to see if it's in an array), so that would protect things from unnecessarily gluing. visible -1,1,0,1+1-1,0,1,0 What my program did was everything separated by spaces (post space removal) was it's own element in a string array, going by this optional arguments were not a problem, because it was SBARR[0] == visible SBARR[1] == -1,1,0,1+1-1,0,1,0 And it could detect when the end of string came because it knew exactly how long the given string is. I had a function called "getCommadContent(string variable to pass the string "0,1,3,434,8" and the value 3)" and it would return the string "434". If you sent "getCommadContent("0,1,3,434,8", 89 )" it would return the string "", so the interpreter knew there was no argument in the 89th comma place. Sorry if that sounds a little complicated.

Tl;Dr To summarize if I were you I would store every command and series of numbers in a big string array in a way as such PRINT "Hello world" PRINT 1 + 1 VISIBLE 0, 0, 1, 1, 1, 1 SBARR$[0] = PRINT SBARR$[1] = "Hello world" SBARR$[2] = PRINT SBARR$[3] = 1+1 SBARR$[4] = VISIBLE SBARR$[5] = 0,0,1,1,1,1 And that makes managing it much easier in general.

I already have the optional arguments issue covered.

i just realized.... how are we gonna get a hold of the ptc codes if we can scan anything or look get ptc

this seems pointless without a ptc code TO COMPILE

nvm found a thingy called PTCUtilities that scans QR codes and turns them to the editable code and can be saved back as a PTC file

You know you can just edit previous posts instead of triple posting, right?

You know you can just edit previous posts instead of triple posting, right?
.........no i didnt STILL the ptcUtilities is a great find

I used PTCU back when I was making MCDS. The QR codes it made were bigger, thus, less QRs.

Dear lord, i thought we all moved past PTC

VISIBLE will be very impossible to replicate perfectly In PTC, it was actually useful, and allowed you to hide the console text and still allow other text. this isn't a huge problem... You still have to convert the special characters in strings. their ASC numbers all changed in SB There is no perfect solution without fully rewriting PRINT and everything but you can simply replace things in strings, where it's common to have symbols.

Dear lord, i thought we all moved past PTC
dear lord you dont know a majority of the SB audience. alot of really great games were on there. including a megaman remake

plus, Europe doesn't even have SB yet

just as long as i can play my favorites again

Dear lord, i thought we all moved past PTC
dear lord you dont know a majority of the SB audience. alot of really great games were on there. including a megaman remake
Why do some people seem to have a hate on for petit? Was it that bad? Or do they just want people to adopt to sb?