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

+13 -5
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.
module i2c
(
@@ -24,6 +26,12 @@ parameter CLK_Freq = 50_000_000; // 50 MHz
parameter I2C_Freq = 400_000; // 400 KHz
localparam I2C_FreqX2 = I2C_Freq*2;
// Wait >=400 ns after the generated falling edge before changing SDA.
// This covers a fast-mode 300 ns SCL fall plus 40 ns fabric skew; the
// former four-clock (80 ns at 50 MHz) pipeline could change data while the
// external SCL was still high. Minimum two stages keeps the slice valid.
localparam SDA_DELAY_STAGES = (CLK_Freq >= 5_000_000) ?
(CLK_Freq + 2_500_000 - 1)/2_500_000 : 2;
reg I2C_CLOCK;
reg [31:0] cnt;
@@ -38,10 +46,10 @@ always @(posedge CLK) begin
end
assign I2C_SCL = (SCLK | I2C_CLOCK) ? 1'bZ : 1'b0;
assign I2C_SDA = SDO[3] ? 1'bz : 1'b0;
assign I2C_SDA = SDO[SDA_DELAY_STAGES-1] ? 1'bz : 1'b0;
reg SCLK;
reg [3:0] SDO;
reg [SDA_DELAY_STAGES-1:0] SDO;
reg [0:7] rdata;
reg [5:0] SD_COUNTER;
@@ -51,7 +59,7 @@ initial begin
SD_COUNTER = 'b111111;
SD = 'hFFFF;
SCLK = 1;
SDO = 4'b1111;
SDO = {SDA_DELAY_STAGES{1'b1}};
end
assign I2C_RDATA = rdata;
@@ -66,11 +74,11 @@ always @(posedge CLK) begin
// delay to make sure SDA changed while SCL is stabilized at low
if(old_clk && ~I2C_CLOCK && ~SD_COUNTER[5]) SDO[0] <= SD[SD_COUNTER[4:0]];
SDO[3:1] <= SDO[2:0];
SDO[SDA_DELAY_STAGES-1:1] <= SDO[SDA_DELAY_STAGES-2:0];
if(~old_st && START) begin
SCLK <= 1;
SDO <= 4'b1111;
SDO <= {SDA_DELAY_STAGES{1'b1}};
ACK <= 0;
END <= 0;
rd <= READ;
+5 -1
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.
//
// MCP23009
// (C) 2019 Alexey Melnikov
@@ -24,7 +26,9 @@ reg rw;
wire [7:0] dout;
reg [15:0] din;
i2c #(50_000_000, 500_000) i2c
// Fast-mode profile: symmetric 2 us half-periods leave margin for the
// specified 1.3 us minimum low time, finite board edges and FPGA propagation.
i2c #(50_000_000, 250_000) i2c
(
.CLK(clk),
.START(start),