> >By the way, an idea just popped into my mind...
> >For the Z180 CPU, eventually also an 'emulation' TSR could be made, which
> >emulates the Z380 through 'trapping' of illegal opcodes. It will be
_really_
> >slow though...
>
>   But it'll not "that hard" to do... But it'll only works if the Z380
program
> is in the first 1Mb, since Z180 only addresses lineraly the first 1Mb. (-;

There is a 64kB limit.
But anyways, the Z380 also has a mode to use the 32-bit mode but still use
the 64k adress range. That one could be emulated. And I think at first most
Z380-specific programs will be made for that mode. The extended adress range
would first require the support of an (new?) OS before it can be used in a
correct way.

By the way, to support (future) trapping, the BIOS should at adress #00
check if it is a trapping-interrupt. If yes, then it should call a (new)
hook. This will open the path for future instruction extensions.


> >I am wondering... Do the registers IXh IXl IYh and IYl really exist on
the
> >Z180??? I doubt it, because otherwise their locations at least should
have
> >been indicated (otherwise the usage of trapping on an undocumented
> >instruction will be very confusing since it does not work).
>
>   I don't know. But I think it's possible to "add" this instructions. (-;
> In the same way as ADVRAM works, but doing a "bridge" over Z180.

Hmmm... How will the registers be read then???


> >Or will those registers be emulated through trapping???
>
>   It's possible, but very slow. Timing dependent apps will suffer a lot.
> But it'll be a "fast" workaround.

I hope so.


> >That will be slow (but it'll work, and as long as the instructions aren't
> >used it is still fast) (might cause some -a lot, in fact- incompatibility
> >issues with programs using them)...
>
>   These instructions are very slow on MSX Z80 and R800. You shoud avoid
> using them on normal MSX. It'll be difficult, but the speed you'll gain
> will compensate the work.

Sometimes you need extra registers. And they aren't that slow. I use IX and
IY a lot. I don't use IXh / IXl etc. often, but Patriek uses them often in
GEM for example. And I know other people also use those instructions... GEM
works on a normal MSX2... If the IXh/l instructions are not there GEM will
be among the programs which don't work anymore (most other programs will
still work though... I don't think any commercial programs use the
undocumented instructions).


> >I'll read the entire 'trapping' docs... See what the possibilities are.
> >Will come back at it later.
>
>   Ok! (-;

Well the idea is that if an illegal opcode is encountered, it restarts at
#00000000, with the trapping-bit in an internal I/O port set (internal I/O
is not interfering with the external I/O -> there are special instructions
to address the internal I/O -> IN0 A,(n) and OUT0 (n),A)...

So to support trapping the BIOS should at adress #0000 check if the trapping
bit is set. If so, it should call a hook and otherwise proceed as a normal
reset.

By the way, on the Z380 all registers except the 'extended' portions of BC,
DE and HL (BCz, DEz and HLz) will be preserved... So that means the
enhanced -> legacy switch won't have to corrupt all registers... However it
is safer to assume they are corruped (because of possible future
extensions).


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
 email me: [EMAIL PROTECTED] or ICQ: 10196372
      visit my homepage at http://grauw.blehq.org/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<


****
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