[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Some real world usage



27 jun 2011 kl. 09.29 skrev Miro Kropáček:

> 1. Vsync() doesn't work under FreeMiNT as you would imagine it does -- i.e. it can miss a VBL (that means it waits more than one VBL and your 50/25 fps effect is doomed).

Does it cause a context switch? I realize that this would be the "nicer" way in a multitasking environment, but it's a show stopper for games. I'd consider this function broken if it doesn't do what it's supposed to - i.e. wait for the next vertical blank.

> 2. VsetRGB() & friends are not interrupt friendly, i.e. you can't run them inside an interrupt handler. I think it waits for VBL internally, what makes things even worse (not in all cases is desirable to wait for VBL when palette change is requested, sometimes it's better to continue and set the palette when the VBL occurs).

It doesn't wait for a VBL, but the palette data is buffered until the next VBL.

> 3. Vsetscreen() suffers from the same problem + it's very unpredictable as it re-initializes some internal system stuff everytime (VDI, if I recall well) and therefore it's also slow compared to simple move.l buffer switch.

It only re-initializes the VDI (or rather, the LineA table) if you set the resolution. If you do a VsetScreen(adr,adr,-1,-1) it's a a fairly quick process I think. VsetScreen(blabla,blabla,3,something) is really only useful if you happen to be a VDI or something.

Unfortunately Miros implementation is as clean as it can be while still being fun to use. Our OS suffers a bit from "use the VDI or you're a bad person", which in practice means there are no realistic alternatives to lubing up and going dirty.

-- PeP