Skip to content

Commit 9abeaf7

Browse files
authored
Merge pull request #5 from craigthomas/super-chip8
Implement Super Chip 8 features.
2 parents 76bb4f2 + 9a02c06 commit 9abeaf7

File tree

14 files changed

+1843
-1300
lines changed

14 files changed

+1843
-1300
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ env:
44
before_install:
55
- "sh -e /etc/init.d/xvfb start"
66
after_success:
7-
- ./gradlew jacocoTestReport coveralls
7+
- bash <(curl -s https://codecov.io/bash)
88
sudo: false

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Yet Another Chip 8 Emulator
1+
# Yet Another (Super) Chip 8 Emulator
22

33
[![Build Status](https://travis-ci.org/craigthomas/Chip8Java.svg?branch=master)](https://travis-ci.org/craigthomas/Chip8Java)
4-
[![Coverage Status](http://coveralls.io/repos/craigthomas/Chip8Java/badge.svg?branch=master)](http://coveralls.io/r/craigthomas/Chip8Java?branch=master)
4+
[![Coverage Status](https://codecov.io/gh/craigthomas/Chip8Java/branch/master/graph/badge.svg)](https://codecov.io/gh/craigthomas/Chip8Java)
55
[![Dependency Status](https://www.versioneye.com/user/projects/55ef3f691e87ad001900006a/badge.svg?style=flat)](https://www.versioneye.com/user/projects/55ef3f691e87ad001900006a)
66

77
## What is it?
@@ -14,6 +14,11 @@ of the emulator written in different languages:
1414

1515
The original goal of these projects was to learn how to code a simple emulator.
1616

17+
In addition to supporting Chip 8 ROMs, the emulator also supports the Super Chip
18+
8 instruction set. Note that no additional configuration is needed to run a
19+
Super Chip 8 ROM - simply run the ROM the same way you would run a normal Chip
20+
8 ROM.
21+
1722

1823
## License
1924

@@ -45,19 +50,28 @@ The compiled Jar file will be placed in the `build/libs` directory.
4550

4651
## Running
4752

53+
### Running a ROM
54+
4855
The command-line interface currently requires a single argument, which
4956
is the full path to a Chip 8 ROM:
5057

5158
java -jar build/libs/emulator-1.0.jar /path/to/rom/filename
5259

53-
This will start the emulator with the specified ROM. The emulator also
54-
takes optional parameters. The `-s` switch will scale the size of the
55-
window (the original size at 1x scale is 64 x 32):
60+
This will start the emulator with the specified ROM.
61+
62+
### Screen Scale
63+
64+
The `-s` switch will scale the size of the window (the original size
65+
at 1x scale is 64 x 32):
5666

5767
java -jar build/libs/emulator-1.0.jar /path/to/rom/filename -s 10
5868

5969
The command above will scale the window so that it is 10 times the normal
60-
size. You may also wish to experiment with the `-d` switch, which instructs
70+
size.
71+
72+
### Execution Delay
73+
74+
You may also wish to experiment with the `-d` switch, which instructs
6175
the emulator to add a delay to every operation that is executed. For example,
6276

6377
java -jar build/libs/emulator-1.0.jar /path/to/rom/filename -d 10
@@ -68,7 +82,9 @@ information regarding opcode execution times, as such, I have not attempted
6882
any fancy timing mechanisms to ensure that instructions are executed in a
6983
set amount of time).
7084

71-
Finally, you can also ask the emulator to start in debug mode, where each
85+
### Debug Mode
86+
87+
You can also ask the emulator to start in debug mode, where each
7288
instruction is disassembled and displayed in the bottom left hand corner
7389
of the screen on a semi-transparent overlay. To do this:
7490

@@ -141,24 +157,6 @@ it to continue executing instructions as normal.
141157
Step mode can also be accessed by clicking on `CPU`->`Step Mode`.
142158

143159

144-
## Current Status - March 21, 2015
145-
146-
### Operational
147-
148-
- CPU fully implemented and debugged.
149-
- The emulator can load a ROM file and parse options.
150-
- The screen will be properly drawn.
151-
- Keyboard input works.
152-
- Delay timer works.
153-
- Sound timer works.
154-
- CPU menu system (reset, trace, and step).
155-
- CPU runs in a separate thread.
156-
- Screen redraws and keyboard polling run in a separate thread.
157-
- File menu options (load, quit).
158-
- CPU delay implemented to slow down execution to something reasonable.
159-
- Emulator properly requests focus when initially drawn.
160-
- Sound (via Midi playback).
161-
162160
## Third Party Licenses and Attributions
163161

164162
### Apache Commons CLI

build.gradle

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
apply plugin: 'java'
22
apply plugin: 'jacoco'
3-
apply plugin: 'com.github.kt3k.coveralls'
4-
apply plugin: 'eclipse'
3+
apply plugin: 'application'
4+
apply plugin: 'com.github.johnrengelman.shadow'
5+
6+
mainClassName = 'com.chip8java.emulator.Runner'
57

68
group = 'com.chip8java'
79
version = '1.0'
@@ -24,11 +26,12 @@ dependencies {
2426

2527
buildscript {
2628
repositories {
29+
jcenter()
2730
mavenCentral()
2831
}
2932

3033
dependencies {
31-
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
34+
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.0'
3235
}
3336
}
3437

@@ -55,21 +58,12 @@ sourceSets {
5558
}
5659
}
5760

58-
jar {
59-
manifest {
60-
attributes 'Main-Class': 'com.chip8java.emulator.Runner'
61-
}
62-
63-
doFirst {
64-
from (configurations.runtime.resolve().collect { it.isDirectory() ? it : zipTree(it) }) {
65-
exclude 'META-INF/MANIFEST.MF'
66-
exclude 'META-INF/*.SF'
67-
exclude 'META-INF/*.DSA'
68-
exclude 'META-INF/*.RSA'
69-
}
70-
}
71-
}
72-
7361
task wrapper(type: Wrapper) {
7462
gradleVersion = '3.5'
7563
}
64+
65+
task stage {
66+
dependsOn shadowJar
67+
}
68+
69+
check.dependsOn jacocoTestReport

0 commit comments

Comments
 (0)