Type of machine ?

User avatar
Pacman
Posts: 106
Joined: Mon Feb 05, 2018 2:59 pm

Type of machine ?

Post by Pacman » Tue Jan 28, 2020 7:57 am

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?

User avatar
mz-80a
Posts: 196
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: Type of machine ?

Post by mz-80a » Tue Jan 28, 2020 1:23 pm

Just check the Monitor boot up text in ROM. For instance on the MZ-80A it's "MONITOR SA-1510"
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
http://mz-sharpworks.co.uk/

hlide
Posts: 408
Joined: Thu Jan 25, 2018 9:31 pm

Re: Type of machine ?

Post by hlide » Wed Jan 29, 2020 9:31 am

why $C800?

hlide
Posts: 408
Joined: Thu Jan 25, 2018 9:31 pm

Re: Type of machine ?

Post by hlide » Wed Jan 29, 2020 9:32 am

What are the machines you want to detect? the monitor name checking will be defeated with a custom rom.

hlide
Posts: 408
Joined: Thu Jan 25, 2018 9:31 pm

Re: Type of machine ?

Post by hlide » Wed Jan 29, 2020 12:05 pm

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.

User avatar
Pacman
Posts: 106
Joined: Mon Feb 05, 2018 2:59 pm

Re: Type of machine ?

Post by Pacman » Wed Jan 29, 2020 4:42 pm

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.

hlide
Posts: 408
Joined: Thu Jan 25, 2018 9:31 pm

Re: Type of machine ?

Post by hlide » Wed Jan 29, 2020 5:55 pm

$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.

User avatar
Pacman
Posts: 106
Joined: Mon Feb 05, 2018 2:59 pm

Re: Type of machine ?

Post by Pacman » Thu Jan 30, 2020 9:04 am

I want to differentiate the MZ-700 from the MZ-800 also hence the idea of ​​the range $ C800 to $ FFFF

hlide
Posts: 408
Joined: Thu Jan 25, 2018 9:31 pm

Re: Type of machine ?

Post by hlide » Thu Jan 30, 2020 10:56 am

Ah yes, I'm less familiar with the 800 mode in MZ-800. Understood.

S_U_C
Posts: 32
Joined: Sun Feb 17, 2019 6:41 pm

Re: Type of machine ?

Post by S_U_C » Fri Jan 31, 2020 6:21 pm

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

Post Reply