Sharp MZ

caver99
Posts: 7
Joined: Tue Apr 06, 2021 10:11 am
Been thanked: 1 time

Sharp MZ

Unread post 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.
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 times

Re: Sharp MZ

Unread post by pgimeno »

As far as I know, it only supports VGA output. I also wish it supported HDMI.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Sharp MZ

Unread post 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.
caver99
Posts: 7
Joined: Tue Apr 06, 2021 10:11 am
Been thanked: 1 time

Re: Sharp MZ

Unread post 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
teller
Posts: 39
Joined: Thu Jul 23, 2020 9:29 pm
Has thanked: 14 times
Been thanked: 3 times

Re: Sharp MZ

Unread post by teller »

I always get a Tape Error, why? Unable to read header!
lroby74
Posts: 111
Joined: Tue May 26, 2020 2:59 pm
Has thanked: 127 times
Been thanked: 15 times

Re: Sharp MZ

Unread post by lroby74 »

teller wrote: Wed Apr 14, 2021 12:23 pm I always get a Tape Error, why? Unable to read header!
Same here :(
User avatar
OldBoar
Posts: 9
Joined: Sat Jan 16, 2021 1:01 am
Has thanked: 8 times

Re: Sharp MZ

Unread post by OldBoar »

Try the new core, dated 21.07.09: it now supports HDMI, and it loads .mzf tape files without errors.
alanswx
Core Developer
Posts: 296
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Sharp MZ

Unread post 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.
akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: Sharp MZ

Unread post by akeley »

I am definitely interested...especially if VGA/15Khz could be possible.
MiSTer_Kirk
Posts: 210
Joined: Thu Feb 04, 2021 11:42 pm
Has thanked: 18 times
Been thanked: 46 times

Re: Sharp MZ

Unread post by MiSTer_Kirk »

VGA/15Khz is already possible, in the build 21.07.09
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 times

Re: Sharp MZ

Unread post 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.
User avatar
OldBoar
Posts: 9
Joined: Sat Jan 16, 2021 1:01 am
Has thanked: 8 times

Re: Sharp MZ

Unread post 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.
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 times

Re: Sharp MZ

Unread post 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.
danielb
Core Developer
Posts: 227
Joined: Thu Jun 04, 2020 1:43 pm
Has thanked: 41 times
Been thanked: 64 times

Re: Sharp MZ

Unread post 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.
Post Reply