Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with h-blank interrupt?
#1
Hey all. Been playing more with programming for the NGPC, and it really is a fun system to work with. 

One thing I've been wanting to try next is changing the scroll position at time of HBlank to create raster effects (like stretching vertically, or raster 'haze' effects). I'm having a bit of trouble understanding the timing and requirements  to executing code during the h-interrupt, however.

I'm using the C framework. I tried creating a new HBlankInterrupt routine and installing it to HBL_INT (0x6FD4), but it doesn't seem to execute the code inside. I'm thinking maybe I have to change the interrupt priority setting? But I'm not exactly sure how that works.

If anybody has any tips/sample code to help execute commands during HBlank, that would be a great help.
Reply
#2
I wonder if we can get Thor to come offer any expertise. Maybe he'd know. I'll try to contact him.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#3
Thanks for your reply.

While I don't want to force anybody to reveal their secrets or anything, I believe hitchhikr understands how this works, as they demonstrated similar effects in their excellent NGP monochrome demo.

mic_ also has some super impressive work with sound and music, which I believe utilizes a similar method of interrupts using the uDMAC(?), (in C even!) but I just don't understand how it all works  Big Grin

(speaking of which, I notice that the version of ngpc.h in some of mic_'s work includes some info on interrupts and system variables that isn't in the (also amazing) ngpc framework -- maybe we should all try and make a collaborative most up-to-date library?)
Reply
#4
I might, then, suggest sending them a private message with a link to this thread to see if they'd like to chime in.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#5
(03-27-2020, 03:07 AM)Flavor Wrote: I might, then, suggest sending them a private message with a link to this thread to see if they'd like to chime in.

I tried to attach the sources of the intro I've done for years ago for 'card fighters clash' . It's in C and display a background gradient using hbl.
Reply
#6
Amazing, thank you thor!!

But I don't think the file is attached!

EDIT: Sent my email address just in case.
Reply
#7
file sent, tell me if it's ok
Reply
#8
Thor shared the file with me, so I'll post it here, too.

.zip   sod_thor_hblank_demo_cfc2_intro.zip (Size: 38.47 KB / Downloads: 3)
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#9
Wonderful! Thank you, Flavor and sodthor. This is more than I could have hoped for.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)