Skip to content

Commit de1ca9c

Browse files
committed
Auto-format README file
1 parent 6e9ab27 commit de1ca9c

File tree

1 file changed

+97
-97
lines changed

1 file changed

+97
-97
lines changed

README.md

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ CHIP-8, SUPER-CHIP or XO-CHIP interpreter (or "emulator")_
77

88
## Table of contents
99

10-
* [Introduction](#introduction)
11-
* [Baseline](#baseline)
12-
* [Available tests](#available-tests)
13-
* [CHIP-8 splash screen](#chip-8-splash-screen)
14-
* [IBM logo](#ibm-logo)
15-
* [Corax+ opcode test](#corax-opcode-test)
16-
* [Flags test](#flags-test)
17-
* [Quirks test](#quirks-test)
18-
* [Keypad test](#keypad-test)
19-
* [Beep test](#beep-test)
20-
* [Scrolling test](#scrolling-test)
21-
* [Contributing](#contributing)
22-
* [Community response 😄](#community-response-)
10+
- [Introduction](#introduction)
11+
- [Baseline](#baseline)
12+
- [Available tests](#available-tests)
13+
- [CHIP-8 splash screen](#chip-8-splash-screen)
14+
- [IBM logo](#ibm-logo)
15+
- [Corax+ opcode test](#corax-opcode-test)
16+
- [Flags test](#flags-test)
17+
- [Quirks test](#quirks-test)
18+
- [Keypad test](#keypad-test)
19+
- [Beep test](#beep-test)
20+
- [Scrolling test](#scrolling-test)
21+
- [Contributing](#contributing)
22+
- [Community response 😄](#community-response-)
2323

2424
# Introduction
2525

@@ -74,9 +74,9 @@ gold standard for how an XO-CHIP system should behave, and test against that.
7474

7575
## CHIP-8 splash screen
7676

77-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/1-chip8-logo.ch8)
77+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/1-chip8-logo.ch8)
7878
(source code available [here](./src/tests/1-chip8-logo.8o))
79-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/1-chip8-logo.html)
79+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/1-chip8-logo.html)
8080
to see what's supposed to happen
8181

8282
The first test is a very simple splash screen. It is very similar to the often
@@ -91,21 +91,21 @@ to shift the bits of the sprite to align with the buffer.
9191
Run the ROM for 39 cycles to see this splash screen on the display. This first
9292
test can tell you if you're interpreting these opcodes properly:
9393

94-
* `00E0` - Clear the screen
95-
* `6xnn` - Load normal register with immediate value
96-
* `Annn` - Load index register with immediate value
97-
* `Dxyn` - Draw sprite to screen (only aligned)
94+
- `00E0` - Clear the screen
95+
- `6xnn` - Load normal register with immediate value
96+
- `Annn` - Load index register with immediate value
97+
- `Dxyn` - Draw sprite to screen (only aligned)
9898

9999
If you run the ROM for more than 39 cycles, it will enter an endless loop. If
100100
that also works as expected, you've also correctly interpreted the jump opcode:
101101

102-
* `1nnn` - Jump
102+
- `1nnn` - Jump
103103

104104
## IBM logo
105105

106-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/2-ibm-logo.ch8)
106+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/2-ibm-logo.ch8)
107107
(source code available [here](./src/tests/2-ibm-logo.8o))
108-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/2-ibm-logo.html)
108+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/2-ibm-logo.html)
109109
to see what's supposed to happen
110110

111111
The second test is the classic IBM ROM. If the splash screen works as expected,
@@ -122,23 +122,22 @@ original (except for the version number).
122122
Run the ROM for 20 cycles to see the IBM logo on the display. If you can see the
123123
IBM logo, you are properly interpreting these opcodes:
124124

125-
126-
* `00E0` - Clear the screen
127-
* `6xnn` - Load normal register with immediate value
128-
* `Annn` - Load index register with immediate value
129-
* `7xnn` - Add immediate value to normal register
130-
* `Dxyn` - Draw sprite to screen (un-aligned)
125+
- `00E0` - Clear the screen
126+
- `6xnn` - Load normal register with immediate value
127+
- `Annn` - Load index register with immediate value
128+
- `7xnn` - Add immediate value to normal register
129+
- `Dxyn` - Draw sprite to screen (un-aligned)
131130

132131
If you run the ROM for more than 20 cycles, it will enter an endless loop. If
133132
that also works as expected, you've also correctly interpreted the jump opcode:
134133

135-
* `1nnn` - Jump
134+
- `1nnn` - Jump
136135

137136
## Corax+ opcode test
138137

139-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/3-corax+.ch8)
138+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/3-corax+.ch8)
140139
(source code available [here](./src/tests/3-corax+.8o))
141-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/3-corax+.html)
140+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/3-corax+.html)
142141
to see what's supposed to happen
143142

144143
This ROM is an adaptation of another famous one, the [CHIP-8 test rom written by
@@ -173,29 +172,29 @@ If you see a cross you can be sure that you have an issue with that opcode.
173172

174173
Here's a rough description of what these opcodes should do to pass the tests:
175174

176-
* `3xnn` - if `vX == nn`, skip next opcode
177-
* `4xnn` - if `vX != nn`, skip next opcode
178-
* `5xy0` - if `vX == vY`, skip next opcode
179-
* `7xnn` - `vX += nn`
180-
* `9xy0` - if `vX != vY`, skip next opcode
181-
* `1nnn` - `jump nnn` (goto)
182-
* `2nnn` - `call nnn` (subroutine)
183-
* `00EE` - `return` from subroutine
184-
* `8xy0` - `vX = vY`
185-
* `8xy1` - `vX |= vY`
186-
* `8xy2` - `vX &= vY`
187-
* `8xy3` - `vX ^= vY`
188-
* `8xy4` - `vX += vY`
189-
* `8xy5` - `vX -= vY`
190-
* `8xy7` - `vX = vY - vX`
191-
* `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
192-
* `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
193-
* `Fx65` - load registers `v0` - `vX` from memory starting at `i`
194-
* `Fx55` - save registers `v0` - `vX` to memory starting at `i`
195-
* `Fx33` - store binary-coded decimal representation of `vX` to memory at `i`,
175+
- `3xnn` - if `vX == nn`, skip next opcode
176+
- `4xnn` - if `vX != nn`, skip next opcode
177+
- `5xy0` - if `vX == vY`, skip next opcode
178+
- `7xnn` - `vX += nn`
179+
- `9xy0` - if `vX != vY`, skip next opcode
180+
- `1nnn` - `jump nnn` (goto)
181+
- `2nnn` - `call nnn` (subroutine)
182+
- `00EE` - `return` from subroutine
183+
- `8xy0` - `vX = vY`
184+
- `8xy1` - `vX |= vY`
185+
- `8xy2` - `vX &= vY`
186+
- `8xy3` - `vX ^= vY`
187+
- `8xy4` - `vX += vY`
188+
- `8xy5` - `vX -= vY`
189+
- `8xy7` - `vX = vY - vX`
190+
- `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
191+
- `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
192+
- `Fx65` - load registers `v0` - `vX` from memory starting at `i`
193+
- `Fx55` - save registers `v0` - `vX` to memory starting at `i`
194+
- `Fx33` - store binary-coded decimal representation of `vX` to memory at `i`,
196195
`i + 1` and `i + 2`
197-
* `Fx1E` - `i += vX`
198-
* `Registers` - The `v0` - `vF` registers should be 8 bits wide. This tests to
196+
- `Fx1E` - `i += vX`
197+
- `Registers` - The `v0` - `vF` registers should be 8 bits wide. This tests to
199198
see if it can overflow your registers.
200199

201200
If you are having trouble figuring out how each opcode is supposed to behave,
@@ -205,9 +204,9 @@ guide](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/#instructions) or
205204

206205
## Flags test
207206

208-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/4-flags.ch8)
207+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/4-flags.ch8)
209208
(source code available [here](./src/tests/4-flags.8o))
210-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/4-flags.html)
209+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/4-flags.html)
211210
to see what's supposed to happen
212211

213212
This test checks to see if your math operations function properly on some given
@@ -242,14 +241,14 @@ HAPPY 8xy1 8xy2
242241
8xy6 8xy7 8xyE
243242
```
244243

245-
* `8xy1` - `vX |= vY`
246-
* `8xy2` - `vX &= vY`
247-
* `8xy3` - `vX ^= vY`
248-
* `8xy4` - `vX += vY`
249-
* `8xy5` - `vX -= vY`
250-
* `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
251-
* `8xy7` - `vX = vY - vX`
252-
* `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
244+
- `8xy1` - `vX |= vY`
245+
- `8xy2` - `vX &= vY`
246+
- `8xy3` - `vX ^= vY`
247+
- `8xy4` - `vX += vY`
248+
- `8xy5` - `vX -= vY`
249+
- `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
250+
- `8xy7` - `vX = vY - vX`
251+
- `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
253252

254253
The bottom part (that starts with "CARRY") checks behaviour of the following
255254
opcodes, in the case that there **is** an overflow, carry or shifted out bit:
@@ -259,11 +258,11 @@ CARRY 8xy4 8xy5
259258
8xy6 8xy7 8xyE
260259
```
261260

262-
* `8xy4` - `vX += vY`
263-
* `8xy5` - `vX -= vY`
264-
* `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
265-
* `8xy7` - `vX = vY - vX`
266-
* `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
261+
- `8xy4` - `vX += vY`
262+
- `8xy5` - `vX -= vY`
263+
- `8xy6` - `vX = vY >> 1` or `vX = vX >> 1` depending on quirks
264+
- `8xy7` - `vX = vY - vX`
265+
- `8xyE` - `vX = vY << 1` or `vX = vX << 1` depending on quirks
267266

268267
The last row (that starts with "OTHER") checks that the opcode `Fx1E` (`i +=
269268
vX`) properly adds the value of register `vX` to the index register, first for a
@@ -278,9 +277,9 @@ for more information on the arithmetic operations and the flags.
278277

279278
## Quirks test
280279

281-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/5-quirks.ch8)
280+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/5-quirks.ch8)
282281
(source code available [here](./src/tests/5-quirks.8o))
283-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/5-quirks.html)
282+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/5-quirks.html)
284283
to see what's supposed to happen
285284

286285
CHIP-8, SUPER-CHIP and XO-CHIP have subtle differences in the way they interpret
@@ -310,10 +309,10 @@ graphical menu just gets in the way. In that case, you can force this ROM to
310309
select a specific platform by loading a value between `1` and `4` into memory at
311310
the address `0x1FF` (`512`).
312311

313-
* `1` - CHIP-8
314-
* `2` - SUPER-CHIP with modern behaviour
315-
* `3` - XO-CHIP
316-
* `4` - SUPER-CHIP with legacy behaviour
312+
- `1` - CHIP-8
313+
- `2` - SUPER-CHIP with modern behaviour
314+
- `3` - XO-CHIP
315+
- `4` - SUPER-CHIP with legacy behaviour
317316

318317
### The test
319318

@@ -327,19 +326,19 @@ The screen shows you if the following quirks are detected as active ("on", "off"
327326
or an error) and if that matches your chosen target platform (a checkmark or a
328327
cross).
329328

330-
* `vF reset` - The AND, OR and XOR opcodes (`8xy1`, `8xy2` and `8xy3`) reset the
329+
- `vF reset` - The AND, OR and XOR opcodes (`8xy1`, `8xy2` and `8xy3`) reset the
331330
flags register to zero. Test will show `ERR1` if the AND and OR tests don't
332331
behave the same and `ERR2` if the AND and XOR tests don't behave the same.
333-
* `Memory` - The save and load opcodes (`Fx55` and `Fx65`) increment the index
332+
- `Memory` - The save and load opcodes (`Fx55` and `Fx65`) increment the index
334333
register. More information [here](https://laurencescotford.net/chip-8-on-the-cosmac-vip-loading-and-saving-variables/)
335334
and [here](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/#fx55-and-fx65-store-and-load-memory).
336-
* `Display wait` - Drawing sprites to the display waits for the vertical blank
335+
- `Display wait` - Drawing sprites to the display waits for the vertical blank
337336
interrupt, limiting their speed to max 60 sprites per second. More information
338337
[here](https://laurencescotford.net/chip-8-on-the-cosmac-vip-drawing-sprites/).
339338
Test will show `SLOW` if the number of cycles per frame is too low for the test
340339
to be deterministic (this is not necessarily an error, but a suggestion to
341340
rerun the test with a higher number of cycles per frame).
342-
* `Clipping` - Sprites drawn at the bottom edge of the screen get clipped
341+
- `Clipping` - Sprites drawn at the bottom edge of the screen get clipped
343342
instead of wrapping around to the top of the screen. When clipping is off, the
344343
test checks if sprites get rendered at the right coordinates on the other side
345344
of the screen. This also tests that sprites drawn at coordinates of `x > 63`
@@ -348,11 +347,11 @@ cross).
348347
Test will show `ERR1` if the clipping is inconsistent in different dimensions
349348
or wrapping to the wrong coordinates and `ERR2` if sprites don't wrap around
350349
as expected.
351-
* `Shifting` - The shift opcodes (`8xy6` and `8xyE`) only operate on `vX`
350+
- `Shifting` - The shift opcodes (`8xy6` and `8xyE`) only operate on `vX`
352351
instead of storing the shifted version of `vY` in `vX` (more information
353352
[here](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/#8xy6-and-8xye-shift)).
354353
Test will show `ERR1` if the shift opcodes behave differently.
355-
* `Jumping` - The "jump to some address plus `v0`" instruction (`Bnnn`) doesn't
354+
- `Jumping` - The "jump to some address plus `v0`" instruction (`Bnnn`) doesn't
356355
use `v0`, but `vX` instead where `X` is the highest nibble of `nnn` (more
357356
information [here](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/#bnnn-jump-with-offset))
358357

@@ -365,10 +364,10 @@ executed in `hires` mode, and the behaviour of `Display wait` and `Clipping`
365364
will be tested in both `lores` and `hires` modes. This means you will not just
366365
see "on" or "off" for these quirks, but instead one of these values:
367366

368-
* `NONE` - The quirk is disabled in both modes
369-
* `HRES` - The quirk is only enabled in `hires` mode
370-
* `LRES` - The quirk is only enabled in `lores` mode
371-
* `BOTH` - The quirk is enabled in both modes
367+
- `NONE` - The quirk is disabled in both modes
368+
- `HRES` - The quirk is only enabled in `hires` mode
369+
- `LRES` - The quirk is only enabled in `lores` mode
370+
- `BOTH` - The quirk is enabled in both modes
372371

373372
If the test finds different errors for the `Clipping` test in `hires` mode
374373
compared to `lores` mode, it will show `ERR3`. In that case, first make sure
@@ -391,9 +390,9 @@ quirks among them.
391390

392391
## Keypad test
393392

394-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/6-keypad.ch8)
393+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/6-keypad.ch8)
395394
(source code available [here](./src/tests/6-keypad.8o))
396-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/6-keypad.html)
395+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/6-keypad.html)
397396
to see what's supposed to happen
398397

399398
This test allows you to test all three CHIP-8 key input opcodes. It shows you a
@@ -447,11 +446,11 @@ screen:
447446

448447
Otherwise, you can get either of these errors:
449448

450-
* `NOT HALTING` - Your implementation immediately returns the value of any
449+
- `NOT HALTING` - Your implementation immediately returns the value of any
451450
currently pressed keys in `vX`, instead of halting the interpreter until a key
452451
is pressed (note that this needs timer support to be accurate - in other words,
453452
the DELAY TIMER should continue to count down while awaiting a keypress)
454-
* `NOT RELEASED` - Your implementation doesn't wait for the pressed key to be
453+
- `NOT RELEASED` - Your implementation doesn't wait for the pressed key to be
455454
released before resuming
456455

457456
See [this
@@ -460,9 +459,9 @@ for more information.
460459

461460
## Beep test
462461

463-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/7-beep.ch8)
462+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/7-beep.ch8)
464463
(source code available [here](./src/tests/7-beep.8o))
465-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/7-beep.html)
464+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/7-beep.html)
466465
to see what's supposed to happen (sound may not actually play due to browser
467466
restrictions)
468467

@@ -475,9 +474,9 @@ Press `B` to beep.
475474

476475
## Scrolling test
477476

478-
* [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/8-scrolling.ch8)
477+
- [Download ROM](https://github.com/Timendus/chip8-test-suite/raw/main/bin/8-scrolling.ch8)
479478
(source code available [here](./src/tests/8-scrolling.8o))
480-
* [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/8-scrolling.html)
479+
- [Run this ROM in Octo](https://timendus.github.io/chip8-test-suite/8-scrolling.html)
481480
to see what's supposed to happen
482481

483482
This test is only applicable to SUPER-CHIP and XO-CHIP interpreters, since
@@ -507,11 +506,11 @@ graphical menu just gets in the way. In that case, you can force this ROM to
507506
select a specific platform by loading a value between `1` and `5` into memory at
508507
the address `0x1FF` (`512`).
509508

510-
* `1` - SUPER-CHIP `lores` with modern behaviour
511-
* `2` - SUPER-CHIP `lores` with legacy behaviour
512-
* `3` - SUPER-CHIP `hires`
513-
* `4` - XO-CHIP `lores`
514-
* `5` - XO-CHIP `hires`
509+
- `1` - SUPER-CHIP `lores` with modern behaviour
510+
- `2` - SUPER-CHIP `lores` with legacy behaviour
511+
- `3` - SUPER-CHIP `hires`
512+
- `4` - XO-CHIP `lores`
513+
- `5` - XO-CHIP `hires`
515514

516515
### The test
517516

@@ -546,6 +545,7 @@ git clone [email protected]:Timendus/chip8-test-suite.git
546545
cd chip8-test-suite
547546
npm install
548547
```
548+
549549
```bash
550550
# Build all the tests in `src/tests/` to `bin/`:
551551
npm start

0 commit comments

Comments
 (0)