Home - retrotruestory/M1DEV GitHub Wiki
Welcome to the M1DEV wiki!
This is an unofficial source of knowledge about the Magic-1 computer and its architecture and software. The purpose of this project is to collect all the information and interesting facts about this computer. I do my best to make sure that the information presented here is reliable and verified. If somewhere there is a mistake, please let me know about it. The creator of Magic-1 is Bill Buzbee, and this is his official website: www.magic-1.org & www.homebrewcpu.com
The information here will be divided into the following topics:
- Glossary of terms
- History of the birth of Magic-1
- Development Diaries
- About Bill Buzbee
- Magic-1 architecture:
- In-Depth Magic-1 Technical Analysis
- Magic-1 Signal Control and Interconnection Analysis
- Magic-1 Technical Architecture Specifications
- Magic-1 Complete Technical Specification
- Magic-1 architecture overview
- mcode_rec_t structure as defined in mcode.h
- Clocks
- Internal Busses
- Registers &-ALUs
- Architectural Verification Test Suite
- 24‐point summary of the Magic 1 computer architecture
- Unassigned resources
- Critical Technical Details for Magic‐1 Programmers Magic‐1 Instruction Set Reference
- Magic-1 Construction
- Schematics
- List of IC's / parts list - BOM
- Front Panel Logic card
- Memory card
- Device card
- Control Card
- Register/ALU card
- IDE interface: CF
- How to prepare a CF card with the system
- POST CODE displays
- EPROM daughter card (soon)
- Debugging Magic‐1 (soon)
- eprom programmer
- Null modem cable
- Ideas for the future
- Magic-1 instruction set
- Magic-1 system software
- Cross Development Environment Overview
- Minix FTP client
- assembler (m1_as), command: as
- linker (m1_ld), command: ld
- clcc is the Magic-1's C compiler, command: cc
- small C (compiler for a subset of C), command: scc
- NMH's Simple C Compiler, command: subc
- Generate ANSI C prototypes, command: proto
- Pascal, command: pascomp
- Debugger, command: adb
- dis.c - works as a disassembler for object files
- disassembler program (m1_dis)
- Tiny Basic, command: tbasic
- Magic-1 Boot Process
- Loading program (bootloader)
- Load map for bloader
- Magic-1 microcode
- Creating new software for Magic-1
- Examples: Processor Commands
- Examples: segfault (in C) on Magic‐1
- ANSI C Compiler (lcc)
- The assembler, "qas"
- fibonacci program
- Creating a new program under Magic-1
- Creating a new program for Magic-1 in the linux environment
- Modifying bootrom and adding new features (soon)
- LCC for Magic-1 retargeting lcc
- M1DEV
- Programming on Magic-1:
- Operating System
- Porting of Minix 2.0.4 system to Magic-1 architecture
- Programs available in the system
- Basic commands for Milo:
- Basic commands for Minix:
- fsck (disk tool)
- su
- adduser
- halt
- shutdown -h
- readclock
- date -s MMDDYYHHMM
- stat
- tstacks
- part (partition table editor)
- screendump
- update (periodically write the buffer cache to disk)
- intr (run a command with interrupts enabled)
- mknod (create a special file)
- Performance measurement
- Dhrystone
- Sieve of Eratosthenes - a prime number generator, command: sieve
- Configuration/Setup of Magic-1
- How to change the host name of your machine
- Serial Line Internet Protocol (SLIP)
- Create port forwarding rule on your Ubee EVW32C router
- Date and Time
- How to change port numbers for ftp and telnet
- Configure linux environment to create new programs for Magic-1
- How to change the setting so that Magic‐1 automatically boots with the network and RAM disk enabled
- Using Magic-1
- Front Panel of Magic-1
- Entering a program from using the front panel
- Telnet Telnet (windows) , linux (soon)
- Proper way to exit command line program
- Game's
- Eliza, (chatbot) command: eliza
- Photo gallery of Magic-1 computer
- Additional information requiring reorganization
- List of questions
- Source code analysis (software layer):
- Ideas and changes extending functionality, not a part of the original Magic-1:
- Analysis and Implementation of Magic-1 Bootloader Size Limitations
- Implementation of Test Bank and Diagnostic Microinstructions
- Double the microcode store from 512 to 1024 entries
- expanding the Magic‑1 microcode: proof‐of‑concept
- Practical implementation plan for the ideas for Magic‐1
- Magic-1 Bootloader Optimization Analysis (Tested and works)
- We can optimize
bloader.c
by utilizing Magic‐1's assembly instructions - Create a virtual machine with a C interpreter
- NEW
- Create assembly routines for performance-critical sections
- Use inline assembly in C code
- Use specialized Magic-1 instructions
- Using
memcopy
instruction for block data transfers - Direct use of
ldcode
/stcode
for memory access - Page table management
- Optimize register usage
- Loading sequence
- Implementing an Instruction Cache for Magic‐1
- Novel Magic-1 Optimization Techniques Based on Documented Architecture
- Additional Undocumented Magic-1 Features
- Comprehensive Analysis of Magic-1 Architecture and Bootloader
- Magic‐1 Page Table Flags
- Details for Magic‐1 Bootloader
- Using the Front Panel Switches in Magic‐1
- M1Emu
- Magic-1 Computer Architecture Layers
- Processor architecture (instructions, registers, operating modes)
- Memory mapping (how RAM, ROM, peripherals are addressed)
- How the bootloader is loaded and executed
- Microcode file format
- How microcode is loaded and interpreted by the processor
- Microcode specification (what instructions are supported, how they are decoded)
- Bootloader binary file format
- Hardware initialization procedure
- How to load the system from a CF card
- Runtime requirements (e.g. register settings, memory initialization)
- CF card interface specification (what commands are sent, how data is received)
- Communication protocol between the processor and the CF card
- Tools for debugging the code of the emulated processor.
- A set of tests to verify the correctness of the emulation
- Magic‐1 Computer Bootloader Analysis
- Magic‐1 Verilog Implementation
- Magic‐1 Emulator Technical Information (no GUI version)
- Magic‐1 CPU Instruction Set Overview