![]() |
![]() |
![]() |
|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
![]() |
|
Thread Tools |
![]() |
#21 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,195
|
![]()
There doesn’t seem to be a pullup on the diag line, so relying on the 74ls00 floating high. Could it be pulled high with a resistor to 5v, maybe 1k-4.7k range.
|
![]() |
![]() |
![]() |
#22 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
I think Mark means try putting a resistor (value between 1K - 4K7) between +5V and the DIAG line.
Relying on the 74LS input to keep the line high unless taken low seems like very bad practice to me, and it's even more baffling when you get to the 3016 which doesn't have the UD5 gate on the DIAG line - only the 6520 pin. The 6520 pin must sometimes (under control of the firmware) go into output mode in order to control the speaker / buzzer audio gate, but presumably when it is doing that it does not try to read the pin as an input. |
![]() |
![]() |
![]() |
#23 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
So find a 5v feed and connect it with a resistor in line to UB12 pin 9?
Colin. |
![]() |
![]() |
![]() |
#24 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
Or to UD5 (2). Either / or.
|
![]() |
![]() |
![]() |
#25 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
OK - UD5/2 with 5V and the resistor inline boots OK consistently. With it removed, it drops to the monitor.
Colin. |
![]() |
![]() |
![]() |
#26 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,195
|
![]()
It seems like one of the devices on that input has maybe been damaged, but not destroyed.
I think you swapped the 6520 and didn’t see any improvement, so maybe you stressed the input of the 74LS00. You could also just leave the resistor fitted, inputs shouldn’t really be left floating. |
![]() |
![]() |
![]() |
#27 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
So does this mean that swapping the 74LS00 is a sensible thing to try? I have already swapped the 6520.
Colin. Quote:
|
|
![]() |
![]() |
![]() |
#28 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
The machine has, historically, somehow, worked without a pullup resistor on the DIAG line so the 'right' way to fix it is probably to replace the 74LS00 and remove the pullup resistor to see if that gets it working as-was. With the 6520 (hopefully) ruled out, the only other device on that node which could be causing abnormal behaviour is the 74LS00.
You could also take the pragmatic approach and solder the resistor permanently in place on the underside of the PCB. My preference would be to get it working exactly as it was originally, but not everyone is as fussy as I am. |
![]() |
![]() |
![]() |
#29 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
I'd rather it was like it was too. I'll remove it and try the 'spare' I have in the MK14 and let you know.
Colin. Quote:
|
|
![]() |
![]() |
![]() |
#30 | ||
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,194
|
![]() Quote:
|
||
![]() |
![]() |
![]() |
#31 | ||||
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,194
|
![]() Quote:
Quote:
Quote:
Quote:
Well the 74LS00, being 'true' TTL, inherently effectively has a reasonably-strong pull-up by its input-transistors with their emitters connected to the inputs - which need a fair amount of sink current (although not as much as original 74xx family) on an output to driving a 74LSxx input low. So (unlike CMOS families) the inputs should never normally actually 'float' as such. But it does seem there's been some damage to the 74LS00 input that is preventing it sourcing enough current from its input / it has developed a high-leakage to ground, that is pulling this down. I wonder if the 6520 also normally has some weak pull-ups on its port-lines, when configured as inputs (which might explain why 3016 works without the 74LS00), but leakage to ground on the faulty? 74LS00 in the 4032 is preventing the /DIAG line going above logic-high threshold. On the 4032, I presume UB12(6520)/pin9 (PA7) is only normally driven-low, in order to drive the speaker and relies on (effective) pull-ups internal-to IC's inputs to make UD5(74LS00)/pin2 high. - As if UB12(6520)/pin9 (PA7) is ever set high, then pulling /DIAG low would short UB12(6520)/pin9 etc. out. Although it may have been advisable to have had a protection resistor in-line with the DIAG pin, to prevent possible damage to the 6520 if /DIAG was shorted to ground, whilst being driven by 6520 PA7 if not protected too-well against that. It would also help prevent damage if a voltage above 6520 supply was applied to /DIAG (Inc. ESD-spikes), although some ESD-clamp diodes would also be advisable. But it's probably not too-easy to retro-fit a series resistor etc, without permanent track-cuts etc. It seems like Commodore saved a few pence/cents, by omitting a series-protection / true pull-up external resistor on /DIAG etc. Last edited by ortek_service; 17th Oct 2023 at 1:28 am. |
||||
![]() |
![]() |
![]() |
#32 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]() Quote:
I think we'd better give Colin a chance to get back to us on whether the surgery on the 74LS00 was successful before we add too much more to the thread. |
|
![]() |
![]() |
![]() |
#33 |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
Hi. All sorted thanks. I've some new ICs on the way to replace the one I nicked from my MK14.
I'll let it settle and think about adding a reset switch. I believe there is a way that a switch can drop the PET into the monitor using the DIAG line; I wonder if my problem was ever related to that. See this quote: "This is true, but there is help. If you hold down the diagnostic sense line (user port pin 5), you'll end up in the monitor instead of doing the full reset thingie. A PET at our school's computer club had a smart thing with a switch wired to reset, and diag through a condensator. If you flicked it quicky it would reset; if you kept the switch in the alternate position a few seconds it would decharge the condensator, pull down diag, and when switched back you came back in the monitor." from here: https://www.commodore.ca/wp-content/..._PET_notes.txt Colin. |
![]() |
![]() |
![]() |
#34 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
The line of investigation regarding the DIAG line was based on the knowledge (from the internet) that in order to get into the built in monitor, one way to do it is to take the DIAG line low.
Since you were apparently stuck in the monitor it seemed possible that DIAG was being held low somehow and that did prove to be the case as you measured it at around 1.16 - 1.17V, so you had to find out why that was and through a process of elimination of the ICs on the DIAG line (a mere two) you seem to have found that it was the 74LS00 which was the culprit. Quite how it ended up getting zapped as a result of something you were doing with the cassette port, we'll probably never know. I presume you were trying to draw power for something from the cassette port, but we don't know what that something was or what else on the PET it was connected to. The dodge you've quoted sounds like it is meant to hold the DIAG line low after reset is released, but only after reset has been held down for a while longer than usual. I think it would need more than just a switch and a capacitor, there would need to be at least a resistor involved so that the capacitor did not discharge instantly as soon as the switch was pressed otherwise the machine would always go straight into the monitor after any reset press / release, no matter how short. Also, when starting the machine from cold the capacitor would already be discharged and would tend to always take the machine into the monitor at power-on. If this is a viable hack, I would be amazed if the wiring / circuit has not already been described in detail on the internet. |
![]() |
![]() |
![]() |
#35 | |
Octode
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,602
|
![]()
Yes - I've seen plenty of pages and vidoeos regarding fitting a reset switch but fitting something that drops to the monitor is very difficult to find a definitive document.
It doesn't help that the pins are seemingly different on different PET models either. I was plugging in my Stupid PET Tricks device which gives joystick capabilities, easy sound output and internet access from the PET and plugged the power tap in upside down on the Cassette Port. Completely self inflicted. https://www.bit-zeal.com/product/stu...ricks-module/3 Colin. Quote:
|
|
![]() |
![]() |
![]() |
#36 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
It wouldn't be hard to knock up a proper small electronic circuit - either using TTL / CMOS or a small 8-pin microcontroller like a PIC12F629 - to add that 'long press to go into the monitor' function to a reset switch but it would involve placing 'alien' hardware inside the machine. You could even dedicate a small microcontroller experimenter board like a Pi Pico or a small Arduino to the job although it would be using the heaviest of sledgehammers to crack the smallest of nuts.
However you did it the 'thing' would have one input (from the reset switch) and two outputs, one going to the reset line and the other going to the DIAG line. I invite suggestions for a circuit for a non-microprocessor solution to this problem. If it can be done via a simple passive circuit as originally suggested, so much the better, with the caveat that it should not take the PET into the monitor on initial power-on. |
![]() |
![]() |
![]() |
#37 |
Triode
Join Date: May 2023
Location: Salisbury, Wiltshire, UK.
Posts: 30
|
![]()
The reset device Collin is referring to was the Pronto-PET, it was a little box with a push button and four wires that connected up to the pet.
There was a thread over on the vcf forum where they tried to come up with a circuit made from a switch with just some additional resistors and capacitors ( https://forum.vcfed.org/index.php?th...-down.1243260/ ) The following is from page 17 of http://archive.6502.org/publications...ut_1980_12.pdf But what, you may well ask, is Pronto-Pet? And a good question too. Well my friends, ever since Jim Butterfield (I think it was) discovered that you could get out of a "crashed" Basic condition, with whatever program you'd been typing in still intact, various gizmos have appeared on the market to work the necessary magic. The magic is simple enough, but a little fiddly to do for yourself - you have to short various user-port pins together, and so forth; the sort of thing that, at best, isn't easy and, at worst, is downright terrifying. Nightmares of blown ROMs, and all that sort of thing. Do everything right though, and you drop out of the "crash" and into the Monitor, from whence you emerge by typing "X ". Then you simply go on to type CLR, and lo! you should be able (in the vast majority of cases) to list the program you'd otherwise have lost. The available gizmos have done the nasty work for you, in that they did all the inter-connecting bits when you pres- sed a button, or flipped a switch. The end result has always been the same. The snag has been the somewhat cheap and tawdry appearance of the ones I've seen together with, on some of them, difficult little connections you had to make inside PET. There's none of this with Pronto-Pet. It's a chunky little block, machined from solid aluminium alloy, anodised black, with a single push-button, and four leads. You simply push the latter on to four of the memory expansion pins (and which ones are unmistakably explained in the friendly little instruction leaflet), and you're in business. The block has a really solid "h e ft" to it, though it's only about 2 " by 1" by and it comes with a very thin self-adhesive pad which fixes it firm ly and unobtrusively to the side of your PET. The really good bit is the operation. Press the button and let it go quickly, and you get a "warm start" reset. Press it and let it go s-l-o-w-l-y, and you drop into the Monitor. Sorry - there's an error in that last paragraph; the really good bit is the price of this little beauty. Would you believe just £9.50 - including VAT? Get yourself one for Christmas. They come from Calco Software who are at Lakeside House, Kingston Hill in Surrey. |
![]() |
![]() |
![]() |
#38 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
The connections sound like +5V power, 0V, and outputs to RESET and DIAG, the connections to the reset switch being integral to the Pronto-Pet in this case. I hadn't considered its possible use as a crash recovery tool, that IMO makes it a bit more worthwhile considering.
|
![]() |
![]() |
![]() |
#39 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,194
|
![]()
Well if you're going to have an external switch (I assume there's not an easy way of adding one to the PET, without dangling wires out of a vent-slot etc that's easily-reversible - so no drilling holes in the case!), then it seems it would be much-simpler to just have 2 separate switches for /DIAG and RESET (If that's actually the usual active-low, then shouldn't need +5V connection).
Having to press a single switch slowly, without risking a switch contact-bounce making it seem like a quick-press. Although I presume a 'warm reset' doesn't normally wipe the memory (And memory doesn't lose its contents when 6502 is reset, as either SRAM or CRTC-refreshed DRAM is used - as 6502 doesn't provide its own refresh). £9.50 was quite a lot back then (and maybe even now) for a fairly-simple circuit. But I guess a solid custom-machined metal block was the most-expensive part of it. |
![]() |
![]() |
![]() |
#40 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,084
|
![]()
Any scheme that I would seriously consider using for this would include a switch debounce circuit or subroutine. I'm not sure that a plain ordinary CPU reset doesn't initialise the RAM, I would have thought it would. Maybe Colin can tell us. The most electronically elegant way to add a reset switch (only) to a PET is to wire it across the timing capacitor for the power-on-reset circuit since that gives a clean hardware-timed reset pulse to the main system reset line.
Unfortunately there is no provision on the PCB for such a switch, as far as I know, so you'd have to have a pair of wires soldered to the leads of the reset timing capacitor, probably C68 in this machine. It is possible to get to the reset line on the memory expansion connector and connect a switch from there to ground - I think Colin already did that on his 3016 - but any reset switch so connected is not debounced as it would be if connected to the power-on-reset circuit. As far as mounting the switch is concerned don't forget Colin is a 3D printing wizard so he can easily make a blanking plate for any available gap in the casing and mount a reset switch on that. Presumably invoking the DIAG monitor during initialisation diverts the CPU away from the RAM initialisation routines and so stops the machine from clearing the RAM. |
![]() |
![]() |