Remove secondary HDD support (buggy).
This commit is contained in:
parent
ff4837d9e2
commit
bc370736d3
17
MacPlus.sv
17
MacPlus.sv
|
@ -144,8 +144,7 @@ localparam CONF_STR = {
|
|||
"F1,DSK,Mount Pri Floppy;",
|
||||
"F2,DSK,Mount Sec Floppy;",
|
||||
"-;",
|
||||
"S0,VHD,Mount HDD-0(#2);",
|
||||
"S1,VHD,Mount HDD-1(#6);",
|
||||
"S0,VHD,Mount HDD;",
|
||||
"-;",
|
||||
"O8,Aspect ratio,4:3,16:9;",
|
||||
"O9A,Memory,512KB,1MB,4MB;",
|
||||
|
@ -218,11 +217,9 @@ wire [1:0] diskMotor, diskAct, diskEject;
|
|||
// the status register is controlled by the on screen display (OSD)
|
||||
wire [31:0] status;
|
||||
wire [1:0] buttons;
|
||||
wire [1:0] img_mounted;
|
||||
wire [15:0] sd_req_type;
|
||||
wire [31:0] sd_lba;
|
||||
wire [1:0] sd_rd;
|
||||
wire [1:0] sd_wr;
|
||||
wire sd_rd;
|
||||
wire sd_wr;
|
||||
wire sd_ack;
|
||||
wire [8:0] sd_buff_addr;
|
||||
wire [7:0] sd_buff_dout;
|
||||
|
@ -253,7 +250,7 @@ always @(posedge clk_sys) begin
|
|||
end
|
||||
end
|
||||
|
||||
hps_io #(.STRLEN($size(CONF_STR)>>3), .VDNUM(2)) hps_io
|
||||
hps_io #(.STRLEN($size(CONF_STR)>>3)) hps_io
|
||||
(
|
||||
.clk_sys(clk_sys),
|
||||
.HPS_BUS(HPS_BUS),
|
||||
|
@ -263,9 +260,6 @@ hps_io #(.STRLEN($size(CONF_STR)>>3), .VDNUM(2)) hps_io
|
|||
.buttons(buttons),
|
||||
.status(status),
|
||||
|
||||
.img_mounted(img_mounted),
|
||||
|
||||
.sd_req_type(sd_req_type),
|
||||
.sd_lba(sd_lba),
|
||||
.sd_rd(sd_rd),
|
||||
.sd_wr(sd_wr),
|
||||
|
@ -471,11 +465,8 @@ dataController_top dc0
|
|||
|
||||
.diskMotor(diskMotor),
|
||||
.diskAct(diskAct),
|
||||
|
||||
.img_mounted(img_mounted),
|
||||
|
||||
// block device interface for scsi disk
|
||||
.io_req_type(sd_req_type),
|
||||
.io_lba(sd_lba),
|
||||
.io_rd(sd_rd),
|
||||
.io_wr(sd_wr),
|
||||
|
|
|
@ -67,13 +67,10 @@ module dataController_top(
|
|||
input dskReadAckExt,
|
||||
|
||||
// connections to io controller
|
||||
input [1:0] img_mounted,
|
||||
|
||||
output [15:0] io_req_type,
|
||||
output [31:0] io_lba,
|
||||
output [1:0] io_rd,
|
||||
output [1:0] io_wr,
|
||||
input io_ack,
|
||||
output [31:0] io_lba,
|
||||
output io_rd,
|
||||
output io_wr,
|
||||
input io_ack,
|
||||
|
||||
input [8:0] sd_buff_addr,
|
||||
input [7:0] sd_buff_dout,
|
||||
|
@ -164,9 +161,6 @@ ncr5380 scsi
|
|||
.rdata(scsiDataOut),
|
||||
|
||||
// connections to io controller
|
||||
.img_mounted( img_mounted ),
|
||||
|
||||
.io_req_type( io_req_type ),
|
||||
.io_lba ( io_lba ),
|
||||
.io_rd ( io_rd ),
|
||||
.io_wr ( io_wr ),
|
||||
|
|
|
@ -62,12 +62,9 @@ module ncr5380
|
|||
|
||||
|
||||
// connections to io controller
|
||||
input [1:0] img_mounted,
|
||||
|
||||
output [15:0] io_req_type,
|
||||
output [31:0] io_lba,
|
||||
output [1:0] io_rd,
|
||||
output [1:0] io_wr,
|
||||
output io_rd,
|
||||
output io_wr,
|
||||
input io_ack,
|
||||
|
||||
input [8:0] sd_buff_addr,
|
||||
|
@ -240,7 +237,6 @@ module ncr5380
|
|||
wire scsi_bsy =
|
||||
icr[`ICR_A_BSY] |
|
||||
scsi2_bsy |
|
||||
scsi6_bsy |
|
||||
mr[`MR_ARB];
|
||||
|
||||
/* Remains of simplified arbitration logic */
|
||||
|
@ -257,28 +253,17 @@ module ncr5380
|
|||
wire scsi_atn = icr[`ICR_A_ATN];
|
||||
|
||||
/* Other trivial lines set by target */
|
||||
wire scsi_cd = (scsi2_bsy) ? scsi2_cd : scsi6_cd;
|
||||
wire scsi_io = (scsi2_bsy) ? scsi2_io : scsi6_io;
|
||||
wire scsi_msg = (scsi2_bsy) ? scsi2_msg : scsi6_msg;
|
||||
wire scsi_req = (scsi2_bsy) ? scsi2_req : scsi6_req;
|
||||
|
||||
assign din = scsi2_bsy ? scsi2_dout :
|
||||
scsi6_bsy ? scsi6_dout :
|
||||
8'h55;
|
||||
|
||||
assign io_lba = (scsi2_bsy) ? io_lba_2 : io_lba_6;
|
||||
assign sd_buff_din = (scsi2_bsy) ? sd_buff_din_2 : sd_buff_din_6;
|
||||
assign io_req_type = 16'h0000; // Not used atm. Could be used for CD-ROM sector requests later. ElectronAsh.
|
||||
|
||||
wire scsi_cd = scsi2_cd;
|
||||
wire scsi_io = scsi2_io;
|
||||
wire scsi_msg = scsi2_msg;
|
||||
wire scsi_req = scsi2_req;
|
||||
|
||||
assign din = scsi2_bsy?scsi2_dout:8'h55;
|
||||
|
||||
// input signals from target 2
|
||||
wire scsi2_bsy, scsi2_msg, scsi2_io, scsi2_cd, scsi2_req;
|
||||
wire [7:0] scsi2_dout;
|
||||
|
||||
wire [31:0] io_lba_2;
|
||||
wire [7:0] sd_buff_din_2;
|
||||
|
||||
|
||||
// connect a target
|
||||
scsi #(.ID(2)) scsi2
|
||||
(
|
||||
|
@ -286,68 +271,26 @@ module ncr5380
|
|||
.rst ( scsi_rst ),
|
||||
.sel ( scsi_sel ),
|
||||
.atn ( scsi_atn ),
|
||||
|
||||
.ack ( scsi_ack ),
|
||||
|
||||
.bsy ( scsi2_bsy ),
|
||||
.msg ( scsi2_msg ),
|
||||
.cd ( scsi2_cd ),
|
||||
.io ( scsi2_io ),
|
||||
.req ( scsi2_req ),
|
||||
.ack ( scsi_ack ),
|
||||
.dout ( scsi2_dout ),
|
||||
|
||||
.din ( dout ),
|
||||
|
||||
// connection to io controller to read and write sectors
|
||||
// to sd card
|
||||
.io_lba ( io_lba_2 ),
|
||||
.io_rd ( io_rd[0] ),
|
||||
.io_wr ( io_wr[0] ),
|
||||
.io_ack ( io_ack & scsi2_bsy ),
|
||||
.io_lba ( io_lba ),
|
||||
.io_rd ( io_rd ),
|
||||
.io_wr ( io_wr ),
|
||||
.io_ack ( io_ack ),
|
||||
|
||||
.sd_buff_addr( sd_buff_addr ),
|
||||
.sd_buff_dout( sd_buff_dout ),
|
||||
.sd_buff_din( sd_buff_din_2 ),
|
||||
.sd_buff_wr( sd_buff_wr & scsi2_bsy )
|
||||
);
|
||||
|
||||
|
||||
// input signals from target 6
|
||||
wire scsi6_bsy, scsi6_msg, scsi6_io, scsi6_cd, scsi6_req;
|
||||
wire [7:0] scsi6_dout;
|
||||
|
||||
wire [31:0] io_lba_6;
|
||||
wire [7:0] sd_buff_din_6;
|
||||
|
||||
scsi #(.ID(6)) scsi6
|
||||
(
|
||||
.clk ( clk ) , // input clk
|
||||
.rst ( scsi_rst ) , // input rst
|
||||
.sel ( scsi_sel ) , // input sel
|
||||
.atn ( scsi_atn ) , // input atn
|
||||
|
||||
.ack ( scsi_ack ) , // input ack
|
||||
|
||||
.bsy ( scsi6_bsy ) , // output bsy
|
||||
.msg ( scsi6_msg ) , // output msg
|
||||
.cd ( scsi6_cd ) , // output cd
|
||||
.io ( scsi6_io ) , // output io
|
||||
.req ( scsi6_req ) , // output req
|
||||
.dout ( scsi6_dout ) , // output [7:0] dout
|
||||
|
||||
.din ( dout ) , // input [7:0] din
|
||||
|
||||
// connection to io controller to read and write sectors
|
||||
// to sd card
|
||||
.io_lba ( io_lba_6 ) , // output [31:0] io_lba
|
||||
.io_rd ( io_rd[1] ) , // output io_rd
|
||||
.io_wr ( io_wr[1] ) , // output io_wr
|
||||
.io_ack ( io_ack & scsi6_bsy ) , // input io_ack
|
||||
|
||||
.sd_buff_addr( sd_buff_addr ) , // input [8:0] sd_buff_addr
|
||||
.sd_buff_dout( sd_buff_dout ) , // input [7:0] sd_buff_dout
|
||||
.sd_buff_din( sd_buff_din_6 ) , // output [7:0] sd_buff_din
|
||||
.sd_buff_wr( sd_buff_wr & scsi6_bsy ) // input sd_buff_wr
|
||||
.sd_buff_addr(sd_buff_addr),
|
||||
.sd_buff_dout(sd_buff_dout),
|
||||
.sd_buff_din(sd_buff_din),
|
||||
.sd_buff_wr(sd_buff_wr)
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ module scsi
|
|||
|
||||
|
||||
// SCSI device id
|
||||
parameter [7:0] ID = 0;
|
||||
parameter ID = 0;
|
||||
|
||||
`define PHASE_IDLE 3'd0
|
||||
`define PHASE_CMD_IN 3'd1
|
||||
|
@ -104,12 +104,11 @@ wire [7:0] inquiry_dout =
|
|||
|
||||
(data_cnt == 32'd26)?"S":(data_cnt == 32'd27)?"T":
|
||||
(data_cnt == 32'd28)?"2":(data_cnt == 32'd29)?"2":
|
||||
(data_cnt == 32'd30)?"5":(data_cnt == 32'd31)?"N" + ID: // TESTING. ElectronAsh.
|
||||
(data_cnt == 32'd30)?"5":(data_cnt == 32'd31)?"N":
|
||||
8'h00;
|
||||
|
||||
// output of read capacity command
|
||||
//wire [31:0] capacity = 32'd41056; // 40960 + 96 blocks = 20MB
|
||||
wire [31:0] capacity = 32'd1024096; // 1024000 + 96 blocks = 500MB
|
||||
wire [31:0] capacity = 32'd41056; // 40960 + 96 blocks = 20MB
|
||||
wire [31:0] capacity_m1 = capacity - 32'd1;
|
||||
wire [7:0] read_capacity_dout =
|
||||
(data_cnt == 32'd0 )?capacity_m1[31:24]:
|
||||
|
|
Loading…
Reference in New Issue