It is currently Sat Oct 21, 2017 3:34 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Nestopia
PostPosted: Thu Jul 06, 2006 6:33 pm 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 6:38 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
It would be useful to know what program you're trying to run...

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 5:56 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3470
Location: Indianapolis
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.


Top
 Profile  
 
 Post subject: Nestopia
PostPosted: Fri Jul 07, 2006 9:33 am 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 10:27 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7232
Location: Chexbres, VD, Switzerland
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 ?

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 10:29 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
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.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject: Nestopia
PostPosted: Sat Jul 08, 2006 6:21 pm 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 6:27 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
Does it work in Nestopia if you take six cycles to lda #0 sta OAMADDR before each write to OAM_DMA ($4014)?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 6:36 pm 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 7:02 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
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.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 7:04 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
You're copying page $0200 to OAM correctly, but what are you writing into each byte of $0200-$02FF?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 7:35 pm 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 7:39 pm 
Offline
User avatar

Joined: Mon Nov 07, 2005 11:32 am
Posts: 150
Location: Toronto
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 08, 2006 7:42 pm 
Offline

Joined: Fri Nov 12, 2004 5:02 am
Posts: 40
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 09, 2006 1:23 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7232
Location: Chexbres, VD, Switzerland
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.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group