It is currently Fri Dec 14, 2018 7:30 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri Oct 12, 2018 8:45 am 
Offline

Joined: Fri Sep 08, 2017 7:19 am
Posts: 20
How would one go about looking up the tile data integer value for a certain graphic? I am familiarizing myself with the conditions function of the HD Pack Builder in Mesen and the following variables are needed:

-x and y screen position (I figured out that this can be determined using the event viewer in the Mesen debugger)

**-Tile data (I haven't figured out this one yet)

-Palette data (I figured out that this can be determined easily by navigating to the debugger, then PPU viewer, then CHR viewer, then,
it's listed under "color picker").

For example, one condition which has already been created for a prior pack is shown below. While studying it, I have been unable to determine where the "138" value came from.

#Title screen
<condition>TitlePlanetSurfaceShown,tileAtPosition,0,232,138,0F281808
[TitlePlanetSurfaceShown]<background>mmtitle.png,1


Mesen HD Pack Documentation: https://www.mesen.ca/docs/hdpacks.html


Top
 Profile  
 
PostPosted: Sat Oct 13, 2018 6:30 am 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 531
In the PPU viewer, you can right click on any tile in any of the tabs to copy the HD pack tile data and palette to your clipboard.

138 in this case is the tile's index in the CHR ROM.
Note that starting 0.9.7 the tile indexes are now in hex instead of decimal (to make it easier to find the tile in the CHR viewer)


Top
 Profile  
 
PostPosted: Sat Oct 13, 2018 8:07 pm 
Offline

Joined: Fri Sep 08, 2017 7:19 am
Posts: 20
Worked like a charm - A lot simpler than I thought it might be. Thank you!


Top
 Profile  
 
PostPosted: Tue Oct 16, 2018 6:23 am 
Offline

Joined: Fri Sep 08, 2017 7:19 am
Posts: 20
Sorry, but I may have spoken too soon. This method did work to generate data that mostly matched what is located in the aforementioned example. I thought this would result in smooth sailing. However, I unfortunately ran into another issue. As you noted, this method generated a hex value (rather than a numeric value). So, when I tried replacing the "hires.txt" example value of 138 with the new hex value (in this case, C8) it seemed to result in the HD graphics no longer working.

When you mentioned that the new tile indexes are now in hex, does that mean that the "right click" functionality only generates a hex value? Additionally, does this mean the "conditions" function in a "hires.txt" file can only still read a numeric value for the tile data (rather than hex)? If so, is there still an alternate method to determine the numeric value for HD pack building?


Top
 Profile  
 
PostPosted: Tue Oct 16, 2018 3:38 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 531
Hires.txt files are versioned, if you're trying to edit an existing pack that was not built with 0.9.7, you should probably use 0.9.6. 0.9.7 can read older packs, but the tools are only meant to help create packs using the latest specs.


Top
 Profile  
 
PostPosted: Thu Oct 18, 2018 3:58 pm 
Offline

Joined: Fri Sep 08, 2017 7:19 am
Posts: 20
That makes sense - Thanks.

I did come across what appears to be a little quirk. When using 0.9.7 to build a pack, right clicking generates a hex value (as expected). However, when adding a condition to a pack generated by version 0.9.7, the only situation in which a condition seemed to behave properly was when a numeric tile value was used rather than a hex value. In other words, the automated data entries use hex values and the conditions only work with numeric values. The hires.txt file only seems to work with a combination of both in the latest version. Is this intended behavior from the emulator? I can copy and paste some example entries if it would help explain.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 4:17 am 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 531
That sounds like a bug to me - I completely forgot some conditions also used tile indexes. I'll have to fix it (and change the version number again) in the next release.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 8:54 am 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 940
Location: cypress, texas
rowejere wrote:
-Palette data (I figured out that this can be determined easily by navigating to the debugger, then PPU viewer, then CHR viewer, then,
it's listed under "color picker").
To make this process even easier you could click Options>Preferences>the check box next to 'Enable developer mode' on the General tab. (Puts all of the debugger's helpful icons, like the PPU viewer, in the Debug menu.) :)


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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