Swan Project

From S1MP3 Wiki
Jump to: navigation, search


The Swan firmware project aims to provide a complete operating system replacement for Actions based MP3 players (aka "S1MP3" or "MP4" players), especially the most common ATJ2085 types. This includes both a kernel and all shell (GUI) applications as well as a software development kit.

The goals of the project are described in detail at Swan proposal.


This is a preliminary specification for our own open source firmware for S1MP3-type players. Use the talk page to propose your ideas or correction or to simply ask questions.

The goal is to make it at least just as powerfull as the stock firmwares, but easier to develop on.

SWAN is split in three parts: the Kernel, the API libraries and the applications.

Wish List

Stuff we would like to see on swan : Swan Wish List

Resources we have

The ATJ2085 has the following resources:

  • BROM. We don't touch that for now, but just leave the current rescue image in place.
  • TROM - We still don't know what is this used for.
  • ZRAM This is 16KB of non-banked memory
  • IPM/IDM. IPM is program memory for dsp. IDM is data memory for dsp. Both are 24 bits wide. The size is 16 kilowords for both memories. At one moment in time either the low, middle, or high bytes of these memories can be mapped to the z80. It is possible to map the top half of ipm/idm to the z80 and the bottom half to the DSP for simulatanouse operation, and more memory for the z80. The dsp memories total 16 kilowords * 2 * 24 bits / 8 bits = 96 kilobytes. At a time only 16 or 8 kilobytes can be mapped to the z80.
  • ZRAM2 can be mapped to the same address as IPM/IDM. ZRAM2 is 2+2KB on atj2085. It is 3 + 3 KB for v9 players.
  • on v9 players: URAM - 2K + 256, it has synchronization and asynchronism accessing mode? - can be mapped to 5800-60ff
  • NOR flash. Lots of it :) It's probably quite slow to load something from it, though, with all the ECC checking going on.

About memory

Most of the ZRAM will be used for the OS-routines and display drivers, etc, and the rest of it as a data area to keep variables which shoudl remain persistent between bank-switches. If the Zram isn't enough, we can probably use a few bytes of IPM/IDM-banks for the slower routines, and we can load the really not much used routines (USB etc) from the NOR flash if needed. We can then use another slice of IPM bank to fit the currently running application in, and a third one for the background tasks like playing mp3s while another app is running, which can be used by the app but which would mean no concurrent mp3s.

Bootloader

See Swan bootloader

Kernel

This is the part that does things like load programs from flash and execute them, schedule programs, act like a hardware abstractor. It has drivers for devices that aren't exactly the same across players, like the display, keyboard, FM-radio, flash...

The OS will be a single-tasking OS, there's not enough RAM to do more than just the tiniest bit of multitasking. The Z80 core isn't designed for it, either. The ideas the original firmware already uses will be used here too: an OS in RAM to handle the filesystem, display etc, a background driver to play music files and do other stuff in parallel with the currently running app, and the currently running app itself.

Click here to read the draft

Libraries

Click here to read the full API specification

The API is a set of functions which allow the Applications Programmer to Interface to the hardware without the need to understand how the hardware works.

Applications

The base applications which use the API libraries for useful purposes, e.g. edit playlists, play a game, record sounds, ... We already have a few of them, see Main Page


Current Status

Toolchain

Nothing has been decided yet. Some candidates are Z88dk and sdcc. Z88dk seems to be used by the most project members.

Kernel

Contributors: Kidscracker, Bluechip

Kernel's first draft is in progress, see it!

Also see Swan.

API

Contributors: Bluechip

The API specification is complete, see API.

User Interface

Contributors: Wladston, Ian Hawdon, Abner

We have a set of user interface mockups, see User interface.

Software Development Kit

We have S1SDK, but it needs to be made compilant with the [[API].

Information about similar approaches