Files
bholman cb40fed3b9 Introduce Coco 3 Plus for MiSTer
Add original-firmware Sound & Speech, four configurable Multi-Pak sockets,
bounded per-slot ROM allocation and a nine-page menu organized around devices
and media. Repair inherited clock/reset/CPU-memory/video paths and add explicit
conditional external-I/O timing contracts. Preserve native Main startup-file
ordering, saved layouts, stock-core separation and the coco3plus media profile.

Provide native Windows tool downloads, pinned ToolShed ROM assembly, fresh
Quartus builds, functional and fitted timing checks, reviewed release packaging
and passwordless SSH installation with backups. Retain original component
notices, document contribution copyright and keep SSC ROM inputs outside Git.

Validation: Quartus17.0.2 Build602 seed5, zero errors; 15 functional jobs,
368 both-corner timing scopes and eight tooling-integrity checks pass.
The renamed build reaches Disk BASIC, PRINT1+1 returns2 and SSC loads ready.
Physical cold power cycling and conditional board-delay assumptions remain
separate. Full original upstream histories are preserved before this single
consolidated implementation commit.
2026-11-18 16:00:45 -07:00

44 lines
2.9 KiB
Tcl

# Original Coco 3 Plus contributions: Copyright (c) 2026 Brian K. Holman.
# Original component notices/terms retained; see COPYRIGHT.md and LICENSING.md.
# Proven only for this MiSTer wrapper: Q=E=cpu_cycle_ena cannot be consecutive.
# See scripts/check_cpu_enable.py (actual timing-loop induction + negative test).
# Only BOTH endpoints in the qualified CPU Q/E write processes get two cycles.
set cpu_ce_bases {CpuState DMABREQLatched DMABREQSample DMABREQSample2 FIRQSample FIRQSample2 FIRQLatched HALTLatched HALTSample HALTSample2 IRQSample IRQSample2 IRQLatched Inst1 Inst2 Inst3 InstPage2 InstPage3 IntType NMIClear NMISample NMISample2 NextState a addr b cc dp ea pc rnRESET s tmp u x y}
set cpu_ce [get_registers -nowarn __no_cpu_register__]
foreach_in_collection reg [get_registers {*GLBCPU09|*}] {
set name [get_register_info -name $reg]
if {![regexp {GLBCPU09\|([A-Za-z_][A-Za-z_0-9]*)} $name unused base]} {error "Unrecognized CPU register $name"}
if {[lsearch -exact $cpu_ce_bases $base] >= 0} {
set one [get_registers -no_duplicates [list $name]]
if {[get_collection_size $one] != 1} {error "Ambiguous CPU register $name"}
set cpu_ce [add_to_collection $cpu_ce $one]
}
}
# Unnamed fitter/retiming nodes and unconditional NMI state remain single-cycle.
if {[get_collection_size $cpu_ce] < 200} {error "Incomplete Q/E-qualified CPU register scope"}
puts "CPU_CE_REGISTER_COUNT [get_collection_size $cpu_ce]"
set_multicycle_path -setup -end 2 -from $cpu_ce -to $cpu_ce
set_multicycle_path -hold -end 1 -from $cpu_ce -to $cpu_ce
# Raw request reaches only the asynchronous pins of the two release stages.
# Internal stage-to-stage data and ALL downstream release paths stay timed.
set request [get_nets {*coco3|RESET_P}]
set release [get_registers {*coco3|reset_request_release[*]}]
if {[get_collection_size $request] != 1 || [get_collection_size $release] != 2} {error "Missing exact reset request synchronizer scope"}
set_false_path -through $request -to $release
# Optional local positive-edge WD1793 release chains: asynchronous entry only.
set wd_release [get_registers -nowarn {*coco_fdc|wd_reset_release[*] *coco_sdc_top|wd_reset_release[*]}]
if {[get_collection_size $wd_release] > 0} {
if {[get_collection_size $wd_release] != 4} {error "Expected two two-stage WD reset chains"}
set reset_root [get_registers -nowarn -no_duplicates {*coco3|RESET_N *coco3|reset_main_release[1]}]
if {[get_collection_size $reset_root] != 1} {error "Missing exact disk reset root"}
set_false_path -from $reset_root -to $wd_release
}
set phase_release [get_registers -nowarn {*coco3|reset_main_release[*] *coco3|reset_positive_release[*] *coco3|reset_fast_release[*]}]
if {[get_collection_size $phase_release] > 0} {
if {[get_collection_size $phase_release] != 6} {error "Expected exactly three two-stage consumer release chains"}
set_false_path -from [get_registers {*coco3|RESET_RAW_N}] -to $phase_release
}