MIDIbox TIA Manuel utilisateur

2020/10/19 18:41 1/34 MIDIbox TIA
MIDIbox - http://www.midibox.org/dokuwiki/
MIDIbox TIA
What is it?
The Television Interface Adaptor (TIA) is the custom chip that is the heart of the Atari 2600 game
console, generating the screen display, sound effects, and reading input controller.
Stella = Name (by its maker) of Atari hardware design engineer Joe Decuir's bicycle
TIA = Television Interface Adapter
Where do i find this chip?
You can easily find an old and used console on the web. Atari 2600 on eBay
Atari 2600 Models and Clones
On the motherboard:
Have a look at 2600 Connection site to find it.
TIA = “Stella” = MM9031N = UM6525N = CO10444 = CO10444D (NTSC, U.S.A. & SECAM, France)
TIA = “Stella” = UM6526P1 = CO11903 (PAL, Europe + Australia + most of the rest of the world)

Last update: 2020/10/19 11:18 midibox_tia http://www.midibox.org/dokuwiki/doku.php?id=midibox_tia
http://www.midibox.org/dokuwiki/ Printed on 2020/10/19 18:41
Why? and "What would be the point?"
I'm probably a bit nostalgic for a time I played the game console in the living room of my parent.
Need electronic sounds that have traumatized my childhood.
Midibox is the best way to integrate these original sounds in electronic music environment.
The point is it's fun, i can do it, it sounds great, it has a unique sound. Don't think it could only be
useful for making chip-tunes/8-bit music, that's a limited horizon.
I love the sounds of sound chips and game controllers from the 70/80/90's but I don't make (or
particularly like) video game music.
I make techno (minimal) and find the sounds from this source are perfect for that…
MIDIbox TIA Module
Introduction
The TIA is an MOS integrated circuit designed to interface between an eight (8) bit microprocessor
and a television video modulator and to convert eight (8) bit parallel data into serial outputs for the
color, luminosity, and composite sync required by a video modulator.
This circuit operates on a line by line basis, always outputting the same information every television
line unless new data is written into it by the microprocessor.
When I started this project, there were two main structures of a MIDIbox, SEQ or SYNTH oriented.
My conclusion was that the skeleton and features of MB-SID version 1 were best suited to the TIA and
its own possibilities.
Atari 2600 References
Atari 2600 hardware schematics PAL/NTSC
TIA technical information
TIA schematics
Firmware version 1 is devoid of Control Surface.
“Full CS looks great, like on SID, but is also more expensive to build I think your solution with a
controller patch works great, it's easy and intuitive to have it all there on the screen”Eptheca
… Yes it's my choice , I've preferred to develop a MaxMspCycling'74 patch to manage and control it, as
one of my first desire was to get the beast in a game cartridge enclosure.
I decided to case it in a cartridge, because it makes this project a tiny one, easy to build and cheap. In
short, an accessible start-up project, which need reasonable time to realize, share and present
correctly.
So I focused all my attention to the Software Engine adaptation and the implementation of Sysex and
CC#.

2020/10/19 18:41 3/34 MIDIbox TIA
MIDIbox - http://www.midibox.org/dokuwiki/
Moreover, this MaxMsp Patch has been declined in Midi Device for Live with Max4Liveableton , and now I
access for complete automation of the box.
Max and Live do not lack of alternatives in terms of CS. Both Standalone and Device manager are iPad
ready.
Like the SID Module, TIA is connected with a serial link to port J10 of the Core module via
shiftregisters.
Module use 5v core power supply.
Firmware is only made for 18f4685. We need enough space in flash for the sampler option.
Like the Pokey, TIA is clocked to 3.58MHz(NTSC) or 3.54MHz(PAL). You can use an oscillator but my
choice was to recycle the console parts, like Xtal and the couple of transistors which are on the atari
motherboard.
TIA and Shiftregisters
As seen in “How>Registers Address”, we don't
need to use all adress and data pins.
Pins A5, D5, D6, D7, CS0#, CS2#, CS3# must be
grounded.
Pins A4, CS1 must be connected to 5V.
We use only Address lines A0-A3, Data lines D0-
D4 and WR# line.
Divided by 3 Clock output 00 must be connected
to input 02.
Schematic
In TK Style:

Last update: 2020/10/19 11:18 midibox_tia http://www.midibox.org/dokuwiki/doku.php?id=midibox_tia
http://www.midibox.org/dokuwiki/ Printed on 2020/10/19 18:41
mbhp_tia_v1.pdf
Parts List
Part Value Type Qty Mouser Ref
IC1 TIA UM6826P1/C010444D 1 /
IC2-IC3 74HC595N 74HC595N 2 595-SN74HC595N
T1,T2 2N3906 transistor-pnp 2 750-2N3906-G
Q1 3.58Mhz XTAL 1 520-HCU357-17DNX
R1 91 resistor 1 291-91-RC
R2 1K resistor 1 291-1K-RC
R3-R6 220 resistor 2 291-220-RC
R4 240 resistor 1 291-240-RC
R5 2k2 resistor 1 291-2.2K-RC
R7-R8 1K8 resistor 2 291-1.8K-RC
C1 10nF Capacitor Ceram 1
C2-C3 10µF Capacitor Pol 2 647-USV1V100MFD
C4-C5 100nF Capacitor Ceram 2 80-C412C104K5R
J1 CORE CON JP3Q 1
J2 AUD-CON JP2E 1
J3 AUD-CONF JP3Q 1

2020/10/19 18:41 5/34 MIDIbox TIA
MIDIbox - http://www.midibox.org/dokuwiki/
PCB files
I made a lot of breadboards and
stripboards before first cartridge
prototype.
It's really easy but i prepared an Eagle
Project for people who want design .
Maybe it will be usefull to replace the
clock section by an Oscillator.
Atari TIA Eagle Library
mbhp_tia_v1 Eagle Project
*.sch is ready, *.brd is consistent but in airwires state… If somebody have done(or wanna do) this
work, i will be happy to publish it and complete this section.
.
TIA Setup
Necessary Hardware:
MIDIbox CORE PIC 8bit.Remember, Only for 18F4685.
MIDIbox TIA Module or equivalent.
Hardware Options
Up to 8 BankSticks. 32K and 64K could be mixed (4 Banks per BS with 64 or 128 presets per
Bank).
Bank Name store and retrieve.
LED Meter 2*4(cartridge version).
Connection to Core
TIA Module pin Core pin Pic pin nr
J1:Vs ground -
J1:SO J10:SO 24

Last update: 2020/10/19 11:18 midibox_tia http://www.midibox.org/dokuwiki/doku.php?id=midibox_tia
http://www.midibox.org/dokuwiki/ Printed on 2020/10/19 18:41
TIA Module pin Core pin Pic pin nr
J1:RC J10:RC 23
J1:MU J10:MU 29
J1:MD J10:MD 28
J1:Vc +5v -
Features
Due to the TIA capabilities, the MIDIbox software provides almost the entire features of the synth
engine. And it do it fine .
Modulation Wheel.
After-Touch.
Volume for each Voice.
Waveform select for each Voice.
Transpose for each Voice.
Pitch Range & Pitch Bend for each Voice.
Delay for each Voice.
Portamento for each Voice.
Independents Constant Time Slide enable for portamento.
Arpeggiator for each Voice
Independents MIDI Sync Enable for LFOs/ENVs/ARPs.
Master Volume.
2 independents Velocities (with CC# or/and Amplitude assign).
2 full independents and dedicated Envelopes with Modulation Type, MIDI Sync and curve assign.
One by Voice (No internal envelope in a TIA). Assignable to Amplitude or pitch.
4 full independents LFOs with MIDI Sync.
2 full independents ENVs with MIDI Sync.
6*4 Matrix, LFOs/ENVs to amplitude or pitch.
Keyboard Extended Option with note offset and note length values.
GSA.
MIDI Send Clock.
Synchronization
The 3.58 MHz oscillator also clocks a divide by three counter on this chip whose output (1.19 Mhz) is
buffered to drive an output pad called 00. This pad provides the input phase zero clock to the
microprocessor which then produces the system 02 clock (1.19 Mhz).
Data and addressing
Registers on this chip are addressed by the microprocessor as part of its overall RAM-ROM memory
space. The attached table of read-write addresses summarizes the addressable functions. There are
no registers that are both read and write. Some addresses however are both read and write, with
write data going into one register and read data returning from a different register.
If the read-write line is low, the data bits indicated in this table will be written into the addressed write
location when the 02 clock goes from high to low. Some registers are eight bits wide, some only one
bit, and some (strobes) have no bits, performing only control functions (such as resets) when their

2020/10/19 18:41 7/34 MIDIbox TIA
MIDIbox - http://www.midibox.org/dokuwiki/
address is written. If the read-write line is high, the addressed location can be read by the
microprocessor on data lines 6 and 7 while the 02 clock is high.
Two (2) independent audio generating circuits are included, each with programmable frequency,
noise content, and volume control registers.
Voice 1 is Aud0 and Voice 2 is Aud1 in the Stella programmer's guide.
Audio Circuit
Synthesis:
There are two audio circuits for generating sound. They are identical but completely independent and
can be operated simultaneously to produce sound effects through the TV speaker. Each audio circuit
has three registers that control a noise-tone generator (what kind of sound), a frequency selection
(high or low pitch of the sound), and a volume control.
Each audio circuit consists of parts described below:
Audio Output:
A few references of TIA have a separated output for each voice (pin 12 & 13).
In General, the two voices are added to the same output (pin 13), pin 12 became a special pin, is used
for video carrier frequency modulation.
I think it's the oldest consoles(Six Buttons Model) which has separated outputs.
Separated outputs TIA models:
C010444D-19
One Output TIA models:
UM6526P1
AMI C011903
Tell me yours
Registers Address

Last update: 2020/10/19 11:18 midibox_tia http://www.midibox.org/dokuwiki/doku.php?id=midibox_tia
http://www.midibox.org/dokuwiki/ Printed on 2020/10/19 18:41
Those two audio generators use 6 registers:
AUDCx (4bit), Waveform control(x2)
AUDFx (5bit), Pitch control(x2)
AUDVx (4bit), Volume control(x2)
AUDx registers adresses start @ 0x15 (21)
0x15= 010101
0x16= 010110
0x17= 010111
0x18= 011000
0x19= 011001
0x1a= 011010
So we need 4 bit of address only. And 5 bit max
for data (AUDFx).
Data bit 7,6,5 and Adress bit 5 are cleared.
Adress bit 4 is set.
Waveform & Noise Control:
The noise-tone generator is controlled by writing to the 4 bit audio control registers (AUDC0, AUDC1).
The values written cause different kinds of sounds to be generated. Some are pure tones like a flute,
others have various “noise” content like a rocket motor or explosion.
This circuit contains a nine bit shift counter which may be controlled by the output code from a four
bit audio control register(AUDC), and is clocked by the frequency select circuit. The control register
can be loaded by the microprocessor at any time, and selects different shift counter feedback taps
and count lengths to produce a variety of noise and tone qualities.
Even though the TIA hardware manual lists the sounds created by each value, some experimentation
will be necessary to find “your sound”.

2020/10/19 18:41 9/34 MIDIbox TIA
MIDIbox - http://www.midibox.org/dokuwiki/
These are 16 in number (4 bits). But
some are the same or are silent. So only
10 waveforms are available.
Pitch Control:
Frequency selection is controlled by writing to a 5 bit audio frequency register (AUDF0, AUDF1).
The value written is used to divide a 30KHz reference frequency creating higher or lower pitch of
whatever type of sound is created by the noise-tone generator.
Clock pulses (at approximately 30 KHz) from the horizontal sync counter pass through a divide by N
circuit which is controlled by the output code from a five bit frequency register (AUDF). This register
can be loaded (written) by the microprocessor at any time, and causes the 30 KHz clocks to be
divided by 1 (code 00000) through 32 (code 11111). This produces pulses that are digitally adjustable
from approximately 30 KHz to 1 KHz and are used to clock the noise-tone generator.
By combining the pure tones available from the noise-tone generator with frequency selection a wide
range of tones can be generated.
On PAL/SECAM Atari models, sounds will drop a little in pitch (frequency) because of a slower crystal
clock.
5 bits so This registers are limited to
32 values
Value needs to be reversed!
Volume Control:
Volume is controlled by writing to a 4 bit audio volume register (AUDV0, AUDV1).
The shift counter output is used to drive the audio output pad through four driver transistors that are
graduated in size. Each transistor is twice as large as the previous one and is enable by one bit from
the audio volume register (AUDV). This audio volume register may be loaded by the microprocessor at
any time. As binary codes 0 through 15 are loaded, the pad drive transistors are enabled in a binary
sequence. The shift counter output therefore can pull down on the audio output pad with 16

Last update: 2020/10/19 11:18 midibox_tia http://www.midibox.org/dokuwiki/doku.php?id=midibox_tia
http://www.midibox.org/dokuwiki/ Printed on 2020/10/19 18:41
selectable impedance levels.
Writing 0 to these registers turns sound off completely, and writing any value up to 15 increases the
volume accordingly.
16 levels (4 bits).
Precompiled setups in the FW:
o setup_tia_base.hex (TIA Base setup for
Module)
o setup_tia_cartridge.hex (TIA setup for
Cartridge version)
Details (What have been done?)
Amplitude Specifics
Unlike the SID, TIA does not have internal gate and envelope.
So I wrote a specific section for TIA Amplitude (volume) in tia_sw.inc.
TIA_SW_Amp function handles AUDVx registers, calculates Amplitude from Parameters:
Master Volume.
Voice Volume.
GSA
Velocity.
Dedicated Envelope (to Amp).
Modulation Matrix (to Amp).
Copy_Amp, Engine Value to TIA register (done after all other amplitude process) :
0 ≤ AUDVx ≤ 31(4bit)
0 ≤ AMP ≤ 0x7f(7bit) AUDVx =
AMP » 3
Table des matières

















