{"id":30305333,"url":"https://github.com/darthcloud/blueretro_test_rom_snes","last_synced_at":"2025-08-17T08:08:53.321Z","repository":{"id":305998051,"uuid":"1024639479","full_name":"darthcloud/blueretro_test_rom_snes","owner":"darthcloud","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-29T22:58:21.000Z","size":5684,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-01T17:42:54.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/darthcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["darthcloud"],"patreon":"darthcloud","open_collective":null,"ko_fi":"darthcloud","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2025-07-23T03:09:42.000Z","updated_at":"2025-07-29T22:58:24.000Z","dependencies_parsed_at":"2025-08-01T17:33:41.458Z","dependency_job_id":null,"html_url":"https://github.com/darthcloud/blueretro_test_rom_snes","commit_stats":null,"previous_names":["darthcloud/blueretro_test_rom_snes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/darthcloud/blueretro_test_rom_snes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darthcloud%2Fblueretro_test_rom_snes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darthcloud%2Fblueretro_test_rom_snes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darthcloud%2Fblueretro_test_rom_snes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darthcloud%2Fblueretro_test_rom_snes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darthcloud","download_url":"https://codeload.github.com/darthcloud/blueretro_test_rom_snes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darthcloud%2Fblueretro_test_rom_snes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269743001,"owners_count":24468394,"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-10T02:00:08.965Z","response_time":71,"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-17T08:08:52.864Z","updated_at":"2025-08-17T08:08:53.306Z","avatar_url":"https://github.com/darthcloud.png","language":"Assembly","funding_links":["https://github.com/sponsors/darthcloud","https://patreon.com/darthcloud","https://ko-fi.com/darthcloud"],"categories":[],"sub_categories":[],"readme":"# BlueRetro test\n\n[Download both ROM \u0026 FW here](https://github.com/darthcloud/blueretro_test_rom_snes/releases/latest)\n\nPlug a SNES BlueRetro running FW \u003e= v25.07 into either SNES ports.\\\nThis program will search for a Devices on any of the two SNES ports. ($4016 d0, $4017 d0)\\\nAt boot it will try once to enable BlueRetro 8bits mode.  ($4201 d6/d7)\n\n![ROM demo](demo.gif)\n\n8 bytes are read each frames per port in this ROM.\\\n(Could be reduced to 5bytes in 4bits mode or less if not all axes are needed for your application)\n\nPolling format can be cycle by pressing Start + B.\nL/R trigger can be used to activate rumble.\n\n# Polling format\n\n## Enabling extended format\nSimilar to the SNES rumble, a cmd frame must be sent using $4201 bits d6 (P1) or d7 (P2).\\\nBy default BlueRetro will output SNES standard format (2 bytes).\n\nThe sentry value is ASCII 'b' or in hex 0x62.\n\n```\nBytes/Bits\n0               1               2               3\n7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0\n\nData on IO line:                \u003c--- Sentry --\u003e \u003c---- Data ---\u003e\nX X X X X X X X X X X X X X X X 0 1 1 0 0 0 1 0 0 0 0 0 0 0 Y Y\n\n(BlueRetro will also accept cmds that are shift by (at most) 1 bit to the right)\n\nX = Don't care (typically 1s)\n\nY Y = BR format code:\n0 0 = Standard SNES 2 bytes format\n0 1 = BlueRetro 8 bytes format (8bits per axis)\n1 0 = BlueRetro 5 bytes format (4bits per axis)\n```\n\n## BlueRetro 8 bytes format (8bits per axis)\n\nApplication can detect this format with the 4bit ID: 0x6\n\n```\nBytes/Bits\n0               1               2               3\n7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0\n\nData on D0 line:\n\u003c- Buttons Bitfield --\u003e \u003c- ID-\u003e \u003c-- LX axis --\u003e \u003c-- LY axis --\u003e\nB Y S S U D L R A X L R 0 1 1 0 X X X X X X X X Y Y Y Y Y Y Y Y\n\nBytes/Bits\n4               5               6               7\n7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0\n\nData on D0 line:\n\u003c-- RX axis --\u003e \u003c-- RY axis --\u003e \u003c-- AL axis --\u003e \u003c-- AR axis --\u003e\nX X X X X X X X Y Y Y Y Y Y Y Y L L L L L L L L R R R R R R R R\n```\n\n## BlueRetro 5 bytes format (4bits per axis)\n\nApplication can detect this format with the 4bit ID: 0x7\n\n```\nBytes/Bits\n0               1               2               3               4\n7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0\n\nData on D0 line:\n\u003c- Buttons Bitfield --\u003e \u003c- ID-\u003e \u003c- LX-\u003e \u003c- LY-\u003e \u003c- RX-\u003e \u003c- RY-\u003e \u003c- AL-\u003e \u003c- AR-\u003e\nB Y S S U D L R A X L R 0 1 1 1 X X X X Y Y Y Y X X X X Y Y Y Y L L L L R R R R\n\n```\n\n## Example polling function\n\nInput data and output cmds can sent full duplex as done below (see mset.s):\n```asm\n_input_poll:\n\t; strobe\n\tldy #1\n\tsty $4016\n\tdey\n\tsty $4016\n\tldx #0\n@poll_byte:\n\tldy #8\n\t:\n\t\trol _output+0, X\n\t\tror\n\t\trol _output+8, X\n\t\tror\n\t\tsta $4201\n\t\tlda $4016\n\t\tror\n\t\trol _input+0, X\n\t\tlda $4017\n\t\tror\n\t\trol _input+8, X\n\t\tdey\n\t\tbne :-\n\tinx\n\tcpx _byte_cnt\n\tbcc @poll_byte\n\trts\n```\n\n# Building\nSource code requires CC65.\nhttps://cc65.github.io/\n\nOn Windows, place it in an adjacent cc65 folder, run `build.bat`.\\\nOn Ubuntu, `sudo apt install cc65`, run `./build.sh`.\n\nbuild_runtime.bat is used to rebuild runtime.lib (instructions are contained as comments)\npreprocessor.bat is used to diagnose preprocessor usage\n\n# Credits\nBased on:\\\nSNES Mouse test, by Brad Smith 2019\\\nUpdated for SNES: 2022\\\nhttp://rainwarrior.ca \\\nhttps://github.com/bbbradsmith/SNES_stuff \\\nNES version:\\\nhttps://forums.nesdev.org/viewtopic.php?p=231608#p231608\n\nsprite.chr is built with \u0026 based on https://nesrocks.itch.io/naw\n\nSNES rumble documentation\\\nhttps://github.com/LimitedRunGames-Tech/snes-rumble \\\nby Randy Linden\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarthcloud%2Fblueretro_test_rom_snes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarthcloud%2Fblueretro_test_rom_snes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarthcloud%2Fblueretro_test_rom_snes/lists"}