Homebrew Some code help for libnds

Morgawr

Well-Known Member
OP
Member
Joined
Dec 18, 2008
Messages
330
Trophies
0
Age
34
Website
Visit site
XP
158
Country
Italy
Hello everyone, I know maybe I shouldn't be posting here about code help or anything like that (maybe I should've gone to a more appropriated forums) but I like this place and it's the best forums around for hacking and homebrew so I wanted to try.. you can always lock this topic if you find it inappropriate..

anyways, three days ago I started programming for homebrew with libnds and devkitARM on the DS and, after following the tutorials and doing some non-graphical tests (like messing around with system input-output and basic clock libraries and stuff) I wanted to give a go to the graphical part of this console.

Reading back on the examples there's the part where you have to initialize the different backgrounds on the screen, and there's a part that isn't clear to me:

CODEvoid initBackgrounds() {
ÂÂÂÂ/*ÂÂSet up affine background 3 on main as a 16-bit color background. */
ÂÂÂÂREG_BG3CNT = BG_BMP16_256x256 |
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ BG_BMP_BASE(0) | // The starting place in memory
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ BG_PRIORITY(3); // A low priority

ÂÂÂÂ/*ÂÂSet the affine transformation matrix for the main screen background 3
ÂÂÂÂ *ÂÂto be the identity matrix.
ÂÂÂÂ */
ÂÂÂÂREG_BG3PA = 1
 

Morgawr

Well-Known Member
OP
Member
Joined
Dec 18, 2008
Messages
330
Trophies
0
Age
34
Website
Visit site
XP
158
Country
Italy
Jeremysr said:
Patater's manual recommends this site for learning how to use the affine transformation matrix: http://www.coranac.com/tonc/text/affine.htm

And yes, there is a simple function (or macro) that swaps the screens: lcdSwap().

Thanks a lot, really.. but why I can't find lots of functions (that I saw in other examples) in THIS API documentation? It should be the official one, and the one you linked is different (also it has stuff in japanese that I can't read..)

so, is there a better API documentation (English preferably) that I could browse? D:
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, i don't have a wii
  • AcuteBulbasaurappears @ AcuteBulbasaurappears:
    @salazarcosplay Ah well I backed it up, but I didn't upgrade it. a long time ago
  • BigOnYa @ BigOnYa:
    @Xdqwerty I don't have a ROG ally
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i don't have one either
    +1
  • SylverReZ @ SylverReZ:
    @AcuteBulbasaurappears, A cute bulbasaur appears. :D
    +2
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The Wii U gamepads are tied to the console's region, so its impossible to find a cheap gamepad that supports your model.
  • SylverReZ @ SylverReZ:
    Unless you modify your system, of course, and remove the region check.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, im now by episode 8 of lain
  • S @ salazarcosplay:
    @Xdqwerty can we discuss chrono trigger
  • S @ salazarcosplay:
    @Xdqwerty I like how the game had the middle ages 1000AD, the dark ages 600AD.It was great seeing the post robot apocalypse 2300 like Terminator and enter the matrix. some of mad max and fallout. 2300ad though it could had used more elements instead of just a generic ai uprising. It was a great idea for their judgement day to be 1999 Y2K.

    -great additions if they would have made an expansion or dlc in my opinion would be finding out humans trapped in a matrix -

    a follower having a cyborg character living tissue over metal endoskelleton like terminator, and the synths from fallout
  • S @ salazarcosplay:
    4After Zeal fell it would have been good to see more ancient eras. Perhaps Sumeria based in one area, then Egypt based in another area, Greek based in another area, then roman based in another area before the middle ages.---------

    ----between 1000ad and 1999 is a big gap they should have had the age of revolution like the american and French Revolution

    then the cowboyy era in one area of map and the Industrial revolution/age of enlightmentthen a ww1 and ww2 and a cold war era
  • S @ salazarcosplay:
    they could have added 75,000 bc like assassins creed. zeal was already establish in 12, 000 bc , soething before the kindom rose
  • S @ salazarcosplay:
    @Xdqwerty they could also add age of dscover, colonialism ect
    +1
  • S @ salazarcosplay:
    renaissance
  • S @ salazarcosplay:
    @Xdqwerty what did you think
  • S @ salazarcosplay:
    @Xdqwerty I think glenn (the frog) after becomming human had an affair with the queen
  • S @ salazarcosplay:
    so he is the great great great great grandfather of marle @Xdqwerty
  • S @ salazarcosplay:
    they made it like Lancelot from king arthur legends
  • BakerMan @ BakerMan:
    just found out i'm now taller than my dad
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, sorry i was busy
  • S @ salazarcosplay:
    @Xdqwerty thats completely fine
    +1
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay,
    the ds version added a secret boss reference to chrono cross
    Xdqwerty @ Xdqwerty: @salazarcosplay, the ds version added a secret boss reference to chrono cross