Coder Social home page Coder Social logo

foenixmcp's Introduction

Foenix/MCP

A portable kernel for the Foenix series of computers.

Overview

The purpose of this project is to provide a simple kernel for the Foenix series of retro-style computers. Emphasis is placed upon the word "simple." This operating system will be more related to MS-DOS or CP/M than to Unix or Linux. The main purposes of this kernel are:

  • Boot the Foenix computer to a reasonably usable state.
  • Provide access to files on IDE hard drives, SD cards, and floppy disk (when the computer supports floppies).
  • Provide an environment for loading and running binary programs from media.
  • Provide access to those devices which are tedious to access at the lowest level (e.g. storage media, keyboard, text mode screen).
  • Provide a common programmatic interface for all the computers in the line.
  • Be broadly portable across the different processors the Foenix computers support (at the time of this writing, this includes the 65816, and the 68000 series).

Foenix Computers Supported

[Flesh this out as we get there. Intention is to support the FMX, U, U+, A2560K, A2560X, A2560U (68000 and 65816), and GenX.]

Building

Please refer to processor specific building instructions that will be included. For the 65816 and 68000 computers, the project will be built using the VBCC compiler.

Building for the M68000 CPU Family

Building this project requires the VBCC compiler and the MAKE utility. Using your command line, go into the src directory and type:

export VBCC = <use-your-projects-dir>/FoenixMCP/vbcc
make all

to build the kernel.

To remove binaries and intermediate files:

make clean

Build Options

There are three option variables that can be set in the makefile:

  • UNIT: This specifies which Foenix model is the targetted machine for the build. There are currently two options:
    1. UNIT=a2560u, this covers both the A2560U and A2560U+. It sets the CPU to be the M68000.
    2. UNIT=a2560k, this covers the A2560K and sets the CPU to M68040.
  • MEMORY: This species where in memory Foenix/MCP will run. There are two values here:
    1. MEMORY=ram: This specifies that the MCP will run from RAM.
    2. MEMORY=flash: This specifies that the MCP will be programmed to flash memory.
  • KBD_POLLED: As a temporary feature, if this option variable is defined, it will specify to the kernel that polled I/O is to be used for keyboard access instead of interrupt driven I/O.

Examples:

make all UNIT=a2560u MEMORY=ram

Builds an SREC file suitable for loading into RAM of the A2560U/U+.

make all UNIT=a2560k MEMORY=flash

Builds a binary file suitable for programming the flash of the A2560K.

License

Most of the source code for this kernel is made available under the open source BSD 3-Clause License (see LICENSE). However, the kernel also includes portions of other projects, which are covered under their licenses. In particular, the kernel currently uses the FatFS embedded file system, which is covered under separate license. Please see the src/fatfs directory for license details.

Features

See the features list for the features intended for this kernel and the status of implementation.

//END-OF-LINE

foenixmcp's People

Contributors

pweingar avatar vinz6751 avatar daschewie avatar hth313 avatar

Stargazers

Jim Hathaway avatar Johan Broström avatar FelR avatar Carsten Elton Sørensen avatar Martin Krastev avatar  avatar  avatar Daniel Wiberg avatar Craig Turner avatar

Watchers

James Cloos avatar  avatar

foenixmcp's Issues

Structure s_color4 members alignment problem

"types.h" defines the following structure to represent a 32 bit color:

typedef struct s_color4 {
    uint8_t blue;
    uint8_t green;
    uint8_t red;
    uint8_t alpha;
} t_color4;

I suspect that VBCC will align structure members on word or long word boundaries. So if you want to align the members on bytes instead (so the whole structure is 4 bytes), you should wrap the declaration with:

#pragma pack(1)
typedef struct s_color4 {
...
} t_color4;
#pragma pack()

as indicated on page 46 of the VBCC manual.
I haven't tested it though

It struck me because for the EmuTOS port I had the problem and had to use the packed attribute to indicate what I wanted to GCC.

Keyboard handling overflow ?

Reproduction steps:
1 Boot
2 Keep a arrow key down.
3 After some time, I get a
"Command not found
Could not load file: 000004B0" (or whatever address, seems to be in the low memory though)

Somebody can reproduce ?

Rename C256Mgr into FoenixMgr

For historical reasons the scripts are named after the C256, and the messages in the script mention the C256.
Now that the scripts are used for all Foenix computers, not only the C256, it would make sense to rename this like "FoenixMgr" (suggestions welcome).

Update 68000 function bindings in doc so they work with 68000

The function bindings in the manual make use of lea <ea>,Dn , but this not supported on the 68000 (only from 68020 probably?), on the 68000, LEA's destination register must be an address register.

So we have to use:

  • move.l #buffer,d0 if using an immediate address
  • otherwise go through an address register e.g.
lea.l (a0,d6),a6
move.l a6,d0

I can do the update in a few days hopefully.

[Enhancement] Reset IO from Raw mode to Normal when launching an App.

Background

The CLI uses IOCTRL to set input to RAW mode disabling the echo of characters during input. When launching a C application, the system stays in RAW mode affecting scanf() and getchar() calls. As a work around, the C apps need to call IOCTRL to enable echo on input.

Proposal

Prior to launching an app, the CLI should change to Normal mode. This would remove the need of all C programs having to call IOCTRL.

Bug in fsys_findnext

I think that there is a problem in fsys_findnext in fsys.c

line335 is fres = f_findnext(&g_dir_state[dir], &finfo); looks clunky.
It feels that it shoudl be g_directory instead of g_dir_state , isn't it ?

[Enhancement] Support modifying history text in CLI

Background

The CLI recently added support for line editing and history. For new text, it allows you to backspace or use arrows to edit text. However when you use the up arrow to pull up a history entry, it allows you to append to the text but not edit it.

Proposal

Please add line edit support for history entries. Another recommendation would be to consider adapting Linenoise. It is VT100 clone of libreadline that has no dependencies and is less than 1k lines.

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.