Chris-Johnston / Easier68k

Work In Progress - A Python M68k assembler and simulator.
https://chris-johnston.me/Easier68k/
MIT License
15 stars 6 forks source link

Add support for Trap tasks calling handlers on custom codes #102

Open Chris-Johnston opened 6 years ago

Chris-Johnston commented 6 years ago

Should add support for an event-like system where the TRAP opcode for a custom code should call callback methods that supply the code given.

Should have some way to set up the simulator to support these different trap methods. Would be part of the simulator strictly.

pupper68k commented 5 years ago

Not sure what you mean by "custom codes" can you please elaborate?

Chris-Johnston commented 5 years ago

Sure, so Easy68k supports this list of Trap codes/tasks based on the value in D1. Some of these are specific to Easy68k. I was thinking that the simulator should have a callback/event that is called when Trap is fired. This way, if I'm implementing a GUI and I want something special to happen on trap when D1 is 0xEE, I can just use that callback.