Jump to content

Photo

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


19 replies to this topic

#1 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Feb 14, 2013 2:35 PM

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:

Attached File  scrolling_test_2011y_08m_09d_0251t.bas   3.22KB   83 downloads

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

Attached File  scrolling_test_2011y_08m_09d_0251t.bin   4KB   77 downloads


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

Attached File  bBWin7_64bit.zip   156.92KB   86 downloads

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:

Attached File  please_compare.zip   9.38KB   95 downloads

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:

winmerge_compare_01.png

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

winmerge_compare_02.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.

#2 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,566 posts
  • Location:South Carolina, USA

Posted Fri Feb 15, 2013 10:25 PM

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+$<img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_cool.gif' class='bbc_emoticon' alt='8)' />,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+$<img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_cool.gif' class='bbc_emoticon' alt='8)' />,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.

#3 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Feb 15, 2013 10:37 PM

Thanks for looking, but that didn't fix it.

#4 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Fri Feb 15, 2013 11:06 PM

I think I've seen the score bounce for myself, but, why doesn't scrolling, shaking junk like my Space Harrier demo do it?
http://www.atariage....er-effect-demo/

#5 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,566 posts
  • Location:South Carolina, USA

Posted Fri Feb 15, 2013 11:17 PM

Thanks for looking, but that didn't fix it.

I guess it must be a combination of things, then. There are a lot of other differences between the three versions, so it's hard to know exactly what's causing it. Could you post a binary of the ROM so we can follow it in Stella's debugger?

#6 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Feb 16, 2013 12:26 AM

Here's the last time it didn't bounce or jitter:

Attached File  gyvolver_2010y_09m_26d_0614t.bin   4KB   168 downloads


Now here it is with bounce or jitter:

Attached File  gyvolver_2013y_02m_16d_0123t.bin   4KB   82 downloads


Thanks.

#7 Joe Musashi OFFLINE  

Joe Musashi

    Moonsweeper

  • 311 posts

Posted Sat Feb 16, 2013 11:42 AM

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.

#8 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Sat Feb 16, 2013 11:50 AM

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..

#9 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Feb 16, 2013 1:49 PM

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.

#10 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,566 posts
  • Location:South Carolina, USA

Posted Sat Feb 16, 2013 2:06 PM

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

#11 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Feb 16, 2013 2:27 PM

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.

#12 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Sat Feb 16, 2013 10:19 PM

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.

#13 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Feb 26, 2013 1:37 PM

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

Attached File  scrolling_test_2011y_08m_09d_0251t.bin   4KB   78 downloads

Attached File  scrolling_test_2011y_08m_09d_0251t.bas   3.22KB   69 downloads

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

#14 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Feb 26, 2013 3:22 PM

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

Attached File  bBWin7_64bit.zip   156.92KB   92 downloads

It's supposed to be the most up-to-date batari Basic folder before the DPC+ stuff started.

#15 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,214 posts
  • Location:bottom of the stack

Posted Tue Feb 26, 2013 5:01 PM

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


#16 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Feb 26, 2013 5:40 PM

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.

#17 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,214 posts
  • Location:bottom of the stack

Posted Tue Feb 26, 2013 5:45 PM

No problem, and it can be used for all projects.

#18 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 29,027 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Feb 26, 2013 5:49 PM

No problem, and it can be used for all projects.


Thanks. I'll make the change and PM jwierer.

#19 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 902 posts
  • Location:Seattle,WA

Posted Tue Feb 26, 2013 8:36 PM

I've updated the download in the main visual bB thread.

-Jeff

#20 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Wed Feb 27, 2013 1:28 PM

It's nice to know even if batari does retire form maintaining bB the source is understandable - and thus correctable - by third parties such as RevEng :)




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users