Sharp MZ Series Emulator

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Sharp MZ Series Emulator

Postby psmart » Fri Sep 28, 2018 8:44 pm

Double post deleted!
Last edited by psmart on Sun Sep 30, 2018 1:36 pm, edited 1 time in total.

Slade
Atari freak
Atari freak
Posts: 59
Joined: Tue Dec 27, 2016 11:02 pm

Re: Sharp MZ Series Emulator

Postby Slade » Fri Sep 28, 2018 10:52 pm

Hey Phil,

Sorry to be a downer, but there's no link :)
This might be because you're a new user and can't post links.

Thanks for the effort in providing users with additional simulations.

Edit: Also, there is a similar port to the original MiST, here: viewtopic.php?f=115&t=33180

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Sat Sep 29, 2018 6:28 am

Hi Slade,

My fault, I assumed people new the GitHub repository for MiSTer so it didn't occur to me!!

Hopefully this will post, but the link is https://github.com/MiSTer-devel/SharpMZ_MiSTer

I will take a peek at Gehstocks emulator, I did have a MiST but its out on loan at the moment (has been for 6 months now, hope to get it back!).

Many thanks,

Phil

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3122
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sharp MZ Series Emulator

Postby Sorgelig » Sat Sep 29, 2018 8:12 am

What changes you've made to MiSTer binary?
Make a pull request to MiSTer.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3122
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sharp MZ Series Emulator

Postby Sorgelig » Sat Sep 29, 2018 8:25 am

It's better not to change files in /sys (except PLL and probably SDC).
This will make easier to upgrade the system files if there will be important update.
If you absolutely need some changes, then let me know - if it will be OK then it will be included in future releases of other cores.

Currently latest sys version is in Genesis core. You can see there HDMI_LITE flag which enable/disable simple HDMI output. It may be unstable so usually i keep it off.

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Sat Sep 29, 2018 9:05 am

Thank-you Sorgelig.

I will take the latest /sys and update the version I have. In the early stages, for whatever reason, I could not get the overlay to work, the video was working correctly when taken direct from the emulation to the VGA pins but not via the video_mixer, hence disabling the HDMI.

Some of the changes I made in /sys were to enable bi-directional I/O and configurable address so that I could target any location in the memory address range. The copy of /sys I had was one way and address always set to 0.

I've just merged your latest Main_MiSTer changes into my local repository and will look to Pull on Monday and merge. Many thanks.

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Sat Sep 29, 2018 9:18 am

For the Main binary, the changes are minimal, ie:-
15d14
< #include "sharpmz.h"
100,103d98
< char is_sharpmz()
< {
< return(core_type == CORE_TYPE_SHARPMZ);
< }
137,139d131
< case CORE_TYPE_SHARPMZ:
< return "SHARPMZ";
<
423,424c415
< (core_type != CORE_TYPE_8BIT) &&
< (core_type != CORE_TYPE_SHARPMZ))
---
> (core_type != CORE_TYPE_8BIT))
480,487d470
< case CORE_TYPE_SHARPMZ:
< puts("Identified Sharp MZ Series core");
< sharpmz_init();
< user_io_read_core_name();
< parse_config();
< break;
<
<
1443d1425
< (core_type != CORE_TYPE_SHARPMZ) &&
1807d1788
< if (core_type == CORE_TYPE_SHARPMZ) sharpmz_poll();
2184,2206d2164
<
< if (core_type == CORE_TYPE_SHARPMZ)
< {
< uint32_t code = get_ps2_code(key);
< if (code == NONE) return;
<
< {
< if (press > 1 && !use_ps2ctl) return;
<
< spi_uio_cmd_cont(UIO_KEYBOARD);
<
< // prepend extended code flag if required
< if (code & EXT) spi8(0xe0);
<
< // prepend break code if required
< if (!press) spi8(0xf0);
<
< // send code itself
< spi8(code & 0xff);
<
< DisableIO();
< }
< }
2350d2307
< (core_type == CORE_TYPE_SHARPMZ) ||

Two additional files have been added, sharpmz.cpp and sharpmz.h, all the menu logic etc for the emulation is stored in the new files.

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Sat Sep 29, 2018 9:23 am

The updates in menu.cpp are:
51d50
< #include "sharpmz.h"
660d658
< case CORE_TYPE_SHARPMZ:
811,816d808
< // SHARPMZ Series Menu - This has been located within the sharpmz.cpp code base in order to keep updates to common code
< // base to a minimum and shrink its size. The UI is called with the basic state data and it handles everything internally,
< // only updating values in this function as necessary.
< //
< if (user_io_core_type() == CORE_TYPE_SHARPMZ)
< sharpmz_ui(MENU_NONE1, MENU_NONE2, MENU_8BIT_SYSTEM1, MENU_FILE_SELECT1, &parentstate, &menustate, &menusub, &menusub_last, &menumask, SelectedPath, &helptext, helptext_custom, &fs_ExtLen, &fs_Options, &fs_MenuSelect, &fs_MenuCancel, fs_pFileExt, menu, select, up, down, left, right, plus, minus);
1123,1124d1114
< if (!entry) break;
<
1319,1330c1309
< if (menu)
< {
< switch (user_io_core_type()) {
< case CORE_TYPE_SHARPMZ:
< menusub = menusub_last;
< menustate = sharpmz_default_ui_state();
< break;
< default:
< menustate = MENU_NONE1;
< break;
< };
< }
---
> if (menu) menustate = MENU_NONE1;
1383,1387d1361
< else if (user_io_core_type() == CORE_TYPE_SHARPMZ)
< {
< menustate = sharpmz_reset_config(1);
< menusub = 0;
< }
1399,1402d1372
< else if (user_io_core_type() == CORE_TYPE_SHARPMZ)
< {
< menustate = sharpmz_save_config();
< }
1450,1453d1419
< case CORE_TYPE_SHARPMZ:
< menusub = menusub_last;
< menustate = sharpmz_default_ui_state();
< break;
2449d2414
< if (user_io_core_type() == CORE_TYPE_SHARPMZ) m = 2;
2458,2462d2422
< else if(m == 2)
< {
< menustate = MENU_8BIT_SYSTEM1;
< sharpmz_reset_config(1);
< }

I will revisit them as some changes may no longer be needed.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3122
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sharp MZ Series Emulator

Postby Sorgelig » Sat Sep 29, 2018 9:40 am

It's hard to understand your changes here. I need to look the code.
But it seems you've misused the MiSTer binary.
You need to declare your core as 8BIT core. Then you will be able to use standard 8bit menu settings provided by core.
If there is something very specific which cannot be done in existing MiSTer, then we need to discuss about it, and i will think how it can be added.
Please fork the Main_MiSTer and add your changes in your repository - i will see.

hlide
Atariator
Atariator
Posts: 17
Joined: Sun Nov 05, 2017 8:06 pm

Re: Sharp MZ Series Emulator

Postby hlide » Sat Sep 29, 2018 11:03 pm

Looking at the GitHub source of this project, the following machines MZ-80K, MZ-80C, MZ-1200, MZ-80A, MZ-700 are indeed part of the MZ-80K series. MZ-80B, MZ-2000 (and more) are not part of this family (major hardware and software difference and so incompatibility) and are considered as members of the MZ-80B series (there are no ancestor between MZ-80K series and MZ-80B series). As for MZ-800, it is part of the MZ-80K series.

So I think it would be better to separate the MZ-80K series and MZ-80B series.

By the way, the real compatibility in the chains is:

Code: Select all

MZ-80K ___ MZ-80C ____ MZ-1200
                   \__ MZ-80A
                    \_ MZ-700 ___ MZ-1500
                               \_ MZ-800                       


By the way, I own an MZ-80K, an MZ-80A, an MZ-700, an MZ-800 and an MZ-1500.

hlide
Atariator
Atariator
Posts: 17
Joined: Sun Nov 05, 2017 8:06 pm

Re: Sharp MZ Series Emulator

Postby hlide » Sat Sep 29, 2018 11:39 pm

Note that I consider MZ-800 has two modes: MZ-700 mode and MZ-800 mode. MZ-700 allows MZ-700 hardware and software compatibility (not full 100% but close). MZ-800 mode is quite alien to MZ-80K series with a different memory mapping.

The MZ-1500 is still considered wrongly as the Japanese version of MZ-800. MZ-1500 has two modes: MZ-700 mode and MZ-1500 but MZ-1500 mode acts more like an addition of features to the MZ-700 mode. MZ-800 and MZ-1500 modes are incompatible from hardware point.

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Sun Sep 30, 2018 12:37 pm

Thankyou for the info and great to see another Sharp enthusiast, what a collection you have :)

I still have an MZ700, my 80A went the way of the dodo unfortunately but if I see another good example at the right price, then I will get it. Currently looking to acquire a good MZ800 so I can evaluate it.

I note your comments but from a conceptual view the machines do differ but from a hardware perspective, they use the same chips with differing decodes (+ Z80PIO). My aim in this design is to create a standalone (within reason) monolithic unit which is capable of emulating any of the above, reusing resources within the fpga as is practically possible between emulations. For example, the graphics are so similar at the hardware level that Im going to combine all machines graphics into a single common module, the same for the CMT.

Anyone is welcome to fork and create separate units, or even perhaps port Nibbles Lab’s excellent DE0 fpga implementation of an MZ80B, open source gives so many possibilities. Hopefully my design will prove useful for enthusiasts.
Last edited by psmart on Sun Sep 30, 2018 1:39 pm, edited 2 times in total.

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: Sharp MZ Series Emulator

Postby brunosilva » Thu Nov 01, 2018 10:51 pm

hi
is this core working with vga?

i get out of range with two monitors...

thanks

psmart
Atarian
Atarian
Posts: 7
Joined: Fri Apr 27, 2018 12:43 pm

Re: Sharp MZ Series Emulator

Postby psmart » Fri Nov 02, 2018 9:44 am

Hi Bruno,

The pixel clocks for the MZ80A(K/C/1200) are 8MHz (320x200 @ 15.625KHz Horiz/60Hz Vert) , 8.8MHz (320x200 @ 15.611KHz Horiz/60Hz Vert) for the MZ700 and 16MHz (320x200, 640x200 15.625KHz Horiz/60Hz Vert) for the MZ80B/2000. True VGA is 25.175Mhz for 640x480 @ 60Hz with a Horizontal Frequency of ~31.5KHz. That being said, I have had no issue on the two monitors Im using (a Samsung 23" and 12" Wimaxit) with the given pixel clocks, so I have tended not to add any conversion. Bear with me and I will add a scan converter to double the VGA output to true VGA.

Also, the version in github will be updated in the next week or so, I have resolved a few issues such as the Cassette Unit reading and writing, more accurate timing and the MZ80B with APSS (FDC still to be written).

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: Sharp MZ Series Emulator

Postby brunosilva » Fri Nov 02, 2018 12:10 pm

hi

thanks for your work :)

this is the first core I try with vga with mister... I usually use hdmi. will you ever make it compatible with hdmi? :)

i will try with a third monitor that i have there :)

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: Sharp MZ Series Emulator

Postby brunosilva » Sat Nov 03, 2018 1:08 am

nop... three monitors and all out of range :(

brunosilva
Atari User
Atari User
Posts: 31
Joined: Mon Apr 09, 2018 10:58 pm

Re: Sharp MZ Series Emulator

Postby brunosilva » Fri Nov 16, 2018 10:48 pm

hi. :)

any news? so i can try the core :)

thanks

Martin8bity
Atarian
Atarian
Posts: 8
Joined: Mon Aug 18, 2014 11:12 am

Re: Sharp MZ Series Emulator

Postby Martin8bity » Tue Nov 20, 2018 8:07 pm

I tried OSSC with Sharp MZ core today. I was able to get picture on VGA input nad HDMI output while Linemult. mode set to x4. However there is no picture in MZ-700 mode, the signal is out of spec :( and loosing sync (red LED on OSSC). No success with direct VGA connection to my other 2 VGA monitors (Samsung, DELL) using VGA :-(


Return to “MiSTer”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests