English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 August 2008, 22:36   #1
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 45
Posts: 2,292
RANDOM BARFLY bug compiling EOB1ECS-AGA (need help)

Hi guys,

I need Coders Help, because I don't understand a bug (i think)

Indeed I am a curious bug which occur sometimes when i compile 'EOB1ECS&AGA' main file with BARFLY 2.00 & 2.17
(it's only source code which causes it... but it's big=> more than 1Mo and complex)

This bug arrive sometimes.

only and 'curious' solution is to complete code hoping bug will disappear
(in general it's disapear!!!!! if source code is a bit changed or if some goodly placed 'NOT' or 'db 0' are inserted......)

Current BUG (for test):
sometimes hunk table are corrupted...
it the case if you compile present source code for ECS version (for AGA which uses same code... not problem for compilation )


indeed in 'EOB1.i' include:

Instruction 'LEA (_basedatas).L,A4' is badly compiled and if i disassemble during crash (using Hrtmon+Debug option)

Code appears so:
Lea $8000,a4
(i am verify is not SMC bug caused by bad code but it's the Relocation hunk table in executable 'EOB2' file which it bad....


another example:
In Main source code 'EOB2AGA-fixed.ASM', I call a 'EOB1.i' sub-routine by a classical:
'jsr _InitLibraryAGA'
(i can't use BSR because sub-routine is too far in the code)

but it's badly compiled (and cause the current guru).
Indeed, there are a long word of decalage !!!!! as if the source code was been:
'jsr _InitLibraryAGA+4'

By example to fix current crash... i can replace:
LEA (_basedatas).L,A4

by:
_basedatasADR dl basedatas
...
lea LEA (_basedatasADR).L,A4
move.l (A4),a4
it's similar but i can compile source code with success
I think intructions compilation order is different so bug don't appear.......




I need you help:
- Can you test it with other ASM?
- Have you idea of the reason of this bug?
- Have you an idea to rework source code to do dispear definitely this bug?


for your test:
here all last EOB1 ECS&AGA source code for main EOB1 ECS/AGA buld 1.09:
http://download.abime.net/zone/TestEOBEcs.rar

Password is: CFOU!
but don't release or distribute this code now PLEASE... It's beta version... I prefer to release them in a final release with EOB2 AGA source code (again heavy work to clean and explain source code)

here ECS version for test
(just replace new compiled 'eob2' file in 'data-ecs/':
http://eob.wikispaces.com/space/show...LANG-V1083.lha


PS/

I leave home for 1 week this evening..... so don't panic if i can't answer...

Last edited by CFOU!; 31 August 2008 at 22:03.
CFOU! is offline  
Old 31 August 2008, 22:06   #2
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 45
Posts: 2,292
Nobody have idea
CFOU! is offline  
Old 31 August 2008, 23:15   #3
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,084
Quote:
Originally Posted by CFOU! View Post
Nobody have idea
This may seem obvious, but I'm going to write it down anyway

Have you tried other assemblers? Or do you need Barfly spcific functions/options? If you do, maybe you should 'just' modify the source to work with other assemblers.
Thorham is offline  
Old 31 August 2008, 23:21   #4
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,080
Quote:
Originally Posted by CFOU! View Post
Nobody have idea
I tried to assemble it with ASM-One/Pro but as you're using quite a lot of non-standard/Barfly specific stuff in your sources this is not easy. However, I might have an idea which you can try. I once had the problem with ASM-One producing crap code or even crashing when assembling a very large source. I then just increased the stack size and it worked. Maybe it helps with Barfly too?
StingRay is offline  
Old 01 September 2008, 09:34   #5
Psygore
Moderator

Psygore's Avatar
 
Join Date: Jan 2002
Location: France
Posts: 483
Use Barfly option: BOPT O+ (enable optimizing), it will fix your problem.
Add BOPT wo- (no optimizing warnings).
And BOPT sa+ (write symbols hunks), useful when debbuging/resourcing the exe.
Psygore is offline  
Old 01 September 2008, 10:03   #6
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,080
Quote:
Originally Posted by Psygore View Post
Use Barfly option: BOPT O+ (enable optimizing), it will fix your problem.
Just out of interest, how is that going to fix the problem? What if even with optimising there are jumps/branches that still can't be optimised to pc-relative distances? Also, sometimes it can be useful to have an unoptimised executable (I hate optimising assemblers anyway :P). If that solves the problem I'd rather call it a workaround but not fix. =)
StingRay is offline  
Old 01 September 2008, 12:54   #7
Wepl
Moderator
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 663
@cfou

you use code/labels in include files, and you use labels from these include files before they are included
many assembler would not allow that and also basm has sometimes problems with that

try to include your code before using it, probably it helps

I think, optimize helps most times because in multi pass mode labels are differently resolved
Wepl is offline  
Old 01 September 2008, 13:28   #8
RedskullDC
Digital Corruption
RedskullDC's Avatar
 
Join Date: Jan 2007
Location: Sydney/Australia
Age: 55
Posts: 320
Quote:
Originally Posted by CFOU! View Post
Nobody have idea
Using real Amiga, or WinUAE to compile ?

I notice the odd compile error using Devpac or PhxASS under WinUAE when JIT is enabled.
Also, SAS/C's CodeProbe will jam on certain instructions if JIT enabled.

Red
RedskullDC is offline  
Old 01 September 2008, 14:00   #9
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,080
Quote:
Originally Posted by RedskullDC View Post
I notice the odd compile error using Devpac or PhxASS under WinUAE when JIT is enabled.
Also, SAS/C's CodeProbe will jam on certain instructions if JIT enabled.
It might help to set "Hard flush" in the "CPU and FPU" settings. At least it solved the problems with Asm-One's debugger which wouldn't work correctly under WinUAE without this option set.
StingRay is offline  
Old 01 September 2008, 20:38   #10
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 45
Posts: 2,292
Quote:
Originally Posted by Psygore View Post
Use Barfly option: BOPT O+ (enable optimizing), it will fix your problem.
Add BOPT wo- (no optimizing warnings).
And BOPT sa+ (write symbols hunks), useful when debbuging/resourcing the exe.
I will test it !

Quote:
Originally Posted by Wepl View Post
@cfou
you use code/labels in include files, and you use labels from these include files before they are included

many assembler would not allow that and also basm has sometimes problems with that

try to include your code before using it, probably it helps

I think, optimize helps most times because in multi pass mode labels are differently resolved
it's an good idea too (i will try...)

Quote:
Originally Posted by Thorham View Post
This may seem obvious, but I'm going to write it down anyway

Have you tried other assemblers? Or do you need Barfly spcific functions/options? If you do, maybe you should 'just' modify the source to work with other assemblers.
I will test with ASMone (but many instruction to change for ASOne/BARFly Compatibility

Quote:
Originally Posted by StingRay View Post
I tried to assemble it with ASM-One/Pro but as you're using quite a lot of non-standard/Barfly specific stuff in your sources this is not easy. However, I might have an idea which you can try. I once had the problem with ASM-One producing crap code or even crashing when assembling a very large source. I then just increased the stack size and it worked. Maybe it helps with Barfly too?
I'll try first but i don't think is the solution...

Quote:
Originally Posted by StingRay View Post
It might help to set "Hard flush" in the "CPU and FPU" settings. At least it solved the problems with Asm-One's debugger which wouldn't work correctly under WinUAE without this option set.
bug is occurred with My Real amiga (030) and with WinUAE (060+JIT)

Last edited by CFOU!; 01 September 2008 at 20:45.
CFOU! is offline  
Old 02 September 2008, 01:00   #11
CFOU!
Moderator
CFOU!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 45
Posts: 2,292
Quote:
Originally Posted by Psygore View Post
Use Barfly option: BOPT O+ (enable optimizing), it will fix your problem.
Add BOPT wo- (no optimizing warnings).
And BOPT sa+ (write symbols hunks), useful when debbuging/resourcing the exe.

Thank Phil

Your solution seems work fine
CFOU! 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
Bug in AGA and not OCS msayed1977 support.WinUAE 35 03 April 2013 15:51
robinson requiem aga and ecs bug johnz project.WHDLoad 46 28 April 2011 13:27
D/Generation AGA bug? alkis21 support.Games 3 07 January 2011 21:41
Looking Barfly asm Oneillsite Coders. General 4 25 September 2006 20:27
AGA Demo's, GFX bug's?? Ian support.Demos 3 27 January 2002 14:15

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 01:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.11233 seconds with 15 queries