Skip to content

Variant Detection Test

Steffen Schümann edited this page Jul 22, 2026 · 27 revisions

CHIP-8 Detection Results

This test is a by-product of my work on a "universal-binary" game, that detects and uses the capabilities of the platform it is loaded into.

Current Version: v1.4

Download: Variant Detection Test v1.4 (Source, needs Chiplet to build)

Supported Variants

It currently tries to detect the following variants:

  • CHIP-8
  • CHIP-8 TPD *
  • CHIP-8 FPD *
  • CHIP-8E
  • CHIP-8x *
  • CHIP-8x TPD *
  • CHIP-8x FPD *
  • CHIP-10
  • CHIP-48
  • SUPER-CHIP 1.0 BETA
  • SUPER-CHIP 1.0
  • SUPER-CHIP 1.1
  • SCHIP-MODERN
  • RS-M8001 MC8
  • MC8-MODERN
  • XO-CHIP

*) These variants will only be shown by name but no quirks test is done.

The Integrated Quirks Test

For variants that use the start address of 0x200, the variant detection test also runs a set of quirks tests, similar to the tests in the CHIP-8 test suite quirks test, this test gives results on the most relevant quirks:

Overview

All quirks test outputs consist of the short name of the quirk in three letters, a detection result, and optional a conformance rating.

  • The three letters are VFR, MEM, SHF, JMP, DWT and WRP. See below for each quirk and the meaning.
  • The detection result varies from quirk to quirk, in its easiest form it is + for an enabled quirk and - for a disabled one. A ? shows an error in the implementation, but for some quirks the detection result or error can be one or two letters/digits to further help debugging.
  • The conformance rating gives either a checkmark if the detected behavior is correct for the detected variant, or an x if not. In case of two letter/digit error reports no conformance rating is given and an x is implied to fit the screen space.

VF-Reset (VFR)

Opcodes: 8xy1, 8xy2, 8xy3

Possible results:

  • VFR+ This implementation resets VF on AND/OR/XOR operations.
  • VFR- This implementation keeps VF intact on AND/OR/XOR operations.
  • VFR? This implementation behaves inconsistent over the operations, some reset VF, some don't.

Description

On original CHIP-8 and a number of derived variants for the COSMAC VIP, the AND/OR/XOR operations reset VF to 0. This is a side effect from the way they are implemented together with the other math operations in group 8, apart from 8xy0. They are all based on generating a small subroutine on the stack (just two 1802 instructions) and executing it, then setting VF to the state of the 1802 flag register DF.

Most non-CDP1802 based variants do not implement this behavior for the AND/OR(XOR operations, and thus this became a quirk.

Memory (MEM)

Opcodes: Fx55, Fx65

Possible results:

  • MEM0 This implementation keeps the index register I unchanged.
  • MEMX This implementation increments the index register I by x.
  • MEM1 This implementation increments the index register I by x+1.
  • MEM? This implementation behaves either inconsistent or the increment could not be detected, so it's none of the above.

Description

The original implementation CHIP-8 on the COSMAC VIP, and most on that platform, increment the index register on load/save operations by x+1, so the index register points to the first byte after the read/written bytes. When CHIP-48 on the HP-48SX was published, it just incremented by x so the index register would point to the last byte read/written. This was kept in SuperCHIP v1.0, but changed in SuperCHIP v1.1 where no change of the index register happens at all. XO-CHIP went "back to the roots" and reimplemented the original behavior.

Shifting (SHF)

Opcodes: 8xy6, 8xyE

Possible results:

  • SHF+ This implementation ignores y and simply shifts Vx by one bit.
  • SHF- This implementation sets Vx to Vy and shifts that by one bit.
  • SHF? This implementation inconsistently uses either method or shift is broken.

Description

The original implementation CHIP-8 on the COSMAC VIP, and most on that platform, use the value from Vy to shift it and set the result to Vx and VF. The implementations on the HP-48SX stopped using Vy and just shifted Vx. Programmers that want to write portable code that supports those variants and the original behavior use the shift opcodes always with the same register for Vx and Vy so it behaves the same on all of them.

Jump0 (JMP)

Opcodes: Bnnn, Bxnn

Possible results:

  • JMP- This implementation jumps to nnn + V0.
  • JMP+ This implementation jumps to xnn + Vx.
  • JMPR This implementation implements CHIP-8E relative jumping, and is probably CHIP-8E.
  • JMP? This implementation jumps to nnn + V0 + 0x200 (that is RS-M8001 MegaChip behavior, any other wrong behavior will crash the test and can not be detected)

Description

The original implementation CHIP-8 on the COSMAC VIP jumps to nnn + V0 making this a usable indexed jump feature, albeit its still rare use. When CHIP-48 on the HP-48SX was published, it (probably, due to an error) jumped to nnn plus the register with the number of the most significant nibble of that address, so it was much harder to use as the register was depending on the base address. People basically stopped using it on CHIP-48/SuperCHIP. XO-CHIP brought back the more useful original behavior.

Display Wait (DWT)

Opcodes: Dxyn

Possible results:

  • DWT- This implementation doesn't wait at all.
  • DWTL This implementation limits drawing to one draw per frame in lores mode (64x32).
  • DWTH This implementation limits drawing to one draw per frame in hires mode (128x64).
  • DWTB This implementation limits drawing to one draw per frame in lores and hires mode (probably a bug).
  • DWT? The behavior fits none of the above, surely a bug.

Description

The original implementation CHIP-8 on the COSMAC VIP, and most on that platform, start a draw by waiting for the end of the frame interrupt, at the end of the visible pixel area. This is done to minimize tearing effects in animations. As the actual drawing of a bitmap could take longer than a screen, this technique was not perfect. CHIP-48 didn't have such an issue but as the CPU of the HP-48SX calculator was faster, it still limited the drawing to one operation per frame, to better mimic the original speed. With SuperCHIP, this behavior was only kept for the lores mode, and the extended or hires mode ran as fast as the calculator could. XO-CHIP doesn't wait by default, as modern games often pace by use of the delay timer, not by drawing limits.

Wrapping (WRP)

Opcodes: Dxyn

Possible results:

  • WRP- This implementation doesn't wrap (apart from the initial coordinates).
  • WRP+ This implementation wraps initial coordinates and subsequent pixels of draws.
  • WRPL This implementation only wraps draws in lores (64x32), probably a bug.
  • WRPH This implementation only wraps draws in hires (128x64), probably a bug.
  • WRPP This is a HP-48SX SuperCHIP v1.1 behavior that doesn't wrap but has collision behavior counts rows collided and clipped on the bottom in VF instead of just collisions leading to VF=1.
  • WRPOL This implementation doesn't wrap the origin on lores.
  • WRPOH This implementation doesn't wrap the origin on hires.
  • WRPWL This implementation has broken or inconsistent wrapping/clipping on lores.
  • WRPWH This implementation has broken or inconsistent wrapping/clipping on hires.
  • WRP? The exact behavior could not be recognized or is none of the above.

NOTE: There is the special case of CHIP-10, which doesn't wrap or clip subsequent pixels but just draws them in the next line, ignoring boundaries. This gets a WRP? with a checkmark as it is the expected CHIP-10 behavior.

Description

In CHIP-8 the main rule that is set is, that the origin of the Dxyn draw is wrapped. Besides that, the subsequent pixels drawn are clipped on most variants. Mainly XO-CHIP introduced wrapping as default, so sprite pixels wrap around the screen to the other side, same position on the non-wrapped axis. A bunch of new implementations get this wrong, so the test tries to help in detecting inconsistencies in regards to wrapping/clipping.

The Detection Process

The following diagram tries to visualize the decision tree used to detect the various variants. It can help if the test doesn't detect the expected and configured variant in an emulator.

Variant Detection Process

Example Result Gallery

COSMAC VIP Based Variants

Sadly no results from real hardware yet, only an emulated VIP (in this case Cadmium).

CHIP-8

The classic original interpreter developed for the COSMAC VIP by Joseph Weisbecker, 1977

CHIP-8 on an emulated COSMAC VIP Detection Result

CHIP-10

128x64 CHIP-8 from #VIPER-V1-I7 and #IpsoFacto-I10, by Ben H. Hutchinson, Jr., 1979

CHIP-10 on an emulated COSMAC VIP Detection Result

CHIP-8 Two Page Display (abbreviated as 2P here)

CHIP-8 with two page display (64x64), from #VIPER-V1-I3, by Andy Modla and Jef Winsor, 1979

Note: As with all variants not loading to 0x200, this sadly doesn't have quirks checks active.

CHIP-8 2P on an emulated COSMAC VIP Detection Result

CHIP-8 Four Page Display (abbreviated as 4P here, also called HI-RES-CHIP-8)

CHIP-8 with four page display (64x128), from #VIPER-V2-I6, by Tom Swan, 1980

Note: As with all variants not loading to 0x200, this sadly doesn't have quirks checks active.

CHIP-8 4P on an emulated COSMAC VIP Detection Result

CHIP-8E

CHIP-8 rewritten and extended by Gilles Detillieux, from #VIPER-V2-8+9, 1980

CHIP-8E on an emulated COSMAC VIP Detection Result

CHIP-8X

An official update to CHIP-8 by RCA, requiring the hardware extensions VP-590 and VP-595, 1980

Note: As with all variants not loading to 0x200, this sadly doesn't have quirks checks active.

CHIP-8X on an emulated COSMAC VIP Detection Result

CHIP-8X Two Page Display (64x64)

A modified version of CHIP-8X to use two page display (64x64), from #VIPER-V4-I3, by by Andy Modle and Jef Winsor

Note: As with all variants not loading to 0x200, this sadly doesn't have quirks checks active.

CHIP-8X-2P on an emulated COSMAC VIP Detection Result

CHIP-8X Four Page Display (64x128)

A modified version of CHIP-8X for the four page display mode (64x128), from #VIPER-V4-I3, by Tom Swan, sadly not actually working as described due to an implementation bug

Note: As with all variants not loading to 0x200, this sadly doesn't have quirks checks active.

CHIP-8X-4P on an emulated COSMAC VIP Detection Result

HP-48SX Calculator

CHIP-48

CHIP-48 on HP-48SX Detection Result

SuperCHIP-1.0 (BETA)

The accidental release of an early version of SuperCHIP-1.0 with Fx29 giving small and big font sprites.

SuperCHIP-1.0-Beta on HP-48SX Detection Result

SuperCHIP-1.0

The actual finished version v1.0 of SuperCHIP-1.0 about an hour later.

SuperCHIP-1.0 on HP-48SX Detection Result

SuperCHIP-1.1

The updated version from a couple of days later, the most relevant SuperCHIP variant out there.

SuperCHIP-1.1 on HP-48SX Detection Result

MegaChip

RS-M8001 MegaChip.exe

The original, first released MegaChip emulator by Revival Studios.

RS-M8001 Detection Result

Mega8

The (to my knowledge) second implementation of MegaChip by Ready4Next, closer to what the test names MC8-MODERN.

Mega8 Detection Result

MC8-MODERN

This is MC8-MODERN as implemented by Cadmium. Due to the lack of some details in the original specs and implementations, there is some leverage on how to fill the gaps, and it is my take on staying close to the originals but filling the gaps, ymmv.

MC8-MODERN Detection Result

Modern SuperCHIP

Modern SUPER-CHIP interpretation as done in Octo by John Earnest, 2014

Note: While this is Octos behavior for SCHIP, setting Octo to SCHIP and running the variant detection program will still detect XO-CHIP, as Octo doesn't deactivate the XO-CHIP extensions, so still does long-skips over F000 nnnn. The test therefore correctly concludes it is actually an XO-CHIP and just complains about the quirks being all wrong.

SCHIP-MODERN on Cadmium

SCHIP-MODERN Detection Result

XO-CHIP

A modern extension to SUPER-CHIP supporting colors and actual sound first implemented in Octo by John Earnest, 2014

Octo

XO-CHIP on Octo Detection Result

Clone this wiki locally