Skip to content

An RM Nimbus-inspired Ebiten extension for building retro apps and games in Go.

License

Notifications You must be signed in to change notification settings

adamstimb/nimgobus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nimgobus

An RM Nimbus-inspired Ebiten extension for building retro apps and games in Go.

Nimgobus is a tribute project and is in no way linked to or endorsed by RM plc.

About

Nimgobus is an extension of the Ebiten game engine. It mimicks the unique 16-bit text, graphics and sound drivers of the RM Nimbus PC186, found in classrooms all over the UK in the 1980s and early 90s. With Nimgobus you can develop Go applications that have the beautiful look and feel of classic Nimbus software such as PaintSPA, Ourfacts and Caxton Press. However, it is not an emulation of the Nimbus itself. This means you get the best of both worlds:

  • Cutting-edge Go computing power, beautifully presented in up to 16 colours
  • Build for Linux, Windows and macOS
  • Mileage may vary on mobile platforms.
  • Unfortunately WebASM cannot be targeted due to its lack of multithreading support.

Usage

Nimgobus generates a screen image that can be embedded in an Ebiten application. First add Nimgobus to your Game struct:

type Game struct {
	count           int
	// ...
	nimgobus.Nimbus // Embed the Nimbus in the Game struct
}

In your NewGame() function, initialize the Nimbus before sending any commands to it:

func NewGame() *Game {
	game := &Game{}
	// ...
	game.Init() // Initialize Nimgobus
	return game
}

In the Update() function add a call to update the Nimbus monitor screen:

func (g *Game) Update() error {
	// ...
	g.Nimbus.Update() // Update the app on all subsequent iterations
	// ...
	return nil
}

The Nimbus screen can be retrieved like this:

img := g.Monitor

And commands sent like this:

g.Subbios.TGraphicsOutput.FGraphicsOutputColdStart() // Start the graphics system
g.Subbios.TGraphicsOutput.FPlotCharacterString(0, 1, 2, 13, 0, "Hello there!", 0, 0) // Say hello

API

Nimgobus is implemented with an API similar to the original Nimbus SUBBIOS which received function calls to the dedicated Nimbus IO drivers as CPU interrupts, with the parameters stored in various registers. For the sake of simplicity Nimgobus uses conventional Go function arguments and return values. Furthermore, the SUBBIOS includes a light implementation of an old-skool stdio C library for sending text data to the screen and receiving keyboard input.

Acknowledgements

Shouts out to the following for their help and advice:

Darren Smith, Tim Nuttal (formely RM, SPA), Tim Pearson (RM co-founder)

Links