IO, a new MSX1 demo by Logon System

Página 9/17
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11 | 12 | 13 | 14

Por Grauw

Ascended (10633)

Imagen del Grauw

21-03-2015, 16:38

hit9918: Why is the Z80 drifting in your picture? Why don’t the Z80 write periods match the AY bit flips? You can time your Z80 writes accurately by the cycle… By the way, the pulse wave generation method I mentioned is done by writing to the volume register, not the frequency register.

If the AY3 flips the pulse generator with period = 380 and the Z80 flips the volume every 6080 clock cycles (380 * 16) with 3040 cycles offset, it will produce a perfect 25% duty cycle pulse wave. As long as the Z80 and PSG are running on the same clock (usually the case), it will never drift out of sync or jitter, because relative to the PSG counter, the volume will always be set at the same moment.

Por hit9918

Prophet (2926)

Imagen del hit9918

21-03-2015, 17:00

But I mean timer interrupt and then have sound in game Big smile

Por Grauw

Ascended (10633)

Imagen del Grauw

21-03-2015, 19:43

Ah, well, yes, then you lose sync Smile.

Por Overflow

Resident (57)

Imagen del Overflow

22-03-2015, 11:55

yzi wrote:

Great. I hope the demo can be patched to work across a wide variety of MSX1 machines.

Yzi: could you mail at public mail address from my profile?
so that we try to adjust timing&sync for your machines.

---

I'll throw here some of gfx from behind the scene.

The pic from CeD used in the rotazoom:

The next pic from Ced is a raw SC2 screen:

on which details has been added thru (63) multiplexed sprites - avoiding color clash:

The plasma scene uses 256 characters, as seen in the SC1 screen:

There are 8 screens to flip from: each screen has same line (of 32 chars) repetead

Thanks to single line split screen, let's change and inc screen # at each line:

Now at each line, let's also change colors = 32 pairs of colors, 1 pair for each colum

Next? for plasma, lines (screen number + colors address = 1 line)
are dynamically chosen from previous screenshot.
I mean: previous screen has line numbers 0 1 2 3 4 5 6 etc...
while you can get an eye in plasma thanks to 0 2 3 4 5 5 6 5 5 4 3 2 0.

Por Grauw

Ascended (10633)

Imagen del Grauw

22-03-2015, 12:50

Very nice behind the scenes look Smile.

Por hit9918

Prophet (2926)

Imagen del hit9918

22-03-2015, 15:01

A cool look at things in the lab Smile

I was surprised that you need to count cycles per frame.
If you could sync on top of display with 5th sprite flag, then you would have the whole blank as free easy coding cpu time.
And a bunch of differences of MSX models get irrelevant.

On real machine, if one happens to read status register in same cycle as the event, the bit is swallowed.
Need some multiple tests in multiple lines.

Por yzi

Champion (444)

Imagen del yzi

22-03-2015, 15:23

Can you catch _every_ scanline, and do something actually useful as well, with the 5th sprite trick or even with v9938 line interrupts?

Por Overflow

Resident (57)

Imagen del Overflow

22-03-2015, 15:33

Let it be clear: I'm here to explain so that some of you guys do the same and release some demo-fx based on running against the raster "style of coding"

hit9918 wrote:

I was surprised that you need to count cycles per frame.

This is only required by the last scene (text with splitrasters as backround) which has not sync, constant-time all over one frame. My goal was to have a sync with 1 cycle precison to "move" splitrasters. Since I could not find a way (even HALT would give only 5 cycles of precision), I swichted to constant time all over one frame. Again: not all demo long, only last scene.

hit9918 wrote:

If you could sync on top of display with 5th sprite flag

I do sync on top of display for unlimited sprites on logo, fake-3D, and plasma.

hit9918 wrote:

then you would have the whole blank as free easy coding cpu time.

I do have whole VBL as free (during those 3 scenes), enough time to play music, refresh texture for fake-3D, move the big ball, etc.

hit9918 wrote:

And a bunch of differences of MSX models get irrelevant.

I disagree. (Feel free to make a demo with your thoughts.)
First about timing. On TurboR or so, on which OUT to VDP take 1 cycle more. On Yzi's MSX1, on which there's 229 cycles on a scanline.
Then about synchronizing: bit 5S does not occur at same time on openMSX, on real MSX1, on real MSX2 or more.

hit9918 wrote:

On real machine, if one happens to read status register in same cycle as the event, the bit is swallowed.
Need some multiple tests in multiple lines.

Yes. This has been fixed in IO. I had a look at it for 10 hours or so, and found that testing bit 5S AND bit C is enough. This is not theory, just watch IO: sync occurs on real MSX1 at 1st line of display.

Por Grauw

Ascended (10633)

Imagen del Grauw

22-03-2015, 15:32

hit9918: In the end, the problem with per-line splits on TMS9918 is that you don’t have the V9938’s HR flag to help you sync, so the only way to do them is to have code which repeats exactly every 228 Z80 cycles. The VDP spends 57 cycles in horizontal blanking though so even if there is a significant drift between the VDP and CPU clocks it shouldn’t be a big problem (of course 7MHz is out of the question, but I think few MSX1 computers have that upgrade).

However this demo does not just do per-line splits, but also per-pixel splits, and then even the V9938 can’t help you, because polling the HR flag will introduce jitter, while Z80 clock timing drift will introduce a skew.

The Unknown Reality demo also has a horizontal split (which I assume syncs to HR), there the jitter was avoided by having a quite sizable black space between the left and right parts.

Por yzi

Champion (444)

Imagen del yzi

22-03-2015, 17:01

I have three MSX1 machines, and only one of them, Spectravideo SVI 728, was able to run the demo. The two others, Canon V-20 and Toshiba HX-10 seemed to have 229 cycles per scanline.

I would like to see results from other people with the same machine models. So far it seems that not all Canon V-20s are made equal. But since I think by far not all people care about real MSX1 machines here, and running the COMs would require too much work... Wink maybe it would be best to convert the test program into a BASIC program with a machine code user function. But then again, it would be even more work, having to connect an actual MSX1 machine and type in a BASIC program. Wink LOL It works in the emulator, so everything is OK. Or better, it works on YouTube, so everything is OK. Right? Wink (I hope not)

Página 9/17
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11 | 12 | 13 | 14