English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 25 November 2009, 13:12   #181
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by StingRay View Post
Why shouldn't it work? It's never executed on 68000 machines, code checks the CPU. I'm pretty sure it wasn't the cause of the crash when the code was assembled in 68020 mode.
You're right. I didn't look at the source. But then I want to know why it crashed at first. Maybe Jason can do a binary-compare of the two executables...
phx is offline  
Old 25 November 2009, 13:32   #182
AmigaBoy
Registered User
 
Join Date: Aug 2004
Location: 19 Jump Street
Posts: 238
Quote:
Originally Posted by phx
Maybe Jason can do a binary-compare of the two executables...
I've placed the 000 and 020 binaries into the zone. Both are compiled with the same command line. The only difference being the "opt p=68020" line being changed to "opt p=68000" and the ".get_vbr_code: movec vbr,d0" being changed to ".get_vbr_code: dc.l $4e7a0801".

The filesizes are different and there's too many changes between the files to know where to look. What I can see from a quick search is that the opcode $4e7a0801 appears in both executables at almost the same offsets so it's clear there's something else causing the crash.
AmigaBoy is offline  
Old 25 November 2009, 14:19   #183
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
I checked, problem is this:

Code:
	tst.l a0
in the replayer init. Apparently vasm optimized for 020+ in 020 mode which makes sense of course. If you disable any optimizations the problem should not occur anymore.
StingRay is offline  
Old 25 November 2009, 14:42   #184
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by StingRay View Post
I checked, problem is this:

Code:
    tst.l a0
in the replayer init. Apparently vasm optimized for 020+ in 020 mode which makes sense of course.
Yes, indeed! Good catch!
So it was just luck when assembling with the original Devpac, which doesn't perform that much optimizations. To be on the safe side I would suggest to switch to 68020 mode for the movec only:
Code:
        opt     p=68020
        movec   vbr,d0
        opt     p=68000
phx is offline  
Old 25 November 2009, 14:46   #185
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Out of interest StingRay - what does tst.l a0 get optimised to on 68020+ that dies on 68000?

Quote:
Originally Posted by phx
To be on the safe side I would suggest to switch to 68020 mode for the movec only:
Good idea - I'll amend my new sources.

Last edited by pmc; 25 November 2009 at 15:17. Reason: Changed to a more worthwhile post. :-)
pmc is offline  
Old 25 November 2009, 15:57   #186
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
Out of interest StingRay - what does tst.l a0 get optimised to on 68020+ that dies on 68000?
tst.l ax is not a valid 68000 instruction (which is why it crashes on 68000). On 68000 you would have to do cmp.l #0,ax (which is the original code in the replayer init) or move.l ax,dx.
StingRay is offline  
Old 25 November 2009, 16:02   #187
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Oh OK - yeah, I should know that really!

Thanks StingRay.
pmc is offline  
Old 30 November 2009, 15:11   #188
phrenzi
 
Posts: n/a
Hi All,

Wow, seeing all the old 68k code is great, never knew a site like this existed.

Keep up the good work, look forward to seeing the finished product..
 
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
what demo would you like to see re-made psygnosis request.Demos 2 26 July 2013 23:42
Another old skool intro for you pmc Coders. Tutorials 20 15 February 2010 15:27
Made a new (!) Scoopex demo called 'Blitter Sweet' Photon Coders. General 43 12 October 2008 14:35
Help!! Who made this demo ??? Kristian95 request.Demos 11 26 April 2007 16:54
Best Old-Skool RTS? Cam Nostalgia & memories 39 08 November 2002 22:45

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 19:02.

Top

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