any idea what is wrong with the unrolled loop?

Pagina 2/2
1 |

Van PingPong

Prophet (3987)

afbeelding van PingPong

10-04-2022, 19:20

santiontanon wrote:

Are you trying to copy a lot of data? Even if you are inside of vblank, there is not that much time, and you can only copy a small amount of data before vblank is over (I calculated once how many bytes was safe to send at high speed, but I can't remember now haha).

i think 800 bytes or so

Van Sandy Brand

Champion (292)

afbeelding van Sandy Brand

11-04-2022, 00:16

(Don't want to hijack the topic, but this is sort of related):

It seems that 15 T-states might not be enough for worst-case scenarios (outside V-blank and VDP command running) and you may have to increase it to 18 T-states:

msx-2-direct-vram-access-speeds

Van aoineko

Paladin (701)

afbeelding van aoineko

11-04-2022, 08:05

Sandy Brand wrote:

It seems that 15 T-states might not be enough for worst-case scenarios (outside V-blank and VDP command running) and you may have to increase it to 18 T-states:

xchip's technical demo is aiming MSX1 so the worst case is 29 t-states.
As you mentioned VDP commands, I suppose you are speaking about MSX2.
outi (18 t-states) is the fastest command to access the VDP so 15 or 18 t-states doesn't change much, right?

// Screen	VDP	MSX1	MSX2/2+
// mode		mode	cycles	cycles
//---------------------------------
// 0,W40	T1	12	20
// 0,W80	T2		20
// 1		G1	29	15
// 2		G2	29	15
// 3		MC	13	15
// 4		G3		15
// 5		G4		15
// 6		G5		15
// 7		G6		15
// 8		G7		15

Van ARTRAG

Enlighted (6890)

afbeelding van ARTRAG

11-04-2022, 10:46

out (0x98),a is 12 cycles and out (c),e is 14 cycles
So it can make the difference

Van aoineko

Paladin (701)

afbeelding van aoineko

11-04-2022, 19:32

This is useful only for fill purpose, no?
In the xchip use case it may be slower to use because data come from data buffer. Or I missed something. ^^

Van Grauw

Ascended (10635)

afbeelding van Grauw

11-04-2022, 20:28

One of the cases where it’s sometimes useful is for outputting sprite attribute table data.

Van aoineko

Paladin (701)

afbeelding van aoineko

11-04-2022, 22:39

Yes, to skip some bytes update.

Van Grauw

Ascended (10635)

afbeelding van Grauw

11-04-2022, 23:03

In my case I didn’t even do anything so fancy, it was because I had input the coordinates in registers and then output them with out (c),r back-to-back. I had to add a nop in-between to prevent corruption.

Van Calindro

Rookie (18)

afbeelding van Calindro

28-04-2022, 18:46

@xchip do you still have the rom that was glitchy? It's supposed to show glitches in Emulicious as well so I'd like to try it to see why it doesn't.

Pagina 2/2
1 |