From 0607fabb39305ec9abce1edf961a3472ae2746e1 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 21 Sep 2023 23:00:24 -0400 Subject: Use 0x0F as the true NES black color due to emphasis issues with 0x1D --- NesTiler/ColorFinder.cs | 2 +- NesTiler/nestiler-colors.json | 2 +- README.md | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NesTiler/ColorFinder.cs b/NesTiler/ColorFinder.cs index 9705dc3..0166320 100644 --- a/NesTiler/ColorFinder.cs +++ b/NesTiler/ColorFinder.cs @@ -11,7 +11,7 @@ namespace com.clusterrr.Famicom.NesTiler { class ColorFinder { - static byte[] FORBIDDEN_COLORS = { 0x0D, 0x0E, 0x0F, 0x1E, 0x1F, 0x2E, 0x2F, 0x3E, 0x3F }; + static byte[] FORBIDDEN_COLORS = { 0x0D }; public readonly Dictionary Colors; private readonly Dictionary cache = new(); diff --git a/NesTiler/nestiler-colors.json b/NesTiler/nestiler-colors.json index dbf2bff..ee9970e 100644 --- a/NesTiler/nestiler-colors.json +++ b/NesTiler/nestiler-colors.json @@ -12,6 +12,7 @@ "0x0A": "#005000", "0x0B": "#003C14", "0x0C": "#183C5C", + "0x0F": "#000000", "0x10": "#BCBCBC", "0x11": "#0070EC", "0x12": "#2038EC", @@ -25,7 +26,6 @@ "0x1A": "#00A800", "0x1B": "#009038", "0x1C": "#008088", - "0x1D": "#000000", "0x20": "#FCFCFC", "0x21": "#3CBCFC", "0x22": "#5C94FC", diff --git a/README.md b/README.md index da8948f..da9eb92 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Examples: Also, you can load image partially - split them horizontally, just add offset and height after colon. So if you need to split 256x240 image into two images: * nestiler -i0 image.png:0:128 -i1 image.png:128:112 -It's usefull if you need to show single image on screen but you want to split it into two 256-tiles pattern tables and switch them on specific line in the middle of rendering process. +It's useful if you need to show single image on screen but you want to split it into two 256-tiles pattern tables and switch them on specific line in the middle of rendering process. ### Option -c, --colors \ Option to specify file with available colors and indices. This file can be in JSON format (see nestiler-colors.json) or binary PAL format (used by emulators). @@ -97,7 +97,8 @@ Examples: * `nestiler -c nestiler-colors.json ...` * `nestiler --colors nestiler-colors.json ...` -Please note that some colors are forbidden on nes: 0x0D ("blacker than black"), 0x0E, 0x0F, 0x1E, 0x1F, 0x2E, 0x2F, 0x3E, 0x3F. These colors will be ignored. +Please note that some colors have caveats surrounding their usage on NES. 0x0D ("blacker than black") is forbidden and will be ignored. +Also be aware that 0x1D (black) is affected by emphasis bits when other black colors 0xXE-0xXF are not. ### Option -m, --mode bg|sprites8x8|sprites8x16 Option to specify processing mode: backgrounds, 8x8 sprites or 8x16 sprites. Default is backgrounds mode. -- cgit v1.2.3