Giter Site home page Giter Site logo

masterq32 / spu-mark-ii Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 1.0 29.94 MB

CPU and home computer project

Home Page: https://ashet.computer/

License: MIT License

Zig 27.53% Assembly 2.74% VHDL 65.05% Makefile 0.68% Shell 0.14% C 0.27% JavaScript 1.21% CSS 0.45% Python 0.03% C++ 0.01% SourcePawn 0.14% Lua 1.75%
cpu spu-mark-ii assembler zig ziglang

spu-mark-ii's Introduction

The SPU Mark II Project

A project that focuses on the development and improvement of the SPU Mark II instruction set architecture.

Another focus is development and creation of a concrete implementation of the CPU in VHDL as well as building a small "home computer" around an FPGA board similar to other computers from the 80ies.

SPU Mark II

The SPU Mark II is a 16 bit RISCish cpu that uses the stack machine approach instead of a register machine approach.

The instrution set is documented in documentation/isa.md.

Short feature list:

  • Highly flexible instruction set
  • Conditional instructions instead of special conditional jumps or movs
  • Optional hardware multiplication/division units (WIP)
  • Optional interrupt handling (WIP)

To get a feel for the instruction set, here's a small example for a void puts(char*str) function:

puts:
	bpget ; function prologue
	spget
	bpset
	
	get 2 ; fetch arg 1
puts_loop:
	ld8 [i0:peek] [f:yes]
	[ex:nonzero] st8 0x4000     ; Use MMIO for text output
	[ex:nonzero] add 1
	[ex:nonzero] jmp puts_loop
	pop

	bpget ; function epilogue
	spset
	bpset
	ret

Ashet Home Computer

The Ashet Home Computer is a computer built on top of the SPU Mark II cpu and provides a small environment to use the cpu.

Planned Features

  • MMU
  • Video Output (either FBAS or VGA)
  • Audio Output (signed 16 bit PCM)
  • SD Card Storage
  • Keyboard Interface
  • Joystick Port (C64 style)
  • UART interface

Current Memory Map

Note that this memory map right now does not utilize the MMU, so bus width is 16 bit.

Range Function
0x00000x3FFF Builtin ROM
0x40000x4FFF UART Interface
0x60000x60FF 256 byte fast RAM
0x61000x7FFF Unmapped
0x80000xFFFF 32k byte slow RAM

spu-mark-ii's People

Contributors

20kdc avatar dependabot[bot] avatar i-am-linja avatar ikskuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

icodein

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.