Homebrew Homebrew Development

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Python eh?

http://learnpythonthehardway.org/

Free version of the e-book if you prefer:

http://learnpythonthehardway.org/book/

Enjoy, it's also a recommended book by the r/programming subreddit, so I'm assuming it's pretty good.
I haven't read it myself, but I plan to read it to use as material to help teach my younger cousin programming in the future.

Anyway, enjoy, and also, that same guy has a book on C as well, might want to check it out. ;)
Thank you, really! You guys at GBATemp are awesome!
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
I finally got it to work!
https://github.com/AlbertoSONIC/3DSBinaryConverter

But i'm having some graphical issue...

77ca3112ed74be3d2f613a52cc3f5175.jpg


How can i fix it? I really need help!

EDIT1: Plus, i need help for int --> char* conversion... Because it seems to crash once it reaches the result printing point.

EDIT2: Is there some way to increase font size?
 
  • Like
Reactions: gamesquest1

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
I finally got it to work!
https://github.com/AlbertoSONIC/3DSBinaryConverter

But i'm having some graphical issue...


How can i fix it? I really need help!

Plus, i need help for int --> char* conversion...


It's probably because you're only writing to 1/2 framebuffers (and you're using a hardcoded addr as opposed to swaping with the gfx lib).

For int-->char just search for "itoa in c" function and port it over.
 

YourNerdyJoe

Active Member
Newcomer
Joined
Jul 18, 2014
Messages
41
Trophies
0
Age
26
Website
yournerdyjoe.github.io
XP
179
Country
United States
But i'm writing to the bottom screen...

All the screens have both a frontbuffer and backbuffer (sometimes I've seen it refered to as framebuffer 0/1).
What you do is write to the backbuffer then flip (or swap) the buffers to see it rendered to the screen.
If one of the buffers is blank then the screen flashes all weird.
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
All the screens have both a frontbuffer and backbuffer (sometimes I've seen it refered to as framebuffer 0/1).
What you do is write to the backbuffer then flip (or swap) the buffers to see it rendered to the screen.
If one of the buffers is blank then the screen flashes all weird.
I'll see tomorrow... Good night guys!
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Guys i finally fixed almost everything (except a little framebuffer bug... )! I can only thank Relys for his code! I didn't copied it.. But it helped me a lot!


P.S. If someone could help me with that framebuffer bug i would appreciate his help...
40c6ed0d1dc63415c8a6ca8fb91ebcc4.jpg


As you can see, the inserted binary number isn't fully clear.

Also, i removed the github repo because it didn't want to sync. Now you can find all source code here: www.github.com/AlbertoSONIC/3DS_Binary_Decimal_Converter

I think that now this is a good code. Let me know your feedback!

Again, it wouldn't work without Relys 's help!
 

YoshiInAVoid

Banned!
Banned
Joined
Jan 10, 2011
Messages
560
Trophies
1
Website
google.com
XP
465
Country
Guys i finally fixed almost everything (except a little framebuffer bug... )! I can only thank Relys for his code! I didn't copied it.. But it helped me a lot!


P.S. If someone could help me with that framebuffer bug i would appreciate his help...
40c6ed0d1dc63415c8a6ca8fb91ebcc4.jpg


As you can see, the inserted binary number isn't fully clear.

Also, i removed the github repo because it didn't want to sync. Now you can find all source code here: www.github.com/AlbertoSONIC/3DS_Binary_Decimal_Converter

I think that now this is a good code. Let me know your feedback!
Good program. Source looks well written too. I have a minor suggestion for this line though:

Code:
converted += val[7] * 1 + val[6] * 2 + val[5] * 4 + val[4] * 8 + val[3] * 16 + val[2] * 32 + val[1] * 64 + val[0] * 128;

You should learn how to use the << operator.

n << 1 = n * 2
n << 2 = n * 4
n << 3 = n * 8
n << 4 = n * 16
n << 5 = n * 32
n << 6 = n * 64
n << 7 = n * 128
n << 8 = n * 256
etc...

Although the result is the same as multiplication, the << operator is slightly faster in most cases, and it just looks more correct when dealing with bits since that is it's intended purpose.
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Good program. Source looks well written too. I have a minor suggestion for this line though:

Code:
converted += val[7] * 1 + val[6] * 2 + val[5] * 4 + val[4] * 8 + val[3] * 16 + val[2] * 32 + val[1] * 64 + val[0] * 128;

You should learn how to use the << operator.

n << 1 = n * 2
n << 2 = n * 4
n << 3 = n * 8
n << 4 = n * 16
n << 5 = n * 32
n << 6 = n * 64
n << 7 = n * 128
n << 8 = n * 256
etc...

Although the result is the same as multiplication, the << operator is slightly faster in most cases, and it just looks more correct when dealing with bits since that is it's intended purpose.
So i have to replace every * with <<?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Sorry I sat on them when they were open
  • AncientBoi @ AncientBoi:
    eeewww
  • K3Nv2 @ K3Nv2:
    I thought it was the toilet
  • AncientBoi @ AncientBoi:
    okies. Time to go watch YT paranormal ghost things. L8er my luvs :D
    +1
  • K3Nv2 @ K3Nv2:
    I got a massive clue
  • BakerMan @ BakerMan:
    this mf def ain't watching ghost shit, he boutta beat his meat fr
    +1
  • K3Nv2 @ K3Nv2:
    Nah he's about to be the ghost in your bedroom
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, and leave ectoplasm all over the place
  • BakerMan @ BakerMan:

    this is him being described
    +2
  • Xdqwerty @ Xdqwerty:
    Sigh
  • Xdqwerty @ Xdqwerty:
    Yawn
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I dislike the kind of drm where you have to play single player games online all the time bc of some verification bs
    +1
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Don't use games that have Easy Anti-Cheat as its been exploited many times.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, my PC can't run most AAA games so i wont
    +1
  • Xdqwerty @ Xdqwerty:
    Most of the modern AAA games
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I also heard one of the Prince of Persia games was so unfinished that it required the "24/7 online" drm so a puzzle could be done and the game could be finished. And that when the Ubisoft servers were closed the (cracked) game was impossible to finish or something like that
  • SylverReZ @ SylverReZ:
    @Xdqwerty, That's extra scummy. Ubisoft nowadays ship out incomplete games like Skull and Bones which was being worked on for nearly a decade now.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, i think they have been doing that since late 2000s
    +1
  • Xdqwerty @ Xdqwerty:
    Either that or their old games were unfinished aswell but we can't notice it
  • Psionic Roshambo @ Psionic Roshambo:
    I like that games can be fixed after the fact, hate that it's being abused via beta tests... And DLC... I was a 7800 owner back in the day and loved Impossible Mission, turns out I couldn't beat it because it was actually impossible lol
  • Psionic Roshambo @ Psionic Roshambo:
    I never knew about it at the time but a fixed version was available but you had to mail in your broken copy lol
  • Psionic Roshambo @ Psionic Roshambo:
    So that version is semi rare
    Psionic Roshambo @ Psionic Roshambo: So that version is semi rare