• Please review our updated Terms and Rules here
  • Exhibitor application for VCF West 2022 is now open! If you are interested in exhibiting, please fill out the form here.
  • Here are the results of the VCF East 2022 Post Event Survey: Survey Results

C64 Port 1 (56321) Fritzy???

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
My Game Port 1 gives a "251" flick - flick -flick on the video display when I Peek (56321) and push the joystick LEFT. All other moves (U/D/R) are ok, and the Joystick also works perfectly in Port 2 Peek(56320).

Is there any fix for this in the connector or motherboard?

This occurs on BOTH my C64s which I had previously dis-assembled and cleaned the keyboard and circuit board (keys). Is this a possible known problem with the C64, or is there something I (semi-techie) I can fix up?
 

rittwage

Veteran Member
Joined
Mar 6, 2012
Messages
883
Location
Augusta, Georgia, USA
Can you explain what you mean exactly by "flick"?

Joyport 1 is scanned constantly by the regular IRQ routine because it's also attached to the keyboard. If you just mean it changes from 251 to another number briefly, then that is why. It would be normal when it scans the rows and columns of the keyboard.

For that reason, it's recommended to use joyport 2 in BASIC programs.
 

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
Rittwage,

By "flick - flick - flick ", I mean that "251" shows on the screen, then is blank for about 1/3 second, and then shows "251" again, and keeps repeating the same pattern as long as the joystick is held LEFT. I have a loop running "Print Peek (56321)" continuously. For any other position of the joystick, the displayed number shows correctly in the "running list", smoothly and continuously.

It works properly and smoothly in Port 2. I am trying to "play" some of the cartridge games (from the closet 30 years ago). My Basic coding is only used for some engineering/mathematic calculations and demonstrations.

Could the IRQ routine be messed up somehow??...or some problem in one of the chips or traces?
 

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
Rittwage,

I forgot to add in my note above, that the issue comes up in trying to "play" a game such as "Pitstop" or "Starpost". I was not able to get reasonable screen responses to the Joystick, and originally thought the Joystick was faulty. However, with the loop program running continuously as Print Peek (56321), the problem we narrowed to Port 1, not the Joystick

Thank you for any help or guidance.
 

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
Rittwage,

Thanks for the note! It does seem weird to me as it only happens with the Joystick pulled LEFT. All other motions ( U/D/R) give a uniform display of the numbers. Port 2 is uniform in all motions (U/D/R/L, NE/SE/SW/NW) All these are running with the same Basic program Peeking (56321, 56320). Is there anything else which might cause this?

My "hang up" on this, is that it prevents me from executing the cartridge games I have. I don't know if the cartridge games are coded in Basic or Assembly??

If any other VC members have a comment please leave them too? Thank you.
 

rittwage

Veteran Member
Joined
Mar 6, 2012
Messages
883
Location
Augusta, Georgia, USA
Well, if the joystick direction does not work properly in a cartridge game, that is another issue. I would suspect a bad CIA 6526 or related circuitry to that port (of which there is not much, see the schematics).

However, in BASIC when you PEEK(56321) and push left, it will slow down the computer and print 251 as you noted. That is normal. It will even do that in emulation. This is because that joystick direction is the same as holding down CTRL which is one of the keys that slows down BASIC program printing when held. It also gets interpreted as pressing "space" I believe.

Just try it- drop to a READY prompt and wiggle the joystick in port 1 all around. It acts the same as if you are pressing keys because it shares some of the same signal lines.

Port 1 is used rarely in games because, as noted, it interferes with the keyboard scanning and vice-versa.

But again, this behavior is NORMAL and is not related to any problems with cartridge games you might have.
 
Last edited:

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
Rittwage,

Thank you for the explanations....this does seem to make some sense, although it is not too clear to me how the signals are getting through on shared lines. I did wiggle the Joystick as you suggested at the READY prompt, and got...

U - Nothing
D - Left arrow
R - 2, 8,..etc
L - Cursor running to the right....This was an immediate response to the joystick; each "push" left generated another "step" to the right, no hesitation.

I guess the "flick" I was trying to diagnose was normal when running a Basic "Peek" program. Weird!

I will try later running "Pitstop", where I had hoped to get a smooth, continuous response to each joystick "push". I will also look at the electrical schematic again. The one I have is folded in the back of the Programmers Reference Guide.

This "C64 project" has gotten somewhat beyond the original intent of restoring my children's computers form the 1980s, but it has definitely intrigued me, and the videos from the "8-Bit Guy" on YouTube have been impressive!!

Thanks again.
 

KC9UDX

Space Commander
Joined
Jan 27, 2014
Messages
7,468
Location
Lutenblag
You can get around the system delay when pushing left by not PRINTing.
Just POKE a different character to location 1024 for each combination of switches. Or change the border colour.
 

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
All,

Thanks for the information and clarification on how the joystick is read by the C64..both "stand alone" and vis Basic. It is now all much clearer.

I re-setup the new joystick (red-button) with the cartridge game "Pitstop", and running at the slowest speed, was gratified to see the "race car" responding well to all the joystick motions. I guess the cartridge just disables the interrupts, or something, on some of the signal lines.

I also ran "Aggressor" on my VIC 20, and it responded well too.

I had been concerned that all my dis-assembly of the V20 and C64s had messed them up somehow, but I guess not. I must have re-soldered properly, and not nicked any chips or traces in the process! They are now reset for my (adult) children to re-play a little of what they had done in the 1980s.
 

AAGDOS

Experienced Member
Joined
Jul 4, 2018
Messages
98
Location
Hartford, CT
Just a quick update on Port 1 "Fritzy"... thanks to rittwage and others who responded.

I checked it further by learning (some) Assembly Language, and then monitoring the port without using BASIC at all. I got exactly the same "flicking" when I ran a continuous stream of data from $DC01 to the screen. This confirms in my mind that it is a result of conflict with the keyboard scanning routines.

Now on to other ML codes!
 
Top