GithubHelp home page GithubHelp logo

weimingtom / game-boy-opcodes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lmmendes/game-boy-opcodes

0.0 0.0 0.0 40 KB

Game Boy CPU (Sharp LR35902) instruction set (opcodes)

Home Page: https://gb.insertcoin.dev

License: MIT License

Ruby 100.00%

game-boy-opcodes's Introduction

Game Boy Opcodes

Game Boy CPU (Sharp LR35902) instruction set (opcodes)

The opcodes.json contains a JSON representation of the complete Sharp LR35902 instruction set. Inside the bin folder you will find the script used to generate the opcodes.json file from the pastraiser.com site.

Description of opcodes.json

The opcodes.json file includes some minor fixes in the opcode length and timings not present on the pastraiser.com site.

{
  "unprefixed": {
    "0xc0": {                 <-- Address
      "mnemonic": "SET",      <-- Instruction mnemonic
      "length": 2,            <-- Length in bytes
      "cycles": [             <-- Duration in cycles
        8
      ],
      "flags": [              <-- Flags affected
        "-",                  <-- Z - Zero Flag
        "-",                  <-- N - Subtract Flag
        "-",                  <-- H - Half Carry Flag
        "-"                   <-- C - Carry Flag
      ],
      "addr": "0xc0",         <-- Address
      "group": "control/misc" <-- Opcode group
      "operand1": "0",        <-- Operand 1
      "operand2": "B"         <-- Operand 2
    },
    ...
  },
  ...
}

Operation group table:

op group description
x8/lsm 8-bit Load/Store/Move
x16/lsm 16-bit Load/Store/Move
x8/alu 8-bit Arithmetic Logic Unit
x16/alu 16-bit Arithmetic Logic Unit
x8/rsb 8-bit ???
control/br branch
control/misc misc

Reference documentation

http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lmmendes/game-boy-opcodes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The code is available as open source under the terms of the MIT License.

game-boy-opcodes's People

Contributors

lmmendes avatar qrvd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.