It is currently Mon Dec 11, 2017 7:36 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Thu Aug 03, 2017 7:38 am 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Hey all!

Another mega-noob question for you:

I'm trying to change the X position of the big "C" in the Castlevania logo (CV1) and am scratching my head a bit. I want to shift it left 8 pixels as I'm re-doing the logo (this letter actually has to become a "B" in the end). Any help on where I can start rummaging would be extremely appreciated.

In case you couldn't tell, I'm rather new to all this and don't quite know where to begin -_-

EDIT: to expand a bit, I've modified a good chunk of the title graphics using YY-CHR and arranged them using Stake's Title Screen Editor feature. Everything is currently in the correct place except for the "C" which needs to come over a little bit. The Title Screen Editor doesn't seem to allow you to move around the middle section of the "C" (is it technically a sprite?)
As a result of editing with these two methods, I've run into another issue that I'm sure is a different animal involving the "Press Start Button" text.


Attachments:
Capture.PNG
Capture.PNG [ 35.28 KiB | Viewed 898 times ]
Top
 Profile  
 
PostPosted: Thu Aug 03, 2017 8:16 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19332
Location: NE Indiana, USA (NTSC)
The way the gray pixels in 'C' overlap the background without obvious attribute problems shows that it's a sprite.

  1. Watch for writes to $4014. the MMIO port that tells the CPU to copy the sprite display list to PPU OAM.
  2. If (for example) $07 is written, then the display list will be at $0700-$07FF. Watch for writes to that area, particularly just before the title screen appears.
  3. Once you've mapped out subroutines that build the display list, you should be able to find the data table in the ROM that gets translated to a display list.


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 7:11 am 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Quote:
The way the gray pixels in 'C' overlap the background without obvious attribute problems shows that it's a sprite.

Watch for writes to $4014. the MMIO port that tells the CPU to copy the sprite display list to PPU OAM.
If (for example) $07 is written, then the display list will be at $0700-$07FF. Watch for writes to that area, particularly just before the title screen appears.
Once you've mapped out subroutines that build the display list, you should be able to find the data table in the ROM that gets translated to a display list.


Neat! So my suspicion was correct!

I've done as you said to find where the display list resides (it ended up being at $0200-$02FF). I set the emulation speed in FCEUX down to 1% and watched the hex editor for writes to this area while the game booted up. I'm going to assume that all the values that change constantly are related to the animated bat. The only things that seem to remain static are values of "F8" appearing multiple times in various addresses.

Unfortunately, this is where it starts getting a little confusing for me.
I'm not sure what to do with those values or how to go about mapping out subroutines.

In case it helps, I've attached the four different instances of writes to the $0200-$02FF area.
The title screen appeared when the fourth write occurred.
Attachment:
File comment: First write to $0200-$02FF
Capture-Write1.PNG
Capture-Write1.PNG [ 7.07 KiB | Viewed 840 times ]

Attachment:
File comment: Second write to $0200-$02FF
Capture-Write2.PNG
Capture-Write2.PNG [ 15.75 KiB | Viewed 840 times ]

Attachment:
File comment: Third write to $0200-$02FF
Capture-Write3.PNG
Capture-Write3.PNG [ 16.21 KiB | Viewed 840 times ]

Attachment:
File comment: Fourth write to $0200-$02FF
Capture-Write4.PNG
Capture-Write4.PNG [ 16.32 KiB | Viewed 840 times ]


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 7:38 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19332
Location: NE Indiana, USA (NTSC)
Each entry is 4 bytes long: Y coordinate, tile number, color and flipping, and X coordinate. The $F8 entries are unused, as a Y coordinate is $EF to $FF is below the picture. (See PPU OAM)


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 10:05 am 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Quote:
Each entry is 4 bytes long: Y coordinate, tile number, color and flipping, and X coordinate. The $F8 entries are unused, as a Y coordinate is $EF to $FF is below the picture. (See PPU OAM)


Ahh got it. So all the static entries that start with $F8 can be ignored.
Since all the other values are constantly updating, though, how would you nail down which entry is that "C" sprite? Would you just screw with values until the thing you're looking for is affected?

More on that note, how do I track down in the address of this sprite in the data table in the ROM? Would I be able to just do a search for the 4 byte entry that matches all the original values of the sprite I'm trying to affect?

(Sorry to make you break it down so much--I promise I'm trying!)


Top
 Profile  
 
PostPosted: Mon Aug 07, 2017 9:17 am 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Any insight on how to track down the data table for sprites in my ROM?
I've been trying to pour through a host of documents and tutorials but a good amount of it is going over my head :(
My hope was to NOT spend weeks on this -_-


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 10:56 am 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Using a hex corrupter, I think I have found where the tiles are stored in the ROM--or at least most of them. The bulk of the sprite seems to be hanging out at $003910-003B10 (going back a couple bytes to the start address will probably account for the rest). When I corrupted that range with random bytes, this is what I saw:

Attachment:
CaptureCorrupt.003910-003B10.PNG
CaptureCorrupt.003910-003B10.PNG [ 42.17 KiB | Viewed 600 times ]


I still can't track down where the sprite is being built, though... Which is the part I need to find :(


Top
 Profile  
 
PostPosted: Thu Aug 24, 2017 6:15 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
The table it draws that C's sprite locations from appears to begin at 9aab (1abb in the ROM), in the usual OAM format of Y, tile, attribute, X [though some postprocessing is performed on these:]
there's a much more useful pair of values you want to fiddle with at aebe/aecd in bank 06 (1aece/1aedd in ROM). These start at $30, immediately after an A9. They are added to the X values of the sprites in the table for the title screen; the former for the top portion of the C and the latter for the bottom portion. As you seem to have moved the C 8 pixels left, you'd change these both to $28.


Top
 Profile  
 
PostPosted: Thu Aug 31, 2017 12:03 pm 
Offline

Joined: Thu Jul 20, 2017 9:01 am
Posts: 24
Myask wrote:
The table it draws that C's sprite locations from appears to begin at 9aab (1abb in the ROM), in the usual OAM format of Y, tile, attribute, X [though some postprocessing is performed on these:]
there's a much more useful pair of values you want to fiddle with at aebe/aecd in bank 06 (1aece/1aedd in ROM). These start at $30, immediately after an A9. They are added to the X values of the sprites in the table for the title screen; the former for the top portion of the C and the latter for the bottom portion. As you seem to have moved the C 8 pixels left, you'd change these both to $28.


That's the ticket! You're a rockstar!
Thank you so much :)

Now all I have to do is change that "C" to a "B," but that's another story.


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

All times are UTC - 7 hours


Who is online

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