-1

I was wondering if it is possible to write a commodore 64 emulator in Python, using Pqt6 for gui. And, can the QTimer class count time in nano seconds?

Thanks

Note: I don't wish for a very fast and fine emulation. Just an emulation.

Torisoft
  • 31
  • 5
  • 1
    Sorry but your question is extremely broad and isn't really valid for StackOverflow as it is right now, as we normally answer *specific, detailed questions*, and "is it possible to" doesn't really fit that description. Please take your time to follow the [tour], read [ask] and review the [checklist](//meta.stackoverflow.com/q/260648). Also, you may only ask *one* question per post. – musicamante Aug 10 '22 at 14:49

1 Answers1

0

Writing an emulator should be possible, albeit slow(you did say you don't need fast emulation). Emulators just take code written for different Hardware and run it natively, and Python has some nice way to parse binary files so you should be good on that part.

As for displaying it, PyQT might have some ways to do it (EG. QGraphicsView) but I'm not sure how good it will be.

PyQT Timer in Nanoseconds
It seems that the highest level of accuracy you can go is milliseconds:

QTime Timer;
Timer.start();
#Get time with: Timer.elapsed();

On the topic of emulation and timing, someone seems to have already asked this question: Qt high-resolution timer