Hello everyone,
I need your help with the FADE function. I have no problem using it to fade from colour to black... But in the opposite direction I'm having a bit of trouble. Here's my code:
10 CLS : CURS OFF : FLASH OFF : MODE 1 : HIDE ON
20 RESERVE AS SCREEN 2
30 LOAD"A:\IMAGE.MBK",1
40 UNPACK 1,2
50 FADE 1
60 physic=2
70 FADE 5 TO 2
There's a logic I don't understand…In the documentation it says that you can switch from the current palette to the palette of the image in memory. As my image is compacted I don't see any other choice but to store the image temporarily ail theirs. I'd like to fade from black to my image.
Thanks a lot for your help!
Please be advised that access to Atari Forum this coming Friday will be sporadic whilst the backend operating system and dependency upgrades are carried out.
Some problems with the FADE function
Moderators: Zorro 2, Moderator Team
-
- Atariator
- Posts: 24
- Joined: Fri Feb 07, 2020 4:45 pm
Some problems with the FADE function
1xFalcon 030, 1x1040STE, 1x520STE 4MB+SatanDisk+NetUS-Bee, 1xMegaSTE, 2xMegaST1
-
- Captain Atari
- Posts: 400
- Joined: Tue Apr 11, 2017 8:57 pm
Re: Some problems with the FADE function
Hi!
I haven't checked your syntax but iirc you have to WAIT during fades, because they're on interrupt. This may be why it isn't working properly.
I haven't checked your syntax but iirc you have to WAIT during fades, because they're on interrupt. This may be why it isn't working properly.
-
- Atariator
- Posts: 24
- Joined: Fri Feb 07, 2020 4:45 pm
Re: Some problems with the FADE function
Thanks for your reply! Yes, I did forget to put it on, but there is one. It doesn't change my problem, my screen remains black.
1xFalcon 030, 1x1040STE, 1x520STE 4MB+SatanDisk+NetUS-Bee, 1xMegaSTE, 2xMegaST1
-
- Captain Atari
- Posts: 400
- Joined: Tue Apr 11, 2017 8:57 pm
Re: Some problems with the FADE function
Hi!
Well, your FADE syntax is correct. But I suspect the problem is the physic=2.
Try using screencopy to copy bank 2 to physic, and then do the fade.
(If it is this, what is maybe happening is that STOS is doing some admin at the next vbl because of you resetting the screen pointer, and the fade is being stopped. Just a thought)
Well, your FADE syntax is correct. But I suspect the problem is the physic=2.
Try using screencopy to copy bank 2 to physic, and then do the fade.
(If it is this, what is maybe happening is that STOS is doing some admin at the next vbl because of you resetting the screen pointer, and the fade is being stopped. Just a thought)
-
- Atari Super Hero
- Posts: 765
- Joined: Mon Mar 03, 2008 10:33 pm
Re: Some problems with the FADE function
Is this really mode 1 (medium res). Only 4 colours to use?
If you could attach the .mbk we might be able to retest.
I would change:
10 hide : key off : mode 1 : curs off : flash off : click off : mouseoff
55 wait vbl
80 wait key
90 erase 1 : erase 2
100 mouseon : default : stop
If you could attach the .mbk we might be able to retest.
I would change:
10 hide : key off : mode 1 : curs off : flash off : click off : mouseoff
55 wait vbl
80 wait key
90 erase 1 : erase 2
100 mouseon : default : stop
Still got, still working: Atari 4Mb STe, MegaST 2, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: PC720B, Cumana CSA 354, Ultimate Ripper, Discovery Cartridge, Blitz Turbo, Synchro Express II (US and UK Versions).
Hardware: PC720B, Cumana CSA 354, Ultimate Ripper, Discovery Cartridge, Blitz Turbo, Synchro Express II (US and UK Versions).
-
- Atariator
- Posts: 24
- Joined: Fri Feb 07, 2020 4:45 pm
Re: Some problems with the FADE function
Ok, thanks for your replies!
Yes it's mode 0 of course, I was wrong. Here's what I tested :
10 HIDE : KEY OFF : MODE 0 : CURS OFF : FLASH OFF : CLICK OFF : MOUSEOFF
20 RESERVE AS SCREEN 2
30 LOAD"A:\IMAGE.MBK",1
40 UNPACK 1,2
50 FADE 1
55 WAIT VBL
60 physic=2
70 FADE 5 TO 2
80 WAIT KEY
90 erase 1 : erase 2
100 MOUSEON : DEFAULT : STOP
It's much better and I can actually fade from black to image.
However, I still have one last problem: my image appears quickly before my fade effect.
So I think my logic isn't right. I've put a FADE 1 on line 50 to tell you to set my palette to black, should I manually set my entire palette to black? Or am I doing things the wrong way?
Yes it's mode 0 of course, I was wrong. Here's what I tested :
10 HIDE : KEY OFF : MODE 0 : CURS OFF : FLASH OFF : CLICK OFF : MOUSEOFF
20 RESERVE AS SCREEN 2
30 LOAD"A:\IMAGE.MBK",1
40 UNPACK 1,2
50 FADE 1
55 WAIT VBL
60 physic=2
70 FADE 5 TO 2
80 WAIT KEY
90 erase 1 : erase 2
100 MOUSEON : DEFAULT : STOP
It's much better and I can actually fade from black to image.
However, I still have one last problem: my image appears quickly before my fade effect.
So I think my logic isn't right. I've put a FADE 1 on line 50 to tell you to set my palette to black, should I manually set my entire palette to black? Or am I doing things the wrong way?
1xFalcon 030, 1x1040STE, 1x520STE 4MB+SatanDisk+NetUS-Bee, 1xMegaSTE, 2xMegaST1
-
- Captain Atari
- Posts: 400
- Joined: Tue Apr 11, 2017 8:57 pm
Re: Some problems with the FADE function
Hi!
Try changing the "wait vbl" to something like "wait 100" - wait vbl only halts until the next vertical blank, which will be less than 1/50th of a second. You should then be clear to display the pic.
Try changing the "wait vbl" to something like "wait 100" - wait vbl only halts until the next vertical blank, which will be less than 1/50th of a second. You should then be clear to display the pic.
-
- Atariator
- Posts: 24
- Joined: Fri Feb 07, 2020 4:45 pm
Re: Some problems with the FADE function
Yes!!!! That was the problem, thank you very much!!!!!
Now it works perfectly.
Thank you all for your help,
Now it works perfectly.
Thank you all for your help,
1xFalcon 030, 1x1040STE, 1x520STE 4MB+SatanDisk+NetUS-Bee, 1xMegaSTE, 2xMegaST1
-
- Obsessive compulsive Atari behavior
- Posts: 118
- Joined: Tue May 01, 2012 8:29 pm
- Location: UK
Re: Some problems with the FADE function
I'm a bit late to the party with this one, but I think I posted something similar a little while back and it was suggested to use pokes to change the colour palette instead of relying on the fade command which uses an interrupt. (It doesn't play nicely with chip music, so this was a better option for me).
Cheers,
M.
Cheers,
M.
--
520 STFM Owner since 1988.
520 STFM Owner since 1988.