Page 1 of 2
Nestopia
Posted: Thu Jul 06, 2006 6:33 pm
by Lloyd Gordon
I'm trying Nestopia because I like the NTSC filter. However on Nestopia my second moving character doesn't show up even though it does on FCEUD and Nintendulator. I'm using a 0 mapper with the 8 X 16 sprites. Any ideas?
Posted: Thu Jul 06, 2006 6:38 pm
by Quietust
It would be useful to know what program you're trying to run...
Posted: Fri Jul 07, 2006 5:56 am
by Memblers
I think he means on his own program.
Sounds strange. If it works on Nintendulator, it's probably ok on the NES. No way to be sure though without testing (I trust it for testing my PAL code timing though, hasn't failed me yet). Are you using Sprite-DMA?
I've got my dev system hooked up now if you want a test.
Nestopia
Posted: Fri Jul 07, 2006 9:33 am
by Lloyd Gordon
Sorry, I'm running my own code, a sidescrolling game. It's pretty simple so far. There are only 2 "characters", the one that the user moves and one enemy. It's the enemy that doesn't show up at all on Nestopia although it does on FCEUD and Nintendulator. The "enemy" movement seems more accurate on FCEUD for some reason. I only use sprite DMA which I update on every VBlank. The NTSC filter is really good on Nestopia as it shows how bad my artwork would look on the console on a real tv. It's sort of weird how Nestopia doesn't show the second character at all. Any help would be appreciated. I could email the .nes file. I still have problems with NTSC weird colour effects, which I think are due to palette choices and graphic detail.
Posted: Fri Jul 07, 2006 10:27 am
by Bregalad
Are you sure you don't have more than 8 sprites per line ?
Are you sure you have proper sprite name table select via $2000 at the end of VBlank ?
Posted: Fri Jul 07, 2006 10:29 am
by Quietust
I've got an NROM (actually CNROM) RAM cartridge, if you'd like to see how the program behaves on a "real NES" (as opposed to Nestopia) - email me a copy of the ROM image (via GMail; the account name is the same as I'm using here) and I'll test it tonight.
Bregalad wrote:Are you sure you don't have more than 8 sprites per line ?
Are you sure you have proper sprite name table select via $2000 at the end of VBlank ?
Either of those would have definitely caused problems in Nintendulator as well, so it must be something else.
Nestopia
Posted: Sat Jul 08, 2006 6:21 pm
by Lloyd Gordon
Bregalad:
I'm only using two characters each using 2 8x16 sprites. All the other sprites are hidden with a Vertical position of $F7 until I need them. So the 8 sprite per line limit shouldn't matter. Nestopia can turn off that limit and it doesn't change anything.
I'm not sure what sprite nametable select means. I select the proper nametable address via $2006 at the end of VBlank. I set up $2000 and $2001 only when I need to change something . I don't change $2000 routinely in VBlank and I only set $2000 D3, the Sprite Pattern Table Address, near the beginning of the program. I thought the NES ignores D3 of $2000 if D5 was set to 1 for 8 x 16 sprites. If I'm confused or missing something, please let me know.
Quietust :
I'll send you the .nes file on Gmail.
Thanks.
Posted: Sat Jul 08, 2006 6:27 pm
by tepples
Does it work in Nestopia if you take six cycles to lda #0 sta
OAMADDR before each write to OAM_DMA ($4014)?
Posted: Sat Jul 08, 2006 6:36 pm
by Lloyd Gordon
Tepples:
NMI: pha ;Non-maskable interupt
txa ;store a,x,y
pha
tya
pha
lda #$00
sta $2003 ;initialize spram pointer
lda #$02 ;must update spram in Vblank
sta $4014 ;DMA sprite transfer
This is the beginning of my NMI code. Is this what you mean?
Posted: Sat Jul 08, 2006 7:02 pm
by Quietust
I've just tested it on my CopyNES and it works fine - both characters (one being a square guy with arms and legs, the other looking like a blue cloud) are fully visible and appear to move around normally.
I suspect the problem may be related to uninitialized memory.
Posted: Sat Jul 08, 2006 7:04 pm
by tepples
You're copying page $0200 to OAM correctly, but what are you writing into each byte of $0200-$02FF?
Posted: Sat Jul 08, 2006 7:35 pm
by Lloyd Gordon
You're copying page $0200 to OAM correctly, but what are you writing into each byte of $0200-$02FF?
Right now, I'm just using 4 8 x 16 sprites to make two 16 x 16 characters so I'm updating the first 16 bytes of $0200-$02FF in non-NMI to keep track of the vertical & horizontal positions, tile numbers, & sprite attributes.
The second 16 x 16 character shows up correctly on FCEUD and Nintendulator but not at all on Nestopia. I'd like to amend my code so all the sprite graphics show up on Nestopia so I can optimize the palette choices for NTSC.
Posted: Sat Jul 08, 2006 7:39 pm
by Lloyd Gordon
Quietust:
Thanks for taking the time to run it. Now if only I could figure out how to get my sprites to show up properly on Nestopia. If my code works on the NES and not Nestopia does this mean this behaviour is caused by a bug in Nestopia?
Thanks everybody for the help.
Posted: Sat Jul 08, 2006 7:42 pm
by Marty
Have you tried it on my
latest build, released yesterday?
If you have and it still doesn't work, could you send me your ROM image so I can have a look at it? martin-freij at home . se
Posted: Sun Jul 09, 2006 1:23 pm
by Bregalad
I recommand you to use $2005 and $2000 every VBlank to setup proper scrolling. $2006 is weird, because it only allow you 8-pixel precision. Use $2006 for scrolling only during rendering if you have no other way to do arround.