santiontanon / transballmsx

Transball game for MSX by Santi Ontañón

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unrolling outi's

artrag opened this issue · comments

Note that the outi's can be placed one after the other only during vblank time.
If you cannot comprise all the I/O on the vblank you need to respect the rule of 28 cycle between successive outs.
It is also possible to break the loop in two parts, one executed in vblank at max speed, another in active area

You could define a function in auxiliary that unrolls 32 outi and you could call it every time you update the sprite definitions and the screen. Define multiple entry points at 16 outi and 8 outi so you can reuse it for multiple lengths of outs.
The sat could be updated by calling this function at 32 and 8 outi.
If the optimization saves enough cycles you could try to fit all the I/O in vblank and use the above trick.
If the I/O do not fit the vblank you have to stay with the single outi loop to do not break msx1 compatibility

A nice trick to see when I/O happens in the raster time is to change r7 before an I/O block and reset it soon later.

I see, so, this changes the border color, and you can see the band on the sides, right? nice!

santi

On Aug 21, 2016, at 9:25 AM, artrag notifications@github.com wrote:

A nice trick to see when I/O happens in the raster time is to change r7 before an I/O block and reset it soon later.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #3 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABBEvXE7BvFFUir3SoGIgDlVBy8Pmayrks5qh_13gaJpZM4Jm21s.

Yes, so you see when things happen and you can use the unrolled outi only for I/O within vblank time