|
| | Er zijn 114 gasten en 1 MSX vriend online
Je bent een anonieme bezoeker.
|
| |
Schrijver
| VDP Speed.
| Leo msx freak Berichten: 212 | Geplaatst: 07 Februari 2003, 20:12   | The VDP on MSX2 can be swithed between 50Hz and 60Hz.( 20% of difference )
This is the screen refresh frequency.
Between 2 refreshs there is the vertical retrace, a momment when the VDP is free
for COPY/transfer operation since videoram cannot be used for display and
copy operation.
Do we have more bandwidth when the VDP is at 50Hz or 60Hz ?
The dotclock beeing the same at 60Hz and 50Hz we should have less time for
copy operation, the vdp should be slower.
There is also an other switch active in screen 5-8, for selecting 212 or 192 lines.
The VDP operation should be faster in 192 lines modes also, since the display last
less lines .
I read somewhere that VDP was faster when sprite feature were disabled, is it true ?
Is there any VDP benchmark that has been written ?
I guess that it would have been useless since every msx2 should score the same ...
I Read in the databook of the V9938 that we can set on interrupt when the the vertical
scan reachs a given line number.
Is there any code example using this feature, for instance, for :
- refresh the palette in screen 5/7 , so we can use 32 color out of 512.
- emulate a 60Hz interrupt rate on 50Hz system.
- work with 120/100Hz interrupt rate.
- switch between screens ( to have screen5 picture on the top and highres screen6
for 80col text on the bottom , for example)
Well I have never tried any of these but some one has ..?
| | DarQ msx professional Berichten: 836 | Geplaatst: 07 Februari 2003, 20:21   | You want the VDP at its top speed? eeh, that would be (in BASIC) :
defusr=&H41: a=usr(0)
and to go back:
defusr=&H44:a=usr(0)
i believe there is no single way that makes the VDP faster.
BTW: could it be overclocked some mhz?
| | Maggoo msx professional Berichten: 576 | Geplaatst: 07 Februari 2003, 21:24   | Where here it is, Maggoo's lil tutorial to 32 colors in screen 0 to 7 in 4 steps
Step 1 - Type this code and save it as let's say PALTEST.GEN:
DEFB #FE
DEFW START
DEFW FINISH
DEFW START
ORG #C000
START:
DI
LD A,100
call INTERUPT ; wait for line 100
LD HL,PAL1
XOR A
OUT (#99),A
LD A,128+16
OUT (#99),A
LD B,32
LD C,#9A
OTIR ; set 16 colors with pal 1
LD A,212
call INTERUPT ; wait for line 212
LD HL,PAL2
XOR A
OUT (#99),A
LD A,128+16
OUT (#99),A
LD B,32
LD C,#9A
OTIR ; set 16 colors with pal 2
call TESTSPACE
OR A
JP Z,THEEND ; exit if space is pressed
JP START ; Start all over again
THEEND:
LD A,0 ; Reset register before return to basic
OUT (#99),A
LD A,#8F
OUT (#99),A
RET
TESTSPACE: ; TEST IF SPACE KEY IS PRESSED
IN A,(#AA)
AND %11110000
ADD A,8
OUT (#AA),A
IN A,(#A9)
AND 1
RET
INTERUPT: ; WAIT FOR A VDP INTERRUPT AT A CERTAIN LINE
PUSH AF
LD A,1
OUT (#99),A
LD A,#8F
OUT (#99),A
POP AF
OUT (#99),A
LD A,#93
OUT (#99),A
WAITINT:
IN A,(#99)
AND 1
JR Z,WAITINT
RET
;
; PALETTE DATA VALUES
;
PAL1:
DEFB #00,0
DEFB #10,0
DEFB #20,0
DEFB #30,0
DEFB #40,0
DEFB #50,0
DEFB #60,0
DEFB #70,0
DEFB #71,1
DEFB #72,2
DEFB #73,3
DEFB #74,4
DEFB #75,5
DEFB #76,6
DEFB #76,7
DEFB #77,7
PAL2:
DEFB #00,0
DEFB #11,1
DEFB #22,2
DEFB #33,3
DEFB #44,4
DEFB #55,5
DEFB #66,6
DEFB #77,7
DEFB #66,7
DEFB #55,7
DEFB #44,7
DEFB #33,7
DEFB #22,7
DEFB #11,7
DEFB #00,7
DEFB #00,6
FINISH:
Step 2 - Compile it with GEN80 (version 2.04 if you have it) by typing:
GEN80 paltest.gen
Step 3 - In basic type the following program:
10 COLOR ,0,0
15 SCREEN 5
20 FOR I=0 TO 255
30 LINE(I,0)-(I,212),I AND 15
40 NEXT I
50 BLOAD"paltest.com",R
Step 4 - Run da beast
Explanations:
* The Basic program shows the routine working in screen 5 but it can work in any mode, even screen 0, 1,3,4, etc...
* This explains how to change the color palette in the middle of the screen but you can do other things like changing screen mode, scroll one part of the screen with register 23 while the other half of the screen is fix (beware that interupt line number chaneg in that case), or whatever you have in mind.
* It takes some time for the VDP to change the whole palette so don't expect to change it every line or so (I think you cannot change more than 4 or 5 colors per line).
Voila, that's it for today | | Latok msx master Berichten: 1722 | Geplaatst: 07 Februari 2003, 21:42   | Leo, screensplits -that's how we call them- are very very common....
| | GuyveR800 msx guru Berichten: 3048 | Geplaatst: 07 Februari 2003, 23:34   | Quote:
| Do we have more bandwidth when the VDP is at 50Hz or 60Hz ?
|
Yes, the VDP commands are faster at 50Hz.
Quote:
| There is also an other switch active in screen 5-8, for selecting 212 or 192 lines.
The VDP operation should be faster in 192 lines modes also, since the display last
less lines .
|
Yes, the VDP commands are faster in 192 line mode.
Quote:
| I read somewhere that VDP was faster when sprite feature were disabled, is it true ?
|
Yes. the VDP commands are faster when sprites are disabled.
Quote:
| Is there any VDP benchmark that has been written ?
|
Yes, ask Grauw  | | Grauw msx professional Berichten: 1002 | Geplaatst: 07 Februari 2003, 23:48   | Take a look at the article on the MAP:
http://www.students.cs.uu.nl/~lholst/map/?p=articles/vdp_commands_speed.html
It also includes a tool to test VDP speeds yourself.
About Guyver's responses:
> Yes, the VDP commands are faster at 50Hz.
No. They aren't. But what really matters is that the VDP can copy a lot more bytes within the timeframe of 1 interrupt (interrupts occur 20% less). You can see for yourself, multiply the 50Hz values in the tables given in my article with 1.2 and it'll turn out the same values as on 60Hz.
Anyways, I personally really prefer to make stuff work on 60Hz (the Unknown Reality demo is a wellknown example of where it wasn't possible - because of that it was never released in the Japanese Takeru machines as was planned at some time).
> Yes, the VDP commands are faster in 192 line mode.
Only slightly, although it depends on the command type. For copies, it barely matters. For fill commands, the difference is a little larger.
> Yes. the VDP commands are faster when sprites are disabled.
This is about the ultimate way to speed up your VDP commands. If you can have sprites disabled, do it! Even consider replacing hardware sprites by 'software' sprites, and it could still be faster (or at least more colourful ;p).
As an illustration, I had programmed a horizontal smooth scroll for MSX2 once. It used the adjust register for the scrolling, and in the meanwhile it copied the screen 16 pixels to the left or the right on an alternate page. Anyways. I used sprites on the right and left sides, to masque away the flipping borders. It worked on 50Hz, although it was pretty useless otherwise because I didn't have any VDP command time left to copy more than 1 character (the player). On 60Hz, it wouldn't work, because I had even less time left. However by disabling the sprites it got me enough time to get it running again. Ofcourse it had flipping borders again by then. On the other hand, the scrolling went faster on 60Hz.
~Grauw | | GuyveR800 msx guru Berichten: 3048 | Geplaatst: 08 Februari 2003, 00:03   | Quote:
|
About Guyver's responses:
> Yes, the VDP commands are faster at 50Hz.
No. They aren't. But what really matters is that the VDP can copy a lot more bytes within the timeframe of 1 interrupt (interrupts occur 20% less). You can see for yourself, multiply the 50Hz values in the tables given in my article with 1.2 and it'll turn out the same values as on 60Hz.
|
Ok, strictly speaking they aren't. But as you say, the effect is the same. I was just trying to not needlessly complicate things. | | Grauw msx professional Berichten: 1002 | Geplaatst: 08 Februari 2003, 00:06   | Heh, I think it's better if people know why stuff is like that ^_^. Programming shouldn't be done on a need-to-know basis, imho.
Oh, hehe, and while you replied, I edited a little more text in my previous message. So it's a little larger now, but ahwell. Point is still there, and the quote aswell ;p.
By the way, you know about the article, don't you? Hrmpf, next time it couldn't hurt to point people to it >.< that's what the MAP is for, even though it's not 'officially' announced yet.
~Grauw | | GuyveR800 msx guru Berichten: 3048 | Geplaatst: 08 Februari 2003, 00:18   | How am I supposed to know where to point people to?! You have the MAP on at least 2 different servers now, and I've seen you pointing people to both of those.
Also the URL's are weird, how am I (or anyone!) supposed to remember them?
| | Grauw msx professional Berichten: 1002 | Geplaatst: 08 Februari 2003, 01:09   | Nope, there's only 1 page where it can be found, if you don't count my personal web server which is really an in-development personal server.
Anyways there's a difficult url:
www.students.cs.uu.nl/~lholst/map/
and an easy one:
www.msxasm.tk/
Buth point to the same, however the first is the real address and doesn't suffer from a stupid ad.
Oh, one more thing: 50Hz *IS* a slight bit faster than 60Hz after all! I forgot about it but fortunately I wrote it down on the MAP page. With sprites enabled, the loss in actual bytes per minute can exceed 5% on 60Hz. Read more about it in the MAP article.
~Grauw | | Leo msx freak Berichten: 212 | Geplaatst: 08 Februari 2003, 12:23   | Well I was only suspecting that these kind of feature could be implemented ,
I am happy my guess was not so wrong.
You mention that we can use the line interupt also to perform scrollin using register 23, this is a V9958 register , isn't it ? or is it just the 'set adjust' ?
In that case differential speed scrolling can be implemented also ( may be it has also already been done )
But thanks for the piece of code i'll try it this afternoon !
| | DarQ msx professional Berichten: 836 | Geplaatst: 08 Februari 2003, 14:39   | GRrauw! Remove the Dot TK pop up! its ugly
| | GuyveR800 msx guru Berichten: 3048 | Geplaatst: 08 Februari 2003, 15:36   | Register 23 is a V9938 (MSX2) register. It is the vertical offset (scroll) register.
Most of the effects in Unknown Reality were made with it in combination with line interrupts.
The contents of R#23 is the line number the VDP will display on the first screen line.
Be aware that the number in R#19 (Line interrupt register) is also affected by the value in R#23.
Using line interrupts and the MSX2+ scroll registers you can create effects like in Konami's F1-Spirit 3D Special. (A racer with backview, sharp turns and hills)
Check out Multiplex (turboR) for a great example of differential scrolling speed.
| | GuyveR800 msx guru Berichten: 3048 | Geplaatst: 08 Februari 2003, 15:37   | Quote:
| GRrauw! Remove the Dot TK pop up! its ugly
|
For some reason Grauw does not want to host his pages at tni.nl ^^; :  | | mars2000you msx master Berichten: 1723 | Geplaatst: 08 Februari 2003, 16:33   | Quote:
| GRrauw! Remove the Dot TK pop up! its ugly
|
Use a tool called PopUp Killer : it's free and it works !!! | |
| |
| |
| |