Pallete affects scroll value

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
IMAGICA
Posts: 61
Joined: Thu Jul 13, 2017 5:17 pm
Contact:

Re: Pallete affects scroll value

Post by IMAGICA »

1. Later... When the 2nd problem is gone.
2. Moving the controller routine makes the jittering stop. Still having rendering problems though.
3. There is a block that keeps rewriting the background Improperly.
4. The "Take Full Advantage of NMI" part of https://wiki.nesdev.com/w/index.php/The ... er_Formats is giving me info but the info given by Kasumi has around the same effect as it is
5. It seems that my Attributes are being written into the column data somehow. Fixing that is the main priority. My "hint" (or blatant truth) is that " [Vblank has a] notification [that] comes in the form of an NMI, or "non-maskable interrupt". ... " [When] the PPU starts VBlank again, the PPU will attempt to notify you that this has happened. It does this by sending an NMI to your program."

Edit: It seems regulation of the attribute table is the answer
Attachments
KitsuneTales.nes
(48.02 KiB) Downloaded 113 times
In Progress:
Tengu Tales (MMC3 Test first)[360 degress bullet direction math]
Baseball Brawlers (MMC5 full features, "Yoshi's Island")[Square root table, SPG ]
Smash ("port",MMC5 )[Character Movement]
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: Pallete affects scroll value

Post by dougeff »

One thing I do, when I'm working on new code (when I'm not sure of PPU behavior)... is make a very minimal test case. So, basically an empty program with just initial code, and a mostly empty nmi, and my test code.

If you are having trouble with attribute tables, perhaps it's because you are writing tiles top to bottom. It's very tricky to write attributes top to bottom.

The attribute table (nametable #0) goes like this...

23c0,23c1,23c2,23c3,23c4,23c5,23c6,23c7
23c8,23c9,23ca,23cb,23cc,23cd,23ce,23cf
23d0,...etc on through 23ff

23c0
23c8 below it
23d0 below that
etc.

So, writing top to bottom adds 32 ($20 hex) but that would skip from 23c0 to 23e0 and miss all the bytes between. You could set a new address for each write to the attribute table.

That is slow, and will probably put you past v-blank. Maybe you could draw the column on 1 frame and draw the attribute on the next frame.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
IMAGICA
Posts: 61
Joined: Thu Jul 13, 2017 5:17 pm
Contact:

Re: Pallete affects scroll value

Post by IMAGICA »

Ok... Got a question.
I've gotten one of my scrolling bugs fixed (The columnNumber byte was incrementing without the scroll being correct) and the scrolling goes both left and right.
The problem with my system is that if I tap the scrolling, the scroll wont update correctly.
Try it.
P.S. I've labled the needed functions
Attachments
Kitsunetales.asm
(22.15 KiB) Downloaded 100 times
KitsuneTales.nes
(48.02 KiB) Downloaded 106 times
In Progress:
Tengu Tales (MMC3 Test first)[360 degress bullet direction math]
Baseball Brawlers (MMC5 full features, "Yoshi's Island")[Square root table, SPG ]
Smash ("port",MMC5 )[Character Movement]
Post Reply