HispaMSX

Re: [hispamsx] RE: ¡Otra vez el Shinobi!

2004-01-27 00:01:58

  Hi,
  
  I can read spanish, but cannot write. Sorry, I hope you can
understand my english...

El único PERO que le puedo poner, puestos a poner peros, es que para 
ejecutar un juego Spectrumero requieras un ordeñador a 7 MHz. Si
tienes un Turbo-R, cojonudo. Si no, te quedas con las ganas. Alguien
se anima a hacer  un port del juego desde 0 y que funcione a toda 
velocidad, bien sea para  MSX1 o para MSX2?

  I'm afraid it's not possible. There are several reasons for it:

  1) In Spectrum you can Write on "VRAM" with LD/LDI/LDIR, in MSX you
must use OUT (OTI and OTIR are not even usefull, since MSX VDP is too
slow... if you do it too fast, VDP simply ignores data and the screen
becomes garbage).
  2) The normal Z80 "instruction cycle" on Spectrum is the standard
Z80's 4 cycles. In MSX this is 5 cycles, due to an aditional Wait.
  3) Last but not least, additional code is needed to "emulate" some
speccy functions, which take time (not much, but whatever). The only
way to remove this limitation is rewrite the entire game (damn it...
rewrite is not port).

  In my calculations, Speccy can write the entire screen in 1,2 IRQ
time (at 50Hz). This means you can reach almost 60 FPS if only writing
on screen. Shinobi processor work is large. The original game takes
about 2 IRQs to run and it uses a HALT to sync to 15FPS.
  In MSX1, the game takes almost 3 IRQs only to draw the screen, and
aditional 2/3 IRQs to process the game. When enabling the clock, this
took another 1 IRQ, completing 7 IRQs... (less than 10 FPS), which
makes the game choppy. I optimized some thing to try to make it
better, and made the game 6 IRQs, which means 10FPS on MSX1, but could
not make it better. I made the game process take only 2,5IRQ and
2,5IRQs to draw the screen. Note that in this mode the sync *is not*
enabled... the game runs as fast as possible.
  In machines with 7Mhz, many of these issues are fixes. Screen
process continue to be 2,5 IRQs... BUT the game process (including
IRQs) falls to 1,5 IRQs. This means the game runs at 15FPS! But
anyway, somethimes there are many enemies and the game slowdown a little.
  So, I had the idea to optimize the screen routines to machines with
flow control (or without wait-states) between Z80 and VDP (currantly I
only know CIEL 2+ / Expert 3 and Turbo R machines that does this
trick). In these machines, it is not needed to delay between OUTs to
VDP. You can do them as fast as...

  OUT...
  OUT...
  OUT...
  
  Which means VDP will work in its top speed. So I made the screen
update fall to 1,75 IRQs... which means the game became faster than
Speccy one (even when the slow downs happened on 7Mhz machines) and
then, enabling sync, I made the game run at 15FPS as the original full
time.

  Note that I had to rewrite almost all graphic blitting routines not
only to speed up, but to make the necessary image clipping (the
original game writes in the space between FFFFh and 3FFFh which
*cannot* be allowed in MSX.

  So... I think it *is* possible to make the game runs faster, but NOT
without rewriting the entire game. Which is not worth, I think.
Remember that Speccy games usually *do not* reuse code from one stage
into another. That means you will need to rewrite *all stages*.
 
Por lo demas,... ¿es posible portar juegos de Speccy a MSX? ¿Desde 
cero? 

  Of course. But it is a hard task. Maybe I do it in a near future,
but I cannot guarantee.

Es que el Golden Axe... Street Fighter, Super Monaco GP, Bonanza
Brothers, Space Harrier, Out Run (La conversion de MSX1 es mala),
Shinobi a 3,5 MHz, E-Swat, etc, etc... no pasaron por MSX y los echo
de menos... 

  I like a lot TMNT2.
  Anyway, it's easier to upgrade your MSX to 7Mhz and make a few
changes on the already ported games than rewrite all of them. Rewrite
software to acomodate hardware flaws is somewhat bizarre to me. (the
number of machines is small... the number of games is huge). Note:
this is not a "PC kind" of problem... "Buy a faster machine". MSX is
slower than Speccy on video updates *and* on processing. "Emulate" a
speccy inside of MSX running at the same clock as the speccy will
never make a game that run at full speed.

  Even with those "complains" about the fact the game is slow (even if
it is about 10% faster than the original conversion), I hope you liked
the new version. One of the requests I got when I decided to do this
work was from somebody in this list.
  It was a hard task of about 60~80 hours or work.

  My best regards,


  []'s

  Daniel Caetano
  daniel(_en_)caetano(_punto_)eng(_punto_)br - http://www.caetano.eng.br/

..."A necessidade de criatividade e' o que contribui para a 
mudanca. A criatividade mantem o criador vivo." (Frank Herbert)



<Anterior en la conversación] Conversación actual [Siguiente en la conversación>