Homebrew Petit Computer Thread

Transdude1996

Well-Known Member
OP
Member
Joined
Dec 28, 2011
Messages
246
Trophies
1
Age
28
XP
444
Country
United States
Hello

The whole point of this thread is for people to post their programs for others to try and to have discussions with other people about developing their programs.

If you have a program you want to share, please do so in the form of a QR code and if the need any help with programming, please post those here too.

Please go easy on me. This is my first thread. Also, inform me if there is anything you need me to change.
 

MelodieOctavia

Just your friendly neighborhood Transbian.
Former Staff
Joined
Aug 29, 2008
Messages
6,258
Trophies
2
Age
39
Location
Hiatus Hell
Website
yourmom.com
XP
4,692
Country
Djibouti
There isn't a forum for any other "game" specifically, so I don't see why this one would get any special treatment. Though this thread could serve it's purpose as a repository for user-created applications.
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
There isn't a forum for any other "game" specifically, so I don't see why this one would get any special treatment. Though this thread could serve it's purpose as a repository for user-created applications.

So does that mean that we could make different threads based on different aspects of Petit Computer within this forum (Emulation/Homebrew) without worry about if it were to break certain rules? I would just think that it would generate many more topics than a single game could.
 

Transdude1996

Well-Known Member
OP
Member
Joined
Dec 28, 2011
Messages
246
Trophies
1
Age
28
XP
444
Country
United States
There isn't a forum for any other "game" specifically, so I don't see why this one would get any special treatment. Though this thread could serve it's purpose as a repository for user-created applications.

That is kind of the main point. The reason I put it under the "Emulation and Homebrew" section is because that is what the program is. You write your programs and if you want others to test it or you want to distribute it, put it here.
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
I did a little digging into the structure of the PRG files stored on the SD card, and I've got to say, I think it might be pretty easy to make a converter, allowing us to write code on our everyday computers, and then using the QR Code Tool on the Petit Computer website for transmitting our code to the DSi/3DS, reducing a lot of the stress with typing it all on the touchscreen. The code itself is not encrypted, and I can at least see the value that represents the length of the code. Some of the header is unclear to me atm, but I see we have something to work with right now.
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,256
I did a little digging into the structure of the PRG files stored on the SD card, and I've got to say, I think it might be pretty easy to make a converter, allowing us to write code on our everyday computers, and then using the QR Code Tool on the Petit Computer website for transmitting our code to the DSi/3DS, reducing a lot of the stress with typing it all on the touchscreen. The code itself is not encrypted, and I can at least see the value that represents the length of the code. Some of the header is unclear to me atm, but I see we have something to work with right now.
Already done. :P
http://filetrip.net/nds-downloads/utilities/download-petit-computer-utilities-ptcutil-081-f30095.html
(some Japanese guy did it and even translated it for us ^^)
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
I did a little digging into the structure of the PRG files stored on the SD card, and I've got to say, I think it might be pretty easy to make a converter, allowing us to write code on our everyday computers, and then using the QR Code Tool on the Petit Computer website for transmitting our code to the DSi/3DS, reducing a lot of the stress with typing it all on the touchscreen. The code itself is not encrypted, and I can at least see the value that represents the length of the code. Some of the header is unclear to me atm, but I see we have something to work with right now.
Already done. :P
http://filetrip.net/...081-f30095.html
(some Japanese guy did it and even translated it for us ^^)

Wow.......color me impressed. He didn't just make a converter. He made an entire editor from the looks of it.
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,256
Managed to get a simple mandelbrot set program ported from another BASIC dialect (bunch of differences). It's almost unrecognizable from the original source but hey it's only 32 lines.
Supposedly Petit's using fixed point math, but it's still a lot slower than a standard ds homebrew.

gallery_262855_65_3452.png

The source I ported from is here.
(there's no zooming so don't try :P)
 

Lanlan

Well-Known Member
Member
Joined
Feb 4, 2011
Messages
959
Trophies
0
XP
546
Country
United States
Now don't flame me for being a stupid noob, but ever since I heard about this I've been wondering if it could possibly be used to exploit the DSi or 3DS.
 

raulpica

With your drill, thrust to the sky!
Former Staff
Joined
Oct 23, 2007
Messages
11,056
Trophies
0
Location
PowerLevel: 9001
XP
5,716
Country
Italy
Now don't flame me for being a stupid noob, but ever since I heard about this I've been wondering if it could possibly be used to exploit the DSi or 3DS.
Code executed in it is most certainly sandboxed, so no.

Buffer overflows and the likes are useless on the 3DS, from what I've read of Neimod's latest discoveries, so while it might have a possibility of doing that, it'd just achieve nothing.

Well, enough off-topic! ;)
 

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,256

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
Odd thing for me, but I dove into the MML script before anything else, simply because if I ever do get anything out, I'll want to get the music set up. The script itself took a little time for me to figure out with some trial-n-error. My current work was pretty big, but I keep finding ways to shrink it down and organize it for easier constructing. There wouldn't happen to be an MML editor someone made, would there?

A note on the PC tools referenced here. For some reason, it won't allow me to type in uppercase in it, but when it saves, it converts the code except strings to uppercase. This has messed me up with using labels in MML because the string (staying lowercase) that stored the label(s) becomes different from the actual label (which becomes uppercase). Also, it seems the tools do not play well when pasting code, as it has crashed several times on me when attempting to paste. Just a heads up.
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
Ok, so I have ready a little bit of what I've been working on with the MML script. A Megaman 2 music player.

http://www.mediafire...zhmv53qdohi0du7

Out of the list, only 3 are available at this time. Dr. Wily's Castle, a victory jingle, and Boss music. I am not attempting to "remake" them in a new style, but am trying to retain the original NES/Famicom style, so don't expect anything other than the PSG and Noise instruments to be used unless it is necessary.

Dr. Wily's Castle is about 1/3 completed, and it was the first song I worked on with MML, so expect some inconsistencies. The "snare" I used was an actual snare, because I couldn't get the "noise" instrument to operate at first. The victory jingle still needs work, as the PSGs don't seem to match much with a triangle wave. The Boss music, I'm happy to say, is rather close, and was the last one I worked on. What I learned when making that one should help in fixing the other two (such as snare/noise instrument). I hope to make the entire list of songs (which my program doesn't list them all, just most).
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,498
Country
United States
Boy, not a whole lot of talk happening here.

Anyways, I was tinkering with a few things, and one of them was having multiple programs working together one after one. At first I thought I could simply APPEND while a program was executing, but it called for Illegal function. Checking the notes, APPEND seems to only be allowed when in run-time while not executing. It's a bummer, but I tried a different method, using EXEC. Because variables seem to be global among different programs, I devised a method that allowed me to make a sort of GOSUB in between files.

TEST1
Code:
IF RETFUNC$ != "" THEN GOTO RETFUNC$
CLEAR
PRINT "Start in Test1"
RETFUNC$ = "@RETURNME"
RETFILE$="TEST1"
EXEC "TEST2"


@RETURNME
PRINT "Returned to Test1"
WAIT 120
CLEAR
END

TEST2
Code:
IF RETFUNC$ != "" AND RETFILE$ != "" THEN GOTO @FUNC2

PRINT "In TEST2"
END

@FUNC2
PRINT "Inside FUNC2 of TEST2"
Print "Returning to TEST1"
EXEC RETFILE$

The output when load/run TEST1?
Code:
Start in TEST1
Inside FUNC2 of TEST2
Returning to TEST1
Returned to TEST1

The output when load/run TEST2?
Code:
In TEST2

A little hacky, but it worked nonetheless. I have no idea of the performance factor related to this, but I was hoping that I could use this method for splitting up programs so each would handle a different feature, like one would hold the data and code for user-made BGM playback.
 
  • Like
Reactions: 1 person

Snailface

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
2
Age
40
Location
Engine Room with Cyan, watching him learn.
XP
2,256
Here is a Tetris clone for Petit Computer I made. It's called 'Petitris' and, well, I just hope people can improve it since it's a little, 'spur of the moment' :lol:

SmileBasic is uncharted territory for me so this was just for fun more than anything. Enjoy.

gallery_262855_65_4725.png
gallery_262855_65_3037.png
gallery_262855_65_1328.png
gallery_262855_65_3383.png

Updated 7/28: Several little improvements.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/9kE3Env_2AY?si=Bs6lUZ0ZIlqmYaGT