Jump to content
Karl G

Minikernel Developer's Guide

Recommended Posts

Minikernel Developer's Guide Table of Contents

 

0. Minikernel Developer's Guide Introduction

1. Background and "Hello World"

2. Common Commands

3. Data and Player Graphics

4. Timing and Horizontal Positioning

5. Finishing Up

I wanted to see if people here had an interest in a tutorial series that goes through the steps needed to create a custom minikernel for batari Basic.

 

The target audience would be experienced bB developers, but no prior knowledge of 6502 assembly, Atari timings, etc. would be assumed. Beyond minikernel creation, the larger goal would be to familiarize the user with Atari assembly programming in general. Starting with minikernel creation allows for an easier introduction for those who are already familiar with batari Basic.

 

Any interest in seeing such a series?

  • Like 7

Share this post


Link to post
Share on other sites

I am interested. I have struggled to get the title screen to work and have no clue about ASM. I'm more a visual learner. A video would be nice to see and learn from. Off topic Bb 7800 would be another nice video on how to load the program. As the way I understand it they are similar for programming. I had a hard time to get Bb installed the first and second time. There really are no videos that I could find just trial and error.

 

Thanks in advance for the classes if you decide to put this project into motion. I could help out if needed, but my programming experience is still at the novice level.

Share this post


Link to post
Share on other sites

Making videos is not my style, and I'm not a visual learner myself, but that's a good reminder for me to include plenty of screenshots, at least.

 

I will probably use my AA blog for these, and post updates and a ToC in this topic.

Share this post


Link to post
Share on other sites

Thanks. screen shots work also, probably better than a video as those are time consuming and they can become very large files. Then to update them could be a cumbersome nightmare. Looking forward to to what you put out for us to learn, thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Just remember that people can get busy doing other things and may not see or use your tutorial until months or even years later, so it can look like there is a lack of interest at the time of creation. Some people get a little upset when they don't receive a flood of praise right away, but switching their thinking to just doing something because it needs to be done since someone will eventually need it eliminates the need for cookies and pats on the head.

  • Like 3

Share this post


Link to post
Share on other sites

In order to demonstrate the creation of a new minikernel, I realized that I first needed an example game that could benefit from a minikernel that doesn't yet exist. Below is the game I created for this purpose, but without the minikernel. It works stand-alone, so just for fun I thought I'd release the game in its current form before starting the series.

 

"Cannons" is a simple 2K bB game of armed conflict.

 

cannons.bas

 

cannons.bas.bin

 

  • Like 3

Share this post


Link to post
Share on other sites

Lots of people will find this helpful. Although, you might ask users to familiarise themselves with the basics of 6502/6507 assembler before they begin.

 

Personally, I want to know more about coding minikernels with the bB DPC+ kernel. If I decided to start an Atari VCS project, I wouldn't bother using the standard kernel. It's just too limited.

Share this post


Link to post
Share on other sites

I'm using the standard kernel for this series, although I may include information about DPC+ minikernels in an appendix. There are a number of issues with minikernels using the DPC+ kernel: there is very little space in bank 1, so a bankswitch in ASM is needed for any minikernel that isn't tiny. Adding a minikernel causes the frame to go over 262 cycles, and a timer needs to be adjusted in the kernel ASM file to correct this. Finally, the memory map is different, so e.g. the 6lives minikernel won't work properly without adjustment.

 

I don't know if there are also issues with minikernels in the multisprite kernel as well, but I do know that the "noscore" option causes overcycling for some reason. I may tackle that one in an appendix, too - we shall see. :)

Share this post


Link to post
Share on other sites

I'm using the standard kernel for this series, although I may include information about DPC+ minikernels in an appendix. There are a number of issues with minikernels using the DPC+ kernel: there is very little space in bank 1, so a bankswitch in ASM is needed for any minikernel that isn't tiny. Adding a minikernel causes the frame to go over 262 cycles, and a timer needs to be adjusted in the kernel ASM file to correct this. Finally, the memory map is different, so e.g. the 6lives minikernel won't work properly without adjustment.

 

I don't know if there are also issues with minikernels in the multisprite kernel as well, but I do know that the "noscore" option causes overcycling for some reason. I may tackle that one in an appendix, too - we shall see. :)

 

 

I think the multi sprite kernel could have used more love. Although I truly appreciate and use it.. well, it kinda seemed rough around the edges compared to the standard kernel and DPC+. Probably because the timings had to be so tight to fit in a higher resolution playfield and virtual sprites. I wouldn't mind a custom alternative to multi sprite with 4 paddle support :)

 

@Lewis2907 I usually "cheat" by using the Title Kernel Editor in VisualbB. When you preview the title screen go into the bB directory and copy out the titlescreen folder to your project folder. The preview folder in bB should look something like "_Preview(67cb548a-21e4-45cf-9b31-54ad38a73012)" more or less.

 

The titlescreen data seems to like being in your last bank.

 bank 4

 asm
 include "titlescreen/asm/titlescreen.asm"
end

 

If it were in bank 4 I'd use it like so. This line is like a drawscreen command strictly for displaying the tittle.

 gosub titledrawscreen bank4

Share this post


Link to post
Share on other sites

I have added an introduction and the first lesson. I've added a table of contents to the first post of this topic that I will edit whenever I add a new lesson.

 

Many thanks to RevEng for agreeing to preview these for technical accuracy!

  • Like 3

Share this post


Link to post
Share on other sites

The next entry is up: "Common Commands". I cover some of the more common assembly commands, so it may be a little dry. The next lesson will cover drawing player graphics in a minikernel, so stay tuned.

  • Like 5

Share this post


Link to post
Share on other sites

Don't want to repeat what others have said. But, this is amazing work! One to one comparison with bB code really helps wrap my head around assembly. Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

You can do a minikernel (mostly) in bB.

 

I don't know if thats helpful or just trying to dodge things that should be confronted head on.

 

ie you don't really need to know much assembly but you still need to know

nuts and bolts (and you need enough assembly to understand what you get from

bB anyway)

 

 

x6_1_5.bas

  • Like 1

Share this post


Link to post
Share on other sites

That's pretty cool. It would have never occurred to me to try to do a minikernel in bB. I'm not sure that example would be any easier to teach than the assembly equivalent, though.

 

Anyway, for purposes of my guide, one of my goals is to teach some assembly to experienced bB coders, which, as you seem to be saying, can be useful to bB programmers even if they primarily stick to bB.

Share this post


Link to post
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.

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