{"generator":"Cadmium","version":"1.9.90 0303eca","date":"2025-02-01","opcodes":[{"opcode":"0010","mask":65535,"size":2,"octo":"megaoff","macro":":macro megaoff { :byte 0x00  :byte 0x10 }","chipper":"megaoff","platforms":["megachip"],"description":"disable megachip mode"},{"opcode":"0011","mask":65535,"size":2,"octo":"megaon","macro":":macro megaon { :byte 0x00 :byte 0x11 }","chipper":"megaon","platforms":["megachip"],"description":"enable megachip mode"},{"opcode":"00Bn","mask":65520,"size":2,"octo":"scroll_up N","macro":":macro scroll_up n { :calc BN { 0xB0 + ( n & 0xF ) } :byte 0x00 :byte BN }","chipper":"scru N","platforms":["megachip"],"description":"scroll screen content up N pixel","quirks":[0]},{"opcode":"00Cn","mask":65520,"size":2,"octo":"scroll-down N","chipper":"scd N","platforms":["schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"scroll screen content down N pixel, in XO-CHIP only selected bit planes are scrolled","quirks":[0,1]},{"opcode":"00Dn","mask":65520,"size":2,"octo":"scroll-up N","chipper":"scu N","platforms":["xo-chip"],"description":"scroll screen content up N hires pixel, in XO-CHIP only selected planes are scrolled"},{"opcode":"00E0","mask":65535,"size":2,"octo":"clear","chipper":"cls","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"clear the screen, in XO-CHIP only selected bit planes are cleared, in MegaChip mode it updates the visible screen before clearing the draw buffer"},{"opcode":"00ED","mask":65535,"size":2,"octo":"stop","macro":":macro stop { :byte 0x00 :byte 0xed }","chipper":"dw #00ed","platforms":["chip-8e"],"description":"stop execution"},{"opcode":"00EE","mask":65535,"size":2,"octo":"return","chipper":"ret","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"return from subroutine to address pulled from stack"},{"opcode":"00F2","mask":65535,"size":2,"octo":"nop-8e","macro":":macro nop-8e { :byte 0x00 :byte 0xf2 }","chipper":"dw #00f2","platforms":["chip-8e"],"description":"nop (does nothing)"},{"opcode":"00FB","mask":65535,"size":2,"octo":"scroll-right","chipper":"scr","platforms":["schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"scroll screen content right four pixel, in XO-CHIP only selected bit planes are scrolled","quirks":[0]},{"opcode":"00FC","mask":65535,"size":2,"octo":"scroll-left","chipper":"scl","platforms":["schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"scroll screen content left four pixel, in XO-CHIP only selected bit planes are scrolled","quirks":[0]},{"opcode":"00FD","mask":65535,"size":2,"octo":"exit","chipper":"exit","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"exit interpreter"},{"opcode":"00FE","mask":65535,"size":2,"octo":"lores","chipper":"low","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"switch to lores mode (64x32)","quirks":[2]},{"opcode":"00FF","mask":65535,"size":2,"octo":"hires","chipper":"high","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"switch to hires mode (128x64)","quirks":[2]},{"opcode":"01nn","mask":65280,"size":4,"octo":"ldhi NNNNNN","macro":":macro ldhi nnnn { :byte 0x01 :byte 0x00 :pointer nnnn }","chipper":"ldhi i,NNNNNN","platforms":["megachip"],"description":"set I to NNNNNN (24 bit)"},{"opcode":"0151","mask":65535,"size":2,"octo":"wait-dt","macro":":macro wait-dt { :byte 0x01 :byte 0x51 }","chipper":"dw #0151","platforms":["chip-8e"],"description":"halt execution until delay timer is 0"},{"opcode":"0188","mask":65535,"size":2,"octo":"skip-next","macro":":macro skip-next { :byte 0x01 : byte 0x88 }","chipper":"dw #0188","platforms":["chip-8e"],"description":"skip next opcode (only 2 bytes)"},{"opcode":"02nn","mask":65280,"size":2,"octo":"ldpal NN","macro":":macro ldpal nn { :byte 0x02 :byte nn }","chipper":"ldpal NN","platforms":["megachip"],"description":"load NN colors from I into the palette, colors are in ARGB"},{"opcode":"02A0","mask":65535,"size":2,"octo":"cycle-bgcol","macro":":macro cycle-background { 0x02 0xa0 }","chipper":"dw #02A0","platforms":["chip-8x"],"description":"cycle background color one step between blue, black, green and red"},{"opcode":"03nn","mask":65280,"size":2,"octo":"sprw NN","macro":":macro sprw nn { :byte 0x03 :byte nn }","chipper":"sprw NN","platforms":["megachip"],"description":"set sprite width to NN (not used for font sprites)"},{"opcode":"04nn","mask":65280,"size":2,"octo":"sprh NN","macro":":macro sprh nn { :byte 0x04 :byte nn }","chipper":"sprh NN","platforms":["megachip"],"description":"set sprite height to NN (not used for font sprites)"},{"opcode":"05nn","mask":65280,"size":2,"octo":"alpha NN","macro":":macro alpha nn { :byte 0x05 :byte nn }","chipper":"alpha NN","platforms":["megachip"],"description":"set screen alpha to NN"},{"opcode":"060n","mask":65520,"size":2,"octo":"digisnd N","macro":":macro digisnd n { :calc ZN { n & 0xF } :byte 0x06 :byte ZN }","chipper":"digisnd N","platforms":["megachip"],"description":"play digitized sound at I N=loop/noloop"},{"opcode":"0700","mask":65535,"size":2,"octo":"stopsnd","macro":":macro stopsnd { :byte 0x07 :byte 0x00 }","chipper":"stopsnd","platforms":["megachip"],"description":"stop digitized sound"},{"opcode":"080n","mask":65520,"size":2,"octo":"bmode N","macro":":macro bmode n { :calc ZN { n & 0xF } :byte 0x08 :byte ZN }","chipper":"bmode N","platforms":["megachip"],"description":"set sprite blend mode (0=normal,1=25%,2=50%,3=75%,4=additive,5=multiply)"},{"opcode":"09nn","mask":65280,"size":2,"octo":"ccol NN","macro":":macro ccol nn { :byte 0x09 :byte nn }","chipper":"ccol NN","platforms":["megachip"],"description":"set collision color to index NN"},{"opcode":"0nnn","mask":61440,"size":2,"octo":":pointer NNN","chipper":"dw #0NNN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800"],"description":"jump to native assembler subroutine at 0xNNN"},{"opcode":"1nnn","mask":61440,"size":2,"octo":"jump NNN","chipper":"jp NNN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"jump to address NNN"},{"opcode":"2nnn","mask":61440,"size":2,"octo":":call NNN","chipper":"call NNN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"push return address onto stack and call subroutine at address NNN"},{"opcode":"3xnn","mask":61440,"size":2,"octo":"if vX != NN then","chipper":"se vX,NN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if vX == NN (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"4xnn","mask":61440,"size":2,"octo":"if vX == NN then","chipper":"sne vX,NN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if vX != NN (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"5xy0","mask":61455,"size":2,"octo":"if vX != vY then","chipper":"se vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if vX == vY (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"5xy1","mask":61455,"size":2,"octo":"0x5X 0xY1","chipper":"dw #5XY1","platforms":["chip-8e"],"description":"skip next opcode if vX > vY (note: CHIP-8E only, so skips only 2 bytes)"},{"opcode":"5xy1","mask":61455,"size":2,"octo":"0x5X 0xY1","chipper":"dw #5XY1","platforms":["chip-8x"],"description":"A BCD like add opcode that works in octal for normal CHIP-8X and hex on multi-page CHIP-8X, add the nibbles of Vx and Vy separately, and mask the results to keep the nibbles addition from overflowing, and store result in vX"},{"opcode":"5xy2","mask":61455,"size":2,"octo":"save vX - vY","chipper":"ld [i],vX-vY","platforms":["chip-8e","xo-chip"],"description":"write registers vX to vY to memory pointed to by I","quirks":[3]},{"opcode":"5xy3","mask":61455,"size":2,"octo":"load vX - vY","chipper":"ld vX-vY,[i]","platforms":["chip-8e","xo-chip"],"description":"load registers vX to vY from memory pointed to by I","quirks":[3]},{"opcode":"6xnn","mask":61440,"size":2,"octo":"vX := NN","chipper":"ld vX,NN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to NN"},{"opcode":"7xnn","mask":61440,"size":2,"octo":"vX += NN","chipper":"add vX,NN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"add NN to vX"},{"opcode":"8xy0","mask":61455,"size":2,"octo":"vX := vY","chipper":"ld vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the value of vY"},{"opcode":"8xy1","mask":61455,"size":2,"octo":"vX |= vY","chipper":"or vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the result of bitwise vX OR vY","quirks":[4]},{"opcode":"8xy2","mask":61455,"size":2,"octo":"vX &= vY","chipper":"and vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the result of bitwise vX AND vY","quirks":[4]},{"opcode":"8xy3","mask":61455,"size":2,"octo":"vX ^= vY","chipper":"xor vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the result of bitwise vX XOR vY","quirks":[4]},{"opcode":"8xy4","mask":61455,"size":2,"octo":"vX += vY","chipper":"add vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"add vY to vX, vF is set to 1 if an overflow happened, to 0 if not, even if X=F!"},{"opcode":"8xy5","mask":61455,"size":2,"octo":"vX -= vY","chipper":"sub vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"subtract vY from vX, vF is set to 0 if an underflow happened, to 1 if not, even if X=F!"},{"opcode":"8xy6","mask":61455,"size":2,"octo":"vX >>= vY","chipper":"shr vX{,vY}","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to vY and shift vX one bit to the right, set vF to the bit shifted out, even if X=F!","quirks":[5]},{"opcode":"8xy7","mask":61455,"size":2,"octo":"vX =- vY","chipper":"subn vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the result of subtracting vX from vY, vF is set to 0 if an underflow happened, to 1 if not, even if X=F!"},{"opcode":"8xyE","mask":61455,"size":2,"octo":"vX <<= vY","chipper":"shl vX{,vY}","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to vY and shift vX one bit to the left, set vF to the bit shifted out, even if X=F!","quirks":[5]},{"opcode":"9xy0","mask":61455,"size":2,"octo":"if vX == vY then","chipper":"sne vX,vY","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if vX != vY (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"Annn","mask":61440,"size":2,"octo":"i := NNN","chipper":"ld i,NNN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set I to NNN"},{"opcode":"Bnnn","mask":61440,"size":2,"octo":"jump0 NNN","chipper":"jp v0,NNN","platforms":["chip-8","chip-10","chip-8e","chip-8-d6800","schipc","megachip","xo-chip"],"description":"jump to address NNN + v0"},{"opcode":"Bxnn","mask":61440,"size":2,"octo":"jump0 NNN + vX","chipper":"jp vX,NNN","platforms":["chip-48","schip-1.0","schip-1.1","schip-modern"],"description":"jump to address XNN + vX"},{"opcode":"B0nn","mask":65280,"size":2,"octo":"0xb0 0xNN","chipper":"dw #b0NN","platforms":["chip-8i"],"description":"output NN to port"},{"opcode":"BBnn","mask":65280,"size":2,"octo":"0xbb 0xNN","chipper":"dw #bbNN","platforms":["chip-8e"],"description":"jump backward to address of this instruction minus NN, bb00 is self-jump"},{"opcode":"BFnn","mask":65280,"size":2,"octo":"0xbf 0xNN","chipper":"dw #bfNN","platforms":["chip-8e"],"description":"jump forward to address of this instruction plus NN, bf00 is self-jump"},{"opcode":"B1y0","mask":65295,"size":2,"octo":"0xb1 0xY0","chipper":"dw #b1Y0","platforms":["chip-8i"],"description":"output Vy to port"},{"opcode":"B1y1","mask":65295,"size":2,"octo":"0xb1 0xY1","chipper":"dw #b1Y1","platforms":["chip-8i"],"description":"wait for input (EF line is low) and set Vy to data from port"},{"opcode":"Bxyn","mask":61440,"size":2,"octo":"col-high X Y N","macro":":macro col-high x y n { :calc MSB { 0xB0 + ( x & 0xF ) } :calc LSB { ( ( y & 0xF ) << 4 ) + ( n & 0xF ) } :byte MSB :byte LSB }","chipper":"dw #bXYN","platforms":["chip-8x"],"description":"set the foreground color of the pixel area where VX is the horizontal coordinate and VX+1 is the vertical, for 8 horizontal pixels (similar to DXYN), to the color defined in VY (N > 0), horizontal coordinates are actually seen as VX&0x38"},{"opcode":"Bxy0","mask":61455,"size":2,"octo":"col-low X Y","macro":":macro col-low x y { :calc MSB { 0xB0 + ( x & 0xF ) } :calc LSB { ( y & 0xF ) << 4 } :byte MSB :byte LSB }","chipper":"dw #bXY0","platforms":["chip-8x"],"description":"set the foreground color of the pixel area defined by VX and VX+1 to the color defined in VY (VY <= 7, where values correspond to black, red, blue, violet, green, yellow, aqua and white, respectively); the display is split into 8 x 8 zones (8 x 4 pixels each); the least significant nibble of VX specifies the horizontal position of the left-most zone, and the most significant nibble of VX specifies the extra number of horizontal zones to color (ie. a value of 0 will color one zone); ditto for VX+1, but with vertical zones"},{"opcode":"Cxnn","mask":61440,"size":2,"octo":"vX := random NN","chipper":"rnd vX,NN","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vx to a random value masked (bitwise AND) with NN"},{"opcode":"Dxyn","mask":61440,"size":2,"octo":"sprite vX vY N","chipper":"drw vX,vY,N","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"draw 8xN pixel sprite at position vX, vY with data starting at the address in I, I is not changed","quirks":[6,7,8,9]},{"opcode":"Dxy0","mask":61455,"size":2,"octo":"sprite vX vY 0","chipper":"drw vX,vY,0","platforms":["schip-1.0","schip-1.1","schipc","xo-chip","schip-modern"],"description":"draw 16x16 pixel sprite at position vX, vY with data starting at the address in I, I is not changed","quirks":[6,10,7,9]},{"opcode":"Ex9E","mask":61695,"size":2,"octo":"if vX -key then","chipper":"skp vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if key in the lower 4 bits of vX is pressed (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"ExA1","mask":61695,"size":2,"octo":"if vX key then","chipper":"sknp vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"skip next opcode if key in the lower 4 bits of vX is not pressed (note: on platforms that have 4 byte opcodes, like F000 on XO-CHIP, this needs to skip four bytes)"},{"opcode":"ExF2","mask":61695,"size":2,"octo":"0xeX 0xf2","chipper":"dw #eXf2","platforms":["chip-8x"],"description":"skip next opcode if key in the lower 4 bits of vX is pressed on keypad 2"},{"opcode":"ExF5","mask":61695,"size":2,"octo":"0xeX 0xf5","chipper":"dw #eXf5","platforms":["chip-8x"],"description":"skip next opcode if key in the lower 4 bits of vX is not pressed keypad 2"},{"opcode":"F000","mask":65535,"size":4,"octo":"i := long NNNN","chipper":"dw #f000, #NNNN","platforms":["xo-chip"],"description":"assign next 16 bit word to i, and set PC behind it, this is a four byte instruction (see note on skip instructions)"},{"opcode":"Fx01","mask":61695,"size":2,"octo":"plane X","chipper":"dw #fX01","platforms":["xo-chip"],"description":"select bit planes to draw on when drawing with Dxy0/Dxyn"},{"opcode":"F002","mask":65535,"size":2,"octo":"audio","chipper":"dw #fX02","platforms":["xo-chip"],"description":"load 16 bytes audio pattern pointed to by I into audio pattern buffer"},{"opcode":"Fx03","mask":61695,"size":2,"octo":"0xfX 0x03","chipper":"dw #fX03","platforms":["chip-8e"],"description":"output vX to port 3"},{"opcode":"Fx07","mask":61695,"size":2,"octo":"vX := delay","chipper":"ld vX,dt","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set vX to the value of the delay timer"},{"opcode":"Fx0A","mask":61695,"size":2,"octo":"vX := key","chipper":"ld vX,k","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"wait for a key pressed and released and set vX to it, in megachip mode it also updates the screen like clear"},{"opcode":"Fx15","mask":61695,"size":2,"octo":"delay := vX","chipper":"ld dt,vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set delay timer to vX"},{"opcode":"Fx18","mask":61695,"size":2,"octo":"buzzer := vX","chipper":"ld st,vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set sound timer to vX, sound is played as long as the sound timer reaches zero"},{"opcode":"Fx1B","mask":61695,"size":2,"octo":"skip-bytes vX","macro":":macro skip-bytes reg { :calc FX { 0xF0 + ( reg & 0xF ) } :byte FX :byte 0x1b }","chipper":"dw #fX1b","platforms":["chip-8e"],"description":"jump forward vX bytes, if vX is 0 simply the next opcode is the target, making it a nop"},{"opcode":"Fx1E","mask":61695,"size":2,"octo":"i += vX","chipper":"add i,vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"add vX to I"},{"opcode":"Fx29","mask":61695,"size":2,"octo":"i := hex vX","chipper":"ld lf,vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set I to the 5 line high hex sprite for the lowest nibble in vX"},{"opcode":"Fx30","mask":61695,"size":2,"octo":"i := bighex vX","chipper":"ld hf,vX","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"set I to the 10 lines high hex sprite for the lowest nibble in vX"},{"opcode":"Fx33","mask":61695,"size":2,"octo":"bcd vX","chipper":"ld b,vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"write the value of vX as BCD value at the addresses I, I+1 and I+2"},{"opcode":"Fx3A","mask":61695,"size":2,"octo":"pitch := vX","chipper":"dw #fX3a","platforms":["xo-chip"],"description":"set audio pitch for a audio pattern playback rate of 4000*2^((vX-64)/48)Hz"},{"opcode":"Fx4F","mask":61695,"size":2,"octo":"wait-for vX","macro":":macro wait-for reg { :calc FX { 0xF0 + ( reg & 0xF ) } :byte FX :byte 0x4f }","chipper":"dw #fX4f","platforms":["chip-8e"],"description":"set delay timer to vX and wait for it to run down to 0"},{"opcode":"Fx55","mask":61695,"size":2,"octo":"save vX","chipper":"ld [i],vX","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"write the content of v0 to vX at the memory pointed to by I, I is incremented by X+1","quirks":[11]},{"opcode":"Fx65","mask":61695,"size":2,"octo":"load vX","chipper":"ld vX,[i]","platforms":["chip-8","chip-8i","chip-10","chip-8e","chip-8x","chip-8-d6800","chip-48","schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"read the bytes from memory pointed to by I into the registers v0 to vX, I is incremented by X+1","quirks":[11]},{"opcode":"Fx75","mask":61695,"size":2,"octo":"saveflags vX","chipper":"ld r,vX","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"store the content of the registers v0 to vX into flags storage (outside of the addressable ram)","quirks":[12]},{"opcode":"Fx85","mask":61695,"size":2,"octo":"loadflags vX","chipper":"ld vX,r","platforms":["schip-1.0","schip-1.1","schipc","megachip","xo-chip","schip-modern"],"description":"load the registers v0 to vX from flags storage (outside the addressable ram)","quirks":[12]},{"opcode":"FxE3","mask":61695,"size":2,"octo":"input3-wait vX","macro":":macro input3-wait reg { :calc FX { 0xF0 + ( reg & 0xF ) } :byte FX :byte 0xe3 }","chipper":"dw #fXe3","platforms":["chip-8e"],"description":"wait for strobe on !EF4 and read input from port 3 into vX"},{"opcode":"FxE7","mask":61695,"size":2,"octo":"input3 vX","macro":":macro input3 reg { :calc FX { 0xF0 + ( reg & 0xF ) } :byte FX :byte 0xe7 }","chipper":"dw #fXe7","platforms":["chip-8e"],"description":"read input from port 3 into vX"},{"opcode":"FxF8","mask":61695,"size":2,"octo":"0xfX 0xf8","chipper":"dw #fXf8","platforms":["chip-8x"],"description":"output vX to io port"},{"opcode":"FxFB","mask":61695,"size":2,"octo":"0xfX 0xfb","chipper":"dw #fXfb","platforms":["chip-8x"],"description":"wait for input from io and load into vX"}],"quirks":["On the HP48 (SCHIP/SCHIPC) scrolling in lores mode only scrolls half the pixels","On the HP48 (SCHIP/SCHPC) opcode 00C0, so scrolling zero pixels, is not a valid opcode","The original SCHIP-1.x did not clean the screen, leading to artifacts","CHIP-8E only supports X<=Y, on XO-CHIP registers are written/read in the order of X to Y","COSMAC based variants will reset VF","CHIP-48/SCHIP-1.x don't set vX to vY, so only shift vX","XO-CHIP wraps pixels instead of clipping them","Original COSMAC VIP based systems (like original CHIP-8), and the HP48 based interpreters in 64x32 mode wait for the start of the next frame, the VIP sometimes even needs two screens to finish","CHIP-10 only has a hires mode","The original SCHIP-1.1 in hires mode set VF to the number of sprite rows with collisions plus the number of rows clipped at the bottom border","SCHIP-1.x/SCHIPC only draws 8x16 on lores","CHIP-48/SCHIP1.0 increment I only by X, SCHIP1.1/SCHIP-MODERN not at all","SCHIP-1.x and SCHIPC only support v0-v7 on a real HP48"]}
