Jump to content
  • entries
    41
  • comments
    373
  • views
    64,069

bB bleeding-edge pre-release mega-mega-kludge WIP


Guest

863 views

There has been no update in bB since the halcyon days of summer. And there won't be a real release too soon, as all this stuff I want to do is taking fucking forever.So I decided that I should release something even if it's half-assed, kind of working, slapped together, and with no new docs. You know, just in case I get T-boned by a fully-loaded tractor-trailer carrying rocket fuel on my way home from the market because my cat ran out of kitty litter. At least then, all this work won't go to waste.Wait, did I say release? No, this is not a release. It's just the latest build that just happened to compile without errors. There are no guarantees of any kind here. If there were a greek letter that came before Alpha, that's what I would call this.This is also an RFC - if you find bugs, bad/inefficient code, or something else I should know, please tell me.Anyway. What I have added are:- another kernel (multisprite) which is the only other kernel that's even partially working right now.to use it: set kernel multispritewith this kernel come new commands: player2: player3: player4: player5:(all work like you expect) pfheight = ? (valid values=0,1,3,7,15...specifies the height of playfield blocks minus one. 0 doesn't work right when using sprites 1-5.) Using other values will break the kernel!NUSIZ2, NUSIZ3, NUSIZ4, NUSIZ5=? :set NUSIZ of extra spritessimilar values for colors.COLUP1 and NUSIZ1 do not work as you would expect: use NewCOLUP1 and NewNUSIZ instead, and these are subject to change.No bankswitching with this kernel yet, but will come eventually.--edit: Player 0 sprite can be moved anywhere without flicker, but player1-5 sprites cannot overlap without flicker.With flicker, you can only overlap any two of them - trying to do more will make some sprites disappear. (Somebody, please go into the asm and fix this for me... please?)bankswitching, standard kernel only.to use bankswitching: set romsize 8k (or 16k or 32k) Special considerations:bankswitching is automatic in most cases, but you need to manually specify bank boundaries. To start a new bank: bank Xwhere bank is the next bank. Banks are numberes 1-2, 1-4 or 1-8 depending on the ROM size. You need to specify them in order, I think.All standard bB commands work basically the same except for goto and gosub, and possibly function (can't remember if 'function' works yet...)With goto or gosub, it will work the same as long as the target line or label lives in the same bank. if the target is in a different bank, specify where it is by "bankx"for example: gosub label bank4Note that there is considerable overhead with switching banks, so try not to switch too often.There are 3 types of returns now: return return thisbank return otherbank"return" by itself can be used anywhere. It will automatically return to whatever bank called the subroutine."return thisbank" returns only to the current bank. Use this whenever possible since it is much faster. the program will crash, however, if you called the sub from another bank, so be careful."return otherbank" can be used anywhere, just like "return." however, this one is faster for returning to other banks and slower to returns within the same bank.There are probably other things I am forgetting.Full expression evaluationyou can now enter any expression you want.for example: a=a+1 a=a|1+2 a=(e-4)*2*(myarray[4]-(4+c[r]))+2|e This is experimental. I haven't "broken" it yet... I'm hoping you will so I can improve it. I'm looking for people to find compilation issues or broken code instead of just unexpected values (that can easily occur with a localized overflow.) It all uses the stack, so you don't lose your temp vars.Note: fixedpoint variables are not supported - these are still limited to simple equations.NoteNote: You cannot use expressions as arguments in functions or bB commands... sorry. This is coming, though.debuggingthere is a new debugging feature that will tell you how your program is doing on cycles. Remember you can only use so many cycles per frame. Until now, it was hard to know how well your program was doing, or if you went over, and by how much. set debug cycles set debug cyclescore "cycles" is simple and just flashes the background color of your screen if you go over the cycle limit. "cyclescore" will actually display the number of cycles remaining in your score (rounded to the nearest 64 cycles) with a white color. If you go over, your score will turn red, and the score will read the number of cycles you went over the limit.It only measures up to around 2000, so if you go over more than that it will display garbage or worse. However, if you are using up this many cycles, you have bigger problems than this.TV type set tv palshould make a ROM that will run on a PAL 2600. But I have not tested this and I have no idea if it will work.misc pfclear <val>pfclear by itself clears the playfield on the standard kernel. If you specify a value, it will fill playfield memory with a single value.- Joystick 1 now supported.playfield command - specify entire playfield at once: playfield:(syntax: playfield: <off> <on><off> and <on> are optional. they specify the symbols to use for on or off for pf blocks. Default:. and Xexample: playfield: X.X...X..XX..X.XX.X....XX..X.X.. X.X....XX..X.X..X.X...X..XX..X.X... etc. as many lines high as you want, but some may not display if you specify too muchendIn the standard kernel, use 32 chars for each line.In the multisprite kernel, the above only accepts 16 chars wide, and these 16 are reflected on the right.otherThis version makes heavier use of the stack, both for expression evaluation and bankswitching (but not at the same time). It is now very easy to overflow the stack, which will obliterate variables, starting with z and moving downward. I am reorganizing memory to help this along, but for now, keep this in mind.

3 Comments


Recommended Comments

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