Documentation ¶
Overview ¶
Package risc implements emulation of the Project Oberon RISC processor.
Index ¶
- Constants
- type Clipboard
- type Error
- type Framebuffer
- type LED
- type RISC
- func (r *RISC) ConfigureMemory(megabytesRAM, screenWidth, screenHeight int)
- func (r *RISC) Framebuffer() *Framebuffer
- func (r *RISC) GetFramebufferDamageAndReset() image.Rectangle
- func (r *RISC) KeyboardInput(ps2commands []byte)
- func (r *RISC) MouseButton(button int, down bool)
- func (r *RISC) MouseMoved(x, y int)
- func (r *RISC) Reset()
- func (r *RISC) Run(cycles int) error
- func (r *RISC) SetClipboard(c Clipboard)
- func (r *RISC) SetLEDs(l LED)
- func (r *RISC) SetSPI(index int, spi SPI)
- func (r *RISC) SetSerial(s Serial)
- func (r *RISC) SetSwitches(s int)
- func (r *RISC) SetTime(millis uint32)
- type SPI
- type Serial
Constants ¶
View Source
const ( FramebufferWidth = 1024 FramebufferHeight = 768 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Framebuffer ¶
func (*Framebuffer) Bounds ¶
func (fb *Framebuffer) Bounds() image.Rectangle
func (*Framebuffer) ColorModel ¶
func (fb *Framebuffer) ColorModel() color.Model
func (*Framebuffer) PixOffset ¶
func (fb *Framebuffer) PixOffset(x, y int) (i, bit int)
PixOffset is a helper method to locate a pixel in the Pix slice. It returns the index in Pix for the pixel at coordinates (x, y) and the bit position of the pixel within the word, i.e. the pixel value can be isolated with (fb.Pix[i]>>bit)&1.
The coordinates (x, y) are interpreted as image coordinates with the origin (0, 0) at the top left.
type RISC ¶
type RISC struct { PC uint32 // Program counter R [16]uint32 // General registers R0..R15 H uint32 // Auxiliary register for high 32 bits of multiplication or remainder of division Z bool // Zero flag N bool // Negative flag C bool // Carry flag V bool // Overflow flag Mem []uint32 // Memory // contains filtered or unexported fields }
func (*RISC) ConfigureMemory ¶
func (*RISC) Framebuffer ¶
func (r *RISC) Framebuffer() *Framebuffer
func (*RISC) GetFramebufferDamageAndReset ¶
func (*RISC) KeyboardInput ¶
func (*RISC) MouseButton ¶
func (*RISC) MouseMoved ¶
func (*RISC) SetClipboard ¶
func (*RISC) SetSwitches ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
fp
Package fp implements floating-point arithmetic operations for the Oberon RISC emulator.
|
Package fp implements floating-point arithmetic operations for the Oberon RISC emulator. |
fp/test/numbers
Command numbers generates a Go file containing a slice of uint32 numbers as test input for the Oberon RISC emulator's floating-point arithmetic operations.
|
Command numbers generates a Go file containing a slice of uint32 numbers as test input for the Oberon RISC emulator's floating-point arithmetic operations. |
fp/test/v2go
Command v2go translates Verilog source code to Go.
|
Command v2go translates Verilog source code to Go. |
Click to show internal directories.
Click to hide internal directories.