Openmsx & diagnostics

By PingPong

Prophet (2843)

PingPong's picture

19-05-2017, 18:32

Would be nice, after defining a sampling interval to have a percentage of time that the vdp command executing flag. Is set. For example with sample freq = 256us n.samples =1000 having a continuos sampling that after 1000 samples output on screen the ratio of samples when bit was set VERSUS bit reset.
How can de done with openmsx ? Is this possible?

Login or register to post comments

By Grauw

Enlighted (5705)

Grauw's picture

19-05-2017, 18:56

There’s already a built-in function in openMSX which does exactly that, use the toggle_vdp_busy command. It samples 100 times per frame. You can find the TCL script source code in share/scripts/_vdp_busy.tcl and adapt it if needed.

By PingPong

Prophet (2843)

PingPong's picture

19-05-2017, 19:25

thanks grauw, my idea was to see if effectively, in games, the always blamed vdp is really the source of slowness.
For example, seeing Valis II i highly suspect that is the z80 code that should be optimized.

By Grauw

Enlighted (5705)

Grauw's picture

19-05-2017, 19:40

It probably often is… of course, depending on the complexity of the game the CPU may simply need to do so many things, so just comparing numbers alone won’t be enough to say if a game is doing well or badly, it can be an indicator though. But I don’t think there are many games where the CPU is really waiting for the VDP all the time.

Note that in a tile-based game engine, if it is copying tiles to screen unnecessarily, this wouldn’t show up in this meter. Also when a VDP command completes it takes at least 15 I/O instructions to issue the next command, so a game with small 8x8 tiles will inherently have a less busy VDP (I shared some findings earlier), even though it may be doing more efficient delta-updates than one with 16x16 tiles and in the end run faster.

By PingPong

Prophet (2843)

PingPong's picture

19-05-2017, 22:47

Quick test on valis ii during the iniatial start vdp rarely goes more than 50%. Swiching cpu to 7mhz increase occupancy to 70%. The vdp is 50% idle!

By hit9918

Prophet (2602)

hit9918's picture

20-05-2017, 00:45

valis 2 scrolls 32 tiles in about 4 seconds. goes like 8 frames per seconds.
and a cpu copy to screen 5 256x192 pixels too is 8 frames per second. ho hum.
is it really a delta engine or was this just guessed by the graphics style?

anyways one cant see what is going on on a 8 pixel scroll.
10 fps on 8 pixel scroll is much worse than 10 fps in 1 pixel scroll.

how about this: direct CPC port. scroll whole screen with HMMM.
and meanwhile the cpu does whatever sprites it takes.
an easy engine.

look this:
https://www.youtube.com/watch?v=xyzwIm8Ditk&t=2m
a western game in CPC framerate on the amiga... the MSX2 could have these games.

By PingPong

Prophet (2843)

PingPong's picture

20-05-2017, 12:26

hit9918 wrote:

look this:
https://www.youtube.com/watch?v=xyzwIm8Ditk&t=2m
a western game in CPC framerate on the amiga... the MSX2 could have these games.

Umh, a little optimistic i think, i would be happy to see a more efficient usage of VDP in games like VALIS II.
Just to compare, (excluding coredump) any idea of a tile based game that have fast scrolling just to compare VDP usage vs Valis?

By Grauw

Enlighted (5705)

Grauw's picture

20-05-2017, 17:20

The Ys series.

By Manuel

Ascended (13215)

Manuel's picture

20-05-2017, 18:49

Yes, the Ys series is probably the fastest (especially Ys-II). Xak series is a bit slower.

By Louthrax

Paragon (1457)

Louthrax's picture

20-05-2017, 19:10

Manuel wrote:

Yes, the Ys series is probably the fastest (especially Ys-II). Xak series is a bit slower.

Yes, but do not forget that Xak I is screen 7!

By hit9918

Prophet (2602)

hit9918's picture

20-05-2017, 21:17

Quote:

Umh, a little optimistic i think

the sprite movement reminded me of CPC wobble rate. MSX2 can do these western games.

Quote:

Just to compare, (excluding coredump) any idea of a tile based game that have fast scrolling just to compare VDP usage vs Valis?

the first thing is that on an 8 pixel scroll granularity a faster engine will make no difference, it will keep the same wobble!

well what means "tile game".
the top problem is the parallax. with differential engine it works only with 8 pixel hopping.
a 1 pixel scroll needs the rear layer tiles copied every time. except blank tiles (a sky or something).

what I would do with valis is first put everything to 1 pixel and then see.
the problem with valis is NOT framerate but wobble alias to 8 pixels.

My MSX profile