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

+59 -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: CoCo3FPGA Version 4.0
// File Name: uart_6551.v
@@ -133,6 +135,7 @@ reg TX_START;
reg TDRE;
reg RDRF;
reg [10:0] TX_CLK_DIV;
reg [3:0] baud_select;
wire TX_CLK;
wire RX_CLK;
wire FRAME_BUF;
@@ -151,6 +154,22 @@ reg [1:0] READ_STATE;
wire GOT_DATA;
reg READY0;
reg READY1;
// Research: independent async-assert, synchronous-release reset trees.
// CPU state consumes falling edges; release its reset on rising edges.
(* preserve *) reg [1:0] cpu_reset_release = 2'b00;
(* preserve *) reg [1:0] serial_reset_release = 2'b00;
wire CPU_RESET_N = cpu_reset_release[1];
wire SERIAL_RESET_N = serial_reset_release[1];
wire SOFTWARE_RESET = ({RW_N, CS, RS} == 5'b00101);
always @(posedge CLK or negedge RESET_N)
if (!RESET_N) cpu_reset_release <= 2'b00;
else cpu_reset_release <= {cpu_reset_release[0], 1'b1};
// Software reset request is held in the CPU domain until its next bus event.
// Only these synchronizer async inputs see the unsynchronized reset sources.
always @(posedge CLK or negedge RESET_X)
if (!RESET_X) serial_reset_release <= 2'b00;
else serial_reset_release <= {serial_reset_release[0], 1'b1};
/*
Baud rate divisors
(for toggle of baud clock bit)
@@ -173,16 +192,23 @@ F 19200 3
//assign TX_CLK_REG = TX_CLK_REG_T & XTAL_CLK_IN;
always @ (negedge CLK or negedge RESET_X)
always @ (negedge CLK or negedge SERIAL_RESET_N)
begin
if(!RESET_X)
if(!SERIAL_RESET_N)
begin
TX_CLK_DIV <= 11'h000;
baud_select <= 0;
TX_CLK_REG_T <= 1'b0;
TX_CLK_REG <= 1'b0;
end
else
begin
else if (baud_select != CTL_REG[3:0]) begin
baud_select <= CTL_REG[3:0];
TX_CLK_DIV <= 0;
TX_CLK_REG_T <= 0;
TX_CLK_REG <= 0;
end
else
begin
TX_CLK_REG <= 1'b0;
if (XTAL_CLK_IN)
begin
@@ -314,9 +340,10 @@ assign RX_CLK = (CTL_REG[4] == 1'b0) ? RX_CLK_IN:
assign RESET_X = RESET_NX ? 1'b0:
RESET_N;
always @ (negedge CLK)
always @ (negedge CLK or negedge SERIAL_RESET_N)
begin
if (TX_CLK)
if (!SERIAL_RESET_N) LOOPBACK <= 0;
else if (TX_CLK)
LOOPBACK <= {LOOPBACK[6:0], TX_DATA}; //half bit time FIFO
end
@@ -347,9 +374,9 @@ assign STOP = (CTL_REG[7] == 1'b0) ? 1'b0: // Stop = 1
assign PAR_DIS = ~CMD_REG[5];
assign WORD_SELECT = CTL_REG[6:5];
always @ (negedge CLK or negedge RESET_N)
always @ (negedge CLK or negedge CPU_RESET_N)
begin
if(!RESET_N)
if(!CPU_RESET_N)
RESET_NX <= 1'b1;
else
begin
@@ -361,9 +388,29 @@ begin
end
end
always @ (negedge CLK or negedge RESET_X)
always @ (negedge CLK or negedge CPU_RESET_N)
begin
if(!RESET_X)
if(!CPU_RESET_N)
begin
RDRF <= 1'b0;
READ_STATE <= 2'b00;
TX_BUFFER <= 8'h00;
CTL_REG <= 8'h00;
// Commador data sheet says reset value is 02
// but Apple will not work unless it is 00
CMD_REG <= 8'h00;
TDRE <= 1'b1;
TX_START <= 1'b0;
RX_REG <= 8'h00;
OVERRUN <= 1'b0;
FRAME <= 1'b0;
PARITY <= 1'b0;
TX_DONE1 <= 1'b1;
TX_DONE0 <= 1'b1;
READY0 <= 1'b0;
READY1 <= 1'b0;
end
else if (RESET_NX || (PH_2 && SOFTWARE_RESET))
begin
RDRF <= 1'b0;
READ_STATE <= 2'b00;
@@ -477,7 +524,7 @@ begin
end
uart51_tx tx(
.RESET_N(RESET_X),
.RESET_N(SERIAL_RESET_N),
.CLK(CLK),
.BAUD_CLK(TX_CLK),
.TX_DATA(TX_DATA),
@@ -492,7 +539,7 @@ uart51_tx tx(
);
uart51_rx rx(
.RESET_N(RESET_X),
.RESET_N(SERIAL_RESET_N),
.CLK(CLK),
.BAUD_CLK(RX_CLK),
.RX_DATA(RX_DATA),