{"id":18535794,"url":"https://github.com/daniel5151/armv4t_emu","last_synced_at":"2025-04-09T09:06:05.549Z","repository":{"id":57493732,"uuid":"206834169","full_name":"daniel5151/armv4t_emu","owner":"daniel5151","description":"An emulator for the ARMv4t instruction set written in Rust","archived":false,"fork":false,"pushed_at":"2024-11-23T18:01:31.000Z","size":4191,"stargazers_count":31,"open_issues_count":7,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T07:08:15.880Z","etag":null,"topics":["arm","armv4t","emulation","emulator","gameboy-advance","gba"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/daniel5151.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":"2019-09-06T16:31:57.000Z","updated_at":"2025-03-30T10:52:57.000Z","dependencies_parsed_at":"2024-12-17T20:05:47.131Z","dependency_job_id":"a547b047-f5b3-40be-a249-05186b7af61e","html_url":"https://github.com/daniel5151/armv4t_emu","commit_stats":{"total_commits":92,"total_committers":4,"mean_commits":23.0,"dds":0.3804347826086957,"last_synced_commit":"7146935b514124f2ce5b1a911a81790c51b1e4c0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Farmv4t_emu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Farmv4t_emu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Farmv4t_emu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Farmv4t_emu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel5151","download_url":"https://codeload.github.com/daniel5151/armv4t_emu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008629,"owners_count":21032556,"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":["arm","armv4t","emulation","emulator","gameboy-advance","gba"],"created_at":"2024-11-06T19:27:42.190Z","updated_at":"2025-04-09T09:06:05.531Z","avatar_url":"https://github.com/daniel5151.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# armv4t_emu\n\n[![](http://meritbadge.herokuapp.com/armv4t_emu)](https://crates.io/crates/armv4t_emu)\n[![](https://docs.rs/armv4t_emu/badge.svg)](https://docs.rs/armv4t_emu)\n\nAn emulator for the ARMv4T instruction set, written in Rust.\n\nInitially written as part of [iburinoc's Gameboy Advance emulator](https://github.com/iburinoc/gba-rs), armv4t_emu is now a standalone library that's ready to be used in any project that might need it!\n\nAt the moment, the crate is _almost_ feature complete, and is capable of running large programs (ostensibly) successfully. See the issue tracker for a list of missing / incomplete features.\n\n## Example\n\n```rust\nuse armv4t_emu::{reg, Cpu, ExampleMem, Mode, Memory};\n\nlet prog = \u0026[\n    0x06, 0x00, 0xa0, 0xe3, //    mov r0, #6\n    0x01, 0x10, 0xa0, 0xe3, //    mov r1, #1\n    0x01, 0x10, 0x81, 0xe0, // l: add r1, r1, r1\n    0x01, 0x00, 0x50, 0xe2, //    subs r0, #1\n    0xfc, 0xff, 0xff, 0x1a, //    bne l\n    0x01, 0x6c, 0xa0, 0xe3, //    mov r6, #0x100\n    0x00, 0x10, 0x86, 0xe5, //    str r1, [r6]\n    0xf7, 0xf0, 0xde, 0xad  // ; trigger undefined instr exception\n];\nlet mut mem = ExampleMem::new_with_data(prog);\nlet mut cpu = Cpu::new();\ncpu.reg_set(Mode::User, reg::PC, 0x00);\ncpu.reg_set(Mode::User, reg::CPSR, 0x10);\n\nwhile cpu.step(\u0026mut mem) {}\n\nassert_eq!(64, mem.r32(0x100));\n```\n\n## Optional Features\n\nThere are a couple of optional features that you may want to enable, providing various bits of functionality / debugging enhancements. These are disabled by default, as though they do bloat compile times.\n\nFeature | Description\n--------|-------------\n`advanced_disasm` | Uses [`capstone`](https://github.com/capstone-rust/capstone-rs) to disassemble + log instructions. _Warning:_ Substantially increases compile times.*\n`serde` | Adds `Serialize` and `Deserialize` derives on important types/structs.\n\n\\* Instead of debugging emulated code by creating a ad-hoc, application-specific debugger, consider using the [`gdbstub`](https://github.com/daniel5151/gdbstub) crate.\n\n## Missing Features\n\nAt the moment, this crate's feature set is primarily motivated by whatever functionality it's dependent projects require. As such, there are several features of the ARMv4T instruction set which are not implemented at this time:\n\n- Custom co-processor support (see [#3](https://github.com/daniel5151/armv4t_emu/issues/3))\n- Big-Endian support (see [#4](https://github.com/daniel5151/armv4t_emu/issues/4))\n- Support for \"cycle accurate\" emulation\n    - This would be tricky to implement, as `armv4t_emu` isn't an emulator for any particular ARMv4T CPU.\n    - Theoretically, this could be implemented by modifying the public API to accept some kind of platform-specific timing information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel5151%2Farmv4t_emu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel5151%2Farmv4t_emu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel5151%2Farmv4t_emu/lists"}