22 September 2018, 23:29 | #1 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
Problems with displaying a screen!
Help - problem driving me mad!
I am simply trying to display a background (320x200 16 colours) on a double buffered screen. When I run the program - it works first time but when it ends I get an error (#80000020) or if I leave it a while it just crashes. If I reload and rerun the program it just crashes and seems to be trying to display the bitmap in different parts of the memory (if that makes sense). If after running once, I reload the bitmap into Deluxe Paint and re-save it then the program runs and crashes again. Whatever is happening initially seems to be corrupting my iff file. I'm probably doing something stupid - help. Here is the code: Code:
WBStartup LoadShape 50,"Background/level1" LoadPalette 0,"Graphics/palette.pal" BLITZ ;set up bitmap... ; BitMap 0,320+16,200,4 BitMap 1,320+16,200,4 InitCopList 0,44,200,$14,8,32,0 DisplayPalette 0,0 CreateDisplay 0 DisplayBitMap 0,0 db=0 Use BitMap 0: Blit 50,0,0 Use BitMap 1: Blit 50,0,0 ;while mouse button not hit While RawStatus(69)=0 VWait Displaybitmap 0, db db=1-db Wend |
23 September 2018, 00:48 | #2 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,004
|
Well if you already enabled smooth scrolling I think you'd be better of using extended Displaybitmap 0,db,0,0.
Though I find Blitz unexplainable from time to time so if its something else I'd like to know. |
23 September 2018, 01:09 | #3 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
Thanks - but gives the same error.
|
23 September 2018, 01:21 | #4 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,004
|
then I'd go with unexplainabel.. Did you try loadshape 0 instead 50? And is your picture 16 or 32 colors? You're setting 4 bitplanes then setting 32 colors..
|
23 September 2018, 01:26 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,344
|
Is "level1" a shape or an IFF ILBM picture?
|
23 September 2018, 12:16 | #6 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,374
|
There can be issues with memory corruption when shapes are too large. Try loading a smaller shape for Level1 and see if that helps. If so, you can perhaps load it in chunks, or else use LoadBitmap to load the background instead.
|
23 September 2018, 18:51 | #7 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
After 3 days of trying I was coming to the same conclusion. Will try loading bitmap instead!
|
23 September 2018, 21:59 | #8 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
As usual your are right D - was definitely something to do with memory issues. Loading the bitmap directly does the job.
Thanks again! |
23 September 2018, 22:02 | #9 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
Colours are 16 - correct but as I am using sprites I need a 32 colour palette in the copper list hence the 16 colour screen and 32 colours in the Initcop command. I'm finally getting a handle on this sprite thing! Everyone should use them as you can have 16 colours independent of your main game colours which doubles your colours for no effort...
|
24 September 2018, 08:34 | #10 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
Do you have End command at the end of source code?
You always have to end your code with statement: End |
25 September 2018, 20:22 | #11 |
Registered User
Join Date: Mar 2012
Location: UK
Posts: 1,895
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A500 Displaying only a Turquoise Screen | Skyfox | support.Hardware | 11 | 13 August 2018 17:19 |
Screen not displaying on 2.6.1 | Amiga1992 | support.WinUAE | 4 | 25 August 2013 17:50 |
New WinUAE's and screen displaying problem | Sloppy Elf | support.WinUAE | 3 | 26 January 2007 14:18 |
1084S screen problems | T_hairy_bootson | support.Hardware | 4 | 21 October 2003 20:27 |
Screen refresh problems | tomcat666 | support.WinFellow | 3 | 26 December 2001 17:42 |
|
|