From eac6941e10aac43abec7416976bc383b14c6021c Mon Sep 17 00:00:00 2001 From: JetSetIlly Date: Sun, 25 Jul 2021 18:22:53 +0100 Subject: [PATCH] Updated README and ran lint fixes --- README.md | 5 +++-- debugger/debugger.go | 10 +++++----- gui/requests.go | 2 +- gui/sdlimgui/lazyvalues/lazy.go | 2 +- hardware/memory/cartridge/harmony/arm7tdmi/arm7.go | 9 ++++----- hardware/memory/cartridge/harmony/arm7tdmi/cycles.go | 8 ++++---- hardware/memory/cartridge/harmony/arm7tdmi/disasm.go | 4 ++-- hardware/tia/video/player.go | 2 +- playmode/play.go | 10 +++++----- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index fba198c34..205896b0c 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ Although if want to pass flags to the run mode you'll need to specify it. ## Hand Controllers -Stick, paddle and keyboard inputs are supported. Currently, only sitck and +Stick, paddle and keyboard inputs are supported. Currently, only stick and paddles for the left player are available but keyboard input is available for both players. @@ -250,7 +250,8 @@ In playmode, the additional keys are available: In the debugger, the additional keys are available: * `ESC` toggle mouse capture for debugging TV screen -* ` (backtick) start/stop emulation + +The `Pause` key will toggle pausing in both playmode and in the debugger ### Screenshots diff --git a/debugger/debugger.go b/debugger/debugger.go index bba9af839..58b7e50e2 100644 --- a/debugger/debugger.go +++ b/debugger/debugger.go @@ -264,27 +264,27 @@ func NewDebugger(tv *television.Television, scr gui.GUI, term terminal.Terminal, return dbg, nil } -// VCS implementes the emulation.Emulation interface. +// VCS implements the emulation.Emulation interface. func (dbg *Debugger) VCS() emulation.VCS { return dbg.vcs } -// Debugger implementes the emulation.Emulation interface. +// Debugger implements the emulation.Emulation interface. func (dbg *Debugger) Debugger() emulation.Debugger { return dbg } -// UserInput implementes the emulation.Emulation interface. +// UserInput implements the emulation.Emulation interface. func (dbg *Debugger) UserInput() chan userinput.Event { return dbg.events.UserInput } -// State implementes the emulation.Emulation interface. +// State implements the emulation.Emulation interface. func (dbg *Debugger) State() emulation.State { return dbg.state } -// Pause implementes the emulation.Emulation interface. +// Pause implements the emulation.Emulation interface. func (dbg *Debugger) Pause(set bool) { if set { dbg.state = emulation.Paused diff --git a/gui/requests.go b/gui/requests.go index 56ead6a9e..63b4dc2cc 100644 --- a/gui/requests.go +++ b/gui/requests.go @@ -39,7 +39,7 @@ type PlusROMFirstInstallation struct { // Note that, like the name suggests, these are requests, they may or may not // be satisfied depending other conditions in the GUI. const ( - // set the underlying emulation for the gui + // set the underlying emulation for the gui. ReqSetEmulation FeatureReq = "ReqSetEmulation" // emulation.Emulation // notify GUI of emulation state. the GUI should use this to alter how diff --git a/gui/sdlimgui/lazyvalues/lazy.go b/gui/sdlimgui/lazyvalues/lazy.go index a4746a14c..1b07fd4bb 100644 --- a/gui/sdlimgui/lazyvalues/lazy.go +++ b/gui/sdlimgui/lazyvalues/lazy.go @@ -96,7 +96,7 @@ func NewLazyValues() *LazyValues { } // SetEmulationState makes sure the lazy system can respond to an emulation in -// a parituclar state. +// a particular state. func (val *LazyValues) SetEmulationState(state emulation.State) { switch state { case emulation.Initialising: diff --git a/hardware/memory/cartridge/harmony/arm7tdmi/arm7.go b/hardware/memory/cartridge/harmony/arm7tdmi/arm7.go index 4e69e5506..ab66a3cc7 100644 --- a/hardware/memory/cartridge/harmony/arm7tdmi/arm7.go +++ b/hardware/memory/cartridge/harmony/arm7tdmi/arm7.go @@ -145,7 +145,7 @@ type ARM struct { // rather than call the cycle counting functions directly, we assign the // functions to these fields. in this way, we can use stubs when executing - // in immediate mode (when cycle counting isn't necesary) + // in immediate mode (when cycle counting isn't necessary) // // other aspects of cycle counting are not expensive and can remain Icycle func() @@ -158,11 +158,11 @@ type disasmLevel int const ( disasmNone disasmLevel = iota - // update entry only if the UpdateExecution is true + // update entry only if the UpdateExecution is true. disasmUpdateOnly // update all disassembly fields (operator, operands, etc.). this doesn't - // need to happen unless the entry is not in the disasm cache + // need to happen unless the entry is not in the disasm cache. disasmFull ) @@ -674,7 +674,7 @@ func (arm *ARM) Run(mamcr uint32) (uint32, float32, error) { arm.Scycle(prefetch, arm.registers[rPC]) } - // default to an S cycle for prefetch unless an instruction explicitely + // default to an S cycle for prefetch unless an instruction explicitly // says otherwise arm.prefetchCycle = S @@ -2193,7 +2193,6 @@ func (arm *ARM) executeConditionalBranch(opcode uint16) { } case disasmNone: } - } func (arm *ARM) executeSoftwareInterrupt(opcode uint16) { diff --git a/hardware/memory/cartridge/harmony/arm7tdmi/cycles.go b/hardware/memory/cartridge/harmony/arm7tdmi/cycles.go index 24b54d3d4..6e37c3381 100644 --- a/hardware/memory/cartridge/harmony/arm7tdmi/cycles.go +++ b/hardware/memory/cartridge/harmony/arm7tdmi/cycles.go @@ -56,7 +56,7 @@ const ( BranchTrailFlushed ) -// the bus activity during a cycle +// the bus activity during a cycle. type busAccess int const ( @@ -72,7 +72,7 @@ func (bt busAccess) isDataAccess() bool { return bt == dataRead || bt == dataWrite } -// the type of cycle being executed +// the type of cycle being executed. type cycleType rune const ( @@ -248,14 +248,14 @@ func (arm *ARM) nCycle(bus busAccess, addr uint32) { } } -// called whenever PC changes unexpectedly (by a branch instruction for example) +// called whenever PC changes unexpectedly (by a branch instruction for example). func (arm *ARM) fillPipeline() { arm.Ncycle(branch, arm.registers[rPC]) arm.Scycle(prefetch, arm.registers[rPC]+2) } // the cycle profile for store register type instructions is funky enough to -// need a specialist function +// need a specialist function. func (arm *ARM) storeRegisterCycles(addr uint32) { arm.Ncycle(dataWrite, addr) arm.prefetchCycle = N diff --git a/hardware/memory/cartridge/harmony/arm7tdmi/disasm.go b/hardware/memory/cartridge/harmony/arm7tdmi/disasm.go index d933a4fd0..68672673b 100644 --- a/hardware/memory/cartridge/harmony/arm7tdmi/disasm.go +++ b/hardware/memory/cartridge/harmony/arm7tdmi/disasm.go @@ -40,7 +40,7 @@ type DisasmEntry struct { CyclesSequence string } -// Key implements the CartCoProcDisasmEntry interface +// Key implements the CartCoProcDisasmEntry interface. func (e DisasmEntry) Key() string { return e.Address } @@ -71,7 +71,7 @@ func (s DisasmSummary) String() string { return fmt.Sprintf("N: %d I: %d S: %d", s.N, s.I, s.S) } -// add cycle order information to summary +// add cycle order information to summary. func (s *DisasmSummary) add(c cycleOrder) { for i := 0; i < c.idx; i++ { switch c.queue[i] { diff --git a/hardware/tia/video/player.go b/hardware/tia/video/player.go index 14707c244..e62c582b7 100644 --- a/hardware/tia/video/player.go +++ b/hardware/tia/video/player.go @@ -500,7 +500,7 @@ func (ps *PlayerSprite) resetPosition() { } else if ps.tia.hmove.Latch { // HMOVE has been activated this scanline but not currently rippling. // - // maybe surprisingly, this is comparitively unusual. many ROMs if + // maybe surprisingly, this is comparatively unusual. many ROMs if // the reset the player during the HBLANK at all will have called // HMOVE straight after the WSYNC, as advised by the Stella // Programmer's Guide. diff --git a/playmode/play.go b/playmode/play.go index 7df1646d4..70510b265 100644 --- a/playmode/play.go +++ b/playmode/play.go @@ -53,27 +53,27 @@ type playmode struct { rawEvents chan func() } -// VCS implementes the emulation.Emulation interface. +// VCS implements the emulation.Emulation interface. func (pl *playmode) VCS() emulation.VCS { return pl.vcs } -// Debugger implementes the emulation.Emulation interface. +// Debugger implements the emulation.Emulation interface. func (pl *playmode) Debugger() emulation.Debugger { return nil } -// UserInput implementes the emulation.Emulation interface. +// UserInput implements the emulation.Emulation interface. func (pl *playmode) UserInput() chan userinput.Event { return pl.userinput } -// State implementes the emulation.Emulation interface. +// State implements the emulation.Emulation interface. func (pl *playmode) State() emulation.State { return pl.state } -// Pause implementes the emulation.Emulation interface. +// Pause implements the emulation.Emulation interface. func (pl *playmode) Pause(set bool) { if set { pl.state = emulation.Paused