What could cause my background to not show up at all?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

What could cause my background to not show up at all?

Post by GradualGames »

I recently modified the NES101 tutorial by Michael Martin, and put in some of my own custom sprite and background graphics. I modified it so you can move around a hard coded meta sprite (2x8 tiles) with the cross bar.

The other day, I translated the p65 version to nesasm. After a bit of trial and error, I got it to the point it is now---it displays my hard coded meta sprite just fine, but the background tiles won't show up. As far as I can tell, the nesasm code is identical to the p65 code. I have no idea what could be going wrong.

I'm sure I'll get it eventually but if anyone has some advice it would be greatly appreciated. Or if you want to see the code let me know.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

If you open FCEUXD or any emulator with a name table viewer, check if the tiles are on the name table. If they are, then it's either that the scroll isn't set correctly or that you forgot to enable the background in $2001. If they aren't on the name table, there's a problem when you try and write to the name table. Hope this helps.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

Or the background palette entries are all the same color.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

can see nametable, only something is still wrong

Post by GradualGames »

Thanks for the advice.

I've verified using FCEUXD that I was writing to the nametable incorrectly. The nametable now shows up, but something is still wrong.

It appears the nametable is being loaded at an incorrect offset. It looks as though the load nametable routine is starting "somewhere in the middle" of my nametable, and loading from then on. The odd thing is, the p65 version does not have this problem.
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Post by GradualGames »

Again, thanks for the advice. I have prior assembler experience and was convinced I wasn't doing anything wrong, especially because my P65 code worked perfectly. I would have never expected NESASM to be limited to a certain number of characters per line (see other thread)
Post Reply