Git Product home page Git Product logo

chip8's People

Contributors

japanoise avatar oshaboy avatar raphgl avatar wernsey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chip8's Issues

Possible bug related to scroll left and scroll right

Hey! I think there's an inaccuracy in the implementations of scroll left (00FC) and scroll right (00FB). In scroll right there's a left shift and in scroll left there's a right shift, it should be the other way around if I'm not mistaken.

Here's a link to a possible solution, if you find it acceptable I can make a pull request.

Assembler not assembling correctly

I was testing this software out (the emulator, assembler and disassembler) and everything worked perfectly fine
until I tried to assemble a very simple program that I made which didn't work on other emulators but it did work on this emulator. I looked into it and I think I found the reason why on some emulators the assembled program doesn't work.

Well let's take a look at the program with which I noticed this issue:

start:
        cls
        ld V0, #0
        ld V1, #1
        ld V2, #2
        ld V3, #3
        ld V4, #4
        ld V5, #5
        ld V6, #5
        ld V7, #7
        ld V8, #8
        ld V9, #9
        ld VA, #a
        ld VB, #b
        ld VC, #c
        ld VD, #d
        ld VE, #e
        JP start

This program should work right? Well it does on this emulator but not on many others. Lets take a look at the assembled a.ch8 file that the assembler produces:

00000000  00 e0 60 00 61 01 62 02  63 03 64 04 65 05 66 05
00000010  67 07 68 08 69 09 6a 0a  6b 0b 6c 0c 6d 0d 6e 0e
00000020  12

(hexdump -C a.ch8 should produce the same result)

The last byte is 0x12 and as we know the opcode 1nnn is the jump (JP) opcode but on this executable it is never "completed" i.e. it's not 1200 it is 12 which is why some emulators/interpreters may interpret this as an unknown opcode or something like that.

Now to prove that that is the case I modified the original test program by adding these 2 lines:

JP start
offset #201

This means that the program doesn't start at 200 but 201, doing this caused the hexdump of the a.ch8 file to be this:

00000000  12 01 e0 60 00 61 01 62  02 63 03 64 04 65 05 66
00000010  05 67 07 68 08 69 09 6a  0a 6b 0b 6c 0c 6d 0d 6e 
00000020  0e 12 01              

Now as we can see at the end the program jumps to 0x201 where as previously it jumped to the address 0x2
And now this program works on all emulators.

Is this a bug or is this something that has been implemented on purpose?

PONG rom

The right side player's score does not increment when they get a point. I've tested the game on another emulator to verify that the problem does not lie in the rom itself.

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.