|The initial history of MDOS and Adelian was not intentional, but rather evolutionary.|
Please note that this blog is not spell or grammar checked. It is however written in UK English, not US/International English.
Time to get back to MDOS and Adelian!
Support for Raspberry Pi 3 added (at last!). It required updated processor/SoC identifier, UART0 to be (re)mapped to standard external UART pins and realising AArch32 on ARMv8 is not the same as ARMv7!
For others, who may fall into the same trap with legacy code (ie from ARM26), "movs pc,lr" works on all ARMs upto v7; but does not work on AArch32 ARM v8. Instead "mov pc,lr" is required. Doh!
After a hiatus due to commitments on the 'Horizon' project, Adelian is now installed on to the harddrives of an Acer Aspire One ZG5, Toshiba Libretto 100CT and a HP OmniBook 800ct. And they all work!
Update boot sector code so it uses LBA as well as CHS addressing. This is to allow for BIOSes which return different disc geometries between normal and extended geometry inquiries. Coding/optimising this, was like 'the old days' when raw code space optimisation was essential ;-)
Implement licencing code.
Disabled CPU cache system on all Raspberry Pi systems, as not currently happy with the suspect setup...
Handle discs with and without partition table, in a clean and coherent way.
At startup, revert to SVC from HYP mode on ARM processors which support HYP mode.
Added support for Raspberry Pi 2 and Zero, plus official Raspberry Pi DSI LCD display.
Started adding IFF image format support.
Some cosmetic updates to our 'Pictures' application.
Start code to analyse task stack usage, to allow sensible pre-allocation of stack space.
Improved build system for various system emulators.
Add new target, Windows... Allow MDOS code to run natively under Windows.
Small fix to our 'maketask' utility to handle subtle code attributes changes in 'gcc' instrinsics. These include (but are not limited to) '.hidden' attributes.
Small amount of work on 'time' and 'real time clock' code.
Made 'Pictures', our Digital Photo Frame application, for standard PC architectures, available from our website.
ATA_Inquiry within the ATA task now uses the default timeout of 1s, instead of 100ms. Some PCs did not respond within 100ms.
Not much done this month, except for some code tidying up and updating some documentation...
MDOS boots into bootloader on Xilinx Zynq (on Adapteva Parallella 7020 board).
MMC/SD card driver working on Xilinx Zynq (on Adapteva Parallella 7020 board).
Fixed error in FATFS, which had uninitialised drive data structures pointing to random memory. Probably the cause of some random boot problems in the past (all platforms and products)...
Started to add 'Device Tree' support, which is becoming essential with platforms containing similar (but not identical) hardware.
VSYNC support now added to all framebuffer subsystems which offer interrupt driven vertical sync IRQs.
Found and cured an as-yet-undocumented 'feature' of SPI MMC/SD cards with regards to bit/byte alignment of data streams. This allows many more MMC/SD cards to work with our existing code.
Found that Linux FAT formatter often creates 'master boot records' with wrong geometry contained within. We now recommend using discs without a partition table.
New version of 'Pictures', our Digital Photo Frame application, for the Raspberry Pi, now available from our website.
Started work on porting all code to Xilinx Zynq based products. The first target is the Parellella 7020 board (because at the moment, that is the only Zynq board we have access to!).
Perform a 'yield' during JPEG decoding; and it is faster... Don't yet know why... Strange...
Updated compiler (v4.01 for i386 and M68K) and binutils (2.24), along with gmp, mpc and mpfr. Latest compiler showed up a silly typo in task creation code which used an undefined variable - doh!
Boot speed improvement, due to additional 'read ahead' disc caching in boot loader, when track caching is not appropiate (hard drives, SD cards, etc etc).
On systems which have a fixed screen resolution at boot or have user configured resolution; keep that resolution even if the screen geometry appears a little strange!
Performance enhancements in video drawing (24/32 bpp image plotting onto virtual screens).
Simplify the automatic Makefile creation (Makefiles are created dynamically depending on platform and product), including the automation of dependancy checking/verification.
Added support for the M16C CPU (amongst others in the family) to the toolchain suite.
Modified Raspberry Pi support within QEMU to allow for bit-banged SPI MMC/SD card support (instead of EMMC).
Improved generic MMC/SD card support.
Fixed IRQ addresses in Core_ISRHooks.s which ommited the initial '0x' on Raspberry Pi IRQ source checking - doh!
Improved generic MMC/SD card performance.
Added 'Raspberry Pi booting Adelian', to the screenshots section of the website.
Optimise boot loader's video drawing when the platform offers no intrinsic video functions.
Added 'Fade' task which allows the fading between two screens, using a simple 'block fade'. Used initially in the 'Pictures' application; and may be used in future gaming type applications too.
Improved the generic MMC/SD support such that a greater variety of cards actually work! Whilst many cards worked anyway, a number of newer (and larger) devices do not.
JPEG image decoding complete.
'Pictures' product now complete - which is essentially a digital photoframe application.
Restructure code configuration management to allow configurable 'Platforms' and 'Products'.
Start 'Picture Frame' application for all platforms.
Found a collection of photos from a 2005 professional family photo shoot. May use them as demo files in the 'Pictures' application...
Raspberry Pi performance increased by 50%, by enabling L1 cache and branch prediction. Enabling MMU however causes problems :-/
Raspberry Pi 8bpp mode now has the same colour palette as the 8bpp mode on an Acorn Archimedes.
Raspberry Pi 15, 16, 24 and 32bpp mode now complete.
Fixed 'high speed memory move' operations for all ARM processors.
I guess I am now looking for a problem for MDOS/Adelian to solve...
Raspberry Pi now has huge MMC/SD card speed optimisations, allowing initial boot to execute 10 times faster.
Raspberry Pi interrupt system complete.
Raspberry Pi now boots! :-)
I have now spent around the equivelent of 6 man-days on the Raspberry Pi port of my OS, usually times of darkness (ie. late at night) and copious alcohol intake (but very good red wine!).
Raspberry Pi version uses the screen mode as defined in 'config.txt', or the hardware default if nothing is defined; plus it now has a working SD card driver (SPI mode), and the system timer interrupts runs at exactly 1KHz.
Raspberry Pi version sucessfully determines ARM memory allocation (ARM/GPU split) :-)
First day of Raspberry Pi fun! Boots Adelian bootloader code from a 256MByte SD card, but the screen quality on a standard composite video is not fantastic :-/
Got a Raspberry Pi (not before time!).
Split out PS/2 keyboard scan code handling to driver. Subordinate keyboard drivers, now send virtual key codes to main keyboard handling task.
Commence writing serial drivers.
Went on holiday to Adelianos in Crete. Yup - the same name as our Adelian OS :-)
WIMP menu system implemented.
Fix silly error in INIOpen, which returned an uninitialised pointer to a INI file structure when the file could not be opened.
Not much work performed in June due to heavy work commitments.
Huge speed up on SendMessage and PostMessage due to special case high speed Malloc/Free. This affects all inter-task communications.
Not much work performed in May due to other work commitments (two weeks in Berlin, time in Basingstoke and general heavy workload).
CHS/LBA disc addressing methods on IBM PC platforms causing a few issues. The OS installer uses LBA but the primary boot loader uses CHS (code space limitations in primary boot loader). Aiming for the 'lowest common denominator', CHS is used for installation and primary boot; but once MDOS has control, it is up to the drive to decide the addressing method. This is not ideal as CHS has limitations on the drive size.
Contemplating designing and developing a new 'desktop computer' based on Donald Knuth's MMIX example processor. By using an ARM or a PIC to simulate a 'real' MMIX processor (the ARM or PIC would essentially, externally appear as a MMIX processor). Peripheral interfacing via small PICs for PS/2 keyboard and mouse; direct IO for harddrive; and either FTDI's EVE or manual double buffered SRAM for video. Audio is not deemed too important but could range from simple timer output square wave to full 16bit DACs.
Further to my new 'desktop computer' idea, using the Knuth MMIX processor, utilising pre-existing ISA type cards, an ISA processor card containing memory (SRAM because I am lazy!) is a viable option. Then controlling the ISA bus to subordinate cards for various subfunctions (ie. video, SCSI, multi-IO et al). But alas, this would lose the fun of designing and developing a truly new computer architecture :-/
WIMP window Z-buffering and intellegent object updates, now work correctly, instead of the original brute-force method.
Wrote hard drive installation code, to allow Adelian to be installed from floppy to a hard drive, as well as running as a 'Live Floppy'. This code also allows for auto-update of files when update file (C:/SYSTEM.UPD) is placed on hard drive. It is a little 'user-unfriendly' at the moment so I guess I'd better make it 'pretty' some time in the future!
Fix x86 boot sector loader so it handles unsigned compares (using JB instructions instead of JL). This fixes instances where secondary boot loader is greater than 32767 bytes in size. As the secondary boot loader now handles installation and updates, it has grown...Now have an Amiga A600 (68000 at around 7.1MHz). Added Compact Flash interface. Coding for the Amiga starts shortly-ish!
Increase speed of loading preliminary tasks and installer/updater, within secondary boot loader.
Added FDC177X write operation DMA/IRQ.
Improved secondary boot loader (LOADER.BIN) speed on Acorn platforms when searching for best screen resolution and colour depth.
MemAlloc retries from start of heap if unable to allocate memory using the 'fast method'.
Fix 'distance to end of memory' arithmetic in MemAlloc.
Handle 'last free block in memory' correctly in MemAlloc.
Small amount of disc space optimisations.
A bit more handling of fragmented memory (handling memory holes etc). It also aids Atari ST (first 64KBytes), and Acorn (dynamic areas and unused frame buffer memory).
Purchased 4MBytes of RAM for Atari ST as the size of debug code means Adelian does not fit into a 512KByte machine.
Next part of fragmented memory handling now complete (low memory from 0x400). It adds BIOS (etc) space used at boot time. Adds 3KBytes on PC, 31KBytes on Acorn and 63KBytes on Atari ST.
Some task switching and memory allocation speed optimisations.
Speed optimisations on SendMessage and PostMessage due to now hashing target task name(s).
Added ARM memory operation optimisations.
Started adding support for fragment RAM memory maps, as it previously only supported contiguous RAM on startup (ie. stops at first memory 'hole').
Fixed buffer overrun in StringUtils library, where an allocated buffer was a byte to small! Doh! This generally occurred during boot.
Added support for 'Extended Read Sectors' in secondary boot loader (LOADER.BIN), for drives which dont have standard CHS geometry (eg. MMC cards). Must modify PC boot sector code, at some point, to handle this too!
Reworked colour and palette control to allow for (semi-)fixed colour system. This cover systems which do not have full colour/palette control (eg. Acorn 8bpp modes).
Fixed silly errors is memory alloc/free, and added some extra heap sanity checking!
Fixed silly error in BlockDriver which forgot to increment the buffer pointer when loading multiple sectors over a head/track boundary!
Fixed silly error in OS_MemOperation which manifested its self in 680x0 platforms.
Hmmm... Not happy with the speed of MDOS on a basic 8MHz Atari ST with a 68000... Time for some fun code/functional optimisation!
Added some ATARI ST video optimisations.
Placed Atari ST DMA code into DMA task.
ARM libgcc.a now builds with ARMv2 instruction set. Adelian for early platforms (ie ARM2, ARM3 and ARM250 based) now boot and operate.
The IBMPC version of MDOS has always dumped debug information to COM1, now the Atari ST version also sends debug to the primary serial port (AUX).
The Atari ST floppy driver now works, but I now need to place DMA code in the DMA task instead of hard coding it in the Floppy task!
Added CPU type detection for both GUI display purposes and ultimately to allow CPU specific optimisations at runtime (eg. fast memory moves etc etc).
Almost boots on Acorn Archimedes range of computers (26bit ARM), but libgcc is erroneously compiled with ARMv3+ instructions (eg. BX) which obviously fail on ARMv2 type machines (ie. ARM2, ARM250 and ARM3).
Eventually found and fixed silly boot time task creation error where OS_StartTask was called instead of Func_StartTask. This then caused stack curruption of the internal MDOS stack. There is however, still a memory alloc/free error once the OS is up and running.
Added some screen shots to website.
Started cleaning up some internal documentation. This documentation auto-generates the library APIs information on the website.
All targets now compile in Linux, as well as CygWin for Windows.
No much work on MDOS over the past few months ('Daytime work' commitments) :-(
ARM 26bit and 32bit (Acorn platforms) now compile :-)
Still no Raspberry Pi on my desk...
ARM targets (currently Acorn ARM based workstations, 26 and 32bit PC address range) fail compilation due to floating point issues, even though no floating poing utilising code exists in source tree - damn gcc intrinsics :-(
Fixed TaskManager such that dynamically loaded tasks cannot execute until after instruction cache is cleared for task code memory space!
Bought an old iMac as a completely new type of target (different CPU - PowerPC G3).
Re-arranged build tree and build system (using Cywin more than Windows). Ultimately, building will take place under Cygwin and Linux based host systems.
Changed all data types from BYTE, WORD and DWORD etc, to U8, U16 and U32 etc.
Got a horrible bug somewhere in the boot sequence! :-/
Completed Atari ST as a target system (68000) with exception of SCSI and 177x FDC support (weird DMA system).
Added support for new screen modes (CGA plus generic 4 colour and 2 colour modes) - which are, ironically, more complicated than 16, 256, etc, colour depths!
Virtually no more development work on MDOS/Adelian until the end of December.
Added much more CLI code.
Targeting an ARM11 based mobile phone, for GPS tracking system. Can't find the relevent datasheets etc for this phone (ZTE Blade).
I have been thinking this for a while - since about about the late 1980s... Why, when CPUs, memory, peripherals etc got faster, does the OS get slower? Because of too much bloat. Microsoft Windows was once accused of this but Linux based distributions have also become increasingly sluggish.
Why? Crap programming!
The vast majority of newly 'qualified' software engineers nowadays do not have a clue how to write software, which should be small in 'memory footprint' and is coded in a 'CPU friendly' style...
I shall not begin the argument about algorithmic design...
Scrapped various pre-built GCC compilers and decided to build them from source to simplify the overall build chain. 3 hours later the i386 compiler was still compiling - the Atom based netbook which lives in our conservatory, isn't very fast...!
Idea! New file system - with highly economical data storage. A file in 1234 bytes in size only takes 1234 bytes of disc storage plus it's own meta-data. Really simple when you think out it! Shall add it to my list of things to do!
Started (E)IDE/SCSI/ATAPI drivers. Mostly working! Plus lots of code optimisations for video, filesystems and general utility functions.
Version 0.01.02087 uploaded to website.
Started writing this Blog!
4, 8, 15, 16, 24 and 32 BPP colour depth graphic drivers written. Supports many primitives.
PS/2 Keyboard driver working.
PS/2 mouse driver working.
Things really started to speed up! As lower level code was proving to 'solid', higher level code just started to fall into place.
MDOS/Adelian eventually booted from a floppy disc!
Not a great deal of development work actually performed due to other commitments. Essentially, about 3-4 hours a week was spent on MDOS/Adelian.
Development work continued!
I was on a contract in Nottingham (UK), developing software for underground trains for London Underground. The chosen OS for the embedded system was FreeDOS, a free and compatable version of MSDOS. This is where MDOS/Adelian was born. I saw an immediate requirement for an OS which was not limited by hardware architecture, was multi-tasking, had lots of useful libraries and ultimately portable to other CPUs and platforms.
MDOS was born, and Adelian was a 'test harness'.
Wrote a nano-kernal (and a lot more!) for an ASIC with an 8051 as it's processing core. This along with all it's associated tasks that I also wrote, was demonstrated at Microsoft's WinHEC conference in New Orleans in May 2003.
This kick started the idea of writing a full operating system.
The birth of our daughter! We wanted to name her with a name which was not common, but was a 'real' name, so we called her 'Adele'. Her middle name came from her two aunties, 'Leanne' (both my sister and my wife's sister had the same name!). Thus the name Adelian, our 'desktop' variant of MDOS. Try saying 'Adele Leanne' quickly!
Married Louise Anne Cannon. Thus my ongoing development of 'Luan' - a 32bit fully orthoganal RISC processor.
Stopped writing games (with one exception in 1992), as my true computing love lay in low-level hardware/firmware/software. From this point I concentrated on computer peripherals (and associated drivers) and embedded systems - to ASIC level.
I wrote many published games and other applications for the BBC Micro, Acorn Electron, Apple 2, Commodore 64, IBM PC, NEC PC Engine, Atari ST, Amiga and Acorn Archimedes.
I wrote a BASIC compiler after observing another. This was taken onboard by the software publishing house 'Micro Power'.
I then wrote a number of games of a professional quality, which were published.
Once having my own computer, I was hooked! My school work suffered as I'd rather write software than do homework!
After choosing what 'O' Levels I wanted to take (being a 14 year old), one of which was 'Computer Studies' I thought I'd better start playing with the Commodore PET the school had purchased! It was like a duck taking to water. I could not get enough computing time!
Apart from teaching myself BASIC, I also taught myself 6502 assembler - to ensure I got the most from the PET.
For Christmas 1981, I was bought a 'BBC Micro' which was not delivered until March 1982 - as Acorn could not meet the demand!
I was always interest in technology, making small circuits from what limited components I could aquire.
From around 1978, I starting buying electronic magazines (Hobby Electronics, Electonics Today International, Everyday Electronics, Practical Wireless etc etc), and teaching myself the fundimentals of electronic design.
I was born! My parents decided to give me the name 'Gary'. Do not really like my name, but I am stuck with it!