VDP busy

By Metalion

Paragon (1628)

Аватар пользователя Metalion

23-12-2018, 23:56

Hello everyone,

I know I have to wait for the VDP to finish processing a macro command before launching a second one.
But do I have to wait for it to finish a macro command before sending it data through an address writing port ?


Для того, чтобы оставить комментарий, необходимо регистрация или !login

By keith56

Master (162)

Аватар пользователя keith56

24-12-2018, 01:00

You don't have to wait before accessing Vram directly...

Chibiakumas draws it's background quickly by using Fill and copy commands to do the black areas, and the mountains... then uses Vram access to draw the parts of the gradient with the Z80 WHILE those commands are still processing...

the process was like this...

1. start mountain drawing
2. is vdp busy? if yes draw some gradient until it's not
3. start filling black area
4. is vdp busy? if yes draw more of gradient until it's not
5. draw grass
6. is vdp busy? if yes draw more of gradient until it's not

I also used a 'fast fill' routine... basically a fast 'clear screen' for areas of the screen ... if the vdp was busy processing another command, it would use the Z80 and memory access to write zero bytes to vram... when the vdp was free it would fill the rest with the standard vdp command - meaning the z80 was always busy and never waiting

By PingPong

Enlighted (4155)

Аватар пользователя PingPong

24-12-2018, 10:53

you don't.
but writing data to direct vram access while vdp is executing a command slow down a bit the vdp command in progress.
in pratice however, i think the overall result is better than having those operations done sequentially because expecially in vblank area the vram bandwith is largely unused