Patrick Davidson Releases Source Guru v0.2 Alpha
Posted by Nick on 16 February 2000, 01:00 GMT
Patrick Davidson has created a smashing new DOS program called Source Guru v0.2 Alpha. This converts your old-school TI-85 assembly programs for usage on the TI-92, for Fargo II. So far, Jezzball v2.2 for the 85 has been successfully converted without a hitch, and that's now in our archives for Fargo II. A new version should be released soon, but you can feel free to experiment with this one in the interim. Update (Nick): Patrick has updated Source Guru to v0.41. This version includes support for the TI-92 Plus, along with some other enhancements for the conversion. If you downloaded it before, download it again. Sorry for the inconvenience.
|
|
|
The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.
|
|
Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
Jeff Meister
|
This seems very cool... if only it was made for the 89 so I could have a chance to try it :)
Oh well anyways very good job on this... I'm sure all the 92 people will enjoy it, with the large library of games they now have access to.
- Jeff
|
|
16 February 2000, 01:59 GMT
|
|
Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
DefconAlpha
|
LOL! You manged to get "smashing" in. Way to go ol jolly chap!
|
|
16 February 2000, 02:00 GMT
|
|
Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
EV9D93
(Web Page)
|
MAAAAAAAANNNNNNNN!!!!!!!!!!!!!!!!!!!!!!!
NO FAIR!!!!!!
I love my TI-86 kuz i can play 86, most 85, 83, adn 82 games....
Now the dumb "SUPER" calculators can play my 85 games!! wah!!!
|
|
16 February 2000, 02:12 GMT
|
|
Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
David Phillips
(Web Page)
|
Very nice! I've often thought about such a recompiling technique, but never gone as far as this. Why does this work with source code instead of object code? Since it's essentially a direct opcode translation (with minor hardware emulation), parsing through all the Z80 source would add a lot of complexity to the project.
Has the idea of doing it from the object level on-calc been considered? The source could be recompiled before it runs, and if it writes to it's own code space, then it would trap that and dynamically recompile that portion of the code on-the-fly. This would be the same manner that most speed conscious emulators work, such as Mac <-> PC and N64 -> PC.
|
|
16 February 2000, 02:20 GMT
|
|
|
|
|
Re: Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
Patrick Davidson
(Web Page)
|
I thought that an on-calc recompilation system would be too big. It requires the recompilation program itself, as well as all the Z80's data, and the converted code to be in memory. That isn't likely to fit on the TI-92 where you have 70K (84K if you use the stack also).
I don't know how actual dynamic recompilation is implemented, but I'm also concerned about jumps. It seems to me that any jump in the recompiled code would have to look up the address of its target in the converted 68K code. This would take a while unless the size of 68K code was a constant multiple of the Z80, which would likely be big since it needs to account for the largest instructions. The serious implentatios of dynamic recompilation may have a solution to this, but I can't see an obvious one. Also, unless a list of jump targets were maintained, it wouldn't be known whether a section of code can be entered in the middle, like I can do if I trust entry to only be on labels. So some optimizations (that I don't use now anyway) would be harder in that system.
Of course, I do realize the limitations of the system I'm using. Nonetheless, on the TI-85 (where, unlike on the TI-86, people don't move their own code around a lot) I think most programs should be able to work with this system. Self-modifying code is a huge problem, but not an unsolvable one. Usually it's only used on the constant field of an instruction, so all that's needed is to evaluate the addresses, and if they're pointing to the middle of an instruction, to adjust the value accordingly. Of course, jump tables are a slightly bigger problem, and that will be a mess, but I still think it can be done as well.
|
|
16 February 2000, 03:34 GMT
|
|
|
|
|
|
|
|
Re: Re: Re: Patrick Davidson Releases Source Guru v0.2 Alpha
|
David Phillips
(Web Page)
|
Jumps are a problem, but it's the same thing as accurately dissassembling code. If a program has data thrown between routines, then it would throw off where the code should be dissassembled and recompiled. Dynamic recompilers that handle this work along the same premises as an emulating dissassembler. Until it has been run, it can't be treated as code, and thus must be treated as undefined. And if it gets written to, then it must go back to being undefined, until it gets run.
When a block of undefined data is hit by the executing code, it gets compiled and executing continues. All jumps to undefined sections return to the recompiler, as they must remain undefined until the target is defined.
Of course, the problem of code jumping into the middle of an instruction must be dealt with as well. This is handled by maintaining a translation table of all recompiled addresses in the original code to the generated code for the host processor. While the data for the instruction will have been defined (compiled), it will not have an address in the translation table because it compiled starting from a different offset.
This method assumes that the machine has a lot of memory to work with, which I realize that the TI-92 does not. However, the TI-89 and TI-92+ do probably have enough RAM to implement this technique, which would be required to run TI-86 programs. Except that ROM calls on the TI-86 would be an absolute nightmare.
There is undoubtly other methods to implement a dynamic recompiler, but this is the only one that I have figured out that will execute any code with complete acuracy.
Maybe this will give someone ideas to work with...
|
|
16 February 2000, 09:54 GMT
|
|
1 2 3
You can change the number of comments per page in Account Preferences.
|