| 1 | # POKEY |
| 2 | |
| 3 | a sound and input chip developed by Atari for their 8-bit computers (Atari 400, 800, XL/XE and so on). 4 channels of signature Atari sounds. |
| 4 | |
| 5 | ## effects |
| 6 | |
| 7 | - `10xx`: **set waveform.** |
| 8 | - 0: harsh noise (poly5+17) |
| 9 | - 1: square buzz (poly5) |
| 10 | - 2: weird noise (poly4+5) |
| 11 | - 3: square buzz (poly5) |
| 12 | - 4: soft noise (poly17) |
| 13 | - 5: square |
| 14 | - 6: bass (poly4) |
| 15 | - 7: buzz (poly4) |
| 16 | - `11xx`: **set AUDCTL.** `xx` is a bitmask. |
| 17 | - bit 7: 9-bit poly mode. shortens noise. |
| 18 | - bit 6: high channel 1 clock (~1.79MHz on NTSC). |
| 19 | - overrides 15KHz mode. |
| 20 | - bit 5: high channel 3 clock (~1.79MHz on NTSC). |
| 21 | - overrides 15KHz mode. |
| 22 | - bit 4: join channels 1 and 2 for a wide period range. |
| 23 | - use with conjunction with bit 6. |
| 24 | - channel 2 becomes inaccessible when this is on. |
| 25 | - bit 3: join channels 3 and 4 for a wide period range. |
| 26 | - use with conjunction with bit 5. |
| 27 | - channel 4 becomes inaccessible when this is on. |
| 28 | - bit 2: high-pass filter (channels 1 and 3). |
| 29 | - filtered output on channel 1 (I suggest you to set channel 3 volume to 0). |
| 30 | - use for PWM effects (not automatic!). |
| 31 | - bit 1: high-pass filter (channels 2 and 4). |
| 32 | - filtered output on channel 2 (I suggest you to set channel 4 volume to 0). |
| 33 | - use for PWM effects (not automatic!). |
| 34 | - bit 0: 15KHz mode. |
| 35 | - `12xx`: **toggle two-tone mode.** |
| 36 | - when enabled, channel 2 modulates channel 1 in an oscillator sync-like manner. |
| 37 | - only on ASAP core. |
| 38 | |
| 39 | ## info |
| 40 | |
| 41 | this chip uses the [POKEY](../4-instrument/pokey.md) instrument editor. |
| 42 | |
| 43 | when two channels are joined for filtered output, the channel bar will show `filter` on a bracket tying them together. |
| 44 | |
| 45 | when two channels are joined for wide period range, the channel bar will show `16-bit` on a bracket tying them together. |
| 46 | |
| 47 | ## ROM export |
| 48 | |
| 49 | a song can be exported as SAP-R, a compressed register dump. more details on the format are available (in Polish) at [its page on the Atariki wiki](http://atariki.krap.pl/index.php/SAP_%28format_pliku%29). |
| 50 | |
| 51 | ## chip config |
| 52 | |
| 53 | the following options are available in the Chip Manager window: |
| 54 | |
| 55 | - **PAL**: run the chip at PAL clock (1.77MHz) instead of NTSC (1.79MHz). |