Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/conorarmstrong/zx_go
/ functions
Functions
5,503 in github.com/conorarmstrong/zx_go
⨍
Functions
5,503
◇
Types & classes
458
↓ 8 callers
Method
popBeeperSamples
popBeeperSamples drains up to len(out) samples from the ring buffer into out. Any unfilled slots continue from the last delivered sample and then deca
pkg/audio/audio.go:220
↓ 8 callers
Method
push
Stack operations
pkg/z80/z80.go:3851
↓ 8 callers
Function
screenHash
screenHash returns a digest of the rendered frame, so a test can detect that the display changed (e.g. after typing or running a program).
pkg/sam/integration_test.go:13
↓ 8 callers
Function
sectorLength
sectorLength returns the byte length of a sector with size code n (µPD765 "N" parameter). Real floppies cap sector sizes at 128 << 8 = 32 KB; attacker
pkg/plus3fdc/track.go:134
↓ 8 callers
Method
selectROM
selectROM sets the ROM page based on the current port values. +2A / +3 / Next models combine 7FFD bit 4 (low bit) with 1FFD bit 2 (high bit) for a ful
pkg/memory/memory.go:1941
↓ 8 callers
Function
setBC
setBC returns a setup that primes BC so block-op repeat vs final paths can be selected. Points HL/DE at writable high RAM so the copy doesn't fault.
pkg/z80/z80n_timing_test.go:95
↓ 8 callers
Method
setRegister8
(reg int, val byte)
pkg/z80/z80.go:4113
↓ 8 callers
Method
setStatus
(s string, isErr bool)
pkg/debugger/timetravel_widget.go:169
↓ 8 callers
Method
start
start: SDA high->low while SCL high.
pkg/next/rtc/i2c_test.go:16
↓ 8 callers
Function
toFAT83
toFAT83 coerces a host filename to a FAT 8.3 short name. Uppercase ASCII only; everything else becomes '_'. Length truncated to 8 base + 3 ext.
pkg/next/sdcard/fat16.go:483
↓ 8 callers
Method
writePortInternal
writePortInternal is the original WritePort body. It contains the early-return cascade for each port family. Kept as a separate function so the public
pkg/ula/ula.go:1348
↓ 7 callers
Method
AddPostFetchHook
AddPostFetchHook is the post-fetch analogue of AddPreFetchHook.
pkg/z80/z80.go:1048
↓ 7 callers
Method
AddRecent
AddRecent prepends path to RecentFiles. Existing entries are deduplicated and the list is capped at MaxRecentFiles.
pkg/config/config.go:108
↓ 7 callers
Method
Cartridge
Cartridge returns the cartridge currently in microdrive slot `which` (0-based), or nil if the slot is empty or out of range. Convenience accessor so c
pkg/if1/if1.go:145
↓ 7 callers
Method
CheckBreakpoint
CheckBreakpoint fires for the visual debugger's bp set. Matches the telnet evaluator: optional ROM-bank filter + optional guard condition. Returns tru
pkg/debugger/debugger.go:409
↓ 7 callers
Function
DownloadNextROMs
DownloadNextROMs fetches the distro zip from url using client (pass nil for http.DefaultClient), then: - installs machines/next/enNextZX.rom and enNx
pkg/next/install/download.go:71
↓ 7 callers
Method
ExecuteRZXFrame
ExecuteRZXFrame runs the CPU until it has executed exactly `instructions` opcode fetches relative to the count at entry, then fires an end-of-frame in
pkg/z80/z80.go:675
↓ 7 callers
Method
FormatLine
FormatLine produces a one-line description suitable for the list-watches / visual panel.
pkg/debugger/regwatch.go:32
↓ 7 callers
Method
GetKeyStatus
GetKeyStatus returns a human-readable status of special keys
pkg/keyboard/keyboard.go:499
↓ 7 callers
Method
GetMultiface
GetMultiface returns the Multiface interface (if enabled)
pkg/peripherals/manager.go:666
↓ 7 callers
Method
GetROM
GetROM returns the data for a specific ROM type
pkg/roms/rom_manager.go:228
↓ 7 callers
Method
GetVariant
GetVariant returns the Multiface variant
pkg/multiface/multiface.go:325
↓ 7 callers
Method
HandleMemoryRead
HandleMemoryRead handles memory reads that might be intercepted by peripherals
pkg/peripherals/manager.go:550
↓ 7 callers
Method
HandleOpcodeRead
HandleOpcodeRead handles opcode fetch that might trigger ROM paging
pkg/multiface/multiface.go:181
↓ 7 callers
Method
Handles
(port uint16)
pkg/ula/ula.go:369
↓ 7 callers
Method
HasROM
HasROM reports whether a valid IF1 ROM has been loaded. The IF1 can't usefully activate without one — without the shadow ROM, none of the BASIC extens
pkg/if1/if1.go:82
↓ 7 callers
Method
HookFunc
HookFunc returns a pre-fetch callback that, when registered via cpu.AddPreFetchHook, fires the esxDOS dispatcher exactly when PC reaches $0008 AND the
pkg/next/esxdos/esxdos.go:289
↓ 7 callers
Method
IsInterface1Enabled
IsInterface1Enabled reports whether the Interface 1 is currently active.
pkg/peripherals/manager.go:314
↓ 7 callers
Method
Level
Level returns the current 8-bit level for the given channel. Channels outside ChannelA..ChannelD return 0.
pkg/next/dac/dac.go:94
↓ 7 callers
Method
LineWidth
LineWidth returns the active framebuffer width in pixels for the current resolution (256, 320 or 640).
pkg/next/layer2/layer2.go:235
↓ 7 callers
Method
LoadROM
LoadROM reads an 8 KB Interface 1 ROM image from disk. The standard distribution is `if1-2.rom` (Edition 2 of the IF1 ROM), the same file FUSE expects
pkg/if1/if1.go:59
↓ 7 callers
Method
Lookup
Lookup returns the entry at pc, lock-free. Safe to call from the CPU hot path.
pkg/debugger/bpset.go:39
↓ 7 callers
Function
New
New returns a fresh Palette with every entry at 0 (black).
pkg/next/palette/palette.go:31
↓ 7 callers
Function
New
New builds a SAM machine from the two 16 KB ROM halves. z80.New resets the CPU (PC=$0000, ROM0 paged in) and the SAM frame interrupt is armed.
pkg/sam/sam.go:61
↓ 7 callers
Function
NewBreakpointSet
NewBreakpointSet returns an empty shared breakpoint set.
pkg/debugger/bpset.go:30
↓ 7 callers
Function
NewJSONEmitter
NewJSONEmitter wraps w. The encoder is configured with no indentation (so each event is exactly one line). onError is invoked once on the first write
pkg/trace/trace.go:72
↓ 7 callers
Function
NewLayerPriority
NewLayerPriority returns a fresh priority store with all-zeros (the SLU "Sprites over Layer 2 over ULA" reset mode).
pkg/next/wire.go:654
↓ 7 callers
Function
NewMachine
NewMachine constructs a ZX80/ZX81 (model must be roms.ModelZX80 or roms.ModelZX81). romPath is the ROM search directory ("" = embedded only).
pkg/zx8x/machine.go:55
↓ 7 callers
Function
NewRegWatchSet
NewRegWatchSet returns an empty watch set.
pkg/debugger/regwatch.go:57
↓ 7 callers
Method
OnWriteFn
OnWriteFn returns the currently-installed OnWrite callback for the given register, or nil if none. Used by callers that want to chain a new behaviour
pkg/next/nextregs/dispatcher.go:228
↓ 7 callers
Method
PageIn
PageIn maps the IF1 shadow ROM over the Spectrum ROM area. The mapping mirrors the same 8 KB chunk into both halves of the 0x0000-0x3FFF window, exact
pkg/if1/if1.go:110
↓ 7 callers
Function
ParseMGT
---------------------------------------------------------------------- MGT / IMG (DISCiPLE / +D) -----------------------------------------------------
pkg/plus3fdc/raw.go:72
↓ 7 callers
Function
Path
Path returns the absolute path to config.json. The parent directory is created if missing.
pkg/config/config.go:50
↓ 7 callers
Method
PushBeeperSamples
PushBeeperSamples enqueues a batch of mono beeper samples generated by the ULA at end of frame. The samples are consumed by the oto playback goroutine
pkg/audio/audio.go:186
↓ 7 callers
Method
ReadSectorReg
()
pkg/betadisk/fdc.go:105
↓ 7 callers
Method
Refresh
Refresh re-pulls the set and redraws.
pkg/debugger/watchpoints_widget.go:116
↓ 7 callers
Method
Refresh
Refresh re-pulls the store and triggers a list redraw. Cheap enough to call from the debugger's periodic tick.
pkg/debugger/breakpoints_widget.go:117
↓ 7 callers
Method
Remove
(pc uint16)
pkg/debugger/breakpoints_widget.go:22
↓ 7 callers
Method
RunUntilText
RunUntilText runs frames until ScreenText contains the given substring or maxFrames have elapsed. Returns the frame count at which the text appeared,
pkg/testharness/screen.go:132
↓ 7 callers
Method
SetAY
SetAY attaches an AY-3-8912 source whose output will be mixed into the beeper stream. Pass nil to detach.
pkg/audio/audio.go:312
↓ 7 callers
Method
SetBankTracer
SetBankTracer installs a per-switch callback fired whenever the ROM bank in slot 0 changes (via port 7FFD bit 4, port 1FFD bit 2, or NextReg \$8E) or
pkg/memory/memory.go:514
↓ 7 callers
Method
SetCard
SetCard installs (or removes) the SD-card slot. The slot receives SPI traffic on ports 0xE7 (chip select) and 0xEB (data). Passing nil detaches any ex
pkg/next/divmmc/divmmc.go:972
↓ 7 callers
Method
SetChip
SetChip installs an existing AY at the given index, replacing the freshly-constructed one. Useful when the engine is layered on top of a host that alr
pkg/ay/engine.go:73
↓ 7 callers
Method
SetEnabled
SetEnabled sets the enabled state
pkg/multiface/multiface.go:340
↓ 7 callers
Method
SetNextAY
SetNextAY installs the Spectrum Next's three-chip AY engine. When set, port 0xFFFD / 0xBFFD traffic dispatches to the currently-active chip per NextRe
pkg/ula/ula.go:503
↓ 7 callers
Method
SetNextCompositor
SetNextCompositor installs the Spectrum Next render stack's scanline compositor. Once installed, Render overlays the composited output on top of the 2
pkg/ula/ula.go:419
↓ 7 callers
Method
SetPrioritySource
SetPrioritySource installs the LayerPriority reader. Without one the compositor defaults to ModeSLU (Sprites over Layer 2 over ULA).
pkg/next/compositor/compositor.go:322
↓ 7 callers
Method
SetWriteProtect
SetWriteProtect sets the write-protect flag.
pkg/sam/disk.go:41
↓ 7 callers
Function
SplitROM
SplitROM validates a raw SAM Coupé system-ROM image and splits it into ROM0 (the low 16 KB, paged at $0000 on reset) and ROM1 (the high 16 KB, paged a
pkg/sam/rom.go:25
↓ 7 callers
Method
StopRecording
StopRecording finalises any in-progress recording.
pkg/audio/audio.go:381
↓ 7 callers
Method
Wait
Wait runs frames continuously for the given wall-clock duration at the simulated 50Hz frame rate (i.e. d / 20ms frames). Used for tests that just need
pkg/testharness/testharness.go:372
↓ 7 callers
Method
WriteRAM
(idx int, val byte)
pkg/memory/next.go:437
↓ 7 callers
Method
WriteReg
(reg, val byte)
pkg/z80/z80.go:42
↓ 7 callers
Function
bcd
bcd converts an integer 0..99 to its BCD representation.
pkg/next/rtc/rtc.go:62
↓ 7 callers
Method
bit
(bit int, val byte)
pkg/z80/z80.go:4070
↓ 7 callers
Function
clipDisp
Clip-window registers NR$18 (Layer2), $19 (sprite), $1A (ULA), $1B (tilemap) are NOT single bytes: each holds four sub-coordinates (x1,x2,y1,y2) cycle
pkg/next/wire_clip_test.go:20
↓ 7 callers
Method
cmdBPFirstEntry
cmdBPFirstEntry arms a single-fire breakpoint that halts the CPU on the FIRST M1 fetch whose PC lies inside [LO, HI]. Auto-cleared on fire — `continue
cmd/zx_go/bpfirst_cmd.go:49
↓ 7 callers
Method
cmdBankPoke
cmdBankPoke parses `bank-poke KIND BANK OFF BYTES...` where each BYTE is a single hex value (no 0x prefix needed but accepted).
cmd/zx_go/bank_access.go:132
↓ 7 callers
Function
crashConfigFromFlags
crashConfigFromFlags merges the per-heuristic CLI flags with the --crash-detect default. Per-heuristic flags always win over the default value; --cras
cmd/zx_go/crashdetect.go:214
↓ 7 callers
Function
createSnapshotFromEmulator
createSnapshotFromEmulator creates a snapshot from the current emulator state
cmd/zx_go/main.go:1656
↓ 7 callers
Method
dataAt
dataAt walks from start looking for a data address mark (FB or F8 with the A1 sync prefix or clock bit). Returns (dataStart, deleted, ok) — dataStart
pkg/plus3fdc/track.go:502
↓ 7 callers
Function
drainOne
drainOne reads one byte from the card (one SPI clock byte).
pkg/next/sdcard/spi_test.go:298
↓ 7 callers
Method
envelopeLevel
envelopeLevel returns the 4-bit (0..15) envelope output value. The AY-mode DAC and the legacy 16-entry mixing path use env_vol's top four bits (audio/
pkg/ay/ay.go:306
↓ 7 callers
Method
eval
(s State)
pkg/debugger/condition.go:70
↓ 7 callers
Method
generatePulses
generatePulses converts a tape block into a sequence of pulse durations (in T-states). Standard Spectrum (TAP / TZX 0x10) encoding: - Pilot tone: 216
pkg/ula/tape.go:394
↓ 7 callers
Method
getFAT
(c uint32)
pkg/next/sdcard/fat32.go:221
↓ 7 callers
Method
isMultifacePort
isMultifacePort checks if the port matches this Multiface variant's decode. MF128 also responds to MF1's port pattern for backwards compatibility.
pkg/multiface/multiface.go:197
↓ 7 callers
Function
issueScanAndCompare
(t *testing.T, f *UPD765, cmd byte, compare []byte)
pkg/plus3fdc/upd765_test.go:494
↓ 7 callers
Function
loadSymbolMap
loadSymbolMap reads `addr name` lines into symbolTable. Lines starting with `#` or `;` are comments; blanks are skipped. The address is hex with opti
cmd/zx_go/debug.go:33
↓ 7 callers
Function
makePageData
--------------------------------------------------------------------------- Helper: create a 16K page filled with a single byte ----------------------
pkg/snapshot/snapshot_test.go:2210
↓ 7 callers
Function
makeReader
makeReader returns a readFunc that serves the given bytes starting at address 0; out-of-range reads return 0xFF.
pkg/debugger/disasm_test.go:7
↓ 7 callers
Function
newTestTTB
These tests cover the ring-buffer semantics of timeTravelBuffer directly (no live emulator). Capture and restore are exercised in integration: a headl
cmd/zx_go/timetravel_test.go:18
↓ 7 callers
Function
nextRunFrames
nextRunFrames runs the Next exactly as the GUI run loop does (frame execution plus the per-frame peripheral tick). A loaded .nex program must be run t
cmd/zx_go/nex_load_test.go:27
↓ 7 callers
Function
parsePCTriggers
parsePCTriggers reads "NAME@$XXXX" or "NAME@$XXXX-$YYYY" pairs from the comma-separated --snapshot-on-pc value.
cmd/zx_go/debug.go:147
↓ 7 callers
Method
read
()
pkg/next/wire.go:952
↓ 7 callers
Method
readDataError
readDataError finishes a failed READ DATA without entering execution phase. The CHRN result fields echo the requested values from cmdBuf.
pkg/plus3fdc/upd765.go:903
↓ 7 callers
Method
remaining
remaining returns the number of bytes free in the track.
pkg/plus3fdc/track.go:172
↓ 7 callers
Method
setStatus
(s string, isErr bool)
pkg/debugger/watchpoints_widget.go:171
↓ 7 callers
Method
setStatus
(s string, isErr bool)
pkg/debugger/breakpoints_widget.go:180
↓ 7 callers
Method
storeIXd
(value byte)
pkg/z80/z80.go:3259
↓ 7 callers
Method
storeIYd
(value byte)
pkg/z80/z80.go:3291
↓ 7 callers
Function
tapKey
tapKey presses a SAM matrix key (row, bit), holds it for a few frames so the 50 Hz ROM keyboard scan registers it, then releases it with a gap.
pkg/sam/integration_test.go:52
↓ 7 callers
Method
tick
tick advances the macro by one frame. It must be called once per executed frame, after the frame runs, so keys pressed here are seen by the next frame
cmd/zx_go/nexload_macro.go:105
↓ 6 callers
Method
Add
Add inserts or replaces the breakpoint at pc (copy-on-write).
pkg/debugger/bpset.go:75
↓ 6 callers
Method
AnyMotorOn
AnyMotorOn reports whether any drive is currently spinning. Used by the UI to flash a "drive active" indicator.
pkg/if1/microdrive.go:364
↓ 6 callers
Function
Backtrace
Backtrace walks `n` stack words starting at sp (toward higher addresses, matching the Z80's stack-grows-downward convention) and classifies each via t
pkg/debugger/backtrace.go:77
↓ 6 callers
Function
BuildFAT16
BuildFAT16 walks dir and produces an in-memory FAT16 image containing every file and subdirectory under it. The returned []byte is exactly opts.SizeMB
pkg/next/sdcard/fat16.go:65
↓ 6 callers
Method
Capacity
Capacity is the number of 512-byte blocks. Used for the CSD response so the host knows the card size.
pkg/next/sdcard/spi.go:56
↓ 6 callers
Method
DataAt
DataAt is the exported entry point for locating the data address mark following an IDAM. Returns the position of the first data byte.
pkg/plus3fdc/track.go:390
↓ 6 callers
Method
DivMMCRom3Gate
DivMMCRom3Gate reports whether a rom3-variant divMMC automap entry point (NR$B9 bit CLEAR) is allowed to engage, per zxnext.vhd:3138: (sram_altrom_e
pkg/memory/memory.go:418
← previous
next →
601–700 of 5,503, ranked by callers