Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted (edited)

Dear all,

this is what I came up with recently (focus is on the lower right ...):

1280x670.jpg

Executive Summary

  • In this project, a 1981 TI99/4A is connected via its speech synthesizer module to Technic Control Interface A from 1986/7 using a simple bidirectional 8-bit latch parallel port interface comprised of two 74LS373 TTL ICs from the same era
  • No address decoding required, instead, the PCB in the synthesizer is slightly modified and all required lines (D0 – D7), LR#, LW#, WE#, GND, +5V are wired to the empty upper compartment of the synthesizer module
  • Direct access from TI BASIC (1979; mini memory module required) or TI Extended BASIC (1981; XB module required as well as a 32k memory expansion module)
  • The interface is in full compliance with Evan Koblentz’ challenge, announced earlier here on EB as well as on his website, see below.
  • A preliminary video showing the TI99/4A + synthesizer module in action is here: It shows my prototype board (which is now on perfboard in the TI's synthesizer module). In action means, there is speech synthesis and parallel output to 6 LEDs and 2 TTL inputs (which go directly 1:1 to #9750). I hate taking videos, as I constantly screw up, but will try to make a somewhat decent one …
  • EDIT: Video ^^ is on Youtube:

And here is the full boring story:

During a trip to the US (SoCal) in May/June this year, I “accidentally” ;) googled “TI99” …

Spoiler

Back in 1982, these were my two “dream computers”: The IBM PC and the TI99. The look of the TI99 console with this shiny metal polish always stood out in ads published in nerd-magazines. Cost-wise, both were not only unaffordable for me, but simply in a another universe. In 2023, Evan (@evank) wrote me in a personal communication that 99ers were readily available in the US – and rather cheap. Well I am living in Germany, and when I had a quick glance here, I thought: Nope, financial headquarters will not approve such an investment for another “old computer” … and forgot about it. But this year in the US, it was all different!

When I looked at the (numerous!) hits for my “TI99” search, including one offer for a TI99/4A with speech synthesizer, 2 power supplies, 3 ROM cartridges including “Extended TI BASIC”, the RF generator, and some manuals for $80, voices in my head began to whisper: Do it. Just do, fool! So I did. I also looked at my suitcase – which was rather small … but: The BIG parcel arrived in-time. It turned out that everything was nicely and very securely packed up. The TI99 looked beautiful, as did the rest … I was in heaven. And yes, some personal items needed to stay in the US. I never turned on the computer while in the US, as I always disassemble any vintage electronics first, then every part gets a gentle clean, treatment with Kontakt 60 spray and cleaner and so on ...

1280x906.jpg

... and then the main board is powered on – I carefully watch for popping capacitors and such. In this case, nothing popped, thus full reassembly was next. After making a proper video cable and hooking up the TI99 to a (modern) LCD TV/monitor, which swallows NTSC as well as PAL video signals) this came up:

800x1067.jpg

… so here we go again: Motivated by Evan’s 9750 EuroBricks hacking challenge, I tried to get my 1982 dream computer TI99/4A in touch with TLG’s LEGO Interface A (#9750), what else to do with it ;) And yes, my posts in this regard may be annoying, but so are super cars. Or Cada stuff, BuWizz problems, ++$600 sets – of course >only< to me. Here is to feeling good! :pir-huzzah2:

The TI99/4A is “beautifully weird” and a very nicely designed system, I fell totally in love with. I have these feelings after thorough studies of corresponding circuit diagrams and inspecting the main board myself. I had no idea what the story was back in the days; I did not know why TI entered the home computer frenzy ship in 1979 with the TI99/4 and abandoned it in late 1983, when they stopped manufacturing the TI99/4A, nor that 16-bit TMS9900 processors existed, and that the TI could speak … I do know now and it is truly a breathtaking story. Also the “inner logic” of the TI99 around the CPU is almost bizarre, but when diving deeper, it really is a very cool approach, descending from the concepts of making mini computers. As said, I never had one, nor saw one in reality before early summer 2024.

Evan’s challenge rules are

  1. hack computers from 1992 and earlier, that were not endorsed by TLG to operate LEGO Technic Control Interface A #9750 (endorsed were: IBM PC, Apple ][, BBC Micro, Commodore C64, Philips P2000)
  2. only use contemporary hardware components up-to 1992;
  3. only use emulators on modern machines, but with no additional features other than available up-to 1992. This 1992 threshold originates from TLG’s release of their Interface B in 1993, which changed “everything”, details are on Evan’s website (https://www.brickhacks.com/2.php)
  4. For my very own purpose, I added a 4th rule: The Interface A must be operated with the BASIC language that came with the respective computer

The latter is just my personal rule, as it a) makes it much easier to write programs for operating #9750 in contrast to using assembly; b) virtually all BASIC dialects have almost identical instruction sets, particularly PEEK, POKE, and or IN(), OUT, to get access to the hardware components of the system; c) assembly, which is a way more powerful language, both in terms of code execution speed and hardware accessibility, is mostly specific to CPUs due to their different internal hardware structure, as are the accompanying assemblers, linkers, and other software. I do speak Zilog Z80 assembly, but I had a hard time getting used to Intel’s 8086/8 assembly, and for Motorola’s 68000 (used in my Atari 1040 ST and others), I simply lost it. For the 99er, with its Texas Instrument TMS9900 CPU, everything is once again largely different … and I simply don’t have the time to learn all this stuff … well not yet ;)

OK, enough story telling: What is the cheapest and appropriate hardware approach (cf. challenge rule 2) for getting parallel access to the 6 output and 2 input lines of #9750 in TI BASIC? Well – none! That was it, story was over. Why? Because TI BASIC (from 1979) does not have a POKE, nor an OUT or equivalent command. You can PEEK around, but no, no POKE. Back in the days, there may have been good reasons for that …

But wait, there is more (there always is) … there is TI Extended BASIC, released in 1981 as ROM cartridge. And bingo, now we’ve got CALL LOAD (address, byte), which is the equivalent to POKE address, byte … but only when you have the 32k memory extension attached as well ... or if you have the TI mini memory cartridge, which also adds CALL LOAD to your commands, but without any other needs. I was lucky enough, to purchase an original TI mini memory cartridge for €40 from a >very< nice individual living in Berlin! Thank you very much again, Daniel!!!

So I was all set, original hardware wise. On to hacking … it took me a while to figure out the “inner logic” of the address decoding within the console, particularly because the TMS9900 processor is a true 16-bit CPU! When interacting with peripherals though, the 8-bit world is back, by doing … things, I still don’t understand. All I know for sure is: The TI99 uses an 8-bit wide data bus to talk to its speech synthesizer box, an add-on that came with my machine. And that CALL LOAD and CALL PEEK have direct access to this thing, i.e., its memory mapped address space: One can read data from the synthesizer at address 0x9000 and write to it at address 0x9400. So the documents say.

With some further study of the circuit diagrams of the console as well as the speech module and most importantly, this website (http://www.unige.ch/medecine/nouspikel/ti99/titech.htm), which is an invaluable resource, I finally came up with these ideas:

  1. Use the speech synthesizer box as enclosure for my “TI 9750 interface” in the way, TI originally planned it: Slide-in hardware speech extensions into the upper compartment. Well, the upper compartment with that little door is empty, nor are there any sockets; in other words, TI never released anything that may slide in there. The circuit board with the synthesizer’s electronics is located in the lower compartment. I read that TI planned to extend the speech capabilities of the synthesizer with additional “speech ROM modules”, but before they actually made that happen, they found out a way more flexible approach using software … so no one wanted to book that room up there in the synthesizer, but me.
  2. As the full I/O bus including all address, data, and control lines of the TI console are fed through (and also into) the speech synthesizer’s PCB, everything is available within the synthesizer box; no reason to hack the console. When you attach the speech module to the console, the I/O bus is replicated on its other side, and more peripherals can be attached (parallel/serial interfaces, disk controllers, modems, etc. pp.). There is one exception: the +5V line is not, as the power consumption of the different additional original TI hardware extensions was simply too high for the console’s power supply. However, when you only want to power a modern 32k memory extension, just solder a wire from one side of the synthesizer PCB to the other. I did that.

So, here’s the plan:1280x662.jpg

Circuit diagram of some of the address decoding sections of the TI console and synthesizer module (blue boxes), and my added two 8-bit transparent D-latches (74LS373) interfacing to #9750, along with a 4 x NOR gate 74LS02 TTL chip. Note that only one NOR gate is used. Here are the console and synthesizer circuit diagrams I used for my project. The former is actually a large collection of diagrams of the TI console and some peripherals. The weird CON notation is just describing my wires going from the PCB into the upper (empty) compartment of the synthesizer module.

Address decoding in the TI99/synthesizer system (useful for hacking …)

The logic of the IBM PC/#9771 combo has been described before, and is summarized (again :pir_wacko:) in the hidden section below, where the corresponding TMS9900 CPU lines are used for the description. The thing is: The TMS9900 has no IOREQ# equivalent; all I/O access is via memory mapping (which may be wrong: I simply have no clue, how this A15/CRU stuff works, and most importantly how I would invoke/apply/use it from BASIC. Furthermore, there is no RAMCS# or ROMCS# input as on the ZX computers, which is really useful on systems with unresolved address space. The TI99 is no exception in this regard – out of the box, its address space is not fully resolved, see below.

Spoiler

I wanted this interface to act more or less in the same way as TLG’s #9771 card for IBM PCs does: Upon 1) emitting the correct address, 2) MEMEN# going low, 3) putting the data bits on the data bus (of which 0 -5 are recognized by #9771), and finally 4) WE# going low, the C line of the “output 74LS373” goes H and thus it mirrors the content on the 6 D lines connected directly to the data bus >transparently< to the corresponding 6 Q outputs, which are connected directly to #9750. As there is no change on the data bus as long as WE# = L, all emitted data are securely latched, when WE# goes H again (i.e., the C input of 74LS373 goes L). No more changes of the output lines are possible until the next complete write cycle. OC# of the output 74LS373 is connected to GND = L and thus the chip has always activated outputs.

In the IBM/#9771 system a read cycle is equivalent on the TI99 to: When 1) the correct address present, 2) MEMEN# = L, and 3) DBIN = H the CPU reads the data currently present on the data bus. On #9771, the C input as well as the OC# chip enable input of the “read” 74LS373 are tied together. When OC# = L; the chip is enabled; when it is H, the outputs are in “tristate”, i.e. not visible on the data bus. All inputs remain active though. When C and OC# = H (wrong address, no MEMEN# = L, no DBIN = H) the outputs of the “read” 74LS373 are in tristate but the D-inputs follow (transparently) the data bus content. When C and OC = L, data on the D inputs are immediately latched (no more changes are recognized) and the outputs are activated, mirroring the D line content very shortly before C became L for the time of the DBIN signal = H (i.e., CPU fetches the data on the data bus). The moment DBIN goes back to L (data have been read by the CPU), the “read” 74LS373 goes again into tristate.

Notes: MEMEN# is equivalent to MEREQ# or IOREQ# on Z80/808X CPUs; DBIN to RD#, WE# to WR#. The “#” denotes active low.

With reference to the above circuit diagram, I figured out a rather simple route to make use of the present address decoding hardware in the console and synthesizer module for additional memory mapped hardware, without screwing up the system – and without using assembly. In essence, I am hacking the synthesizer module, there are no changes to the console. The minor hardware change, without compromising the functionality of the synthesizer(!) is: A cut of one trace on the synthesizer’s PCB: Remove GND from pin 3 (C input) of U3 = 3-to-8 decoder 74LS138. And then connect this pin to address line A14[A1]:

800x506.jpg

Note on usage of weird notation A14[A1]: For some reason, the TI engineers back in the days decided to use a different notation for their address and data bus lines: In contrast to every other vendor, TI denotes the most significant address bit as A0, and the least significant bit as A15. This is exactly the other way around in all other computer systems known to me. The same holds true for the data bus. I am thus using the notation A15[A0], where the bracketed bit denoting what it is outside of TI universe.

Here is how the address decoding for the synthesizer works in the original configuration (you can read much more about that here): The speech synthesizer chip TMS5220 has, among many other things, two inputs, RS# (L = CPU reads data from synthesizer) and WS# (L = CPU writes data to synthesizer). Both cannot be L at the same time; thus there is a dedicated read address and a write address, respectively. These signals are generated by U3 = 74LS138 (3-to-8 decoder) in the synthesizer – this chip selects only two outputs: Q2# and Q3#. No other Q# outputs are used – in other words they are free! The output enable dependencies for U3 are: A15[A0] = H; RESET# = H (which is always the case when there is no trouble). The inputs A and B (C is bolted to GND = L) select the active output Q#: Possible combinations in the original configuration are:

400x339.jpg

Table 1: “-“ = not connected/no function; SBE = speech block enable;  RS#: read from speech chip; WS# write to speech chip.
Note, that A5 = [A10] in the non-TI world.

That’s it; Q#4 – Q#7 cannot be addressed, as input C is always L. And here comes the hack: Remove input C from GND = L, and hook it up to A14[A1]. This is all and changes the output selection to:

400x571.jpg

Table 2: LR# = LEGO 9750 read; LR# = LEGO 9750 write, my fancy addition of synonyms …

Now we need to have a look at the address decoding inside the TI99 console; on pin 2 of the I/O port, the above mentioned SBE signal is provided, which indicates CPU wants to address/access the synthesizer module. The NAND gate U506b in the console “combines” the outputs Q4# and Q5# of U505 (74LS138 3-to-8 decoder) generating the SBE signal: When either one of the output is selected (= L), SBE = H. When none are selected (= H), SBE = L; and finally both cannot be selected. Regarding the enable inputs of U505: Q4# of U504 (again a 74LS138) needs to be selected = L and A15[A0] needs to be L. The third enable input is active H; the NAND gate U506a combines A5[A10] and DBIN in the following manner (DBIN = H indicates a read data request from the CPU): When the CPU has issued such a request, DBIN = H and thus A5[A10] needs to be L, otherwise the outputs of U505 are disabled (are all = H). When DBIN = L, A5[A10] needs to be H for a write data request. The outputs Q4# or Q5# are selected, when A3[A12] = H, A4[A11] = L, and A5[A10] = L for read and H for write, see above. Finally, for selection of Q4# = L on U504, MEMEN# (memory accesses enable) needs to be L, A0[A15] = H, A1[A14] = L, and A2[A13] = L.

All this results in the following table for read/write access to my interface connecting the TI99 to #9750, preserving full access to the speech synthesizer:

1280x250.jpg

Table 3: X = L or H, thus the addresses are mirrored (i.e., are not fully decoded) every 4 times in the address range shown in the last column.

Using this approach, we now have two (+ all mirror!) new addresses: 0x9002 for reading data from the LEGO #9750 interface and 0x9402 for writing data to the interface. As DBIN is already tied into the address decoding logic, C and OC# of the corresponding 74LS373 input latch (IC1 in the circuit diagram above) are both connected to Q6# of U3 = LR#. For the 74LS373 output latch (IC2), we need a positive signal on the C input, which is “composed” using Q7# of U3 = LW# AND WE# (write enable) from the I/O bus of the TI99. This is done with the 4 x NOR gate 74LS02 chip, but only IC3a is used. NOR gates behave as AND gates in negative logic, so LW# NOR WE# = H, that’s exactly what we need: Only when both inputs are L, the gate output is H, in all other cases L.

The 74LS373s are wired as in the #9771 card for the IBM and many other simple 8-bit I/O solutions from back in the days. I used it for my ZX and Amstrad interfaces as well.

Lastly, PEEKing and POKEing in TI BASIC is again a little different than for the computer systems I played with: In the address range 0x0000 – 0x7FFF (0 – 32767) it works as “everywhere”, e.g.: CALL PEEK (32767,variable). Above that address range (and the speech synthesizer’s addresses are located above 32767), one needs to subtract 0x10000 (65536) from the address you wish to PEEK/POKE: CALL LOAD (-27646,0) is equivalent to POKE 37890,0 (which is 0x9402, our write address for #9750). If we want to read data from #9750, we need address 0x9002, which is 36866; subtracting 65536 yields -28670 and thus CALL PEEK (-28670,variable) is used in TI and Extended TI BASIC programs to do that. If you like to read more about this approach, here is one source

And finally, here are some pictures:

800x291.jpg

Above: Disassembled synthesizer module

800x2041.jpg

Above: CON lines soldered to freely accessible soldering spots. Yellow wires = D0-D7, white = WE#, yellow/white = LR#, yellow/green = LW#, whatever color (I am color blind) = A14[A1], red = +5V, black = GND. Missing: WE# - I simply forgot that line on first try and almost gave up, because nothing worked as intended. Then, when walking our dog, it just occured to me ... when you want to write data, you need to tell your chippies so ...

800x503.jpg

Above: Perfbord attached to the connector, the top white connector was glued to the 12 others; this is the missing WE# line :pir-blush:
The left 10 x 2 pins attach to the Interface A with the original cable.

800x418.jpg

Above: Synthesizer module.
Bottom connector: Replicated I/O port of the console - this is where my 32k expansion attaches to and is also powered from.
Top left: Connector for Interface A and 74LS02 trying to figure out, what's going on ...

800x618.jpg

Above: Synthesizer module attached to console, with interface for #9750 extension under the hood and original LEGO cable for connecting to #9750 attached ...

In summary, we can add another computer system from the 1980’s, which was not endorsed by TLG, to @evank's challenge (and https://www.brickhacks.com/2.php);

The TI99/4A.

All the best,
Thorsten

P.S.: Will try to make a video proof soon!!! Done

Edited by Toastie
Not 42 but close enough typos - there are more, there always is
Posted

I just wanted to say that even though I never really understand what you're talking about in these posts, I always enjoy reading/skimming through them, mostly just because of your enthusiasm and good attitude! The topics definitely feel like an outlier on the forum, but I'm glad to have them, so thanks for sharing!

Posted
5 hours ago, 2GodBDGlory said:

I always enjoy reading/skimming through them, mostly just because of your enthusiasm and good attitude!

:pir-cry_happy: Thank you very much for your comment - I never expected such a reply, and I really appreciate that!

To be honest: I have no clue, how you guys are making all these Technic wonders presented in this forum - but I do skim, read, and mostly admire the pictures shown or discussions going on here.

All the best,
Thorsten

Posted
8 minutes ago, evank said:

You used the speech synth module?

Hi Evan,

yeah - the speech synthesizer has this 74LS138, which decodes only 2 out of 8 outputs (6 are ... not used, what a crime!) and has one freely available output selection input (C), when you free it from ground (that is another crime, actually; I believe with good lawyers, you have a case here :pir-laugh:) - and then you don't need any further address decoding hardware. 

This simply means you don't need to tap into the (almost full range 16-bit) address bus, which would add a painful soldering frenzy, just look at #9771 ...

And the speech synthesizer still synthesizes CALL SAY("TEXAS INSTRUMENTS") without glitch :pir-huzzah2:

Best,
Thorsten

 

 

Posted

This post makes me absurdly happy.  The TI99/4A was my family's first computer and just seeing the title screen brings back so many memories.  I never got into digital electronics until much, much later (like early 2010s), so I never got into the hardware underneath it, but now desperately want to.  I am totally jealous. 

 

Posted
16 hours ago, sporadic said:

seeing the title screen brings back so many memories

Thank you very much for your comment!

It is always this, isn't it? The moment, a more than 40 years old computer produces its welcome screen ... it happened to me a number of times over the past year; but only the 99er shows this friendly colorful screen, as if it wants to motivate you. As said, I saw that for the first time in my 62 years old life in June 2024 and thought: WOW, now this is a friendly computer ... all others I have, show boring stuff like a one letter prompt, a copyright line, count memory up and ask for date and time, or just jump into a graphical user interface ... but the TI tells you: Hey, it's a nice and colorful day. Press any key!

I love it!

Best,
Thorsten

 

Posted

This is really neat @Toastie! I, as @2GodBDGlory do not comprehend the entirety of the details you presented, but I have one question: the light sequence was counting in binary, correct?

I took a digital electronics course during my first year of college so I have a good base knowledge of some of these things.

Posted (edited)

@Fluwoeb

Thank you very much! I am repeatedly surprised, and much more so honored, that you guys even take the time to write! It really is nerdy stuff - and much more so, soo old school ...

Yes, this is directly showing how the machine handles e.g. decimal numbers, which I do "for/next loop" in the BASIC code on an 8-bit wide data bus, which is exposed on the I/O port of the TI99. It counts to only 63 (and not 255) because the Interface A has only 6 outputs, directly responding to the CPU data bus (bits 0 to 5). The bits 6 and 7 of the data bus are used for the two sensor inputs of the Interface A.

On the screen, left column, the variable N of the FOR N=0 TO 3 loop (with speech and text output), 0 TO 10 (with text output only), and finally 0 TO 63 with no visible output at all (where you can see how fast the TI Extended BASIC is!!!) is shown. In each loop, the status of the interface is read back, and then either "spoken" and printed on the screen on the right column (0 TO 3), printed on the screen only (0 TO 10), or not printed at all (0 TO 63).

BASIC "prints" the decimal value of N; on the 8-bit wide I/O data bus the binary status of N is present:

  0 = 0000 0000
  1 = 0000 0001
  2 = 0000 0010
  3 = 0000 0011 ...
63 = 0011 1111.

You are absolutely right!

All the best,
Thorsten

   

Edited by Toastie
Posted
9 hours ago, Toastie said:

It really is nerdy stuff - and much more so, soo old school ...

I love nerdy, old school things! Learned programming in Pascal and it's still my fav. language despite switching to C++ long ago.

The electronics side of things is way over my head but this is truly fascinating stuff!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...