Autor
| Video timing: openMSX vs BlueMSX
|
pitpan online msx master Mensajes: 1418 | Publicado: Febrero 08 2007, 17:25   |
Yesterday I was fooling around and I came up with the following code:
call INITXT
di
ld c,99h
loop:
ld a,r
out [c],a
ld a,87h
out [c],a
jp loop
It shows color bars moving with two different colors (the exact colours depend upon the address in which this code is located).
The results on a real MSX show diagonal bars moving down quite fast (50 Hz) o moving up slowly (60 Hz). OpenMSX emulation matches almost perfectly the result obtained in the real hardware. At least, the pattern shown is very similar.
However, BlueMSX displays horizontal bars, not the expected slightly twisted bars. It just shows a discontinuity at the right-most part of the screen, looking more like a step.
Is this due to my PC specs? Or is it related to the rendering engine used? Or is it the result of unaccurate VDP timing / display emulation?
Thanks!
|
|
ARTRAG msx master Mensajes: 1802 | Publicado: Febrero 08 2007, 17:29   |
|
|
dvik msx master Mensajes: 1376 | Publicado: Febrero 08 2007, 18:26   |
blueMSX doesn't do 'pixel accurate' screen 0. if you do screen 1 you'll get the same pattern as a real msx (I hope). I have experimental pixel accuracy for screen 0 but I'm not happy with it. If you look closely in openMSX you'll see that the diagonal bars probably looks a little bit different than on a real msx. This (unless recently changed) is because a real msx updates 8 pixels at the time but openmsx updates with 1 pixel accuracy so openmsx bars may look a bit nicer than a real msx.
But please do the test with screen 1 instead. I hope to get the screen 0 working soon but I haven't figured out how the vram timing works with 6 pixel wide characters.
|
|
ARTRAG msx master Mensajes: 1802 | Publicado: Febrero 08 2007, 18:44   |
Hi Dvick,
I have a small technical, what is the Hsync frequency in bluemsx ?
Does it change in PAL and in NTSC ?
Thanks
|
|
pitpan online msx master Mensajes: 1418 | Publicado: Febrero 08 2007, 18:58   |
I came up with this code after reading ARTRAG's posts at Karoshi fora.
Dvik: thanks for the explanation. It does make sense. I'll try now with different screen modes, to see if it improves.
|
|
jltursan msx professional Mensajes: 887 | Publicado: Febrero 08 2007, 19:05   |
I remember that the synching of my old demo "VDP Pirates" works fine on screen 0 one or two versions ago of BlueMSX, then the next version suddenly changes that. Dvik tolds about some changes done to make "MSX unleashed" (?) to work had messed up the synch on screen 0, or something like that...
|
|
dvik msx master Mensajes: 1376 | Publicado: Febrero 08 2007, 19:07   |
Similar technique was used to do the border scroller in MSX unleashed. We just sync the color change to Vblank and then make sure color updates are timed correctly. I have some ideas for cool fullscreen effects too with the same technique. Its simple but yet very powerful (at least for effects) like this little example.
|
|
dvik msx master Mensajes: 1376 | Publicado: Febrero 08 2007, 19:18   |
@jltursan: that is possible. The line syncing used in screen 0 in blue is not only less accurate, its also more sensitive to timing. Because the entire line is synced at one point on the scanline. I can fix this for next release. If you know of other timing sensitive screen 0 effects it would be good for me to know.
A small note is that the VDP timing is actaully different in MSX1 and MSX2 machines. There are for example some significant differences in when things actually happens in the VDP. For unleashed I did an interesting test program (I can share it if you're interestd) to test the timing between VBLANK and when the color changes like in pitpans example take effect. This is not emulated in any emulator. I attempted to emulate it in 2.5 or 2.6.0 (can't remember which one). Then I had this work very accurate but unfortunately I had some side effects that I couldn't resolve so I reverted the fix. Maybe the VDP Pirates was helped by this fix and then when I reverted the fix it stopped working.
|
|
pitpan online msx master Mensajes: 1418 | Publicado: Febrero 08 2007, 19:20   |
I've tested both emulators using SCREEN 2 and it works fine. I haven't tested it on the real hardware, but at least the result is similar in both emulators.
Some minor differences remain though:
- In BlueMSX, the stair-shape shown has either one or two pixels in height for every step.
- In openMSX, the stair-shape shown has always one pixel in height, but at the right-most part of the screen it becomes totally flat.
Which one is more accurate? No idea at the moment. I've to test it on the real thing.
|
|
manuel msx guru Mensajes: 3635 | Publicado: Marzo 05 2007, 17:01   |
And?
|
|
dvik msx master Mensajes: 1376 | Publicado: Marzo 05 2007, 17:57   |
Would be interesting to hear the results indeed
I fixed the screen 0 issue in blueMSX so that will work in next release. |
|
manuel msx guru Mensajes: 3635 | Publicado: Julio 28 2008, 13:17   |
pitpan: did you ever test this on a real MSX?
|
|
|
|
|