Skip to content

Sas2k/Micro80

Repository files navigation

📺 Micro80

Status GitHub Issues GitHub Pull Requests License

A 16-bit Console that **never** existed.

📝 Table of Contents

🧐 About

An Emulator for a 16-bit Console that never existed.

The Micro80 is a 16-bit Console with 9 Registers, 128Kib of Main Memory and a 128x128 Graphics Display.

To find out about on how to Contribute to the Project, Check out the Contributing.md File.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and Running Purposes. See deployment for notes on how to deploy the project on a live system.

✨ Features

  • 16-bit CPU with 9 registers
  • 128Kib of Main Memory.
  • 16-bit Graphics with 128x128 Resolution.
  • 74 Instructions.

📃 To-Do

  • Make Character-Maps for the Graphics Display.
  • Add Inputs.
  • Add Sound Chips.
  • Create a High-Level Language to Code in.
  • Bring up the Clock Speed
  • Create a Documentation.

Prerequisites

  • Python 3.10 or higher
  • Cython
  • PySDL2
  • Virtualenv (Optional)
  • Black (Code Formatting/Styling)

Installing

A how-to guide that will help you get started with the project.

First off, Clone the repository on to your local machine.

git clone <http-repo-url>

then, navigate to the directory and create a virtual environment.

cd Micro80
python -m virtualenv venv

Activate the virtual environment

source venv/bin/activate #for linux
.\venv\Scripts\activate #for windows

Install the required packages

pip install -r requirements.txt

Then, the project is Set-Up.

If the *.pyd files are not present, or if you done any changes to the code. please build it using the following commands

python setup.py build_ext --inplace

Then, change the file names to have name.pyd MainMemory.cp310-win_amd64.pyd to MainMemory.pyd

🎈 Usage

Here is a simple example on how to run the project.

first create a main.asm80 file with the following code.

; main.asm80 <- this is a comment
WAdr 0x4400
WDir 0x0005 ; Go to Address 0x4400 (in variables) and set the value to 5
WAdr 0x4401
WDir 0x0006 ; Go to Address 0x4401 (in variables) and set the value to 6

LDA 0x4400 ; Load the value at 0x4400 into the Accumulator
ADD 0x4401 ; Add the value at 0x4401 to the Accumulator
STA 0x4402 ; Store the value in the Accumulator to 0x4402

HLT ; Halt the CPU

then, Assemble it to a ROM file.

python -m Micro90.Assembler -i main.asm80

Then, run in debug mode. to See changes in the memory and the CPU.

python -m Micro80 -f main.rom.m80 -d

And that's it! You have a simple program running on the Micro80 Emulator.

To find out more on the language (for now...) check out the Instructions.txt in the Main Folder and the Assembly Codes in the Assembly-Programs Folder.

⛏️ Built Using

✍️ Authors

  • @Sas2k - Idea & Initial work

See also the list of contributors who participated in this project.

Releases

No releases published

Packages

No packages published