craigthomas / chip8python Goto Github PK
View Code? Open in Web Editor NEWA Super Chip 8 emulator written in Python
License: MIT License
A Super Chip 8 emulator written in Python
License: MIT License
Thank you for checking out my Super Chip 8 Python project! This repository contains an emulator for a computer called the Chip 8. Technically the Chip 8 isn't actually a computer, but rather a language specification that was meant to run on different computers from the '70s and '80s. Most famously, it's been used to run games on HP graphing calculators.
The emulator is complete and runs on Windows, Linux, Mac, and UNIX computers. However, I need help with testing. There are a number of Chip 8 and Super Chip 8 ROMs that exist in the public domain that anyone can freely download and use (just Google chip8 public domain roms
). I need your help testing those ROMs on the emulator to see if there are any problems.
Here's how you can help with testing, and contribute a pull request to the repository for Hacktoberfest 2019!
In order to run the emulator, you will need a copy of Python 2.7. See the README.md file for more information on how to install Python.
Here are the steps you will need to test out the emulator.
git
installed. Type git clone [email protected]:craigthomas/Chip8Python.git
to clone the project (see the README.md file for more information).ROM Compatibility
section of the README.md
file.If your testing is successful, that's great! It's time to document the README.md
file with your success. Here is where you can make a pull request to count towards your Hacktoberfest 2019 progress! Here are the steps you will need to do this:
Fork this project. You can do this by pressing the Fork
button at the top right-hand side of the repository. This will create a copy of the project in your own Github account that you can use to make the change.
Update the README.md file in your repository. This can be done easily by clicking on the README.md
file in your repository, and then clicking the Edit this file
button along the top navigation bar (it looks like a pencil).
Update the section called ROM Compatibility. In the README.md
file, there is a section called ROM Compatibility
. Add a new line to that section with the ROM name, and a green check-mark:
| (ROM name here) | :heavy_check_mark: | |
Commit your changes to your forked repository. At the bottom of the editor, there will be a section called Commit changes
. Add a title for the commit, and a description of what you did. To save time, you can commit directly to the master
branch.
Create a Pull Request. From your repository, click on the button labeled New pull request
from the Code
tab. By default, this should initiate a pull request from your repository back to the Chip8Python codebase. Make sure you provide a good working title and a good description of what you tested.
That's it! I'll look at your pull request and let you know if there is anything missing. If everything looks good, your change will be merged into the master file. Thank you for helping out!
If the ROM file doesn't work, that's okay! Your testing work is very valuable, and you can still create a pull request to count towards Hacktoberfest 2019! Follow the same procedure as listed above in the If the ROM works... section, but for step 3, change the line that you add to the README.md
file that describes what isn't working:
| (ROM name here) | :x: | (Describe what is wrong) |
Follow the rest of the procedure to create a pull request so that the README.md
file is updated with the results of your testing. Thank you for helping out!
If your testing revealed a bug, and you can fix the bug, then please feel free to do so! I welcome any code contributions you feel are helpful and reflect the spirit of the project. To make a code change, simply fork the project, make the changes in your own repository, and then submit a pull request back to the main project repository. Make sure to include a descriptive title and well-documented pull request body that explains the changes that you made and why. Ensure that the automated tests complete successfully, and try to have a unit test or two that covers the bug condition. Thank you for helping out!
Thank you for checking out my Super Chip 8 Python project! This repository contains an emulator for a computer called the Chip 8. Technically the Chip 8 isn't actually a computer, but rather an interpreted computer language that was meant to run on different computers from the 1970's and 1980's. Most famously, it's been used to run games on HP graphing calculators.
The emulator in this project is complete and runs on Windows, Linux, Mac, and UNIX computers. However, I need help with testing! There are a number of Chip 8 and Super Chip 8 ROMs that exist in the public domain that anyone can freely download and use (just Google keywords chip8 public domain roms
to find them). I need your help testing those ROMs on the emulator to see if there are any problems. I also need your help to document which keys on the emulator do what when you run the ROM.
Here's how you can help with testing, and contribute a pull request to the repository for Hacktoberfest 2022!
In order to run the emulator, you will need a copy of Python 3.6.8 or newer. See the README.md file for more information on how to install Python and set up your environment to run the emulator.
Also, please check out the project's Code of Conduct to learn more about the standards and values we have for community members.
Here are the steps you will need to test out the emulator.
git
installed. Type git clone [email protected]:craigthomas/Chip8Python.git
to clone the project (see the README.md file for more information).ROM Compatibility
section of the README.md
file.If your testing is successful, that's great! It's time to document the README.md
file with your success. Here is where you can make a pull request to count towards your Hacktoberfest 2022 progress! Here are the steps you will need to do this:
Fork this project. You can do this by pressing the Fork
button at the top right-hand side of the repository. This will create a copy of the project in your own Github account that you can use to make the change.
Update the README.md file in your repository. This can be done easily by clicking on the README.md
file in your repository, and then clicking the Edit this file
button along the top navigation bar (it looks like a pencil).
Update the section called ROM Compatibility. In the README.md
file, there is a section called ROM Compatibility
. Add a new line to that section with the ROM name, a green check-mark, and notes about what keys work and what the keypress does when the ROM is running:
| (ROM name here) | :heavy_check_mark: | (notes about what keys work) |
Commit your changes to your forked repository. At the bottom of the editor, there will be a section called Commit changes
. Add a title for the commit, and a description of what you did. To save time, you can commit directly to the main
branch.
Create a Pull Request. From your repository, click on the button labeled New pull request
from the Code
tab. By default, this should initiate a pull request from your repository back to the Chip8Python codebase. Make sure you provide a good working title and a good description of what you tested.
That's it! I'll look at your pull request and let you know if there is anything missing. If everything looks good, your change will be merged. Thank you for helping out!
If the ROM file doesn't work, that's okay! Your testing work is very valuable, and you can still create a pull request to count towards Hacktoberfest 2022! Follow the same procedure as listed above in the If the ROM works... section, but for step 3, change the line that you add to the README.md
file to describe what isn't working:
| (ROM name here) | :x: | (Describe what is wrong) |
Follow the rest of the procedure to create a pull request so that the README.md
file is updated with the results of your testing. If everything looks good, your change will be merged. Thank you for helping out!
Optional - you can also submit a bug report to the project that describes what is wrong. This will help another contributor fix the problem. Go to the Issues section of the repository, and next to Bug report
, click on the Get started
button. Fill out the template provided with details on what is wrong and how you can reproduce the bug. Thank you for submitting a bug report!
If your testing revealed a bug, and you can fix the bug, then please feel free to do so! I welcome code contributions you feel are helpful and reflect the spirit of the project. To make a code change, simply fork the project, make the changes in your own repository, and then submit a pull request back to the main project repository. Make sure to include a descriptive title and well-documented pull request body that explains the changes that you made and why. Ensure that the automated tests complete successfully, and try to have a unit test or two that covers the bug condition. Please check out the Contributing documentation for more information on making code contributions. Thank you for helping out!
Hi, as described in documentation http://devernay.free.fr/hacks/chip8/C8TECH10.HTM#00EE
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.
but in your implementation
def right_shift_reg(self):
"""
8st6 - SHR Vs, Vt
Shift the bits in the source register 1 bit to the right and
stores the result in the target register, leaving source
with its original value. Bit 0 will be shifted into register
vf. The register calculation is as follows:
Bits: 15-12 11-8 7-4 3-0
unused source target 6
"""
source = (self.operand & 0x0F00) >> 8
target = (self.operand & 0x00F0) >> 4
bit_zero = self.registers['v'][source] & 0x1
self.registers['v'][target] = self.registers['v'][source] >> 1
self.registers['v'][0xF] = bit_zero
you store the shifted source register Vx value into Vy(target)
correct me if i'm wrong. should it be like
self.registers['v'][source] = self.registers['v'][source] >> 1
?
And one more question
From same docs:
Bnnn - JP V0, addr
Jump to location nnn + V0.
The program counter is set to nnn plus the value of V0.
In your implementation you used index register
def jump_to_index_plus_value(self):
"""
Bnnn - JUMP [I] + nnn
Load the program counter with the memory value located at the specified
operand plus the value of the index register. The address calculation
is based on the operand, masked as follows:
Bits: 15-12 11-8 7-4 3-0
unused address address address
"""
self.registers['pc'] = self.registers['index'] + (self.operand & 0x0FFF)
Docs says it should be v0 register. Is index register v0?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.