Maximum trasfer speed beteen the cpu and vdp?

Door WORP3

Paladin (806)

afbeelding van WORP3

11-02-2018, 14:51

Maybe one of you have an idea about this. I'm wondering how many data you can transfer from the cpu to the vdp during a blanking or during one irq?
Also does it help to disable sprites or the complete display (during blanking)?

Aangemeld of registreer om reacties te plaatsen

Van ARTRAG

Enlighted (6333)

afbeelding van ARTRAG

11-02-2018, 15:14

What's the standard that you mean?it changes a lot among them

Van WORP3

Paladin (806)

afbeelding van WORP3

11-02-2018, 15:45

ARTRAG wrote:

What's the standard that you mean?it changes a lot among them

Especially msx2 but could be nice to know if the MSX 1 and MSX 2 vdp are different from each other in respect of transfer speed.

Van PingPong

Prophet (3500)

afbeelding van PingPong

11-02-2018, 16:36

WORP3 wrote:

Maybe one of you have an idea about this. I'm wondering how many data you can transfer from the cpu to the vdp during a blanking or during one irq?
Also does it help to disable sprites or the complete display (during blanking)?

MSX1: Transfer speed : about 2 bytes/Month.... If the VDP is not so busy and in a lucky day...

More Serious: in vblank you can move about 890 bytes when working in NTSC standard a little more (about 1,5KB) in PAL.....
look here: http://karoshi.auic.es/index.php/topic,668.0.html

Van PingPong

Prophet (3500)

afbeelding van PingPong

11-02-2018, 16:53

msx2: you can do outi or otir safely every time

Van WORP3

Paladin (806)

afbeelding van WORP3

11-02-2018, 17:06

PingPong wrote:
WORP3 wrote:

Maybe one of you have an idea about this. I'm wondering how many data you can transfer from the cpu to the vdp during a blanking or during one irq?
Also does it help to disable sprites or the complete display (during blanking)?

MSX1: Transfer speed : about 2 bytes/Month.... If the VDP is not so busy and in a lucky day...

More Serious: in vblank you can move about 890 bytes when working in NTSC standard a little more (about 1,5KB) in PAL.....
look here: http://karoshi.auic.es/index.php/topic,668.0.html

Thanks, i will take a look at it.
If you can transfer around 1.5KB per blanking, how much would it be during a complete irq?

Van Grauw

Ascended (8738)

afbeelding van Grauw

11-02-2018, 18:31

You reach the maximum speed by unrolling loops with OUTI (some 16x already does a lot).

OUTI takes 18 cycles on Z80, so the maximum speed is 3579545 / 18 = 199K / s, or 3.3K / frame @ 60 Hz.

On R800, the S1990 engine limits the VDP transfer speed to 27 cycles per I/O, so 3579545 / 27 = 133K / s, or 2.2K / frame @ 60 Hz.

Van WORP3

Paladin (806)

afbeelding van WORP3

11-02-2018, 19:15

Grauw wrote:

You reach the maximum speed by unrolling loops with OUTI (some 16x already does a lot).

OUTI takes 18 cycles on Z80, so the maximum speed is 3579545 / 18 = 199K / s, or 3.3K / frame @ 60 Hz.

On R800, the S1990 engine limits the VDP transfer speed to 27 cycles per I/O, so 3579545 / 27 = 133K / s, or 2.2K / frame @ 60 Hz.

Ouch that's really slow Eek! I guess that the vdp isn't requiring additional delays?
Thanks for the input.

Van NYYRIKKI

Enlighted (5481)

afbeelding van NYYRIKKI

12-02-2018, 11:37

On MSX2 the things are not quite that straight forward as it may look at first. VDP has certain cycles to read/write VRAM and those cycles are shared between internal VDP command engine, screen draw and CPU. Disabling screen or sprites does help to improve the trough put. On R800 you don't need to add additional delays as CPU will be halted when needed. With clever coding you might be able to use that time by doing something else between I/O writes.

If you really want to dig in to this subject, there is some extremely deep down information available on these two pages:
http://openmsx.org/vdp-vram-timing/vdp-timing.html
http://openmsx.org/vdp-vram-timing/vdp-timing-2.html

Van PingPong

Prophet (3500)

afbeelding van PingPong

12-02-2018, 19:38

NYYRIKKI wrote:

On MSX2 the things are not quite that straight forward as it may look at first. VDP has certain cycles to read/write VRAM and those cycles are shared between internal VDP command engine, screen draw and CPU. Disabling screen or sprites does help to improve the trough put. On R800 you don't need to add additional delays as CPU will be halted when needed. With clever coding you might be able to use that time by doing something else between I/O writes.

If you really want to dig in to this subject, there is some extremely deep down information available on these two pages:
http://openmsx.org/vdp-vram-timing/vdp-timing.html
http://openmsx.org/vdp-vram-timing/vdp-timing-2.html

on msx2, as said by the documentation you linked, it can be assumed that a bunch of OUTI works well in every situation. Regardless of sprites or active area or command engine executing.

OUTIng a lot while vdp engine is working does however slow down the command, in various degrees

Van Grauw

Ascended (8738)

afbeelding van Grauw

12-02-2018, 20:15

I think OUTI always worked fine for me in screen 5, although I have had a case recently where back-to-back OUT (C),r with sprites enabled while executing a VDP command at the same time was a bit too fast and caused some corruption. Another case where I’ve had OUTI be too fast was in TEXT2 mode (one of the slowest modes on V9938).