Jump to content
Jagware
LinkoVitch

Help VBI randomness!

Recommended Posts

LinkoVitch    0

Hi,

Wondered if you guys could help my sanity a tad.

 

I have working code (yay) nothing special it sticks a bitmap on the screen.

 

Working on a few other bits and pieces I decided to tidy up my source files. I have a source file for each key job of my code, which are all assembled into objects and then linked together to form the ABS file. Now, my Vertical Interrupt rout had ended up in amongst my object list code, all working fine and dandy, but I thought really that shouldn't be there, I'll move it to somewhere else. So I did.. moved the code, copy and paste to a different source file, changed its name, updated my VB setup code to reflect the changes etc.

 

Now it doesn't work!

 

I have tried everything I can think of. The lines of source are identical,

 

I have changed its name to be the same as the original (commenting out the original) still nothing

 

I have included it with a different name to the same source file as the original, nothing

 

I have set error messages on the CPU error registers just incase it was blowing up for some reason.. nothing

 

Checked the memory address of the two routines.. working one is $2a710 none working is $2a730 both look fine to me.

 

All the VBI routine is, is:

 

movem.l d0-d6/a0-a6,-(sp)

 

jsr copylist

 

move.w #$101,INT1

move.w #$0,INT2

 

 

movem.l (sp)+,d0-d6/a0-a6

rte

 

which is identical in both places.

 

any ideas? some wacky bug in the Jag I have tickled? or ALN or madmac?

 

thanks in advance

 

Share this post


Link to post
Share on other sites
LinkoVitch    0

OK if I actually copy the code into the same source file it works under a new name. But if I include a source file with the code in it doesn't work!

 

WTF!?

Share this post


Link to post
Share on other sites
Matmook    1
OK if I actually copy the code into the same source file it works under a new name. But if I include a source file with the code in it doesn't work!

 

WTF!?

 

Just an idea...

 

Have you, at the end of the included source file a carrier return ?

ALN/MAC will not take the last line of included files if there is not a CR/LF.

 

If it's the case then "rte" will not be included...

 

Share this post


Link to post
Share on other sites
LinkoVitch    0
Have you, at the end of the included source file a carrier return ?

ALN/MAC will not take the last line of included files if there is not a CR/LF.

 

If it's the case then "rte" will not be included...

 

Thanks, alas yep. That bug has got me a few times already, I have started putting a comment at the end of my source files that just says END to make sure I don't get bitten by it :)

 

Think I may try recreating the file incase there is something weird in there.

 

thanks again

Share this post


Link to post
Share on other sites
Fadest    0

another idea...

Are you sure the new file use CR+LF as line end characters ?

Some code editors can detect format of existing files (in fact reuse same line character) but use their own setup by default ?

So maybe your 2 files are not really the same (do they have the same size in bytes ?)

Share this post


Link to post
Share on other sites
LinkoVitch    0

ARGH! I am an idiot! Matmook you got it in one! :D I owe you a pint :)

 

When I posted to the forum I was at work and not able to see my code, I just checked and sure enough there was no end comment.. GAH I am such a dumbass! it must have been another source file where I had that problem.. I blame being tired when I wrote it :D

 

Thanks again guys. I'll learn one day :D

Share this post


Link to post
Share on other sites
LinkoVitch    0

To combat such things I have a .PHRASE or .QPHRASE before pretty much every memory block :) I really should clean that up at some point :D (and remember to stop writing to my data sections too :/ :) )

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×