LC8953: Difference between revisions
mNo edit summary |
m (Details about chip tech) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[File:cd2_lc8953.jpg|right|thumb|Sanyo LC8953 [[68k]] peripherial controller chip found on a CDM3-2 board.]] | [[File:cd2_lc8953.jpg|right|thumb|Sanyo LC8953 [[68k]] peripherial controller chip found on a {{PCB|NEO-CDM3-2 board}}.]] | ||
Sanyo | Mysterious Sanyo [[68k]] programmable controller used in CD systems, also known as "PUPPET". Handles DMA, [[68k interrupts]] and communication with the [[LC89515]]. It was later replaced by a {{Chipname|LC98000}}. | ||
= | =MPDMAC (DMA)= | ||
Incomplete | The datasheet describes a 16 instructions long microcode program which can be loaded into the chip to perform DMA operations. There is no public documentation of the instruction set and all open source emulators use HLE to simulate it. The datasheet specifies that comparison and conditional jumps are possible. | ||
The programs are 18 bytes (16x 9 bit instructions) loaded by the [[system ROM]] for each type of transfer needed. | |||
==Loading programs== | |||
* Set [[Memory mapped registers|$FF0061]] to $00 | |||
* Write microcode in words from $FF0080 to $FF008E | |||
* Set source, destination and count registers as needed | |||
* Set $FF0061 to $40 to start transfer | |||
==Reverse engineering== | |||
The chip is a very large LC92200 gate array, which could be reverse engineered optically. | |||
The following programs come from the top-loading CDM 4-x and [[CDZ]] system ROM as part of the [[system self-test]]: | |||
==Word fill== | |||
Same program on CDM 4-x and CDZ. | |||
Parameters: | |||
* $FF0064: 32bit destination | |||
* $FF006C: 16bit word to fill with | |||
* $FF0070: 32bit length in words | |||
<pre> | |||
dc.w $FFDD,$FCF5,$92F6,$2602,$FDFF,$FFFF,$FCF5,$8AF0,$1609 | |||
111111111 1FF NOP/Wait ? | |||
101110111 177 | |||
111100111 1E7 End if 0 ? | |||
101011001 159 | |||
001011110 05E | |||
110001001 189 | |||
100000001 101 | |||
011111101 0FD | |||
111111111 1FF NOP/Wait ? | |||
111111111 1FF NOP/Wait ? | |||
111111111 1FF NOP/Wait ? | |||
111001111 1CF | |||
010110001 0B1 | |||
010111100 0BC | |||
000001011 00B Store ? | |||
000001001 009 | |||
</pre> | |||
==Word copy== | |||
Parameters: | |||
* $FF0064: 32bit source | |||
* $FF0068: 32bit destination | |||
* $FF0070: 32bit length in words | |||
===CDM 4-x=== | |||
<pre> | |||
dc.w $FE6D,$FCF5,$82BF,$F693,$BF29,$02FD,$FFFF,$F97D,$FCF5 | |||
111111100 1FC | |||
110110111 1B7 | |||
111100111 1E7 End if 0 ? | |||
101011000 158 | |||
001010111 057 | |||
111111101 1FD | |||
101001001 149 | |||
110111111 1BF | |||
001010010 052 | |||
000001011 00B Store ? | |||
111101111 1EF | |||
111111111 1FF NOP/Wait ? | |||
111111111 1FF NOP/Wait ? | |||
001011111 05F | |||
011111110 0FE | |||
011110101 0F5 | |||
</pre> | |||
===CDZ=== | |||
<pre> | |||
dc.w $FE3D,$FCF5,$82BF,$93BF,$F629,$02FD,$FFFF,$F17D,$FCF5 | |||
111111100 1FC | |||
011110111 0F7 | |||
111100111 1E7 End if 0 ? | |||
101011000 158 | |||
001010111 057 | |||
111100100 1E4 | |||
111011111 1DF | |||
111110110 1F6 | |||
001010010 052 | |||
000001011 00B Store ? | |||
111101111 1EF | |||
111111111 1FF NOP/Wait ? | |||
111111110 1FE | |||
001011111 05F | |||
011111110 0FE | |||
011110101 0F5 | |||
</pre> | |||
==Address fill== | |||
Same program on CDM 4-x and CDZ. | |||
Parameters: | |||
* $FF0064: 32bit destination | |||
* $FF0070: 32bit length in longwords | |||
<pre> | |||
dc.w $FEF5,$FCF5,$92E8,$BE96,$F629,$02FD,$FFFF,$FC3D,$FCF5 | |||
111111101 1FD | |||
111010111 1D7 | |||
111100111 1E7 End if 0 ? | |||
101011001 159 | |||
001011101 05D | |||
000101111 02F | |||
101001011 14B | |||
011110110 0F6 | |||
001010010 052 | |||
000001011 00B Store ? | |||
111101111 1EF | |||
111111111 1FF NOP/Wait ? | |||
111111111 1FF NOP/Wait ? | |||
100001111 10F | |||
011111110 0FE | |||
011110101 0F5 | |||
</pre> | |||
==Byte copy== | |||
Used to copy data to 8bit memory, such as PCM RAM. | |||
* Read word from source | |||
* Swap word | |||
* Write word to destination | |||
* Swap word again | |||
* Write word to destination + 2 | |||
* source += 2, destination += 4 | |||
* Repeat (length) times | |||
Parameters: | |||
* $FF0064: 32bit source | |||
* $FF0068: 32bit destination | |||
* $FF0070: 32bit length in words (as in pairs of bytes) | |||
===CDM 4-x=== | |||
<pre> | |||
dc.w $F2DD,$FCF5,$82F6,$93DA,$BE93,$DABE,$2C02,$FDFF,$FFCD | |||
111100101 1E5 | |||
101110111 177 | |||
111100111 1E7 End if 0 ? | |||
101011000 158 | |||
001011110 05E | |||
110100100 1A4 | |||
111101101 1ED | |||
010111110 0BE | |||
100100111 127 | |||
101101010 16A | |||
111110001 1F1 | |||
011000000 0C0 | |||
001011111 05F | |||
101111111 17F | |||
111111111 1FF NOP/Wait ? | |||
111001101 1CD | |||
</pre> | |||
===CDZ=== | |||
<pre> | |||
dc.w $E2DD,$FCF5,$82BE,$93DA,$BE93,$DABE,$F62D,$02FD,$FFFF | |||
111000101 1C5 | |||
101110111 177 | |||
111100111 1E7 End if 0 ? | |||
101011000 158 | |||
001010111 057 | |||
110100100 1A4 | |||
111101101 1ED | |||
010111110 0BE | |||
100100111 127 | |||
101101010 16A | |||
111110111 1F7 | |||
101100010 162 | |||
110100000 1A0 | |||
010111111 0BF | |||
011111111 0FF | |||
111111111 1FF NOP/Wait ? | |||
</pre> | |||
=IRQs= | |||
The programmable [[68k interrupts|interrupt]] controller is used to generate the new vectored interrupts needed by the CD systems. DMA is used to copy each CD sector into [[68k user RAM|work RAM]] and an interrupt is generated to signal the end of the transfer. This is emulated at least by MESS. | |||
=Datasheet= | |||
Incomplete datasheet with pinout: [[http://www.datasheetcatalog.org/datasheet/sanyo/ds_pdf_e/LC8953.pdf]] | |||
Both publicly available datasheets for the LC8953 and LC98000 ICs are incomplete and US Sanyo representatives aren't aware of the existence of more detailed documents. | |||
[[Category:Chips]] | [[Category:Chips]] | ||
[[Category:CD systems]] |
Latest revision as of 14:06, 24 January 2021
Mysterious Sanyo 68k programmable controller used in CD systems, also known as "PUPPET". Handles DMA, 68k interrupts and communication with the LC89515. It was later replaced by a LC98000.
MPDMAC (DMA)
The datasheet describes a 16 instructions long microcode program which can be loaded into the chip to perform DMA operations. There is no public documentation of the instruction set and all open source emulators use HLE to simulate it. The datasheet specifies that comparison and conditional jumps are possible.
The programs are 18 bytes (16x 9 bit instructions) loaded by the system ROM for each type of transfer needed.
Loading programs
- Set $FF0061 to $00
- Write microcode in words from $FF0080 to $FF008E
- Set source, destination and count registers as needed
- Set $FF0061 to $40 to start transfer
Reverse engineering
The chip is a very large LC92200 gate array, which could be reverse engineered optically.
The following programs come from the top-loading CDM 4-x and CDZ system ROM as part of the system self-test:
Word fill
Same program on CDM 4-x and CDZ.
Parameters:
- $FF0064: 32bit destination
- $FF006C: 16bit word to fill with
- $FF0070: 32bit length in words
dc.w $FFDD,$FCF5,$92F6,$2602,$FDFF,$FFFF,$FCF5,$8AF0,$1609 111111111 1FF NOP/Wait ? 101110111 177 111100111 1E7 End if 0 ? 101011001 159 001011110 05E 110001001 189 100000001 101 011111101 0FD 111111111 1FF NOP/Wait ? 111111111 1FF NOP/Wait ? 111111111 1FF NOP/Wait ? 111001111 1CF 010110001 0B1 010111100 0BC 000001011 00B Store ? 000001001 009
Word copy
Parameters:
- $FF0064: 32bit source
- $FF0068: 32bit destination
- $FF0070: 32bit length in words
CDM 4-x
dc.w $FE6D,$FCF5,$82BF,$F693,$BF29,$02FD,$FFFF,$F97D,$FCF5 111111100 1FC 110110111 1B7 111100111 1E7 End if 0 ? 101011000 158 001010111 057 111111101 1FD 101001001 149 110111111 1BF 001010010 052 000001011 00B Store ? 111101111 1EF 111111111 1FF NOP/Wait ? 111111111 1FF NOP/Wait ? 001011111 05F 011111110 0FE 011110101 0F5
CDZ
dc.w $FE3D,$FCF5,$82BF,$93BF,$F629,$02FD,$FFFF,$F17D,$FCF5 111111100 1FC 011110111 0F7 111100111 1E7 End if 0 ? 101011000 158 001010111 057 111100100 1E4 111011111 1DF 111110110 1F6 001010010 052 000001011 00B Store ? 111101111 1EF 111111111 1FF NOP/Wait ? 111111110 1FE 001011111 05F 011111110 0FE 011110101 0F5
Address fill
Same program on CDM 4-x and CDZ.
Parameters:
- $FF0064: 32bit destination
- $FF0070: 32bit length in longwords
dc.w $FEF5,$FCF5,$92E8,$BE96,$F629,$02FD,$FFFF,$FC3D,$FCF5 111111101 1FD 111010111 1D7 111100111 1E7 End if 0 ? 101011001 159 001011101 05D 000101111 02F 101001011 14B 011110110 0F6 001010010 052 000001011 00B Store ? 111101111 1EF 111111111 1FF NOP/Wait ? 111111111 1FF NOP/Wait ? 100001111 10F 011111110 0FE 011110101 0F5
Byte copy
Used to copy data to 8bit memory, such as PCM RAM.
- Read word from source
- Swap word
- Write word to destination
- Swap word again
- Write word to destination + 2
- source += 2, destination += 4
- Repeat (length) times
Parameters:
- $FF0064: 32bit source
- $FF0068: 32bit destination
- $FF0070: 32bit length in words (as in pairs of bytes)
CDM 4-x
dc.w $F2DD,$FCF5,$82F6,$93DA,$BE93,$DABE,$2C02,$FDFF,$FFCD 111100101 1E5 101110111 177 111100111 1E7 End if 0 ? 101011000 158 001011110 05E 110100100 1A4 111101101 1ED 010111110 0BE 100100111 127 101101010 16A 111110001 1F1 011000000 0C0 001011111 05F 101111111 17F 111111111 1FF NOP/Wait ? 111001101 1CD
CDZ
dc.w $E2DD,$FCF5,$82BE,$93DA,$BE93,$DABE,$F62D,$02FD,$FFFF 111000101 1C5 101110111 177 111100111 1E7 End if 0 ? 101011000 158 001010111 057 110100100 1A4 111101101 1ED 010111110 0BE 100100111 127 101101010 16A 111110111 1F7 101100010 162 110100000 1A0 010111111 0BF 011111111 0FF 111111111 1FF NOP/Wait ?
IRQs
The programmable interrupt controller is used to generate the new vectored interrupts needed by the CD systems. DMA is used to copy each CD sector into work RAM and an interrupt is generated to signal the end of the transfer. This is emulated at least by MESS.
Datasheet
Incomplete datasheet with pinout: [[1]] Both publicly available datasheets for the LC8953 and LC98000 ICs are incomplete and US Sanyo representatives aren't aware of the existence of more detailed documents.