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.
This commit is contained in:
bholman committed 2026-11-18 16:00:45 -07:00
1 parent 8b8cf72d1f
commit cb40fed3b9
126 files changed
+12795 -528

No files matched your search

+48 -12
View File
@@ -1,3 +1,5 @@
// Original Coco 3 Plus contributions: Copyright (c) 2026 Brian K. Holman.
// Original component notices/terms retained; see COPYRIGHT.md and LICENSING.md.
////////////////////////////////////////////////////////////////////////////////
// Project Name: COCO3 Targeting MISTer
// File Name: sdc_top.sv
@@ -115,6 +117,12 @@ wire [5:0] div_8mhz;
assign ena_8Mhz = (div_8mhz == 6'd5) ? 1'b1: 1'b0;
// Research: local positive-edge reset release for the WD1793 banks.
(* preserve *) reg [1:0] wd_reset_release = 2'b00;
always @(posedge CLK or negedge RESET_N)
if (!RESET_N) wd_reset_release <= 2'b00;
else wd_reset_release <= {wd_reset_release[0], 1'b1};
always@(negedge CLK or negedge RESET_N)
begin
if (~RESET_N) div_8mhz <= 6'd0;
@@ -443,32 +451,60 @@ reg [31:0] drive_size[2];
// Reset of drive wp to a default of 1 removed because of persistance.
// Research: mount strobes are data from hps_io, not clock sources.
reg [1:0] img_mounted_d = 0;
always @(posedge CLK) img_mounted_d <= img_mounted;
reg [1:0] mount_pending = 0;
reg [1:0] mount_wp;
reg [1:0] mount_double_sided;
reg [31:0] mount_size[2];
always @(posedge CLK) mount_pending <= img_mounted_d & ~img_mounted;
// Drive 0
always @(negedge img_mounted[0])
always @(posedge CLK)
begin
drive_wp[0] <= img_readonly;
drive_ready[0] <= 1'b1;
drive_size[0] <= img_size[31:0]; //Size / 256 on [31:8]
double_sided[0]<= (img_size > 64'd368600) & (img_size < 64'd740000);//20'd368640;
if (img_mounted_d[0] && !img_mounted[0])
begin
mount_wp[0] <= img_readonly;
mount_size[0] <= img_size[31:0]; //Size / 256 on [31:8]
mount_double_sided[0]<= (img_size > 64'd368600) & (img_size < 64'd740000);//20'd368640;
end
end
// Drive 1
always @(negedge img_mounted[1])
always @(posedge CLK)
begin
drive_wp[1] <= img_readonly;
drive_ready[1] <= 1'b1;
drive_size[1] <= img_size[31:0]; //Size / 256 on [31:8]
double_sided[1]<= (img_size > 64'd368600) & (img_size < 64'd740000);//20'd368640;
if (img_mounted_d[1] && !img_mounted[1])
begin
mount_wp[1] <= img_readonly;
mount_size[1] <= img_size[31:0]; //Size / 256 on [31:8]
mount_double_sided[1]<= (img_size > 64'd368600) & (img_size < 64'd740000);//20'd368640;
end
end
// Research: commit metadata on consumer's falling phase after classification.
always @(negedge CLK) if (mount_pending[0]) begin
drive_wp[0] <= mount_wp[0];
drive_ready[0] <= 1'b1;
drive_size[0] <= mount_size[0];
double_sided[0] <= mount_double_sided[0];
end
always @(negedge CLK) if (mount_pending[1]) begin
drive_wp[1] <= mount_wp[1];
drive_ready[1] <= 1'b1;
drive_size[1] <= mount_size[1];
double_sided[1] <= mount_double_sided[1];
end
wd1793 #(1,0) coco_wd1793_sdc_0
(
.clk_sys(~CLK),
.ce(ena_8Mhz),
.reset(~RESET_N),
.reset(~wd_reset_release[1]),
.io_en(1'b1),
.rd(RD[0]),
.wr(WR[0]),
@@ -510,7 +546,7 @@ wd1793 #(1,0) coco_wd1793_sdc_1
(
.clk_sys(~CLK),
.ce(ena_8Mhz),
.reset(~RESET_N),
.reset(~wd_reset_release[1]),
.io_en(1'b1),
.rd(RD[1]),
.wr(WR[1]),