1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-01-18 17:06:57 +00:00

Merge pull request #120 from gyurco/master

MC6809 fix
This commit is contained in:
Marcel 2021-06-11 02:49:40 +02:00 committed by GitHub
commit 1b8fc108ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 9 deletions

View File

@ -291,7 +291,7 @@ end
wire [15:0] mA;
wire [7:0] mD_out;
wire m_rw;
/*
cpu09 u12G
(
.clk(~clk_49m),
@ -306,14 +306,13 @@ cpu09 u12G
.firq(0),
.nmi(0)
);
*/
/*
// buggy (playfield scrolling is broken with this CPU)
mc6809is u12G
(
.CLK(clk_49m),
.fallE_en(n_me_en),
.fallQ_en(n_mq_en),
.CLK(clk_49m),
.fallE_en(n_me_en),
.fallQ_en(n_mq_en),
.D(mD_in),
.DOut(mD_out),
.ADDR(mA),
@ -325,7 +324,7 @@ mc6809is u12G
.nRESET(n_res),
.nDMABREQ(1'b1)
);
*/
//Multiplex data inputs to primary MC6809E
wire [7:0] mD_in =
sndbrd_dir ? sndbrd_D:

View File

@ -1971,10 +1971,13 @@ begin
else if (Inst1 == OPCODE_INH_SEX)
begin
a_nxt = {8{b[7]}};
cc_nxt[CC_N_BIT] = b[7];
cc_nxt[CC_Z_BIT] = {b == 8'H00};
cc_nxt[CC_V_BIT] = 1'b0;
rLIC = 1'b1; // Instruction done!
rAVMA = 1'b1;
CpuState_nxt = CPUSTATE_FETCH_I1;
end
end
else if (Inst1 == OPCODE_INH_ABX)
begin
x_nxt = x + b;

View File

@ -1969,10 +1969,13 @@ begin
else if (Inst1 == OPCODE_INH_SEX)
begin
a_nxt = {8{b[7]}};
cc_nxt[CC_N_BIT] = b[7];
cc_nxt[CC_Z_BIT] = {b == 8'H00};
cc_nxt[CC_V_BIT] = 1'b0;
rLIC = 1'b1; // Instruction done!
rAVMA = 1'b1;
CpuState_nxt = CPUSTATE_FETCH_I1;
end
end
else if (Inst1 == OPCODE_INH_ABX)
begin
x_nxt = x + b;