Squats are a staple movement for legs and to be honest, can't be "duplicated" with any machine. I had knee problems (football injury) myself. How do u get through it?... Swallow you ego. Drop the weight, and focus on form and proper muscle contraction.
Hack squats are nice, but not a replacement. Same with leg press. I train legs twice a week, and the back squat is part of both workouts. I do use machine leg press (hate unloading hundreds of pounds of free weights, it's pointless) close stance 4-6" apart and go for high concentrated reps (20-25ish) supperset with 45 degree walking lunges. To burn them out afterI squat. (It works for me, my outer sweep has really been taking shape)
Smith machines train bad form. In order to get anything positive out of smith machine squats is to have a solid base foundation in a free squat first. You will know when your form is not right while in a smith rack that way. I only use a smith machine squat for close stance box squats (simply because of balance) maybe once every few weeks to switch it up.