On Wed, 12 Sep 2007 19:12:37 +0100
James Urquhart <[EMAIL PROTECTED]> wrote:
> Hi again,
>
> I was just looking at the scc code, and after quite a while of head
> bashing i am beginning to understand how it all fits together.
>
> From what i can tell, some time in the far future SCUMM V8 support is
> planned. But scc and the linker seem to be hard coded for V6 - there
> is no abstraction to enable different code path's to be taken to
> generate V8 scripts and link together V7 / V8 resources.
Yes currently there is nothing to support other versions. This is
because when I started the project I needed a resonable target. And a
single engine proved to be more than enouth :)
Now that the compiler is completed it is definitly tempting to add
support for other versions. However be warned that v8 is probably the
hardest target. Where v6 mostly use 16 bits integer v8 use 32 bits.
This mean really a lot of work as many data structure will need heavy
changes.
> I am wondering how this abstraction is going to be designed.
To be honest I haven't thought much about it. Again we need a resonable
target. Having support for v5 to v8 seems doable. v7 is definitly the
easiest. v5 is probably not really intersting bcs it's even more
limited than v6, but it could be good to get the ball rolling with
the multiple version support before taking on v8.
> Thinking further, considering V5 is pretty close to V6 in the case of
> its resource format (although interestingly array's aren't stored
> there), maybe it would be an idea to think about writing a V5 SCUMM
> compiler to test out this abstraction before diving into V8?
>
> -- or --
>
> Another idea would be to support V7's resource formats - e.g. AKOS
> costumes, SAN movies. Script probably wouldn't be a problem, as from
> what i can tell there doesn't seem to be any reference to any major
> changes since V6 SCUMM.
I would start with v7 as it's the easiest. A few functions and engine
variables are different so a new opcode table and a header will be
needed. The compiler must also write the version somewhere in the roobj
files and the linker should check that all files target the same
version. It would also be nice to add support for #ifdef and have the
compiler set some define to tell the target version. That could be
usefull for script libs that want to target multiple versions.
Then the support for the other ressource format can be added.
Once that's done we can look at other engines. Wich one doesn't matter
the first step will be the same: taking scummvm appart and documenting
all the formats, notable differences in the VM, etc.
> (I wouldn't mind putting in any time and effort to either idea -
> though obviously i don't want to spend time doing something which
> nobody would appreciate)
You are welcome. I doubt there is much things I would refuse as long as
the code is clean :) Just avoid too big patches, send small ones as you
go along.
Albeu
_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general