AP2000

Discuss the reverse engineering and emulation (as opposed to simulation) of any sort of Prevue hardware, including Atari-based and Amiga-based EPG channels and the Amiga-based Prevue/TV Guide channels.
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

tin wrote:OK so I think I have figured at least something.

What I suspect is the RX pin of the serial port is pushed through a nand gate, a serial UART and a BCD/binary to decimal/octal translator (it doens't matter which actually as we only use the first 3 states). I *THINK* (based on very little knowledge - I am brand new to this kind of reverse engineering) that means that the raw serial code sets some lines based on the binary version of the code then the BCD/decimal converter turns just ONE line on based on the value that came through.

As far as I can work out then 0x01 sets pin 6 of the ISA bus, 0x02 sets pin 8 and 0x03 sets pin 15. After I wrote this I remembered something like this has been said before, searched and found it ties in exactly with what you said before (even though I never saw the Amiga send back 0x01 etc)

*SO* the audio switching *IS* done over the ISA bus but in a bit more of a mechanical way than I thought, it just sets one of the 3 pins high, that the audio demod switches to.

<edit> LOL I see you edited while I was typing - edited accordingly.
Yay, now you REALLY figured it out :D
Do you think that's the only thing that happens from the RX pin?

Also, any comments on my bit-banging theory? (Or anyone have any thoughts on how I can get audio to 5.8/6.2/6.8MHz? I should probably ask swest)
tin
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Re: AP2000

Post by tin »

No. There is something else, related to the contact switching. I *THINK* that involves bit 6 (if you count bits from 1 to 8 as they are referred to on the chip) so 1,2,3 affect the audio and bit 6 affects the contact closure for external VCR or whatever.

0x01 = 0000 0001 = pin 6
0x02 = 0000 0010 = pin 8
0x03 = 0000 0011 = pin 15

so I presume you can do this. ALTHOUGH obviously the audio gets completely switched out if you play back video, so I'm not sure what exactly happens in practice.

0x33 = 0010 0001 = relay on + pin 6
0x34 = 0010 0010 = relay on + pin 8
0x35 = 0010 0011 = relay on + pin 15

The other thing that's a bit odd is the first 3 bits of the UART are connected to the BCD converter, meaning it can do values up to 0x07, but we only use values up to 0x03. Why they connected the 3rd bit is not clear to me yet.

<edit> Oh I also noted it appears to me that GND and RTS pins on the demod card serial port are reversed from the usual standard (standard GND = 5, RTS = 7). Possible hardware frying and custom serial lead required it would appear. Could you check the pinouts of the cable if/when you get chance?
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

tin wrote:No. There is something else, related to the contact switching. I *THINK* that involves bit 6 (if you count bits from 1 to 8 as they are referred to on the chip) so 1,2,3 affect the audio and bit 6 affects the contact closure for external VCR or whatever.

0x01 = 0000 0001 = pin 6
0x02 = 0000 0010 = pin 8
0x03 = 0000 0011 = pin 15

so I presume you can do this. ALTHOUGH obviously the audio gets completely switched out if you play back video, so I'm not sure what exactly happens in practice.

0x33 = 0010 0001 = relay on + pin 6
0x34 = 0010 0010 = relay on + pin 8
0x35 = 0010 0011 = relay on + pin 15

The other thing that's a bit odd is the first 3 bits of the UART are connected to the BCD converter, meaning it can do values up to 0x07, but we only use values up to 0x03. Why they connected the 3rd bit is not clear to me yet.
Interesting! I was wondering what that relay is for. So you think the top two ports on the punchblock are connected to the relay and go to the VCR if applicable?
<edit> Oh I also noted it appears to me that GND and RTS pins on the demod card serial port are reversed from the usual standard (standard GND = 5, RTS = 7). Possible hardware frying and custom serial lead required it would appear. Could you check the pinouts of the cable if/when you get chance?
Crap! Thanks for warning me! Unfortunately, I can't check the pinouts of anything, since I didn't get the original serial cable with the machine. Maybe I should wire up my own serial cable by using pin jumper cables between the two ports instead of using a standard one. I wonder why the heck they would be so crazy as to swap the RTS and GND pins?? I hope no one has already killed the card that way. In my pictures, you may notice that the "control data" light is on - as soon as I turn the machine on, the control data light starts blinking like crazy for some reason, as if it is receiving data, even though nothing is hooked up to it.

Maybe it's a good thing I was unable to get the serial cable until today.

(By the way, the control data thing is kinda cool. Basically it's just a sticker that is put in front of the usual "Power/Hard Disk" indicator, and you unplug the LED from the hard drive and plug it instead into a port on the data demodulator.)

UPDATE: I just remembered, I did briefly hook my computer up to the demod card with a regular serial cable to see if it was sending anything. :/
tin
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Re: AP2000

Post by tin »

Control data LED is wired to the 3 pin connector on the demod board right? Not sure why it would be flickering away as it's just a LED connected to a transistor and the RTS pin of the serial port. However if it is fried it might explain. However as these seem pretty basic radio -> data converters, perhaps it's just picking up interference as data. That in itself would be interesting to see what the Amiga makes of the "data"!

Not sure why the DB9 is backwards for the GND and RTS pins. Could be a mistake in my reverse engineering (think not though, I checked a couple of times), a mistake in the design of the card, or could well be done on purpose. I _think_ a standard cable with the two pins swapped will be fine. I am not actually sure there would be hardware frying as the pin is GND so it probably would just not work rather than fry.

The two ports are definitely connected to the relay, these are easy to see on the PCB traces. Actually, that pin 7 of the serial port is connected to GND is probably easy to see as well. That just depends on if I have assumed right where pin 7 of the physical port is soldered to the card.

Regard audio - what I suspect from what I think I know, if you could just get standard audio and pitch shift it to the relevant frequency, would this not be enough? AFAIK from the term "baseband" actually the signal has already been demodulated by the satellite receiver and the 5 tuners on the 2 cards just tune into the relevant centre frequency for the required audio (left, right, background, 2400 data, 110 data)

<edit> BTW if you can get a full hires version of the pics I will annotate and post here for you to reference.
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

tin wrote:Control data LED is wired to the 3 pin connector on the demod board right? Not sure why it would be flickering away as it's just a LED connected to a transistor and the RTS pin of the serial port. However if it is fried it might explain. However as these seem pretty basic radio -> data converters, perhaps it's just picking up interference as data. That in itself would be interesting to see what the Amiga makes of the "data"!
Interestingly, the random flashing stops as soon as I plug in the serial cable. I don't know if that's because it's shorting something out, or what, but when I unplug it, the light starts flashing again.
The two ports are definitely connected to the relay, these are easy to see on the PCB traces. Actually, that pin 7 of the serial port is connected to GND is probably easy to see as well. That just depends on if I have assumed right where pin 7 of the physical port is soldered to the card.
You're right, it's pretty clear :p
Regard audio - what I suspect from what I think I know, if you could just get standard audio and pitch shift it to the relevant frequency, would this not be enough? AFAIK from the term "baseband" actually the signal has already been demodulated by the satellite receiver and the 5 tuners on the 2 cards just tune into the relevant centre frequency for the required audio (left, right, background, 2400 data, 110 data)
Right... What kind of hardware do you think I could repurpose to shift it up to that frequency though?
<edit> BTW if you can get a full hires version of the pics I will annotate and post here for you to reference.
Will do!
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

Uhh, WHOA.

As soon as I plug the data demod card into the Amiga's serial port, the DATA counter starts going up. It must be some sort of random data, as you say. The C counter seems to hover around 20, but every once in a while it jumps. MAX reads 99, and DATA overruns increases every once in a while. Of course, DATA Cmds remains at 000000000, and so does CErrs.

CTRL remains 00000.

When I pressed the 1 key on the diagnostic screen to change the audio, I heard an audible click from one of the cards. I don't hear anything when I press the buttons now though.
tin
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Re: AP2000

Post by tin »

AriX wrote:Uhh, WHOA.

As soon as I plug the data demod card into the Amiga's serial port, the DATA counter starts going up. It must be some sort of random data, as you say. The C counter seems to hover around 20, but every once in a while it jumps. MAX reads 99, and DATA overruns increases every once in a while. Of course, DATA Cmds remains at 000000000, and so does CErrs.

CTRL remains 00000.

When I pressed the 1 key on the diagnostic screen to change the audio, I heard an audible click from one of the cards. I don't hear anything when I press the buttons now though.
You did the pin-5 pin-7 swap? if not then CTRL won't count anyway.
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

tin wrote:
AriX wrote:Uhh, WHOA.

As soon as I plug the data demod card into the Amiga's serial port, the DATA counter starts going up. It must be some sort of random data, as you say. The C counter seems to hover around 20, but every once in a while it jumps. MAX reads 99, and DATA overruns increases every once in a while. Of course, DATA Cmds remains at 000000000, and so does CErrs.

CTRL remains 00000.

When I pressed the 1 key on the diagnostic screen to change the audio, I heard an audible click from one of the cards. I don't hear anything when I press the buttons now though.
You did the pin-5 pin-7 swap? if not then CTRL won't count anyway.
Nope, I didn't. Good point.

I'm seeing some other interesting stuff now - when an external video source is plugged into the genlock, keys 5-8 have an effect. Key 5 reads "Ext. Video Only", and perhaps as expected clears all video off the Amiga's screen in favor of the stuff behind it. If the external source is unplugged, the Amiga's output will automatically pop back up. Key 6 reads "Computer Only", meaning, of course, show only the Amiga's output. Key 7, "Overlay Ext. Video", does the same thing as the "n" key, but in the menu. Lastly, key 9, labeled "Negative Video", swaps layers - the genlock input suddenly appears over the Amiga's output instead of vice versa. The odd thing is that these keys seem to do more than just tell the genlock what to do - when I plug the serial in my computer and use a program called "Serial Tools" to view its state, it is clear that pressing key 5 lights up both CTS and DSR. 6 lights up CTS only, and 7 and 8 light up neither. Keys 1-4, (Silence, Left, Right, and Background respectively) do not have an effect on CTS or DSR.

Question is, why would the Amiga be sending this information through its serial port?
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: AP2000

Post by AriX »

I'm having some trouble sending data to the Amiga over serial. My computer is hooked up to its serial port, but it's not recognizing data. The DATA counter goes up, but it doesn't see any commands. :/
tin
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Re: AP2000

Post by tin »

AriX wrote:I'm having some trouble sending data to the Amiga over serial. My computer is hooked up to its serial port, but it's not recognizing data. The DATA counter goes up, but it doesn't see any commands. :/
You must be sending it wrong then ;) DATA counter indicates valid serial information coming in, Commands indicates something valid has been acted upon.
Post Reply