One of the first software projects I ever developed was a real microcode/bus simulation of the 6502 for a required CP class I took what seems life lifetimes ago. I remember the prof telling the class that if anyone was interested in a project where they didn't have to come to class and still get an A, talk to him after class.
Sure I'll go for that I thought...who wants to sit in a boring class when you can create.
So I built the opcode simulator, which took the individual bits on the various internal busses and propagated them through the "chip", on a pretty kickass Atari ST that I owned, which at the time (1985 or so) represented cutting edge PC technology. What I remember most about it was finding a bug in the damn Turbo-C (or whatever I can't remember exactly) compiler I was using that, in some cases, always gave the output of "50" during an bin-to-hex conversion or something.
I did everything I could to try to fix this bug, but no matter what it kept popping up, fouling up the results of my otherwise slick simulation. I was terrified to show the prof, but he was relatively impressed with my use of a PC instead of the school's timeshared VAX and totally disregarded the bug after reviewing my code.
And yes...I got my A. I sure wish I still had that program.