{"id":17140954,"url":"https://github.com/biged/a6502","last_synced_at":"2025-04-13T10:31:12.274Z","repository":{"id":3703241,"uuid":"4774478","full_name":"BigEd/a6502","owner":"BigEd","description":"A 6502 emulator (library) written in assembly for ARM Cortex-M4","archived":false,"fork":false,"pushed_at":"2019-06-21T12:03:14.000Z","size":238,"stargazers_count":44,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-31T19:24:24.438Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BigEd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.GPL3","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-24T18:45:14.000Z","updated_at":"2024-06-05T23:48:55.000Z","dependencies_parsed_at":"2022-09-01T07:52:25.301Z","dependency_job_id":null,"html_url":"https://github.com/BigEd/a6502","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/BigEd%2Fa6502","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigEd%2Fa6502/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigEd%2Fa6502/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BigEd%2Fa6502/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BigEd","download_url":"https://codeload.github.com/BigEd/a6502/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223581935,"owners_count":17168655,"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":[],"created_at":"2024-10-14T20:23:53.563Z","updated_at":"2024-11-07T20:06:23.609Z","avatar_url":"https://github.com/BigEd.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"The a6502 project is a 6502 emulator (library) written in ARM assembly.\n\n(Strictly, it's in Thumb-2 assembly, because it's intended for a\nparticular dev board, the STM32F4DISCOVERY, which has a Cortex-M4\nand that core will only run in Thumb mode.)\n\nOn that dev board, the CPU runs at 168MHz and the emulated speed of\nthe 6502 is 18MHz.\n\nThe project is inspired by [Chris Baird's stm6502](https://github.com/BigEd/stm6502), and likewise offers\na 6502 with 64k RAM and a serial connection.  In this case the serial\nconnection is over USB, and I/O is performed by an extended opcode\ninstead of being memory-mapped.\n\nThe code takes some ideas from Acorn's [65Tube](http://www.chiark.greenend.org.uk/~theom/riscos/docs/RISCOS2/Emulate65.txt) and from Ian Piumarta's\n[lib6502](http://www.piumarta.com/software/lib6502/), but both of those have incompatible copyright so this isn't a\ndirect descendant of either.\n\nBroadly, the LGPL license allows use in pretty much any project\n(whether open or closed source, free or commercial,) provided any\nbinary distribution is accompanied by source.\n\nRefer to the stm6502 project for details about tools and downloading\nbuilt firmware.  The Makefile here will build a *.bin which includes\nan initial memory image for the 6502 - usually that would include a\nbootstrap ROM, monitor or application. \n\nFor convenience, there's a built a6502.bin file included in a subdirectory.\nIt includes only the minimal C'mon monitor by Bruce Clark.\n(This binary file is derived in part from other open source\nprojects and does not form part of the source of this project.)\n\nAn example memory image called `basfigmon.img` is provided for\nconvenience only, and does not form part of the source\nof this project. It was built with 'dd' commands from binaries found\nin stm6502 - sources are found in that project. It contains:\n  - supermon64 at F800, entered at reset\n  - figforth at 0200 (g 0200)\n  - EhBASIC at c800 (g c800)\n\nThe file `basfigmon.bin` is a loadable a6502 built with this image.\n\nA microUSB cable connected to the south edge of the dev board offers\na serial connection to the emulated CPU, which communicates using\n  - 42 00 for output - writes the char in A\n  - 42 01 for input (will block) - reads the char in A\n\nIt's not possible for the 6502 to read a null byte, as zero is used as\na sentinel value.  The provided C routine which handles opcode 42\n(WDM) also translates between \\n and \\r characters. \n\nThe three ROMs mentioned above seem to work correctly, as do some\ntrivial test sequences found in top.c - bug reports are welcome.\n\nAt present the emulator does not emulate decimal mode, but otherwise\nit passes [Klaus Dormann's test suite](http://forum.6502.org/viewtopic.php?f=2\u0026t=2241).\n\nEhBASIC needs decimal mode only for HEX$() which is therefore\npresently misbehaving.\n\nRemodelling the emulator in Thumb or ARM assembly might be interesting\n(ARM would be the easier case.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiged%2Fa6502","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiged%2Fa6502","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiged%2Fa6502/lists"}