Coder Social home page Coder Social logo

satnkernel's Introduction

SATNKernel

SATNKernel is a port of the TNKernel real-time kernel version 2.6 for the Sega Saturn game console. In addition to porting the kernel to the SH2 architecture, modifications have been made to allow running separate instances of the kernel on the master and slave CPUs. There is no SMP support included.

Estimating task stack space requirements

If an interrupt stack is not used, the absolute minimum stack size can be calculated as follows:

size of context (21) + size of stack expansion at exit (21) + 11 * number of used interrupt levels

If all 15 interrupt levels are used, this equals 207 words (828 bytes).

If an interrupt stack is used, this changes to:

size of context (21) + size of stack expansion at exit (21) + 4 * (number of used interrupt levels - 1) + 5

The minimum size of the interrupt stack is:

11 * (number of used interrupt levels - 1) + 6

If all 15 interrupt levels are used, this equals 103 words (412 bytes) for tasks and 160 words (640 bytes) for the interrupt stack.

This does not account for stack space used by the tasks or interrupt handlers.

Notice regarding the division unit

Neither the interrupt dispatch macros nor the thread context switch routine will attempt to preserve the state of the SH7095 division peripheral. This is mainly a concern if attempting to use SATNKernel with the SGL libraries, which use GCC library routines to implement integer division using the peripheral.

For the same reason all users of the SGL libraries should be mindful of using integer division inside interrupt handlers.


The kernel is released under the BSD license as follows:

SATNKernel real-time kernel for the Sega Saturn
Based on TNKernel version 2.6

Copyright © 2004, 2010 Yuri Tiomkin
Saturn version modifications copyright © 2013 Anders Montonen
All rights reserved.

Permission to use, copy, modify, and distribute this software in source
and binary forms and its documentation for any purpose and without fee
is hereby granted, provided that the above copyright notice appear
in all copies and that both that copyright notice and this permission
notice appear in supporting documentation.

THIS SOFTWARE IS PROVIDED BY THE YURI TIOMKIN AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL YURI TIOMKIN OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

satnkernel's People

Contributors

andersm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

miinky-arcade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.