It is currently Sun Nov 17, 2019 2:22 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Zelda dungeons
PostPosted: Wed Apr 15, 2009 9:06 pm 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1089
Location: Minneapolis, MN
I am noticing my emulator does not hide Link under the door frame when he transits through a top-of-screen or bottom-of-screen door in a dungeon. I originally thought it was a problem with sprite priorities and some kind of sprite overlay that hides Link behind, like the effect in BlasterMaster when the vehicle moves through an arch-way. However, I do not see any entries in OAM for sprites for this purpose.

What hides Link? I see other emulators hide him, and I know that not hiding him makes it look rather silly so is obviously wrong...

I should clarify I don't mean he isn't hidden while the screen is scrolling. I mean he isn't hidden as you walk toward the edge, so it looks like he's walking OVER the door frame instead of through the door.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 15, 2009 10:14 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4231
There's 8 other (lower indexed, higher priority) sprites in the same row. Link is only properly hidden if you emulate the 8 sprite limit.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Last edited by Dwedit on Thu Apr 16, 2009 10:42 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 10:26 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
What about horizontal doors in both? I thought they put a higher-priority sprite below the background, so that it brought those background pixels in front of later sprites (including the player).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 12:16 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
Also the top and bottom is off by one line too when link is hidden, wont line up correctly with the door. ( bug in zelda ? )


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 12:19 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
Left and right doors are the sprite masking effect that is used in Super Mario 3 to have sprites come out of pipes or blocks.

I hadn't heard about the vertical going doors using the 8 sprite per scanline limit but it seems that is so. I'm not aware of any other game using the limit like that.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 1:03 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Some of the Ninja Gaiden games use the 8-sprite limit on cutscenes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 1:07 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
Almost gives me a reason to implement that in my emulator now.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 2:01 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7746
Location: Chexbres, VD, Switzerland
I'm pretty sure the left and right doors are made by simply turning Link's sprite priority to background, so that he is below the BG. When passing the right door, the right half of Link becomes behind BG while the left part is still in front of BG, and there is a 8-pixel window that is entierely black so it's impossible to see it.

This wasn't possible for top and bottom doors beacause Link is made of two 8x16 sprites. This would have been possible if he was made of four 8x8 sprites.

As far I know few games uses the sprite clipping trick on purpose. Castlevania (when entering the castle and falling into water + when secret items pops up from the ground), SMB3 (when items pops out of blocks) and Battletoads & Double Dragon (at the screen between stages 1 and 2) are the only ones I can think of.

Mega Man 2 uses it accidentally each other frame in Air Man stage if you jump into the life bar.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 5:03 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11434
Location: Rio de Janeiro - Brazil
Gimmick! uses the 8-sprite limit to make him jump out of the portal at the start of the level.

Nightshade uses the background priority trick to have the character walk behind pillars. In fact, it appears to have a wide range of shapes to use as masks in the pattern table.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 5:22 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
Bregalad wrote:
I'm pretty sure the left and right doors are made by simply turning Link's sprite priority to background, so that he is below the BG. When passing the right door, the right half of Link becomes behind BG while the left part is still in front of BG, and there is a 8-pixel window that is entierely black so it's impossible to see it.


I don't believe that is the case. In my emulator sprite priority is implemented and so is sprite masking as used by games like Castlevania and SMB3, but the 8 sprites per line limit is not. When I tested Zelda, traveling left and right through dungeon doors does mask Link like he is going under the tile. This does not happen when going up or down through doors.

EDit: Nevermind, confusion.


Last edited by MottZilla on Thu Apr 16, 2009 7:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 6:28 pm 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1089
Location: Minneapolis, MN
Bregalad wrote:
I'm pretty sure the left and right doors are made by simply turning Link's sprite priority to background, so that he is below the BG. When passing the right door, the right half of Link becomes behind BG while the left part is still in front of BG, and there is a 8-pixel window that is entierely black so it's impossible to see it.


Yes, this appears to be correct. The OAM attribute changes from 40h to 60h when moving through the left door.

Bregalad wrote:
This wasn't possible for top and bottom doors beacause Link is made of two 8x16 sprites. This would have been possible if he was made of four 8x8 sprites.


I had implemented the emulation of setting the PPUSTATUS overflow bit but not the behavior of NOT showing more than 8 sprites. Now that I have implemented that Link walks THROUGH doors instead of over them.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 10:11 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4231
Gremlins 2 uses the 8 sprite limit to mask rows for the cutscenes.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 10:49 pm 
Offline
User avatar

Joined: Fri Apr 03, 2009 10:55 pm
Posts: 47
These tricks are interesting for homebrew development too. Has anyone collected a few of these tricks as examples/guides or at least lists a few games and what tricks they use? While I don't object to disassembling a ROM to find out bits of what it does, my capacity to do that with more than a handful of games in a few months is limited.
If they're secret bits that nobody wants to share, I understand, but from the comments on this thread it seems somewhat common knowledge.
I especially like tricks that don't require an MMC5 or other sophisticated mappers. Mostly because I am only targeting UNROM and CNROM (edit: I think I mean ANROM, the one with just RAM and PRG that doesn't suck) type carts, and partially because I think it's better to know what a NES can do on its own before trying to dig into the complexities of a "modern" mapper.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 11:20 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2832
AxROM is PRG-ROM and CHR-RAM, with One Screen Mirroring. UxROM is the same think except it has fixed Horizontal or Vertical Mirroring.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 16, 2009 11:36 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11434
Location: Rio de Janeiro - Brazil
MottZilla wrote:
AxROM is PRG-ROM and CHR-RAM, with One Screen Mirroring. UxROM is the same think except it has fixed Horizontal or Vertical Mirroring.

And there is the big difference that AxROM uses 32KB PRG banks, while UxROM uses 16KB banks and has the last one hardwired to $C000-$FFFF, so they are more different than they are alike.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 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