English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 27 June 2020, 13:58   #21
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
First thing I see there is that you're assigning two bitmaps to a single memory allocation. If that isn't the issue, try adding some width (say 16 pixels) to the allocation and see if it goes away. If it does, the alignment of the bitplanes means that the allocation needs to be bigger.
Daedalus is offline  
Old 27 June 2020, 14:17   #22
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
I already checked the bitmaplib and the command "Bitmap": as far as I read the code, it allocates the memory for the bitmap at an even address.

While testing I got another problem: a program with a single "NPrint" leads to a crash an a A500+kick1.3 (emulated)

Can someone confirm that?
Honitos is offline  
Old 27 June 2020, 14:29   #23
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
it still hang..
do you want me to send you my project in private?





Code:
mem0.l=AllocMem((#SCREENW+16)*(#SCREENH+#SCROFFSET)/2,2)
mem1.l=AllocMem((#SCREENW+16)*(#SCREENH+#SCROFFSET)/2,2)
mem2.l=AllocMem((#SCREENW+16)*((#SCREENH*2)+32)/2,2)

CludgeBitMap 0,#SCREENW,#SCREENH+#SCROFFSET,#BPL,mem0
CludgeBitMap 1,#SCREENW,#SCREENH+#SCROFFSET,#BPL,mem1
CludgeBitMap 2,#SCREENW,(#SCREENH*2)+32,#BPL,mem2

Quote:
Originally Posted by Daedalus View Post
First thing I see there is that you're assigning two bitmaps to a single memory allocation. If that isn't the issue, try adding some width (say 16 pixels) to the allocation and see if it goes away. If it does, the alignment of the bitplanes means that the allocation needs to be bigger.
fabbroz is offline  
Old 30 June 2020, 15:53   #24
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Happy

Good news.
I fixed that problem with allocating bitmaps.
The problem was inside bitmaplib: it was possible that an internal variable was located at an odd address.
I compiled a new acidlibs-collection. Please try it here:
Attached Files
File Type: zip AcidLibs_20200630.zip (106.6 KB, 276 views)
Honitos is offline  
Old 30 June 2020, 16:31   #25
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
you are the bast mate


Quote:
Originally Posted by Honitos View Post
Good news.
I fixed that problem with allocating bitmaps.
The problem was inside bitmaplib: it was possible that an internal variable was located at an odd address.
I compiled a new acidlibs-collection. Please try it here:
fabbroz is offline  
Old 30 June 2020, 17:09   #26
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
Sweet! Thanks for that Sven! Now, where can we send a few beer tokens as a sign of our appreciation?
Daedalus is offline  
Old 30 June 2020, 21:12   #27
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 761
Very good mate!!!
tolkien is offline  
Old 30 June 2020, 21:15   #28
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
Hello Honitos,
i just have to overwrite AcidLibs or do i have to anything else?

Becuse my game still hang...
tnx


Quote:
Originally Posted by Honitos View Post
Good news.




I fixed that problem with allocating bitmaps.
The problem was inside bitmaplib: it was possible that an internal variable was located at an odd address.
I compiled a new acidlibs-collection. Please try it here:
fabbroz is offline  
Old 30 June 2020, 21:34   #29
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Yes, just replace the acidlibs-file...

Can you test the little test source provided by Nightshift several posts up?
Honitos is offline  
Old 01 July 2020, 11:07   #30
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
yes... it hang Teste on real A500)



i've copied (replace) AcidLibs library inside Blitz Libs folder on my Amablitz folder, right?



Quote:
Originally Posted by Honitos View Post
Yes, just replace the acidlibs-file...

Can you test the little test source provided by Nightshift several posts up?
fabbroz is offline  
Old 01 July 2020, 13:24   #31
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
I'm going to check it again this evening.

Check it with kick2.0 if you can.

I am still having problems with kick1.3 but with kick2.0 on a 68000 it works...

Last edited by Honitos; 01 July 2020 at 13:49.
Honitos is offline  
Old 02 July 2020, 08:45   #32
AmiNju
Registered User
 
Join Date: Mar 2020
Location: Duesseldorf / Germany
Posts: 32
I followed the discussion and your tests in this thread a little bit:
In summary, can it be said that AB3-Games (with the workaround and/or the changed AcidLibs) run on an A500 OCS with Kickstart 2.x (and above)?
AmiNju is offline  
Old 02 July 2020, 10:21   #33
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
I can confirm that Nightshift's test code works fine on a 68000 / 2.0 with the new library. I'm having trouble with a project I'm working on though, seems to crash very early on a 68000 - either at WBStartup or when assigning a variable at the very top of the code. I don't think either of those are the issue, so I reckon it's one of the command libraries doing something strange on initialisation. For the moment it's not a huge deal because this particular code doesn't do anything particularly AB3-ish, so it compiles in BB2 with very little hassle, but there are other projects where that's not the case.
Daedalus is offline  
Old 02 July 2020, 11:51   #34
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Amiblitz3 programs on OCS Amiga 500

It seems(at least) to be a problem in printlib.
Without NPrint, the bitmap example by Nightshift works with Kick1.3. I am debugging the init code at the Moment.
Honitos is offline  
Old 02 July 2020, 12:10   #35
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
mmmh i try to disable it

actually use:


Code:
Bitmapoutput db (for dualbuffer)
Locate 5,1:Print "Score"



Quote:
Originally Posted by Honitos View Post
It seems(at least) to be a problem in printlib.
Without NPrint, the bitmap example by Nightshift works with Kick1.3. I am debugging the init code at the Moment.
fabbroz is offline  
Old 02 July 2020, 12:28   #36
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,343
Just a thought (without knowing too much of the internals)... I think printlib opens dos.library to use the text output functions it contains. Maybe it makes use of some 2.0 DOS calls?

It would appear that the changes made to the original libraries are far more than the FPU requirement, which is a big shame really...
Daedalus is offline  
Old 02 July 2020, 15:41   #37
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
I found the reason for the crash:
It is located in the memlib that is used by other libs to allocate memory.

Someone of the opensourceteam has done many changes to that lib to improve memory handling. Unfortunately he used memory pooling, an efficient way to handle allocated memory blocks. That functionality was provided first with Kick2.0...
Honitos is offline  
Old 02 July 2020, 15:47   #38
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
What annoys me is the fact, that it is completely unnecessary in this context:

it is this call chain that happens:

printlib -> string2lib -> memlib -> *crash*

* string2lib needs memlib and there fore the initcode of memlib is executed->crash
* printlib uses a single function in string2lib to check if fpu-optimization is enabled

maybe i could move the fpu-checks into another lib that does not use memlib. That would solve the current problem...
Honitos is offline  
Old 03 July 2020, 13:42   #39
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Quote:
Originally Posted by AmiNju View Post
I followed the discussion and your tests in this thread a little bit:
In summary, can it be said that AB3-Games (with the workaround and/or the changed AcidLibs) run on an A500 OCS with Kickstart 2.x (and above)?

At the moment, that is correct. The memlib that handles many memory allocations of different libs uses pooling technology that has been introduced into amigaOS 2.0.
Honitos is offline  
Old 03 July 2020, 13:45   #40
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Exclamation

I patched the memlib to use simple AllocMem/FreeMem-routines.
That should work on kick1.x-machines again.

But it is not a solution as the more modern memory pooling should be used when the os makes it available. Maybe I could add an os-checking and let the lib use both technologies.

Please try the patched AcidLibs first, and tell my if your common sources still work on kick1/kick2/kick3.
Attached Files
File Type: lha AcidLibs_20200703.lha (113.4 KB, 123 views)
Honitos is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Port Wolfenstein on Amiga 500 / 1000 OCS Miggy4eva Retrogaming General Discussion 191 03 April 2019 18:51
Blanck buffer with VASM and dcb or blk on amiga 500 OCS prb28 Coders. Asm / Hardware 19 04 January 2019 18:48
Amiga 500 Rev.6A VS Amiga 500 Plus with 2MB chip and ACA 500 turrican9 support.Hardware 0 24 December 2016 02:16
Amiga 500. OCS or ECS? trydowave support.Hardware 10 25 May 2013 21:58

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:48.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09411 seconds with 14 queries