Author Topic: Status of MAME/MESS PCW emulation?  (Read 751 times)

0 Members and 1 Guest are viewing this topic.

Offline JTN

  • CPC464
  • **
  • Posts: 9
  • Country: gb
    • CP/M and PCW info
  • Liked: 6
  • Likes Given: 0
Status of MAME/MESS PCW emulation?
« on: 00:56, 24 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, and maybe one day PCW software on the Internet Archive will be directly runnable, as with CPC software.
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 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 and/or remax 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:
 

* mess_msg.png
(35.39 kB, 1649x299 - viewed 139 times)

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:
 

* mess_cpm.png
(39.54 kB, 839x630 - viewed 137 times)
 

* mess_loco3.png
(38.83 kB, 840x630 - viewed 146 times)

So I'm not sure where to start in getting it considered Good Enough.

Offline JohnElliott

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
  • Liked: 53
  • Likes Given: 3
Re: Status of MAME/MESS PCW emulation?
« Reply #1 on: 01: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.

Offline mahlemiut

  • 464 Plus
  • *****
  • Posts: 302
  • Country: nz
  • Liked: 151
  • Likes Given: 63
Re: Status of MAME/MESS PCW emulation?
« Reply #2 on: 23: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.
- Barry Rodewald
Amstrad CPC, Sharp X68000, Neo Geo Pocket, and Neo Geo AES system leader at HARP
http://www.homeactionreplay.org/

Offline JTN

  • CPC464
  • **
  • Posts: 9
  • Country: gb
    • CP/M and PCW info
  • Liked: 6
  • Likes Given: 0
Re: Status of MAME/MESS PCW emulation?
« Reply #3 on: 15:56, 31 December 20 »
Thanks for the hints; that gives something to get a grip on.

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.

- 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, which suggests that they are.
 

* pcwdump8.jpg
(251.88 kB, 763x571 - viewed 91 times)


- 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. Is the story behind how these were obtained written down anywhere, and credits for who did the work?

Offline mahlemiut

  • 464 Plus
  • *****
  • Posts: 302
  • Country: nz
  • Liked: 151
  • Likes Given: 63
Re: Status of MAME/MESS PCW emulation?
« Reply #4 on: 23:06, 31 December 20 »
Yes, 40026.ic701 is the printer MCU ROM, and 40027.ic801 is the keyboard MCU ROM.
- Barry Rodewald
Amstrad CPC, Sharp X68000, Neo Geo Pocket, and Neo Geo AES system leader at HARP
http://www.homeactionreplay.org/