|
| 1 | +# BUTCH Register Map ($DFFF00 - $DFFF2F) |
| 2 | + |
| 3 | +Reference for the Jaguar CD BUTCH chip registers. Derived from MiSTer FPGA |
| 4 | +(`butch.v`, `butch_i2s.v`), MAME (`jaguar.cpp`), ChillyWilly JaguarLibs, and |
| 5 | +Atari Jaguar Technical Reference Manual. |
| 6 | + |
| 7 | +## $DFFF00 - BUTCH (Interrupt Control Register, R/W) |
| 8 | + |
| 9 | +### Write bits (longword) |
| 10 | +| Bit | Name | Description | |
| 11 | +|-----|------|-------------| |
| 12 | +| 0 | MASTER_EN | Master IRQ enable (must be 1 for any BUTCH interrupt) | |
| 13 | +| 1 | FIFO_EN | CD data FIFO half-full interrupt enable | |
| 14 | +| 2 | SUBFRAME_EN | CD subcode frame-time interrupt enable (~7ms at 2x) | |
| 15 | +| 3 | SUBMATCH_EN | Pre-set subcode time-match found interrupt enable | |
| 16 | +| 4 | TX_EN | CD module command TX buffer empty interrupt enable | |
| 17 | +| 5 | RX_EN | CD module command RX buffer full interrupt enable | |
| 18 | +| 6 | CIRC_EN | CIRC failure interrupt enable | |
| 19 | +| 17 | CD_RESET | CD reset | |
| 20 | +| 18 | BIOS_OVRD | CD BIOS override (BUTCH handles cart-space addresses) | |
| 21 | +| 19 | LID_RESET | CD open-lid reset | |
| 22 | +| 20 | CART_RESET | CD cartridge-pull reset | |
| 23 | + |
| 24 | +### Read bits (longword) |
| 25 | +| Bit | Name | Description | |
| 26 | +|-----|------|-------------| |
| 27 | +| 9 | FIFO_HALF | CD data FIFO half-full (>= 8 entries) | |
| 28 | +| 10 | SUBCODE_PEND | Subcode frame pending | |
| 29 | +| 11 | FRAME_PEND | Frame pending (set if cdPlaying) | |
| 30 | +| 12 | TX_EMPTY | Command to CD drive pending (TX buffer empty if 1) | |
| 31 | +| 13 | RX_FULL | Response from CD drive pending (RX buffer full if 1) | |
| 32 | +| 14 | CD_ERROR | CD uncorrectable data error pending | |
| 33 | + |
| 34 | +### Interrupt generation (from MiSTer butch.v) |
| 35 | +``` |
| 36 | +eint = bit0 && (fifo_int || frame_int || sub_int || tbuf_int || rbuf_int) |
| 37 | +
|
| 38 | +fifo_int = bit9 && bit1 // FIFO half-full status AND enable |
| 39 | +frame_int = bit10 && bit2 // Frame status AND enable |
| 40 | +sub_int = bit11 && bit3 // Subcode status AND enable |
| 41 | +tbuf_int = bit12 && bit4 // TX empty status AND enable |
| 42 | +rbuf_int = bit13 && bit5 // RX full status AND enable |
| 43 | +``` |
| 44 | + |
| 45 | +## $DFFF04 - DSCNTRL (DSA Control Register, R/W) |
| 46 | +- Bit 16: Enable DSA bus |
| 47 | +- Reading clears bit 12 (TX buffer empty) in BUTCH status register |
| 48 | + |
| 49 | +## $DFFF0A - DS_DATA (DSA TX/RX Data, R/W, 16-bit) |
| 50 | + |
| 51 | +### DSA Commands (write) |
| 52 | +| Cmd | Description | Parameter | |
| 53 | +|-----|-------------|-----------| |
| 54 | +| $01nn | Play title | Track number (hex) | |
| 55 | +| $0200 | Stop | - | |
| 56 | +| $03nn | Read TOC | Session number | |
| 57 | +| $0400 | Pause | - | |
| 58 | +| $0500 | Pause release | - | |
| 59 | +| $10nn | Goto time (min) | Minutes (hex) | |
| 60 | +| $11nn | Goto time (sec) | Seconds (hex) | |
| 61 | +| $12nn | Goto time + start | Frames (hex, triggers seek) | |
| 62 | +| $14nn | Read long TOC | Session number | |
| 63 | +| $15nn | Set mode | Mode bits (bit 3 = CD-ROM mode) | |
| 64 | +| $18nn | Spin up | Session number | |
| 65 | +| $5000 | Get disc status | - | |
| 66 | +| $51nn | Set volume | Volume level | |
| 67 | +| $5400 | Get max session | - (returns session count) | |
| 68 | +| $70nn | Set DAC mode | Oversampling mode | |
| 69 | + |
| 70 | +### DSA Responses (read) |
| 71 | +| Response | Description | |
| 72 | +|----------|-------------| |
| 73 | +| $0100 | Found (seek complete) | |
| 74 | +| $0200 | Stopped | |
| 75 | +| $03nn | Disc status | |
| 76 | +| $04nn | Error code | |
| 77 | +| $10nn | Current title (track number) | |
| 78 | +| $20nn-$24nn | TOC values: min track, max track, leadout M/S/F | |
| 79 | + |
| 80 | +## $DFFF10 - I2CNTRL (I2S Bus Control Register, R/W) |
| 81 | +| Bit | Name | Description | |
| 82 | +|-----|------|-------------| |
| 83 | +| 0 | I2S_DRIVE | I2S drive enable (I2S output from BUTCH active) | |
| 84 | +| 1 | I2S_JERRY | I2S path to Jerry enabled | |
| 85 | +| 2 | FIFO_EN | FIFO enabled (gates samples into software-readable FIFO) | |
| 86 | +| 3 | MODE_16 | 16-bit mode (vs 32-bit I2S word format) | |
| 87 | +| 4 | FIFO_NE | FIFO not empty (read-only, `wptr != rptr`) | |
| 88 | + |
| 89 | +Writing bit 2 high in CD-ROM mode triggers `splay` (playback start). |
| 90 | + |
| 91 | +## $DFFF14 - SBCNTRL (Subcode Control, R/W) |
| 92 | +Reading clears pending subcode and frame interrupts. |
| 93 | + |
| 94 | +## $DFFF18 - SUBDATA (Subcode Data A, R) |
| 95 | +## $DFFF1C - SUBDATB (Subcode Data B, R) |
| 96 | +Sub-Q channel data. |
| 97 | + |
| 98 | +## $DFFF20 - SB_TIME (Subcode Time + Compare Enable, R/W) |
| 99 | + |
| 100 | +## $DFFF24 - FIFO_DATA / I2SDAT1 (I2S FIFO Data, R) |
| 101 | +## $DFFF28 - I2SDAT2 (I2S FIFO Data, R) |
| 102 | + |
| 103 | +Both addresses read from the **same 16-deep circular FIFO**. Each entry is a |
| 104 | +32-bit word (left+right 16-bit samples). The BIOS reads by alternating between |
| 105 | +$DFFF24 and $DFFF28 -- each read pops one 32-bit entry. |
| 106 | + |
| 107 | +The BIOS reads 8 longwords per interrupt (16 word-reads = 32 bytes of data). |
| 108 | + |
| 109 | +## $DFFF2C - EEPROM (NM93C14 EEPROM Interface, R/W) |
| 110 | +| Bit | Name | Description | |
| 111 | +|-----|------|-------------| |
| 112 | +| 0 | CS | Chip Select | |
| 113 | +| 1 | SK | Clock | |
| 114 | +| 2 | DO | Data Out (to EEPROM) | |
| 115 | +| 3 | DI | Data In / Busy (from EEPROM, read-only) | |
0 commit comments