{"id":19670494,"url":"https://github.com/mat-sz/6502","last_synced_at":"2026-05-16T05:31:04.117Z","repository":{"id":128692479,"uuid":"235165659","full_name":"mat-sz/6502","owner":"mat-sz","description":"🖥️ 6502 emulator (TypeScript)","archived":false,"fork":false,"pushed_at":"2020-01-29T22:22:04.000Z","size":127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T03:35:08.762Z","etag":null,"topics":["6502","6502-processor","emulator","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mat-sz.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}},"created_at":"2020-01-20T18:08:45.000Z","updated_at":"2024-12-04T20:09:24.000Z","dependencies_parsed_at":"2023-04-03T13:32:27.358Z","dependency_job_id":null,"html_url":"https://github.com/mat-sz/6502","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2F6502","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2F6502/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2F6502/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2F6502/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mat-sz","download_url":"https://codeload.github.com/mat-sz/6502/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240980814,"owners_count":19888343,"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":["6502","6502-processor","emulator","typescript"],"created_at":"2024-11-11T17:06:21.990Z","updated_at":"2026-05-16T05:31:04.110Z","avatar_url":"https://github.com/mat-sz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 6502\n\n[![Build Status](https://travis-ci.com/mat-sz/6502.svg?branch=master)](https://travis-ci.com/mat-sz/6502)\n\nMOS Technology 6502 8-bit CPU emulator written in TypeScript.\n\nPasses common test suites (AllSuiteA and 6502_functional_test).\n\n## Installation\n\nFor some reason publishing a package called \"6502\" to NPM is not possible.\n\nBecause of this I include a transpiled version in the repo that will allow everyone to install the package with the following command:\n\n```\nyarn add mat-sz/6502\n```\n\nor, if you use npm:\n\n```\nnpm install mat-sz/6502\n```\n\n## Usage\n\n```js\nimport { MEMORY_SIZE, State, step } from \"6502\";\n\n// Create 64k of RAM.\nconst memory = new Uint8Array(MEMORY_SIZE);\nlet state = new State();\n\nlet PC = 0;\nstate.PC = 0x0400;\nmemory.set(new Uint8Array(binary), 0x4000);\n\nwhile (state.PC != PC) {\n    // Store old PC for infinite loop detection.\n    PC = state.PC;\n\n    // Step isn't a pure function yet, state will be mutated.\n    state = step(state,\n        (offset) =\u003e memory[offset],                // getMemory = (offset) =\u003e value\n        (offset, value) =\u003e memory[offset] = value  // setMemory = (offset, value) =\u003e void\n    );\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2F6502","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmat-sz%2F6502","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2F6502/lists"}