Homebrew Some code help for libnds

Morgawr

Well-Known Member
OP
Member
Joined
Dec 18, 2008
Messages
330
Trophies
1
Age
35
Website
Visit site
XP
178
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
1
Age
35
Website
Visit site
XP
178
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
  • IAMXVII @ IAMXVII:
    I have my own copy of Monster Hunter G and there is an available english translation, but I want to know what is the current way to patch it, since I know Riivolution works mainly with physical discs and not wbfs, unless Im wrong
  • Skelletonike @ Skelletonike:
    No idea
  • Skelletonike @ Skelletonike:
    It's better to just ask in the forums
    +2
  • The Real Jdbye @ The Real Jdbye:
    @IAMXVII the patch is provided as an xdelta patch, you patch it with the xdelta patcher
  • The Real Jdbye @ The Real Jdbye:
    i don't know why people always think the shoutbox is the right place to ask hacking questions
    +1
  • IAMXVII @ IAMXVII:
    Well, what other chat should I go to?
  • IAMXVII @ IAMXVII:
    I made my account no more than 35 mins ago
  • IAMXVII @ IAMXVII:
    Save your elitism for some other wanker
  • IAMXVII @ IAMXVII:
    But regardless, thanks for the pointer
  • OctoAori20 @ OctoAori20:
    Hi hi
  • SylverReZ @ SylverReZ:
    Just post on the Wii section if this is what you're looking for. https://gbatemp.net/forums/nintendo-wii.105/

    This isn't a place like Reddit or Discord.
  • SylverReZ @ SylverReZ:
    The general chit-chat is usually for off-topic banter or what-have-you, and a lot of modding-related questions go unnoticed quite quickly due to other on-going talks.
  • Cranesbill @ Cranesbill:
    Hey guys quick question: How can there be handwriting's that "looks like a guys" and "looks like a girls" ?
  • OctoAori20 @ OctoAori20:
    Hrm... Idunno-
  • SylverReZ @ SylverReZ:
    @Cranesbill, Everybody's writing is unique, doesn't necessarily apply differently to gender.
  • SylverReZ @ SylverReZ:
    I write usually in curved and fancy, because this is how my family writes.
  • Cranesbill @ Cranesbill:
    Grammar doesn’t matter in this situation
  • The Real Jdbye @ The Real Jdbye:
    @IAMXVII mholdschool discord server, for one
  • Cranesbill @ Cranesbill:
    I’m saying like there was someone who wanted to know whose paper this was since there was no name and he said, “It’s probably a guy since it has a guy handwriting”
  • The Real Jdbye @ The Real Jdbye:
    which is probably where you found the patch
  • The Real Jdbye @ The Real Jdbye:
    wtf is "guy handwriting"
  • The Real Jdbye @ The Real Jdbye:
    @IAMXVII making a thread in the right section always gets better answers than the shoutbox
  • SylverReZ @ SylverReZ:
    @The Real Jdbye, Discord servers should never be a dumping ground, that results to gatekeeping and becoming lost forever.
  • Cranesbill @ Cranesbill:
    THATS WHAT IM FUCKING ASKINH HOLY SHIT
  • SylverReZ @ SylverReZ:
    @The Real Jdbye, "wtf is 'guy handwriting'?" - that's what I'm guessing.
    SylverReZ @ SylverReZ: @The Real Jdbye, "wtf is 'guy handwriting'?" - that's what I'm guessing.