Jump to content
IGNORED

Bitmap Minikernel


RevEng

Recommended Posts

As a spin-off from my titlescreen kernel work, I created a Bitmap Minikernel.

 

Its already been incorporated into one game, Cliff Friedel's Passthrough, which uses it to display a logo above the score.

 

But it also has the optional capability to display only part of a larger bitmap, depending on where the "bitmap_index" variable is pointing. This can be used for scrolling or skipping between the images being displayed.

 

I've included some high level docs this time around too. Hopefully this will point would-be users in the right direction.

 

 


  • All demo source, bins, and the docs...
bitmapdemo.zip
 
The docs...
BitmapMinikernelHowTo.pdf
 
The "advanced" demo screenshot, and the "advanced" bin...
post-23476-128337127638_thumb.png
bitmapdemo.advanced.bin

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

This is great! I haven't tried it yet, but it's definitely one to add to the ol' bB minikernel archive. :)

 

Which raises an interesting point or three. I haven't kept track of all the available minikernels that have been posted since the "invention" of bB minikernels, and it would be nice if

 

(1) there were a centralized location or archive for storing all the existing and future minikernels, so new bB users can grab them all at once instead of having to search through multiple threads for them; and

 

(2) there were some kind of standard or guidelines for documenting minikernels and how they're used. It would also be nice if

 

(3) batari included the available minikernels with the bB installation packets. However, I think he recently said that he isn't planning on doing that, nor will he include custom kernels (especially if they're too specialized to be generically useful). I can certainly understand the logic behind that decision, because minikernels and custom kernels aren't part of an "official/standard" bB installation-- they're more like user-written applets, and should more properly be archived, maintained, and documented by some kind of "batari Basic users' group." This also applies to any user-written functions and routines.

 

Is Random Terrain or anyone else listing and documenting minikernels, custom kernels, user functions, etc. as they're posted in this forum? I'm hoping to write and post a minikernel myself, once I work out all the details and kinks of how it will work.

 

Michael

  • Thanks 1
Link to comment
Share on other sites

This is great! I haven't tried it yet, but it's definitely one to add to the ol' bB minikernel archive. :)

 

Which raises an interesting point or three. I haven't kept track of all the available minikernels that have been posted since the "invention" of bB minikernels, and it would be nice if

 

(1) there were a centralized location or archive for storing all the existing and future minikernels, so new bB users can grab them all at once instead of having to search through multiple threads for them; and

 

(2) there were some kind of standard or guidelines for documenting minikernels and how they're used. It would also be nice if

 

(3) batari included the available minikernels with the bB installation packets. However, I think he recently said that he isn't planning on doing that, nor will he include custom kernels (especially if they're too specialized to be generically useful). I can certainly understand the logic behind that decision, because minikernels and custom kernels aren't part of an "official/standard" bB installation-- they're more like user-written applets, and should more properly be archived, maintained, and documented by some kind of "batari Basic users' group." This also applies to any user-written functions and routines.

 

Is Random Terrain or anyone else listing and documenting minikernels, custom kernels, user functions, etc. as they're posted in this forum? I'm hoping to write and post a minikernel myself, once I work out all the details and kinks of how it will work.

 

Michael

 

It would be nice to have a central repository of them. I would be willing to give space on my webserver if someone wanted to collect them and put them somewhere. Just let me know. These things definitely need to be kept and documented so people don't end up reinventing the wheel and because they do add a lot of functionality to bB.

 

Cliff

Link to comment
Share on other sites

Is Random Terrain or anyone else listing and documenting minikernels, custom kernels, user functions, etc. as they're posted in this forum? I'm hoping to write and post a minikernel myself, once I work out all the details and kinks of how it will work.

The downloadable zip file on my web site has the manual and a folder with images and a slowly growing number of bB example programs (it's just a copy of the folder I have online). If someone has the time to give links to minikernels that really work with bB (not buggy stuff or stuff that only works with an ancient version of bB), I can either link to the AtariAge threads or put the files in the bB folder and link to them from the bB page. If I put them in the folder, they'll be available online or offline. Whatever you guys want to do is fine with me. Just let me know.

Link to comment
Share on other sites

Thanks for the positive comments guys.

 

Michael, your point (1) has been on my mind for a while too. I hate releasing stuff and watching it slide off the first page into oblivion a few weeks later. I also hate working on a project and later finding some guy did the same thing a few years back.

 

Al keeps mentioning the file storage module that he paid for but hasn't had the time to implement. From the sounds of it, users will be able to tag uploaded files with categories and other searchable meta info.

 

That said, having a secondary home would be good. The natural place this would a Unofficial/Contributed bB code section of batari's or RT's website.

 

Release docs/guidelines (2) would be helpful. A start could be a README template with release info up top.

 

E.g...

name:______ release date:_____ author:______

code type: minikernel/kernel/subroutine/demo

kernels tested with: standard/multisprite/none/NA

 

I'm not sure where to take your idea beyond that. I don't have much experience writing formal docs.

 

@theloon: I look forward to the label contest for Space Invader and its upcoming sequel "Good Touch/Bad Touch". ;)

Link to comment
Share on other sites

...

I've included some high level docs this time around too. Hopefully this will point would-be users in the right direction.

...

Has any body actually tried to give this a go? I'm fully expecting the answer to be "no" since it's only been out for a bit, but I figured I'd ask.

 

I'm planning an official release of the Titlescreen Kernel in the next few weeks with docs based on these ones, since importing data for the Bitmap minikernel is pretty similar. If there's anything lacking or unclear in the docs let me know!

Link to comment
Share on other sites

If there's anything lacking or unclear in the docs let me know!

I can't think of any of my works in progress that would use this, but every game will use the other thing you're working on. :thumbsup:

 

I just took a look at this PDF file and it looks pretty good except for stuff like this:

 

2.5. Open the Bitmap Minikernel file “bitmap_img.asm” in Windows notepad or a
similar text editor.
2.6. Copy each block of BYTE text from IMG2CODE into the corresponding section of
the bitmap_img.asm file, replacing any existing BYTE lines in that section.
2.7. Set the “bitmap_window” value at the top of the file to the displayed height. (14 in
our example) and the “bitmap_height” value to the total height of the bitmap file you
created. (28 in our example)
2.8. Save the bitmap_img.asm file.

 

For my eyeballs, there are two problems with that. There are no blank lines between the sections and I have a hard time reading indented paragraphs. I could read this better:

 

2.5.
Open the Bitmap Minikernel file “bitmap_img.asm” in Windows notepad or a
similar text editor.

2.6.
Copy each block of BYTE text from IMG2CODE into the corresponding section of
the bitmap_img.asm file, replacing any existing BYTE lines in that section.

2.7.
Set the “bitmap_window” value at the top of the file to the displayed height. (14 in
our example) and the “bitmap_height” value to the total height of the bitmap file you
created. (28 in our example.)

2.8.
Save the bitmap_img.asm file.

Link to comment
Share on other sites

  • 2 months later...

Okay, am I missing something?

 

This does not seem to work with the multisprite kernal. All I get is a blank screen when I run the binary, though it seems to compile fine.

 

I cut the playfield in the bitmapdemo.bas file down so its 16 wide and set multisprite kernal at the top, along with screenheight = 80 and pfheight =7

 

Any help is appreciated, as I would like this minikernal in my game. I don't mind shrinking the vertical playfield area for more space, however the multisprite kernal is limited to a screehheight of 80 at the current smallest.

 

Thanks :)

Edited by Gateway
Link to comment
Share on other sites

  • 2 weeks later...

Thanks,RevEng, for the modified file. It works well with "SpaceInvader" demo now using the multisprite kernel, though I had to shorten the playfield to use 10 height instead of the usual 11, in order for it to look right.

 

However, I then added the pfscore bars to each side of the score, but that seems to be in conflict with the scorepointers or something else the bitmap kernel uses. So only 1 pfscore bar appears on the left side. There must be a conflict between the two minikernels. I have some free time today, I will play around with the code some more.

Link to comment
Share on other sites

Ok, here's the problem in a nutshell... I need 3 temporary bytes of ram, plus the tempN variables. The bB guide says that aux3-6 are reserved exclusively for minikernels, but that's not entirely true. These same bytes are also used for various optional functions in the score display. (aux3=pointer to lives shape or pfscore1, aux4=life color or pfscore2, ...)

 

It looks like there just isn't any free ram that I can borrow without colliding with some optional bB feature.

 

So the following version uses aux3, aux5 and aux6 as before, unless your basic program has dimensioned bmmk1, bmmk2, and bmmk3, in which case it uses them instead...

 

rem *** one example...
rem *** the following are temporary bytes for the bitmap minikernel
dim bmmk1=var44
dim bmmk2=var45
dim bmmk3=var46

 

bitmap_mk.asm.txt

Edited by RevEng
Link to comment
Share on other sites

  • 6 years later...

Is using the standar kernel, maybe it has to do with the titlescreen kernel, but I can't seem to include it after the titlescreen so that it shows only during the main gameplay

Edit

I tried the one I made in the demo game and works perfectly fine but on my game it just causes the screen to go insane

Edited by STGraves
Link to comment
Share on other sites

  • 1 month later...

As a spin-off from my titlescreen kernel work, I created a Bitmap Minikernel.

 

Its already been incorporated into one game, Cliff Friedel's Passthrough, which uses it to display a logo above the score.

 

But it also has the optional capability to display only part of a larger bitmap, depending on where the "bitmap_index" variable is pointing. This can be used for scrolling or skipping between the images being displayed.

 

I've included some high level docs this time around too. Hopefully this will point would-be users in the right direction.

 

 

 

All demo source, bins, and the docs...

attachicon.gifbitmapdemo.zip

 

The docs...

attachicon.gifBitmapMinikernelHowTo.pdf

 

The "advanced" demo screenshot, and the "advanced" bin...

attachicon.gifbitmapdemo.bas.bin_1.png

attachicon.gifbitmapdemo.advanced.bin

Can I use this to display a few bitmaps for text? Using a conditional statement?

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