8th November: Emulation deficiencies

During my last holidays (which were computer and vectrex – free) I had much spare time. As it happens when you have spare time on your hands – the thoughts wander of in different directions.

Since I have been thinking “vectrex” for the good part of this year – thoughts also drifted from time to time to vectrex, emulation and what is right and what can still be done.

I am still not content with the precision of emulation.

The current emulation of “delays” for analog parts seem to work in many ways fine – in other ways they don’t.

I have written a couple of programs, that don’t give the same results in Vide as on the real thing – this is really bothering me!

Emulating vectrex seems to me sometimes like researching atomic theories.

Where:

  • vecx is the equivalent of the Bohr atom model
  • vecxy is the equivalent of the Rutherford atom model
  • and to do it RIGHT I need to go into the quantom physical models (Schrödinger/Heisenberg…)

Each step is a bit closer…

I am not convinced that the analog delays are really correct way of emulation. My newest theorie is, that VIA is not emulated good enough.

Look e.g.: (that which looks like an eight should be a 2!)

shiftoutThis basically means shifting a value starts 2 cycles after VIA SHIFT register was accessed, not immediately.
(Remember: drawing usually uses the shift register, the value shifted results in the BLANK signal)

Another example:

t1This means, each timer “time” is 1,5 cycles to long.
(Remember: in the above image, the PB7 output is equivalent to the RAMP signal).

Also:

viastats(Worth noting 1 vectrex cycle is about 666 ns (or 0,666 µs) – when dealing with vectors (in the right places) you can easily discern if vectors are drawn with 1 cycle off!)

… and some other stuff I am not listing here…

All these VIA internal timing issues are NOT emulated and I don’t know of any VIA emulation which actually DOES emulate that.

(MAME certainly doesn’t – I haven’t looked at Beeps, C64, Apple or other Via using old emulated hardware).

In relation to vectrex and vector drawing if you do cycle counting and optimization these values HAVE to be emulated in order to get correct results.

Also:

Worth noting, that the VIA chips have different manufacturers:

  • MOS
  • Synertec
  • GTW
  • UMC
  • WDC
  • Rockwell

And it seems that the timing parameters are sometimes a little bit different (might even be different in various production generations from a single manifacturer).

To emulate the above might be a project for next year. For now I have a little bit of a vectrex burnout syndrom.

For now I know Vide is still not perfect – but also for now – I let it rest.

Regards

Malban

PS.
@Chris – might to PS/2 Keyboard emulation – as luck has it, I do have a PS/2 keyboard and a  vectrex adapter :-)!

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.