CPCWiki forum

General Category => Emulators => Topic started by: mahlemiut on 02:36, 09 May 15

Title: Got bored again...
Post by: mahlemiut on 02:36, 09 May 15
...so I made this. :)  Had to take a break from working on Cirrus Logic GUI accelerators. ;)

cpcexp: added ROMEN signal, and a function to tell an expansion to se... · (https://github.com/mamedev/mame/commit/d7fe89812403e218688c41962ba7fa2f66c96f9b)

(http://mahlemiut.marpirc.net/cpc_brunwordmk4.png)
Title: Re: Got bored again...
Post by: robcfg on 23:28, 09 May 15
Heh, super nice!  8)
Title: Re: Got bored again...
Post by: Gryzor on 13:44, 16 June 15
Apologies, but what exactly is going on here? :D
Title: Re: Got bored again...
Post by: CraigsBar on 13:46, 16 June 15
Yay.
Mess running a brunword elite ROM module I assume.
Title: Re: Got bored again...
Post by: Gryzor on 13:49, 16 June 15
Ah, funny that :)
Title: Re: Got bored again...
Post by: TFM on 15:26, 16 June 15
Hmmm... after taking a short look. Brunword seems to locate ROMs at &4000 and &C000... Well the SF2 can do that too. So a patch is thinkable.  ;)
Title: Re: Got bored again...
Post by: CraigsBar on 16:14, 16 June 15
Quote from: TFM on 15:26, 16 June 15
Hmmm... after taking a short look. Brunword seems to locate ROMs at &4000 and &C000... Well the SF2 can do that too. So a patch is thinkable.  ;)
How about the c4cpc, I'd love a brunword cart in CPR format?
Title: Re: Got bored again...
Post by: TFM on 18:21, 16 June 15
Quote from: CraigsBar on 16:14, 16 June 15
How about the c4cpc, I'd love a brunword cart in CPR format?


The enhanced banking of the Cartridge ROMs (first 8) can be used for that. So yes, the only thing you have to do is to change some ROM numbers in the banking of the Brunword Cartridge.


However, to be able to do this, one needs all the ROM content and their original position (address and I/O). Since I think that installing MESS is a mess - and I gave up, because my time is limited, I guess somebody else can do that. Or is everything already in the Wiki? I will take a look after I did pipet my RT-PCR.  :)
Title: Re: Got bored again...
Post by: mahlemiut on 12:17, 20 June 15
Well, it happened again...

(http://mahlemiut.marpirc.net/cpc_hd20_write.png)

(http://mahlemiut.marpirc.net/cpc_hd20_2.png)

(http://mahlemiut.marpirc.net/cpc_hd20_cpm3.png)

If you're impatient, it's in the MAME source now, otherwise wait for MAME 0.163 (coming very soon).

To use, add -exp hd20 to the commandline, which will also allow you to add -hard <filename>.
mame cpc6128 -exp hd20 -hard1 disk.chd

Only MAME CHDs are supported, you can create a blank hard disk image using chdman.  Geometry is 615/4/17.
chdman createhd -o disk.chd -c none -chs 615,4,17
(-c none means no compression, but this is required for MAME to write directly to the CHD image.  If you use compression, then data writes will be written to a separate file)

You can use X-DDOS 2.00 or 2.10 by using -exp hd20,bios=xddos200 or -exp hd20,bios=xddos210.  v2.10 is the default.

EDIT: http://mahlemiut.marpirc.net/cpc_hd20.avi (http://mahlemiut.marpirc.net/cpc_hd20.avi)  -- just a quick demo loading a game from HD.
Title: Re: Got bored again...
Post by: TFM on 17:26, 22 June 15
WoW!!!!!!! The legendary HD20 from Dobbertin!!!!!!!! This is pure awesomeness!!!!!!! Thank you so much!!!!!!!  :) :) :) :) :) :) :) :)


EDIT: Is there an ready to go archive of the emulator?

Title: Re: Got bored again...
Post by: Morn on 19:38, 22 June 15
Yay, it works, after 90 minutes of compiling the latest git version of MAME on my slow-ass Linux PC.   :)

Strangely enough, chdman does not get installed on Arch Linux automatically but I found it in the build directory.

Nice work, mahlemiut!

I think the next MAME release is this Wednesday, so those who do not want to compile MAME themselves do not have to wait too long...

P.S. I've also updated the MAME ROM zip file on the Wiki to include the HD20 ROMs.

Title: Re: Got bored again...
Post by: TFM on 20:23, 22 June 15
Would be nice to have an installation like for all other Emulators of the CPC on Windoof side. Just start & work with it.

Title: Re: Got bored again...
Post by: Morn on 21:48, 22 June 15
Well, you can get stable release binaries for Windows: MAME | Latest MAME Release (http://mamedev.org/release.html)

But you will have to wait for 0.163 to get this hard disc feature.
Title: Re: Got bored again...
Post by: TFM on 22:21, 22 June 15
It puts a lot of folders around, but I found nothing to start it.


As worse: No ROMs contained.


So is there a Manual somewhere? I tried that before, without any success. It may be a great emulator, but only PC experts can install or run it I guess.

Title: Re: Got bored again...
Post by: Morn on 23:20, 22 June 15
The wiki page has instructions and a zip file with the CPC ROMs: MAME - CPCWiki (http://www.cpcwiki.eu/index.php/MAME)

Unpack the ROMs into the roms folder, start cmd.exe, cd into the mame folder and run something like "mame cpc6218" (or mame64 if you have the 64 bit version).

I suppose you could try a GUI frontend, but usually they are better for arcade games. I hope now that MESS is part of MAME that will change and the GUIs will improve.

Title: Re: Got bored again...
Post by: Morn on 00:12, 23 June 15
P.S. And if you manage to start MAME, it will be fullscreen by default. You can exit with "Rollen", then "Escape", or toggle back to windowed mode with Alt-Return.

Title: Re: Got bored again...
Post by: mahlemiut on 01:29, 23 June 15
MAME 0.163 should be out within the next 36 hours, barring any major difficulties.

You can still build MESS, with make SUBTARGET=mess and if you want the tools (chdman and so on), add TOOLS=1 to that commandline.

A new feature in this release is being able to build an executable that runs a single driver.  make SUBTARGET=<driver> DRIVERS=<source file>
May not work in all cases, but this is being worked on, but when it does, it should be much quicker to build.
An example that does work - was able to test the new (and painfully slow) analog drums recently added to the arcade game Kid Niki, built using make SUBTARGET=kidniki DRIVERS=src/mame/drivers/m62.c

Title: Re: Got bored again...
Post by: Morn on 09:24, 23 June 15
Yes, the SUBTARGET stuff came from the JSMESS (http://www.cpcwiki.eu/index.php/JSMESS) project originally, didn't it? It's useful to have this in MAME too if you only want to build e.g. a CPC emulator from MAME without everything else.

EDIT: I've tried building the cpc6128 subtarget ("SUBTARGET=cpc6128 DRIVERS=src/mess/drivers/amstrad.c"), but the build process crashes.  :(
Title: Re: Got bored again...
Post by: remax on 18:30, 23 June 15
Quote from: Morn on 23:20, 22 June 15
The wiki page has instructions and a zip file with the CPC ROMs: MAME - CPCWiki (http://www.cpcwiki.eu/index.php/MAME)

Unpack the ROMs into the roms folder, start cmd.exe, cd into the mame folder and run something like "mame cpc6218" (or mame64 if you have the 64 bit version).

I suppose you could try a GUI frontend, but usually they are better for arcade games. I hope now that MESS is part of MAME that will change and the GUIs will improve.


QMC2 has it all... for ages!
Title: Re: Got bored again...
Post by: Morn on 18:41, 23 June 15
Quote from: remax on 18:30, 23 June 15

QMC2 has it all... for ages!
Compared to e.g. JavaCPC or WinAPE, inserting a disk image is too difficult with QMC2. Using the MAME commandline is easier than QMC2 IMO.
Title: Re: Got bored again...
Post by: TFM on 19:23, 23 June 15
OK, if already getting a DSK in is such a problem I guess I give it up.


Maybe some day somebody will make an Archive of that MAME and then is will be usable for a broader range of people and not only super specialists who have hours time for installation (which may or may not succeed). Sorry for sounding a bit disappointed, I'm sure it's a great emulator.


So maybe somebody could put the new version (after it's release in 35 hours) somewhere into the CPC Wiki. Or drop an .ZIP here.
Title: Re: Got bored again...
Post by: Morn on 20:10, 23 June 15
To be fair, you can also start the emulator without a disk image and then use the built-in menu to load a disc (under "File Manager"). This should work well for e.g. CPC games from the software list if the DSK image is in the MAME folder.

But if you want to load a .DSK from somewhere else on your hard drive, it's annoying that the built-in menu defaults to the root directory of your hard drive, so you have to navigate to the correct directory first.

So I use a Python script on Linux that calls MAME, which I run like "cpc somedisk.dsk" in the directory that has my disk image. This cpc script is also registered to handle .dsk files, so I can also just double-click a .dsk file in the file manager and MAME will pop up with the disc inserted.

#!/usr/bin/env python

# Starte MAME mit CPC-Emulation

# "cpc"  : emulated keyboard
# "cpcn" : natural

import os
from sys import argv

if 'cpcn' in argv[0]:
    nat = '-natural'
else:
    nat = ''

s = "/usr/share/sdlmame/sdlmame cpc6128 -skip_gameinfo -window %s -keymap -keymap_file /usr/share/sdlmame/keymaps/km-de.txt" % nat

if len(argv) > 1:
    for x in range(1, len(argv)):
        s += ' -flop%u "%s"' % (x, argv[x])
os.system(s)

# .zip Files mit .DSKs koennen als Directory übergeben werden
Title: Re: Got bored again...
Post by: TFM on 20:26, 23 June 15
@Devilmarkus (http://www.cpcwiki.eu/forum/index.php?action=profile;u=93) : Can you put the HD20 support in JavaCPC or maybe @Executioner (http://www.cpcwiki.eu/forum/index.php?action=profile;u=17) can put it in WinApe?

Title: Re: Got bored again...
Post by: Morn on 20:34, 23 June 15
Quote from: TFM on 20:26, 23 June 15
@Devilmarkus (http://www.cpcwiki.eu/forum/index.php?action=profile;u=93) : Can you put the HD20 support in JavaCPC or maybe @Executioner (http://www.cpcwiki.eu/forum/index.php?action=profile;u=17) can put it in WinApe?
AFAIK they would need to implement an XT hard disk controller, which already existed in MAME/MESS for PC emulation.
Title: Re: Got bored again...
Post by: Morn on 20:57, 23 June 15
So the simple solution to running MAME on Windows is......... install Linux! You know you really want to! You can even lock out velociraptors with it!  :P

(http://cdn.themis-media.com/media/global/images/library/deriv/928/928512.gif)
Title: Re: Got bored again...
Post by: TFM on 21:25, 23 June 15
Looks like!  :-X   :laugh:
Title: Re: Got bored again...
Post by: TFM on 22:52, 23 June 15
@mahlemiut (http://www.cpcwiki.eu/forum/index.php?action=profile;u=89) : Did you or could you please check if your HD20 implementation works with FutureOS? (I mean look at directories, type files on screen etc.).  :)
Title: Re: Got bored again...
Post by: remax on 23:21, 23 June 15
Quote from: Morn on 18:41, 23 June 15
Compared to e.g. JavaCPC or WinAPE, inserting a disk image is too difficult with QMC2. Using the MAME commandline is easier than QMC2 IMO.


I can't see why you find it more difficult...


Quote from: Morn on 20:57, 23 June 15So the simple solution to running MAME on Windows is......... install Linux! You know you really want to! You can even lock out velociraptors with it!  :P 


Han han, you didn't say the magic word...
Title: Re: Got bored again...
Post by: mahlemiut on 00:56, 24 June 15
Quote from: TFM on 22:52, 23 June 15
@mahlemiut (http://www.cpcwiki.eu/forum/index.php?action=profile;u=89) : Did you or could you please check if your HD20 implementation works with FutureOS? (I mean look at directories, type files on screen etc.).  :)
It didn't when I checked.  It would read one of the HD20 ports, but appeared to do nothing with the result.
I used the CPR version for that, as that's the only version that works in MESS, since you can't directly control which slot ROMs plug into (it's to do with the way the driver was originally written, I wasn't about to re-write it all.  Yet. ;))  I need to fix up the analogue input ports too, since that would be something to test it against.
Title: Re: Got bored again...
Post by: TFM on 19:13, 24 June 15
If you need any kind of help with it let me know.  :)
Title: Re: Got bored again...
Post by: mahlemiut on 08:12, 25 June 15
Well, looks like the reset register expects a reset regardless of whether it's a read or a write.  Added the chip reset to the read handler, and now I can get a directory listing, at least.  (and fixed up the analogue inputs so that's FutureOS is at least somewhat controllable now)

(http://mahlemiut.marpirc.net/cpc_hd20_future.png)

Couldn't type the text file though, complains about "No F.Header". (File header?  Refers to AMSDOS header?  ASCII files have no header, so maybe expected behaviour?)
Title: Re: Got bored again...
Post by: TFM on 17:04, 25 June 15
Quote from: mahlemiut on 08:12, 25 June 15
Well, looks like the reset register expects a reset regardless of whether it's a read or a write.  Added the chip reset to the read handler, and now I can get a directory listing, at least.  (and fixed up the analogue inputs so that's FutureOS is at least somewhat controllable now)
Ok, great! The read-port (iirc) is to reset the hard-disc. (Dunno if you talked about this before, but you got it running! That's all that counts).

Quote from: mahlemiut on 08:12, 25 June 15
Couldn't type the text file though, complains about "No F.Header". (File header?  Refers to AMSDOS header?  ASCII files have no header, so maybe expected behaviour?)
That's a regular behavior. When typing an ASCII file you get the message "No header". But just press space and continue to select screen format in which you would like to see the file.
Sorry, I should make this more clear in the handbook (which I intend to overwork soon, because at July 12 there will be some releases :-))

Thank you very much for dong all this!!!
Title: Re: Got bored again...
Post by: mahlemiut on 01:09, 26 June 15
Ok, it looks like it gets stuck waiting for keyboard input, and nothing seems to work.  Likely an issue with the PPI, did you use different keyboard handling code for the CPR version? (So that I'll know if I need to implement the specific buggy PPI implementation the Plus uses)
Title: Re: Got bored again...
Post by: TFM on 02:01, 26 June 15
Quote from: mahlemiut on 01:09, 26 June 15
Ok, it looks like it gets stuck waiting for keyboard input, and nothing seems to work.  Likely an issue with the PPI, did you use different keyboard handling code for the CPR version? (So that I'll know if I need to implement the specific buggy PPI implementation the Plus uses)


Honestly I had this "bug" all the time in FutureOS. It's a problem of FutureOS. Sometimes it senses a pressed letter which is not there. I don't know why this happens. My keyboard scanning does it the same way the Firmware does it (regarding values getting send to / received from PPI/PSG ports).
So the emulation is IMHO (99,7%) fine. I really wished to know why it happens. I have to care about it, but don't know where to start with.  :(
Title: Re: Got bored again...
Post by: mahlemiut on 08:18, 26 June 15
Seems to work when I press Caps Lock, for some strange reason.  Caps Lock, in general, seems to be a bit broken.  I can switch it on, but it can never be switched off.

I tried removing the PORT_TOGGLE (which is used when an input bit only changes state when you press it, ie: press it once to make it active, press it again to make it inactive), but that just made Caps Lock on permanently.
Title: Re: Got bored again...
Post by: arnoldemu on 09:01, 26 June 15
When does it get stuck?

@TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179): The code in futureos looks ok.

I can see you are selecting the psg register and then sending inactive to psg.
I see you read psg register and read the data. I don't see you sending inactive to psg again.
Firmware does send inactive after port read, so it seems futureos is different here. Firmware also returns port A to output when it's used it. When it needs to read it switches and returns it back again. The sound code assumes port A is set to output.


Title: Re: Got bored again...
Post by: mahlemiut on 14:15, 26 June 15
Seems to be some issue with using Caps Lock in general, I get it staying active on PC drivers also.  Trying to figure out if it's an SDL2 issue or affects Win32 builds also.

FutureOS gets stuck on filename entry when renaming files (shouldn't FutureOS keep filenames in uppercase?  X-DDOS can't find lowercase filenames), or waiting for the spacebar to be pressed.  Essentially, it seems to work for selections, but not keypress waiting or text entry, but will start working if Caps Lock is pressed once.  No idea why.
Title: Re: Got bored again...
Post by: Morn on 19:21, 26 June 15
Quote from: TFM on 19:23, 23 June 15
So maybe somebody could put the new version (after it's release in 35 hours) somewhere into the CPC Wiki. Or drop an .ZIP here.
You could also try MAMEUI64, they have released their 0.163 version now: IV/Play and MameUI Home Page (http://www.mameui.info/)

Unzip (with 7-ZIP), unzip the CPC ROMs from the Wiki into ROMs\, search for cpc in the builtin game list and you should at least be able to start the CPC emulation. Maybe set "Run in a window" under Default Game Options -> Display first.


(http://www.cpcwiki.eu/imgs/b/b4/Mameui.png)
Title: Re: Got bored again...
Post by: TFM on 21:47, 26 June 15
Here is a DSK in Vortex Format, it contains some games, converted to run with the HD20 hard disc. Most files are system files, so you can't see them. If you copy them all to the HD20 you can run the games from there.


I found that DSK today by accident...so I thought I post it here. Hope you like it.  :)
Title: Re: Got bored again...
Post by: mahlemiut on 00:28, 27 June 15
How do you go about copying the files?  With FutureOS, it will copy them, but X-DDOS cannot find the files once copied - they are visible to CAT, but not |DIR and they cannot be run (gives file not found error).  |COPY isn't much use either.
Title: Re: Got bored again...
Post by: TFM on 18:38, 29 June 15
Oh, the files to start are DIR, so can be seen. Others (not to start) are invisible. Yes, you can use FutureOS to copy. Or if you don't need the crap for FutureOS (just the games) use X-DDOS COPY command with *.* (then delete unused crap). Sorry, haven't really had the time to care about details, didn't think it's a problem. But you can use a lot of cracked games from HD20 anyway.  :)
Title: Re: Got bored again...
Post by: mahlemiut on 12:13, 26 October 15
amstrad: added Draysoft Doubler expansion device · mamedev/mame@1e29040 · (https://github.com/mamedev/mame/commit/1e2904037e167d463aa4040aafa18c053682e190)

Done in less than an hour, and not exactly the most useful of devices, but it does provide one (rather roundabout) way of converting a CDT to WAV. ;)
Powered by SMFPacks Menu Editor Mod