{"id":19090139,"url":"https://github.com/freem/colortest-vt03","last_synced_at":"2025-10-24T17:32:57.657Z","repository":{"id":145429041,"uuid":"371424979","full_name":"freem/colortest-vt03","owner":"freem","description":"VT03 Color Test","archived":false,"fork":false,"pushed_at":"2021-06-12T15:58:25.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T22:18:39.084Z","etag":null,"topics":["nes","vt03"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-27T15:41:44.000Z","updated_at":"2022-04-08T19:58:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d00848a-b971-4f81-bae5-abc1328196da","html_url":"https://github.com/freem/colortest-vt03","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fcolortest-vt03","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fcolortest-vt03/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fcolortest-vt03/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fcolortest-vt03/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freem","download_url":"https://codeload.github.com/freem/colortest-vt03/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240136996,"owners_count":19753650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nes","vt03"],"created_at":"2024-11-09T03:02:13.950Z","updated_at":"2025-10-24T17:32:52.635Z","avatar_url":"https://github.com/freem.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"VT03 Color Test\n===============\nWritten by freem; initially released on 2021/05/27\n\nIntroduction\n------------\nVT03 Color Test is a small utility ROM allowing you to preview palette colors\nusing VT03's \"new color mode\". Since the values aren't always intuitive, it's\na good idea to have a tool that can show you what value you need for a specific\ncolor.\n\nMore information can be found on the NESdev Wiki's [\"VT03+ Enhanced Palette\" page](http://wiki.nesdev.com/w/index.php/VT03%2B_Enhanced_Palette).\n\nRequirements\n------------\nVT03 supporting emulator (NintendulatorNRS, EmuVT, MAME) or hardware (untested,\nas I don't own any VT03 devices)\n\nFiles\n-----\nAside from this text file, there are three ROM files included in this package:\n- `colortest-vt03_emuvt.bin`\n- `colortest-vt03_onebus.nes`\n- `colortest-vt03_waixing.nes`\n\nThe difference(s) are explained in the \"Technical Details\" section.\n\nThe source code builds with asm6f, but should also work with regular asm6.\n\nSome screenshots are also included, mainly for documentation's sake.\n\nInterface\n---------\n![Main interface screenshot](./screenshot.png)\n\nBackground palettes are found near the bottom middle of the screen, while the\nSprite palettes are on the right. Each palette preview includes solid color\nswatches, as well as a single 4bpp tile showing all 16 colors of the palette\nset.\n\nThe value labeled \"Hex\" is the two bytes required to define the color.\n\"Lo\" is written to `$3F00-$3F7F`, \"Hi\" is written to `$3F80-$3FFF`.\n\nThere are five items that can be modified:\n\n- \"**Pal Set**\" refers to the active set of palettes being edited.\n  Values range from BG (Background) 1 to BG 4, followed by SPR (Sprites) 1 to SPR 4.\n- \"**Pal Index**\" refers to the specific color within the selected palette set.\n  Values range from `0-F` (0-15).\n- \"**Hue**\" modifies the Hue of the current color.\n- \"**Sat**\" modifies the Saturation of the current color.\n- \"**Lum**\" modifies the Luminance of the current color.\n\nThe values for Hue, Sat, and Lum range from `0-F` (0-15).\n\nUsage\n-----\nUse the D-Pad to move the cursor (Up/Down) and change values (Left/Right).\nIf you need to reset, press Select+Start.\n\nTechnical Details\n-----------------\nThis program was developed using emulators as the testing platform.\nIt may or may not work on real hardware. I don't have any to test with.\n\nAs for the three ROM files...\n\n\"`colortest-vt03_waixing.nes`\" was the first version developed.\nIt abuses a \"feature\" of NES 2.0 Mapper 256. If you look closely, you'll\nnotice that the \"_waixing\" ROM has CHR-ROM defined. In reality, OneBus\ncartridges have no CHR-ROM, as everything is mapped into a shared address\nspace.\n\nThe [NESdev Wiki's Mapper 256 page](http://wiki.nesdev.com/w/index.php/NES_2.0_Mapper_256) has this to say:\n\u003e \"ROM images converted from Waixing's WXN format will have both PRG and\n\u003e CHR ROM, yet use the VTxx-native bankswitch registers and/or register\n\u003e address mangling. These images cannot be run unchanged on physical hardware,\n\u003e and were intended to be run by Waixing's proprietary VTxx emulator found\n\u003e on several 32-bit plug-and-play consoles. For simplicity, mapper 256 is\n\u003e also used for such ROM images\"...\n\nThis solution, while great for quick tests, doesn't really work well\non EmuVT, or even real hardware.\n\n![The result of loading \"colortest-vt03_waixing.nes\" in EmuVT](./emuvt_waixing.png)\n\nIndeed, running \"`colortest-vt03_waixing.nes`\" on EmuVT will produce incorrect\nbehavior, shown above.\n\nTo solve this problem, one must produce a ROM image that matches what the VT03\nexpects in terms of CHR and PRG-ROM locations.\n\nFrom the VT03 datasheet:\n\u003e\"In one bus mode, the program initial address A24-A0 is `007FFFC`, and the video\n\u003e initial address is `0000XXX`.\"\n\nThis means the smallest possible OneBus ROM is 512 kilobytes.\n\nBy arranging the CHR-ROM to appear at the beginning of the file, and adding\nenough padding between the CHR data and the PRG banks, the ROM file can work\nproperly on EmuVT.\n\n**`colortest-vt03_onebus.nes`** is a NES 2.0 Mapper 256 image that is meant for\nuse with NintendulatorNRS.\n\n**`colortest-vt03_emuvt.bin`** is the above file without an iNES header.\nIt can be run in NintendulatorNRS, EmuVT, and MAME.\n\nRunning the bin file in MAME requires loading it as an existing ROM. I have been using\n\"`vtsndtest`\" as a surrogate. Make the \"`vtsndtest`\" directory if it doesn't already exist\nin your MAME ROMs folder, then copy the .bin file there and rename it to `rom.bin`.\n\n--------------------------------------------------\nThough it's not immediately obvious, the demo uses 4bpp tiles.\n(They are found at the right edge of the background palette preview,\nand at the top of the sprite palette preview.)\n\nEach 4bpp graphics page is twice the size of its 2bpp counterpart.\nKeep this in mind if you're going to do tests with the Waixing emu hack.\n\nGraphics for this tool were created using [YY-CHR](https://w.atwiki.jp/yychr/)'s \"4BPP 8X8\" mode.\n\nFor more technical information on the graphics formats supported\nby the VTxx hardware series, check [the NESdev Wiki \"VT02+ CHR Pattern Data Layout\" page](http://wiki.nesdev.com/w/index.php/VT02%2B_CHR_Pattern_Data_Layout).\n\n--------------------------------------------------\nAnd now, the real important information: How to set up the palette for 4BPP mode.\n\nLow Byte\n--------\n\nAddress | `$x0-$x3` | `$x4-$x7` | `$x8-$xB` | `$xC-$xF`\n--------|-----------|-----------|-----------|----------\n`$3F0x` |  BG1 0-3   |  BG2 0-3   |  BG3 0-3   |  BG4 0-3   |\n`$3F1x` | SPR1 0-3   | SPR2 0-3   | SPR3 0-3   | SPR4 0-3   |\n`$3F2x` |  BG1 4-7   |  BG2 4-7   |  BG3 4-7   |  BG4 4-7   |\n`$3F3x` | SPR1 4-7   | SPR2 4-7   | SPR3 4-7   | SPR4 4-7   |\n`$3F4x` |  BG1 8-11  |  BG2 8-11  |  BG3 8-11  |  BG4 8-11  |\n`$3F5x` | SPR1 8-11  | SPR2 8-11  | SPR3 8-11  | SPR4 8-11  |\n`$3F6x` |  BG1 12-15 |  BG2 12-15 |  BG3 12-15 |  BG4 12-15 |\n`$3F7x` | SPR1 12-15 | SPR2 12-15 | SPR3 12-15 | SPR4 12-15 |\n\nHigh Byte\n---------\n\nAddress | `$x0-$x3` | `$x4-$x7` | `$x8-$xB` | `$xC-$xF`\n--------|-----------|-----------|-----------|----------\n`$3F8x` |  BG1 0-3   |  BG2 0-3   |  BG3 0-3   |  BG4 0-3   |\n`$3F9x` | SPR1 0-3   | SPR2 0-3   | SPR3 0-3   | SPR4 0-3   |\n`$3FAx` |  BG1 4-7   |  BG2 4-7   |  BG3 4-7   |  BG4 4-7   |\n`$3FBx` | SPR1 4-7   | SPR2 4-7   | SPR3 4-7   | SPR4 4-7   |\n`$3FCx` |  BG1 8-11  |  BG2 8-11  |  BG3 8-11  |  BG4 8-11  |\n`$3FDx` | SPR1 8-11  | SPR2 8-11  | SPR3 8-11  | SPR4 8-11  |\n`$3FEx` |  BG1 12-15 |  BG2 12-15 |  BG3 12-15 |  BG4 12-15 |\n`$3FFx` | SPR1 12-15 | SPR2 12-15 | SPR3 12-15 | SPR4 12-15 |\n\nIn old color mode, you just write the regular NES color values to the Low Byte section (`$3F00-$3F7F`).\n\nFor new color mode...\n\n### The low byte\n```\n76543210\nxx|||__|\n  ||  |\n  ||  +-- Hue\n  ++----- Luminance (lower 2 bits)\n```\n\n### The high byte\n```\n76543210\nxx|__|||\n    | ||\n    | ++-- Luminance (upper 2 bits)\n    +----- Saturation\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreem%2Fcolortest-vt03","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreem%2Fcolortest-vt03","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreem%2Fcolortest-vt03/lists"}