mnaberez / py65

Emulate 6502-based microcomputer systems in Python
BSD 3-Clause "New" or "Revised" License
234 stars 68 forks source link

Added irq() and nmi() to the MPU #60

Closed irmen closed 4 years ago

irmen commented 5 years ago

For my Python Commodore-64 emulator (pyc64) I require the ability to interrupt the CPU during execution. I can create these functions myself but I think they're better suited on the MPU class itself. Notice that the implementation of both is very similar to the BRK instruction

(side note: the emulator now runs the 'real' c64 ROMs and boots up a working basic environment, and runs at slightly over half the speed of a real c64 with regular cpython. Quite astonishing for an interpreted language. Running it with pypy is where it gets really interesting)

irmen commented 5 years ago

@mnaberez is this worthwhile enough to add to the MPU class, or do you say nah, keep interrupt simulation elsewhere

mnaberez commented 4 years ago

the emulator now runs the 'real' c64 ROMs and boots up a working basic environment

Very cool!

is this worthwhile enough to add to the MPU class, or do you say nah, keep interrupt simulation elsewhere

Thanks for the patch!

This seems fine but I'm a little behind on pull requests on this project at the moment. I hope to review/merge the open requests soon.

irmen commented 4 years ago

@mnaberez I've rebased this on the latest. It still says above that a change is requested, but I think we already took care of that earlier. Can you have a look at merging this PR once again? Much obliged :bow:

mnaberez commented 4 years ago

Thanks!