Event 4 (VSync) on RO5
Jon Abbott (1421) 2651 posts |
If you manually trigger this event, does it cause the OS to do anything, or does it simply get passed around claimants of EventV? Are there any OS claimants? To fix frame pacing (get games running at 50 fps), I’m intercepting OS_Byte 13/14 and blocking Event 4 from being enabled, I then create an event at 50Hz via OS_CallEvery which calls OS_CallAVector to generate Event 4 at 50Hz. The code is simply: STMFD R13!, {R0, R9, R14} I’m seeing strange problems in MODE 9 both on IOMD (and the Pi under ADFFS), Pac-mania hangs and Terramex doesn’t set it’s palette – well, it does but it seems to be overridden by RO back to the default. Does the OS code that handles flashing colours get triggered by EventV 4? EDIT: I should probably add that I don’t see the problem on RO3.x-4.x, only RO5 and am testing on an alpha build of 5.21 prior to the recent GraphicsV changes. |
Jon Abbott (1421) 2651 posts |
If I suppress GraphicsV 1 from the current driver and generate GraphicsV 2 calls instead at 50Hz, will that in turn cause RO to raise an EventV 4 service call? Does the IOMD driver on RO5 raise a proper VSync? I’m presuming the Pi VSync is always going to be fake, so shearing isn’t an issue, I can happily blit the frame from DA2 to the GPU frame buffer at 50Hz with no issues. EDIT: Jeffrey has already answered this “You’ll receive the GraphicsV 1 call before the OS does, so all you need to do is to claim it (e.g. set R4 to zero) and that should stop the OS from seeing it. Just remember to add a flag to your code so that you can pass through the call that your code generates for the fake VSync!” I’ll recode specifically for RO5 to use GraphicsV 1 suppression instead of generating EventV 4 and see what happens. I’d still like to know why generating EventV 4 causes the problems it does, but so long as I end up with a working solution for RO5 I’m happy. EDIT: I’ve coded suppression of GraphicsV 1 and it’s working as expected. |