X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=testpico%2Fasmtools.S;h=811f35d7da6f9f51887ca218021fa7a309c1723a;hb=234c45567cc77a4eca9cddca7daaacab27cab767;hp=d216a83aff5e99041fff3d5b183174527907771c;hpb=5b7d76795faa9c4b1e38087ef735d54c7a7a6caa;p=megadrive.git diff --git a/testpico/asmtools.S b/testpico/asmtools.S index d216a83..811f35d 100644 --- a/testpico/asmtools.S +++ b/testpico/asmtools.S @@ -73,6 +73,8 @@ write_and_read1: #ifndef PICO move.w d0, (a0) #else + /* different timing due to extra fetch of offset, */ + /* less troulesome to emulate */ movea.l a0, a1 subq.l #1, a1 move.w d0, 1(a1) @@ -249,12 +251,25 @@ x32x_enable: .global x32x_enable_end x32x_enable_end: +.global x32x_disable +x32x_disable: + movea.l #0xa15100, a0 + move.w #1, (a0) /* ADEN (reset sh2) */ + move.w #0, (a0) /* adapter disable, reset sh2 */ + move.w #1, d0 +0: + dbra d0, 0b + move.w #2, (a0) /* nRES - sh2s should see no ADEN and sleep */ + rts +.global x32x_disable_end +x32x_disable_end: + .global test_32x_b_c0 test_32x_b_c0: ldarg 0, 0, a1 ldargw 1, 0, d0 jsr (0xc0).l /* move.b d0, (a1); RV=0 */ - bset #0, (0xa15107).l + bset #0, (0xa15107).l /* RV=1 */ rts .global test_32x_b_c0_end test_32x_b_c0_end: