You should also add the:
$fb); { ei }
after the SetCPU to keep the interrupts enabled.
Frits
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> [EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 7:41 PM
> To: [EMAIL PROTECTED]
> Subject: [MSX] switching r800 <-> z80 in TP
>
>
> We have a routine to switch the R800 to the Z80 and vice
> versa in TP. The
> code is as follows:
>
> function RomBios : Byte;
>
> var
> Versie: Byte;
>
> begin
> inline ($3a/$c1/$fc/ { ld a,(#fcc1 }
> $21/$2d/$00/ { ld hl,#2d }
> $cd/$0c/$00/ { call #0c ; rdslt }
> $32/Versie/ { ld (versie),a }
> $fb); { ei }
> RomBios := Versie;
> end;
>
> procedure SetCPU(mode:byte);
>
> begin
> if RomBios >= 3 then
> inline ($3a/mode/ { ld a,(mode) }
> $fd/$2a/$c0/$fc/ { ld iy,(#fcc0) }
> $dd/$21/$80/$01/ { ld ix,#180 }
> $cd/$1c/$00); { call #1c }
> end;
>
> We have loaded the moonblaster routines and when we switch
> the CPU to Z80,
> it will completely hang the machine. We have found that if we
> do not use
> this routine above, the problem doesn't occure, but we need
> to switch to
> the Z80...
>
> Thanks for your help!
>
> Raymond
>
>
>
> _______________________________________________
> MSX mailing list ([EMAIL PROTECTED])
> Info page: http://lists.stack.nl/mailman/listinfo/msx
>
_______________________________________________
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx