Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific info on MegaChip font behavior, add HyperWaveChip-64 extension #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The list builds on these modern documents, in addition to historical sources:
* [CHIP‐8 Extensions Reference](https://github.com/mattmikolay/chip-8/wiki/CHIP%E2%80%908-Extensions-Reference)
* [SCHIP Compatibility](https://github.com/Chromatophore/HP48-Superchip)
* [xChip manual](https://github.com/mehcode/xchip/blob/master/docs/manual.md)
* [HWC-64 Docs](https://github.com/NinjaWeedle/HyperWaveCHIP-64)

### Commonalities and notation

Expand Down Expand Up @@ -990,9 +991,10 @@ A superset of SCHIP created by Revival Studios in 2007.

<h3 class="no_toc">Altered instructions</h3>

Same as SCHIP except `BNNN` jumps properly, and:
Same as SCHIP except:

* `DXYN` is completely different in MegaChip mode, using SPRH/SPRW for Sprite height and width and ignoring N, using a byte per pixel as opposed to a bit per pixel, always overwriting the contents of the screen buffer rather than XORing, and only setting VF if the value of the pixel about to be overwritten is equal to the Collision Color value set by 09NN. Supposedly "non-character" sprites don't use this special DXYN?
* `BNNN` uses VIP behavior (NNN+V0) instead of the bugged SCHIP behavior (VX+XNN)
* `DXYN` is completely different in MegaChip mode, using SPRH/SPRW for Sprite height and width and ignoring N, using a byte per pixel as opposed to a bit per pixel, always overwriting the contents of the screen buffer rather than XORing, and only setting VF if the value of the pixel about to be overwritten is equal to the Collision Color value set by 09NN. If I is pointing to a non-character sprite (the built in font data), the normal DXYN behavior is used instead. Wrapping on the Y axis actually occurs at Row 256 and not Row 192.
* `00FE` and `00FF` do not work properly in MegaChip mode
* `00EE` is the only instruction that actually updates the screen while MegaChip mode is active, and clears the screen buffer as normal after updating

Expand Down Expand Up @@ -1058,6 +1060,37 @@ Octo is a CHIP-8 interpreter that supports regular CHIP-8, SUPER-CHIP and XO-CHI

* Switching resolution mode erases the screen, like XO-CHIP dictates, but Octo does so even with SCHIP games.

## HyperWaveCHIP-64

An extension for XO-CHIP 1.1 created by Oxiti8 in 2021.

HWC-64 allows easier access

Note that XO-CHIP is mainly supported by John Earnest's own Octo assembler, which supports "macros" for comparison operators (less than (or equal), greater than (or equal)) but which assemble down to regular CHIP-8 bytecode instead of dedicated instructions.

<h3 class="no_toc">New instructions</h3>

* `00E1`: INVERT - NOT the contents of the the currently selected bit plane.
* `00F1`: OR MODE - Enable OR mode drawing. (Pixels are not erased during DXYN if collision. VF is still set to 1 if collision and 0 otherwise)
* `00F2`: ERASE MODE - Enable ERASE mode drawing. (Only erases pixels during DXYN if collision. VF is still set to 1 if collision and 0 otherwise)
* `00F3`: XOR MODE - Enable XOR mode drawing. (XOR is the default drawing mode.)
* `5XY1`: SKIP VX > VY - Skip if VX > VY. Will also double skip over the `F000`, `F100`, `F200`, and `F300` instructions like other skip instructions. Inherited from CHIP8E.
* `8XYC`: MULT VX, VY - Set VX to VX * VY. Set VF to higher 8 bits of the product, and set VX to (result of the multiplication % 256). If the result is below 256, set VF to 0.
* `8XYD`: DIV VX, VY - VX = VX // VY. VF = VX % VY. If VY = 0 at the start of the opcode, set BOTH VX and VF to 0. Prevents division by zero.
* `8xyF`: DIV VX, VY - VX = vY // vX. VF = vY % vX. If VX = 0 at the start of the opcode, set BOTH VX and VF to 0. Prevents division by zero.
* `F100 NNNN`: Long Jump - Load PC with 16-bit address NNNN
* `F200 NNNN`: Long call - Store current PC in stack, then Load PC with 16-bit address NNNN
* `F300 NNNN`: Long Jump + V0 - Store current PC in stack, then Load PC with 16-bit address NNNN + V0
* `FN03`: Palette swap - Set RGB8 color used for plane # N to 24-bit (3-byte) RGB8 color palette located at I in memory

<h3 class="no_toc">Altered instructions</h3>

* Skip instructions that double skip over `F000` in XO-CHIP will also double skip over `F100`, `F200`, and `F300`.

<h3 class="no_toc">Compatibility notes</h3>

* Draw mode is set to XOR by default.

## CHIP-8 Classic / Color

The CHIP-8 Classic and CHIP-8 Color is a microcontroller computer created by StandAloneComputers in 2019. It's inspired by the DREAM 6800 interpreter, and includes a similar monitor program, also called CHIPOS. It also adds an ASCII character set, I/O, and color support. See https://chip-8.com.
Expand Down