Page 1 of 1

Sharp MZ

Posted: Tue Apr 06, 2021 2:59 pm
by caver99
Is there any reason why the Sharp MZ core just gives blank screen on HDMI or should i be using VGA for this as the computers outputted 15khz same as other 8 bits did when I run the core I get a blank screen.

I have tried nearly all the cores now and this seems to be the only one giving a problem not sure what I'm doing wrong if anything.

Re: Sharp MZ

Posted: Tue Apr 06, 2021 5:31 pm
by pgimeno
As far as I know, it only supports VGA output. I also wish it supported HDMI.

Re: Sharp MZ

Posted: Tue Apr 06, 2021 6:09 pm
by jca
From the readme:
NB: Aspect Ratio and Scandoubler are currently disabled due to the inclusion of the VGA Scaling hardware. When HDMI output is compiled into the design in the near future they will be re-enabled.

Re: Sharp MZ

Posted: Thu Apr 08, 2021 2:01 pm
by caver99
jca wrote: Tue Apr 06, 2021 6:09 pm From the readme:
NB: Aspect Ratio and Scandoubler are currently disabled due to the inclusion of the VGA Scaling hardware. When HDMI output is compiled into the design in the near future they will be re-enabled.
thanks for the info

Re: Sharp MZ

Posted: Wed Apr 14, 2021 12:23 pm
by teller
I always get a Tape Error, why? Unable to read header!

Re: Sharp MZ

Posted: Sun Apr 25, 2021 3:17 pm
by lroby74
teller wrote: Wed Apr 14, 2021 12:23 pm I always get a Tape Error, why? Unable to read header!
Same here :(

Re: Sharp MZ

Posted: Mon Jul 26, 2021 7:04 pm
by OldBoar
Try the new core, dated 21.07.09: it now supports HDMI, and it loads .mzf tape files without errors.

Re: Sharp MZ

Posted: Mon Jul 26, 2021 7:52 pm
by alanswx
OldBoar wrote: Mon Jul 26, 2021 7:04 pm Try the new core, dated 21.07.09: it now supports HDMI, and it loads .mzf tape files without errors.
I updated the core to fix the timing, and add HDMI. I fixed a bug that was introduced into the MiSTer binary. It works, but should be reworked to be more of a standard core with standard OSD.

Let me know how much interest there is in this core.. I am not sure how much effort it is worth.

Re: Sharp MZ

Posted: Mon Jul 26, 2021 8:30 pm
by akeley
I am definitely interested...especially if VGA/15Khz could be possible.

Re: Sharp MZ

Posted: Mon Jul 26, 2021 8:57 pm
by MiSTer_Kirk
VGA/15Khz is already possible, in the build 21.07.09

Re: Sharp MZ

Posted: Mon Jul 26, 2021 11:11 pm
by pgimeno
The MZ-700 was near the top of my list when I read the list of MiSTer cores that made me buy it in the end. This update is really great and finally compensates the disappointment I felt when I could not make it work in HDMI mode.

However I have not dedicated time to check it in depth yet. I have found some trouble with the keyboard implementation, though; in MZ-700 mode I was unable to find the colon symbol that another user (jca I believe) reported he could not find.

Re: Sharp MZ

Posted: Tue Jul 27, 2021 9:26 am
by OldBoar
alanswx wrote: Mon Jul 26, 2021 7:52 pm Let me know how much interest there is in this core.. I am not sure how much effort it is worth.
My first(*) computer was the MZ-80K, I used it as my main machine from 1980 until 1987(**). I know that machine (and its Z80/LH0080A CPU) quite well, and would love to develop for it again.

I am new to FPGA, and eager to learn. I'm now browsing the MZ Core source code and trying to understand it, especially looking into the keyboard code since there are some obvious improvements that can be done there.

So, any effort into it is most welcome, and I hope to become able to contribute.


(*) Unless I count the TI-59 programmable calculator which I used in the late 1970s.
(**) At which point I purchased an Acorn Archimedes A305.

Re: Sharp MZ

Posted: Fri Jul 30, 2021 2:19 am
by pgimeno
OldBoar wrote: Tue Jul 27, 2021 9:26 am I am new to FPGA, and eager to learn. I'm now browsing the MZ Core source code and trying to understand it, especially looking into the keyboard code since there are some obvious improvements that can be done there.
I can tell you what I know so far about the subject.

The physical keyboard is read by Linux, and Main polls it. Both use a positional key system rather than by characters. This table has proven to be very valuable for handling the keyboard at this level: http://www.vetra.com/scancodes.html

The table used by Linux is based on Set 1, and Main translates those keys to Set 2 before sending it to the FPGA. For cores, you only need to pay attention to Set 2. The "Base Case" column in the table shows the keycaps on a US keyboard, but even if the keycaps can change between countries, the scancodes don't. So for example, a Spanish keyboard has the letter Ñ immediately to the right of L, but an US keyboard has the semicolon/colon key in that place; yet both the Spanish keyboard and the US keyboard generate the same scancode for that key, which in Set 2 has the code 4Ch, so that's what gets sent to the core when you press the key immediately to the right of the L, whatever the language of your keyboard.

The cores receive at least 11 bits of information. Bits 0-7 are the Set 2 scancode; when there are two, it's the last one. Bit 8 is whether the key has an E0h prefix (like e.g. the right Ctrl key), because when there are two, the first one is always E0h, except for Pause/Break which I don't know how it's handled. Bit 9 is whether the event is a press or a release, and bit 10 gets flipped every time a key event is sent, to indicate that fact. I'm talking from memory so it's possible I made some mistake.

Now this is partly based on my imagination mixed with my interpretation of what I read because I don't know VHDL. For what I understood from this core, it seems that there is a file with a table containing 256 bytes per model, one entry per scancode, ignoring bit 8. Each byte of this table seems to be split in two parts, a row number and a column number, which probably correspond to the keyboard matrix of the MZ. So, and this is speculation because I didn't understand the code, when a key is received, the core reads the entry corresponding to the scancode for the table given by the current model, separates the row and column, and uses bit 9 of the key event to determine whether a bit in an array of registers should be set or reset. This array will be read somehow during the IN operation performed by the Z80 to read the keyboard.

Given documentation of the keyboard matrix for each of the emulated computers, it would be possible to fix the table and map the keys properly, but it's probably going to be an arduous task. Do you know of any such documentation?

Edit: Oops, after reading the other thread I see that alanswx wants to get rid of the table/ROM and use switch-style reading.

Re: Sharp MZ

Posted: Wed Nov 17, 2021 4:35 pm
by danielb
Hi,

I finally managed to get this core to run on my MiSTer with HDMI.

It seems to work at 1080p, but not at 1440p.

Anyway, it's nice to get acquainted with another computer that I'd never heard of before, so thanks to everyone who worked on it.

D.