Jump to content
  • entries
    41
  • comments
    373
  • views
    63,876

bB latest build


Guest

801 views

My computer's hard drive just went belly-up, just weeks out of the 1-year warranty. But I was able to get in and recover much of my work, including bB. It takes something like this to remind me how ephemeral hard drives are these days, and that I am lucky that I didn't lose everything.So before I buy a new HD and reinstall the OS and tons of software and all that fun stuff that takes forever, I thought I'd post my latest WIP version of bB for y'all to play with. This one doesn't add too many features, but it does fix some crippling bugs. (Actually, I think that bB is nearly ready for a real release... prolly a month or so.)Anyway - New features are: - vblank keyword, which allows you to place code in the vblank area instead of just overscan. (use with caution, as vblank already is fairly busy with all of those sprite repositions.) - optional 16-bit random number generator (I think this wasn't there last time, but I'm too lazy to check.) Needs one of your variables to work. To use it, use dim rand16=variable where variable is a-z. - pfscroll upup and downdown, which allow scrolling up or down twice without need to call the routine twice.Bugs fixed: - Problem with complex evaluation expression in evaluation of - (minus) Now the evaluation seems to work!BTW : as an aside, the expression evaluator uses the following order of operations:1. parens ()2. logical operations &, |, ^3. div, mul *,/4. plus, minus +,-Is this "correct" or are the logical operations a lower order than *,/?- Zillions of bugs in interpretation of fixed point math (4.4 didn't work properly AT ALL)- improved/optimized some of the assembly files.Also, I think I figured out a proper license for bB - it's a BSD-style license. See license.txt for more info.

2 Comments


Recommended Comments

use with caution, as vblank already is fairly busy with all of those sprite repositions.

I think I came up with a subroutine that will position all 5 objects in fewer scanlines:

PositionAllObjectsSubroutine
  sta WSYNC
  ldx #4
  SLEEP 3
HorPosLoop       ;     5
  lda HorPos,X  ;+4   9
  sec           ;+2  11
DivideLoop
  sbc #15
  bcs DivideLoop;+4  15
  sta Temp,X    ;+4  19
  sta RESP0,X   ;+4  23
  sta WSYNC
  dex
  bpl HorPosLoop;+5   5
                ;     4

  ldx #4
  ldy Temp,X
  lda Table,Y
  sta HMP0,X    ;+14 18

  dex
  ldy Temp,X
  lda Table,Y
  sta HMP0,X    ;+14 32	

  dex
  ldy Temp,X
  lda Table,Y
  sta HMP0,X    ;+14 46

  dex
  ldy Temp,X
  lda Table,Y
  sta HMP0,X    ;+14 60

  dex
  ldy Temp,X
  lda Table,Y
  sta HMP0,X    ;+14 74

  nop           ;+2  76

  sta HMOVE     ;+3   3

  rts           ;+6   9

It requires that all the X values be consecutive in RAM and it requires a HMxx lookup table, but it only takes a hair more than six scanlines to position all five objects, rather than 10+.

 

Also, if the X value is zero it positions the players at the left-most pixel, which I think is different from your current routine.

 

This particular routine, though based on the positioning code I use in virtually all my projects, is untested, so it may not work. :cool:

Link to comment
Guest
Add a comment...

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