{"id":17942768,"url":"https://github.com/b1f6c1c4/deep-darkfantasy","last_synced_at":"2026-01-23T20:40:10.257Z","repository":{"id":87842042,"uuid":"268776471","full_name":"b1f6c1c4/Deep-DarkFantasy","owner":"b1f6c1c4","description":"Global Dark Mode for ALL apps on ANY platforms.","archived":false,"fork":false,"pushed_at":"2023-10-03T00:35:13.000Z","size":4137,"stargazers_count":17,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-09T13:36:01.089Z","etag":null,"topics":["dark-mode","dark-mode-toggle","dark-theme","fpga","verilog","verilog-hdl","vivado","xilinx","zynq","zynq-7000"],"latest_commit_sha":null,"homepage":"","language":"Verilog","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/b1f6c1c4.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":"2020-06-02T10:57:31.000Z","updated_at":"2024-08-17T06:53:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"88264199-bc3c-4ba7-ac45-928ee0c0fa40","html_url":"https://github.com/b1f6c1c4/Deep-DarkFantasy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/b1f6c1c4/Deep-DarkFantasy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2FDeep-DarkFantasy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2FDeep-DarkFantasy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2FDeep-DarkFantasy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2FDeep-DarkFantasy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b1f6c1c4","download_url":"https://codeload.github.com/b1f6c1c4/Deep-DarkFantasy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2FDeep-DarkFantasy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28699701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dark-mode","dark-mode-toggle","dark-theme","fpga","verilog","verilog-hdl","vivado","xilinx","zynq","zynq-7000"],"created_at":"2024-10-29T03:07:18.193Z","updated_at":"2026-01-23T20:40:10.239Z","avatar_url":"https://github.com/b1f6c1c4.png","language":"Verilog","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *Deep:* Dark-Fantasy\n\n\u003e Global Dark mode for **ALL apps** on **ANY platforms**.\n\n:arrow_down: See the demo below :arrow_down:\n\n![Demonstration of the Deep: Dark-Fantasy system.](demo.gif)\n\n:arrow_up: See the demo above :arrow_up:\n\n## How?\n\nBy putting an FPGA between your video card and monitor.\n\n## Prerequisite\n\n- You need a video card and a monitor that supports HDMI.\n- You need an FPGA develop board. For v2.0 we only support [Digilent Zybo Z7-20](https://store.digilentinc.com/zybo-z7-zynq-7000-arm-fpga-soc-development-board/).\n- You need a microSD card with at least 8MiB of free space.\n\nNote: For [v1.0](https://github.com/b1f6c1c4/Deep-DarkFantasy/tree/v1.0)\nwe supported [AX7Z100](http://www.alinx.com.cn/index.php/default/content/124.html)\nbut that was discontinued.\n\n## TL;DR\n\nYou can follow these steps get *Deep:* Dark-Fantasy running:\n\n1. Get a [Zybo Z7-20](https://store.digilentinc.com/zybo-z7-zynq-7000-arm-fpga-soc-development-board/) if you don't have one.\n1. Get a microSD card, format its first partition as FAT32.\n1. Download our pre-built boot image file (`BOOT.bin`) from [here](https://github.com/b1f6c1c4/Deep-DarkFantasy/releases/latest/).\n1. Put the downloaded image file (`BOOT.bin`) into the microSD card. Do *NOT* modify its name.\n1. Put the microSD card into the `SD MICRO` slot on the FPGA develop board.\n1. On the Zybo Z7-20 board, locate jumper `J4` and set it to `SD`. See \"microSD Boot Mode\" in the [Reference Manual](https://reference.digilentinc.com/_media/reference/programmable-logic/zybo-z7/zybo-z7_rm.pdf) (page 13) for help.\n1. Use a power adapter to supply the FPGA develop board.\n1. Locate jumper `JP6` and set it to `WALL`. See \"Power Supplies\" in the [Reference Manual](https://reference.digilentinc.com/_media/reference/programmable-logic/zybo-z7/zybo-z7_rm.pdf) (page 9) for help.\n1. Use an HDMI Cable connect your video source (video card / mother board video output) to the HDMI *RX* port of the board.\n1. Use another HDMI Cable connect your video destination (monitor) to the HDMI *TX* port of the board.\n1. Power on the board.\n1. Make sure that all four switches are *off* (away from the LEDs.)\n1. There are four LEDs. LED2~LED0 are used to indicate which Fantasy mode the devices is currently in. There are 8 Fantasy modes in total, so the LEDs are organized in binary form.\n\n    | PCB Symbol | LED3 | LED2 | LED1 | LED0 |\n    | ---------- | ---- | ---- | ---- | ---- |\n    | Function | Video In | Fantasy Mode (MSB) | Fantasy Mode | Fantasy Mode (LSB) |\n\n1. There are four contiguous black buttons on the board, which can be used to configure *Deep:* Dark-Fantasy to work in one of the 8 Fantasy modes. Try'em all and find the one that fits you best.\n\n    | PCB Symbol | BTN3 | BTN2 | BTN1 | BTN0 |\n    | ---------- | ---- | ---- | ---- | ---- |\n    | Function | Reset | Previous Fantasy | Next Fantasy | Use Default Fantasy (3) |\n\n## Build *Deep:* Dark-Fantasy from source code\n\n**If the default settings don't work for you for some reason, you should try build the project from source code.**\n\nNote: You need Xilinx Vivado (2020.1), `make`, `bash`, `node`, `npm`, and `awk` to generate the bitstream file.\nYou also need a ttf font for the overlay number display.\nFuthermore, you need Xilinx Vitis (2020.1), `make`, `bash` to generate the bootable image.\n\n### Step 1: Get the source code\n\nYou need to (fork and) clone the repo first:\n```bash\ngit clone --depth=1 https://github.com/b1f6c1c4/Deep-DarkFantasy.git\ngit submodule update --init --recursive\n# Or, use git-get:\n# git gets b1f6c1c4/Deep-DarkFantasy\n```\n\nIn the file `config` you can find the following parameters:\n```verilog\n# Video parameters\nH_WIDTH=1920\nH_START=2008\nH_TOTAL=2200\nV_HEIGHT=1080\nFREQ=148.50\n\n# Dark-Fantasy parameters\nKH=24 # Block width (px)\nKV=24 # Block height (px)\nSMOOTH_T=1200 # Smoothing time (ms)\n\n# Overlay parameters\nFONT_SZ=768 # (px)\n```\n\n### Step 2: Configure the video parameters\n\nSince most OS and video cards will adapt to whatever device connected to it,\nyou usually don't need to modify these parameters.\nHowever, if it is NOT the case, you must either force your video card to cater to the FPGA,\nor force your FPGA to cater to the video card.\nThe first way is usually easier, but here are are explaining the second way.\n\n- If you are using Linux with X11, use the following command:\n\n    ```bash\n    xrandr --verbose\n    ```\n    And you will see tons of modelines.\n    Find the one with ` *current`, which looks like:\n    ```\n    1920x1080 (0x1c8) 148.500MHz +HSync +VSync *current +preferred\n          h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz\n          v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz\n    ```\n    Now you should know where does those magic numbers came from.\n    Edit the parameters in `config` to match the numbers from `xrandr`.\n\n    Note: If you have multiple displays, pick the one you want to use *Deep:* Dark-Fantasy.\n    You need one FPGA develop board *per display* if you want all your displays to be Dark-Fantasy.\n\n- If you are using macOS or Windows, you are having some trouble.\n    If you do encounter problems like this, please feel free to submit an [issue](https://github.com/b1f6c1c4/Deep-DarkFantasy/issues).\n\n### Step 3: Configure the block size\n\nYou can modify the two parameter `KH` and `KV`.\nIt is used to specify the size of blocks - the smaller blocks are, the finer granularity Dark-Fantasy effect is achieved.\nHowever, if the blocks are too small, texts will become illegible for read.\nFurthermore, *Deep:* Dark-Fantasy may not work as desired with very small (\u003c5) `KH` and/or `KV`.\n\n### Step 4: Configure the other parameters\n\n- `SMOOTH_T` specifies the overall time of smooth transition (in milliseconds).\n- `FONT_SZ` specifies the size of overlay mode font (in pixels). If set too large, you will run out of BRAM, so be discreet.\n\n### Step 5: Build the project\n\nThe project takes a while to build - usually several minutes to half an hour.\nMulticore won't help.\n```bash\n# Specify the font\nexport FONT=/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf\n# Specify your Xilinx Vivado installation\n# Specify your Xilinx SDK installation\nexport VIVODO=/opt/Xilinx/Vivado/2020.1\nexport VITIS=/opt/Xilinx/Vitis/2020.1\n# Perform synthsizing, implementation, bitstream creation, boot image creation.\n# This may take a while (15~25min), so be patient\nmake -j8\n```\n\nYou should be able to find `BOOT.bin` in the `build` folder.\nPut it into a FAT32-formatted SD card and put it on your FPGA board.\nDon't forget to configure the boot mode.\n\n## Limitation\n\n- 4K is not supported. 1080p 120Hz is not supported.\n- Only one resolution and refresh rate is supported once synthesized.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Fdeep-darkfantasy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb1f6c1c4%2Fdeep-darkfantasy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Fdeep-darkfantasy/lists"}