Petit Computer Thread

Discussion in 'NDS - Emulation and Homebrew' started by Transdude1996, Jul 19, 2012.

Jul 19, 2012

Petit Computer Thread by Transdude1996 at 9:36 PM (22,048 Views / 0 Likes) 137 replies

  1. Transdude1996
    OP

    Member Transdude1996 GBAtemp Regular

    Joined:
    Dec 28, 2011
    Messages:
    191
    Location:
    Colorado Springs, CO
    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.
     


  2. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    Country:
    United States
    Cool beans, though I wonder if the moderators would make a completely new section just for this. Maybe if the discussion starts to exceed the thread's capacity.
     
  3. TwinRetro

    Global Moderator TwinRetro Don't start nothin', Won't be nothin'

    Joined:
    Aug 29, 2008
    Messages:
    6,181
    Location:
    Las Vegas, NV
    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.
     
  4. Rydian

    Member Rydian Resident Furvertâ„¢

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    I think they meant "thread" and were referring to this one.
     
  5. Fudge

    Banned Fudge Remember that death is not the end, but only a tra

    Joined:
    Aug 26, 2009
    Messages:
    2,655
    Location:
    New York
    Country:
    United States
    Damn! I want it! Need money :(
     
  6. raulpica

    Supervisor raulpica With your drill, thrust to the sky!

    Joined:
    Oct 23, 2007
    Messages:
    10,660
    Location:
    _____________ PowerLevel: 9001
    Country:
    Italy
    Yes, this. Fixed the wording for you, @[member='Transdude1996'] :yay:
     
  7. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    Country:
    United States
    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.
     
  8. Transdude1996
    OP

    Member Transdude1996 GBAtemp Regular

    Joined:
    Dec 28, 2011
    Messages:
    191
    Location:
    Colorado Springs, CO
    Country:
    United States
    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.
     
  9. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    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.
     
  10. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    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 ^^)
     
  11. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    Country:
    United States
    Wow.......color me impressed. He didn't just make a converter. He made an entire editor from the looks of it.
     
  12. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    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.

    [​IMG]
    The source I ported from is here.
    (there's no zooming so don't try :P)
     
  13. Lanlan

    Member Lanlan Tits

    Joined:
    Feb 4, 2011
    Messages:
    905
    Location:
    CCCP
    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.
     
  14. raulpica

    Supervisor raulpica With your drill, thrust to the sky!

    Joined:
    Oct 23, 2007
    Messages:
    10,660
    Location:
    _____________ PowerLevel: 9001
    Country:
    Italy
    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! ;)
     
  15. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
  16. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    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.
     
  17. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    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).
     
  18. DiscostewSM

    Member DiscostewSM GBAtemp Psycho!

    Joined:
    Feb 10, 2009
    Messages:
    4,794
    Location:
    Sacramento, California
    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.
     
    1 person likes this.
  19. Snailface

    Member Snailface My frothing demand for 3ds homebrew is increasing

    Joined:
    Sep 20, 2010
    Messages:
    4,324
    Location:
    Engine Room with Cyan, watching him learn.
    Country:
    Antarctica
    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.

    [​IMG][​IMG][​IMG][​IMG]
    Updated 7/28: Several little improvements.
     
  20. dicamarques

    Member dicamarques Definitely not Bruce Wayne.

    Joined:
    Jun 25, 2010
    Messages:
    1,012
    Location:
    Your computer's Recycle Bin
    Country:
    Portugal
    Too bad this ain't in the europe atm ;(
     
    xdpirate likes this.

Share This Page