palette display

All 680x0 related coding posts in this section please.

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

rockyone
Captain Atari
Captain Atari
Posts: 330
Joined: Thu Jan 20, 2011 8:47 pm
Location: France
Contact:

palette display

Postby rockyone » Fri Jun 17, 2016 2:35 am

a bug that I do not understand.
This little routine does not work corectement
- Before the file selector display
-After Closing the file selector.

Code: Select all

; Fade      buffer 512 bytes ( at first, the images's palette )
;
; Direction%   0 display  palette  0 to 15
;         1 display  palette 15 to 0
;
;
;        Call  fading( L Fade,Direction% )
;------------------------------------------------------------------------   
   movem.l   d0-d7/a0-a6,-(a7)   
   movea.l   64(sp),a3
   move.w   68(sp),d2

   moveq.l   #15,d1      ; 16 palettes      
   moveq.l   #4,d3      ; jump 2 words
   movea.l   #$ff8240,a5   ;

   tst.b   d2              ; direction ?
   beq.s   copy_palette      ;

   lea.l   508(a3),a3         
   lea.l   28(a5),a5         
   neg.l   d3            ; jumps -2 words

;........................................display  palettes............

copy_palette:
   moveq.l   #7,d2         ; 16 colors
   movea.l   a5,a6
   
copy_color:
   move.l   (a3),(a6)
   adda.l   d3,a3
   adda.l   d3,a6
   dbra.w   d2,copy_color

   move.w   #37,-(sp)       ; Vsync
   trap      #14
   addq.l   #2,sp

   dbra   d1,copy_palette

   
   movem.l   (a7)+,d0-d7/a0-a6
   rts
   end

rockyone
Captain Atari
Captain Atari
Posts: 330
Joined: Thu Jan 20, 2011 8:47 pm
Location: France
Contact:

Re: palette display

Postby rockyone » Sat Jun 18, 2016 2:25 pm

after compiling a basic program.
It's worse ! That bug more often. : Bus error or an address error.
The same fact in "basic" working properly !!

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 653
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: palette display

Postby Anima » Sat Jun 18, 2016 7:13 pm

rockyone wrote:a bug that I do not understand.


Just a short note: be careful calling Vsync without saving your registers (XBIOS functions only save d3-d7 and a3-a7).

rockyone
Captain Atari
Captain Atari
Posts: 330
Joined: Thu Jan 20, 2011 8:47 pm
Location: France
Contact:

Re: palette display

Postby rockyone » Mon Jun 20, 2016 12:48 am

thank you Anima
a mistake never comes alone!
I had forgotten a compilation of the basic odre :mrgreen:

calculating pallets worked well,.
But XBIOS which really annoyed my

it's good, it works in low and medium resolution
fading.zip
calculation and display pallet
You do not have the required permissions to view the files attached to this post.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 1 guest