by R0B » May 18, 2002 @ 7:53pm
Ok, if you don't know the first thing about assembler, than don't waste your time trying to write a core emulator with it, because it will probably be extreamly difficult. What you can do, is first compile your core, and have it save the source as asm, then go from there. If you look in the code, there are many places that can be optimized. Now, why doesn't the compilers do these for you? Well, it is quit simple. The compiler only knows what you wrote, and does limited optimizations based on the code around it (don't get me wrong, by limited, I don't mean poor or bad, I mean not to the full potential). The compiler is not capable (at the present time) of knowing the purpose for that portion of code, why you chose it, or is there a way to completely rewrite the routine with a different approach that could save some clocks. That is currently not possible with our computers power. If it was, quake would have been automaticly converted to fixed point (or maybe redone with ints, saying screw decimals all together), but it is not. By looking at the asm, you may say, why is it performing all of those opps to add these two numbers and multiply them by another? Couldn't it be done in a better way with fewer steps? Well, that probably has to do with how the variables are stored. So, what you would do, is slowly rewrite the core from there (testing it often), and leaving the c relm. As far as I know (and I could be wrong, but I don't think that I am), the first Xscales run on the 2002 os. Well, ms has said that their new compiler, eVC++ 4.0, works with ce .net and up, so, aside from the development pack that may or maynot be updated with an XScale option (probably not if the arm option compiles fine for it since MS is really lazy in these types of situations), I don't see how not using asm would be of any benifit. Why do you think that weaker (in speed) devices are programmed almost entirely in asm? It's not because they enjoy it, although you really do get a good feeling when you accompilsh something with it, but because they need all of the clocks they can get. There is no question in my mind that asm is needed to make this run at average speed. Shoot, I am willing to help with hours of my time if I can play ff7 on this fellow(pardon my latin) (For those of you who don't know, fellow in latin means one who practices oral sex, hence a bitch). Also, I am not the best arm coder out there, in fact, I would classify myself as a beginer when it comes to the knowledge that many people (some of which belong to this board) have. On the other hand, there are many devices (z80 and 68k) and maybe intermediat at x86 (haven't been as extensive with that), so I know a lot about how asm works and why you use it. Here is one thing you should keep in mind. I was talking to a guy I know who programs for a living, and said, "I think my favorite language is asm because of the power you can get from it." He said "Well, it was that way for a long time, but with the speed capabilities of todays computers, you have enough extra clocks, that you don't need to do that anymore." Notice the reason he gave, and he is a very good programer who is highly appriciated (and positioned) in whatever company he works for. Since, however, we don't have that kind of extra speed to throw away, it is necessary that for demanding programs, we take the required steps to make it work.
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender