MCPcopy Create free account

hub / github.com/conorarmstrong/zx_go / functions

Functions5,503 in github.com/conorarmstrong/zx_go

↓ 8 callersMethodpopBeeperSamples
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 callersMethodpush
Stack operations
pkg/z80/z80.go:3851
↓ 8 callersFunctionscreenHash
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 callersFunctionsectorLength
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 callersMethodselectROM
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 callersFunctionsetBC
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 callersMethodsetRegister8
(reg int, val byte)
pkg/z80/z80.go:4113
↓ 8 callersMethodsetStatus
(s string, isErr bool)
pkg/debugger/timetravel_widget.go:169
↓ 8 callersMethodstart
start: SDA high->low while SCL high.
pkg/next/rtc/i2c_test.go:16
↓ 8 callersFunctiontoFAT83
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 callersMethodwritePortInternal
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 callersMethodAddPostFetchHook
AddPostFetchHook is the post-fetch analogue of AddPreFetchHook.
pkg/z80/z80.go:1048
↓ 7 callersMethodAddRecent
AddRecent prepends path to RecentFiles. Existing entries are deduplicated and the list is capped at MaxRecentFiles.
pkg/config/config.go:108
↓ 7 callersMethodCartridge
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 callersMethodCheckBreakpoint
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 callersFunctionDownloadNextROMs
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 callersMethodExecuteRZXFrame
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 callersMethodFormatLine
FormatLine produces a one-line description suitable for the list-watches / visual panel.
pkg/debugger/regwatch.go:32
↓ 7 callersMethodGetKeyStatus
GetKeyStatus returns a human-readable status of special keys
pkg/keyboard/keyboard.go:499
↓ 7 callersMethodGetMultiface
GetMultiface returns the Multiface interface (if enabled)
pkg/peripherals/manager.go:666
↓ 7 callersMethodGetROM
GetROM returns the data for a specific ROM type
pkg/roms/rom_manager.go:228
↓ 7 callersMethodGetVariant
GetVariant returns the Multiface variant
pkg/multiface/multiface.go:325
↓ 7 callersMethodHandleMemoryRead
HandleMemoryRead handles memory reads that might be intercepted by peripherals
pkg/peripherals/manager.go:550
↓ 7 callersMethodHandleOpcodeRead
HandleOpcodeRead handles opcode fetch that might trigger ROM paging
pkg/multiface/multiface.go:181
↓ 7 callersMethodHandles
(port uint16)
pkg/ula/ula.go:369
↓ 7 callersMethodHasROM
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 callersMethodHookFunc
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 callersMethodIsInterface1Enabled
IsInterface1Enabled reports whether the Interface 1 is currently active.
pkg/peripherals/manager.go:314
↓ 7 callersMethodLevel
Level returns the current 8-bit level for the given channel. Channels outside ChannelA..ChannelD return 0.
pkg/next/dac/dac.go:94
↓ 7 callersMethodLineWidth
LineWidth returns the active framebuffer width in pixels for the current resolution (256, 320 or 640).
pkg/next/layer2/layer2.go:235
↓ 7 callersMethodLoadROM
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 callersMethodLookup
Lookup returns the entry at pc, lock-free. Safe to call from the CPU hot path.
pkg/debugger/bpset.go:39
↓ 7 callersFunctionNew
New returns a fresh Palette with every entry at 0 (black).
pkg/next/palette/palette.go:31
↓ 7 callersFunctionNew
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 callersFunctionNewBreakpointSet
NewBreakpointSet returns an empty shared breakpoint set.
pkg/debugger/bpset.go:30
↓ 7 callersFunctionNewJSONEmitter
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 callersFunctionNewLayerPriority
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 callersFunctionNewMachine
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 callersFunctionNewRegWatchSet
NewRegWatchSet returns an empty watch set.
pkg/debugger/regwatch.go:57
↓ 7 callersMethodOnWriteFn
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 callersMethodPageIn
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 callersFunctionParseMGT
---------------------------------------------------------------------- MGT / IMG (DISCiPLE / +D) -----------------------------------------------------
pkg/plus3fdc/raw.go:72
↓ 7 callersFunctionPath
Path returns the absolute path to config.json. The parent directory is created if missing.
pkg/config/config.go:50
↓ 7 callersMethodPushBeeperSamples
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 callersMethodReadSectorReg
()
pkg/betadisk/fdc.go:105
↓ 7 callersMethodRefresh
Refresh re-pulls the set and redraws.
pkg/debugger/watchpoints_widget.go:116
↓ 7 callersMethodRefresh
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 callersMethodRemove
(pc uint16)
pkg/debugger/breakpoints_widget.go:22
↓ 7 callersMethodRunUntilText
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 callersMethodSetAY
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 callersMethodSetBankTracer
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 callersMethodSetCard
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 callersMethodSetChip
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 callersMethodSetEnabled
SetEnabled sets the enabled state
pkg/multiface/multiface.go:340
↓ 7 callersMethodSetNextAY
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 callersMethodSetNextCompositor
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 callersMethodSetPrioritySource
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 callersMethodSetWriteProtect
SetWriteProtect sets the write-protect flag.
pkg/sam/disk.go:41
↓ 7 callersFunctionSplitROM
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 callersMethodStopRecording
StopRecording finalises any in-progress recording.
pkg/audio/audio.go:381
↓ 7 callersMethodWait
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 callersMethodWriteRAM
(idx int, val byte)
pkg/memory/next.go:437
↓ 7 callersMethodWriteReg
(reg, val byte)
pkg/z80/z80.go:42
↓ 7 callersFunctionbcd
bcd converts an integer 0..99 to its BCD representation.
pkg/next/rtc/rtc.go:62
↓ 7 callersMethodbit
(bit int, val byte)
pkg/z80/z80.go:4070
↓ 7 callersFunctionclipDisp
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 callersMethodcmdBPFirstEntry
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 callersMethodcmdBankPoke
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 callersFunctioncrashConfigFromFlags
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 callersFunctioncreateSnapshotFromEmulator
createSnapshotFromEmulator creates a snapshot from the current emulator state
cmd/zx_go/main.go:1656
↓ 7 callersMethoddataAt
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 callersFunctiondrainOne
drainOne reads one byte from the card (one SPI clock byte).
pkg/next/sdcard/spi_test.go:298
↓ 7 callersMethodenvelopeLevel
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 callersMethodeval
(s State)
pkg/debugger/condition.go:70
↓ 7 callersMethodgeneratePulses
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 callersMethodgetFAT
(c uint32)
pkg/next/sdcard/fat32.go:221
↓ 7 callersMethodisMultifacePort
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 callersFunctionissueScanAndCompare
(t *testing.T, f *UPD765, cmd byte, compare []byte)
pkg/plus3fdc/upd765_test.go:494
↓ 7 callersFunctionloadSymbolMap
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 callersFunctionmakePageData
--------------------------------------------------------------------------- Helper: create a 16K page filled with a single byte ----------------------
pkg/snapshot/snapshot_test.go:2210
↓ 7 callersFunctionmakeReader
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 callersFunctionnewTestTTB
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 callersFunctionnextRunFrames
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 callersFunctionparsePCTriggers
parsePCTriggers reads "NAME@$XXXX" or "NAME@$XXXX-$YYYY" pairs from the comma-separated --snapshot-on-pc value.
cmd/zx_go/debug.go:147
↓ 7 callersMethodread
()
pkg/next/wire.go:952
↓ 7 callersMethodreadDataError
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 callersMethodremaining
remaining returns the number of bytes free in the track.
pkg/plus3fdc/track.go:172
↓ 7 callersMethodsetStatus
(s string, isErr bool)
pkg/debugger/watchpoints_widget.go:171
↓ 7 callersMethodsetStatus
(s string, isErr bool)
pkg/debugger/breakpoints_widget.go:180
↓ 7 callersMethodstoreIXd
(value byte)
pkg/z80/z80.go:3259
↓ 7 callersMethodstoreIYd
(value byte)
pkg/z80/z80.go:3291
↓ 7 callersFunctiontapKey
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 callersMethodtick
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 callersMethodAdd
Add inserts or replaces the breakpoint at pc (copy-on-write).
pkg/debugger/bpset.go:75
↓ 6 callersMethodAnyMotorOn
AnyMotorOn reports whether any drive is currently spinning. Used by the UI to flash a "drive active" indicator.
pkg/if1/microdrive.go:364
↓ 6 callersFunctionBacktrace
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 callersFunctionBuildFAT16
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 callersMethodCapacity
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 callersMethodDataAt
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 callersMethodDivMMCRom3Gate
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
← previousnext →601–700 of 5,503, ranked by callers