At 04:14 AM 9/13/98 +0200, you wrote:
>Question: In linear address space mode, is it still Z80 (MSX)
>compatible?
>From Zilog Z380 user's manual, chapter 3:
The Z380 has a native and an extended mode.
In native mode the Z380 is compatible with the Z80. It can only execute
code in the first 64K of memory. Using a trick you can access data anywhere
in memory, but in the default configuration this is also restricted to the
first 64K.
In extended mode the Z380 can use up to 4GB of linear addressable memory.
Also values on the stack will become 32-bits values.
The Z380 can switch from native mode to extended mode, but it can't switch
from extended mode to native mode. This is not nice for MSX, so an MSX Z380
hardware design has to cope with this. For example, it could be solved by
performing a soft reset which terminates an extended mode program and
returns to native mode. The system ROM should be able to detect such a
self-generated reset and don't reboot the entire system.
To answer your question: in extended mode (linear address space mode), the
Z380 is not compatible with the MSX. For example the 32-bits values on the
stack make it incompatible.
Is this a bad thing? Not really, because I can hardly imagine any linear
address space mode that is compatible with the MSX. For example, how would
you store a return address on the stack?
The Z380 is an improvement over the Z80 for MSX because:
- In native mode, it's Z80 compatible, so nothing is lost.
- Even in native mode, it's faster than Z80:
* higher clock speeds
* less clockticks per instruction
* pipeline and prefetch cue
Probably an MSX2 with Z380 would be faster than a turbo R.
- Specific MSX380 programs would be even faster, by using 32-bit data
manipulation and linear addressing.
About the MS-DOS 640K deja-vu feelings:
How bad this turns out depends on what the MSX380 system software will be
like. If you want to call native-mode (16-bit) routines from an extended
mode (32-bit) program, you would have to do DOS4GW-like tricks. The only
way around this is to write system software in both 16-bit and 32-bit code.
The 16-bit code is used for MSX compatibility, the 32-bit code is used by
new MSX380 programs. The 16-bit code would be easy to make, because most of
it is already written (system ROMs, diskROMs, MSX-DOS). The 32-bit code
would have to be written from scratch, which is a lot of work.
But the time of the DOS-expanders (DOS4GW) on MS-DOS was not the worst
time. The time period before, where some programs used only low memory
(below 640K), some used XMS and some used EMS, that time was really bad. It
meant rebooting very often to select the optimal memory configuration for
the program you were about to run.
I think we can learn something from what happened to the PC.
One option is to write a lot of 32-bit code, and make a WinNT-like system:
system is all 32-bit code, but still has the ability to run 16-bit code. A
nice solution, but so much work that it could delay the release of the
MSX380 system by a couple of years. Maybe later, once the MSX380 is already
released.
The other option is to make a system that depends very much on 16-bit code,
like DOS4GW. For example (hard)disk access would be done in native mode.
The bad thing is that you have to switch mode for some system calls and
mode switching would involve a soft reset (as described before) so would be
very slow. The good thing is that it's very much compatible with existing
MSX hardware and software.
Maybe an inbetween system is also possible. For example using 32-bit
drivers that can either perform a task in extended mode, or switch back to
16-bit mode and call already present system routines like the diskROM.
Something like Win95, but hopefully with less bugs.
Note that all these considerations only apply when using the Z380 in
extended mode. To use it in native mode, very little new software is needed.
Bye,
Maarten
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****