News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Flip NES sprite that's displayed twice.  (Read 1041 times)

Super James Nelson

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Flip NES sprite that's displayed twice.
« on: February 24, 2021, 01:57:33 pm »
Is it possible to flip a set of NES sprites that are displayed twice? Two of the same sprites are showing, but I want to see if it's possible to flip one of them to be the other way while having the other one face the opposite direction.

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 609
  • I am the baldest romhacker
    • View Profile
Re: Flip NES sprite that's displayed twice.
« Reply #1 on: February 24, 2021, 02:12:42 pm »
You can flip sprites horisontally and vertically
https://wiki.nesdev.com/w/index.php/PPU_OAM#Byte_2

nesrocks

  • Hero Member
  • *****
  • Posts: 708
    • View Profile
    • nesrocks.com
Re: Flip NES sprite that's displayed twice.
« Reply #2 on: February 24, 2021, 06:34:25 pm »
One thing is a sprite, another thing is the source image, the CHR. The NES PPU displays 64 sprites every frame. Each sprite can take any tile from the CHR independently. They may repeat as many times as you want. And each sprite can be placed on any coordinate on the screen, and it can receive its own attributes independently from other sprites.

So, to answer your question and fixing it:
"Is it possible to flip a set of NES sprites that are displayed twice?"
You can't display a sprite twice, you're having two sprites that display the same tile from the CHR. And one of them can be flipped while the other isn't, no problem.

Super James Nelson

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Flip NES sprite that's displayed twice.
« Reply #3 on: February 24, 2021, 10:25:00 pm »
So how exactly would I do that? I'm new to rom hacking and don't know a whole lot about all the technical stuff. The sprites I'm trying to flip seem to only have their tiles placed in the Hex editor one time.

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 609
  • I am the baldest romhacker
    • View Profile
Re: Flip NES sprite that's displayed twice.
« Reply #4 on: February 25, 2021, 03:18:24 am »
seem to only have their tiles placed in the Hex editor one time.

What do you mean by that?

Super James Nelson

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Flip NES sprite that's displayed twice.
« Reply #5 on: February 25, 2021, 10:48:59 am »
The tiles are placed down one time in the Hex editor, which I'm going to assume means there's something else that causes the set of sprites to appear twice.

https://pasteboard.co/JQ0A9gM.png