Hi everyone,
To make things clear : out(c),0 does not work on the R800, but does work on the Z80 of the MSX Turbo R, right ?
ログイン/登録して投稿
Hi everyone,
To make things clear : out(c),0 does not work on the R800, but does work on the Z80 of the MSX Turbo R, right ?
Some docs say that with CMOS Z80 it's OUT (C),255 instead of OUT (C),0 on TTL Z80. I will try to test it soon and also on turbo R.
Edit: I just tested on turbo R.
Z80 mode: OUT (C),255
Turbo R mode: NOP
I tested with the program below and the color 4 becomes white only in Z80 mode.
; OUT (C),0 test org 0D000h-7 db 0feh dw start dw end dw start start: ld c,099h di ld a,4 out (c),a ld a,80h+16 out (c),a inc c ; C = 9Ah out (c),0 nop out (c),0 ei ret end:
I will test on a MSX1 with a CMOS Z80 and another with a TTL Z80 next time.
Is this a reliable way to check the processor type? Is it useful?
Thanks GDX for your test. I guess if the out(c),0 worked in Z80 mode on the Turbo-R with your test, the color 4 would have gone to black ?
I confirm on my MSX1 with a CMOS Z80 it's OUT (C),255 and on the MSX1 with a TTL Z80, it's OUT (C),0.
I tested with the program below in screen 0.
org 0D000h-7 db 0feh dw start dw end dw start start: ld c,099h di out (c),0 ld a,80h+7 out (c),a ei ret end:
The screen becomes black with the TTL Z80 and white with the CMOS Z80.
on the Turbo-R with your test, the color 4 would have gone to black ?
No, nothing change because it's a NOP instead of OUT (C),255 in Turbo R mode.
There are also mirrors of the Z80 undocumented instructions that become NOPs in R800 mode. I had checked it a long time ago.
I was refering to that:
Z80 mode: OUT (C),255
Turbo R mode: NOP
Your test redefines color 4, so if I understand correctly:
. TTL Z80 : out(c),0 - the color 4 goes to black
. CMOS Z80 : out(c),255 - the color 4 goes to white
. R800 : nop - the color 4 stays the same
Correct ?
Is this a known. Thing? First time for me, what's cooking? Some context?
Your test redefines color 4, so if I understand correctly:
. TTL Z80 : out(c),0 - the color 4 goes to black
. CMOS Z80 : out(c),255 - the color 4 goes to white
. R800 : nop - the color 4 stays the same
Correct ?
Yes, the first test change the color palette of the color 4. So because it doesn't work on MSX1, I made a second test that change the background and border color. (It juste make a writting to the register 7.) Make the test in SCREEN 0 because only the border color changes in SCREEN 1.
I have an MSX1 in which I had replaced the Z80 with a CMOS.
I’ve also confirmed this a while ago, and implemented it for openMSX.
Thank you, Grauw. This means that all Z80s in MSX engine are CMOS.
There are also mirrors of the Z80 undocumented instructions that become NOPs in R800 mode. I had checked it a long time ago.
It can be useful to make wait times for direct accessed to FM sound chip for example.
There are examples of use in the JoySNES adapter manual.
Edit: I used it for the mouse routine below.
https://www.msx.org/wiki/Mouse/Trackball#Direct_usage_of_mouse
Don't you have an account yet? Become an MSX-friend and register an account!