Run/Stop Restore doesn't work

Modding and Technical Issues

Moderator: Moderators

Post Reply
odisseo69
Vic 20 Newbie
Posts: 1
Joined: Mon Apr 01, 2024 4:00 am
Location: Bologna
Occupation: IT Project manager

Run/Stop Restore doesn't work

Post by odisseo69 »

Hi all,
I had a problem with the right switch of the joystick and I solved changing the 6522. I put the newer one using a socket (originally all ic are solded directly on the mainboard). The 6522 is the right one, that one close to the keyboard connector.
Now the joystick works but the Run/Stop Restore no more.
The restore pin is correctly connected to the UAB3 6522 at pin 40. The pin 21 of UAB3 is connected correctly at pin 6 of 6502.
The key Run/Stop works. Run/Stop and Restore instead doesn't work.
I know that UAB3 should low the pin 21 when the pin 40 go at ground on Restore switch but nothing happens, I think the press of Run/Stop should do something in order to do that but how can I test if all is ok? That is, pin 40 go low (not completely at ground directly) and the Run/Stop in which way let 6522 pin 21 to go low?
I though that maybe using a socket some connection between the two 6522 is broken, there are connection on the top of the board and I solded only the bottom. Could be this the problem?
The Vic seems to work fine , no other problems.

p.s.
Originally there were two MOS6522-3283. I changed one with MOS6522-2518 12. I tried to put the old one but nothing changed

Thanks in advance for your help
Fabrizio
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Run/Stop Restore doesn't work

Post by Mike »

The order is important here: to initiate the BASIC warmstart, the STOP key must be held down while the RESTORE key is tapped. The other way round the NMI routine in the KERNAL will return immediately and pressing the STOP afterwards then has no effect.

Does the STOP key function on its own (i.e. can you stop running BASIC programs with it)?

The relevant connections on the mainboard are keyboard connector pin 3 (RESTORE key) to UAB3 pin 40 (CA1) and UAB3 pin 21 ("/IRQ") to UE10 (6502) pin 6 (/NMI). You should see a DC low-level on KB to UAB3 while RESTORE is held down, and a short pulse (around 50 µs) on the /NMI signal from UAB3 to UE10, possibly re-triggered due to key bounce.

...

BTW, with the DEL, HOME and STOP keys, their captions INST, CLR and RUN denote the shifted actions. "Run/Stop Restore" is a misnomer, STOP/RESTORE is what you do here. ;)
Merytsetesh
Vic 20 Amateur
Posts: 41
Joined: Sat Mar 02, 2024 8:57 pm
Location: Canada

Re: Run/Stop Restore doesn't work

Post by Merytsetesh »

Here's a related question. There are a couple of old VIC games I have which affect RUN/STOP-RESTORE.

One of them, Riddle of the Sphinx by Lyversoft, uses POKE 37150,2: this has the effect of entirely locking out RUN/STOP-RESTORE. The other, Four Gates to Freedom by Phoenix Software, has POKE 37150,3, which locks out the warm start and IIRC the game will pick up on RUN/STOP as a regular keypress.

I've looked at the memory disassembly on Zimmers.net and I can see that 37150, $911E, is listed as 'VIA 1 IER': bit 1 is 'CA1 transition' and bit 0 is 'CA0 transition'. (These also seem to be mirrored a few bytes down at $912E.) I'm fairly sure that 'IER' is 'interrupt enable register' but beyond that I'm getting stuck on how changing the values will lock out the warm start. I've also tried POKE 37150,0 out of curiosity but it doesn't re-enable warm start.

Thank you :-)

M
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Run/Stop Restore doesn't work

Post by Mike »

Merytsetesh wrote:[...]
The IER does not work like a classical read/write register. Actually, the MSB specifies an action (0 = reset bit(s), 1 = set bit(s)), the lower 7 bits specify which of the interrupt sources is affected.

More details here: Stop a running timer - and further discussion about the half dozen methods to disable STOP/RESTORE should probably go into a separate thread in the Programming section.
Post Reply