Compare commits

..

20 Commits

Author SHA1 Message Date
0695c23a78 move raylib rs to ack 2026-01-31 19:30:02 -06:00
c3df8672c8 update built with to include raylib rust bindings 2026-01-31 19:28:01 -06:00
47cce19940 acknowledge chip8 archive 2026-01-31 16:43:34 -06:00
d8b3bcae19 fix formatting and spelling issues 2026-01-31 16:40:34 -06:00
7ede5aeafa add program aquasition info 2026-01-31 16:38:26 -06:00
08a2ec4459 fix license URL 2026-01-31 16:26:41 -06:00
58901521e5 readme license shield 2026-01-31 16:25:35 -06:00
fed6762288 more readme changes 2026-01-31 16:20:56 -06:00
342eb4557d Merge branch 'main' of git:/jlanders/chip8-em 2026-01-31 16:07:47 -06:00
63fe937481 maybe it's fixed now :) 2026-01-31 16:07:35 -06:00
73422b4072 maybe it's fixed now :) 2026-01-31 16:06:50 -06:00
efba92b8c7 Merge branch 'main' of git:/jlanders/chip8-em 2026-01-31 16:05:24 -06:00
25c6d9beaa fix screenshot readme 2026-01-31 16:05:06 -06:00
38ec89813d fix screenshot readme 2026-01-31 16:04:39 -06:00
596e60abeb Merge branch 'main' of git:/jlanders/chip8-em 2026-01-31 16:04:18 -06:00
ad50485d37 Merge branch 'main' of git:/jlanders/chip8-em 2026-01-31 16:03:53 -06:00
ce5ff7ee24 Merge branch 'main' of git:/jlanders/chip8-em 2026-01-31 16:03:14 -06:00
124493fd11 pushing readme changes to view 2026-01-31 16:02:42 -06:00
0ff0b6c596 pushing readme changes to view 2026-01-31 16:00:54 -06:00
253095bc6d logic changed after changing to assert 2026-01-31 15:37:11 -06:00
2 changed files with 75 additions and 94 deletions

167
README.md
View File

@@ -1,12 +1,4 @@
<!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->
<a id="readme-top"></a>
<!--
*** Thanks for checking out the Best-README-Template. If you have a suggestion
*** that would make this better, please fork the repo and create a pull request
*** or simply open an issue with the tag "enhancement".
*** Don't forget to give the project a star!
*** Thanks again! Now go create something AMAZING! :D
-->
@@ -18,29 +10,25 @@
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->
[![project_license][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![MIT][license-shield]][license-url]
<!-- [![LinkedIn][linkedin-shield]][linkedin-url] -->
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/github_username/repo_name">
<!-- <a href="https://git.colelanders.dev/jlanders/chip8-em">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a>
</a> -->
<h3 align="center">Chip8 Emulator</h3>
<p align="center">
Chip8 Emulator built in Rust.
<br />
<a href="https://git.colelanders.dev/jlanders/chip8-em"><strong>Explore the docs »</strong></a>
<!-- <a href="https://git.colelanders.dev/jlanders/chip8-em"><strong>Explore the docs »</strong></a>
<br /> -->
<br />
<br />
<a href="https://github.com/github_username/repo_name">View Demo</a>
&middot;
<a href="https://github.com/github_username/repo_name/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
&middot;
<a href="https://github.com/github_username/repo_name/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
<a href="https://git.colelanders.dev/jlanders/chip8-em">View Demo</a>
</p>
</div>
@@ -53,7 +41,7 @@
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With Rust</a></li>
<li><a href="#built-with">Built With</a></li>
</ul>
</li>
<li>
@@ -61,6 +49,7 @@
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#running">Running</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
@@ -77,74 +66,78 @@
<!-- ABOUT THE PROJECT -->
## About The Project
[![Product Name Screen Shot][product-screenshot]](https://example.com)
Here's a blank template to get started. To avoid retyping too much info, do a search and replace with your text editor for the following: `github_username`, `repo_name`, `twitter_handle`, `linkedin_username`, `email_client`, `email`, `project_title`, `project_description`, `project_license`
![Chip8 Emulator Screen Shot][product-screenshot]
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### Built With
* [![Next][Next.js]][Next-url]
* [![React][React.js]][React-url]
* [![Vue][Vue.js]][Vue-url]
* [![Angular][Angular.io]][Angular-url]
* [![Svelte][Svelte.dev]][Svelte-url]
* [![Laravel][Laravel.com]][Laravel-url]
* [![Bootstrap][Bootstrap.com]][Bootstrap-url]
* [![JQuery][JQuery.com]][JQuery-url]
* [![Rust][Rust]][Rust-url]
* [![Raylib][Raylib]][Raylib-url]
* [![Clap][Clap]][Clap-url]
* [![Rodio][Rodio]][Rodio-url]
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- GETTING STARTED -->
## Getting Started
This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.
You can find pre-built binaries for Windows/MacOS/Linux -> [releases](https://git.colelanders.dev/jlanders/chip8-em/releases)
To run the code get a local copy up and running follow these simple example steps.
### Prerequisites
This is an example of how to list things you need to use the software and how to install them.
* npm
```sh
* rust - Follow the official install guide [here](https://rust-lang.org/tools/install/)
<!-- ```sh
npm install npm@latest -g
```
``` -->
### Installation
1. Get a free API Key at [https://example.com](https://example.com)
2. Clone the repo
1. Clone the repo
```sh
git clone https://github.com/github_username/repo_name.git
git clone https://git.colelanders.dev/jlanders/chip8-em.git
```
3. Install NPM packages
2. Navigate to the repo directory
```sh
npm install
cd chip8-em
```
4. Enter your API in `config.js`
```js
const API_KEY = 'ENTER YOUR API';
```
5. Change git remote url to avoid accidental pushes to base project
3. Build the project
```sh
git remote set-url origin github_username/repo_name
git remote -v # confirm the changes
cargo build
```
### Running
Choose the method that best fits your needs. If you just want to use the emulator, I recommend using the **Pre-built Binaries**.
#### Prerequisite - Obtaining a Chip8 Rom
*Note - as of now the project only supports chip8 programs. Chip8 extensions such as SUPER-Chip or XO-Chip will not work with v1*
This emulator requires you either:
* Create your own ROM using a tool like [Octo](https://johnearnest.github.io/Octo/)
* Download a ROM made by the community
* Navigate to [johnearnest.github.io/chip8Archive/](https://johnearnest.github.io/chip8Archive/?sort=platform)
* Select a chip8 ROM that seems interesting
* Click "Download Rom"
#### 🚀 Option 1: Pre-built Binaries (Fastest)
**WIP**
#### 🛠️ Option 2: Built Locally (From Source)
**WIP**
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- USAGE EXAMPLES -->
## Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
**WIP**
_For more examples, please refer to the [Documentation](https://example.com)_
<!-- Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources. -->
<!-- _For more examples, please refer to the [Documentation](https://example.com)_ -->
<p align="right">(<a href="#readme-top">back to top</a>)</p>
@@ -153,40 +146,19 @@ _For more examples, please refer to the [Documentation](https://example.com)_
<!-- ROADMAP -->
## Roadmap
- [ ] Feature 1
- [ ] Feature 2
- [ ] Feature 3
- [ ] Nested Feature
See the [open issues](https://github.com/github_username/repo_name/issues) for a full list of proposed features (and known issues).
- [ ] Super-Chip8 extension
- [ ] XO-CHIP extension
- [ ] More Configuration
- [ ] Window Resizing
- [ ] Allow rebinding keys via GUI
- [ ] Replacing default sound via GUI
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- CONTRIBUTING -->
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### Top contributors:
<a href="https://github.com/github_username/repo_name/graphs/contributors">
<img src="https://contrib.rocks/image?repo=github_username/repo_name" alt="contrib.rocks image" />
</a>
Since this is a personal project, this specific repo is not open for contributions. However, please feel free to clone the project and use it as you wish!
<!-- LICENSE -->
## License
@@ -202,7 +174,7 @@ Distributed under the MIT License. See `LICENSE` for more information.
Cole Landers - jclanders@pm.me
Project Link: [https://github.com/github_username/repo_name](https://github.com/github_username/repo_name)
Project Link: [https://git.colelanders.dev/jlanders/chip8-em](https://git.colelanders.dev/jlanders/chip8-em)
<p align="right">(<a href="#readme-top">back to top</a>)</p>
@@ -211,9 +183,8 @@ Project Link: [https://github.com/github_username/repo_name](https://github.com/
<!-- ACKNOWLEDGMENTS -->
## Acknowledgments
* []()
* []()
* []()
* [raylib-rs](https://github.com/raylib-rs/raylib-rs) - For raylib rust bindings
* [John Earnest Chip8 Archive](https://github.com/JohnEarnest/chip8Archive) - For amazing tools and support of the Chip8 ecosystem
<p align="right">(<a href="#readme-top">back to top</a>)</p>
@@ -222,11 +193,21 @@ Project Link: [https://github.com/github_username/repo_name](https://github.com/
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
<!-- [license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge
[license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt
[license-url]: https://git.colelanders.dev/jlanders/chip8-em/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/linkedin_username
[product-screenshot]: images/screenshot.png -->
[linkedin-url]: https://linkedin.com/in/linkedin_username-->
[license-shield]: https://img.shields.io/badge/license-MIT-blue
[license-url]: https://git.colelanders.dev/jlanders/chip8-em/src/branch/main/LICENSE
[product-screenshot]: images/screenshot.png
<!-- Shields.io badges. You can a comprehensive list with many more badges at: https://github.com/inttter/md-badges -->
<!-- [Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white -->
<!-- [Next-url]: https://nextjs.org/ -->
[Rust]: https://img.shields.io/badge/rust-%23E32F26.svg?style=for-the-badge&logo=rust&logoColor=white
[Rust-url]: https://www.rust-lang.org/
[Raylib]: https://img.shields.io/badge/raylib-white?style=for-the-badge&logo=target&logoColor=black
[Raylib-url]: https://www.raylib.com/
[Clap]: https://img.shields.io/badge/clap-blue?style=for-the-badge&logo=command-line&logoColor=white
[Clap-url]: https://github.com/clap-rs/clap
[Rodio]: https://img.shields.io/badge/rodio-orange?style=for-the-badge&logo=audio-bus&logoColor=white
[Rodio-url]: https://github.com/RustAudio/rodio

View File

@@ -11,7 +11,7 @@ pub fn read_n_bytes(
let mut bytes = Vec::new();
while addr != start_addr + n_bytes {
assert!(
addr >= buffer_len,
addr < buffer_len,
"Couldn't read from Address {addr} exceeds buffer length {buffer_len}"
);
bytes.push(buffer[addr]);