OH DEAR GOD...
OK, here's what's wrong with your code:
Your working on pixel by pixel plotting of a 32 pixel wide tile and your tile width is set to 16 in your code:
Code: Select all
bgGetGfxPtr(bgTop2)[tmp3+tmp*256] = tilesBitmap[ix+iy*16];
that iy*16 should be iy*32 (or iy<<5).
I've got no idea what that magic number is that your using in the if statements, but it's the wrong size for a u16 colour...
And I know you said that you were working on 2 bytes at a time, but your not as the bgGetGfxPtr() function returns a u16*...
Of the 3 roads to do isometric on the DS, you seem to have taken the hardest route that I would only undertake with a sound knowledge of the limitations of the system, also may I sugest that you drop down from the 16bit colour mode to a 256 colour mode that way you will be able to use a form of double buffering to reduce any tearing effects that you may get on the screen, unless you can confirm that your Iso engine is very good at removing overlapping tiles..
I take it your attempting to do something like Final Fantasy Tactics Advance?
Pic from gamespot :
If you are then the way that the game is done was using 2 layers for the background, and the sprites were placed in a layer between the two, since any other way to do the iso tiles would mean that the main CPU would spend most of it's time on graphics and not animation...
If you have any other issues with your endevour please post a reply here and I'll see if I can assist in any way.