On Wed, 26 Apr 2000, Daniel Jorge Caetano wrote:

> >I'm not sure what the standard says. But there are IM2 program on MSX. The
> >question is how many and whether they can be modified to use IM1 instead.
> 
>   Hummm... What is the way IM2 works? IM1 I know perfectly well, but I don't
> know a lot about IM2. The information I have here is:
> 
>   When Z80 is interrupted on mode 2, the external device must provide a one
> byte data, which is placed with the value on register I, composing a 16 bit
> number (the I register will be placed as the most significant byte) which
> must points to a position in the address table (0000h, 0008h, 0010h, 0018h,
> 0020h, 0028h, 0030h, 0038h). The byte pointed and the following are placed
> on PC. The Z80 will execute them the routine pointed by PC.
> 
>   There is any external device to provide such "initial" byte?

No, not on MSX.
On most MSX machines the value "from the device" is #FF. But there have
been cases reported of other values. The only safe way is to make code that
works with any value (this is possible and has been discussed here before).

Anyway, this new processor will always call #0038, even if the program
requested IM2. It is very unlikely that that will work, since a programmer
wouldn't go through the trouble of setting up IM2 if he want #0038 to be
called.

> >The problem is, if you do an "OUT (#20),A" and the upper bits are zero, the
> >hardware outside of the processor will never see the OUT, because it is
> >sent to the internal I/O ports. Also, writing the wrong values to the
> >internal I/O ports may crash your system.
> 
>   Well, one solution is: map all ports on something like: FFxxh... all
> hardware will be seen as there. And a hardware always sets the upper byte
> as FFh.

That still doesn't solve it.

Example:

        LD BC,#2310
        OUT (C),A
This will send A to I/O port #10 (high byte #23 ignored)

        LD BC,#0010
        OUT (C),A
This will send A to internal I/O port #10 (high byte is zero).
So the processor internal I/O port is written, not the MSX I/O port.

> >>  I'm waiting Ademir's answer. I talk to him by phone and he liked a lot
> >> of the 20MIPS at 20Mhz idea... (-;
> >Note that 20MIPS is the best case: it will only be reached if you use only
> >1-byte instructions. But even with longer instructions this processor is
> >likely to be quite fast.
> 
>   It's almost RISC... /-: I thought it was RISC... But it's an impressive
> mark, since on Z180 12MIPS is the best case... and for Z380, 10.5MIPS is
> also on the best case.

RISC is a kind of instruction set.
Anything Z80 compatible can never be RISC.
   
Bye,
                Maarten

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
 The MSX faq: http://www.faq.msxnet.org/
 The MSX newsgroup: comp.sys.msx
 The MSX IRC channel: #MSX on Undernet
****

Reply via email to