Jump to content

Photo

Minikernel Developer's Guide


19 replies to this topic

#1 Karl G ONLINE  

Karl G

    Moonsweeper

  • 444 posts

Posted Sun Sep 2, 2018 6:45 AM

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 (coming soon)

5. Minikernel Refinement (coming soon)

 

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?



#2 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • 264 posts
  • Location:Senatobia, MS

Posted Sun Sep 2, 2018 9:36 AM

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.

#3 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Sun Sep 2, 2018 10:56 AM

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.



#4 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • 264 posts
  • Location:Senatobia, MS

Posted Sun Sep 2, 2018 12:55 PM

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.

#5 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,735 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Sep 2, 2018 4:45 PM

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.



#6 Coolcrab OFFLINE  

Coolcrab

    Moonsweeper

  • 325 posts
  • Location:Stockholm

Posted Sun Sep 2, 2018 11:54 PM

I would be interested!

#7 ultima OFFLINE  

ultima

    Chopper Commander

  • 188 posts
  • Location:Yakima, WA USA

Posted Mon Sep 3, 2018 7:37 AM

Custom minikernel tutorials would be pretty cool.

#8 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Mon Sep 3, 2018 4:14 PM

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.

 

Attached File  cannons.bas   5.18KB   4 downloads

 

Attached File  cannons.bas.bin   2KB   10 downloads

 



#9 orange808 OFFLINE  

orange808

    Space Invader

  • 19 posts

Posted Tue Sep 4, 2018 8:23 PM

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.

#10 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Wed Sep 5, 2018 7:44 AM

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



#11 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,135 posts

Posted Wed Sep 5, 2018 11:20 AM

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


#12 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Wed Sep 5, 2018 3:25 PM

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!



#13 Coolcrab OFFLINE  

Coolcrab

    Moonsweeper

  • 325 posts
  • Location:Stockholm

Posted Fri Sep 7, 2018 3:25 AM

This is starting out to be very useful! Keep it up :)



#14 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Fri Sep 7, 2018 1:41 PM

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.



#15 Lewis2907 OFFLINE  

Lewis2907

    Moonsweeper

  • 264 posts
  • Location:Senatobia, MS

Posted Fri Sep 7, 2018 3:27 PM

Looks very good so far. I will have to take some time to digest it and learn. Glad you are putting this together for us beginners. 



#16 Coolcrab OFFLINE  

Coolcrab

    Moonsweeper

  • 325 posts
  • Location:Stockholm

Posted Sat Sep 8, 2018 1:25 AM

This is super useful, keep going please!

#17 Gemintronic ONLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,135 posts

Posted Sat Sep 8, 2018 5:25 PM

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!



#18 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Star Raider

  • 85 posts

Posted Sun Sep 9, 2018 4:32 AM

INSPIRING!



#19 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Sun Sep 9, 2018 6:46 AM

Thanks guys.  I'm glad that it has been helpful so far.



#20 Karl G ONLINE  

Karl G

    Moonsweeper

  • Topic Starter
  • 444 posts

Posted Tue Sep 11, 2018 1:19 PM

Lesson 3 is up: "Data and Player Graphics".  Finally we see the beginnings of what the minikernel is actually supposed to do in this one.  :-)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users