any idea what is wrong with the unrolled loop?

Page 2/2
1 |

Par PingPong

Prophet (3901)

Portrait de 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

Par Sandy Brand

Champion (285)

Portrait de 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

Par aoineko

Hero (520)

Portrait de 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

Par ARTRAG

Enlighted (6862)

Portrait de 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

Par aoineko

Hero (520)

Portrait de 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. ^^

Par Grauw

Ascended (10617)

Portrait de Grauw

11-04-2022, 20:28

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

Par aoineko

Hero (520)

Portrait de aoineko

11-04-2022, 22:39

Yes, to skip some bytes update.

Par Grauw

Ascended (10617)

Portrait de 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.

Par Calindro

Rookie (18)

Portrait de 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.

Page 2/2
1 |