It is currently Sat Nov 18, 2017 1:40 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Aug 22, 2017 3:51 pm 
Offline
User avatar

Joined: Tue Aug 08, 2017 1:25 pm
Posts: 20
I know how to put sprite in front and behind background, but how to exactly clear data from place of sprite, that what I exactly need. It's posible at all?


Top
 Profile  
 
PostPosted: Tue Aug 22, 2017 3:56 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1392
Set the sprite's Y-coordinate to any value between 239 and 255, inclusive - this will place it outside the screen, preventing it from being drawn.

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


Top
 Profile  
 
PostPosted: Tue Aug 22, 2017 9:58 pm 
Offline
User avatar

Joined: Tue Aug 08, 2017 1:25 pm
Posts: 20
Quietust wrote:
Set the sprite's Y-coordinate to any value between 239 and 255, inclusive - this will place it outside the screen, preventing it from being drawn.

Thank you. You mean that is for NTSC?


Top
 Profile  
 
PostPosted: Tue Aug 22, 2017 11:30 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10112
Location: Rio de Janeiro - Brazil
NTSC and PAL. There's no difference in resolution between them.


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 6:45 am 
Offline
User avatar

Joined: Tue Aug 08, 2017 1:25 pm
Posts: 20
tokumaru wrote:
NTSC and PAL. There's no difference in resolution between them.

Hmm, But bannyboy sad the NTSC format differs from PAL with clearing top 8 bits and bottom 8 bits. thats mean, that NTSC has 256x226 and PAL has 256x240. Isn't it?


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 7:24 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 858
Location: Sweden
That statement isn't entirely true as explained on the wiki. The resolution is always 256x240 for both NTSC and PAL, no matter how much of it is actually shown on your TV.

But you can't count on what's shown or what's hidden, it may vary between TVs. So don't put your status bar or other important information outside the safe area as described on that wiki page.


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 8:11 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7265
Location: Chexbres, VD, Switzerland
Pokun wrote:
But you can't count on what's shown or what's hidden, it may vary between TVs. So don't put your status bar or other important information outside the safe area as described on that wiki page.

You can however count on the left- and rightmost 2 pixels to be hidden on PAL. But that does not change how to disable sprites. While you COULD hide a sprite by having X to be 254 or 255 on a PAL console, it is not desirable to do so as this would break compatibility with NTSC machines, and could cause issues with 8-sprite per line limitation.


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 8:55 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10112
Location: Rio de Janeiro - Brazil
TeMaToS wrote:
But bannyboy sad the NTSC format differs from PAL with clearing top 8 bits and bottom 8 bits. thats mean, that NTSC has 256x226 and PAL has 256x240. Isn't it?

This is not correct. The NES, PAL or NTSC, always outputs 240 scanlines. The only difference is that they're all visible on PAL televisions, while NTSC televisions tend to hide some of the top and bottom. How much is hidden varies greatly from television to television, so developers are discouraged from putting important information near the edges because it MAY be hidden, but there's no way to predict exactly how much will be cut off.


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 6:05 pm 
Offline
User avatar

Joined: Sat Sep 07, 2013 2:59 pm
Posts: 1454
For the current context, the whole discussion about resolution in PAL and NTSC, overscan, TVs etc. is moot.

The facts are:
1. The NES has a vertical resolution of 240 pixels, i.e. the pixels go from 0 to 239.
2. The y value of a sprite can have a value from 0 and 255.

Hence, if you set the y position to a value beyond 239*, the sprite will be off-screen in any case, independent from any TV or other output screen or emulator window.

* The position of 239 can be used for off-screen-ness as well because the NES always adds 1 to the y position. So, if you set a sprite to position 32, it's actually displayed at position 33. This is only true for y, not for x.

_________________
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 6:18 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1823
Location: DIGDUG
On my flat screen NTSC TV, you can see every scanline. None hidden. So 240 pixels high.

On my CRT TV, you lose about 6-8 pixels from the top, and about 10 pixels from the bottom.

Every TV is a little different.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Aug 24, 2017 4:03 am 
Offline
User avatar

Joined: Tue Aug 08, 2017 1:25 pm
Posts: 20
Aha, understand. Thank you all))


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 9 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