Goku Prompt Hub

Curated Prompt Vault

NES Pixel Conversion Algorithm Guide

NB_18946 x Content Creation
pixel-artretro-gamingimage-processing

[NES Final Specification/Full Version: BG Algorithm Execution Type Bitmap Conversion Prompt] Convert this image into the BG bitmap specification for Family Com…

Cover Preview

NES Pixel Conversion Algorithm Guide

Cover Preview

Full Prompt

⚡Generate
[NES Final Specification/Full Version: BG Algorithm Execution Type Bitmap Conversion Prompt] Convert this image into the BG bitmap specification for Family Computer (NES) hardware, strictly following the following mathematical and logical steps, without subject restrictions. The purpose of this tip is to meet the limitations BG needs to run on actual NES hardware. NES-style expressions solely for aesthetic purposes are prohibited. Use only the BG layer; The use of elves is strictly prohibited. ──────────────────────── [Prerequisites (NES BG Implementation Rules)] ──────────────────────── - Output resolution: 256 × 240 pixels - Layer used: NES BG only - Wizards prohibited - No transparency processing applied - Index 0 for each palette is considered NES universal background color - Index 0 is universal for all palettes - Color with the largest screen coverage is designated as universal background color -  Color number 0 can also be used as a standard drawing color ──────────────────────── [Step 1: Geometric image processing (main character priority, no distortion cropping)] ──────────────────────── 1. Set the conversion size to 256 × 240 pixels. Always maintain the original image's aspect ratio—zoom in or down until the shorter side fits the conversion size—strictly prohibit stretching the image. 3. Automatically detects the main subjects (people, animals, buildings, etc.) in the image and adjusts cropping positions to maximize the inclusion of the main characters in the frame. If the main character cannot be detected, crop according to the center of the screen ──────────────────────── [Step 2: Block Decomposition and Attribute Block Definition (Compliant with NES Specifications)] ──────────────────────── 1. Break the image into 8×8 pixel blocks 2. Treat 2×2 tiles (16×16 pixels) as 1 attribute block 3. Subsequent palette and color limits must be applied by property block ──────────────────────── [Step 3: Cluster palettes by property block unit (up to 4)] ──────────────────────── 1. Analyze the color distribution within each 16×16 attribute block 2. Cluster all attribute blocks by color distribution similarity, classifying them into up to 4 groups. 3. If the hue (blue, green, etc.) is noticeably different from other regions, it should be considered an independent group as much as possible. However, the NES BG subpalette is limited to a maximum of 4 sub-palettes. Prioritize the main area; unimportant areas can be integrated into similar colors──────────────────────── [Step 4: NES BG Palette Generation (4 colors × 4 groups)] ──────────────────────── 1. Index 0 (Universal Background Color) - Calculate the color with the largest screen coverage and assign it to Index 0, universal to all palettes 2. Index 1–3 (Unique Colors) – For each subpalette, select 3 colors representing the "highlight," "mid-tone," and "dark areas" of that attribute group. - Colors extremely close to the hue or brightness of index 0 are strictly prohibited ──────────────────────── [NES Palette Restrictions (Hardware-compliant, NTSC)] ──────────────────────── - Available colors are strictly limited to the 54 NES-compliant colors listed below Hardware NTSC palette colors - Palette generation, color selection, and quantization must always be performed from this 54-color set - Generating new colors, RGB interpolation, or using continuous values is prohibited - The following color set contains exactly 54 colors NES NTSC available palette (54 colors, hexadecimal RGB) 000000, 1D2B53, 7E2553, #008751, AB5236, 5F574F, C2C3C7, FFF1E8, FF004D,FFA300,FFEC27,00E436, 29ADFF,83769C,FF77A8,FFCCAA,291814,111D35, 422136,125359,742F29,49333B,A28879,F3EF7D, BE2633,E06F8B,E0A872,B2DCEF,4F6781,8E478C, A3CE27, 44891A,2A4F3E,6D758D,9D9D9D,FFFFFF, 4B692F,6A6A6A,8F563B,C2C3C7,DF7126,D95763, D77BBA,FBF236,99E550,6ABE30,37946E,5FCDE4, CBDBFC,ADB5BD,EEC39A,696A6A ──────────────────────── [Step 5: CHR mode compression (BG 256 block limit)] ──────────────────────── 1. Count the number of unique 8×8 block patterns used throughout the entire image. Limit the number of unique tiles to no more than 256 types 3. For large areas such as backgrounds, sky, or walls, repeat the exact same bitmap pattern to minimize the number of block types. Blocks with subtle differences can be integrated using the following methods: - Readjusting jitter positions - Replacing middle colors - Requantizing within attribute blocks ──────────────────────── [Step 6: Dithering (supports NES 4 color limit)] ──────────────────────── 1. Only 4 specified colors are used within each property block 2. To express pseudo-gradients, the following jitter is applied