Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,650
  • Replies Replies 6,048
  • Likes Likes 54
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!
 
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
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.
 
Basically theres like 3 areas in RAM that hold the screen data.. bottom screen, top screen left eye, and top screen right eye.. you might only be writing to one of the top screen buffers and not the other.. theres 2 because the 3D effect uses it

But i'm writing to the bottom screen...
 
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.
 
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!
 
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!
 
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.
 
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