My Oric Clone - a problem with the keyboard
Re: My Oric Clone - a problem with the keyboard
I just had a thought - would it be possible to use voltage dividers to sort of bias the AY I/O lines towards ground? 16 resistors are a lot cheaper than an original AY...
Re: My Oric Clone - a problem with the keyboard
Well, well, look at that:
I've simply started adding pulldowns to AY lines 4 and 7 (for Ctrl and C), starting with 22k and going down, and when I got to hundreds of ohms, it started working (with the possibly fake, but detected as genuine AY-3-8910).
It gets even better - I rummaged through my stash and found a fake AY-3-8910 (a repainted YM2149F) and it simply works without any resistors. So there is hope .
Thanks again, Sodiumlightbaby!
I've simply started adding pulldowns to AY lines 4 and 7 (for Ctrl and C), starting with 22k and going down, and when I got to hundreds of ohms, it started working (with the possibly fake, but detected as genuine AY-3-8910).
It gets even better - I rummaged through my stash and found a fake AY-3-8910 (a repainted YM2149F) and it simply works without any resistors. So there is hope .
Thanks again, Sodiumlightbaby!
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
Wow! While perhaps not what you hoped for, this is very good progress
This is :chefs kiss: Tangerine design - make it cheaper by exploiting the physical outut stage on the particular chip you are using. It's quirky and crazy, and I'm here for it
There are ways to make it work with more AYs, but it would be good to know what exactly what we have here. Do you have a scope or a mulimeter? Without the keyboard connected, wat voltage do you meassure at the AY port pins with and without a known resitor pull-down connected? Best meassured while cpu is held in reset or NMI (not scanning).
A resistor divider could work, but in 100s of ohms sound very hard on the chip when multiplied by 8. A key weakness of the original design in my opinion is the low side npn transistor switch. It switches all the way down at 0.5-1V range. It woild be good to get that switch pint up more in the 2v range to give us more of a headroom for a fix.
Idealy there should be reverse diodes on all the AY port lines to block current flowing out. The pulldown low voltage limit would then be equal to the forward voltage drop - requiring the higher switchpoint for the transistor (or very good diodes).
Alternatively cheaper serial current limiting resistors could be used, where the switchpoint is lifted to the voltage divider 47k and (4051R + seriesR). Again a higher switchpoint would help.
Basically, there's a way, or two
This is :chefs kiss: Tangerine design - make it cheaper by exploiting the physical outut stage on the particular chip you are using. It's quirky and crazy, and I'm here for it
There are ways to make it work with more AYs, but it would be good to know what exactly what we have here. Do you have a scope or a mulimeter? Without the keyboard connected, wat voltage do you meassure at the AY port pins with and without a known resitor pull-down connected? Best meassured while cpu is held in reset or NMI (not scanning).
A resistor divider could work, but in 100s of ohms sound very hard on the chip when multiplied by 8. A key weakness of the original design in my opinion is the low side npn transistor switch. It switches all the way down at 0.5-1V range. It woild be good to get that switch pint up more in the 2v range to give us more of a headroom for a fix.
Idealy there should be reverse diodes on all the AY port lines to block current flowing out. The pulldown low voltage limit would then be equal to the forward voltage drop - requiring the higher switchpoint for the transistor (or very good diodes).
Alternatively cheaper serial current limiting resistors could be used, where the switchpoint is lifted to the voltage divider 47k and (4051R + seriesR). Again a higher switchpoint would help.
Basically, there's a way, or two
Re: My Oric Clone - a problem with the keyboard
I am not sure if enough people will be wanting to reproduce my design, and I am happy with using a YM with my clone, but of course it would be fantastic if the clone could be made to work with all sorts of AYs, genuine or fake. I have an oscilloscope, tomorrow I will measure the voltages according to your instructions. I hope that you can whip up a working solution, because this is slightly out of my league .
And as for Tangerine design, oh boy. For me using the 7809 voltage regulator is the most egregious transgression...
And as for Tangerine design, oh boy. For me using the 7809 voltage regulator is the most egregious transgression...
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
Great! Happy to help.
Do you happen to have any N-channel FETs around? Something like a BS170?
Do you happen to have any N-channel FETs around? Something like a BS170?
Re: My Oric Clone - a problem with the keyboard
Yes, actually I do.
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
Very good! I think it can be what the doctor ordered for giving us some detection headroom. Note that the pinout likely doesn't match - I think it needs to go in rotated 180 but you should absolutely double check. N-channel type, so S should go to ground, D to PB3 and G towards pin 13.
https://www.onsemi.com/download/data-sh ... f170-d.pdf
With an N-channel FET instead of the NPN transistor in the original circuit we should move the switching region up from the 0.5-1.0V range to 2-3V.
This might be enough for making the circuit more accepting to different AYs, but does nothing to protect the multiple keys shorting of the AY port outputs. The measurements will still be needed to know what dangers we're dealing with here, and figure out what we can to to protect it (from itself).
Re: My Oric Clone - a problem with the keyboard
I tried the BS107 and while it works with the YM, it still does not work with the problematic AY chip. I'll try to take measurements in the afternoon.
Re: My Oric Clone - a problem with the keyboard
Why not just use 74(LS)04 or 74(LS)14 ?
It can be placed on the keyboard PCB too and eliminate the transistor. It's worth also to try HCT IC's.
If the transistor is a "must" then I would try (so called) digital transistors.
It can be placed on the keyboard PCB too and eliminate the transistor. It's worth also to try HCT IC's.
If the transistor is a "must" then I would try (so called) digital transistors.
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
Sure a larger redesign can fix much of the problems. My thinking was to help OldWer get something good and close enough to the current design that the PCBs can still be used. The current BS170 is working basically as a NMOS logic inverter and can reuse the PCB.
The fact that the AY still doesn't work with the N-channel FET means we are talking about a very strong high driver. I fear it might be CMOS. Changing the back-end inverter won't fix this problem between the AY and the matrix. Looking forward to the measurements.
Re: My Oric Clone - a problem with the keyboard
Indeed! Good measure results needed at first place.
Re: My Oric Clone - a problem with the keyboard
I didn't have any time today to play with my Oric, the measurements will have to wait until tomorrow, but I just had a thought: If I added pullups to all keyboard columns and then reverse diodes leading to AY pins, wouldn't it work with all AYs, even with CMOS outputs?
My present boards are still prototypes, and I think I will desing an updated version for both of them. Now that I have read some more about Oric hacks etc., I think I am going to put two DB9 joystick connectors on the keyboard PCB - one for Stingy joystick interface (there would be a connector near the printer port leading up to the keyboard PCB) and one for cursors/space joystick. It probably would be good idea to change Oric-1/Atmos ROM selector jumper on the mainboard into a switch on the keyboard. Maybe also a hardware reset switch? So if there is a surefire way to make it work regardless of the AY output stage, with diodes or otherwise, I would be happy to implement it in my design.
As for the main PCB, I think I have to move the amplifier away from VIA/CPU - a lot of interference can be heard in the speaker output. In the original Oric the amplifier is on the left side of the board.
Oh, and one interesting tidbit - did you know that the ULA RGB color outputs are mixed up in the original schematics? Either that, or AD724 datasheet is wrong ). I originally built the composite video circuit on the breadboard and connected it to my Oric Atmos. It worked, but red and blue seemed to be reversed. I spent an hour tracing the signals on the breadboard (it was a mess a wires , but couldn't find anything wrong. Still, when I sent the Gerbers to the fab, I left this in the design:
...so that I wouldn't have to cut traces if it turned out I was wrong. But the colors are really reversed.
And on another note, I just found out about Loci - great job, Sodiumlightbaby! Now I want one .
And if someone has any idea about what else could be added, please let me know. Maybe a built-in Vsync hack would be useful?
My present boards are still prototypes, and I think I will desing an updated version for both of them. Now that I have read some more about Oric hacks etc., I think I am going to put two DB9 joystick connectors on the keyboard PCB - one for Stingy joystick interface (there would be a connector near the printer port leading up to the keyboard PCB) and one for cursors/space joystick. It probably would be good idea to change Oric-1/Atmos ROM selector jumper on the mainboard into a switch on the keyboard. Maybe also a hardware reset switch? So if there is a surefire way to make it work regardless of the AY output stage, with diodes or otherwise, I would be happy to implement it in my design.
As for the main PCB, I think I have to move the amplifier away from VIA/CPU - a lot of interference can be heard in the speaker output. In the original Oric the amplifier is on the left side of the board.
Oh, and one interesting tidbit - did you know that the ULA RGB color outputs are mixed up in the original schematics? Either that, or AD724 datasheet is wrong ). I originally built the composite video circuit on the breadboard and connected it to my Oric Atmos. It worked, but red and blue seemed to be reversed. I spent an hour tracing the signals on the breadboard (it was a mess a wires , but couldn't find anything wrong. Still, when I sent the Gerbers to the fab, I left this in the design:
...so that I wouldn't have to cut traces if it turned out I was wrong. But the colors are really reversed.
And on another note, I just found out about Loci - great job, Sodiumlightbaby! Now I want one .
And if someone has any idea about what else could be added, please let me know. Maybe a built-in Vsync hack would be useful?
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
I don't think you need pull-ups, there is pull-up on pin 13. The non-testing columns just need to not drive the level to ground (i.e I think they can be left floating). But reverse diodes would be the ultimate protection - making sure current can only flow in to the AY. It should work with the raised headroom the FET provides. I'm not sure it works with the NPN. It would be good to test it before you fire off any PCB design though - this is armchair designing at its "best" - YMMV
Is it worse than on a normal Oric? You might find it really hard to get rid of the interference without redesigning the audio section. It is my opinion (so not confirmed - more of a guess) that most of the "system noise" is caused by the "creative" bus timing causing regular contention (bus conflicts) that gives extra ordinary amounts of ground and power rail bounce and spikes. I could be wrong of course, but I know I can make the Oric "scream" more when I get the LOCI timing wrong. So moving it may not help much, if the issue comes via the power and ground. Might be worth checking backwards to the AY if the issue is also there (e.g. sound_out).
Yes they are swapped around in all the public schematics and ULA pinouts I have seen. There is an appendix A in MikeB's ULA documentation with the corrected ULA pinout.
https://oric.signal11.org.uk/html/ula-dieshot.htm
You know, if we collected 24 of these design quirks and gotchas, we could make a Tangerine Design Gems Advent Calendar
Re: My Oric Clone - a problem with the keyboard
So I've built this (admittedly precarious) little adapter for testing:
...and it works like a charm with all the AYs I have (I actually found a few more, all fakes probably).
At this point there is really no point in measuring anything, because it is pretty obvious what I would measure, namely that the voltage doesn't drop down enough to be recognized as logical 0. I will just incorporate the diodes and change the transitor to BS107 in the next hardware revision.
Thank you once again, Sodiumlightbaby, you're a legend! It just shows how important it is to have a second pair of eyes to look at whatever you're trying to make... My original sin was to misinterpret what DBug's keyboard tester displayed, I really thought that when you press Ctrl+C the C key is registered, so I thought it was some strange timing bug, while the answer was much simpler.
Also, for anyone interested, the original AY-3-8912 which I had desoldered from the Amstrad CPC board for initial testing is back in the board snugly in a socket and working great, so I am happy to report that no original AYs were harmed while making the Oric clone!
...and it works like a charm with all the AYs I have (I actually found a few more, all fakes probably).
At this point there is really no point in measuring anything, because it is pretty obvious what I would measure, namely that the voltage doesn't drop down enough to be recognized as logical 0. I will just incorporate the diodes and change the transitor to BS107 in the next hardware revision.
Thank you once again, Sodiumlightbaby, you're a legend! It just shows how important it is to have a second pair of eyes to look at whatever you're trying to make... My original sin was to misinterpret what DBug's keyboard tester displayed, I really thought that when you press Ctrl+C the C key is registered, so I thought it was some strange timing bug, while the answer was much simpler.
Also, for anyone interested, the original AY-3-8912 which I had desoldered from the Amstrad CPC board for initial testing is back in the board snugly in a socket and working great, so I am happy to report that no original AYs were harmed while making the Oric clone!
- Sodiumlightbaby
- Squad Leader
- Posts: 636
- Joined: Thu Feb 22, 2024 11:38 am
Re: My Oric Clone - a problem with the keyboard
Awsome! Great result
Yes no need to measure if you're happy with the diodes solution, I was just very curious what type of driver you had in that AY. I only know of one CMOS variant, and it's supposedly rare. If it was just a strong pull-up resistor there may have been a cheaper resistor solution, but diodes is more guaranteed to work. But for my curiosity, we might have the data we need - Do you remember the actual "hundreds" of Ohm pull-down that made the NPN switch work?
Your project does look generally interesting so I'm sure many more than I would be entertained if you did a thread sharing your development
Yes no need to measure if you're happy with the diodes solution, I was just very curious what type of driver you had in that AY. I only know of one CMOS variant, and it's supposedly rare. If it was just a strong pull-up resistor there may have been a cheaper resistor solution, but diodes is more guaranteed to work. But for my curiosity, we might have the data we need - Do you remember the actual "hundreds" of Ohm pull-down that made the NPN switch work?
Your project does look generally interesting so I'm sure many more than I would be entertained if you did a thread sharing your development