Jump to content
IGNORED

The score bounces or jitters when scrolling (please help fix it)


Random Terrain

Recommended Posts

This post has been updated:

 

At one time scrolling caused the score to bounce or jitter, then batari fixed it. Now that I'm using the files in jwierer's bBWin7_64bit.zip folder, scrolling is causing the score to bounce or jitter again.

 

Below is a test file I made back in 2011:

 

scrolling_test_2011y_08m_09d_0251t.bas

 

This is what it looks like when I compile it using the version of batari basic in the bBWin7_64bit.zip folder:

 

scrolling_test_2011y_08m_09d_0251t.bin

 

 

In case it helps, here is jwierer's bBWin7_64bit.zip folder from the VbB thread:

 

bBWin7_64bit.zip

 

It's supposed to be the most up-to-date batari Basic folder before the DPC+ stuff started. If you can fix it so the score bounce./jitter is gone, jwierer can update the folder with your fix and nobody else will have this problem.

 

 

 

Please ignore the text below. Switching to an older std_kernel.asm file did not fix the problem, so the score bounce/jitter must be coming from something else.

 

I knew there was a fix to stop the score from bouncing or jittering, but I couldn't find it until now. First, I found this post by me:

 

www.atariage.com/forums/topic/125355-toobbin/#entry1516259

 

And it led me to this post by batari:

 

www.atariage.com/forums/topic/118434-score-jitters/#entry1430601

 

The problem is that the std_kernel.asm file attached to that post is from December of 2007 and the latest version seems to have been updated in 2009. I tracked down a version of the file from February of 2007 to make it easier to see what batari did to get rid of the jitter. I zipped up all three versions for your convenience:

 

please_compare.zip

 

Can somebody who understands the contents of the three files compare them with WinMerge or a similar program and figure out what batari did to get rid of the jitter? Once you have the two files from 2007 loaded into WinMerge, the Location Pane will look like this:

 

post-13-0-56506400-1360873583_thumb.png

 

When you compare the December 2007 file with the one from 2009, the Location Pane will look like this:

 

post-13-0-29498400-1360873655_thumb.png

 

 

The differences are shown in yellow. As you can see, there's a lot of white space, so hopefully it won't take up too much of your time. I'm working on a game that uses scrolling and I don't want to mess things up by just tossing in a file from 2007. I hope the 2009 version can be edited so the jitter will go away again and maybe stay gone for good this time.

 

 

Thanks.

Link to comment
Share on other sites

If the score jitters, the problem must be somewhere between the end of the game screen and the beginning of the score. The only difference I see in that section of code between the 2009 version and the December 2007 version is that the "beginscore" label was moved down a line:

 

December 2007 version:

 ; cycle 0
 lda  (scorepointers+$,y  ;+5   5   15
beginscore
 sta  GRP1		    ;+3   8   24	  D1	 D1	  D2	 --
 lda  (scorepointers+$6),y  ;+5  13   39

 

2009 version:

 ; cycle 0
beginscore
 lda  (scorepointers+$,y  ;+5   5   15
 sta  GRP1		    ;+3   8   24	  D1	 D1	  D2	 --
 lda  (scorepointers+$6),y  ;+5  13   39

 

Assuming the December 2007 version was jitter-free and the 2009 version is giving you the jitters, I would try cutting out the line with "beginscore" and paste it one more line further down, then recompile your program with the modified file and see if that fixes the jitter.

Link to comment
Share on other sites

My guess would be that it is the change that moved

 

dex
;dec temp4 ; might try putting this above PF writes
beq endkernel

 

from line 438 up to right below the 'enterlastkernel' label. For the 2013 bin Stella shows that when it jumps to 'endkernel', scan line count is at line 210, while if there's a jump to 'no_blank_lines_bailout' then it's line 209.

 

There may be other things that have an influence here. So, if moving the branch does not fix it please post everything else that is needed to create a binary with DASM (include files, command line options) so we can better test different modifications.

Link to comment
Share on other sites

Where be the source to gyvolver? Like I said, I just did a demo that should mess with the score something fierce and it's rock solid. If we could reproduce the issue maybe we'd find the cause and fit it..

 

This is old crap code from 2008 when I really, really, really, really, really didn't know what I was doing compared to now when I just really, really don't know what I'm doing, so I'll have to clean up the code the best I can before I post it.

 

As a test, I just put the December 2007 std_kernel.asm in my folder and the bounce/jitter is still there, so this thread has wasted people's time for no good reason.

 

Where did you get your bB-related files? Are they from jwierer's bBWin7_64bit.zip folder or from the old Updated bB Files to Download thread or someplace else?

 

 

Thanks.

Link to comment
Share on other sites

I'd guess this is related to the scrolling of the playfield in gyvolver, and/or to the size of the playfield rows.

 

I thought I mentioned it in my first post, but I guess I forgot. The score is bouncing because of the scrolling. I'll edit the first post.

Link to comment
Share on other sites

This is old crap code from 2008 when I really, really, really, really, really didn't know what I was doing compared to now when I just really, really don't know what I'm doing, so I'll have to clean up the code the best I can before I post it.

 

As a test, I just put the December 2007 std_kernel.asm in my folder and the bounce/jitter is still there, so this thread has wasted people's time for no good reason.

 

Where did you get your bB-related files? Are they from jwierer's bBWin7_64bit.zip folder or from the old Updated bB Files to Download thread or someplace else?

 

 

Thanks.

 

Sadly, I don't recall. If there's any other way to detect (filename, file size, etc..) I'd be game.

Link to comment
Share on other sites

  • 2 weeks later...

It's taking me too long to get the Gyvolver code updated, so I thought I would post this instead:

 

scrolling_test_2011y_08m_09d_0251t.bin

 

scrolling_test_2011y_08m_09d_0251t.bas

 

The scrolling test files are from a post I made in 2011 that I forgot about until I found it today.

Link to comment
Share on other sites

Your bouncy score bug seems to happen in all bB releases that I have, including 1.1d. It requires no_blank_lines to be enabled and the screen to be scrolling.

 

I think there's an off-by-one bug in the ending of the kernel, for that option. If you copy over std_kernel.asm into your project and make the following change to that file, it fixes the bounce...

 

;***original code
cpx #1			 ;2
bne .enterfromNBL ;3/2
jmp no_blank_lines_bailout ;3

;*** fixed code
cpx #0			 ; changed from #1 to #0
bne .enterfromNBL ;3/2
jmp no_blank_lines_bailout ;3

  • Like 2
Link to comment
Share on other sites

Your bouncy score bug seems to happen in all bB releases that I have, including 1.1d. It requires no_blank_lines to be enabled and the screen to be scrolling.

 

I think there's an off-by-one bug in the ending of the kernel, for that option. If you copy over std_kernel.asm into your project and make the following change to that file, it fixes the bounce...

 

;***original code
cpx #1			 ;2
bne .enterfromNBL ;3/2
jmp no_blank_lines_bailout ;3

;*** fixed code
cpx #0			 ; changed from #1 to #0
bne .enterfromNBL ;3/2
jmp no_blank_lines_bailout ;3

 

Thanks. Does that fix just have to be for scrolling projects or can it be used for all projects? If it can be used for all projects, jwierer could put the fixed version in his bBWin7_64bit.zip folder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji 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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...