CPCWiki forum

General Category => NC100, NC200, PCW, PDA600 - the rest of the Family! => Topic started by: JTN on 23:56, 23 December 20

Title: Status of MAME/MESS PCW emulation?
Post by: JTN on 23:56, 23 December 20
We all love Joyce and CP/M Box, but the prize from getting the MESS emulation working is that it can run in JSMESS in web browsers, via the Emularity (https://archiveteam.org/index.php?title=Emularity), and maybe one day PCW software on the Internet Archive will be directly runnable, as with CPC software (https://archive.org/details/cpc_Jet_Set_Willy_1985_Software_Projects).
So I'd like to see if there's anything I can do about that.

It's currently listed as "broken" in the supported systems (http://www.progettoemma.net/mess/sysset.php) list, but I can't find any clues about what work still needs to be done -- I didn't find an obvious TODO list in the git repo on a quick look -- and I'm not sure who to contact for more info. Anyone know? (I find hints here that arnoldemu (https://www.cpcwiki.eu/forum/profile/?u=122) and/or remax (https://www.cpcwiki.eu/forum/profile/?u=314) here may be involved?)

In my minimal smoke test of the version of MAME in Debian stable ("0.206+dfsg.1-1"), after giving a scary message:
[attach=1]
it appears able to at least boot the things I threw at it (CP/M, LocoScript 2, LocoScript 3), if slowly, and I didn't find anything obviously wrong:
[attach=2]  [attach=3]
So I'm not sure where to start in getting it considered Good Enough.
Title: Re: Status of MAME/MESS PCW emulation?
Post by: JohnElliott on 00:04, 24 December 20
There are a couple of MAME forums -- https://forum.mamedev.org/ and https://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=1 . Maybe someone there will know what the problem is. At one point I'm pretty sure it was the boot process; it was thought a bodge to inject the boot program directly into RAM rather than emulating the exact interplay between the Z80 and the 8041 that a real PCW has.
Title: Re: Status of MAME/MESS PCW emulation?
Post by: mahlemiut on 22:28, 24 December 20
Being marked "not working" doesn't necessarily mean that it doesn't do anything, usually more that there is some aspect of the system not implemented, or not perfect.  It largely depends on whoever has been working on it.
It's been a while since I last looked at it, but from memory:
- it doesn't boot properly from the printer MCU (there is no decent way to properly implement this is MAME at this time)
- the majority of software should run fine, although I remember Batman not working as it jumps to a page that should contain a RET, but I have no idea how that opcode gets written there. (just checked in 0.226, it still does not work)
- timing on printer output is not perfect, not sure if it's an issue with the MCU emulation or not.
Title: Re: Status of MAME/MESS PCW emulation?
Post by: JTN on 14:56, 31 December 20
Thanks for the hints; that gives something to get a grip on.

Quote from: mahlemiut on 22:28, 24 December 20
Being marked "not working" doesn't necessarily mean that it doesn't do anything, usually more that there is some aspect of the system not implemented, or not perfect.  It largely depends on whoever has been working on it.
It's been a while since I last looked at it, but from memory:
- it doesn't boot properly from the printer MCU (there is no decent way to properly implement this is MAME at this time)
Hm. I gather MAME prides itself on purity, but surely this bodge alone shouldn't be sufficient to mark it as MACHINE_NOT_WORKING, since the end result is pretty much indistinguishable.

Quote from: mahlemiut on 22:28, 24 December 20
- the majority of software should run fine, although I remember Batman not working as it jumps to a page that should contain a RET, but I have no idea how that opcode gets written there. (just checked in 0.226, it still does not work)
I don't think I've ever got Batman to go in Joyce either, but I assumed that was my mistake. I assume it works in CP/M Box, from all the videos.
Surely the startup contents of RAM outside 0002..0101 are unreliable semirandom garbage. The only data I have is a screenshot of JCE's post-boot-ROM dumper (https://www.seasip.info/Misc/bootdump.zip), which suggests that they are.
[attach=1,msg196132]

Quote from: mahlemiut on 22:28, 24 December 20
- timing on printer output is not perfect, not sure if it's an issue with the MCU emulation or not.
Hm, the printer controller MCU is beyond my knowledge.

There's clearly been a bunch of good reverse engineering of the PCW, from all the artifacts lying around; I assume the MAME ROMs (40026.ic701, etc) are MCU dumps (I remember JCE mentioned disassembling them); and there's the gate array metal layers (http://www.habisoft.com/pcwwiki/doku.php?id=es:hardware:gate_array). Is the story behind how these were obtained written down anywhere, and credits for who did the work?
Title: Re: Status of MAME/MESS PCW emulation?
Post by: mahlemiut on 22:06, 31 December 20
Yes, 40026.ic701 is the printer MCU ROM, and 40027.ic801 is the keyboard MCU ROM.
Powered by SMFPacks Menu Editor Mod