Skip to content

Commit

Permalink
fix #7ffd port decoding; 3dos ports now available only with +3 rom
Browse files Browse the repository at this point in the history
This commit improve compatibility with bunch of software like:
- Test 4.30
- Eye Ache 2 by Code Busters
- 70908 by Scoopex (trd version)
- Void by Invaders (RU version)
  • Loading branch information
UzixLS committed Apr 24, 2021
1 parent 4b7b385 commit 36aabee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpld/rev.CD/top.v
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ end


/* PORT #7FFD */
wire port_7ffd_cs = n_ioreq == 0 && xa[1] == 0 && xa[15] == 0 && xa[14] == 1'b1;
wire port_7ffd_cs = n_ioreq == 0 && xa[1] == 0 && xa[15] == 0 && (xa[14] == 1'b1 || !rom_plus3);
reg vbank;
reg rombank128;
reg lock_7ffd;
Expand Down Expand Up @@ -666,7 +666,7 @@ end


/* PORT #1FFD */
wire port_1ffd_cs = !extlock && n_ioreq == 0 && xa == 16'h1FFD;
wire port_1ffd_cs = rom_plus3 && n_ioreq == 0 && xa == 16'h1FFD;
reg [2:0] p1ffd;
always @(posedge clk28 or negedge rst_n0) begin
if (!rst_n0) begin
Expand All @@ -681,7 +681,7 @@ end


/* PORTS #2FFD & #3FFD (+3DOS) */
wire port_2ffd_3ffd_cs = !extlock && n_ioreq == 0 && (xa == 16'h2FFD || xa == 16'h3FFD);
wire port_2ffd_3ffd_cs = rom_plus3 && n_ioreq == 0 && (xa == 16'h2FFD || xa == 16'h3FFD);
always @(posedge clk28 or negedge rst_n0) begin
if (!rst_n0) begin
plus3_dwr <= 1'b1;
Expand Down
Binary file modified out/cpld.rev.C1.pof
Binary file not shown.
Binary file modified out/cpld.rev.D1.pof
Binary file not shown.

0 comments on commit 36aabee

Please sign in to comment.