27 March 2019, 16:11 | #1 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
What the bloody heck is wrong with this blitter routine?
I've been debugging this blitter routine for over an hour, I can't spot what is wrong with it.... it'r probably something stupid but I'm quite tired.
I created the same routine using the CPU and it works no problem so it is something to do with my calculations or setting up the blitter somewhere. Code:
VERTSCROLL_RESTORE: moveq #0,d2 move.w #VERTICAL_WAIT_MAX,d2 sub.w VIDEO_SPLIT_LAST_POSY,d2 move.w d2,VERTCOPY_LINES_TOP move.w VIDEO_SPLIT_LAST_POSY,VERTCOPY_LINES_BOTTOM move.l LSTPTR_POST_SCREEN,a0 ; Screen location move.l LSTPTR_CURRENT_SCREEN,a1 ; Screen location moveq #0,d0 add.w MAP_POSX,d0 add.l d0,a0 add.l d0,a1 move.l a0,DEBUG_BLIT_POST move.l a1,DEBUG_BLIT_CURRENT move.l a0,d6 move.l a1,d7 ; ; Copy from POST (0,VSPLIT_POSY) to CURRENT(0) lea CANVAS_TABLE_Y3,a2 moveq #0,d2 move.w VIDEO_SPLIT_LAST_POSY,d2 ; Get Vsplit Y Position add.l (a2,d2.w*4),a0 ; Index into POST screen. ; a0 now has start of copy. moveq #0,d0 move.w VERTCOPY_LINES_TOP,d0 bmi.s .skip_top beq.s .skip_top IFEQ VERT_USEBLITTER mulu #50,d0 ; 50 long words .copy1: move.l (a0)+,(a1)+ dbf d0,.copy1 ELSE lsl.w #6,d0 add.w #(20*5),d0 WAIT_FOR_BLITTER move.l #$09f00000,BLTCON0(a5) ; Select straigt A-D mode $f0 move.l #-1,BLTAFWM(a5) ; No masking needed move.w #0,BLTAMOD(a5) ; Playfield Modulo Src move.w #0,BLTDMOD(a5) ; Playfield Modulo Dest move.l a0,BLTAPTH(a5) ; set source address move.l a1,BLTDPTH(a5) ; set dest address to back screen move.w d0,BLTSIZE(a5) ; boom..... ENDC .skip_top move.l d6,a0 move.l d7,a1 moveq #0,d2 move.w VERTCOPY_LINES_TOP,d2 add.l (a2,d2.w*4),a1 ; Index into Verical Top Lines into Destination. moveq #0,d0 move.w VIDEO_SPLIT_LAST_POSY,d0 bmi .fb beq .fb IFEQ VERT_USEBLITTER mulu #50,d0 ; 50 long words .copy2: move.l (a0)+,(a1)+ dbf d0,.copy2 ELSE lsl.w #6,d0 add.w #(20*5),d0 ; d0 has blit size (100 words) ; a0 has source ; a1 has dest WAIT_FOR_BLITTER move.l #$09f00000,BLTCON0(a5) ; Select straigt A-D mode $f0 move.l #-1,BLTAFWM(a5) ; No masking needed move.w #0,BLTAMOD(a5) ; Playfield Modulo Src move.w #0,BLTDMOD(a5) ; Playfield Modulo Dest move.l a0,BLTAPTH(a5) ; set source address move.l a1,BLTDPTH(a5) ; set dest address to back screen move.w d0,BLTSIZE(a5) ; boom..... ENDC .fb: .exit: rts I'll probably post this and then immediately spot the problem - that's what normally happens. |
27 March 2019, 16:40 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Blitter width is only 6 bits (max 64 words).
|
27 March 2019, 16:44 | #3 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
27 March 2019, 17:13 | #4 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,479
|
Don't be afraid to use BLTSIZV/H. You are on AGA
|
27 March 2019, 17:19 | #5 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
27 March 2019, 17:48 | #6 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,630
|
|
27 March 2019, 18:31 | #7 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
|
If he is on AGA then there is 68020+ in the machine and it might be better to use the cpu rather than the blitter.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitter busy flag with blitter DMA off? | NorthWay | Coders. Asm / Hardware | 9 | 23 February 2014 21:05 |
CPU Filling vs. Blitter Filling Routine | victim | Coders. General | 18 | 26 January 2014 02:15 |
What the heck is this game? | Raid27 | Amiga scene | 12 | 26 October 2013 07:47 |
Blitter filling routine used in games | Codetapper | Coders. General | 2 | 26 January 2012 10:20 |
Bloody WinUAE, bloody ADFs, bloody Workbench... | Shrub | New to Emulation or Amiga scene | 1 | 27 July 2005 01:21 |
|
|