AY-5-3600-PRO

68 posts / 0 new
Last post
Offline
Last seen: 4 years 4 months ago
Joined: Mar 20 2014 - 15:43
Posts: 75
AY-5-3600-PRO

I have several IIe boards with the same symptome
at some time no keyboard is working
at some other time they work

I'm trying to track how the AY is working....

I wanted to check the AY clock
any idea if I can to see the clock on one of the pins ? I checked 1/2/3 but nothing

any idea of other signal I should check on the AY

thanks

speedyG's picture
Offline
Last seen: 4 years 9 months ago
Joined: Nov 16 2011 - 07:45
Posts: 2493
Re: AY-5-3600-PRO

look at:
http://www.appleii-box.de/D03_2_AppleIIKeyswitchesKeyboardsPage2.htm

lower half of the page.....
SpeedyG

Offline
Last seen: 4 years 4 months ago
Joined: Mar 20 2014 - 15:43
Posts: 75
Re: AY-5-3600-PRO

thanks

In fact I think the oscillator is just not starting...
and I don't know why but at some other time it starts

I'm thinking to an interference with something

Offline
Last seen: 4 years 4 months ago
Joined: Mar 20 2014 - 15:43
Posts: 75
Re: AY-5-3600-PRO

I checked this evening...

on one of the board the clock is running and the keyboard is working

on a second board the clock of the AY is not running

but I'm sure that tomorrow or the day after this second board will work too...
I dont understand why from time to time the clock of the AY works and later is not working

I checked the capacitor, they look ok...

Offline
Last seen: 2 months 1 week ago
Joined: Dec 3 2015 - 20:45
Posts: 63
Re: AY-5-3600-PRO

I wonder if the socket contact on pins 1,2 or 3 is resistive causing the intermittent oscillator?

Larry G

Offline
Last seen: 4 years 4 months ago
Joined: Mar 20 2014 - 15:43
Posts: 75
Re: AY-5-3600-PRO

I checked capacitor and resitor both fine
I checked the power supply no -12v Sad

it seems that form time to time the -12v is missing on the power supply

the problem came form the connector
on some mother board the -12 v pin (female) has a tendency to go out of the connector
not so visible but a bad contact

this power supply is normally brand new
it's seems to be a reproduction of apple power supply
black box same shape as the standard apple (labelled MWP-302)

thanks to all for all your help

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
About a month ago I purchased

About a month ago I purchased an Apple IIe PAL version from a local eBay seller with a couple of missing chips: the AY-5-3600-PRO keyboard encoder and the keyboard ROM next to it. I figured I’ll get a AY3600-PRO replacement from eBay and I’ll use a 2716 EPROM to burn the keyboard ROM.

 

Without the two chip the machine was booting and it was getting random keystrokes, but I was able to load ProDOS or Karateka using my CFFA3000 card. Also the <Ctrl><Reset> was working and I could enter diagnostics mode using the two Apple keys.

 

I read somewhere that the AY-5-3600-PRO chips are factory programmed and they need to have two white dots next to the pin 1 marking, otherwise they are not programmed and will not work. So I ordered two chips from this eBay listing as I could see the two white dots on the picture.

 

However when they arrived I noticed that they look brand new and are missing the two white dots. I tested each one of them in the Apple IIe together with the EPROM I burned and the random keystrokes stopped, but none of the keys were working, except for <Ctrl><Reset> and the two Apple keys.

 

I also have a working Apple II+, so I removed its AY3600 chip (which is not PRO) and I placed it in the Apple IIe. Now I could see that my Apple IIe keyboard is working, however the last pressed key kept repeating until I press a new one and the characters that are sent didn't correspond to the keys being pressed. I also put the AY-5-3600-PRO from eBay in my Apple II+ and noticed that now its keyboard stopped working except for <Ctrl><Reset> just like the Apple IIe. I already asked the seller for a full refund and I got it almost right away. The chips I got look identical to these from AliExpress, which makes me think this eBay seller is just ordering them for me from there and doubling the price:

 

 

Do you guys think this is indeed the issue and I should continue to look for AY-5-3600-PRO chip with two white dots, or am I doing something else wrong?

 

Otherwise the machine is in very good condition with all chips on sockets and I only got it for $200:

 

Offline
Last seen: 3 hours 41 min ago
Joined: Jun 18 2010 - 13:54
Posts: 731
Check this out:https://jcm-1
Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
That JCM encoder is a really

That JCM encoder is a really great thing.  I really wish someone would come out with MMU and IOU replacement chips in a similar form factor.  With that it would be pretty much possible to make totally new //e machines from scratch using currently availble parts.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Hopefully I wouldn’t have to

Hopefully I wouldn’t have to go this way, as it will make it over $50 for a single chip when I add the shipping to Europe and the customs fee. This is a quarter of what I paid for the entire machine and it will definitely ruin the fun of getting this Apple IIe at a good price. Instead I decided to give AliExpress a try: https://www.aliexpress.com/item/1005001733703280.html

I explicitly told the seller not to bother sending it if it doesn’t have the two white dots next to pin 1 like in the picture, otherwise I will ask for a full refund, so we'll see what happens this time. All this is of course based on my hypothesis that the PAL versions of this motherboard have two dots and the NTSC versions have one, which I am still not 100% sure that it’s correct.

MacFly's picture
Offline
Last seen: 4 days 16 hours ago
Joined: Nov 7 2019 - 13:49
Posts: 442
Does this chip really differ

Does this chip really differ for PAL and NTSC machines? You probably refer to the switchable keyboard mapping (rather than PAL/NTSC), which the European and French-Canadian machines supported. But that mapping is not done by the encoder, but by the separate (E)PROM. If the keyboard encoder differed between Euro and US machines, the new emulation devices would also have to be offered in variants - which doesn't seem to be the case.

 

Looking at the datasheet shows the device has to be programmed with a 3600bit fuse matrix. It supports a 10x9 keyboard matrix and two modifier keys (resulting in 4 modes) and provides a 10bit output. Hence, the fuse matrix has 10x9x4x10=3600bit to indicate which keys are installed and which combinations are considered. There is a few more bits selecting between 16 variants of the chip's external interface: whether you want to use an internal or external oscillator, whether the chip should offer an "any key pressed" output (which the Apple requires), or whether the I/O pin is to be used as a "chip enable" input instead, etc.

 

So, lot's of options. You really have to find an AY-5-3600-PRO which was very specifically programmed for Apple - and not one which was made for any other vendor. It'd be interesting to know that the two white dots indicated it was programmed for Apple. But I fear it's not going to be so easy.

 

Fun fact of the day: as stated in the datasheet, when ordering the AY-5-3600-PRO, GI kindly asked their customers to provide their 3600bit matrix and selection of 16 I/O options in the form of 92 punch cards ("1 title card, 1 circuit option card, 90 ROM pattern cards"). A "substantial" surcharge was applicable and orders delayed, if customers used the ordering form for handwritten truth tables instead. So, it's just like today: companies asking customers to preferably use a "digital" variant when ordering. Except that the digitial order back then wasn't an online shop, but meant sending a small parcel with a little stash of punch cards...

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
MacFly wrote:Does this chip
MacFly wrote:

Does this chip really differ for PAL and NTSC machines?

...

My mistаke, I've been looking at a non-GI chip. All GI chips that I've seen so far on an Apple IIe motherboard have two dots: side-by-side, PAL, another PAL, NTSC.

 
 
Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
CVT wrote:Hopefully I wouldn
CVT wrote:

Hopefully I wouldn’t have to go this way, as it will make it over $50 for a single chip when I add the shipping to Europe and the customs fee. This is a quarter of what I paid for the entire machine and it will definitely ruin the fun of getting this Apple IIe at a good price. Instead I decided to give AliExpress a try: http

Realistically the only way you are going to find an Apple programmed chip is to get one off of another //e motherboard that is being parted out.  Aliexpress vendors aren't going to have these unless they are sourcing used parts from e-waste recycling.  That's a possibiliy, but more likely they'll find the right chip, but programmed for some other machine.  NOS parts probably aren't going to be programmed at all.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Yes, I am hoping they are

Well, according to its datasheet the AY-5-3600-PRO is pre-programmed during manufacture, so NOS parts should be programmed. However they might be programmed for some other device.

Otherwise I am hoping they are either NOS or recycled e-waste chips for an actual Apple IIe or for an Apple IIe Taiwanese clone. Didn’t they make millions of clones too? But the ones I got from eBay – I knew they wouldn’t work as soon as I opened the box: brand new with a 2019 manufacturing date!

Anyways, we’ll see what happens soon enough.

MacFly's picture
Offline
Last seen: 4 days 16 hours ago
Joined: Nov 7 2019 - 13:49
Posts: 442
CVT wrote:Well, according to
CVT wrote:

Well, according to its datasheet the AY-5-3600-PRO is pre-programmed during manufacture, so NOS parts should be programmed. However they might be programmed for some other device.

 

Yes, apart from the ordering details in the datasheet (every order required a bit mask), there is another clue. The sheet says these devices are programmed through a "single mask change". So, this very likely was a "mask programmable" device. These are programmed in a final step when making the silicon wafers - before cutting and enclosing them in plastic. Back then this was the cheapest method for programming such devices and used for bulk production. Many ROMs were also made in this way. That was long before software engineers invented "agile development", requiring changes and software updates every other day... ;-)

 

CVT wrote:

I knew they wouldn’t work as soon as I opened the box: brand new with a 2019 manufacturing date!

Haha! You could say these Chinese sellers have a good sense of humor. But the truth is, they just have no clue and don't even know (and don't care) what they are selling...

 

Anyway, best of luck! Let us know what you receive this time!

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
CVT wrote:Well, according to
CVT wrote:

Well, according to its datasheet the AY-5-3600-PRO is pre-programmed during manufacture, so NOS parts should be programmed. However they might be programmed for some other device.

Otherwise I am hoping they are either NOS or recycled e-waste

 

They made some //e clones in Tiawan, but not millions.  Most of the clones out of Tiawan and Hong Kong were ][+ clones which didn't use this kind of keyboard encoder.  Since that was 30+ years ago chances are there are no major stocks of NOS parts still out there.  If they have any of these chips, they're most likely going to be from e-waste recycling.

 

 

As far as 2019 made chips like this...  Seems fishy.  I can't imagine what they'd be making new chips for.  It seems more likely that they are re-marked or totally fake.  I've heard some people have gotten high demand chips from Chinese vendors that didn't even have cores in them, just empty pacakges.  When people are paying huge anounts for vintage originals it has to be very tempting for the crooks to make fakes.

 

 

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Well, 2019 is indeed super

Well, 2019 is indeed super weird, but they definitely have cores - I could tell that much from their heat signature. Today I decided to hook up the oscilloscope and see what’s wrong with them. Turns out there is no clock on pins 1, 2 and 3. Instead I see -8.15V DC on pin 1 and -2V DC on pins 2 and 3. The second chip - exactly the same thing. Most likely they have not been pre-programed for the internal oscillator option. No issues with the socket either, unlike the author of this topic's case.

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
CVT wrote:Well, 2019 is
CVT wrote:

Well, 2019 is indeed super weird, but they definitely have cores - I could tell that much from their heat signature. Today I decided to hook up the oscilloscope and see what’s wrong with them. Turns out there is no clock on pins 1, 2 and 3. Instead I see -8.15V DC on pin 1 and -2V DC on pins 2 and 3. The second c

 

Some of the fake chips have a core in them...  just not always what they are marked as.  Some of these can be dangerous to plug in because they may blow other things out.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Damaged original chips can

Damaged original chips can blow other things too. These is always some small risk when you plug in an old chip that came from elsewhere. These two kept all the output data pins at ground and did not damage anything. I already checked with the working AY-5-3600 from my Apple II+. They were outputting over -8V DC thought the X outputs, but that doesn't go anywhere, except right back to them.

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
CVT wrote:Damaged original
CVT wrote:

Damaged original chips can blow other things too. These is always some small risk when you plug in an old chip that came from elsewhere. These two kept all the output data pins at ground and did not damage anything. I already checked with the working AY-5-3600 from my Apple II+. They were outputting over -8V DC thought the X outputs, but that doesn't go anywhere, except right back to

 

If you don't want to buy the newly made encoder replacement, your other option is probably to buy a parts motherboard.  They can often be had on eBay between $35 to $50.  Of course that's probably going to be more due to shipping costs and usurious European taxes and customs fees.  But then you'd probably have spares of other chips that are hard to get like the IOU and MMU.  I've got a couple spare motherboards like that, although one already is missing the MMU and 6502.  I got that one for free, though, so I can't complain.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
My attempt for a $5 solution

My attempt for a $5 solution from AliExpress failed as well: https://www.aliexpress.com/item/1005001733703280.html

 

This time they apparently sent me a real chip with two white dots and a working oscillator, but damaged. Only some of the keys work. Most don’t and a few register multiple keystrokes. I already requested and got a full refund.

 

In order to eliminate some possibilities I replaced the IC socket with the type that allows checking the connection between the pins of the socket and the pins of the IC from above. In addition I replaced C60 with an original 100 nF from another location on the motherboard, which for some reason a previous owner had changed with a large size 47 nF capacitor.  I also replaced AY-5-3600-PRO's 100 nF bypass capacitor with a modern one, since I accidently broke the original.

 

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
That must be a Euro spec //e

That must be a Euro spec //e because the chip placement is completely different on the board.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Yes, this is a PAL motherboard.

Yes, this is a PAL motherboard.

 

It doesn’t look like I am going to get my hands on a working AY-5-3600-PRO any time soon, so I decided to see if I can adapt the AY-5-3600-931 chip from my Apple II+. Previously when I plugged it in I could see that the keyboard is working, since it was printing on the screen different characters as I was pressing different keys. However the last character typed kept repeating as if it was stuck down.

 

I started to investigate and found the following regarding pins 4 and 5:

 

On the Apple II+ with the AY-5-3600-931 chip:

    pin 4: AKO (any key output) KEY DOWN = +5V, goes to the RTP key, which when pressed connects to the RESET pin of the 555 timer

    pin 5: not connected to the board and not used

 

On the Apple IIe with the AY-5-3600-PRO chip:

    pin 4: LO/RO (lockout/rollover) LO = +5V, RO = GND. Internal pull down resistor. Not connected to the motherboard and not used.

    pin 5: AKO (any key output) KEY DOWN = +5V

 

Looks like the only difference other than the key mapping is the location of the AKO and I simply needed to connect pin 4 of the AY-5-3600-931 to pin 5 of the Apple IIe motherboard. So I broke off the leg of pin 5, since it is not used in the Apple II+ either and soldered together pins 4 and 5 of the socket on the back of Apple IIe motherboard. Of course the mapping is incorrect, but now there is no repeating when a key is released.

 

Now I need to figure out the new mapping and write it to the keyboard ROM. I’ll post it here once I do.

 

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
I think that chip is write

I think that chip is write once so you won't be able to re-map it at all.  Your best bet is to just buy the newly produced chip or buy a used mobo with a good chip.  Trying to cheap out is just going to cost more and take longer.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
softwarejanitor wrote:I think
softwarejanitor wrote:

I think that chip is write once so you won't be able to re-map it at all.  Your best bet is to just buy the newly produced chip or buy a used mobo with a good chip.  Trying to cheap out is just going to cost more and take longer.

 

No, the map is stored on the 2716 EPROM in position F12, so it's easy.

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
Well, I'm not sure the other

Well, I'm not sure the other chip is compatible at all.

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
softwarejanitor wrote:Well, I
softwarejanitor wrote:

Well, I'm not sure the other chip is compatible at all.

 

It is compatible. When I put a 2716 chip with randomly generated data it gives me a random mapping with most of the keys mapped to different characters, as it should be. If I generate different random data and write it to a second chip, I get a different random mapping. I just need to figure out exactly how the mapping works, so I can arrange it properly.

Offline
Last seen: 3 hours 41 min ago
Joined: Jun 18 2010 - 13:54
Posts: 731
I'll bet Joe Strosnider could

I'll bet Joe Strosnider could help you with that!

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
How? Has he done it already?

How? Has he done it already?

Offline
Last seen: 3 hours 41 min ago
Joined: Jun 18 2010 - 13:54
Posts: 731
 CVT wrote:How? Has he done

 

CVT wrote:

How? Has he done it already?

Yes, he did extensive research for the replacement encoder that I mentioned earlier: https://jcm-1.com/product/jcm-universal-keyboard-encoder/

 

Worth hitting him up. He may have for the info you are looking for...

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
At this point the only help I

At this point the only help I can use is if someone has done it already and published the content of the EPROM somewhere. If however it’s not publicly available yet, it would be fun to solve it and provide it for everyone. I am planning to burn an EPROM with the addresses as the values and see if I can figure out the address each key maps to that way. After that the actual value that needs to be written for each key + its control and shift combination is already well documented, just need to figure out the corresponding address in the EPROM.

S.Elliott's picture
Offline
Last seen: 6 hours 58 min ago
Joined: Jun 23 2022 - 16:26
Posts: 205
CVT wrote:At this point the
CVT wrote:

At this point the only help I can use is if someone has done it already and published the content of the EPROM somewhere.

Is Table 7.2 helpful?

https://archive.org/details/Understanding_the_Apple_IIe/page/n183/mode/2up?view=theater

 

Also observe Fig 7.4 gives the schematic showing how each key in the matrix connects to the encoder chip.

https://archive.org/details/Understanding_the_Apple_IIe/page/n177/mode/2up?view=theater

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
S.Elliott wrote:CVT wrote:At
S.Elliott wrote:
CVT wrote:

At this point the only help I can use is if someone has done it already and published the content of the EPROM somewhere.

Is Table 7.2 helpful?

https://archi

That's a start, but it would be even better if he had what the EPROM is supposed to be for the actual chip he has.  I'd be concerned that if his chip is for a ][+ with its significantly smaller key switch matrix, that no matter what he does he will never get satisfactory results because it won't generate the full ASCII set like a //e programmed AY chip would.  I think maybe his chances would be much better going the other way around trying to adapt a //e chip to a ][+...

 

Anyway...  it all seems like a lot of work that potentially will never pan out that could be avoided just by buying the right chip to begin with...

 

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
So I just thought of

So I just thought of something...  Even if you get the chip from your ][+ working in your //e you still only have one working computer since now your ][+ is broke.  Seems like kind of a pyrrhic victory.  Every time you want to use the other computer you're going to have to open the other up and swap chips?  Sounds really inconvenient.

 

Offline
Last seen: 6 hours 11 min ago
Joined: Nov 29 2020 - 19:48
Posts: 124
I second Joe Strosnider

I think JeffMazur has a good point.  I would also start with Joe Strosnider, if he does not have your solution, he will have some good ideas. 

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
8BitHeaven wrote:I think
8BitHeaven wrote:

I think JeffMazur has a good point.  I would also start with Joe Strosnider, if he does not have your solution, he will have some good ideas. 

Joe has the right answer...  a drop in replacement for the AY-3600-PRO...  $25.99 plus shipping

 

https://jcm-1.com/product/jcm-universal-keyboard-encoder/

 

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
softwarejanitor wrote:That's
softwarejanitor wrote:

That's a start, but it would be even better if he had what the EPROM is supposed to be for the actual chip he has.  I'd be concerned that if his chip is for a ][+ with its significantly smaller key switch matrix, that no matter what he does he will never get satisfactory results because it won't generate the full ASCII set like a //e programmed AY chip would.  I think maybe his chances would be much better going the other way around trying to adapt a //e chip to a ][+...

 

You should really read page 7-9 to 7-10 of the book "Understanding the Apple IIe” from the provided link to see why most of what you are saying is incorrect.  In fact this exact section of the book is the reason why I knew it could be done before I started.

 

softwarejanitor wrote:
So I just thought of something...  Even if you get the chip from your ][+ working in your //e you still only have one working computer since now your ][+ is broke.  Seems like kind of a pyrrhic victory.  Every time you want to use the other computer you're going to have to open the other up and swap chips?  Sounds really inconvenient.

 

The idea of this exercise is to see if an AY-5-3600-931 can be used in an Apple IIe, so anyone can use it as a spare. This doesn’t break the Apple II+ in any way. As I mentioned before the Apple II+ doesn’t use the removed pin and the chip can be used in both machines. As far as the chip swapping is concerned for me it's barely an inconvenience and at some point I will get a perfectly working original second AY-5-3600-931 or AY-5-3600-PRO. Besides, I also have a Pravetz 82, which is why I almost never use my Apple II+.

 

softwarejanitor wrote:
Joe has the right answer...  a drop in replacement for the AY-3600-PRO...  $25.99 plus shipping

 

For a technical discussion in a retro-computing forum I don’t think it’s helpful to keep repeating just buy a modern replacement built with a SMD microcontroller. How many SMD chips are you planning to put in your Appe I replica? Besides, this idea was already presented by jeffmazur in post #8, so you are not bringing anything new to the table.

Offline
Last seen: 9 hours 47 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2516
The keyboard encoder in both

The keyboard encoder in both of the Apple-1 replicas I'm building is an SMD chip.  The original encoder used in the Datanetics keyboards is unobtanium.  Newton Mike's replacement is what makes a Datanetics like keyboard possible at all these days.  Most of the alternatives also use modern parts.  URK uses an Atmel chip and the Appledore uses an Arduino wholesale.  Supporting people like Newton Computer and Joe's Computing Museum is what is going to keep the retro-computing communities alive in the future.

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
If it was unobtanium kind of

If it was unobtainium kind of a situation - I wouldn't mind at all. But it’s not.

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
8BitHeaven wrote:I think
8BitHeaven wrote:

I think JeffMazur has a good point.  I would also start with Joe Strosnider, if he does not have your solution, he will have some good ideas. 

 

I did contact him asking if he has an Apple IIe 2716 ERPOM map for AY-5-3600-931 and he replied back this morning. He said that he doesn’t have the mapping for this particular combination, but it could be done.

S.Elliott's picture
Offline
Last seen: 6 hours 58 min ago
Joined: Jun 23 2022 - 16:26
Posts: 205
CVT wrote:I did contact him

CVT wrote:

I did contact him asking if he has an Apple IIe 2716 ERPOM map for AY-5-3600-931 and he replied back this morning. He said that he doesn’t have the mapping for this particular combination, but it could be done.

In #23 you wrote that "it was printing on the screen different characters as I was pressing different keys."  Did you take notice of any specific charatcer that was generated by any particular key?  It might be sensible to pick a key, work out its hypothetical mapping, and then test whether it generates the expected result.

Hypothetical exercise: let's try to work out what character ought to be generated by the Apple //e "RETURN" key after it passes through an AY-5-3600-931 and gets re-decoded by a stock US-DVORAK 1984 keyboard ROM:

  1. On an Apple //e keyboard, the RETURN key closes SW42, which connects row X6 to column Y6
  2. X6 is pin 34 on both AY-5-3600-931 and AY-5-3600-PRO, so column conversion is not needed
  3. Y6 is pin 23 on both AY-5-3600-931 and AY-5-3600-PRO, so row conversion is not needed
  4. On AY-5-3600-931, connecting X6 & Y6 woud type a numeral "1", so binary 0110100 should appear at K6-K0
  5. On Apple ][ Plus, K6-K0 are derived from the AY-5-3600-931's signals B9-B1 through an inverter (and optional lowercase switch) so B9-B1 would need to be 001001011 to generate 0110100 at K6-K0
  6. On Apple //e, B9-B1 are mapped out-of-order to ROM address pins A8-A0, so we need to convert them one-at-a-time:
    1. B1 (1) maps to A8, so A8=1
    2. B4 (1) maps to A7, so A7=1
    3. B5 (0) maps to A6, so A6=0
    4. B6 (0) maps to A5, so A5=0
    5. B7 (1) maps to A4, so A4=1
    6. B8 (0) maps to A3, so A3=0
    7. B9 (0) maps to A2, so A2=0
    8. B2 (1) maps to A1, so A1=1
    9. B3 (0) maps to A0, so A0=0
  7. So A8-0 would be 110010010, or address $192 in the Apple //e keyboard ROM
  8. According to footnote *** for Table 7.2, addresses $168-$1FF are "not used" for any Apple //e keys, so Apple stores $A0 in those addresses

Therefore the RETURN key would be expected to type a space character -- assuming an Apple //e with an AY-5-3600-931 (from an Apple ][ Plus), a standard Apple US-DVORAK keyboard map in EPROM.

And assuming all those tedious steps were correct.  That was an interesting exercise, but I sure wouldn't want to repeat it for every single key!

 

CVT wrote:
I am planning to burn an EPROM with the addresses as the values and see if I can figure out the address each key maps to that way. After that the actual value that needs to be written for each key + its control and shift combination is already well documented, just need to figure out the corresponding address in the EPROM.

Yeah, that's a better method for building a whole table.

The ROM addresses are 9-bits, but character codes can only store 7 bits because the high bit is reserved for the key strobe.  But you don't need the 2 lowest bits anyhow, since those bits select combinations of CONTROL and SHIFT, so fill your EPROM with address-divided-by-four instead of the literal addresses.  (eg: the first four bytes would be $80, the next four would be $81, the next four would be $82, etc.)

Put a HELLO program onto a self-booting floppy disk, like the one pictured below, to help identify the key codes.

Bonus points if you can figure out how to reproduce the Applesoft bug in the picture: what caused that ILLEGAL QUANTITY ERROR?

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
S.Elliott wrote:Bonus points
S.Elliott wrote:

Bonus points if you can figure out how to reproduce the Applesoft bug in the picture: what caused that ILLEGAL QUANTITY ERROR?

 

Oh, I’ve seen this one before! It happens when you try to determine the ASCII value of a sound.  :)

 

I already mapped all the keys except for a dead W and three other keys that I thought were dead, but it turned out that sometimes they work when you jiggle them. I haven’t done all the <Ctrl> combinations yet, but even at this point I can finally enjoy my Apple IIe. Once I take care of those, I’ll post the content of the EPROM containing the map.

 

My approach of 128 byte test strips with the addresses as values didn’t work, at it contains non-printable characters that I cannot differentiate on the screen. Your program would have definitely helped, but by the time you posted it I was already done. I'll still use it for the few remaining keys though.

 

What I ended up doing instead is to use just the 96 ordered printable ASCII characters starting at 32. Just as a proof of concept I wrote them in the begging of an empty EPROM and ran through all the keys. If a key appeared as one of the printable characters on the screen I recorded what key corresponded to that character. This way I determined the address of each key that mapped to the first 96 bytes by simply subtracting 32 from the ASCII value of the character that appeared on the screen. Then I wrote the mapping just for those keys to another ERPOM to make sure that the approach works.

 

Now the 2K keyboard EPROM of the Apple IIe is divided into two 1K banks by the switch under the keyboard, which allows the user to switch to an alternative character set. Each one of these 1K banks is further divided into two 512 byte banks which is selected by the caps key. This means that the entire mapping is contained within the first 512 bytes and the seconds 512 bytes are the same, except that all the letters also have lower case. It also means that with 96 byte test strips I needed to repeat the same process 5 more times in order to cover the 512 bytes. I took advantage of the fact that I have a UK Apple IIe and the alternative character set differs only by a single character and that is the # key, so I wrote four 96 byte test strips on a single ERPOM. I could then switch between them using the switch under the keyboard in combination with the caps lock key and figured out the rest of the keys using that test ERPOM.

 

Thanks for your program! I will still use it to find the remaining unmapped characters, since 128 bytes at a time is faster than just 96, it saves me an ASCII lookup and I can use a single test ERPOM with four test strips to cover the entire 512 bytes space, which I originally prepared and I am now attaching. I can also easily modify the program to add the test strip offset and to spit out the actual address in hex.

 

Package iconTestStrips.zip

S.Elliott's picture
Offline
Last seen: 6 hours 58 min ago
Joined: Jun 23 2022 - 16:26
Posts: 205
I admire your resourcefulness

I admire your resourcefulness, and it's been an entertaining exercise.  It's a way of getting basic keyboard functionality out of an Apple //e, even if AY-5-3600-PRO chips went totally extinct.

But there are some unavoidable compromises:

  • The Apple //e had some keys mapped to parts of the matrix where the Apple ][ Plus didn't have any keys mapped.  For instance, the Apple //e's backslash, zero, and equal sign are matrixed at X4Y8, X4Y7, and X4Y6, where there aren't any keys on an Apple ][ Plus.  The AY5-3600-931 won't generate usable ROM addresses for those keys, so you won't be able to use those keys regardless of what you program into your EPROM.
  • The Apple //e has some keys mapped to parts of the matrix where the Apple ][ Plus doesn't distinguish CONTROL or SHIFT.  For instance, the Apple //e's numeral "7" is matrixed at X0Y7, where the Apple ][ Plus has its numeral "0" key.  So the Apple //e can't assign both the "7" character (unshifted) and "&" character (shifted) to the Apple //e keyboard when using AY-5-3600-931.
  • The Apple //e has some keys mapped to parts of the matrix where the Apple ][ Plus had duplicate keys mapped to its optional numeric keypad.  For instance, the Apple //e has its RIGHT ARROW and HYPHEN keys matrixed at X7Y9 and X4Y9.  The AY5-3600-931 will generate the same output (CR) for both those keys, and thus map them to the same ROM address.  Therefore the RIGHT ARROW and HYPHEN keys on the Apple //e keyboard must both generate the same character regardless of what you program into your EPROM.  (Same problem for LEFT ARROW and FULL STOP / PERIOD.)

But if you're willing to use the CAPS LOCK key creatively, you can probably create a map that enables you to type all the key codes, with the requirement that you may need to toggle CAPS LOCK to choose between punctuation vs. cursor control keys.  For example, the Apple //e's letter "O" is matrixed at X1Y9, which corresponds to the letter "P" on the Apple ][ Plus.  On the Apple ][ Plus, the "P" key generates four distinct character codes, depending on the combination of CONTROL and SHIFT, so your EPROM can assign four distinct characters to the "O" key on the Apple //e.  (Ditto for the "M" key, which is matrixed at X3Y6 for both Apple ][ Plus and Apple //e.)

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
Thanks! It’s been a lot of

Thanks! It’s been a lot of fun doing this too. :)

 

Now that I fixed all the dead keys and did a complete mapping I ran into these issues as well. Turns out they just needed an isopropanol injection.

 

The worst one is a couple of duplications in the alphanumeric set of keys. <T> and <L> map to the same address and so do <O> and <0>. So I was forced to use <Ctrl><T> for <T> to and <Ctrl><O> for <O>. This is very annoying, especially while typing CATALOG. At this point I don’t have a good idea how to easilly mitigate this.

 

The other duplications are not so bad and can be mitigated. I don’t plan to use the CAPS LOCK though, since it’s a mechanically latching key and I want it to control the case of all the letters and nothing else. However, as you have already noticed, the Shift keys are pretty useless as they map to the same address for most of the keys. So, I decided to make another very small and easily reversible hardware modification.

 

Notice J19 and R3 on the pictures above: J19 connects to the switch under the keyboard that allow me to select the alternative character mapping stored in the upper 1K bank of the 2716 EPROM.  Closing the switch connects A10 of the EPROM directly to +5V and opening it allows R3 to pull it down to ground. My idea is unplug this switch, unsolder one of R3’s legs and connect another plug, which is connected to the !SHIFT signal (pin 29 of the AY-5-3600). This way the standard mapping can go to the upper 1K bank and holding down one of the Shift keys will switch to the lower 1K.

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
I forgot to mention that in

I forgot to mention that in order for the Shift modification to work, pin 29 of the AY-5-3600-931 also needs to be disconnected from the board and connected to +5V, which is conveniently on pin 30. This can be done easily with socket stacking:

 

 

Here is the complete Shift modification: one of the legs of R3 has been lifted and the left side of the X6 connecting pad (which happens to be the !SHIFT signal) is connected with a cable to the bottom pin of J19:

 

 

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
The full mapping is done and

The full mapping is done and now thanks to the Shift modification described above, every single character can be typed, while the CAPS LOCK and Shift keys still function like on a modern PC.

 

 

However due to the original programming of the AY-5-3600-931 the following 8 keys cannot be mapped uniquely:

 

<O>, <T>, <+=>, <_->, <:;>, <|\>, <~`> and <}]>

 

In order to mitigate this I used various somewhat easy to remember <Ctrl> combinations to produce their characters:

 

O → <Ctrl><O>

T → <Ctrl><T>

+ → <Ctrl><A> (add)

- → <Ctrl><M> (minus)

= → <Ctrl><E> (equals)

: → <Ctrl><C> (colon)

; → <Ctrl><S> (semicolon)

\ → <Ctrl><B> (backslash)

| → <Ctrl><V> (vertical bar)

~ → <Ctrl><W> (wavy line)

` → <Ctrl><Q> (back quote)

] → <Ctrl><X> (closing square bracket)

} → <Ctrl><Z> (closing brace)

 

I also mapped all the original <Ctrl> combinations to <Shift><Ctrl>, so I can still produce them if needed. For example if I want <Ctrl><C>, I would do <Shift><Ctrl><C>. At this point I figured this should hold me over until I get a working A-5-3600-PRO chip. Here is the content of the EPROM containing the mapping:

 

Package iconKeyboardMapping.zip

 

S.Elliott's picture
Offline
Last seen: 6 hours 58 min ago
Joined: Jun 23 2022 - 16:26
Posts: 205
...and now I have a spare
CVT wrote:

At this point I figured this should hold me over until I get a working AY-5-3600-PRO chip.

 

As of today, I have a spare JCM Universal Keyboard Encoder.

I was testing its behavior, and comparing it against the KR3600-PRO in the picture.  It is nearly interchangeable, but the JCM Universal Keyboard Encoder performs slightly better:

  • The KR3600 does not debounce AKO, which sometimes causes the IOU to set AKD (Any Key Down) to true before a new key has been decoded.  (This caused a well-known bug in the game Prince of Persia when played on Apple //e or Apple //c.)  The JCM Universal Keyboard Encoder debounces AKO properly, so the AKD bug does not occur...an advantage!
  • The KR3600 requires two power supplies: +5 volts and -12 volts.  The JCM Universal Keyboard Encoder only requires a +5 volt power supply.  (It doesn't even connct to the -12 volts, even if supplied.)

If you're interested in a JCM Universal Keyboard Encoder for your Apple //e, I'd be happy to send it to you.  I don't have any further need for it, and it should get your computer keyboard working like a normal Apple //e.  For playing Prince of Persia on the keyboard, it will work even better than a stock Apple //e!

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
S.Elliott wrote:If you're
S.Elliott wrote:
If you're interested in a JCM Universal Keyboard Encoder for your Apple //e, I'd be happy to send it to you.

 

Thanks! I really appreciate the offer, but I must decline, since I really want to get to the bottom of this whole unobtainium nonsense. This time I decided to go for KR9600-PRO from AliExpress and see if they fare any better.

 

And in case this one actually works, is there a simple way to test for this AKO problem? Also have you tried running the AKO signal on the back of the motherboard through something like a SN74AHCT1G32DCKR?

Online
Last seen: 1 hour 22 min ago
Joined: Feb 27 2021 - 18:59
Posts: 466
nitpick
softwarejanitor wrote:
I've heard some people have gotten high demand chips from Chinese vendors that didn't even have cores in them, just empty pacakges.

 

The name for an individual silicon chip integrated circuit is "a die", plural dice or dies.

It is called this because it gets cut out of the wafer (after fabrication) by a dicing machine using diamond cutting discs. Japan's Disco Ltd has supplied nearly all of these machines for the last 40 years. Some wafers are now being singulated using laser dicers, which weaken the silicon crystal structure within the dicing lanes by laser heating. The elastic separation tape on the wafer is then stretched, which causes the dice to pull apart so they can be picked up and transferred to packages.

When the Apple II series was being manufactured, "cores" still meant ferrite rings used as magnetic memory.

Core Memory Explained and Demonstrated

The memory space comprising these ferrites was also referred to collectively as "the core". Notably, the term always denoted passive memory, not active computation circuits. Sometimes "core" was used in a generic sense to refer to solid state main memory as well. Thus the simulation of programs competing to control "the core" by spreading throughout available memory was called Core Wars.

 

In the 2000s, long after magnetic core memory became obsolete, the prevailing meaning of the word shifted as a result of higher integration. VLSI densities approaching a billion transistors meant that even when a large, complex CPU was implemented, it did not fill all the space available on practically manufacturable dies. So two different kinds of chip designs became common: the first integrated various amounts of memory and I/O that formerly would have their own separate chips on a circuit board. This was known as a system-on-chip or SoC. The second kind integrated multiple processors in parallel on a chip. This was known as a "multi-core" CPU where each "core" was a processor complex comprising the functional units of a uniprocessor. The processor complex part of a SoC was also called the "core". The word "core" today refers to a block of functionality within a larger IC, not the chip itself.

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
robespierre wrote:nitpick...
robespierre wrote:

nitpick

...

 

https://youtu.be/Z6fqHcOEd4U?t=273

CVT
CVT's picture
Offline
Last seen: 6 hours 29 min ago
Joined: Aug 9 2022 - 00:48
Posts: 971
The third time is the charm!

The third time is the charm! Got a perfectly working KR9600-PRO for $6 shipping included!

Not sure if they have 27,700 more, but here is the link again: https://www.aliexpress.com/item/4000830397007.html

 

I reversed the hardware change and put back the old EPROM with the original keyboard mapping, but I still think it was time well wasted. :)

 

Pages

Log in or register to post comments