MCPcopy Create free account

hub / github.com/conorarmstrong/zx_go / functions

Functions5,503 in github.com/conorarmstrong/zx_go

↓ 2 callersMethodSetFramesBumper
SetFramesBumper installs a callback invoked whenever the CPU M1- fetches at divMMC-RAM-bank-1 $2009 with the overlay paged in. The callback should per
pkg/next/divmmc/divmmc.go:614
↓ 2 callersMethodSetLength
SetLength resizes the cartridge to the given number of blocks. Existing data is preserved up to the new length; any new bytes are filled with 0xFF.
pkg/microdrive/microdrive.go:80
↓ 2 callersMethodSetMode
SetMode sets mf_mode_i (low 2 bits used).
pkg/multiface/core.go:62
↓ 2 callersMethodSetNextProvider
SetNextProvider switches the widget to 8-slot Next mode. Pass nil to switch back to classic 4-slot.
pkg/debugger/pagemap.go:126
↓ 2 callersMethodSetRETNHook
retnHook, when non-nil, fires after every RETN/RETI (all ED mirror encodings). The TBBlue T80N asserts I_RETN for BOTH instructions (t80n_mcode.vhd:66
pkg/z80/z80.go:622
↓ 2 callersMethodSetRead
SetRead / SetWrite hold the i_rd / i_wr request lines for the next Clock().
pkg/next/uart/serial.go:291
↓ 2 callersMethodSetScreenOff
SetScreenOff records BORDER bit 7 (SOFF); in modes 3/4 it disables the screen, which removes screen contention (falls back to the 4T table).
pkg/sam/contention.go:57
↓ 2 callersMethodSetShadowBank
SetShadowBank installs the shadow framebuffer's starting bank.
pkg/next/layer2/layer2.go:70
↓ 2 callersMethodSetSpeccyDAC
SetSpeccyDAC attaches the classic-Spectrum SpecDrum/Covox DAC. Unlike the Next DAC it is event-timed: the ULA records its writes with T-state offsets
pkg/ula/ula.go:465
↓ 2 callersMethodSetSpriteTransparency
SetSpriteTransparency installs the palette index treated as transparent for the sprite layer (NextReg 0x4B). Defaults to DefaultTransparency ($E3, the
pkg/next/compositor/compositor.go:327
↓ 2 callersMethodSetULAOutputDisabled
SetULAOutputDisabled mirrors NextReg $68 bit 7. When true the ULA layer is not painted (see Render). Idempotent and safe to call every frame.
pkg/ula/ula.go:611
↓ 2 callersMethodSetULAPalette
SetULAPalette installs the ULA's 16-colour palette so the compositor can resolve the ULA transparency colour (a transparent ULA pixel carries ulaPalet
pkg/next/compositor/compositor.go:348
↓ 2 callersMethodSetVideoWriteHook
SetVideoWriteHook installs a callback fired on every CPU write to displayed video memory. Pass nil to detach.
pkg/sam/memory.go:247
↓ 2 callersMethodSetWrite
(v bool)
pkg/next/uart/serial.go:292
↓ 2 callersMethodSetWriteProtect
SetWriteProtect marks a drive's disk read-only.
pkg/betadisk/fdc.go:75
↓ 2 callersMethodSetWriteProtect
SetWriteProtect toggles the write-protect flag.
pkg/microdrive/microdrive.go:105
↓ 2 callersFunctionSetup
Setup wires log/slog with a colored handler writing to stderr. Subsequent slog.Debug / slog.Info / slog.Warn / slog.Error calls use this handler. The
pkg/zxlog/zxlog.go:84
↓ 2 callersMethodShadowBank
ShadowBank returns the shadow bank index.
pkg/next/layer2/layer2.go:73
↓ 2 callersMethodSnapshotMMU
SnapshotMMU captures the 8-entry MMU8 slot table (NextReg $50-$57: which 8K pool bank backs each 8K CPU slot). Needed for faithful Next time-travel re
pkg/memory/memory.go:1784
↓ 2 callersMethodSnapshotPool
SnapshotPool returns a deep copy of every 16K bank in the unified RAM pool, so the whole 2 MB can be restored later — the foundation of faithful Next
pkg/memory/memory.go:1755
↓ 2 callersMethodSnapshotRAM
()
cmd/zx_go/timetravel_nextstate.go:14
↓ 2 callersMethodSoftReset
SoftReset models the Spectrum Next's NextReg $02 bit 0 soft reset — a software-controlled CPU restart that is distinct from a hardware /RESET. The Nex
pkg/z80/z80.go:510
↓ 2 callersMethodStatusBits
StatusBits packs Status into a NUM_PERIPH-bit mask (bit i = peripheral i).
pkg/next/im2.go:322
↓ 2 callersMethodStop
Stop tears down the playback cursor. Idempotent.
pkg/rzx/playback.go:89
↓ 2 callersMethodStopRecording
StopRecording finalises the active WAV recording, if any.
pkg/ula/ula.go:1716
↓ 2 callersMethodString
()
pkg/debugger/disasm.go:13
↓ 2 callersMethodStubProtected
StubProtected reports whether bank 1 $0009 is currently shadow- protected. Exposed for tests and debug snapshots.
pkg/next/divmmc/divmmc.go:631
↓ 2 callersMethodTick
Tick advances the typed-character pulse by one 50 Hz frame, releasing it when it expires. Safe to call every frame (no-op when no pulse is active).
pkg/sam/keyboard.go:140
↓ 2 callersMethodTruncate
Truncate resizes the file to size bytes, extending with zeros or discarding the tail as needed. Returns an error for directory or read-only handles.
pkg/next/sdcard/sdcard.go:68
↓ 2 callersMethodUnlockSpeedSelect
UnlockSpeedSelect releases a LockSpeedSelect so guest NR$07 writes take effect again ("Auto" CPU speed). Leaves the current selector value in place un
pkg/z80/z80.go:650
↓ 2 callersMethodVector
Vector returns the 4-bit daisy-chain vector index currently on the bus (valid during the INT ack cycle). Combine with NR$C0[7:5] and a low 0 to form t
pkg/next/im2.go:307
↓ 2 callersFunctionVerify
Verify checks the recording's DSA signature against pub. It returns false (no error) for a well-formed but invalid signature, and an error only when t
pkg/rzx/sign.go:77
↓ 2 callersFunctionWaitHThreshold
WaitHThreshold is the horizontal raster counter (hcount, 0..511 in pixels) at or above which a WAIT with column field x releases on its target scanlin
pkg/next/copper/copper.go:191
↓ 2 callersFunctionWireInterruptControl
WireInterruptControl installs the NextReg $C0 OnWrite handler. Per nextreg.txt 0xC0 + zxnext.vhd: bits 7:5 = Programmable upper 3 bits of IM 2 vect
pkg/next/wire.go:185
↓ 2 callersFunctionWireInterruptEnable0
WireInterruptEnable0 installs the NextReg $C4 OnWrite handler. Per nextreg.txt 0xC4 + zxnext.vhd: bit 7 = Expansion bus /INT enable bits 6:2 = Res
pkg/next/wire.go:146
↓ 2 callersFunctionWireInterruptEnable2
WireInterruptEnable2 installs the NextReg $C6 OnWrite handler. Per nextreg.txt 0xC6 + zxnext.vhd:5615-5617 + 6244-6245: bit 7 = Reserved (read as 0
pkg/next/wire.go:217
↓ 2 callersFunctionWireJoystickMode
WireJoystickMode installs the NextReg $05 OnWrite + OnRead handlers per zxnext.vhd: WRITE: nr_05_joy0 <= nr_wr_dat(3) & nr_wr_dat(7 downto 6)
pkg/next/wire.go:267
↓ 2 callersFunctionWireKeymap
WireKeymap installs the NextReg $28 / $29 / $2B OnWrite handlers that drive the PS/2 keymap RAM: $28 — bit 7 selects joymap vs PS/2 keymap; bit 0 is
pkg/next/wire.go:1200
↓ 2 callersFunctionWirePalette
WirePalette installs the NextReg 0x40 (index), 0x41 (8-bit value with auto-increment), 0x43 (palette select) and 0x44 (9-bit value, two-byte sequence)
pkg/next/wire.go:751
↓ 2 callersFunctionWireVideoTiming
WireVideoTiming installs the NextReg $11 OnWrite handler per zxnext.vhd:5208-5217: when X"11" => if nr_03_config_mode = '1' then if nr
pkg/next/wire.go:300
↓ 2 callersMethodWrite
(addr uint16, val byte)
pkg/next/esxdos/esxdos.go:252
↓ 2 callersMethodWriteData
WriteData stores one byte into the copper instruction memory at the current write cursor. Copper instructions are 16 bits wide and arrive over NextReg
pkg/next/copper/copper.go:91
↓ 2 callersMethodWriteData
WriteData feeds the next byte of a Type II write transfer. When the command was issued with the multiple-record flag (WRITE SECTOR MULTIPLE), filling
pkg/sam/wd1772.go:233
↓ 2 callersMethodWritePort
(uint16, byte)
cmd/zx_go/inject_state.go:21
↓ 2 callersMethodWriteProtected
WriteProtected reports the write-protect state.
pkg/sam/disk.go:38
↓ 2 callersMethodWriteSelected
WriteSelected writes a value into whichever register has been selected via SelectRegister.
pkg/ay/ay.go:215
↓ 2 callersMethodaddAll
()
cmd/zx_go/nrdeltas_cmd.go:20
↓ 2 callersMethodaddrMask
addrMask isolates the DEPTH_BITS-wide address.
pkg/next/uart/serial.go:298
↓ 2 callersFunctionaddrMode
addrMode decodes a WR1/WR2 byte's address-mode bits (D5 D4): bit 5 set = fixed; else bit 4 set = increment; else decrement.
pkg/next/dma/dma.go:185
↓ 2 callersMethodadvance
advance moves the drum forward to the position implied by the current T-state, filling pixels with the current stylus state and wrapping lines as need
pkg/zxprinter/zxprinter.go:162
↓ 2 callersMethodadvanceMultiSector
advanceMultiSector implements the WD1772 multi-record auto-increment: per the datasheet "TYPE II COMMANDS" (m=1), "the Sector Register [is] internally
pkg/disciple/disciple.go:363
↓ 2 callersMethodadvanceSample
advanceSample steps the internal clock by the fractional number of AY ticks due for one audio sample (accumulating leftover fractional cycles in clock
pkg/ay/ay.go:614
↓ 2 callersMethodallocHandle
allocHandle assigns a fresh esxDOS file handle to fh and stores it in the dispatcher's handle table. Handles wrap at 1..127 so 0 stays reserved for "n
pkg/next/esxdos/file_handlers.go:42
↓ 2 callersMethodaltROMRedirectsReads
altROMRedirectsReads reports whether $0000-$3FFF reads should come from the Alt-ROM (bit 7 enabled, bit 6 cleared = "alt-rom visible during reads"). B
pkg/memory/memory.go:390
↓ 2 callersMethodaltROMSelect
altROMSelect returns which of the two Alt-ROM banks ($0/$1) is currently selected, based on the $8C lock bits and the legacy 7FFD bit 4 (low ROM-selec
pkg/memory/memory.go:369
↓ 2 callersMethodappendOut
(line string)
pkg/debugger/nextreg_widget.go:127
↓ 2 callersMethodapplyNextCompositor
applyNextCompositor walks the 192 active display rows, hands each one to the Spectrum Next compositor and writes the composited result back into u.img
pkg/ula/ula.go:1600
↓ 2 callersFunctionapplyResetDefaults
applyResetDefaults seeds the FPGA's tbblue_reset_common power-on values. Shared between New() and Reset() so they cannot drift.
pkg/next/nextregs/dispatcher.go:117
↓ 2 callersFunctionapplyWarmBoot
applyWarmBoot loads a captured reference post-init state directly into our emulator, bypassing the full FPGA-bootrom -> NextZXOS boot path. Opt-in via
cmd/zx_go/warmboot.go:31
↓ 2 callersMethodbetaClaims
betaClaims reports whether the Beta interface should handle this port now: it must be wired, the TR-DOS ROM paged in, and the port one of its register
pkg/ula/ula.go:474
↓ 2 callersMethodbetaSupported
Beta Disk / TR-DOS glue. The interface is created the first time a .TRD is mounted: the TR-DOS ROM is installed into memory (armed for $3Dxx auto-pagi
cmd/zx_go/betadisk.go:20
↓ 2 callersFunctionblockConfigDir
blockConfigDir sets up an env where os.UserConfigDir resolves under tmp, then writes a regular file where MkdirAll would put the "zx_go" subdir — forc
pkg/config/config_test.go:151
↓ 2 callersFunctionblockTypes
(blocks []Block)
pkg/rzx/recording_test.go:463
↓ 2 callersFunctionbootromHarness
(t *testing.T)
pkg/next/wire_softreset_bootrom_test.go:12
↓ 2 callersMethodborderColour
borderColour resolves the current border colour through the CLUT and palette, exactly as the active display resolves its colours.
pkg/sam/display.go:116
↓ 2 callersFunctionbuildSyntheticUDI
buildSyntheticUDI constructs a minimal UDI file in memory with two cylinders and one side. Each track has a single sector's worth of data laid out via
pkg/plus3fdc/udi_test.go:13
↓ 2 callersFunctionbuildTestMGT
buildTestMGT creates a standard 2-side, 80-cylinder, 10-sector, 512-byte MGT disk image. Each sector's first 3 bytes are (cylinder, head, sector_R), f
pkg/testharness/disciple_test.go:17
↓ 2 callersFunctionbuildV2_128K
buildV2_128K builds a minimal v2 .z80 snapshot for a 128K machine with the eight RAM pages 3..10 present, each page filled with a unique marker byte e
pkg/snapshot/z80_128k_test.go:13
↓ 2 callersFunctionburstStream
burstStream builds an A->B mem transfer in BURST mode with a fixed-time prescaler, so the transfer interleaves with the CPU (one byte per prescaler cy
pkg/next/dma/dma_burst_test.go:8
↓ 2 callersMethodcapture
capture takes a snapshot of current emulator state and pushes it into the ring. Called from the pre-fetch hook (label="") and from the user-driven `tt
cmd/zx_go/timetravel.go:212
↓ 2 callersFunctioncaptureNextFullState
captureNextFullState snapshots the full Next state from its components. nil mem returns nil; nil nr/pager are simply skipped (e.g. classic models have
cmd/zx_go/timetravel_nextstate.go:35
↓ 2 callersFunctionclamp16
(v int)
pkg/saa1099/saa1099.go:260
↓ 2 callersFunctionclampSample
(v int32)
pkg/ay/ay.go:628
↓ 2 callersMethodclear
(name string)
cmd/zx_go/nrsnap_cmd.go:60
↓ 2 callersMethodclip
clip: lores.vhd:115. lores_pixel_en_o <= '1' when hc in [clip_x1,clip_x2] and vc in [clip_y1,clip_y2].
pkg/next/lores/lores.go:144
↓ 2 callersMethodclock
clock advances one rising edge with clk_en='1'.
pkg/next/uart/serial.go:399
↓ 2 callersMethodcloneLocked
()
pkg/debugger/bpset.go:100
↓ 2 callersMethodclusterChainSlice
clusterChainSlice returns a contiguous slice covering the data of all clusters in the chain starting at first. Used for the directory writer so it can
pkg/next/sdcard/fat16.go:383
↓ 2 callersMethodclusterOffset
clusterOffset returns the byte offset within img of the start of the given data cluster.
pkg/next/sdcard/fat16.go:266
↓ 2 callersFunctionclustersFor
(partSectors, spc int)
pkg/next/sdcard/fat32.go:128
↓ 2 callersMethodcmdHexDump
cmdHexDump implements the `hexdump` debugger command — a visual address/hex/ASCII dump (vs the flat byte list from `get-memory`).
cmd/zx_go/hexdump_cmd.go:42
↓ 2 callersMethodcmdHistory
cmdHistory reports the ring-buffer state: how many entries are stored and what fraction of capacity is used. Useful for sanity- checking that --debugg
cmd/zx_go/debugger.go:1535
↓ 2 callersMethodcmdListBanks
cmdListBanks describes the bank pools available on this emulator build. Helpful for users who don't remember what kinds are valid or how many banks ea
cmd/zx_go/bank_access.go:229
↓ 2 callersMethodcmdWatchReg
cmdWatchReg implements `watch-reg REG [from VAL] [to VAL]`. The register name must be one the cpuState.Reg adapter knows about (pc, sp, a, f, b, c, d,
cmd/zx_go/regwatch_cmd.go:15
↓ 2 callersMethodcmdWhyPC
cmdWhyPC explains how the CPU arrived at the current PC by examining the return word most recently consumed off the stack. If that word equals the cur
cmd/zx_go/provenance_cmd.go:154
↓ 2 callersMethodcomputeIEIChain
computeIEIChain returns each device's i_iei (ie(I-1)) given the current states. ie(0)=i_iei='1' (zxnext.vhd:1984; peripherals.vhd:82). Each device's o
pkg/next/im2.go:203
↓ 2 callersFunctioncondName
condName returns the Z80 condition mnemonic for a JP-cc / CALL-cc opcode. forJP toggles between JP-cc and CALL-cc encodings (they share the same cc bi
cmd/zx_go/xref_cmd.go:236
↓ 2 callersMethodconfigModePageBacking
configModePageBacking returns the 16 KB backing slice that REG_RAMPAGE page `p` maps to when config mode is active. Returns nil when the page isn't ba
pkg/memory/next.go:558
↓ 2 callersFunctionconfigureAudioExtras
configureAudioExtras applies post-EnableAudio CLI options: the keep-alive dither level override and startup WAV capture.
cmd/zx_go/main.go:888
↓ 2 callersMethodconsumesFromCPU
consumesFromCPU reports whether the given command reads bytes from the CPU during execution phase (direction CPU→FDC, MSR.DIO = 0). The SCAN commands
pkg/plus3fdc/upd765.go:123
↓ 2 callersFunctioncountAutosaves
(f *File)
pkg/rzx/recording_test.go:453
↓ 2 callersMethodcover
cover marks display pixel sx as painted by an opaque sprite in the current line, latching the collision flag if another sprite already painted it this
pkg/next/sprite/sprite.go:239
↓ 2 callersMethodcpd
()
pkg/z80/z80.go:4314
↓ 2 callersMethodcpi
Block search operations
pkg/z80/z80.go:4267
↓ 2 callersMethodcrashDetectDisable
()
cmd/zx_go/crashdetect_cmd.go:106
↓ 2 callersMethodcrashDetectEnable
(cfg crashDetectorConfig)
cmd/zx_go/crashdetect_cmd.go:75
↓ 2 callersFunctioncreateTestTZX
createTestTZX writes a small TZX file with one 0x10 standard block, one 0x11 turbo block, and one 0x14 pure-data block, so the loader / saver round-tr
pkg/ula/tzx_test.go:16
↓ 2 callersMethodcwCounter
control-word bit accessors (control_reg holds i_cpu_d bits 7..3). controlReg bit4 = D7 interrupt enable (control_reg(7-3)) controlReg bit3 = D
pkg/next/ctc/ctc.go:76
↓ 2 callersFunctioncycleLen
cycleLen decodes a timing byte's D1:D0 into a read/write cycle count: 00=4, 01=3, 10=2 (11 "do not use" → treated as 2).
pkg/next/dma/dma.go:269
↓ 2 callersFunctioncyclesPerSample
cyclesPerSample returns the number of stepClock ticks (post /16 divider) per output audio sample. Shared by GenerateSamples and MixInto.
pkg/ay/ay.go:606
← previousnext →1,501–1,600 of 5,503, ranked by callers