Doubts about 9938 commands

Page 2/2
1 |

By hit9918

Prophet (2904)

hit9918's picture

08-02-2021, 19:05

aoineko wrote:

HMMC: Copy a linear buffer in RAM to a 2D area in VRAM

HMMC is taking the data not from RAM, but from the CPU. that is why there is the "C" in the name. the cpu feeds the data with OUTs, the data could come from anywhere.

and with LMMC you got all the transparency stuff while the cpu does just plain copy. so when the vram is full with a huge football field, the sprite patterns could be in the game ROM.

By PingPong

Prophet (3756)

PingPong's picture

08-02-2021, 19:26

Grauw wrote:

Another advantage is that you can use HMMC in parallel with VRAM access. One use of this is to transfer data stored linearly in one place of VRAM to a rectangular area elsewhere through the CPU. Or to use only HMMC in the main program loop, and VRAM access on the interrupt handler, so the interrupt never needs to be blocked.

Yes, used this time ago in a simple change color A with color B algo.
VRAM->VRAM through CPU ;-)

By aoineko

Master (163)

aoineko's picture

08-02-2021, 21:35

hit9918 wrote:

HMMC is taking the data not from RAM, but from the CPU. that is why there is the "C" in the name. the cpu feeds the data with OUTs, the data could come from anywhere.

You are right. In practice, data come almost always from RAM/ROM (except for procedural content).

By albs_br

Champion (320)

albs_br's picture

25-02-2021, 17:44

Is there an easy way to calculate the time it takes to execute a command on 9938?

For example: how long does it take to copy a strip of 1x192 pixels from RAM to screen?

By Grauw

Ascended (10016)

Grauw's picture

25-02-2021, 17:56

There’s no easy precise way, since the exact timing depends on whether the command executes during blanking or active display, whether sprites are enabled, how many free access slots there are per line in the current screen mode, when those access slots are exactly, whether the CPU accesses the VRAM in the mean time, etc.

However you can make an estimation based on the width, height and command. In the (distant) past I wrote an article VDP command speed measurements which should give you some practical numbers to base your estimation on. It could use a revision but it should still provide useful information.

If you want to know more in-depth how it works precisely, I recommend to read V9938 VRAM timings and V9938 VRAM timings, part II.

By Metalion

Paragon (1429)

Metalion's picture

25-02-2021, 20:07

Grauw wrote:

In the (distant) past I wrote an article VDP command speed measurements which should give you some practical numbers to base your estimation on.

I have bookmarked this article for a few years now, and I found myself going back for this information again and again. A big thank you to you, Grauw, for this important and very useful article.

By thegeps

Paladin (854)

thegeps's picture

25-02-2021, 22:53

No doubt. MAP is a really valuable resource for all msxers!

By aoineko

Master (163)

aoineko's picture

25-02-2021, 23:20

This is not the subject of this topic, but I can't resist to add my voice to the thanks to Grauw's MAP site!

Page 2/2
1 |