gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Questions in the Backgrounds topic

#154465 - yellowstar - Wed Apr 16, 2008 8:37 pm

The following is the questions I asked in my Backgrounds topic... Those of you that are reading this, could you at least read this also,(Scroll up for the what the problem is)
and would somebody help by doing this?
Quote:

Everybody, if anybody is reading this, how would you do this? How would you write code to draw a 8-bit image on a bg when the image doesn't fill the whole bg?(Whole demo please, if possible)

(I'd like to know if there's even anybody that's just reading that topic)

Now, for those questions I asked in the original topic that nobody answered:(No offense people...)

yellowstar in Backgrounds wrote:

I went through the Patater guide, and found some things about DMA:
Patater wrote:

When using DMA to copy from main memory, do not forget to flush main memory before using DMA. Another issue to consider would be that in the middle of a DMA, the main CPUs are prevented from using certain memory hardware.

I always thought DMA froze the processors while at work? If Patater is correct, that doesn't happen? Flush? He only flushed in OAM updating, unlike what he himself said. I attempted adding code to flush cache, and waiting for DMA to finish, at every DMA ocerance, but still nothing changed. What all would be locked during DMA?

Some wackiness with VRAM and numbers:
To hold one 256x256 8-bit bg in VRAM, I need 65536 bytes of space. That's 4 blocks; Unlike what some examples say, they say index 3, I find 4. And examples say I only need Bank A, those numbers say I need another one, too. Double buffers take 131072 bytes, that more than what Bank A can handle. Mapping another bank to MAIN_BG doesn't help my problems; Why? Also, why do the examples say what the do, when they seem to be wrong? Or am I wrong?


yellowstar in Backgrounds wrote:

DeSmume reports that DISPCNT is contantly changing, why, and what is that register? Is it the old DISPLAY_CR?


Another question:
What's the difference between a cache flush and invalidate?

#154466 - Alphanoob - Wed Apr 16, 2008 8:39 pm

Rofl, I read your post. You said you wanted to know. I would help if I could, but I am way new to programming this sort of stuff. Sorry, and good luck =).

#154467 - Dwedit - Wed Apr 16, 2008 8:41 pm

I think this was discussed somewhere else in the cache thread, but I think invalidating eliminates the cache, and keeps the old content in memory, and I can't think of any good use for that.
Flushing would write it back.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#154470 - Alphanoob - Wed Apr 16, 2008 8:46 pm

mmm. so you delete the cache, but it isn't really gone? well, maybe it could be used for system restore points like on a computer. You know, how if something goes wrong you can jump back a few days to when it was all good?

#154472 - Dwedit - Wed Apr 16, 2008 8:49 pm

Okay, if you want to be picky, it eliminates the contents of the cache...

The cache is internal to the processor, and is small. No "Windows restore points" could possibly come out of it.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#154480 - yellowstar - Wed Apr 16, 2008 9:37 pm

So what happens when I flush the cache, without doing an invalidate? How could cache affect my backgrounds thing?

Fast replies... Would be wonderful if my backgrounds problem got replies that fast...
Really I want people to do for helping, to the bare minimum, regarding the original problem, is what I quoted.
Quote:

Everybody, if anybody is reading this, how would you do this? How would you write code to draw a 8-bit image on a bg when the image doesn't fill the whole bg?(Whole demo please, if possible)

Sent out 3 PMs regarding backgrounds and no response at all... I'm going to attempt a rewrite for that backgrounds thing.