The system is based around an 8051 microcontroller with 128K of external RAM and 4Mb serial flash memory. It has a 256 by 256 pixel display.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
This schematic shows the video signal generator. I've omitted power supply, reset etc... from this diagram and only shown the specifics. The source code for the PIC is available here.
This schematic shows how the 8031 is booted using a PIC to inject a short bootstrap program (up to 256 bytes) into the RAM. The PIC holds the 8031 in reset and controls the bus. It takes A8-A15 low. To write each byte into RAM it then uses the demultiplexing 373 to set the address to program, puts data onto the bus, and lowers the /WR pin.
Also shown in this schematic is the logic that maps the 128K RAM to the 8031 address spaces. Program memory read accesses using /PSEN always fetch from the lower 64K of the RAM. When P1.1 on the 8031 is low, data memory accesses using the MOVX instructions also use the lower 64K. When P1.1 is high, data memory accesses use the upper 64K.
I've added a link to GitHub from this project - I'll add all of the source code there in due course. At the moment it only contains the 8051 and PIC assembly language programs used for booting. Currently the boot program that the PIC injects into the RAM checks the state of pin P1.0 on the 8031, and depending on whether that pin is high or low (set using a jumper), it either loads a program from the first few sectors in the external serial flash (not shown in the schematic above) into program memory and executes it, or it downloads a program via the UART and executes that.
This system has an OS and language developed from scratch. I have tried to make both as simple as possible, while still being useful. The language (called MC) borrows heavily from C and Forth. It is easier to parse than C. It uses stack based semantics for expression evaluation and function call / return. The compiler does a few simple optimisations. The compiler source code is 2300 lines of C, I'm currently in the process of rewriting the compiler in MC so that I can compile programs on the 8051 system.
The OS has a flat file system and a simple shell that supports passing arguments to programs and input/output redirection. The OS is currently about 1300 lines of assembly language and 1000 lines of MC.
Regardless of any future developments and increases in complexity of the OS and language, I intend to always retain a minimalistic version, always less than 10000 lines of code.
Below is a photo showing examples of MC code.
Create an account to leave a comment. Already have an account? Log In.
Could you please provide a schematic/block diagram? I am interested in how you boot the 8031 without a ROM.
Hi, I've added a log entry with a schematic of the part of the circuit that does that.
Thanks for providing the schematic diagram; I had a hunch that a microcontroller was needed.
Aaah... Forth+C :) I love it!
Haven't worked on my own adaptation of the same for a while, but you are inspiring me to have another look at it later
Very instresting project! I'm currently trying to build a self-host computer with a Z80 CPU (and discovered that the Z80 assembly sucks). Please post more about it!
Become a member to follow this project and never miss any updates
Video generator schematic posted. (Hackaday IO reply control doesn't work on the device I'm writing this on).