forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HSync ???

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Wed Sep 01, 2004 12:02 am    Post subject: HSync ??? Reply with quote

Hello,

Coming from da oldschool scene, I'm starting developping things using the homebrew tools... obviously my brain tells me to code oldsk00l effects :D

So I'd like for fun to code some rasters effects (you know those ugly overscan bars !), so I looked into the docs and I found how to detect the HBL interrupts using the CSR register... that's ok but using C code I jsut find that I have to wait (in fact my code) this register to change (so a blocking call) until doing something (in this case changing bgcolor)...

So I'm wondering if in MIPS assembly it is possibe llike I was doing onb good old 68k CPU based machines to set a routine into a dedicated interrupt vector (in this case the HBL vector if existing) to automatically trigger this routine at each HBL ?

...or should I really make a virtual frame buffer and send it to the GS as a texture at each frame to be displayed within a screen sized square.... (which is really not as funny :D)

Other question, I read that the GS as a special mode or trick to draw particules effects, it is right ? Is it based on a particule texture + fog effect to simulate movement blur ? (I really wonder how to code a radial blurring effect with the GS but that will come later...)

Let's c0de ! :D
Back to top
View user's profile Send private message Visit poster's website
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Wed Sep 01, 2004 12:34 am    Post subject: Reply with quote

yes you can hook a hanlder to an interrupt. afaik there are even examples in ps2sdk on how to do it.

di
; install handler
ori a0, zero, 0x2 ; Interrupt Channel
la a1, your_hr_handler
move a2, zero
ori v1, zero, 0x18 ; afair H-sync irq
syscall ;
nop

; you might want to save away your handler id here ( v0 )

; enable handler
ori a0, zero, 2
ori v1, zero, 0x14
syscall ; enable it
nop

ei

there is a "copperbar" routine floating around aswell, written ages ago by vzzrzzn. that being said, ps2's "chipmem" is not accessible, so forget about most "oldsk00l" tricks :)
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Wed Sep 01, 2004 1:14 am    Post subject: Reply with quote

Greeeeat !!!!

Thanks blackdroid ! And how could I have missed this piece of code on ps2dev.org ?? (http://ps2dev.org/kb.x?T=263) !!!

eh eh time to play :D
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Wed Sep 01, 2004 1:58 am    Post subject: Reply with quote

Because of a bug in the EE's kernel, always end your interrupt handler with the following two instructions:

Code:

sync.l
ei


Also, interrupt latency is pretty high (again a kernel issue) so keep it short and simple :).
_________________
"He was warned..."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group