bewing wrote:berkus wrote:bewing, why not slowly rewrite bochs to better shape? you can do it step by step without major breakage and in a controllable manner, can't you?
If I were to take all the bochs sourcecode, rename it "rebochs" (with a shoe for an icon), and begin a rewrite -- some of it could be done in that way, yes. The configure script, the param_tree, the main cpu_loop that runs the sim, the breakpoints, the "BX_Events", and making the "devices" threadsafe.
The memory code is already good, and so is the disassembler (and the gui debugger, of course).
However, the main thing that needs the most help is that the model of the CPU is all stored in C
structures. Structures (and C++ objects) are SLOW. I know that programmers hate to hear that, but it is true. Arrays are MUCH FASTER. So, the basis of the rewrite would be to recode the entire CPU model using arrays instead of structures. Sadly, this would completely and utterly break every bit of the code in the entire program. And that is such a major design change that it would need to be done FIRST. Which means that the program WOULD be broken for the first 3 months.
But, overall, the answer to your question is:
Yes, I could probably get a really good rewrite started on the thing. I have spent 4 months on the user interface already. If I were to spend another 6 on bochs itself, I could probably get it to the point where it was singificantly simplified, and significantly faster -- with only easy incremental changes required to further improve it.
And I am tempted to do it, too. But I am also tempted to get back to working on my assembler, and my OS. And I am also tempted to spend some time trying to make some money, too.
bewing, I hope this is not just a FLAME ON mode
Bochs is lack of developers, currently we are just two, sometimes tree active. We have our vision of how things should look like and need a push from outside to change it
The same way I pushed Bochs 2-3 years ago with rewriting of FPU code.
Or the same way as Darek Mihocka pushed me last year so we rewrote most of Bochs CPU code making it over than 3x faster than older versions.
The configure script, the param_tree, the main cpu_loop that runs the sim, the breakpoints, the "BX_Events", and making the "devices" threadsafe.
-> looks fine. you choosed list of truly undependent modules which could be rewritten separatelly without touching everything else !
I, personally, have nothing agains configure script, but if you could suggest any alternatives ...
The param tree I hate too, put I am not sure I can make it a lot better, my one will be ... just another version of the same param tree. Hope you could do it better.
Main CPU loop - will accept any ideas !
The breakpoints - it is a matter of few days of work, isn't ? You are welcome to do so or example me your ideas and it will be in CVS soon
Making devices threadsafe - this is my top priority thing. I dream of doing this !
But my point - do not start anything before you know till the end how do you finish it. Curently I don't ...
So two ways for you - to do it yourslef or to push me
> The memory code is already good, and so is the disassembler (and the gui debugger, of course).
The memory code will be changed very soon. I want to be able to emulate more physical RAM than you actually have.
So I want to allocate MEM by blocks of 1M or so only after it was touched. This way I could get 40 bit physical RAM on by WinXP host
BTW, thanks for disassembler, it was my rewrite
About the rest - looks like you have no expertise in CPU emulation.
But you have enough expertise in everything else so I'd like to accept your help !
Stanislav