Jump to content
Jagware
Sign in to follow this  
Orion_

le GPU

Recommended Posts

what... do you mean that you could not use a "jr" instruction in an IRQ or what?

 

It should work....

 

hmm.. please elaborate on this....

Are the code to big or to secret to post here or could you post, working relative code (outside irq), nonworking code(inside irq), and working absolute code?

 

Would just be interesting to se...

 

regards

/Sym

Share this post


Link to post
Share on other sites
Orion_    1

just a little question, since the GPU has the double speed of the 68k, can we say that 2 GPU cycle = 1 68k cycle ? so for example: the GPU can do 2 instruction of 4cycle in the same time the 68k do one instruction taking 4 cycles ? I think it would be quite useful to take advantage of this timing, so the 68k don't have to waste time waiting for the GPU to finish and can do other useful stuff.

Share this post


Link to post
Share on other sites
GT Turbo    4
just a little question, since the GPU has the double speed of the 68k, can we say that 2 GPU cycle = 1 68k cycle ? so for example: the GPU can do 2 instruction of 4cycle in the same time the 68k do one instruction taking 4 cycles ? I think it would be quite useful to take advantage of this timing, so the 68k don't have to waste time waiting for the GPU to finish and can do other useful stuff.

 

You can't, because 'Pipeline', a lot of instructions only take only 1 cycle and some are done in parallel (Div, ...) so you can approximatevely count like that, but the Gpu is too fast, for real couting !!

 

 

 

GT :poulpe:

Share this post


Link to post
Share on other sites
Orion_    1

another solution I found, instead of ->

while whatever

-starting the GPU

-waiting for the GPU to stop

-doing other stuff with the 68k

wend

 

I will do:

while whatever

-waiting for the GPU to stop

-starting the GPU

-doing other stuff with the 68k during the GPU is computing stuff

wend

 

then it avoid to restart the GPU if it have not finish, and we can do other usefull stuff while the GPU is working. taking advantage of parallel processing ^^

we can do better than intel dual core, we have triple core ! ;)

Share this post


Link to post
Share on other sites
Orion_    1

another thing I would like to know, I heard that the GPU is slow while accessing the external bus, but is the 68k slower or faster in bus access comparing to the GPU ?

Share this post


Link to post
Share on other sites
SebRmv    2
what... do you mean that you could not use a "jr" instruction in an IRQ or what?

 

It should work....

 

hmm.. please elaborate on this....

Are the code to big or to secret to post here or could you post, working relative code (outside irq), nonworking code(inside irq), and working absolute code?

 

Would just be interesting to se...

 

regards

/Sym

 

I have to do some tests again because it is quite strange.

The code in question is part of my sprite manager which will be soon

be released (open source , BSD license) :D

 

When I say PC relative code, I am thinking of code like the following one:

 

start:

move PC,r0

...

movei #label-start,r1

...

add r0,r1 // label relocated

...

jump t,(r1)

nop

...

label:

nop

 

 

 

another solution I found, instead of ->

while whatever

-starting the GPU

-waiting for the GPU to stop

-doing other stuff with the 68k

wend

 

I will do:

while whatever

-waiting for the GPU to stop

-starting the GPU

-doing other stuff with the 68k during the GPU is computing stuff

wend

 

then it avoid to restart the GPU if it have not finish, and we can do other usefull stuff while the GPU is working. taking advantage of parallel processing ^^

we can do better than intel dual core, we have triple core ! ;)

that is exactly what I do in my tunnel and fire screen :P

(if I have understood what you are saying, of course :D)

Share this post


Link to post
Share on other sites

>SebRmv:

Ahh.. ok ...well i dont se why that PC relative thing would not work... once in the irq those instructions are just ordinary ones... unless there are some horrible bug that "move pc" can only have ordinary bank as destination,not the alternative... but... it should not!... please keep us informed of any progress... (even if it is realising that you did something wrong) Its just good to know what can and can not be done in an irq....

 

 

 

>Orion:

one might think that yes... but ONLY if the gpu and blitter is not using the external memory... (and usually they do, ie gpu doing calcs & setting up some blitter instruction & starting the blitter. Then doing some 68K instructions is kind of futile.. since the priority of the 68K under normal operation is lower than both gpu&blitter... ie the 68K will be halted untill they are done.

Instead you might end up "hogging" the bus with a long latency 68K instruction.. and the gpu&blitter have to sit & wait for the 68K to be done...

So in long run if you want Full Power.. you should aim for not using the 68K at all.. or as little as possible..

 

ie do a loop like:

 

mainloop:

-short OPTIMIZED! 68Kasm code

-stop instruction

-bra mainloop

 

the 68K will do its thing, shut down & stop hogging the bus (OBS not a small loop since each instruction will access the bus & hog it for the other processors)... And then the vbl IRQ will start the 68K again, and after irq is done & exited, the 68K will be running again doing the "bra mainloop" instruction, doing another mainloop & shutting down afterwards...

 

That is the most optimal use of the 68K, stop it :)

 

But i mean this is not nessesary unless you intend to squeze out all dropps of jaguar power, you can to allot by using it & doing gpu calcs in paralell...

 

 

I will quote part of the "Jaguar Hints & tipps" project I planned to do ages ago... summing up usefull knowledge I found one way or another.. (never got to finish that project...)

Anyhow here are quotes from some docs i found (dont know whom it was, but its still true):

 

--------

There is a phrase that I ahve been trying to instill into the developer support people:

" If you are doing it in the 68000, you are doing it wrong".

 

In general there is little to be gained in trying to keep the 68k working in parallel with the Blitter and GPU rendering, because the bus is simply not free for the 68k to do anything. The only time that using the 68k can be a performance win is when Blitter is idle and the GPU is not on the bus. This is, in general rare.

-------

 

or quote from Leonard Tramiel:

"The best thing that can be done with the 68k for overall system performance is to execute a halt instruction."

-------

 

 

I understand this and it is consistent with the atari docs on the different cpu bus priorities.. But i mean in the beginning even rebellion had the same "68K parallell with gpu&blitter" thoughts (cf AvP beta source).. but one might assume that they had to rethink untill the final version of avp (or perhapps they did not..?)

 

Ahh well... you have been adviced ;)

cheers

/Symmetry of TNG

Share this post


Link to post
Share on other sites
SebRmv    2

A question about the GPU (or DSP)...

 

Can a division operation be interrupted?

Will it work correctly if during the interruption, other divisions are performed?

Share this post


Link to post
Share on other sites
SCPCD    0

We know that division can not be pipeline : ie we need to make sure that the previous division is finished before make another.

 

But I don't see into the jaguar documentation informations about the fact that division are "Atomic", ie we can't have interruptions while a division is performing.

If division are atomic, we can have division into interrupts (but remainder should be saved manually into the interrupt routine and don't forget that the remainder register is RO, we can not restore the remainder value into it at the end of the interrupt routine).

 

If division are not atomic (I hope that it's not the case), What's occur when there is interrupts during a division performed into BANK1 regs ? Until the interrupt use strictly BANK0 the write back of the division will be into BANK0 ??

I don't know yet...It's the first time I think about it :unsure:

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×