Port request: mz800em


Ok, here is a new version.


gmz800em.zip


The sound is now ok, most of the time. I have to rewrite most of the sound part, so mz700 sound is now broken...


There are still problems. Flappy speed is still somewhat erratic, and some games start but hang, waiting for some unimplemented IO port or interrupt I guess.


Some games looks quite perfect, like Fatty2 or Dizzy6...


Try and tell me, I'll continue to work on gmz800em a bit..
 

Attachments

  • gmz800em.zip
    138.5 KB · Views: 244
Nice! Flappy indeed is still a bit too fast and also results in fast sound.


Nakamoto Works fine with 700 sound (old version)


Zexas works fine with 800 sound (this version)


Moty - not sure if this game has sound. Works fine without sound. (this version)


Wooky - 2 files (disks) can't be loaded. (both versions)


Is there a method to use 2 disks? Anyway , great job and it seems like you are getting closer solving the sound issue. Thanks !
 
For the 2 disks, I don't think it will work, as the Disc Hardware is not fully emulated. But there are some hacks to load 4 discs at once for Basic. Maybe try to put both files on command line. I will take a look at how this work later.


For the sound, I will probably look at how Takaeda do the MZ700 sound to implement the same, and drop the original sound.
 
Last edited by a moderator:
OK, so you dropped the idea to port the common source code project from takeda toshiya?
 
No, I haven't drop this. I am still working (a little) on this. Right now, I am stuck, the Wine BitBlt function takes ages to Blit, and it seems it use StrechBlit... And I have yet to found how I can try to optimize that. But it will be most likely in the Wine source (gasp :wacko: ), as every Blitting function I have seen is just a warper that call the StrechBlit. Right now this is a limiting factor, because the MZ800 from Takaeda is really good, and very well programed, but it is runing to slow, even with overclock.


So my plan is to fix, as much as I can, gmz800em, plug-in some Takaeda's emulator pieces here and there, do a PND with a mini frontend based on Zenity (just a dialog box to choose a .mzf" file).


And then get MZ800 from Takaeda runing at a decent speed (at least 50% :( ), compile MZ700 and MZ2500 also, try and package it (with the Winelib thing, it will be tricky), add some Zenity menu also, to choose wich emulator launch (I don't want a PND with too much entries on the menu, but I am open to suggestions), and tag it as Beta and put it here or on the repo. Then, if it works well, converts the others emulators from Takaeda and upgrade the PND.


Here is the plan (but I also have other projects going on, so I am not full speed).


*EDIT* As a quick fix, I can modify Takaeda to just BitBlt on even frame... that speed up enough to be testable...
 
Last edited by a moderator:
Follow up: I checked more Wine source code. There seems to be special code for BitBlt in StrechBlt. But, what is happening I think is that XWindows is configure for 16bits I think, and buffer for MZ800 is 32 bits, maybe the conversion takes long. I have to verify this, and maybe change the rendering to do 16bits only...
 
Well.. gmz800em is already working pretty good and almost qualifies for the trophy ;) If you can add the MZ700 sound and maybe do something about Flappy's speed, I will send the GP2X to you.


GUI is not the most important thing for me, I am planning on using Pandafe for that so I hope you can at least not break command line functionality.
 
Oh, sure, I can re-add MZ700 sound. About Flappy speed, I have to experiment a bit, but I must say I am clueless. Maybe I will not package gmz800em, leave it as a command line only, and concentrate on Takaeda common library for PND (I have to grab the latest Wine 1.5.18 and recompile that, they have imprime DIB Engine, so maybe I will get decent speed)...
 
Ok, I tried to put back the old MZ700 Sound code, without breaking anything else.


gmz800em.zip


But, to activate it, you must no forget the "-7" option in command line. Old sound and new connaot work together for now.


For Flappy speed, I tried many things with no succes...


I have update my Dev. Env to gcc 4.7.2 (I think I have spend an entire week on this). I will compile the new Wine soon and take a new shot at the Takaeda's common librairie...
 

Attachments

  • gmz800em.zip
    130.7 KB · Views: 240
Last edited by a moderator:
Ok, I tried to put back the old MZ700 Sound code, without breaking anything else.


gmz800em.zip


But, to activate it, you must no forget the "-7" option in command line. Old sound and new connaot work together for now.


For Flappy speed, I tried many things with no succes...


I have update my Dev. Env to gcc 4.7.2 (I think I have spend an entire week on this). I will compile the new Wine soon and take a new shot at the Takaeda's common librairie...

Nice, will try it out! Good to have the 700 sound again :) It will be interesting to see if you can manage to port Takaedas 800 emulator with the winelib method. Do I understand correctly that you are able to compile the windows source with winelibs and as a result you will create a native linux binary?
 
Nice, will try it out! Good to have the 700 sound again :) It will be interesting to see if you can manage to port Takaedas 800 emulator with the winelib method. Do I understand correctly that you are able to compile the windows source with winelibs and as a result you will create a native linux binary?

Winlib and Winemaker are working almost like that. I compile the windows program from the Linux Env, and I produce an ARM "linux" binary, but it still need the Wine environment... It is a bit more then just libwine.so... Being a Windows program, you still have registry, drives, and things like that... But all "natively" in Linux/ARM, so I still find that interesting.
 
Last edited by a moderator:
Still fighting with the Takaeda's MZ800 port. It works, quite well with the new Wine release, but I have lost the sound (again). So still trying to figure out how get winealsa working (get DirectSoundCreate failed on MZ800).
 
Still fighting with the Takaeda's MZ800 port. It works, quite well with the new Wine release, but I have lost the sound (again). So still trying to figure out how get winealsa working (get DirectSoundCreate failed on MZ800).

Oh... bummer :(


Hope you can solve it. Wine and sound can be a bitch...


On the other hand good to know it works quite well without sound. This program is capable of disk swapping? If so, that would increase the amount of interesting programs to use with the emulator.
 
Takaeda's MZ800 is a complete emu. So it handle QDisk, Tape, Floppy, you can even record audio and video (didn't try). And the speed of Flappy looks good to me.


I am progressing with the sound. I still have no sound, but I think I have problems with Float. The DirectSoundCreate ask for a buffer of 16bits integer, stereo channel, and (for exemple because it is parametrable) 22050 Hz... quite common params... But the DSound of Wine ask Alsa for a 32bits Float at 48kHz.


So I either have to add 32bits float to Alsa... Or see if I can hack DSound (but this is unlikly, it's probably a big thing to do)... I try to recompile Alsa, and check dsound source code in the mean time (I also have put a message in the wine Board).


Once sound is back, I will force a Frameskip in Takaeda, to have 100% speed I hope (at 1GHz at least), and I will have to tweak a bit Wine before packaging this in a PND.


The main point is wine creat a pseudo Windows environment in the "home" folder. I prefer to have this folder in the PND, with a feuw exceptions (registry files mainly) in the home with some links... So some work to do before release.
 
Ok, recompile Alsa with the flag "--have-softfloat" did the trick. Wine choose Integer now. But it's much slower (Wine stays at 48kHz, even if I choose 22050 for the emulator). I will put the FrameSkip and start forking on the packaging of this.
 
Last edited by a moderator:
Hum, I have package a first alpha early release of Takaeda's emulators... but...


1/ it's big. 32 Mb !!! That's because of the whole Wine runtime as to come with the emulator. I removed some unused "dll" (like dxd10), but it is still very big (especially for just 1 little emulator).


2/ there is (again) no sound... nor Direct3D. in fact, the ".dll.so" wine objects doesn't seems to look at the LD_LIBRARY_PATH to find their so objects. So for Direct3D, it doesn't find libGL.so (even if I packaged it in the PND, in a PATH listed in the LD_LIBRARY_PATH), and for the sound, it use the firmware libasound.so, and try to play 32bits Float...


I will perhaps put it in the repo (it's to big to be putted here, limit is 10Mb) if i don't find how to make the dynamic linker work the way I want.
 
Take a look here


http://repo.openpand...ulators-ptitseb


and try a (the first on the pandora I think) Winelib application.

I think it is indeed the first Winelib application. Nice achievement!


Just tried it. It starts with a black screen so I looked for Roms to add in the App data. Found that MZ700IPL.ROM $0000-$0FFF


MZ800IPL.ROM $E000-$FFFF


FONT.ROM 8x8 dots font image


needs to be added as roms. I assume you didn't change these requirements?


Looked for those and found some roms packed in an emulator on the sharpmz site. Renamed to names above and tried to run the emulator.


Didn't seem to work still a black screen. (added the roms in the rom directory) so I guess the roms are incorrect.


Maybe it helps if you can add the technical names that are available through google (e.g. 1Z-013B.ROM) or maybe I am missing something else.


Emulator seems indeed to be quite slow (even when it doesn't find the roms). Changing to no-sound surely makes it a lot faster. I don't have a 1GHz device, I can only go to 800 or something like that. So I guess with sound will not be used in practice but still curious how it will run without sound.


How do you run MZF files? With play tape?
 
Last edited by a moderator:
For the ROMs, yes it is something like that. The MZ700IPL.ROM is 4kb, the MZ800IPL.ROM is 8kb. FONT is 4kb. They can be found on the internet, on the site specialized with Sharp MZ computer. i didn't change the requirement. (look for 9Z_504M.ROM)


For speed, yes, unfortunatly, it is slow now. Wine is improving rapidly, so it may evolve in the future. Also, I will look at the DirectSound part to make it less taxing on the system...


For the MZF, I use QDisc to insert, than "Q" at the main menu, as the roms is untouched, there is no autoload like with gmz800em.
 
Last edited by a moderator:
very,VERY interested in that direct 3d thing..what could emulate it\them?
 
Back
Top