Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#120871 05/10/22 06:25 PM
Joined: Feb 2022
Posts: 1
M
Member
OP Offline
Member
M
Joined: Feb 2022
Posts: 1
so uhhhhhhhhhhhh, we were talking (or more precisely, i was talking to other MAME devs) on the shoutchat about what CPU cores to pick until Al Kossow said that "starting a thread about cores is SO much better than walking away for 1/2 an hour and seeing half of the discussion gone".

so i'm doing just that. someone requested on the shoutchat about which cpu cores that person should be working on for mame... i wanted to participate but asked for some help and i was presented with two CPUs that "deserved some love" - ARCtangent and ARCcompact (hope i've spelled those two right!). after some discussion, said person decided to go with the former.

if there's any other CPU core that you think deserves some love or at least some sort of polish, please let your voice be known right here!

Last edited by Modulus RC-28; 05/10/22 06:28 PM.
Joined: Jun 2001
Posts: 471
O
Senior Member
Online Content
Senior Member
O
Joined: Jun 2001
Posts: 471
mcs51, but it's going to be nontrivial. Not only the cpu is harvard and annoying (memory-mapped registers!), but there's a trillion variants so there's a need for extreme flexibility.

Joined: Mar 2001
Posts: 16,892
Likes: 51
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,892
Likes: 51
Wasn't AJR working on mcs51? Or planning to?

Joined: May 2004
Posts: 1,702
Likes: 1
H
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,702
Likes: 1
I think somebody was, because I was somewhat relieved to be able to drop looking at the Leapfrog IQuest / Turbo Twist stuff, which seemed to be failing on some kind of peripherals on whatever variant they have in the glob.

Joined: Jan 2011
Posts: 248
Likes: 3
Senior Member
Offline
Senior Member
Joined: Jan 2011
Posts: 248
Likes: 3
I guess that explains why none of the terminals that use mcs51s are simulated.

Joined: Jan 2011
Posts: 248
Likes: 3
Senior Member
Offline
Senior Member
Joined: Jan 2011
Posts: 248
Likes: 3
I have some mcs51 in-circuit emulators, which adds an extra layer of nightmare fuel to what could be done

Joined: May 2009
Posts: 2,023
Likes: 59
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,023
Likes: 59
Speaking of MCS-51, wasn't some refactor or other - possibly the conversion of the MC68681 DUART to use diserial - responsible for audio issues being introduced in the Microprose 3D games ages ago? I'm not sure if the best solution would be to make MCS-51 also use diserial, implement a better version of diserial, or make the DUART use a custom serial implementation once again.

Joined: Mar 2001
Posts: 16,892
Likes: 51
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,892
Likes: 51
Correct. MCS-51 has never spoken bit-serial, so the Microprose games were left out when the rest of MAME was converted. AJR claimed to do the serial right on the MCS-51 you'd have to rewrite the entire core due to some unique semantics it has but I don't know the details.

Joined: Apr 2010
Posts: 57
H
Member
Offline
Member
H
Joined: Apr 2010
Posts: 57
As a possibility for interested parties, besides 80960KA/KB, are any other i960 variants currently needed or supported?

Joined: Mar 2001
Posts: 16,892
Likes: 51
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,892
Likes: 51
I don't know of any dumps for anything that used non K-series i960s off the top of my head. I've read a couple of times that i960s were popular in some laser printers.

Joined: Feb 2004
Posts: 2,343
Likes: 61
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,343
Likes: 61
MCS-51 needs to be reworked to go down to at least S-cycle granularity for serial to work properly. AJR’s talked about doing it at various times. The high-speed pipelined MCS-51 implementations are so radically different I’m not sure you’d be able to get accurate timings for them if you tried building them on the same S-cycle based core as the original Intel implementation.

You could fix the Microprose sound issue without rewriting the MCS-51 code by making a stub device_serial_interface thing to interface between the microcontroller and the UART on the other side. The trouble is, the code in that driver is pretty crusty, so you’d probably end up wanting to do a fair bit of refactoring while you were at it. That’s probably why no-one has done it so far – untangling old code isn’t that much fun.

Joined: Dec 2015
Posts: 144
Likes: 3
A
AJR Offline
Senior Member
Offline
Senior Member
A
Joined: Dec 2015
Posts: 144
Likes: 3
The MAME CPU cores that need the most work, to put it plainly, are those that haven't been added except as stubs. Lately I've started work on real emulation for Motorola's CPU16 (M68HC16), which is a sort of low-end 16-bit DSP loosely based on M68HC11. As usual, I'm implementing it as an enormous state machine, which was perhaps not the easiest way considering the numerous addressing modes for all of the arithmetic and logical instructions.

For those architectures which have enough of the instruction set emulated in MAME, the problem often becomes the lack of emulation for on-chip peripherals. UARTs are indeed a common omission, and MAME's MCS-51 core indeed particularly suffers from the lack of a proper UART, but they're critical mostly for certain applications that tend to demand them, such as MIDI synthesizers and video display terminals. Many other MCUs and SoCs have UARTs that are used very little (ST2XXX) to not at all (RISC II) in systems that have been dumped.

Timer blocks have been emulated more often in MAME, but a fair number have still yet to be added. KL5C80A12 is still missing one of its two timer blocks, and I plan to add that someday because it's a probable blocker for consolidating the Sammy medal games and running their Flash setup menu from the BIOS (which was formerly simply bypassed but now is hacked to run just enough code to initialize a few critical registers). The Atari CAGE emulation is rather messy right now because a whole bunch of TMS320C31 peripherals lack proper emulation, including the timers. The "PSX" CPU emulation is missing cycle-by-cycle DMA when I last checked, which is a blocker for replacing a whole set of legacy SCSI devices with modern counterparts. The MN1880 emulation I've written is now badly in need of interrupt sources from timers and other on-chip peripherals; it would help a lot if some documentation for that Panasonic MCU family were to turn up with more details on those than the mere summary sheets now available. (If those aren't forthcoming, my best guess would be that some of the timer registers might be similar to those of other Panasonic MCUs from the MN1870 and MN101 families.)

Last edited by AJR; 05/16/22 04:27 PM.
1 member likes this: exidyboy
Joined: Aug 2011
Posts: 16
D
Member
Offline
Member
D
Joined: Aug 2011
Posts: 16
The Motorola DSP56156 that's used in Konami's Polygonet Commanders and Polynet Warriors is *very* close to doing what it should. I ran out of time years ago to finish it off. The code is in a really weird state right now though. I was trying to do some abstractions in 2010 that modern C++ probably do much more easily.

The specific CPU can be a little frustrating working with because the documentation can be off in parts, but there *is* plenty of documentation, a few documentation addendum, and a win16 simulator for it, that can all be referenced. I wrote some python scripts that would exercise the simulator in ways that MAME exercised the core as well. It should be a fun project.

The MAME CPU core is communicating with the main CPU well enough to upload a bunch of 3d model data to the right spots - the dsp56156 just isn't grinding through its calculations yet. (see post here called "Polygonz attack" - https://mameworld.info/ajg/ ). If i remember right, it's getting stuck in a loop because i don't emulate one of the loop instructions right? Hard to recall.

I can try to dig up all the junk I have that would help in its emulation, if you're curious.

Joined: May 2009
Posts: 2,023
Likes: 59
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,023
Likes: 59
Personally, I'm rather interested in getting that core up and running as well. Any junk is appreciated.

The annoying thing about the DSP56156 is that it's more or less completely different from the DSP56001, which is another thing that's completely missing in MAME: Having a DSP56001 core would, at a minimum, allow audio emulation on the SGI Indigo, remove what will eventually be blockers for improving NeXT and Atari Falcon emulation, and potentially make life easier for implementing one of the Digital Video Cartridge variants on the Philips CD-i.

Page 1 of 2 1 2

Link Copied to Clipboard
Who's Online Now
4 members (Dorando, Olivier Galibert, Alegend45, 1 invisible), 23 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,069
Posts118,922
Members5,014
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com