19 September 2023, 22:26 | #1 |
Registered User
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
|
QBSBlit and interleaved bitmaps
I am studing how to Blit in os friendly way to a productivity screen - 640 x 480 60Hz (i feel that a little creazy)
I hope to use the QBSBlit queqe and not to have to use double buffered screens. Since I am new to setup the Blitter I have written a few lines of code, to understand how to do. I am working on a real A1200 "almost stock". It has a 4MB/8MB fast ram + FPU, without other addons. I opened a standard Intution window inside Workbench screen, but my blitter routine seems to be doing nothing. Studing the bitmap structure, I discovered that my Workbench screen seems to have an interleaved bitmap My workbench screen mode is productivity 640x480, 8 colors If it may be of any interest, the BytesPerRow field of the BitMap structure for my interleaved bitmap, reports 240. That is 640/8 x 3 bitplanes = 240. So it seems screen structures take in account the interleaved bitmap. Also, the three bitmap pointers in memory have exactly 80 bytes difference from each other. Reading AllocBitMap information, that should mean that all the bitmap is just one big chunk of memory that contains all the interleaved bitplanes (sorta like the BODY chunk of ILBM picture file) I have read something about intrleaved bitmaps here on the forum. I just would like to ask if using Blitter with interleaved bitmaps require any specific caution or if I just need to set modulo registers correctly. Any hint is appreciated |
20 September 2023, 07:24 | #2 |
Registered User
Join Date: Sep 2018
Location: Rome / Italy
Posts: 22
|
Sorry guys. I found my problem with the blitter. I made the most stupid error when loading custom chips base address in A5
move.l $00DFFF000,A5 it took me a couple of days to realize that i missed the "#" (move.l #$00DFFF000,A5) |
25 September 2023, 09:48 | #3 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
The Workbench screen is interleaved on Kickstart 2.0 and up, and non-interleaved below 2.0. This should be regardless of mode, i.e. Productivity mode should follow this pattern.
Unless you are writing a prank program or writing your own window system, I recommend against modifying the Workbench screen's bitmap directly / without using or telling Intuition.library. (If you don't use double-buffering, you must be in control of exactly when the blit happens to avoid tearing. But this is for graphics that are updated in real time. For most utilities, you'd do better saving some of the precious chipmem and if the tearing is unobtrusive or even hardly noticeable, it's fine.) Regardless of Kickstart, if you want to copy any image to any user screen depth, the simplest way is to copy bitplane by bitplane in a loop. This would mean a blit that is as wide as a bitplane of the source image. If the image is interleaved, the image's BytesPerRow - blit width in bytes is your source modulo, and the same for the destination. (Side note: You have an extra F in the custom base address: it's $dff000.) Hope this helps, and good luck! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Screens and Bitmaps | Nightshft | Coders. Blitz Basic | 6 | 18 September 2019 09:39 |
interleaved bitmaps and blitting | h0ffman | Coders. Asm / Hardware | 6 | 07 December 2013 20:58 |
BPLxMOD for interleaved bitmaps | phx | Coders. Asm / Hardware | 12 | 02 June 2012 22:47 |
Bitmaps Brothers | Djay | request.Old Rare Games | 22 | 23 November 2003 21:18 |
|
|