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
    OctoAori20 @ OctoAori20: Ello