Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

C# Events

Sign in to follow this  


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!