Jump to content
IGNORED

Minikernel Developer's Guide


Karl G

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

  • Like 1
Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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. :)

Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...

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.

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