It sounds like your graphics drivers are having trouble switching back and forth between different resolutions. Try messing around with the different scaling options, and make sure that 640x480 is supported. You could
And, yes, getting a graphics card would help tremendously. Since the KotOR games are so old, even a cheap one would still be able to run the games at their highest settings. Since you have a reasonably powerful CPU, a modern graphics card would be a sensible upgrade. If you're in the US, I could find you one that would suit your needs without breaking your budget.