Son of Gear
blittled
Posts: 681
I've been toying with the idea of coming up with another Propeller Emulator. I realize that there is already an excellent emulator, Gear. I do believe it is still maintained and the source code is available for it.
My goal is to try to make it cycle perfect with the Propeller at 80MHz. Since I am a C# programmer it will be written in C# like Gear. My approach is to launch each cog as a thread to emulate parallel processing. As soon as this goal is reached then single stepping would be added for debugging. Also outputs such as emulated NTSC and VGA screens would have to be created. It will be probably released as an open source project so it can be a community effort.
Some questions I have are:
1. Am I reinventing the wheel since Gear is an excellent emulator?
2. Is there enough interest to make it a worthwhile project?
3. Is C# fast enough, especially with graphics (could OpenGL or DirectX be used for speeding up the graphics)?
4. Is there anyone else doing this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Will work for Propeller parts!
My goal is to try to make it cycle perfect with the Propeller at 80MHz. Since I am a C# programmer it will be written in C# like Gear. My approach is to launch each cog as a thread to emulate parallel processing. As soon as this goal is reached then single stepping would be added for debugging. Also outputs such as emulated NTSC and VGA screens would have to be created. It will be probably released as an open source project so it can be a community effort.
Some questions I have are:
1. Am I reinventing the wheel since Gear is an excellent emulator?
2. Is there enough interest to make it a worthwhile project?
3. Is C# fast enough, especially with graphics (could OpenGL or DirectX be used for speeding up the graphics)?
4. Is there anyone else doing this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Will work for Propeller parts!
Comments
Whether or not it will be good for others is TBD. People will probably use it if you add a fully functional Spin interpreter emulator (gear is deficient in this respect as I recall). You will hear lots of whining about .net [noparse]:)[/noparse]
Emulators need performance. Emulators need portability, else what's the point. If you are going to put a lot of hours into a project with the aim of making it generally useful why limit your audience to Windows users.
OpenGL of course, same reasoning as above.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I think using threads for this is totally pointless.
If you want to make a cycle perfect simulation of a Prop (or any other hardware for that matter) then you will have a simulated "clock tick" some where. On this tick you want to evaluate the new state of all your hardware. All the COG's, all the timers, video shifters, I/O pins, HUB multiplexer etc etc. These things have to be in lock step so the is no point in doing them in threads which you then have to keep synchronized some how.
Now you might argue that you want to use threads to be able to make use of the multiple cores of your PC's processor.
Fair enough, but I wold be happy leave those cores occupied running the rest of my operating system, and surfing the Propeller forum[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
After reading this: www.infowars.com/bill-gates-use-vaccines-to-lower-population/, I am going to step up my efforts to avoid funding this Malthusian Megalomaniac.
I don't use Windows, for technical and policy reasons, and many others don't either. And like jazzed hinted to, many of us don't even know how to deal with .net, much less want to.
I, mostly use IRIX(runs on old SGI hardware that I doubt you will support), and openSUSE Linux. If you did it in any flavor of Linux, of which Ubuntu IIRC is the most popular among desktops, it would be a greater benefit to many of us.
And for those who say I am being too political, I say this: think about how much "politics" has affected your life, and yes your hobbies. I dare say that if you thing "not much", you are deceiving yourself.
Take Care,
Doug
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
C# can easily be fast enough if you know exactly what the compiler's output will be. There are several implementations of C# doing number crunching the rivals C++, especially if you fully understand the JIT process, etc. Games for the Zune/Windows/XBox are written on a "compact" version of the runtime via XNA and it's plenty fast enough to produce full screen graphics at 60 fps. With that capability, I'd think it would easily be fast enough to emulate the prop.
Bill