Jump to content
Sign in to follow this  
  • entries
    292
  • comments
    557
  • views
    154340

C# Events

Sign in to follow this  
TANSTAAFL

122 views

Finally got to the part of my little pet project (a MC6809E virtual machine) where I needed delegates and events, so I put them in.

The first one I put in is for the VM itself. I was previously writing text to the console based on what instructions were being processed by the VM. As time went on, I realized that this was going to have to turn into an on the fly disassembly.

So, the first event is a debug output event. This allows me to have multiple subscribers to an individual machines debug output.

The second event is a register listener. Whenever a register's value is set(not necessarily changed, just set), it's subscribers can know about it.

Together, these allow me to set up some sort of debug console, but doesn't lock me into a particular way of debugging, which is neat.

Finally, I added events to the memory addresses. And here is where I am starting to run into a minor issue that I am yet to resolve. Listening to an address being set is effectively allowing outside object to take the role that memory mapped hardware used to in actual MC6809E machines, where setting a value to a particular address would cause a signal to some other hardware.
Sign in to follow this  


1 Comment


Recommended Comments

I have an MC6800 based kit computer from 1976 in the basement. [grin]

I'd like to see an emulator for it one day, but I'll probably have to write it myself as the only one I could find is a hunk of junk for Win9x.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!