EMMA 02

PSEUDO CODE

  • Home
  • Download
  • Change Log
  • Help
  • Compilation
    • Windows
    • OS X
    • Ubuntu
    • Fedora
    • openSUSE
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • AMVBAS
    • AM4KBAS
    • CARDTRAN
    • Chip-8, 8X, ETI-660 & Elf
    • FEL-1
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-2
    • GPL-3
    • GPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • ST2
    • ST4
    • STK
    • Test-Word
    • Super-chip
  • XML Code
    • Main Elements
    • I/O
    • System
    • A/D Convertor
    • BASIC
    • Batch wav
    • Bootstrap
    • Cassette
    • CD4536B
    • CDP1851
    • CDP1852
    • CDP1854
    • CDP1855
    • CDP1877
    • CDP1878
    • CDP1879
    • Debugger
    • COMX Diagnostic
    • Dip switch
    • Disk
    • EF Buttons
    • Flip Flop
    • Front Panel
    • GUI
    • HEX Modem
    • I/O Group
    • Keyboard
    • Keyfile
    • Locations
    • Memory
    • MM57109
    • Printer
    • RTC
    • Sound
    • Splash
    • USB
    • Video
    • Videodump
    • vt
    • X Modem
  • BASIC
    • General Information
    • COMX BASIC V1.00
    • Floating Point BASIC 2.2
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
    • Quest Super BASIC 1.4
    • Quest Super BASIC 3.0
    • Quest Super BASIC 5.0
    • Quest Super BASIC 6.0
    • RCA BASIC3 V1.1
    • Telmac SBASIC v24.3
    • Error Messages
  • Computer List

 

 

 

 

 

 

 

 

 

 

 

 

Super-chip

Information

The Super-chip interpreter for the modified VIP (chip10 modification) and Studio IV was designed by me. It should support Super-CHIP 1.1, 00FA instruction from chip8run and also somewhat follows SCHIP/SCHPC however with some selectable options/quirks:

  1. SHIFT: When selected Vy will be ignored for SHL/SHR Vx, Vy instructions
  2. LOAD: When selected I will NOT be incremented for LD VX,[I] and LD [i], Vx
  3. BXNN: When selected JP B,aaa will jump to address xaa + V0 instead of aaa + V0
  4. VBLNK: When selected interpreter will wait for VBLaNK before drawing a sprite
  5. CLIPS: When selected Sprites will be CLIPed at top/bottom of screen

Note depending on keypad mapping 4 and 5 might be mapped to PC keys Q and W. To start the chip8 or Super-chip game press any key other than 1 to 5.

For chip8 games use: SHIFT, LOAD, BXNN not selected, VBLNK, CLIPS selected
For most Super-chip games use: SHIFT, LOAD, BXNN selected, VBLNK, CLIPS not selected

Some Super-chip games need the following setting:

  • Chipcross: SHIFT selected, LOAD not selected, BNNN selected, VBLNK & CLIPS not selected
  • Eaty the Alien: No options selected
  • Grad School Simulator: No options selected
  • Codegrid: No options selected
  • Mr. Worm: No options selected
  • Octopeg: No options selected
  • Sub-Terr8nia: No options selected

Super-chip code should be located from 800-17FF. Note that address 800 is seen as 200 by the interpreter. So a command 2200 will do a call to address 800 instead of 200. Video memory is located from 1C00 to 1FFF and Vx-Vy are stored from 1BF0 to 1BFF.

Definitions

aaa 12 bit address
kk 8 bit constant
x Register number Vx (x = 0 to F)
y Register number Vy (y = 0 to F)
[aaa] Memory value of address aaa
. Not used, value doesn't matter
1..9, A..F Hexadecimal digits

Syntax

Opcode Mnemonic Parameter Definition
Fx1E ADD I, Vx I = I + Vx
7xkk ADD Vx, kk Vx = Vx + kk
8xy4 ADD Vx, Vy Vx = Vx + Vy, VF = carry
8xy2 AND Vx, Vy Vx = Vx AND Vy, VF undefined
2aaa CALL aaa Call subroutine at aaa (16 levels)
00E0 CLS Clear display
00FA COMP Set compatibility mode for FX55 and FX65; running this changes the behaviour of those instructions so they no longer change I
Dxyn DRW Vx, Vy, n Draw n byte sprite stored at [I] at Vx, Vy. Set VF = collision
If n=0 a 16x16 sprite is drawn in high res mode and a 8x16 sprite in low res mode
00FF HIGH High-resolution mode
1aaa JP aaa Jump to address aaa
Baaa JP V0, aaa BXNN option NOT selected:
Jump to address aaa + V0
BXNN option selected:
Jump to address xaa + V0
Fx33 LD B, Vx Store BCD value of Vx in [I], [I+1], [I+2]
Fx15 LD DT, Vx Delaytimer = Vx
Fx29 LD F1, Vx Point I to 5 byte numeric sprite for value in Vx
Fx29 LD F2, Vx Point I to 10 byte numeric sprite for value in Vx
Aaaa LD I, aaa I = aaa
Fx18 LD ST, Vx Soundtimer = Vx
Fx07 LD Vx, DT Vx = Delaytimer
Fx0A LD Vx, K Vx = key, wait for keypress
6xkk LD Vx, kk Vx = kk
8xy0 LD Vx, Vy Vx = Vy, VF undefined
Fx65 LD Vx, [I] Read V0 .. Vx from [I] .. [I+x]
LOAD option NOT selected:
register I will be incremented
LOAD option selected:
register I will not be incremented
Fx55 LD [I], Vx Store V0 .. Vx in [I] .. [I+x]
LOAD option NOT selected:
register I will be incremented
LOAD option selected:
register I will not be incremented
00FE LOW Low-resolution mode
00FD NOP No operation, for backward compatibility to the Super-Chip 1.0 Exit interpreter command
8xy1 OR Vx, Vy Vx = Vx OR Vy, VF undefined
Fx85 READ Read V0..VX from RPL user flags (X <= 7), RPL is stored on 1BE0-1BE7
00EE RETURN Return from subroutine (16 levels)
Cxkk RND Vx , kk Vx = random AND kk
00CN SCD Scroll display N pixels down; in low resolution mode, N/2 pixels
00FC SCL Scroll left by 4 pixels; in low resolution mode, 2 pixels
00FB SCR Scroll right by 4 pixels; in low resolution mode, 2 pixels
3xkk SE Vx , kk Skip next instruction if Vx == kk
5xy0 SE Vx , Vy Skip next instruction if Vx == Vy
8xxE SHL Vx Vx = Vx << 1, VF = carry
8xyE SHL Vx , Vy SHIFT option NOT selected:
Vx = Vy << 1, VF = carry
SHIFT option selected:
Vx = Vx << 1, VF = carry
8xx6 SHR Vx Vx = Vx >> 1, VF = carry
8xy6 SHR Vx , Vy SHIFT option NOT selected:
Vx = Vy >> 1, VF = carry
SHIFT option selected:
Vx = Vx >> 1, VF = carry
Ex9E SKP Vx Skip next instruction if key Vx down
ExA1 SKNP Vx Skip next instruction if key Vx up
4xkk SNE Vx, kk Skip next instruction if Vx != kk
9xy0 SNE Vx, Vy Skip next instruction if Vx != Vy
Fx75 STORE Store V0..VX in RPL user flags (X <= 7), RPL is stored on 1BE0-1BE7
8xy5 SUB Vx, Vy Vx = Vx - Vy, VF = !borrow
8xy7 SUBN Vx, Vy Vx = Vy - Vx, VF = !borrow
0aaa SYS aaa Call CDP1802 code at aaa
8xy3 XOR Vx, Vy Vx = Vx XOR Vy, VF undefined