Search found 22 matches

by DayTripperID
Sat Jul 04, 2015 5:16 pm
Forum: DS/DSi Development
Topic: loading 512x512 background
Replies: 4
Views: 8239

Re: loading 512x512 background

OK I got it to load properly. The memory offsets were a little off when reading from the gfx pointer in dmaCopy(). I think maybe the grit in the DevKitPro toolchain packs the tiles differently than the one used by the guy who generated the example tiles using Pern Tools. So my code looks like this n...
by DayTripperID
Sat Jul 04, 2015 2:16 pm
Forum: DS/DSi Development
Topic: loading 512x512 background
Replies: 4
Views: 8239

Re: loading 512x512 background

OK I still can't get the bg to load properly. It looks like it's loading the image into a 256X512 space row by row, so it looks shredded into strips. My updated code looks like this: videoSetMode(MODE_0_2D); vramSetBankA(VRAM_A_MAIN_BG); int bg = bgInit(a_priority, BgType_Text8bpp, BgSize_T_512x512,...
by DayTripperID
Sat Jul 04, 2015 12:04 am
Forum: DS/DSi Development
Topic: loading 512x512 background
Replies: 4
Views: 8239

Re: loading 512x512 background

Ok now I see from the examples that you have to copy the map in 1 line at a time when the bg gfx are wider than 256 pixels.
by DayTripperID
Thu Jul 02, 2015 4:58 pm
Forum: DS/DSi Development
Topic: loading 512x512 background
Replies: 4
Views: 8239

loading 512x512 background

I have successfully loaded 256x512 backgrounds but when I try to load a 512x512 it doesn't appear on screen properly. Here is my code in a nutshell: videoSetMode(MODE_0_2D); vramSetBankA(VRAM_A_MAIN_BG); int bg = bgInit(a_priority, BgType_Text4bpp, BgSize_T_512x512, 0, 1); dmaCopy(bg_rockfieldTiles,...
by DayTripperID
Thu Nov 01, 2012 9:22 pm
Forum: Off Topic
Topic: memory management for a noob
Replies: 3
Views: 11638

Re: memory management for a noob

You're right, and I suppose I meant it in a broad sense. I've been doing some research since creating this thread, and the consensus seems to be that hands on experience is how most professional programmers learn memory management techniques. I have found some good books on the subject on my own, en...
by DayTripperID
Sun Oct 14, 2012 9:51 pm
Forum: Off Topic
Topic: memory management for a noob
Replies: 3
Views: 11638

memory management for a noob

Hello, I've been messing around with devKitARM for a few months now and have been enjoying it immensely. However I'm a hobbyist programmer and self taught, and as such don't really understand all of the fundamentals of c++ programming. One of the areas I'm very weak in is memory management, which se...
by DayTripperID
Sat Sep 22, 2012 9:15 pm
Forum: DS/DSi Development
Topic: copying over an ex palette?
Replies: 6
Views: 6112

Re: copying over an ex palette?

Ok, got it. Thanks for clearing that up!
by DayTripperID
Sat Sep 22, 2012 7:19 pm
Forum: DS/DSi Development
Topic: copying over an ex palette?
Replies: 6
Views: 6112

Re: copying over an ex palette?

Previously, and currently, I was using the following grit options: -W3 -p -gt -gB4 As for oamInit(), i was using: oamInit(&oamMain, SpriteMapping_1D_128, true); With these options, I couldn't get the sprites to show color when used: vramSetBankF(VRAM_F_LCD); dmaCopy(main_gfxPal, VRAM_F_EXT_SPR_PALET...
by DayTripperID
Sat Sep 22, 2012 5:34 pm
Forum: DS/DSi Development
Topic: copying over an ex palette?
Replies: 6
Views: 6112

Re: copying over an ex palette?

My mistake-- when I posted this code I put dmaCopy(main_gfxPal, VRAM_F_SPRITE_EXT_PALLETE, main_gfxPalLen); That was a typo. In my program I actually had dmaCopy(main_gfxPal, VRAM_F_EXT_SPR_PALETTE, main_gfxPalLen); Anyways, I managed to get ext palette working, but it was a strange workaround. Inst...
by DayTripperID
Thu Sep 20, 2012 10:24 pm
Forum: DS/DSi Development
Topic: copying over an ex palette?
Replies: 6
Views: 6112

copying over an ex palette?

Hey all, I was wondering how to properly copy over an extended palette? Would it be something like: /* Unlock vram (cannot write to vram while it is mapped as a palette). */ vramSetBankF(VRAM_F_LCD); /* Copy main_gfx palette into palette memory. */ dmaCopy(main_gfxPal, (u16*)VRAM_F_SPRITE_EXT_PALETT...