https://github.com/bobbicodes/nes
Clojure NES disassembler
https://github.com/bobbicodes/nes
Last synced: about 1 year ago
JSON representation
Clojure NES disassembler
- Host: GitHub
- URL: https://github.com/bobbicodes/nes
- Owner: bobbicodes
- License: epl-1.0
- Created: 2019-12-12T08:12:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-23T09:22:46.000Z (over 6 years ago)
- Last Synced: 2025-01-31T06:42:39.680Z (over 1 year ago)
- Language: Assembly
- Size: 236 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nes
Clojure NES disassembler
## Usage
This library reads iNES files consisting of binary data representing 6502 machine code and emits assembly code as EDN data:
```clojure
(disassemble (subs (file->hex "resources/metroid.nsf") 256 512))
[[:nop "#$b4"]
[:nop "$74"]
[:ror :a]
:kil
[:nop "$78"]
[:nop "$02,x"]
[:isb "$b2c2,x"]
:kil
:nop
[:ror "$6c56"]
[:nop "$68,x"]
[:bvc 110]
[:lsr "$6c,x"]
[:nop "$68,x"]
[:bvc 100]
[:jmp "$c4ff"]
:kil
:nop
[:ror "$6c5a"]
:nop
:pla
:nop
[:ror "$6c56"]
[:lsr "$68,x"]
[:lsr "$64,x"]
[:lsr "$ff,x"]
:kil
:nop
[:lda "($42),y"]
:kil
[:lsr "$b1,x"]
:kil
:kil
[:nop "$b1,x"]
:kil
:kil
[:bvc -78]
:kil
:kil
:nop
[:lda "($42),y"]
:kil
[:lsr "$b1,x"]
:kil
:kil
:kil
[:lda "($42),y"]
:kil
[:bvc -78]
:kil
:kil
:nop
[:lda "($44),y"]
:kil
[:lsr "$b1,x"]
[:nop "$b2"]
:kil
[:lda "($44),y"]
:kil
[:lsr "$b1,x"]
[:nop "$c4"]
:nop
[:bvc 70]
[:isb "$58c3,x"]
[:bvc 70]
[:isb "$5058,x"]
[:bcs 70]
:kil
[:cpx "#$b6"]
[:nop "$02b2,x"]
[:isb "$d000,x"]
[:ldx "$2a,y"]
[:lda "($2a),y"]
[:lda "($02),y"]
[:isb "$4cb4,x"]]
```
## License
Copyright © 2020 Bobby Towers
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.