Coder Social home page Coder Social logo

chipper's Introduction

lol wut hehe

chipper's People

Contributors

mattcan avatar

Watchers

 avatar  avatar

chipper's Issues

Get PONG to run

Instructions and number of times they are called. Completed ones are crossed out.

  • 0nnn: 1

  • 00EE: 1

  • 1nnn: 12

  • 2nnn: 3

  • 3xkk: 7

  • 4xkk: 7

  • 6xkk: 34

  • 7xkk: 10

  • 8xy0: 6

  • 8xy2: 4

  • 8xy4: 3

  • 8xy5: 5

  • Annn: 5

  • Cxkk: 1

  • Dxyn: 11

  • ExA1: 4

  • Fx07: 1

  • Fx15: 1

  • Fx18: 2

  • Fx29: 2

  • Fx33: 1

  • Fx65: 1

  • Handle input (Issue #2)

  • Make display do display things

Create a CLI display

Expected Behavior

When running the VM in a console, a simple display should be running to show the output the program is producing

Possible Solution

Something like node-drawille but compatible with GPL I guess

Context

Currently can't see any output from the programs.

Implement instructions in 0xC000

Expected Behavior

Instructions in 0xC000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Implement remaining instructions in 0x8000

Expected Behavior

Instructions in 0x8000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Instructions

  • 8xy1 OR Vx, Vy - Set Vx = Vx OR Vy.

    Performs a bitwise OR on the values of Vx and Vy, then stores the result in Vx. A bitwise OR compares the corrseponding bits from two values, and if either bit is 1, then the same bit in the result is also 1. Otherwise, it is 0.

  • 8xy3 XOR Vx, Vy - Set Vx = Vx XOR Vy.

    Performs a bitwise exclusive OR on the values of Vx and Vy, then stores the result in Vx. An exclusive OR compares the corrseponding bits from two values, and if the bits are not both the same, then the corresponding bit in the result is set to 1. Otherwise, it is 0.

  • 8xy6 SHR Vx {, Vy} - Set Vx = Vx SHR 1.

    If the least-significant bit of Vx is 1, then VF is set to 1, otherwise 0. Then Vx is divided by 2.

  • 8xy7 SUBN Vx, Vy - Set Vx = Vy - Vx, set VF = NOT borrow.

    If Vy > Vx, then VF is set to 1, otherwise 0. Then Vx is subtracted from Vy, and the results stored in Vx.

  • 8xyE SHL Vx {, Vy} - Set Vx = Vx SHL 1.

    If the most-significant bit of Vx is 1, then VF is set to 1, otherwise to 0. Then Vx is multiplied by 2.

Implement instructions in 0x0000

Expected Behavior

Instructions in 0x0000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Instructions

00E0 - CLS - Clear the display.

Reference: CowGod

00EE - RET - Return from a subroutine.

The interpreter sets the program counter to the address at the top of the stack, then subtracts 1 from the stack pointer.

Reference: CowGod

Implement instructions in 0xB000

Expected Behavior

Instructions in 0xB000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Handle input

Expected Behavior

Able to handle input as referenced in CowGod

Current Behavior

Does not handle input

Instructions in the 0x8000 opcode

Expected Behavior

Instructions in 0x8000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Instructions

  • 8xy0 LD Vx, Vy - Set Vx = Vy.

    Stores the value of register Vy in register Vx.

  • 8xy2 AND Vx, Vy - Set Vx = Vx AND Vy.

    Performs a bitwise AND on the values of Vx and Vy, then stores the result in Vx. A bitwise AND compares the corrseponding bits from two values, and if both bits are 1, then the same bit in the result is also 1. Otherwise, it is 0.

  • 8xy4 ADD Vx, Vy - Set Vx = Vx + Vy, set VF = carry.

    The values of Vx and Vy are added together. If the result is greater than 8 bits (i.e., > 255,) VF is set to 1, otherwise 0. Only the lowest 8 bits of the result are kept, and stored in Vx.

  • 8xy5 SUB Vx, Vy - Set Vx = Vx - Vy, set VF = NOT borrow.

    If Vx > Vy, then VF is set to 1, otherwise 0. Then Vy is subtracted from Vx, and the results stored in Vx.

Implement instructions in 0xD000

Expected Behavior

Instructions in 0xD000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Implement issues in 0xA000

Expected Behavior

Instructions in 0xA000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Implement instructions in 0xE000

Expected Behavior

Instructions in 0xE000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Implement instructions 0xF000

Expected Behavior

Instructions in 0xF000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Instructions

  • Fx07 LD Vx, DT - Set Vx = delay timer value.

    The value of DT is placed into Vx.

  • Fx15 LD DT, Vx - Set delay timer = Vx.

    DT is set equal to the value of Vx.

  • Fx18 LD ST, Vx - Set sound timer = Vx.

    ST is set equal to the value of Vx.

  • Fx29 LD F, Vx - Set I = location of sprite for digit Vx.

    The value of I is set to the location for the hexadecimal sprite corresponding to the value of Vx. See section 2.4, Display, for more information on the Chip-8 hexadecimal font.

  • Fx33 LD B, Vx - Store BCD representation of Vx in memory locations I, I+1, and I+2.

    The interpreter takes the decimal value of Vx, and places the hundreds digit in memory at location in I, the tens digit at location I+1, and the ones digit at location I+2.

  • Fx65 LD Vx, [I] - Read registers V0 through Vx from memory starting at location I.

    The interpreter reads values from memory starting at location I into registers V0 through Vx.

Implement instructions in 0x9000

Expected Behavior

Instructions in 0x9000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Create an Electron app

Expected Behavior

Packaged application so that cross-platform is available, simpler sharing, and built in features like ROM selection and loading.

Current Behavior

Currently no display or easy way of running ROMs

Context

A CLI (as originally planned in #1) only application has a host of issues from various terminal emulators to simple cross platform support. Going with electron would allow simple cross platform, additional features like ROM selection and loading, simpler state saving, and prettier graphics.

Implement instructions in 0x1000

Expected Behavior

Instructions in the 0x1000 are run by the CPU and have effects on memory

Current Behavior

Prints out the instructions to the screen

Instructions

1NNN     Jump to address NNN

Full description: CowGod

Notes

  • This will include the initial setup of the CPU

Implement instructions in 0x2000

Expected Behavior

Instructions in 0x2000 are run by the CPU and affect memory.

Current Behavior

Nothing, nothing! Actually instruction prints to screen

Instructions

2NNN     Call subroutine at nnn.

Full description: CowGod

Implement instructions in 0x4000

Expected Behavior

Instructions in 0x4000 are run by the CPU and affect memory

Current Behavior

Instruction is printed to the screen

Instructions

4xkk - SNE Vx, byte - Skip next instruction if Vx != kk.

Full details: CowGod

Implement instructions in 0x5000

Expected Behavior

Instructions in 0x5000 are run by CPU and affect memory

Current Behavior

Instruction prints to the screen

Instruction

5xy0 - SE Vx, Vy - Skip next instruction if Vx = Vy.

Reference: CowGod

Implement instructions in 0x3000

Expected Behavior

Instructions in 0x3000 are run by the CPU and affect memory

Current Behavior

Instruction prints to the screen

Instructions

3xkk - SE Vx, byte

Skip next instruction if Vx = kk.

Full description: CowGod

Load value into given register

Expected Behavior

Able to fill a register with a value

Current Behavior

Stare longingly at registers hoping they do something

Instructions

6xkk - LD Vx, byte - Set Vx = kk

Reference: CowGod

Make display do display things

Expected Behavior

Each loop renders the display accurately

Current Behavior

Nothing at all

Possible Solution

Not going to be easy as blessedjs uses percentages but I want to use pixels.

Implement instructions in 0x7000

Expected Behavior

Instructions in 0x7000 are run by CPU and have some effect

Current Behavior

Instruction is printed to screen

Instructions

7xkk - ADD Vx, byte - Set Vx = Vx + kk

Reference: CowGod

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.