[Scummvm-devel] Dreamweb code (+ general ScummVM focus/vision)

Bertrand Augereau bertrand_augereau at yahoo.fr
Mon Jun 20 09:29:58 CEST 2011


> Let's try it on DS. Usually, simple SSA, found in every
> compiler, eliminates all unnecessary  writes.

Sure, this is the only way to know! I don't have access to the hardware anymore sadly.

However, I don't really see what SSA has to do with the present case.
The lhs is in memory (as a global or member variable for each register and flags) so the compiler can ditch multiple consecutive writes at function scopes but if you translate
push ebp
mov ebp, esp
mov eax, 12
mov dword ptr [twelve], eax
ret
The compiler won't know if eax is needed or not outside the function, so it'll definitely store it in memory.
Ditto for the flags.

We'll have to wait for the next round of DS tests I guess :)

> 
> >
> > Cheers,
> > Bertrand
> >
> > --- En date de : Lun 20.6.11, Johannes Schickel
> <lordhoto at gmail.com>;
> a écrit :
> >
> >>  De: Johannes Schickel <lordhoto at gmail.com>;
> >>  Objet: Re: [Scummvm-devel] Dreamweb code (+
> general ScummVM focus/vision)
> >>  À: "Vladimir Menshakov" <whoozle at yandex.ru>;
> >>  Cc: scummvm-devel at lists.sourceforge.net
> >>  Date: Lundi 20 juin 2011, 8h52
> >>  On Mon, Jun 20, 2011 at 5:40 AM,
> >>  Vladimir Menshakov <whoozle at yandex.ru>;
> >>  wrote:
> >>>>  Albeit I think it's some nice demo of
> the
> >>  asm->c conversion I do not think
> >>>>  that is what we want in ScummVM. ScummVM
> is about
> >>  reimplementing the game
> >>>>  engines or at least supporting them with
> the help
> >>  of original source code.
> >>>>  This means to me the code should be at
> least
> >>  somewhat proper reimplementation
> >>>>  of the original logic in C++.
> >>>  Who do you want to reimplement this
> engines?
> >>  Seeing that we have most of our other engines
> reimplemented
> >>  I am not
> >>  sure whether this is a real argument. If nobody
> cares
> >>  about
> >>  implementing it, when we don't have it
> supported. I don't
> >>  see anything
> >>  bad about it.
> >>>  What's wrong with robot reimplementing the
> engine?
> >>>  What if I replace gotos with while/do and
> register
> >>  names with locals. Will it be "proper"
> reimplementation?
> >>
> >>  If you furthermore strip all the code from
> runtime.h then I
> >>  would
> >>  think of considering it proper.
> >>>>  Dreamweb definitly is not like that.
> What we have
> >>  with dreamweb is what I would
> >>>  And like that, then?
> >>  Like a proper reimplementation of the game and
> not just an
> >>  asm -> C
> >>  conversion utilizing a "runtime" which is
> basically a
> >>  register set +
> >>  memory + glue code used to display graphics
> etc.
> >>>>  Also like Max, I have the feeling that
> people are
> >>  discouraging that we
> >>>>  reimplement it properly due to it being
> a "waste
> >>  of time" and having a big
> >>>>  chance of causing "regressions". That is
> IMHO bad
> >>  too, we want a proper C++
> >>>>  reimplementation IMHO.
> >>>  Again, define "proper" please.
> >>  Proper in this context is a reimplementation in
> C++ which
> >>  makes the
> >>  logic clear to someone not knowing assembly. If
> you look at
> >>  the
> >>  dreamweb code in dreamgen.cpp it is not really
> much
> >>  different than to
> >>  look at the assembly code.
> >>>>  I do not say we should remove it from
> master right
> >>  now! We should rather talk
> >>>>  about what we really want with ScummVM
> (or in
> >>  ScummVM). IMHO the merging shows
> >>>>  that we really do not live up to our
> standards
> >>  anymore when it comes to
> >>>>  supporting new games.
> >>>  Please tell what's wrong the dreamweb,
> beside "you
> >>  don't like it". Dreamweb is not emulated, but
> translated
> >>  from original source.
> >>
> >>  That's right Dreamweb is not emulated strictly
> speaking.
> >>  But just
> >>  looking at the code in runtime.h clearly shows
> it is using
> >>  some kind
> >>  of "virtual machine" to execute the translated
> assembly.
> >>  This is what
> >>  I would not consider a proper reimplementation
> of the
> >>  engine anymore.
> >>>>  So is this the new way to go? Should we
> really
> >>  accept code like this in the
> >>>>  future?
> >>>  Why not?
> >>  Because it is not reimplemented.
> >>>>  And also what are we going to do about
> the
> >>  dreamweb code? Personally I think
> >>>>  we should not support it officially till
> we have
> >>  reimplemented it properly.
> >>>  Again, no real arguments, just emotions. You
> think. We
> >>  should not. Why not? It's playable, completable.
> People who
> >>  uses scummvm really don't care about how this
> game got
> >>  supported
> >>
> >>  That's right people do not care about how it's
> done. But
> >>  SucmmVM is
> >>  (or at least was) a project aimed at
> reimplementations of
> >>  the game,
> >>  not like some pseudo emulated translation.
> >>
> >>  // Johannes
> >>
> >>
>  ------------------------------------------------------------------------------
> >>  EditLive Enterprise is the world's most
> technically
> >>  advanced content
> >>  authoring tool. Experience the power of Track
> Changes,
> >>  Inline Image
> >>  Editing and ensure content is compliant with
> Accessibility
> >>  Checking.
> >>  http://p.sf.net/sfu/ephox-dev2dev
> >>  _______________________________________________
> >>  Scummvm-devel mailing list
> >>  Scummvm-devel at lists.sourceforge.net
> >>  https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> 




More information about the Scummvm-devel mailing list