All Projects → gberthou → AdvanceOS

gberthou / AdvanceOS

Licence: GPL-3.0 license
Tiny Operating System to emulate GBA on Raspberry Pi

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects
Makefile
30231 projects
Lex
420 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to AdvanceOS

crowbar-core
Core deployment for Crowbar
Stars: ✭ 16 (-65.22%)
Mutual labels:  bare-metal
piugba
🎮 PIU emulator for the GBA 🎮
Stars: ✭ 43 (-6.52%)
Mutual labels:  gba
seedbox
Baremetal CoreOS cluster provisioner with web UI
Stars: ✭ 23 (-50%)
Mutual labels:  bare-metal
kalman-estimator
kalman-estimator - a Kalman estimator in C++
Stars: ✭ 22 (-52.17%)
Mutual labels:  bare-metal
elfloader
ARMv7M ELF loader
Stars: ✭ 71 (+54.35%)
Mutual labels:  bare-metal
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (-65.22%)
Mutual labels:  bare-metal
Mgba
mGBA Game Boy Advance Emulator
Stars: ✭ 3,355 (+7193.48%)
Mutual labels:  gba
magia
magia is a toy GBA emulator written in golang.
Stars: ✭ 432 (+839.13%)
Mutual labels:  gba
terraform-metal-kubernetes-bgp
Kubernetes on Equinix Metal using Calico and MetalLB
Stars: ✭ 110 (+139.13%)
Mutual labels:  bare-metal
bareDOOM
DOOM ported to run within the barebox bootloader
Stars: ✭ 57 (+23.91%)
Mutual labels:  bare-metal
register-rs
Unified interface for type-safe MMIO and CPU register access in Rust
Stars: ✭ 48 (+4.35%)
Mutual labels:  bare-metal
mini-lab
a small, virtual setup to locally run the metal-stack
Stars: ✭ 50 (+8.7%)
Mutual labels:  bare-metal
libconfini
Yet another INI parser
Stars: ✭ 106 (+130.43%)
Mutual labels:  bare-metal
OptimeGBA
Optime GBA - Nintendo Game Boy Advance (and WIP Nintendo DS) emulator, written in C# with .NET Core.
Stars: ✭ 87 (+89.13%)
Mutual labels:  gba
derzforth
Bare-metal Forth implementation for RISC-V
Stars: ✭ 25 (-45.65%)
Mutual labels:  bare-metal
luvdis
Pure-Python Game Boy Advance Disassembler
Stars: ✭ 27 (-41.3%)
Mutual labels:  gba
raspberry-pi
Raspberry Pi distribution of Alpha
Stars: ✭ 39 (-15.22%)
Mutual labels:  bare-metal
armv8-bare-metal
No description or website provided.
Stars: ✭ 72 (+56.52%)
Mutual labels:  bare-metal
gba-remote-play
Stream Raspberry Pi games to a GBA via Link Cable
Stars: ✭ 356 (+673.91%)
Mutual labels:  gba
oneview-sdk-ruby
This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Golang and Python.
Stars: ✭ 13 (-71.74%)
Mutual labels:  bare-metal

AdvanceOS

A tiny Operating System that emulates GBA on Raspberry Pi.

Principle

GBA has an ARM7TDMI processor and the processor of Raspberry Pi is ARM1176JZF-S. The ARM7 instruction sets (ARM and thumb) are compatible with the ARM11 ones. Hence no instruction decoding is required to simulate the instructions sets. Special registers such as CPSR have the same bit fields so pre-editing the binaries to execute can be avoided.

Preview

Console demo

Snake homebrew

How to install and run

Installation

  1. Clone this repo
  2. run make build

Compiling the kernel

Command to build a kernel that runs on Raspberry Pi

Simply run make

Command to build a kernel that is compatible with qemu [deprecated]

The aforementionned version of qemu does not support USB features of BCM2835 so it is mandatory to disable USB. In order to compile that kernel version, run make qemu-compatible DEFINES=-DNO_USB

Running the kernel on Raspberry Pi hardware

Prepare the SD card

If your SD card already contains a valid Raspberry Pi system, you can ignore this step.

First, erase its partitions and create a one that supports vfat, for instance using fdisk. Then format it as vfat using mkfs.vfat. Clone the officiel Raspberry Pi firmware somewhere into your computer, not on the SD card, and copy only the contents of the boot folder onto your partition. Finally, remove all kernel*.img from your SD card, and don't forget to create a config.txt adapted to your display. There is an example of config.txt file in the configs subdirectory of this repo.

Copy the kernel image

Put the generated kernel.img into your SD card. If your SD card has several partitions, choose the boot partition alongside Raspberry Pi's firmware files.

Debugging the kernel on the computer (requires qemu)

  1. Change directory to ./qemu
  2. Run ./run-emu.sh in a terminal
  3. Run ./run-gdb.sh in another terminal

Currently, qemu and gdb communicate through port 2222. If you have another application that uses this port, you can edit run-emu.sh and .gdbinit to change the remote port.

Features

  1. Use of MMU
  • Memory map to recreate the GBA memory environment
  • Traps on attempts to write to GBA peripherals memory
  1. GBA Peripherals
  • LCD (backgrounds and sprites, no rotation/scaling)
  • Keypad (user polling only)
  • Timers
  • DMA
  • IRQ management

Branch overview

This repo contains several branches. Everything on master branch belongs to the current version of the project. Other branches show alternative experimental potential improvements:

  1. instructiondecoding: replaces the two-stage data fault handler with a lighter one-stage handler. It relies on assumptions about the faulting instructions (only STRx instructions should be used). System performance is better using this solution, but as it is not fully tested (user code might use hacks with stack pointer and STMx instructions that are not yet supported for example) it is not yet merged into master.
  2. fulldma: uses Raspberry Pi DMA to perform memory copies and fills to increase system performance, mainly in framebuffer operations.

Additional informations

GBA files that are located in the resource folder are compiled from the devkitARM GBA examples. If you are interested in GBA development, there is more information about how to setup devkitARM environment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].