{"id":30059057,"url":"https://github.com/bbbbbr/gameboy_color_frame_off_persistence","last_synced_at":"2025-08-08T00:41:41.821Z","repository":{"id":307923513,"uuid":"1031093046","full_name":"bbbbbr/gameboy_color_frame_off_persistence","owner":"bbbbbr","description":"Example and testing of the Display Off frame persistence for the Game Boy Color","archived":false,"fork":false,"pushed_at":"2025-08-03T02:02:44.000Z","size":4201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T04:06:06.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbbbbr.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-08-03T01:55:59.000Z","updated_at":"2025-08-03T02:02:47.000Z","dependencies_parsed_at":"2025-08-03T04:06:30.053Z","dependency_job_id":null,"html_url":"https://github.com/bbbbbr/gameboy_color_frame_off_persistence","commit_stats":null,"previous_names":["bbbbbr/gameboy_color_frame_off_persistence"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bbbbbr/gameboy_color_frame_off_persistence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbbbbr%2Fgameboy_color_frame_off_persistence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbbbbr%2Fgameboy_color_frame_off_persistence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbbbbr%2Fgameboy_color_frame_off_persistence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbbbbr%2Fgameboy_color_frame_off_persistence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbbbbr","download_url":"https://codeload.github.com/bbbbbr/gameboy_color_frame_off_persistence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbbbbr%2Fgameboy_color_frame_off_persistence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269347984,"owners_count":24401872,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-08T00:41:38.101Z","updated_at":"2025-08-08T00:41:41.740Z","avatar_url":"https://github.com/bbbbbr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game Boy Color Frame Persistence / Duplication Quirk\nGBDK Example for utilizing the GBC hardware quirk which allows previously \nrendered video frames to be persisted / duplicated on the screen while the\nunderlying VRAM contents are modified. The duplication is achieved by\nbriefly turning the LCD off and then back on again during V-Blank.\n\n# Origins\nThe technique was used in a few official Game Boy Color releases (Men In Black, \nFIFA 2000, Robot Wars Metal Mayhem, etc).\n\nThis example was prompted by other people discussing the topic in the gbdev discord.\n\n# Why is it useful?\nAt the expense of a lower frame rate it allows for substantial changes to the\ncontents of VRAM without concern for the changes showing up on screen as tearing\nor partially altered images. When the persistence is stopped the Game Boy Color\nwill resume rendering entire frames again as normal.\n\n# Controls\n- `Left` / `Right`: Decrease or increase the number of frames to persist (min 0, power-up default 1)\n- `Up` / `Down`: Scroll image up down. When persisting frames longer the scrolling become look choppier\n- `A` / `B`: Cycle through test images\n\n# Build\nSee the bin directory\n\n# Implementation\nSee: `void display_briefly_off_toggle_vbl(void)` in `gbc_hicolor.c` and the `add_VBL()`/`remove_VBL()` calls for it.\n\n# Example code\nThis project is built on the GBDK \"Hi-Color\" example which is a useful test-bed\nsince it continually modifies the GBC color palette registers as the screen is\nbeing drawn for each frame.\n\nThis means that screen LCD drivers or hardware PPU implementations\n(FPGA-based clones) which don't exactly mimic the OEM behavior will exhibit\nvarious kinds of image degradation on persisted frames, while an OEM console \nwith an original screen (and most aftermarket LCDs) will continue to show\nthe original image without issue aside from some shimmering.\n\n# Hardware Behavior\nSee the photos in the `console_photos` folder for examples from OEM and Clone hardware.\n- OEM hardware with OEM screens: the test pattern image looks as expected.\n- OEM hardware with aftermarket screens: most look as expected with occasional small quirks.\n- SOC clones with their OEM Screens (GBBoy Colour variants): the test pattern image looks as expected.\n- SOC clones with an aftermarket LCDs (GBBoy Colour variant): the image has minor glitches, and then offsets as persistence duration increases\n- FPGA Clones\n  - Analogue Pocket (cart slot): The image is entirely corrupted\n  - Modretro Chromatic: For the first frame the image looks, subsequent frames have white flashes\n  - FPGBC (core v1.14): The image is entirely corrupted\n\n# Emulators\nThe following emulators are known to emulate the frame persistence:\n- Emulicious\n- BGB (as of version `1.6.6` it also emulates the visual shimmer seen during frame persistence)\n- SameBoy\n\n# Example image\nExample image Pixel art originally by RodrixAP under Creative Commons Attribution 2.0 Generic (CC BY 2.0)\n\nhttps://www.flickr.com/photos/rodrixap/10591266994/in/album-72157637154901153/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbbbbr%2Fgameboy_color_frame_off_persistence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbbbbr%2Fgameboy_color_frame_off_persistence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbbbbr%2Fgameboy_color_frame_off_persistence/lists"}