Page 1 of 2

Type of machine ?

Posted: Tue Jan 28, 2020 7:57 am
by Pacman
Does anyone know how one can know the type of system automatically?
I had thought to test the ROMs from 0x000-> 0x0FFF and 0xC800 but to test which value to be sure?

Re: Type of machine ?

Posted: Tue Jan 28, 2020 1:23 pm
by mz-80a
Just check the Monitor boot up text in ROM. For instance on the MZ-80A it's "MONITOR SA-1510"

Re: Type of machine ?

Posted: Wed Jan 29, 2020 9:31 am
by hlide
why $C800?

Re: Type of machine ?

Posted: Wed Jan 29, 2020 9:32 am
by hlide
What are the machines you want to detect? the monitor name checking will be defeated with a custom rom.

Re: Type of machine ?

Posted: Wed Jan 29, 2020 12:05 pm
by hlide
One way to detect an MZ-80 K definitely is to check whether a byte write to $D000-$D3FF is mirrorred into $D400-$D3FF.
One way to detect an MZ-80 A/MZ-1200 definitely is to check whether you can swap $C000-$CFFF into MONITOR ROM (that is, if you cannot modify a byte)
One way to detect an MZ-700 or over is to select DRAM for $0000-$0FFF or $D000-$FFFF and try to modify a byte.
One way to detect an MZ-1500 is to lock $D000-$FFFF and select CGROM mapping to read a byte sequence from $E000 which should be different than when it is unlocked.

And so on.

Re: Type of machine ?

Posted: Wed Jan 29, 2020 4:42 pm
by Pacman
I forgot the end of the range for 0xC800: 0xC800 to 0xFFFF

Thank you for your answers.
I think it's more interesting to do it the way that hlide describes because if a personal ROM is installed, you can still know who is who by hardware behavior.
I will try to implement all of this as an assembler.
Thank you.

Re: Type of machine ?

Posted: Wed Jan 29, 2020 5:55 pm
by hlide
$1000-$CFFF is pure DRAM - except for $C000-$CFFF when swap for MONITOR ROM is enabled by MZ-80A/MZ-1200 so I'm not sure why you need $C800.

Re: Type of machine ?

Posted: Thu Jan 30, 2020 9:04 am
by Pacman
I want to differentiate the MZ-700 from the MZ-800 also hence the idea of ​​the range $ C800 to $ FFFF

Re: Type of machine ?

Posted: Thu Jan 30, 2020 10:56 am
by hlide
Ah yes, I'm less familiar with the 800 mode in MZ-800. Understood.

Re: Type of machine ?

Posted: Fri Jan 31, 2020 6:21 pm
by S_U_C
Hi,
If you check the jump vectors in the standard ROMs
The JP TEMPO address
at 0042h the K = FAH, A =ECH 700/800 = E5H

If E5
The 800 has a 16K ROM the 700 4K ROM
switch in the monitor ROM
LD A($1000)
LD B,A
LD A,$55
LD C,A
LD ($1000),A
NOP
LD A,($1000)
CP C
JR Z MZ700
must be MZ800
------------------------------
MZ700:
LD A,B ‘ RAM found must be mz700
LD($1000),A


I do not a copy of the standard MZ-800 ROM to check as the link to download it broken.
but non standard may not work .
Check the willy ROMS.

Another way is to test writing the video RAM
Screen RAM on the various machines.
K = D000- D3FF
A = D000 – D7FF
700/800 D000-DFFF D000-D7FFF screen D800 – DFFF colour

(test $D400) if fail then MZ80K
(test $D800) if fail then MZ80A
switch in monitor rom
(test $1000) if fail then MZ800
must be MZ700