RS-232 Pak: decode in any MPI slot; clock the receiver from the baud generator
Two bugs kept the FujiNet HDB-DOS SY6551 carts from working:
- $FF68-$FF6B were decoded only when the Multi-Pak I/O select was slot 1
(MPI_SCS == 0), which the OSD cannot select. With the cart in slot 3 the
6551 was unreachable: HDB-DOS polled status forever and sent nothing. On a
real CoCo the SCS line covers only $FF40-$FF5F and the RS-232 Pak decodes
$FF68 itself, so it now answers in any slot.
- With CTL bit 4 = 0 ("external receive clock") the receiver ran off the fixed
1.8475 MHz enable, i.e. 115,200 baud. HDBDW3L3_19200.CCC writes CTL=$0F, so
it transmitted at 19,200 and received at 115,200 -- every DriveWire sector
failed its checksum. The receiver now uses the baud generator (RX_CLK =
TX_CLK); unchanged for CTL=$1x and for baud select 0.
Verified in the Verilator sim against the real FujiNet daemon (FujiNet-PC):
the L3 cart at 19,200 loads FujiNet CONFIG with no checksum errors.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
8b8cf72d1f
commit
aae1ceabf1
2 files changed
+11
-6
No files matched your search
@@ -308,8 +308,12 @@ end
|
|||||||
assign TX_CLK = (CTL_REG[3:0] == 4'h0) ? XTAL_CLK_IN:
|
assign TX_CLK = (CTL_REG[3:0] == 4'h0) ? XTAL_CLK_IN:
|
||||||
TX_CLK_REG;
|
TX_CLK_REG;
|
||||||
|
|
||||||
assign RX_CLK = (CTL_REG[4] == 1'b0) ? RX_CLK_IN:
|
// Receiver clock. CTL bit 4 = 0 selects the external RxC input, which used to
|
||||||
TX_CLK;
|
// be the fixed 1.8475 MHz enable (115,200 baud): a program writing CTL=$0F
|
||||||
|
// (19,200, bit 4 clear -- the FujiNet HDB-DOS L3 cart) then transmitted at
|
||||||
|
// 19,200 but received at 115,200. RxC is taken from the baud generator
|
||||||
|
// instead; for CTL[3:0]=0 that is the same 1.8475 MHz clock as before.
|
||||||
|
assign RX_CLK = TX_CLK;
|
||||||
|
|
||||||
assign RESET_X = RESET_NX ? 1'b0:
|
assign RESET_X = RESET_NX ? 1'b0:
|
||||||
RESET_N;
|
RESET_N;
|
||||||
|
|||||||
+5
-4
@@ -896,10 +896,11 @@ assign SDC_EN_CS = ({MPI_SCS, ADDRESS[15:5]} == 13'b0111111111010) ? 1'b1:
|
|||||||
1'b0;
|
1'b0;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
//assign RS232_EN = ({MPI_SCS, ADDRESS[15:2]} == 16'b0011111111011010) ? 1'b1: //FF68-FF6B - Now in slot 1
|
// FF68-FF6B: the RS-232 Pak decodes these itself from the address bus; the
|
||||||
// 1'b0 ;
|
// Multi-Pak's SCS only covers FF40-FF5F. Gating on MPI_SCS (slot 1 originally,
|
||||||
|
// later slots 2 and 4) left the 6551 unreachable with a cart in slot 3, e.g.
|
||||||
assign RS232_EN = ({MPI_SCS[0], ADDRESS[15:2]} == 15'b111111111011010) ? 1'b1: //FF68-FF6B - Now in slot 2 and 4
|
// the FujiNet HDB-DOS SY6551 cart, which can only boot from slot 3.
|
||||||
|
assign RS232_EN = (ADDRESS[15:2] == 14'b11111111011010) ? 1'b1: //FF68-FF6B, any slot
|
||||||
1'b0;
|
1'b0;
|
||||||
|
|
||||||
assign SLOT3_HW = ({SWITCH[2:1], ADDRESS[15:5]} == 13'b1011111111010) ? 1'b1: // FF40-FF5F Ensure this only appears in slot 3 PHYSICALLY
|
assign SLOT3_HW = ({SWITCH[2:1], ADDRESS[15:5]} == 13'b1011111111010) ? 1'b1: // FF40-FF5F Ensure this only appears in slot 3 PHYSICALLY
|
||||||
|
|||||||
Reference in new issue
Block a user