Pyromaniac

Resources

Resources

Documentation

2022Pyromaniac documentation

[zip]
Download

Documentation for the Pyromaniac system is available as links on this site, but can also be downloaded here in a zip.

Updated for 2022.

2022API documentation

[zip]
Download

A few of the API changes are documented. Mostly the OS works as you would expect, so there's little need to provide additional documentation.

Updated for 2022.

Diagrams

A number of diagrams were created about Pyromaniac and for use with it. Some of these diagrams are included here.

2020Architecture diagram

[Image]
(Full size image)

2020Execution flow chart

[Image]
(Full size image)

2020Key reading flow chart

[Image]
(Full size image)

2020Input buffer reading flow chart

[Image]
(Full size image)

2020Escape key handling flow chart

[Image]
(Full size image)

2020Docker image layering

[Image]
(Full size image)

2022Graphics implementation layering

[Image]
(Full size image)

2022PyromaniacGit basic implementation

[Image]
(Full size image)

2022PyromaniacGit authentication implementation

[Image]
(Full size image)

Example code

There are a few examples of code from within Pyromaniac here, to show how it's structured and what it looks like.

2020TWIN module

[python]
Download code

This is the actual implementation of TWIN inside Pyromaniac. TWIN is a module which provides an editor for BASIC programs. There's really no point in implementing a whole other editor, when an existing editor will do as well - so that's all that this implementation does. It is configured to just invoke another tool on the in-memory data.

[Show/hide source]

2020IIC module

[python]
Download code

The I²C bus is a hardware bus that allows you to communicate with addressable devices. On the RiscPC this was used to communicate with the hardware clock and provide some non-volatile memory, used for configuration. Clients should communicate with it through the IIC module.

This is the Pyromaniac implementation of the IIC module and the PCF8583 chip which provided the NVRAM and clock functions. It's one of the earliest modules I implemented, but it's actually about right. The I²C bus is implemented as a set of registered handlers which can be dispatched to - creating a new I²C device is a simple matter of registering a function to handle an address with a decorator. Other I²C devices could be registered in other files, and would appear on the bus when queried.

The PCF8583 is actually implemented inside a resource, because then it can hold state - which is what you'd expect from a piece of hardware - and can be located easily.

[Show/hide source]

2020SoundSystem prototype

[Asciinema!]
(Asciinema)

Jason Tribbeck did a presentation in October 2020 for the work his was doing on the audio APIs. During the talk, I had a look at the documentation and - to help myself understand it - started writing a simple implementation using it. This gave me a better understanding of what was intended, and some (hopefully) useful freeback on the design.

I sent this short recording of the SoundSystem and SoundPyromaniac modules initialising and registering to Jason. Debug has been enabled for both the SoundSystem and services, so that it's easy to see the initialisation process and the services that are issued and responded to as a part of that.

[python]
Download code

I only spent about 3 hours on it, so all I managed to get done was a registration interface and a module that would use it - there's actually no sound handling going on at all. But this was part of the reason for building Pyromaniac. It allows a rapid prototype to be built to see how things would fit together.

The code here shows some of what you can do in a few hours.

[Show/hide source]

2021VNC graphics implementation

[python]
Download code

This is the actual implementation of the VNC graphics implementation inside Pyromaniac. The VNC implementation is based on the supplied Cairo implementation, and uses the cairo-vnc modules I created and open sourced separately. The code is only about 300 lines long - that's all you need to provide a variant of an existing graphics implementation.

[Show/hide source]