{"id":17011803,"url":"https://github.com/superzazu/z80","last_synced_at":"2026-03-17T18:38:04.720Z","repository":{"id":43287863,"uuid":"190280936","full_name":"superzazu/z80","owner":"superzazu","description":"A z80 emulator written in C99.","archived":false,"fork":false,"pushed_at":"2022-03-05T01:31:21.000Z","size":50,"stargazers_count":62,"open_issues_count":4,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T08:40:01.949Z","etag":null,"topics":["cpu","emulation","z80"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superzazu.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}},"created_at":"2019-06-04T21:19:35.000Z","updated_at":"2025-03-29T20:25:00.000Z","dependencies_parsed_at":"2022-09-19T00:10:14.355Z","dependency_job_id":null,"html_url":"https://github.com/superzazu/z80","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/superzazu/z80","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2Fz80","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2Fz80/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2Fz80/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2Fz80/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superzazu","download_url":"https://codeload.github.com/superzazu/z80/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2Fz80/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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":["cpu","emulation","z80"],"created_at":"2024-10-14T06:08:04.706Z","updated_at":"2026-03-17T18:38:04.705Z","avatar_url":"https://github.com/superzazu.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# z80\n\nA complete z80 emulator written in C99 under the MIT license. The emulator currently passes both zexdoc and zexall Z80 instruction exerciser tests. See `z80_tests.c` for example usage. Note that cycles are counted at instruction level.\n\nYou can run the tests by running `make \u0026\u0026 ./z80_tests`, which outputs:\n\n```\n*** TEST: roms/prelim.com\nPreliminary tests complete\n*** 899 instructions executed on 8721 cycles (expected=8721, diff=0)\n\n*** TEST: roms/zexdoc.cim\nZ80doc instruction exerciser\n\u003cadc,sbc\u003e hl,\u003cbc,de,hl,sp\u003e....  OK\nadd hl,\u003cbc,de,hl,sp\u003e..........  OK\nadd ix,\u003cbc,de,ix,sp\u003e..........  OK\nadd iy,\u003cbc,de,iy,sp\u003e..........  OK\naluop a,nn....................  OK\naluop a,\u003cb,c,d,e,h,l,(hl),a\u003e..  OK\naluop a,\u003cixh,ixl,iyh,iyl\u003e.....  OK\naluop a,(\u003cix,iy\u003e+1)...........  OK\nbit n,(\u003cix,iy\u003e+1).............  OK\nbit n,\u003cb,c,d,e,h,l,(hl),a\u003e....  OK\ncpd\u003cr\u003e........................  OK\ncpi\u003cr\u003e........................  OK\n\u003cdaa,cpl,scf,ccf\u003e.............  OK\n\u003cinc,dec\u003e a...................  OK\n\u003cinc,dec\u003e b...................  OK\n\u003cinc,dec\u003e bc..................  OK\n\u003cinc,dec\u003e c...................  OK\n\u003cinc,dec\u003e d...................  OK\n\u003cinc,dec\u003e de..................  OK\n\u003cinc,dec\u003e e...................  OK\n\u003cinc,dec\u003e h...................  OK\n\u003cinc,dec\u003e hl..................  OK\n\u003cinc,dec\u003e ix..................  OK\n\u003cinc,dec\u003e iy..................  OK\n\u003cinc,dec\u003e l...................  OK\n\u003cinc,dec\u003e (hl)................  OK\n\u003cinc,dec\u003e sp..................  OK\n\u003cinc,dec\u003e (\u003cix,iy\u003e+1).........  OK\n\u003cinc,dec\u003e ixh.................  OK\n\u003cinc,dec\u003e ixl.................  OK\n\u003cinc,dec\u003e iyh.................  OK\n\u003cinc,dec\u003e iyl.................  OK\nld \u003cbc,de\u003e,(nnnn).............  OK\nld hl,(nnnn)..................  OK\nld sp,(nnnn)..................  OK\nld \u003cix,iy\u003e,(nnnn).............  OK\nld (nnnn),\u003cbc,de\u003e.............  OK\nld (nnnn),hl..................  OK\nld (nnnn),sp..................  OK\nld (nnnn),\u003cix,iy\u003e.............  OK\nld \u003cbc,de,hl,sp\u003e,nnnn.........  OK\nld \u003cix,iy\u003e,nnnn...............  OK\nld a,\u003c(bc),(de)\u003e..............  OK\nld \u003cb,c,d,e,h,l,(hl),a\u003e,nn....  OK\nld (\u003cix,iy\u003e+1),nn.............  OK\nld \u003cb,c,d,e\u003e,(\u003cix,iy\u003e+1)......  OK\nld \u003ch,l\u003e,(\u003cix,iy\u003e+1)..........  OK\nld a,(\u003cix,iy\u003e+1)..............  OK\nld \u003cixh,ixl,iyh,iyl\u003e,nn.......  OK\nld \u003cbcdehla\u003e,\u003cbcdehla\u003e........  OK\nld \u003cbcdexya\u003e,\u003cbcdexya\u003e........  OK\nld a,(nnnn) / ld (nnnn),a.....  OK\nldd\u003cr\u003e (1)....................  OK\nldd\u003cr\u003e (2)....................  OK\nldi\u003cr\u003e (1)....................  OK\nldi\u003cr\u003e (2)....................  OK\nneg...........................  OK\n\u003crrd,rld\u003e.....................  OK\n\u003crlca,rrca,rla,rra\u003e...........  OK\nshf/rot (\u003cix,iy\u003e+1)...........  OK\nshf/rot \u003cb,c,d,e,h,l,(hl),a\u003e..  OK\n\u003cset,res\u003e n,\u003cbcdehl(hl)a\u003e.....  OK\n\u003cset,res\u003e n,(\u003cix,iy\u003e+1).......  OK\nld (\u003cix,iy\u003e+1),\u003cb,c,d,e\u003e......  OK\nld (\u003cix,iy\u003e+1),\u003ch,l\u003e..........  OK\nld (\u003cix,iy\u003e+1),a..............  OK\nld (\u003cbc,de\u003e),a................  OK\nTests complete\n*** 5764169747 instructions executed on 46734978649 cycles (expected=46734978649, diff=0)\n\n*** TEST: roms/zexall.cim\nZ80all instruction exerciser\n\u003cadc,sbc\u003e hl,\u003cbc,de,hl,sp\u003e....  OK\nadd hl,\u003cbc,de,hl,sp\u003e..........  OK\nadd ix,\u003cbc,de,ix,sp\u003e..........  OK\nadd iy,\u003cbc,de,iy,sp\u003e..........  OK\naluop a,nn....................  OK\naluop a,\u003cb,c,d,e,h,l,(hl),a\u003e..  OK\naluop a,\u003cixh,ixl,iyh,iyl\u003e.....  OK\naluop a,(\u003cix,iy\u003e+1)...........  OK\nbit n,(\u003cix,iy\u003e+1).............  OK\nbit n,\u003cb,c,d,e,h,l,(hl),a\u003e....  OK\ncpd\u003cr\u003e........................  OK\ncpi\u003cr\u003e........................  OK\n\u003cdaa,cpl,scf,ccf\u003e.............  OK\n\u003cinc,dec\u003e a...................  OK\n\u003cinc,dec\u003e b...................  OK\n\u003cinc,dec\u003e bc..................  OK\n\u003cinc,dec\u003e c...................  OK\n\u003cinc,dec\u003e d...................  OK\n\u003cinc,dec\u003e de..................  OK\n\u003cinc,dec\u003e e...................  OK\n\u003cinc,dec\u003e h...................  OK\n\u003cinc,dec\u003e hl..................  OK\n\u003cinc,dec\u003e ix..................  OK\n\u003cinc,dec\u003e iy..................  OK\n\u003cinc,dec\u003e l...................  OK\n\u003cinc,dec\u003e (hl)................  OK\n\u003cinc,dec\u003e sp..................  OK\n\u003cinc,dec\u003e (\u003cix,iy\u003e+1).........  OK\n\u003cinc,dec\u003e ixh.................  OK\n\u003cinc,dec\u003e ixl.................  OK\n\u003cinc,dec\u003e iyh.................  OK\n\u003cinc,dec\u003e iyl.................  OK\nld \u003cbc,de\u003e,(nnnn).............  OK\nld hl,(nnnn)..................  OK\nld sp,(nnnn)..................  OK\nld \u003cix,iy\u003e,(nnnn).............  OK\nld (nnnn),\u003cbc,de\u003e.............  OK\nld (nnnn),hl..................  OK\nld (nnnn),sp..................  OK\nld (nnnn),\u003cix,iy\u003e.............  OK\nld \u003cbc,de,hl,sp\u003e,nnnn.........  OK\nld \u003cix,iy\u003e,nnnn...............  OK\nld a,\u003c(bc),(de)\u003e..............  OK\nld \u003cb,c,d,e,h,l,(hl),a\u003e,nn....  OK\nld (\u003cix,iy\u003e+1),nn.............  OK\nld \u003cb,c,d,e\u003e,(\u003cix,iy\u003e+1)......  OK\nld \u003ch,l\u003e,(\u003cix,iy\u003e+1)..........  OK\nld a,(\u003cix,iy\u003e+1)..............  OK\nld \u003cixh,ixl,iyh,iyl\u003e,nn.......  OK\nld \u003cbcdehla\u003e,\u003cbcdehla\u003e........  OK\nld \u003cbcdexya\u003e,\u003cbcdexya\u003e........  OK\nld a,(nnnn) / ld (nnnn),a.....  OK\nldd\u003cr\u003e (1)....................  OK\nldd\u003cr\u003e (2)....................  OK\nldi\u003cr\u003e (1)....................  OK\nldi\u003cr\u003e (2)....................  OK\nneg...........................  OK\n\u003crrd,rld\u003e.....................  OK\n\u003crlca,rrca,rla,rra\u003e...........  OK\nshf/rot (\u003cix,iy\u003e+1)...........  OK\nshf/rot \u003cb,c,d,e,h,l,(hl),a\u003e..  OK\n\u003cset,res\u003e n,\u003cbcdehl(hl)a\u003e.....  OK\n\u003cset,res\u003e n,(\u003cix,iy\u003e+1).......  OK\nld (\u003cix,iy\u003e+1),\u003cb,c,d,e\u003e......  OK\nld (\u003cix,iy\u003e+1),\u003ch,l\u003e..........  OK\nld (\u003cix,iy\u003e+1),a..............  OK\nld (\u003cbc,de\u003e),a................  OK\nTests complete\n*** 5764169747 instructions executed on 46734978649 cycles (expected=46734978649, diff=0)\n```\n\n## Licensing\n\nThis project is under the MIT license; except the files in `roms` which are provided for convenience to test the z80 core implementation. These files authors' and licenses can be seen in the source files (.z80/.src files).\n\n## Resources\n\n- [Z80 CPU User Manual](http://z80.info/zip/z80cpu_um.pdf)\n- [Z80 instruction set (+ timings)](http://map.grauw.nl/resources/z80instr.php)\n- [Z80 timings](https://docs.google.com/spreadsheets/d/1eygwsPkhpBi6oLQI1mre7kxyN11o1j0TmvXCz1aBLLY/edit?usp=sharing)\n- [Decoding Z80 Opcodes](http://z80.info/decoding.htm)\n- [anotherlin/z80emu](https://github.com/anotherlin/z80emu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzazu%2Fz80","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperzazu%2Fz80","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzazu%2Fz80/lists"}