summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-04-21 03:41:51 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-04-21 03:41:51 +0000
commitcb8514a175a4d444d34efdba49f4b307ac110815 (patch)
tree6f018b5fe0e98d6917e78626a28fc34f814e87d2 /src/emu
parentaf71decdb7943d7d0e2c19682dc8045557f54e72 (diff)
From: Miodrag Milanovic
Hello Aaron, I have found few more things not ok in T11, this time I have fixed it myself. 1. HALT - should call interrupt vector 2. ILLEGAL - had PC=0 at the end which makes code not run fine 3. MARK - now it is implemented Can you please check if your drivers are working fine with these cahanges. After adjustments I have some things working finaly. Please inform me, Miodrag Milanovic
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/t11/t11ops.c25
-rw-r--r--src/emu/cpu/t11/t11table.c7
2 files changed, 27 insertions, 5 deletions
diff --git a/src/emu/cpu/t11/t11ops.c b/src/emu/cpu/t11/t11ops.c
index 490d674846a..80af765ac1f 100644
--- a/src/emu/cpu/t11/t11ops.c
+++ b/src/emu/cpu/t11/t11ops.c
@@ -255,7 +255,7 @@ static void op_0000(void)
{
switch (t11.op & 0x3f)
{
- case 0x00: /* HALT */ t11_ICount = 0; break;
+ case 0x00: /* HALT */ halt(); break;
case 0x01: /* WAIT */ t11_ICount = 0; t11.wait_state = 1; break;
case 0x02: /* RTI */ t11_ICount -= 24; PC = POP(); PSW = POP(); change_pc(PC); t11_check_irqs(); break;
case 0x03: /* BPT */ t11_ICount -= 48; PUSH(PSW); PUSH(PC); PC = RWORD(0x0c); PSW = RWORD(0x0e); change_pc(PC); t11_check_irqs(); break;
@@ -266,6 +266,17 @@ static void op_0000(void)
}
}
+static void halt(void)
+{
+ t11_ICount -= 48;
+ PUSH(PSW);
+ PUSH(PC);
+ PC = RWORD(0x04);
+ PSW = RWORD(0x06);
+ change_pc(PC);
+ t11_check_irqs();
+}
+
static void illegal(void)
{
t11_ICount -= 48;
@@ -275,7 +286,17 @@ static void illegal(void)
PSW = RWORD(0x0a);
change_pc(PC);
t11_check_irqs();
-PC = 0;
+}
+
+static void mark(void)
+{
+ t11_ICount -= 36;
+
+ SP = SP + 2 * (t11.op & 0x3f);
+ PC = REGW(5);
+ REGW(5) = POP();
+
+ change_pc(PC);
}
static void jmp_rgd(void) { t11_ICount -= 15; { JMP(RGD); } }
diff --git a/src/emu/cpu/t11/t11table.c b/src/emu/cpu/t11/t11table.c
index fa355962381..3c32e043ef0 100644
--- a/src/emu/cpu/t11/t11table.c
+++ b/src/emu/cpu/t11/t11table.c
@@ -21,6 +21,7 @@ modes:
*/
static void op_0000(void);
+static void halt(void);
static void illegal(void);
static void jmp_rgd(void);
@@ -168,7 +169,7 @@ static void asl_ded(void);
static void asl_ix(void);
static void asl_ixd(void);
-/*static void mark(void);*/
+static void mark(void);
static void sxt_rg(void);
static void sxt_rgd(void);
@@ -1112,7 +1113,7 @@ static void sub_ixd_ixd(void);
static void (*const opcode_table[65536 >> 3])(void) =
{
/* 0x0000 */
- op_0000, illegal, illegal, illegal, illegal, illegal, illegal, illegal,
+ op_0000, halt, illegal, illegal, illegal, illegal, illegal, illegal,
illegal, jmp_rgd, jmp_in, jmp_ind, jmp_de, jmp_ded, jmp_ix, jmp_ixd,
rts, illegal, illegal, illegal, ccc, ccc, scc, scc,
swab_rg, swab_rgd, swab_in, swab_ind, swab_de, swab_ded, swab_ix, swab_ixd,
@@ -1177,7 +1178,7 @@ static void (*const opcode_table[65536 >> 3])(void) =
asr_rg, asr_rgd, asr_in, asr_ind, asr_de, asr_ded, asr_ix, asr_ixd,
asl_rg, asl_rgd, asl_in, asl_ind, asl_de, asl_ded, asl_ix, asl_ixd,
/* 0x0d00 */
- illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal,
+ mark, mark, mark, mark, mark, mark, mark, mark,
illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal,
illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal,
sxt_rg, sxt_rgd, sxt_in, sxt_ind, sxt_de, sxt_ded, sxt_ix, sxt_ixd,