0 Members and 2 Guests are viewing this topic.
Hello, I'm announcing the first project for KnightOS. When it's done, I'll get started on Compat8x. Like Wine for Linux, Compat8x will be a compatibility layer allowing TIOS programs to run under KnightOS. I will support PartesOS as well when it's released, and the reverse (KOS on TIOS) could also be possible. How it works is this (for TIOS on KOS): The program is copied to RAM twice. Compat8x looks through the first copy for CALL, JP, and LD. I'll talk about that in a moment. It needs to know if a given address lies within the program, and that can be calculated like so: TIOS programs run from $9D95 If a program is $200 bytes, all addresses between $9D95 and $9F95 are internal. Compat8x will set aside RAM that will mock SafeRAM from TIOS. When it encounters a load, if it is external, it changes the address to the corresponding mocked SafeRAM. If it's internal, it changes to the second copy in RAM. Compat8x will also keep a jump table that leads to the KnightOS equivalent routines to commonly used bcalls. All external cals/jps/bcalls/bjumps are changed to their corrponding values in the jump table. I know it wouldn't be perfect, but it could allow few programs to run.
I am utterly ignorant of the finer nature of Assembly mechanisms and terminology, and because I cannot tell from context, I'll ask a noobish question:Will Compat8x handle TI-Basic programs or Assembly programs? (or both?)
TI-Basic will be supported, though.
I implied elsewhere, I think, that I will be writing a similar program using the double-copy idea.SirCmpwn, another idea: for what is probably a good number of programs, they can be divided into code and data sections. We could compile a table of where the split(s) are located for common programs, and having this knowledge would make it possible to need only one copy.