Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Makefile
README.md Added example frontend Sep 16, 2018
go.mod Added example frontend Sep 16, 2018
go.sum Added example frontend Sep 16, 2018
main.go
noop_store.go Added example frontend Sep 16, 2018
terminal.png Added example frontend Sep 16, 2018
terminal_io.go

README.md

This is an example of how to write a frontend for the emulator.

It uses tcell to render the screen to your terminal and handle keyboard input. It requires a terminal with 256 colour support (haven't tested it on others).

You will probably want to adjust your terminals font settings and vertical character spacing as the screen will probably scroll off the end of your terminal window.

screenshot

How to run

go run . <path-to-rom-file>

Note: Pressing Esc will quit the application

Overview of files

terminal_io.go

Sets up the IO related stuff to handle screen drawing and keyboard updates.

In this particular case we are rendering to the terminal.

noop_store.go

Sets up a no-op battery save store. You can change this to write to a filesystem or other storage medium, but for this example it just does nothing.

main.go

Glues everything together and runs the application