The Visicom is a textphone for deaf people from the 80's. It has a keyboard, video output and built in modem. You could use it as a textphone using the textphone protocol or as a teletype (tty) using the built in modem.
I bought this at a thriftshop because it looked interesting.
I decided to crack it open and find out exactly what makes it tick. Detailed documentation can be found on my project page: http://8times8.eeems.me:81/project/software/visicom/
(http://8times8.eeems.me:81/project/software/visicom/media/visicom.png)
The built in keyboard.
(http://8times8.eeems.me:81/project/software/visicom/media/guts.jpg)
Guts
(http://8times8.eeems.me:81/project/software/visicom/media/video.jpg)
Video output. You're greeted with a dutch menu. This image shows B&W video, but there is a switch inside the device which enables 8 color video.
(http://8times8.eeems.me:81/project/software/visicom/media/romdump.jpg)
Rom reader device I built to dump the firmware. The disassembly can be found here: http://8times8.eeems.me:81/project/software/visicom/disassembly.php
I found an open-source disassembler written in Golang for the tms7001 microcontroller that is inside the visicom, but it was really buggy. I managed to fix a lot of the bugs even though I don't know Golang :P.
Using javascript I made all addresses operands links so you can jump by clicking them.
Wow nice, I think we have our official hardware hacker already up and running ! :D
That is awesome! Is the textphone protocol proprietary, or is it a standard protocol? If it is proprietary, will you reverse engineer it?
So they had some form of SMS way back in the 80's? Nice :P
Seriously though it's fun to see old hardware like this and knowing you do a lot of modding, I am interested to see what you will do with this ;)
Only €10 gives you a bunch of fun~ :D
Quote from: DJ Omnimaga on November 18, 2014, 03:16:50 AM
So they had some form of SMS way back in the 80's? Nice :P
Apparently. Also SMS exists ever since mobile phones do. :P
The textphone protocol is pretty straightforward. It uses dial tone sequences to transmit characters. In theory you could dial characters in by hand on a regular phone.\
More info about the textphone protocol can be found here:
http://8times8.eeems.me:81/project/software/visicom/#h8
I don't think it is proprietary.
Wow, if you already reversed this much then it's amazing. O.O
Quote from: aeTIos on November 18, 2014, 12:22:53 PM
Only €10 gives you a bunch of fun~ :D
It depends where you live nowadays, though. If you are unable to get your parts from the same seller and combine shipping, then you're in for $10-50 shipping per part. If you need to buy from 15 different international sellers, especially from America, and you live in Canada then you're in for between $150 and $700 worth of shipping fees, in addition to possible custom clearance fees if the post office figures out that the package is not a gift.
Quote from: DJ Omnimaga on November 18, 2014, 10:13:29 PM
Quote from: aeTIos on November 18, 2014, 12:22:53 PM
Only €10 gives you a bunch of fun~ :D
It depends where you live nowadays, though. If you are unable to get your parts from the same seller and combine shipping, then you're in for $10-50 shipping per part. If you need to buy from 15 different international sellers, especially from America, and you live in Canada then you're in for between $150 and $700 worth of shipping fees, in addition to possible custom clearance fees if the post office figures out that the package is not a gift.
I know right. Shipping and custom fees are awful. <_<
This is why sometimes I prefer to use local brick and mortal stores, since I will not only get the stuff immediately if I find it, but also no shipping. On the other hand, their prices are way higher since they have to cover extra costs (employee paychecks, the rent, equipment, etc) so you might still be in for over $100 worth of parts. Also, you have taxes, while if you are lucky online, you might not pay them, plus some stores check Ebay prices to fix theirs, so if an item on Ebay is $5 + $25 shipping then the store will charge $28 >.<
Hmmm that does suck but again, Keoni's stuff is all makeshift hacks from salvaged hardware. Well, a lot of it. :P
Mostly, yes :P
I'd like to be able to hack things like you do... Shame that my school classes have never leant me electronics... Your thing could be a neat tty for devices like calcs or RaspberryPi!
They did not teach me electronics in high-school. My profile-essay got me interested in electronics especially digital systems. (TI-nterface, remember?)
Ever since I have been into hobby electronics and reverse-engineering. If I manage to write a firmware for this thing I am sure I can use the internal modem to connect it and perhaps attached devices to the internet! They teach us Datacommunication at school this semester, so soon I will be an internet guru :P
Sadfully I don't have a lot of dexterity and electricity is kind of magic for me : I know the circuit basis but not so much when plugging things into said circuit.
There is this awesome thing called VHDL. It's hardware descriptive language. It allows you to create digital systems by typing in words on a keyboard. You can synthesize your designs and upload them to a configurable chip. The endresult is a chip that does exactly what you want. It's not software that's generated from your code, but hardware!
You could try that :D
I know chip like PIC are programmable. That's not a problem. I meant plugging chips, lamps or any thing that needs current without setting the house on fire or destroying the circuit with an error.
That's a different kind of programmable chip. Those chips have a cpu in them that runs software. You don't design the inner circuitry in order to make it do things.
Wow if you manage to run an IP stack on this thing it would be awesome. Telnet anyone ? :D
I believe it already has telnet in the firmware :)
I just need to somehow hook it up to the phone line.
'Should bring a BBS back here. Telnet codewalr.us ! :3
I believe Juju was working on something like that for Omnimaga.
Yeah, it should work with CodeWalrus too since we use the same forum software.
Is the Omni one still up?
No it is not. Juju shut it down for unknown reasons.
Ah ok, I wasn't sure who hosted it, but since it's him then I'm not surprised, considering he can't even afford internet at home althogether. >.<
Yeah that, plus I don't think it was fully functional anyway.
Yeah IIRC we could just login or something. Then I never heard about progress again.
Yeah, that's sad that project died before a full featured version. :/ This could have been a fun way to acces Omni whil still under low speed Internet access...
I took a closer look at the disassembly of the ISR for interrupt 1 and added some comments. I found out that there are two rx buffers: One for the modem and one for something hooked up to PIA1. I don't think it is the video chip.
isr1:
fae5 b8 PUSH A --
fae6 c8 PUSH B --
fae7 a7 01 80 13 BTJZP %>1,P128,@>fafe -- ACIA: If a byte was received
faeb 80 81 MOVP P129,A -- ACIA: Read received byte
faed 76 40 3c 35 BTJO %>64,R60,@>fb26 -- ? Discard byte if receive buffer is full
faf1 32 3d MOV R61,B -- ? Calculate offset in buffer
faf3 53 3f AND %63,B -- ? (Buffer size: 64 bytes)
faf5 ab 46 b2 STA @>46b2(B) -- ? Save byte to receive buffer
faf8 d3 3d INC R61 -- ? Increment byte counter
fafa d3 3c INC R60 -- ?
fafc e0 28 JMP @>fb26 -- ? Return from isr
label:
fafe a7 80 b1 29 BTJZP %>128,P177,@>fb2b -- ? If PIA2 triggered an IRQA1
fb02 80 b0 MOVP P176,A -- PIA2: Read data from PORTA
fb04 80 a0 MOVP P160,A -- PIA1: Read data from PORTA (? is value from PIA2 discarted? why?)
fb06 23 0f AND %15,A -- Get lowest 4 bits
fb08 76 20 3e 1a BTJO %>32,R62,@>fb26 -- ? Return if something happens
fb0c 32 3f MOV R63,B -- ? Calculate offset in buffer
fb0e 53 1f AND %31,B -- ? (Buffer size: 32 bytes)
fb10 ab 46 f2 STA @>46f2(B) -- ? Save byte to receive buffer
fb13 d3 3f INC R63 -- ? Increment byte counter
fb15 d3 3e INC R62 -- ?
fb17 73 bf 26 AND %191,R38 -- ?
fb1a 88 00 00 38 MOVD %>0000,R56 -- ?
fb1e 88 00 00 36 MOVD %>0000,R54 -- ?
fb22 88 00 00 41 MOVD %>0000,R65 -- ?
isr1_end1:
fb26 c9 POP B --
fb27 b9 POP A --
fb28 d5 46 CLR R70 -- ?
fb2a 0b RETI -- return from interrupt
label:
fb2b a7 80 b3 f7 BTJZP %>128,P179,@>fb26 -- ? If PIA2 triggered an IRQB1
fb2f 80 b2 MOVP P178,A -- PIA2: Read byte from PORTB
fb31 a2 04 b3 MOVP %4,P179 -- PIA2: PORTB output register is selected
fb34 e0 f0 JMP @>fb26 -- Return from isr
fb36 76 ff 2f 01 BTJO %>255,R47,@>fb3b --
fb3a 0b RETI -- return from interrupt
label:
fb3b d2 2f DEC R47 -- ? Decrement while R47 is not zero
fb3d dd 2d RRC R45 -- ? Get carry bit from DEC operation and rotate
fb3f dd 2e RRC R46 -- ? Rotate right R45/46
fb41 e3 04 JHS @>fb47 --
fb43 a3 f7 06 ANDP %247,P6 -- ? PORTB[3] = Carry flag
fb46 0b RETI -- return from interrupt
fb47 a4 08 06 ORP %8,P6
fb4a 0b RETI -- return from interrupt
Wait, those phones used assembly too? O.O
Not that I can dechiper it but it's interesting nonetheless. Sometimes, we don't realize that almost everything is a computer. >.<
Yeah this thing is almost a microcomputer. The only thing that is missing is a basic interpreter :P
I want to get my own software on it somehow. I was working on a pin adapter for my atari2600 cartridge which allows it to be used with the visicom.
For a demo I need to:
- Initialize the cpu,
- Initialize the PIA's
- Initialize the video chip
- Write to the video chip's character generator ram
- Write characters to the display
- Actually learn how to write TMS70xx assembly :P
That's right: I have been disassembling and reverse engineering w/o any knowledge of TMS70xx assembly. I learned a lot about it by looking at the disassembly though! I have not written a single line of TMS70xx assembly yet, but once I know how to do the first 5 things I will write code for it.
I know how to do most things in that list at this point. I have to look at the disassembly a bit more to make sure that I know how to do it. (Perhaps there are some hardware bugs that need to be fixed in software.)
So what's the CPU and its speed, as well as the RAM, in this thing?
Edit: The TMS70xx is rated at 5MHz, but it is clocked at 3,579545 MHz in the visicom. This is probably for timing reasons.
More specs can be found here:
http://8times8.eeems.me:81/project/software/visicom/#h1
Edit: I started probing around the board again. It appears that the ACIA is not hooked up to the modem. Instead it is used for serial communication. It is wired up to the DB25 connector at the back. I might be able to use this simple interface for debugging while I can't get video on the screen yet. It's quite easy to set the ACIA up for serial communications.
Ok thanks for the info :)
Pretty neat stuff!
Found out that there are even more bugs in the tms7000 disassembler. So far this is the list:
Disassembler bugs:
1. Relative jump addresses are not calculated properly
Status: fixed
Relative jump offset values are added to the PC after the instruction is fetched. When an instruction is 4 bytes long the total sum is:
> PC + 4 + offset (relative to the beginning of the instruction)
offset is a value ranging from -128 to 127
2. Something wrong with opcode a8. Disassembler output:
Status: unresolved
> f749 a8 d8 9a 12 MOVD %!>(uint16=55450)0012(B),R%!d(MISSING) --
> f6f3 a8 d8 c2 12 MOVD %!>(uint16=55490)0012(B),R%!d(MISSING) --
3. Unknown vectors at the end of the rom are actually trap vectors
Status: fixed
4. Interrupt handler labels are placed incorrectly.
Status: temporary fix: got rid of it altogether
5. Trap instructions are reversed
Status: fixed
6. Several missing opcodes
Status: unresolved
7. Wrong mnemonics with certain opcodes.
Status: unresolved
Ouch, sorry to hear. I hope this doesn't compromise your plans if you had projects with this Textphone. D:
Most of these are easy fixes, but I just have not got around to fix them all yet. Most of these bugs indicate a lack of understanding of the cpu. I don't think the creator of the disassembler new much about the tms7000 or he was just coding very sloppy and did not check if the disassembled code would result in the same code as before it was assembled.
I wrote a quick and dirty test to see if I can get my own code to work on the visicom. It will blink an LED if all goes well. Now I have to build a pin adapter for my atari2600 backup cartridge that fits in the rom socket.
The next thing I am planning to write is a simple monitor program. It will allow me to peek and poke around in various memory locations using a terminal program on my pc.
I am curious: Why an Atari 2600 cart in particular? Is it for compatibility reasons or is it just easier to work with for this particular hardware?
Just because it's the fastest way to get a rom onto this device with the hardware I have at my disposal.
Edit: Just finished building the pin adapter. The blinking light program works!
I have been busy figuring out how to use all the peripherals of the visicom. So far I can:
- Set up the serial clock generator.
- Control the MCU's internal I/O port.
- Use interrupts
- Read and write data over serial (using the ACIA)
- Read keystrokes from the keyboard
I solved some interrupt problems by looking at the disassembly. It seems like the people who designed this thing ran into the same problems as I did :P
Next I want to output characters on the screen.
(http://8times8.eeems.me:81/project/software/visicom/media/test.jpg)
You ruined a $700 Atari game?? O.O just kidding, good job so far.
Here is a sample of what the serial output looks like. After this boot message you can type text in the terminal and it will echo every character back. It does not process the input yet.
(http://8times8.eeems.me:81/project/software/visicom/media/terminal.png)
I am going to write a simple monitor program that allows me to read/write from/to memory locations. This way I can find out how certain aspects of the device work such as the video chip.
It would be cool if you ported Illusiat 81 to this :P
Also this needs an ASCII :walrii:
Started working on the monitor program. The source can be found here: https://github.com/keoni29/visicom
Wow this is progressing fast! O.O
RX buffer
User text input is now buffered. You can read bytes from the buffer sequentially as a stream. The buffer is 64 bytes long.
Serial and keyboard use the same input buffer, so the main program does not see the difference between my computer controlling it or the build-in keyboard. This makes things a bit easier.
TX
Serial output is still unbuffered, but I want to make a text output buffer as well. This could be useful if I want to print text to both the screen and serial without slowing down the main program.
How fast is text displayed?
Right now serial speed is 1200 baud for stability, but I might be able to crank it up to 19200.
1200 baud means about 110 characters per second.
Aw yess. Could set it to the 9600 bauds standard?
The crystal frequency used to drive the clock generator is slightly off, so the closest thing to 9600 is 9560 baud. It might be fine. I am gonna test this in a bit.
Edit: Sending data with this slight difference in baud rate works fine, but receiving it results in some errors. I should get a crystal with the right frequency.
The frequency it runs on at the moment is 4,4336MHz and what I need is 4,4544MHz. I bet they used this crystal frequency because it was used a lot in television equipment, so it was cheap and close enough.
I just pushed todays commits to the monitor program. It can now detect bad user input and it will respond adequately :trollface:
Monitor syntax
- Valid characters are 0-9 and A-F and spaces as separator characters.
- Valid hexadecimal needs to be a multiple of two characters long.
Example of good input:
4000 12 3456 AB CD EF
12AB65cd33 6692aB
Example of bad input & punishment:
Hello
?
help
?
h
?
:q!
?
001 55 Ab
?
0001 55 Ab C
?
???????
?
MAKE IT STOP
?
You should make it so that you lose THE GAME :trollface:
Too many characters. Only got 4k to work with at the moment.
How does THE GAME doesn't fit in 4K? <_< (no I didn't mean to include the trollface :P)
"YOU LOST\n" 10 bytes. Sold. (edit because I forgot the null character)
I have plans of porting the operating system I have on my cbs6000 and z820 to the visicom. Because these three machines have different cpu architectures the OS has to be written from scratch every time.
Hey
@Keoni29 nice to see you again. I was wondering if school and stuff would allow you to come back. Glad you plan to port the cbs6000/z820 OS to the visicom, but it sucks that you have to do it >.<. Good luck!
I still have plenty of school stuff to do, but much less than before, so I am taking on some projects again.
Good luck Keoni having your way with projects and school! ;)
It _is_ the time of the year for school things, i've noticed .-.
Yeah, that's the end of line for our projects and the start of the lesson hell for the exams to come.
Quote from: Cumred_Snektron on April 12, 2015, 11:28:56 AM
It _is_ the time of the year for school things, i've noticed .-.
September as well, especially in USA where people take the ACT and SAT IIRC. Most calc help forums get fairly busy during the second half of August and early September, then again in October, while project-oriented forums gets busy in November and March (and sometimes July as well if one year in particular a forum has many users that don't go out as much :P)
I'm glad I'm out of school now. I was really tired of all the work I had to do outside school. At least with a job you usually work hard at work, then once your work shift has ended, it's over. On the other hand, some jobs are much more demanding physically.