#39067 - MrD - Mon Apr 04, 2005 3:14 am
Hi!
I'm trying to use BG0, REG_BLDMOD and REG_COLEY to fade a picture onto the screen. I've got the picture to display perfectly (spent hecka long time weeding out dupe tegels and such ._.) and such...
The problem comes when I try to change REG_COLEY over time for my splash screen:
What it's meant to do is fade the screen to white.
In semi-psuedocode, what I've got looks like this:
It's worked before because i've been using BLDMOD and COLEY for fades all over my game, it just doesn't want to play ball with the title splash... :s
I'm using DevKitARM with a modified AAS C++ Makefile.
My theory is that -funroll-loops or -O3 in my gcc flags is screwing up my compiling... but when I disable them... ODD THINGS happen. Which is no good.
All I get is either a complete lock up in VBA and hardware, or no fade and just a solid normal coloured screen...
Any thoughts?
I'm trying to use BG0, REG_BLDMOD and REG_COLEY to fade a picture onto the screen. I've got the picture to display perfectly (spent hecka long time weeding out dupe tegels and such ._.) and such...
The problem comes when I try to change REG_COLEY over time for my splash screen:
What it's meant to do is fade the screen to white.
In semi-psuedocode, what I've got looks like this:
Code: |
// Up here, BG0 is enabled in REG_DISPCNT, and palette, tiles and tegels are set-up. And the VBlank interrupt is set up. And the interrupt is set to respond by setting REG_IFBIOS. vu16 no_vblanks_occurred = 0; // No effect switching volatile on or not. REG_BLDMOD = bit0 | bit1 | bit2 | bit3 | bit4 | bit5 | bit 7; // All A-Targets and 'whiteblend' REG_COLEY = 0; while (no_vblanks_occurred < 64) { asm volatile("swi 0x05"); REG_COLEY = (no_vblanks_occurred >> 2); no_vblanks_occurred++; } // Down here I set REG_DISPCNT to a forced whiteout and set up another splash screen or something. |
It's worked before because i've been using BLDMOD and COLEY for fades all over my game, it just doesn't want to play ball with the title splash... :s
I'm using DevKitARM with a modified AAS C++ Makefile.
My theory is that -funroll-loops or -O3 in my gcc flags is screwing up my compiling... but when I disable them... ODD THINGS happen. Which is no good.
All I get is either a complete lock up in VBA and hardware, or no fade and just a solid normal coloured screen...
Any thoughts?