HD Packs: Use hex format for tile indexes (CHR ROM)
(Easier to map the tile indexes with bank/column/row numbers)
This commit is contained in:
parent
0d40a57d07
commit
f3778b58bb
4 changed files with 10 additions and 5 deletions
|
@ -278,7 +278,7 @@ struct HdPackTileInfo : public HdTileKey
|
||||||
} else {
|
} else {
|
||||||
out << "<tile>" <<
|
out << "<tile>" <<
|
||||||
pngIndex << "," <<
|
pngIndex << "," <<
|
||||||
TileIndex << "," <<
|
HexUtilities::ToHex(TileIndex) << "," <<
|
||||||
HexUtilities::ToHex(PaletteColors, true) << "," <<
|
HexUtilities::ToHex(PaletteColors, true) << "," <<
|
||||||
X << "," <<
|
X << "," <<
|
||||||
Y << "," <<
|
Y << "," <<
|
||||||
|
|
|
@ -298,7 +298,11 @@ void HdPackLoader::ProcessTileTag(vector<string> &tokens, vector<HdPackCondition
|
||||||
tileInfo->IsChrRamTile = true;
|
tileInfo->IsChrRamTile = true;
|
||||||
tileInfo->TileIndex = -1;
|
tileInfo->TileIndex = -1;
|
||||||
} else {
|
} else {
|
||||||
tileInfo->TileIndex = std::stoi(tileData);
|
if(_data->Version <= 102) {
|
||||||
|
tileInfo->TileIndex = std::stoi(tileData);
|
||||||
|
} else {
|
||||||
|
tileInfo->TileIndex = HexUtilities::FromHex(tileData);
|
||||||
|
}
|
||||||
tileInfo->IsChrRamTile = false;
|
tileInfo->IsChrRamTile = false;
|
||||||
}
|
}
|
||||||
tileInfo->PaletteColors = HexUtilities::FromHex(tokens[index++]);
|
tileInfo->PaletteColors = HexUtilities::FromHex(tokens[index++]);
|
||||||
|
|
|
@ -173,10 +173,10 @@ The condition is true when the following expression is true:
|
||||||
### <tile> tag ###
|
### <tile> tag ###
|
||||||
|
|
||||||
**Syntax**: `<tile>[img index - integer], [tile data], [palette data], [x - integer], [y - integer], [brightness - 0.0 to 1.0], [default tile - Y or N]`
|
**Syntax**: `<tile>[img index - integer], [tile data], [palette data], [x - integer], [y - integer], [brightness - 0.0 to 1.0], [default tile - Y or N]`
|
||||||
**Example (CHR ROM)**: `<tile>0,20,FF16360F,0,0,1,N`
|
**Example (CHR ROM)**: `<tile>0,2E,FF16360F,0,0,1,N`
|
||||||
**Example (CHR RAM)**: `<tile>0,0E0E079C1E3EA7076101586121010000,0F100017,176,1168,1,N`
|
**Example (CHR RAM)**: `<tile>0,0E0E079C1E3EA7076101586121010000,0F100017,176,1168,1,N`
|
||||||
|
|
||||||
For CHR ROM games, `tile data` is an integer representing the position of the original tile in CHR ROM.
|
For CHR ROM games, `tile data` is an integer (in hexadecimal) representing the position of the original tile in CHR ROM.
|
||||||
For CHR RAM games, `tile data` is a 32-character hexadecimal string representing all 16 bytes of the tile.
|
For CHR RAM games, `tile data` is a 32-character hexadecimal string representing all 16 bytes of the tile.
|
||||||
`palette data` is always an 8-character hexadecimal string representing all 4 bytes of the palette used for the tile. For sprites, the first byte is always "FF".
|
`palette data` is always an 8-character hexadecimal string representing all 4 bytes of the palette used for the tile. For sprites, the first byte is always "FF".
|
||||||
|
|
||||||
|
@ -305,6 +305,7 @@ These registers return the ASCII string `NEA` (NES Enhanced Audio) - this can be
|
||||||
### Version 103 ###
|
### Version 103 ###
|
||||||
|
|
||||||
* Added a `Mask` parameter to the memoryCheck and memoryCheckConstant conditions
|
* Added a `Mask` parameter to the memoryCheck and memoryCheckConstant conditions
|
||||||
|
* Tile indexes for the `<tile>` tag are now in hex instead of decimal (affects CHR ROM games only)
|
||||||
|
|
||||||
### Version 102 ###
|
### Version 102 ###
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace Mesen.GUI.Debugger
|
||||||
sb.Append(_ppuMemory[tileAddr + i].ToString("X2"));
|
sb.Append(_ppuMemory[tileAddr + i].ToString("X2"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sb.Append(_absoluteTileIndexes[tileAddr / 16].ToString());
|
sb.Append(_absoluteTileIndexes[tileAddr / 16].ToString("X2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue