summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2025-11-24 11:08:13 +0100
committer Olivier Galibert <galibert@pobox.com>2025-11-24 11:08:13 +0100
commit242ecf301b4d6ba1bf665c1af2219ff924cd75d3 (patch)
tree26daabb88bd26298bbf100e88393d92de6f3efc1
parent6684235954f327e3b9186a13d032ad09d9de451a (diff)
(ut)dsp563xx: Lots of fixes
-rw-r--r--src/devices/cpu/dsp563xx/dsp563xx-interp.cpp24
-rw-r--r--src/devices/cpu/dsp563xx/dsp563xx.cpp4
-rw-r--r--src/devices/cpu/dsp563xx/dsp563xx.h9
-rw-r--r--src/devices/cpu/dsp563xx/dsp563xx.lst5
-rw-r--r--src/mame/virtual/dsp563xx.ipp499
-rw-r--r--src/mame/virtual/dsp563xx.lst6
-rw-r--r--src/mame/virtual/utdsp563xx.cpp66
7 files changed, 320 insertions, 293 deletions
diff --git a/src/devices/cpu/dsp563xx/dsp563xx-interp.cpp b/src/devices/cpu/dsp563xx/dsp563xx-interp.cpp
index 681c4f0cc63..91a2b1104cc 100644
--- a/src/devices/cpu/dsp563xx/dsp563xx-interp.cpp
+++ b/src/devices/cpu/dsp563xx/dsp563xx-interp.cpp
@@ -16,11 +16,17 @@ void dsp563xx_device::execute_ipar(u16 kipar)
break;
}
case 2: { // abs a
- unhandled("abs a");
+ u64 d = get_a();
+ if(d & 0x80000000000000) {
+ set_a((-d) & 0xffffffffffffff);
+ }
break;
}
case 3: { // abs b
- unhandled("abs b");
+ u64 d = get_b();
+ if(d & 0x80000000000000) {
+ set_b((-d) & 0xffffffffffffff);
+ }
break;
}
case 4: { // adc x,a
@@ -28104,16 +28110,14 @@ void dsp563xx_device::execute_npar(u16 knpar, u32 opcode, u32 exv)
break;
}
case 156: { // add #[i],a
- u32 i = exv;
u64 d = get_a();
- logerror("i=%x\n", util::sext(u64(i) << 24, 48));
+ u32 i = exv;
set_a(do_add56(util::sext(u64(i) << 24, 48), d));
break;
}
case 157: { // add #[i],b
- u32 i = exv;
u64 d = get_b();
- logerror("i=%x\n", util::sext(u64(i) << 24, 48));
+ u32 i = exv;
set_b(do_add56(util::sext(u64(i) << 24, 48), d));
break;
}
@@ -56653,25 +56657,25 @@ void dsp563xx_device::execute_npar(u16 knpar, u32 opcode, u32 exv)
case 4177: { // sub #[i],a
u64 d = get_a();
u32 i = BIT(opcode, 8, 6);
- d = do_sub56(u64(i) << 24, d);
+ set_a(do_sub56(u64(i) << 24, d));
break;
}
case 4178: { // sub #[i],b
u64 d = get_b();
u32 i = BIT(opcode, 8, 6);
- d = do_sub56(u64(i) << 24, d);
+ set_b(do_sub56(u64(i) << 24, d));
break;
}
case 4179: { // sub #[i],a
u64 d = get_a();
u32 i = exv;
- d = do_sub56(util::sext(i << 24, 48), d);
+ set_a(do_sub56(util::sext(u64(i) << 24, 48), d));
break;
}
case 4180: { // sub #[i],b
u64 d = get_b();
u32 i = exv;
- d = do_sub56(util::sext(i << 24, 48), d);
+ set_b(do_sub56(util::sext(u64(i) << 24, 48), d));
break;
}
case 4181: { // tcc b,a
diff --git a/src/devices/cpu/dsp563xx/dsp563xx.cpp b/src/devices/cpu/dsp563xx/dsp563xx.cpp
index 7edc2f8d4de..475f499768e 100644
--- a/src/devices/cpu/dsp563xx/dsp563xx.cpp
+++ b/src/devices/cpu/dsp563xx/dsp563xx.cpp
@@ -180,8 +180,8 @@ void dsp563xx_device::execute_run()
m_npc = (m_pc + (ex ? 2 : 1)) & 0xffffff;
m_rep = false;
}
- }
- else {
+
+ } else {
m_npc = (m_pc + (ex ? 2 : 1)) & 0xffffff;
if(loop) {
if(m_lc != 1 || (m_emr & EMR_FV)) {
diff --git a/src/devices/cpu/dsp563xx/dsp563xx.h b/src/devices/cpu/dsp563xx/dsp563xx.h
index dc818076a3e..b4b98926106 100644
--- a/src/devices/cpu/dsp563xx/dsp563xx.h
+++ b/src/devices/cpu/dsp563xx/dsp563xx.h
@@ -152,15 +152,17 @@ protected:
inline void set_omr(u32 v) { m_omr = v; }
inline void set_sc(u32 v) { m_sc = v; }
inline void set_sp(u32 v) { m_sp = v; }
- inline void set_sr(u32 v) { m_emr = v >> 16; m_mr = v >> 8; m_ccr = v; }
+ inline void set_sr(u32 v) { m_emr = (v >> 16) & 0xfb; m_mr = (v >> 8) & 0xef; m_ccr = v; }
inline void set_ssh(u32 v) { m_stackh[m_sp] = v; }
inline void set_ssl(u32 v) { m_stackl[m_sp] = v; }
inline void set_sz(u32 v) { m_sz = v; }
inline void set_vba(u32 v) { m_vba = v; }
- inline void set_mr(u8 v) { m_mr = v; }
inline void set_ccr(u8 v) { m_ccr = v; }
+ inline void set_mr(u8 v) { m_mr = v & 0xef; }
+ inline void set_emr(u8 v) { m_emr = v & 0xfb; }
inline void set_com(u8 v) { m_omr = (m_omr & 0xffff00) | v; }
inline void set_eom(u8 v) { m_omr = (m_omr & 0xff00ff) | (v << 8); }
+ inline void set_scs(u8 v) { m_omr = (m_omr & 0x00ffff) | (v << 16); }
inline u64 get_a() const { return m_a; }
inline u32 get_ah() const { return std::clamp(s32(m_a >> 24), -0x00800000, 0x007fffff) & 0xffffff; }
@@ -199,9 +201,10 @@ protected:
inline u32 get_sz() const { return m_sz; }
inline u32 get_vba() const { return m_vba; }
inline u8 get_mr() const { return m_mr; }
- inline u8 get_ccr() const { return m_mr; }
+ inline u8 get_ccr() const { return m_ccr; }
inline u8 get_com() const { return m_omr; }
inline u8 get_eom() const { return m_omr >> 8; }
+ inline u8 get_scs() const { return m_omr >> 16; }
inline bool test_cc() const { return (m_ccr & CCR_C) == 0; }
inline bool test_ge() const { return (m_ccr & (CCR_N|CCR_V)) == 0 || (m_ccr & (CCR_N|CCR_V)) == (CCR_N|CCR_V); }
diff --git a/src/devices/cpu/dsp563xx/dsp563xx.lst b/src/devices/cpu/dsp563xx/dsp563xx.lst
index 245cb2caecb..b99bca66333 100644
--- a/src/devices/cpu/dsp563xx/dsp563xx.lst
+++ b/src/devices/cpu/dsp563xx/dsp563xx.lst
@@ -1,5 +1,9 @@
....00 -
....26 abs d - d:acc(3)
+ if($d & 0x80000000000000) {
+ $d:w((-$d) & 0xffffffffffffff);
+ }
+
....21 adc s,d - s:xyr(4) d:acc(3)
....10 add s,d - s:nacc(3) d:acc(3)
$d:w(do_add56(util::sext($s, 56), $d));
@@ -329,7 +333,6 @@ c000.. s1,x:eax y:eay,d2 - eax:xyeax(8) eay:xyeay(20, 13, 10) s1:tbrx(18) d2
$d:w(do_add56(u64($i) << 24, $d));
0140c0 add #i,d - d:acc(3) i:eximm()
- logerror("i=%x\n", util::sext(u64($i) << 24, 48));
$d:w(do_add56(util::sext(u64($i) << 24, 48), $d));
014086 and #i,d - i:imm6(8) d:acc(3)
diff --git a/src/mame/virtual/dsp563xx.ipp b/src/mame/virtual/dsp563xx.ipp
index db1f4bbf748..1d6701ea35b 100644
--- a/src/mame/virtual/dsp563xx.ipp
+++ b/src/mame/virtual/dsp563xx.ipp
@@ -688,253 +688,253 @@ const utdsp563xx_state::testlist utdsp563xx_state::testlists[] = {
{ 2745, 2746, 9626, 9629, 9629, 9631 },
{ 2746, 2747, 9631, 9634, 9634, 9636 },
{ 2747, 2749, 9636, 9640, 9640, 9642 },
- { 2749, 2753, 9642, 9644, 9644, 9646 },
- { 2753, 2754, 9646, 9647, 9647, 9648 },
- { 2754, 2755, 9648, 9649, 9649, 9650 },
- { 2755, 2756, 9650, 9651, 9651, 9652 },
- { 2756, 2757, 9652, 9654, 9654, 9656 },
- { 2757, 2758, 9656, 9658, 9658, 9662 },
- { 2758, 2759, 9662, 9664, 9664, 9668 },
- { 2759, 2760, 9668, 9670, 9670, 9674 },
- { 2760, 2761, 9674, 9680, 9680, 9682 },
- { 2761, 2762, 9682, 9683, 9683, 9684 },
- { 2762, 2763, 9684, 9686, 9686, 9687 },
- { 2763, 2764, 9687, 9688, 9688, 9689 },
- { 2764, 2765, 9689, 9690, 9690, 9691 },
- { 2765, 2767, 9691, 9697, 9697, 9699 },
- { 2767, 2768, 9699, 9703, 9703, 9705 },
- { 2768, 2769, 9705, 9706, 9706, 9708 },
- { 2769, 2770, 9708, 9709, 9709, 9711 },
- { 2770, 2772, 9711, 9719, 9719, 9721 },
- { 2772, 2774, 9721, 9723, 9723, 9725 },
- { 2774, 2776, 9725, 9727, 9727, 9729 },
- { 2776, 2777, 9729, 9731, 9731, 9733 },
- { 2777, 2778, 9733, 9735, 9735, 9737 },
- { 2778, 2779, 9737, 9738, 9738, 9740 },
- { 2779, 2781, 9740, 9742, 9742, 9744 },
- { 2781, 2782, 9744, 9745, 9745, 9746 },
- { 2782, 2783, 9746, 9747, 9747, 9748 },
- { 2783, 2784, 9748, 9750, 9750, 9751 },
- { 2784, 2785, 9751, 9753, 9753, 9754 },
- { 2785, 2786, 9754, 9756, 9756, 9757 },
- { 2786, 2787, 9757, 9759, 9759, 9760 },
- { 2787, 2789, 9760, 9763, 9763, 9770 },
- { 2789, 2790, 9770, 9771, 9771, 9772 },
- { 2790, 2791, 9772, 9776, 9776, 9781 },
- { 2791, 2792, 9781, 9784, 9784, 9785 },
- { 2792, 2794, 9785, 9787, 9787, 9788 },
- { 2794, 2795, 9788, 9791, 9791, 9792 },
- { 2795, 2796, 9792, 9793, 9793, 9799 },
- { 2796, 2797, 9799, 9800, 9800, 9806 },
- { 2797, 2798, 9806, 9807, 9807, 9813 },
- { 2798, 2799, 9813, 9815, 9815, 9816 },
- { 2799, 2801, 9816, 9818, 9818, 9819 },
- { 2801, 2804, 9819, 9821, 9821, 9822 },
- { 2804, 2808, 9822, 9824, 9824, 9825 },
- { 2808, 2813, 9825, 9827, 9827, 9828 },
- { 2813, 2819, 9828, 9830, 9830, 9831 },
- { 2819, 2826, 9831, 9833, 9833, 9834 },
- { 2826, 2834, 9834, 9836, 9836, 9837 },
- { 2834, 2843, 9837, 9839, 9839, 9840 },
- { 2843, 2853, 9840, 9842, 9842, 9843 },
- { 2853, 2864, 9843, 9845, 9845, 9846 },
- { 2864, 2876, 9846, 9848, 9848, 9849 },
- { 2876, 2889, 9849, 9851, 9851, 9852 },
- { 2889, 2903, 9852, 9854, 9854, 9855 },
- { 2903, 2918, 9855, 9857, 9857, 9858 },
- { 2918, 2934, 9858, 9860, 9860, 9861 },
- { 2934, 2951, 9861, 9863, 9863, 9864 },
- { 2951, 2969, 9864, 9866, 9866, 9867 },
- { 2969, 2988, 9867, 9869, 9869, 9870 },
- { 2988, 3008, 9870, 9872, 9872, 9873 },
- { 3008, 3029, 9873, 9875, 9875, 9876 },
- { 3029, 3051, 9876, 9878, 9878, 9879 },
- { 3051, 3074, 9879, 9881, 9881, 9882 },
- { 3074, 3098, 9882, 9884, 9884, 9885 },
- { 3098, 3123, 9885, 9887, 9887, 9888 },
- { 3123, 3124, 9888, 9890, 9890, 9891 },
- { 3124, 3126, 9891, 9893, 9893, 9894 },
- { 3126, 3129, 9894, 9896, 9896, 9897 },
- { 3129, 3133, 9897, 9899, 9899, 9900 },
- { 3133, 3138, 9900, 9902, 9902, 9903 },
- { 3138, 3144, 9903, 9905, 9905, 9906 },
- { 3144, 3151, 9906, 9908, 9908, 9909 },
- { 3151, 3159, 9909, 9911, 9911, 9912 },
- { 3159, 3168, 9912, 9914, 9914, 9915 },
- { 3168, 3178, 9915, 9917, 9917, 9918 },
- { 3178, 3189, 9918, 9920, 9920, 9921 },
- { 3189, 3201, 9921, 9923, 9923, 9924 },
- { 3201, 3214, 9924, 9926, 9926, 9927 },
- { 3214, 3228, 9927, 9929, 9929, 9930 },
- { 3228, 3243, 9930, 9932, 9932, 9933 },
- { 3243, 3259, 9933, 9935, 9935, 9936 },
- { 3259, 3276, 9936, 9938, 9938, 9939 },
- { 3276, 3294, 9939, 9941, 9941, 9942 },
- { 3294, 3313, 9942, 9944, 9944, 9945 },
- { 3313, 3333, 9945, 9947, 9947, 9948 },
- { 3333, 3354, 9948, 9950, 9950, 9951 },
- { 3354, 3376, 9951, 9953, 9953, 9954 },
- { 3376, 3399, 9954, 9956, 9956, 9957 },
- { 3399, 3423, 9957, 9959, 9959, 9960 },
- { 3423, 3424, 9960, 9963, 9963, 9965 },
- { 3424, 3425, 9965, 9968, 9968, 9969 },
- { 3425, 3426, 9969, 9972, 9972, 9973 },
- { 3426, 3427, 9973, 9976, 9976, 9977 },
- { 3427, 3428, 9977, 9979, 9979, 9980 },
- { 3428, 3429, 9980, 9982, 9982, 9983 },
- { 3429, 3430, 9983, 9986, 9986, 9987 },
- { 3430, 3432, 9987, 9990, 9990, 9992 },
- { 3432, 3433, 9992, 9994, 9994, 9995 },
- { 3433, 3435, 9995, 9997, 9997, 9998 },
- { 3435, 3437, 9998, 10001, 10001, 10002 },
- { 3437, 3439, 10002, 10003, 10003, 10004 },
- { 3439, 3440, 10004, 10007, 10007, 10008 },
- { 3440, 3441, 10008, 10011, 10011, 10012 },
- { 3441, 3443, 10012, 10016, 10016, 10018 },
- { 3443, 3445, 10018, 10022, 10022, 10024 },
- { 3445, 3446, 10024, 10025, 10025, 10031 },
- { 3446, 3447, 10031, 10032, 10032, 10038 },
- { 3447, 3449, 10038, 10040, 10040, 10041 },
- { 3449, 3450, 10041, 10044, 10044, 10045 },
- { 3450, 3451, 10045, 10050, 10050, 10051 },
- { 3451, 3454, 10051, 10052, 10052, 10053 },
- { 3454, 3455, 10053, 10054, 10054, 10056 },
- { 3455, 3456, 10056, 10057, 10057, 10059 },
- { 3456, 3457, 10059, 10061, 10061, 10062 },
- { 3457, 3458, 10062, 10064, 10064, 10065 },
- { 3458, 3459, 10065, 10066, 10066, 10068 },
- { 3459, 3460, 10068, 10069, 10069, 10071 },
- { 3460, 3461, 10071, 10073, 10073, 10074 },
- { 3461, 3462, 10074, 10076, 10076, 10077 },
- { 3462, 3463, 10077, 10079, 10079, 10081 },
- { 3463, 3464, 10081, 10083, 10083, 10085 },
- { 3464, 3465, 10085, 10087, 10087, 10089 },
- { 3465, 3466, 10089, 10091, 10091, 10093 },
- { 3466, 3467, 10093, 10095, 10095, 10097 },
- { 3467, 3468, 10097, 10101, 10101, 10102 },
- { 3468, 3469, 10102, 10106, 10106, 10107 },
- { 3469, 3470, 10107, 10111, 10111, 10113 },
- { 3470, 3471, 10113, 10119, 10119, 10123 },
- { 3471, 3472, 10123, 10125, 10125, 10126 },
- { 3472, 3473, 10126, 10128, 10128, 10131 },
- { 3473, 3474, 10131, 10133, 10133, 10136 },
- { 3474, 3475, 10136, 10138, 10138, 10141 },
- { 3475, 3476, 10141, 10143, 10143, 10146 },
- { 3476, 3477, 10146, 10148, 10148, 10151 },
- { 3477, 3478, 10151, 10153, 10153, 10156 },
- { 3478, 3479, 10156, 10158, 10158, 10161 },
- { 3479, 3480, 10161, 10163, 10163, 10166 },
- { 3480, 3481, 10166, 10168, 10168, 10171 },
- { 3481, 3482, 10171, 10173, 10173, 10176 },
- { 3482, 3483, 10176, 10178, 10178, 10181 },
- { 3483, 3484, 10181, 10183, 10183, 10186 },
- { 3484, 3485, 10186, 10188, 10188, 10191 },
- { 3485, 3486, 10191, 10193, 10193, 10196 },
- { 3486, 3487, 10196, 10198, 10198, 10199 },
- { 3487, 3488, 10199, 10201, 10201, 10202 },
- { 3488, 3489, 10202, 10204, 10204, 10205 },
- { 3489, 3490, 10205, 10207, 10207, 10208 },
- { 3490, 3491, 10208, 10210, 10210, 10211 },
- { 3491, 3492, 10211, 10216, 10216, 10218 },
- { 3492, 3494, 10218, 10222, 10222, 10224 },
- { 3494, 3495, 10224, 10228, 10228, 10229 },
- { 3495, 3496, 10229, 10231, 10231, 10232 },
- { 3496, 3497, 10232, 10233, 10233, 10236 },
- { 3497, 3498, 10236, 10237, 10237, 10240 },
- { 3498, 3500, 10240, 10242, 10242, 10244 },
- { 3500, 3501, 10244, 10245, 10245, 10246 },
- { 3501, 3502, 10246, 10248, 10248, 10250 },
- { 3502, 3503, 10250, 10252, 10252, 10253 },
- { 3503, 3505, 10253, 10254, 10254, 10255 },
- { 3505, 3506, 10255, 10256, 10256, 10257 },
- { 3506, 3510, 10257, 10259, 10259, 10261 },
- { 3510, 3511, 10261, 10262, 10262, 10263 },
- { 3511, 3512, 10263, 10264, 10264, 10265 },
- { 3512, 3513, 10265, 10266, 10266, 10270 },
- { 3513, 3514, 10270, 10271, 10271, 10272 },
- { 3514, 3515, 10272, 10275, 10275, 10276 },
- { 3515, 3516, 10276, 10279, 10279, 10280 },
- { 3516, 3517, 10280, 10283, 10283, 10284 },
- { 3517, 3518, 10284, 10286, 10286, 10288 },
- { 3518, 3519, 10288, 10291, 10291, 10293 },
- { 3519, 3520, 10293, 10296, 10296, 10298 },
- { 3520, 3521, 10298, 10300, 10300, 10303 },
- { 3521, 3522, 10303, 10305, 10305, 10308 },
- { 3522, 3523, 10308, 10310, 10310, 10313 },
- { 3523, 3524, 10313, 10315, 10315, 10317 },
- { 3524, 3525, 10317, 10319, 10319, 10321 },
- { 3525, 3526, 10321, 10323, 10323, 10325 },
- { 3526, 3527, 10325, 10327, 10327, 10330 },
- { 3527, 3528, 10330, 10332, 10332, 10333 },
- { 3528, 3529, 10333, 10336, 10336, 10337 },
- { 3529, 3530, 10337, 10340, 10340, 10341 },
- { 3530, 3531, 10341, 10344, 10344, 10345 },
- { 3531, 3532, 10345, 10348, 10348, 10349 },
- { 3532, 3533, 10349, 10354, 10354, 10356 },
- { 3533, 3534, 10356, 10361, 10361, 10363 },
- { 3534, 3535, 10363, 10364, 10364, 10365 },
- { 3535, 3536, 10365, 10366, 10366, 10367 },
- { 3536, 3537, 10367, 10368, 10368, 10370 },
- { 3537, 3538, 10370, 10371, 10371, 10372 },
- { 3538, 3543, 10372, 10373, 10373, 10374 },
- { 3543, 3544, 10374, 10375, 10375, 10376 },
- { 3544, 3545, 10376, 10379, 10379, 10381 },
- { 3545, 3546, 10381, 10386, 10386, 10391 },
- { 3546, 3547, 10391, 10393, 10393, 10394 },
- { 3547, 3548, 10394, 10396, 10396, 10397 },
- { 3548, 3549, 10397, 10399, 10399, 10401 },
- { 3549, 3551, 10401, 10403, 10403, 10405 },
- { 3551, 3552, 10405, 10407, 10407, 10408 },
- { 3552, 3553, 10408, 10411, 10411, 10412 },
- { 3553, 3555, 10412, 10414, 10414, 10415 },
- { 3555, 3557, 10415, 10416, 10416, 10417 },
- { 3557, 3558, 10417, 10419, 10419, 10420 },
- { 3558, 3559, 10420, 10423, 10423, 10424 },
- { 3559, 3560, 10424, 10425, 10425, 10426 },
- { 3560, 3561, 10426, 10427, 10427, 10428 },
- { 3561, 3563, 10428, 10429, 10429, 10430 },
- { 3563, 3564, 10430, 10432, 10432, 10433 },
- { 3564, 3565, 10433, 10434, 10434, 10435 },
- { 3565, 3566, 10435, 10437, 10437, 10438 },
- { 3566, 3567, 10438, 10440, 10440, 10441 },
- { 3567, 3569, 10441, 10444, 10444, 10446 },
- { 3569, 3571, 10446, 10449, 10449, 10450 },
- { 3571, 3573, 10450, 10452, 10452, 10454 },
- { 3573, 3574, 10454, 10457, 10457, 10458 },
- { 3574, 3575, 10458, 10461, 10461, 10462 },
- { 3575, 3576, 10462, 10466, 10466, 10467 },
- { 3576, 3577, 10467, 10470, 10470, 10471 },
- { 3577, 3578, 10471, 10476, 10476, 10479 },
- { 3578, 3579, 10479, 10482, 10482, 10483 },
- { 3579, 3580, 10483, 10488, 10488, 10491 },
- { 3580, 3581, 10491, 10495, 10495, 10497 },
- { 3581, 3582, 10497, 10501, 10501, 10503 },
- { 3582, 3583, 10503, 10510, 10510, 10514 },
- { 3583, 3584, 10514, 10520, 10520, 10522 },
- { 3584, 3585, 10522, 10525, 10525, 10526 },
- { 3585, 3586, 10526, 10528, 10528, 10529 },
- { 3586, 3587, 10529, 10531, 10531, 10532 },
- { 3587, 3588, 10532, 10534, 10534, 10535 },
- { 3588, 3590, 10535, 10536, 10536, 10537 },
- { 3590, 3591, 10537, 10538, 10538, 10539 },
- { 3591, 3593, 10539, 10540, 10540, 10541 },
- { 3593, 3595, 10541, 10543, 10543, 10544 },
- { 3595, 3597, 10544, 10545, 10545, 10546 },
- { 3597, 3599, 10546, 10547, 10547, 10548 },
- { 3599, 3600, 10548, 10550, 10550, 10551 },
- { 3600, 3601, 10551, 10553, 10553, 10554 },
- { 3601, 3602, 10554, 10556, 10556, 10557 },
- { 3602, 3603, 10557, 10560, 10560, 10562 },
- { 3603, 3604, 10562, 10566, 10566, 10567 },
- { 3604, 3606, 10567, 10574, 10574, 10577 },
- { 3606, 3610, 10577, 10593, 10593, 10601 },
- { 3610, 3611, 10601, 10605, 10605, 10607 },
- { 3611, 3612, 10607, 10610, 10610, 10611 },
- { 3612, 3613, 10611, 10615, 10615, 10619 },
- { 3613, 3614, 10619, 10623, 10623, 10627 },
- { 3614, 3615, 10627, 10631, 10631, 10635 },
- { 3615, 3616, 10635, 10639, 10639, 10643 },
- { 3616, 3617, 10643, 10647, 10647, 10651 },
+ { 2749, 2753, 9642, 9645, 9645, 9647 },
+ { 2753, 2754, 9647, 9648, 9648, 9649 },
+ { 2754, 2755, 9649, 9650, 9650, 9651 },
+ { 2755, 2756, 9651, 9652, 9652, 9653 },
+ { 2756, 2757, 9653, 9655, 9655, 9657 },
+ { 2757, 2758, 9657, 9659, 9659, 9663 },
+ { 2758, 2759, 9663, 9665, 9665, 9669 },
+ { 2759, 2760, 9669, 9671, 9671, 9675 },
+ { 2760, 2761, 9675, 9681, 9681, 9683 },
+ { 2761, 2762, 9683, 9684, 9684, 9685 },
+ { 2762, 2763, 9685, 9687, 9687, 9688 },
+ { 2763, 2764, 9688, 9689, 9689, 9690 },
+ { 2764, 2765, 9690, 9691, 9691, 9692 },
+ { 2765, 2767, 9692, 9698, 9698, 9700 },
+ { 2767, 2768, 9700, 9704, 9704, 9706 },
+ { 2768, 2769, 9706, 9707, 9707, 9709 },
+ { 2769, 2770, 9709, 9710, 9710, 9712 },
+ { 2770, 2772, 9712, 9720, 9720, 9722 },
+ { 2772, 2774, 9722, 9724, 9724, 9726 },
+ { 2774, 2776, 9726, 9728, 9728, 9730 },
+ { 2776, 2777, 9730, 9732, 9732, 9734 },
+ { 2777, 2778, 9734, 9736, 9736, 9738 },
+ { 2778, 2779, 9738, 9739, 9739, 9741 },
+ { 2779, 2781, 9741, 9743, 9743, 9745 },
+ { 2781, 2782, 9745, 9746, 9746, 9747 },
+ { 2782, 2783, 9747, 9748, 9748, 9749 },
+ { 2783, 2784, 9749, 9751, 9751, 9752 },
+ { 2784, 2785, 9752, 9754, 9754, 9755 },
+ { 2785, 2786, 9755, 9757, 9757, 9758 },
+ { 2786, 2787, 9758, 9760, 9760, 9761 },
+ { 2787, 2789, 9761, 9764, 9764, 9771 },
+ { 2789, 2790, 9771, 9772, 9772, 9773 },
+ { 2790, 2791, 9773, 9777, 9777, 9782 },
+ { 2791, 2792, 9782, 9785, 9785, 9786 },
+ { 2792, 2794, 9786, 9788, 9788, 9789 },
+ { 2794, 2795, 9789, 9792, 9792, 9793 },
+ { 2795, 2796, 9793, 9794, 9794, 9800 },
+ { 2796, 2797, 9800, 9801, 9801, 9807 },
+ { 2797, 2798, 9807, 9808, 9808, 9814 },
+ { 2798, 2799, 9814, 9816, 9816, 9817 },
+ { 2799, 2801, 9817, 9819, 9819, 9820 },
+ { 2801, 2804, 9820, 9822, 9822, 9823 },
+ { 2804, 2808, 9823, 9825, 9825, 9826 },
+ { 2808, 2813, 9826, 9828, 9828, 9829 },
+ { 2813, 2819, 9829, 9831, 9831, 9832 },
+ { 2819, 2826, 9832, 9834, 9834, 9835 },
+ { 2826, 2834, 9835, 9837, 9837, 9838 },
+ { 2834, 2843, 9838, 9840, 9840, 9841 },
+ { 2843, 2853, 9841, 9843, 9843, 9844 },
+ { 2853, 2864, 9844, 9846, 9846, 9847 },
+ { 2864, 2876, 9847, 9849, 9849, 9850 },
+ { 2876, 2889, 9850, 9852, 9852, 9853 },
+ { 2889, 2903, 9853, 9855, 9855, 9856 },
+ { 2903, 2918, 9856, 9858, 9858, 9859 },
+ { 2918, 2934, 9859, 9861, 9861, 9862 },
+ { 2934, 2951, 9862, 9864, 9864, 9865 },
+ { 2951, 2969, 9865, 9867, 9867, 9868 },
+ { 2969, 2988, 9868, 9870, 9870, 9871 },
+ { 2988, 3008, 9871, 9873, 9873, 9874 },
+ { 3008, 3029, 9874, 9876, 9876, 9877 },
+ { 3029, 3051, 9877, 9879, 9879, 9880 },
+ { 3051, 3074, 9880, 9882, 9882, 9883 },
+ { 3074, 3098, 9883, 9885, 9885, 9886 },
+ { 3098, 3123, 9886, 9888, 9888, 9889 },
+ { 3123, 3124, 9889, 9891, 9891, 9892 },
+ { 3124, 3126, 9892, 9894, 9894, 9895 },
+ { 3126, 3129, 9895, 9897, 9897, 9898 },
+ { 3129, 3133, 9898, 9900, 9900, 9901 },
+ { 3133, 3138, 9901, 9903, 9903, 9904 },
+ { 3138, 3144, 9904, 9906, 9906, 9907 },
+ { 3144, 3151, 9907, 9909, 9909, 9910 },
+ { 3151, 3159, 9910, 9912, 9912, 9913 },
+ { 3159, 3168, 9913, 9915, 9915, 9916 },
+ { 3168, 3178, 9916, 9918, 9918, 9919 },
+ { 3178, 3189, 9919, 9921, 9921, 9922 },
+ { 3189, 3201, 9922, 9924, 9924, 9925 },
+ { 3201, 3214, 9925, 9927, 9927, 9928 },
+ { 3214, 3228, 9928, 9930, 9930, 9931 },
+ { 3228, 3243, 9931, 9933, 9933, 9934 },
+ { 3243, 3259, 9934, 9936, 9936, 9937 },
+ { 3259, 3276, 9937, 9939, 9939, 9940 },
+ { 3276, 3294, 9940, 9942, 9942, 9943 },
+ { 3294, 3313, 9943, 9945, 9945, 9946 },
+ { 3313, 3333, 9946, 9948, 9948, 9949 },
+ { 3333, 3354, 9949, 9951, 9951, 9952 },
+ { 3354, 3376, 9952, 9954, 9954, 9955 },
+ { 3376, 3399, 9955, 9957, 9957, 9958 },
+ { 3399, 3423, 9958, 9960, 9960, 9961 },
+ { 3423, 3424, 9961, 9964, 9964, 9966 },
+ { 3424, 3425, 9966, 9969, 9969, 9970 },
+ { 3425, 3426, 9970, 9973, 9973, 9974 },
+ { 3426, 3427, 9974, 9977, 9977, 9978 },
+ { 3427, 3428, 9978, 9980, 9980, 9981 },
+ { 3428, 3429, 9981, 9983, 9983, 9984 },
+ { 3429, 3430, 9984, 9987, 9987, 9988 },
+ { 3430, 3432, 9988, 9991, 9991, 9993 },
+ { 3432, 3433, 9993, 9995, 9995, 9996 },
+ { 3433, 3435, 9996, 9998, 9998, 9999 },
+ { 3435, 3437, 9999, 10002, 10002, 10003 },
+ { 3437, 3439, 10003, 10004, 10004, 10005 },
+ { 3439, 3440, 10005, 10008, 10008, 10009 },
+ { 3440, 3441, 10009, 10012, 10012, 10013 },
+ { 3441, 3443, 10013, 10017, 10017, 10019 },
+ { 3443, 3445, 10019, 10023, 10023, 10025 },
+ { 3445, 3446, 10025, 10026, 10026, 10032 },
+ { 3446, 3447, 10032, 10033, 10033, 10039 },
+ { 3447, 3449, 10039, 10041, 10041, 10042 },
+ { 3449, 3450, 10042, 10045, 10045, 10046 },
+ { 3450, 3451, 10046, 10051, 10051, 10052 },
+ { 3451, 3454, 10052, 10053, 10053, 10054 },
+ { 3454, 3455, 10054, 10055, 10055, 10057 },
+ { 3455, 3456, 10057, 10058, 10058, 10060 },
+ { 3456, 3457, 10060, 10062, 10062, 10063 },
+ { 3457, 3458, 10063, 10065, 10065, 10066 },
+ { 3458, 3459, 10066, 10067, 10067, 10069 },
+ { 3459, 3460, 10069, 10070, 10070, 10072 },
+ { 3460, 3461, 10072, 10074, 10074, 10075 },
+ { 3461, 3462, 10075, 10077, 10077, 10078 },
+ { 3462, 3463, 10078, 10080, 10080, 10082 },
+ { 3463, 3464, 10082, 10084, 10084, 10086 },
+ { 3464, 3465, 10086, 10088, 10088, 10090 },
+ { 3465, 3466, 10090, 10092, 10092, 10094 },
+ { 3466, 3467, 10094, 10096, 10096, 10098 },
+ { 3467, 3468, 10098, 10102, 10102, 10103 },
+ { 3468, 3469, 10103, 10107, 10107, 10108 },
+ { 3469, 3470, 10108, 10113, 10113, 10115 },
+ { 3470, 3471, 10115, 10121, 10121, 10125 },
+ { 3471, 3472, 10125, 10127, 10127, 10128 },
+ { 3472, 3473, 10128, 10130, 10130, 10133 },
+ { 3473, 3474, 10133, 10135, 10135, 10138 },
+ { 3474, 3475, 10138, 10140, 10140, 10143 },
+ { 3475, 3476, 10143, 10145, 10145, 10148 },
+ { 3476, 3477, 10148, 10150, 10150, 10153 },
+ { 3477, 3478, 10153, 10155, 10155, 10158 },
+ { 3478, 3479, 10158, 10160, 10160, 10163 },
+ { 3479, 3480, 10163, 10165, 10165, 10168 },
+ { 3480, 3481, 10168, 10170, 10170, 10173 },
+ { 3481, 3482, 10173, 10175, 10175, 10178 },
+ { 3482, 3483, 10178, 10180, 10180, 10183 },
+ { 3483, 3484, 10183, 10185, 10185, 10188 },
+ { 3484, 3485, 10188, 10190, 10190, 10193 },
+ { 3485, 3486, 10193, 10195, 10195, 10198 },
+ { 3486, 3487, 10198, 10200, 10200, 10201 },
+ { 3487, 3488, 10201, 10203, 10203, 10204 },
+ { 3488, 3489, 10204, 10206, 10206, 10207 },
+ { 3489, 3490, 10207, 10209, 10209, 10210 },
+ { 3490, 3491, 10210, 10212, 10212, 10213 },
+ { 3491, 3492, 10213, 10218, 10218, 10220 },
+ { 3492, 3494, 10220, 10224, 10224, 10226 },
+ { 3494, 3495, 10226, 10231, 10231, 10232 },
+ { 3495, 3496, 10232, 10234, 10234, 10235 },
+ { 3496, 3497, 10235, 10236, 10236, 10239 },
+ { 3497, 3498, 10239, 10240, 10240, 10243 },
+ { 3498, 3500, 10243, 10245, 10245, 10247 },
+ { 3500, 3501, 10247, 10248, 10248, 10249 },
+ { 3501, 3502, 10249, 10251, 10251, 10253 },
+ { 3502, 3503, 10253, 10255, 10255, 10256 },
+ { 3503, 3505, 10256, 10257, 10257, 10258 },
+ { 3505, 3506, 10258, 10259, 10259, 10260 },
+ { 3506, 3510, 10260, 10262, 10262, 10264 },
+ { 3510, 3511, 10264, 10265, 10265, 10266 },
+ { 3511, 3512, 10266, 10267, 10267, 10268 },
+ { 3512, 3513, 10268, 10269, 10269, 10273 },
+ { 3513, 3514, 10273, 10274, 10274, 10275 },
+ { 3514, 3515, 10275, 10278, 10278, 10279 },
+ { 3515, 3516, 10279, 10282, 10282, 10283 },
+ { 3516, 3517, 10283, 10286, 10286, 10287 },
+ { 3517, 3518, 10287, 10289, 10289, 10291 },
+ { 3518, 3519, 10291, 10294, 10294, 10296 },
+ { 3519, 3520, 10296, 10299, 10299, 10301 },
+ { 3520, 3521, 10301, 10303, 10303, 10306 },
+ { 3521, 3522, 10306, 10308, 10308, 10311 },
+ { 3522, 3523, 10311, 10313, 10313, 10316 },
+ { 3523, 3524, 10316, 10318, 10318, 10320 },
+ { 3524, 3525, 10320, 10322, 10322, 10324 },
+ { 3525, 3526, 10324, 10326, 10326, 10328 },
+ { 3526, 3527, 10328, 10330, 10330, 10333 },
+ { 3527, 3528, 10333, 10335, 10335, 10336 },
+ { 3528, 3529, 10336, 10339, 10339, 10340 },
+ { 3529, 3530, 10340, 10343, 10343, 10344 },
+ { 3530, 3531, 10344, 10347, 10347, 10348 },
+ { 3531, 3532, 10348, 10351, 10351, 10352 },
+ { 3532, 3533, 10352, 10357, 10357, 10359 },
+ { 3533, 3534, 10359, 10364, 10364, 10366 },
+ { 3534, 3535, 10366, 10367, 10367, 10368 },
+ { 3535, 3536, 10368, 10369, 10369, 10370 },
+ { 3536, 3537, 10370, 10371, 10371, 10373 },
+ { 3537, 3538, 10373, 10374, 10374, 10375 },
+ { 3538, 3543, 10375, 10376, 10376, 10377 },
+ { 3543, 3544, 10377, 10378, 10378, 10379 },
+ { 3544, 3545, 10379, 10382, 10382, 10384 },
+ { 3545, 3546, 10384, 10389, 10389, 10394 },
+ { 3546, 3547, 10394, 10396, 10396, 10397 },
+ { 3547, 3548, 10397, 10399, 10399, 10400 },
+ { 3548, 3549, 10400, 10402, 10402, 10404 },
+ { 3549, 3551, 10404, 10406, 10406, 10408 },
+ { 3551, 3552, 10408, 10410, 10410, 10411 },
+ { 3552, 3553, 10411, 10414, 10414, 10415 },
+ { 3553, 3555, 10415, 10417, 10417, 10418 },
+ { 3555, 3557, 10418, 10419, 10419, 10420 },
+ { 3557, 3558, 10420, 10422, 10422, 10423 },
+ { 3558, 3559, 10423, 10426, 10426, 10427 },
+ { 3559, 3560, 10427, 10428, 10428, 10429 },
+ { 3560, 3561, 10429, 10430, 10430, 10431 },
+ { 3561, 3563, 10431, 10432, 10432, 10433 },
+ { 3563, 3564, 10433, 10435, 10435, 10436 },
+ { 3564, 3565, 10436, 10437, 10437, 10438 },
+ { 3565, 3566, 10438, 10440, 10440, 10441 },
+ { 3566, 3567, 10441, 10443, 10443, 10444 },
+ { 3567, 3569, 10444, 10447, 10447, 10449 },
+ { 3569, 3571, 10449, 10452, 10452, 10453 },
+ { 3571, 3573, 10453, 10455, 10455, 10457 },
+ { 3573, 3574, 10457, 10460, 10460, 10461 },
+ { 3574, 3575, 10461, 10464, 10464, 10465 },
+ { 3575, 3576, 10465, 10469, 10469, 10470 },
+ { 3576, 3577, 10470, 10473, 10473, 10474 },
+ { 3577, 3578, 10474, 10479, 10479, 10482 },
+ { 3578, 3579, 10482, 10485, 10485, 10486 },
+ { 3579, 3580, 10486, 10491, 10491, 10494 },
+ { 3580, 3581, 10494, 10498, 10498, 10500 },
+ { 3581, 3582, 10500, 10504, 10504, 10506 },
+ { 3582, 3583, 10506, 10513, 10513, 10517 },
+ { 3583, 3584, 10517, 10523, 10523, 10525 },
+ { 3584, 3585, 10525, 10528, 10528, 10529 },
+ { 3585, 3586, 10529, 10531, 10531, 10532 },
+ { 3586, 3587, 10532, 10534, 10534, 10535 },
+ { 3587, 3588, 10535, 10537, 10537, 10538 },
+ { 3588, 3590, 10538, 10539, 10539, 10540 },
+ { 3590, 3591, 10540, 10541, 10541, 10542 },
+ { 3591, 3593, 10542, 10543, 10543, 10544 },
+ { 3593, 3595, 10544, 10546, 10546, 10547 },
+ { 3595, 3597, 10547, 10548, 10548, 10549 },
+ { 3597, 3599, 10549, 10550, 10550, 10551 },
+ { 3599, 3600, 10551, 10553, 10553, 10554 },
+ { 3600, 3601, 10554, 10556, 10556, 10557 },
+ { 3601, 3602, 10557, 10559, 10559, 10560 },
+ { 3602, 3603, 10560, 10563, 10563, 10565 },
+ { 3603, 3604, 10565, 10569, 10569, 10570 },
+ { 3604, 3606, 10570, 10577, 10577, 10580 },
+ { 3606, 3610, 10580, 10596, 10596, 10604 },
+ { 3610, 3611, 10604, 10608, 10608, 10610 },
+ { 3611, 3612, 10610, 10613, 10613, 10614 },
+ { 3612, 3613, 10614, 10618, 10618, 10622 },
+ { 3613, 3614, 10622, 10626, 10626, 10630 },
+ { 3614, 3615, 10630, 10634, 10634, 10638 },
+ { 3615, 3616, 10638, 10642, 10642, 10646 },
+ { 3616, 3617, 10646, 10650, 10650, 10654 },
};
const u32 utdsp563xx_state::code[] = {
@@ -10810,10 +10810,11 @@ const utdsp563xx_state::reg utdsp563xx_state::regs[] = {
{ DSP563XX_Y, 0x667788000000 },
{ DSP563XX_A, 0xff444444112233 },
{ DSP563XX_B, 0xaa223388334455 },
+ { DSP563XX_LA, 0x800000 },
{ DSP563XX_OMR, 0xff6666 },
{ DSP563XX_SR, 0xff4666 },
{ DSP563XX_OMR, 0xff2222 },
- { DSP563XX_SR, 0xff0222 },
+ { DSP563XX_SR, 0xfb0222 },
{ DSP563XX_A, 0xaaabcdef123456 },
{ DSP563XX_A, 0x55579bde2468ac },
{ DSP563XX_A, 0x55579bde2468ac },
@@ -11279,6 +11280,7 @@ const utdsp563xx_state::reg utdsp563xx_state::regs[] = {
{ DSP563XX_X0, 0x6bb14a },
{ DSP563XX_B, 0x553300000000 },
{ DSP563XX_SR, 0x880d0 },
+ { DSP563XX_LA, 0x800000 },
{ DSP563XX_B, 0xc0e449289d6c },
{ DSP563XX_SR, 0x880f0 },
{ DSP563XX_Y1, 0xf3aab8 },
@@ -11395,6 +11397,7 @@ const utdsp563xx_state::reg utdsp563xx_state::regs[] = {
{ DSP563XX_X0, 0xef4e },
{ DSP563XX_Y0, 0x600000 },
{ DSP563XX_SR, 0x880d0 },
+ { DSP563XX_LA, 0x800000 },
{ DSP563XX_OMR, 0x4380 },
{ DSP563XX_A, 0xb37a000000 },
{ DSP563XX_X1, 0x2 },
diff --git a/src/mame/virtual/dsp563xx.lst b/src/mame/virtual/dsp563xx.lst
index bd657fd3f4a..965ecae12ae 100644
--- a/src/mame/virtual/dsp563xx.lst
+++ b/src/mame/virtual/dsp563xx.lst
@@ -641,7 +641,7 @@ and
200046 20007e < a=ffcccccc112233 x=777777 b=aaaabbcc334455 y=667788000000 > a=ff444444112233 b=aa223388334455
andi
- 0033ba 0033bb 0033b8 0033b9 < omr=ff6666 sr=ff4666 > omr=ff2222 sr=ff0222
+ 0033ba 0033bb 0033b8 0033b9 < la=800000 omr=ff6666 sr=ff4666 > omr=ff2222 sr=fb0222
asl
0c1d02 < a=aaabcdef123456 > a=55579bde2468ac
@@ -834,7 +834,7 @@ lua_rn
mac
2000e2 < x=da7efa5a7efa y=000000800000 a=005a7efa000000 b=005a7efa000000 > a=00800000000000
2000da < x=da7efa5a7efa y=000000800000 a=005a7efa000000 b=005a7efa000000 > b=0
- 2000da < y0=7fffff x0=6bb14a b=00553300000000 sr=0880d0 > b=00c0e449289d6c sr=0880f0
+ 2000da < y0=7fffff x0=6bb14a b=00553300000000 sr=0880d0 la=800000 > b=00c0e449289d6c sr=0880f0
46d5bb < y1=f3aab8 y0=000080 sr=0800d8 b=0000000c000000 r5=a memx.a=12346 > b=0 r5=9 y0=123456 sr=0800d4
mac_S
@@ -868,7 +868,7 @@ mpy
0113f0 0101d8 < x0=020 x1=400 a=12abcdefabdef b=12abcdefabdef > a=8000 b=80000
mpyr
- 2000d1 < x0=ef4e y0=600000 sr=0880d0 omr=004380 > a=0000b37a000000
+ 2000d1 < x0=ef4e y0=600000 sr=0880d0 la=800000 omr=004380 > a=0000b37a000000
mpy_SD
0102f0 < x1=2 a=0 > a=00000000800000
diff --git a/src/mame/virtual/utdsp563xx.cpp b/src/mame/virtual/utdsp563xx.cpp
index 042ebd54320..f8352368b8e 100644
--- a/src/mame/virtual/utdsp563xx.cpp
+++ b/src/mame/virtual/utdsp563xx.cpp
@@ -4,8 +4,8 @@
// DSP563xx unit tests
#include "emu.h"
-#include <cpu/dsp563xx/dsp56311.h>
-#include <cpu/dsp563xx/dsp563xxd.h>
+#include "cpu/dsp563xx/dsp56311.h"
+#include "cpu/dsp563xx/dsp563xxd.h"
#include "screen.h"
#include "speaker.h"
@@ -120,7 +120,7 @@ private:
std::array<u16, 128*64> m_chars;
s32 m_first_fail;
s32 m_selected_block;
- u32 m_code_start, m_code_end, m_regs_start, m_regs_end;
+ u32 m_code_start, m_code_end, m_pre_start, m_pre_end, m_post_start, m_post_end;
u32 m_blocks, m_tests;
u32 m_cur_block, m_cur_test;
u8 m_cur_port;
@@ -148,6 +148,7 @@ private:
u32 code_r(offs_t address);
u32 done_r();
+ u32 jmp0_r();
void trigger_test(bool stop = false);
void any_w(const char *name, std::map<u32, u32> &area, offs_t offset, u32 data);
@@ -173,6 +174,10 @@ utdsp563xx_state::utdsp563xx_state(const machine_config &mconfig, device_type ty
u32 utdsp563xx_state::code_r(offs_t address)
{
+ auto i = m_p_data.find(address);
+ if(i != m_p_data.end())
+ return i->second;
+
u32 clen = m_code_end - m_code_start;
if(address >= clen)
return 0x0c0fff;
@@ -187,7 +192,7 @@ u32 utdsp563xx_state::done_r()
if(m_initial_run) {
int result = 2;
- for(int r = m_regs_start; r != m_regs_end; r++) {
+ for(int r = m_post_start; r != m_post_end; r++) {
u64 val = reg_actual_value(r);
m_reg_results[r] = val;
if(val != reg_expected_value(r))
@@ -215,12 +220,34 @@ u32 utdsp563xx_state::done_r()
return 0;
}
+u32 utdsp563xx_state::jmp0_r()
+{
+ for(int i = m_pre_start; i != m_pre_end; i++) {
+ u64 val = reg_expected_value(i);
+ if(regs[i].m_reg >= MEM_P) {
+ auto &area = regs[i].m_reg == MEM_P ? m_p_data : regs[i].m_reg == MEM_X ? m_x_data : m_y_data;
+ area[regs[i].m_value >> 24] = val;
+
+ } else if(regs[i].m_reg >= F_CCR_C) {
+ u32 sr = m_cpu->state_int(DSP563XX_CCR);
+ if(val)
+ sr |= 1 << (regs[i].m_reg & 15);
+ else
+ sr &= ~(1 << (regs[i].m_reg & 15));
+ m_cpu->set_state_int(DSP563XX_SR, sr);
+
+ } else
+ m_cpu->set_state_int(regs[i].m_reg, val);
+ }
+ return 0x0c0000; // jmp 0
+}
+
void utdsp563xx_state::p_map(address_map &map)
{
map(0x000000*4, 0xffffff*4).rw(FUNC(utdsp563xx_state::p_r), FUNC(utdsp563xx_state::p_w));
map(0x000000*4, 0x000ffe*4).r(FUNC(utdsp563xx_state::code_r));
map(0x000fff*4, 0x000fff*4).r(FUNC(utdsp563xx_state::done_r));
- map(0xc00000*4, 0xc00000*4).lr32(NAME([]() -> u32 { return 0x0c0000; })); // jmp 0
+ map(0xc00000*4, 0xc00000*4).r(FUNC(utdsp563xx_state::jmp0_r));
}
void utdsp563xx_state::any_w(const char *name, std::map<u32, u32> &area, offs_t offset, u32 data)
@@ -458,8 +485,10 @@ void utdsp563xx_state::machine_start()
save_item(NAME(m_chars));
save_item(NAME(m_code_start));
save_item(NAME(m_code_end));
- save_item(NAME(m_regs_start));
- save_item(NAME(m_regs_end));
+ save_item(NAME(m_pre_start));
+ save_item(NAME(m_pre_end));
+ save_item(NAME(m_post_start));
+ save_item(NAME(m_post_end));
save_item(NAME(m_initial_run));
save_item(NAME(m_cur_block));
save_item(NAME(m_cur_test));
@@ -624,28 +653,13 @@ void utdsp563xx_state::trigger_test(bool stop)
const testlist &tl = testlists[tb.m_testlist_start + m_cur_test];
m_code_start = tl.m_code_start;
m_code_end = tl.m_code_end;
- m_regs_start = tl.m_post_start;
- m_regs_end = tl.m_post_end;
+ m_pre_start = tl.m_pre_start;
+ m_pre_end = tl.m_pre_end;
+ m_post_start = tl.m_post_start;
+ m_post_end = tl.m_post_end;
m_p_data.clear();
m_x_data.clear();
m_y_data.clear();
- for(int i = tl.m_pre_start; i != tl.m_pre_end; i++) {
- u64 val = reg_expected_value(i);
- if(regs[i].m_reg >= MEM_P) {
- auto &area = regs[i].m_reg == MEM_P ? m_p_data : regs[i].m_reg == MEM_X ? m_x_data : m_y_data;
- area[regs[i].m_value >> 24] = val;
-
- } else if(regs[i].m_reg >= F_CCR_C) {
- u32 sr = m_cpu->state_int(DSP563XX_CCR);
- if(val)
- sr |= 1 << (regs[i].m_reg & 15);
- else
- sr &= ~(1 << (regs[i].m_reg & 15));
- m_cpu->set_state_int(DSP563XX_SR, sr);
-
- } else
- m_cpu->set_state_int(regs[i].m_reg, val);
- }
m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);