mattmikolay / chip-8

A collection of CHIP-8 programs and documentation
MIT License
306 stars 10 forks source link

CHIP-8 extension for ETI-660 #2

Open zZeck opened 5 years ago

zZeck commented 5 years ago

It is described here https://archive.org/stream/ETIA1981/ETI%201981-11%20November#page/n115/mode/2up There is an instruction set description and sample programs. FX00 sets pitch of beep to VX.

I have the impression from https://www.reddit.com/r/retrobattlestations/comments/7npigb/dream_6800_build/ds3o6gp?utm_source=share&utm_medium=web2x this post that there may be more programs in other issues.

mattmikolay commented 5 years ago

Interesting! Thanks for sharing.

An unmodified COSMAC VIP was only capable of outputting sound at a single frequency; setting the pitch was not supported. I was not aware that the ETI-660's CHIP-8 instruction set includes an FX00 instruction to set the pitch of the sound timer.

The 00E0 instruction (to clear the screen) is also missing from this ETI-660 variant.

tobiasvl commented 5 years ago

00E0 is presumably missing from the "instruction set" table for the same reason as 00EE (which is mentioned right above the table, but not listed in the table itself): These two instructions were originally not CHIP-8 instructions per se, but machine code subroutines like the rest of the 0NNN "instructions"; those two were just the ones that were documented for the end-user.

There's obviously a very small difference between a CHIP-8 instruction and a documented machine code subroutine, but 00E0 and 00EE weren't special cases of the 0NNN "namespace" in any way, they were just machine code subroutines that were meant to be used by CHIP-8 programs.

Edit: Yep, 00E0 is mentioned on page 121 together with some other machine code subroutines that were not found on the original COSMAC VIP. For example, on the VIP 004B was "Turn the display on", while on the ETI-660 it seems to be 00F8.

tobiasvl commented 4 years ago

@zZeck:

I have the impression from https://www.reddit.com/r/retrobattlestations/comments/7npigb/dream_6800_build/ds3o6gp?utm_source=share&utm_medium=web2x this post that there may be more programs in other issues.

Indeed! I found several games in ETI issues published after 1981. The tricky thing is that they're usually just listed as "660 software". Here are two:

https://archive.org/stream/ETIA1982/ETI%201982-02%20February#page/n115/mode/2up

I'm thinking that at least the "kaleidoscope" program is actually a 660 port (since 660 CHIP-8 games were loaded at 0600 instead of 0200, they needed at least some modification) of Joe Weisbecker's own kaleidoscope program for the COSMAC VIP.

tobiasvl commented 4 years ago

Oh, and another interesting tidbit: Although it's never stated explicitly in the ETI issue linked above, this CHIP-8 interpreter did, in fact, have a resolution of 64 x 48!

This is clearer in the color expansion (ie. the ETI-660's version of the VIP's never-released CHIP-8C) detailed in Electronics Today International, April 1982, page 88.

zZeck commented 4 years ago

@tobiasvl Nice finds!

A little digression here:

660 Invaders hex: A6CD69386A08D9A3A6D06B006C03DBC3A6D6641D651FD4516700680F26A226AC48001622641E651CA6D3D4536E0066806D04EDA166FF6D05EDA166006D06EDA16601368026D8A6D0DBC3CD018BD4DBC33F001692A6CDD9A3CD013D006DFF79FED9A33F00168C4E00162EA6D3D4534500168675FF8464D4533F0116466D088D524D08168C169226AC78FF161E26A27705169626A2770F26A26D03FD18A6D3D4531686A6F8F733630026B600EEA6F8F833633226B600EE6D1BF265F029D3D57305F129D3D57305F229D3D500EE017CFE7C60F06040E0A0F8D46E016D10FD1800EE

660 Invaders is a port. The UFO.ch8 attributed Lutz V, 1992 floating around is a 200 entry version. The Lutz version is copied from an amiga fish disk that included chip 8 interpreter. This discussion between Lutz Vieweg and Andeas Gustafsson (chip48 author) indicates the program originates with RCA. Gustafsson says it came with his Telmac.

This is the amica fish disk with the chip 8 interpreter if anybody is curious. Open the CHIP8.lha with 7zip or similar. Author Paul Hayter. Some of the included programs start at 600 some start at 200. UFOIntercept starts at 200. You can tell by the ending number of the file name. Works in winuae high compatibility on the "most common" amiga 500 config. The chip8 programs were run length encoded (read chip8.doc). If you want to see what they look like make a ram dump file after loading the game. Search for the encoded file's content and the decoded data is above it.

patternmaker hex: 60006380611F620F2632A600F31EF00AF0554000161C7301330016086380A600F31EF0654000161C73014300161C2632161E400272FF400471FF4006710140087201A6776AE08A126B1F81B23A0072016AF08A226B0F82B23A0071016B1F81B2D1218A106B1F8B25DAB16A3F8A15DAB18B20DAB100EE01800000

"Patternmaker"/kaleidoscope is also on that amiga fish disk, and is this same 600 starting version (unused extra data at the end of the fish disk one possibly, but I may have over dumped it). You are correct it is an edit of Weisbecker's program. If you look close at the magazine scan in the archive, you can see they misprinted it, and somebody used a pen to fix the starting address problem.