Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Has anyone tried Marcel De Kogel's Z80 core?

Reply to topic
Author Message
vecna
  • Guest
Reply with quote
Has anyone tried Marcel De Kogel's Z80 core?
Post Posted: Thu May 18, 2000 7:21 pm
I think I may be about to try it out. Fortunately, I've used entirely too many CPU cores in CHASMS in the past, so it's pretty easy to drop cpu cores in there. With the notable exception of the MAME one, which, despite being highly recommended, I couldn't figure out how a) to seperate it from the rest of MAME or b) how in the world the interface is supposed to work anyway. Sigh.

Anyway, since I got the fixed BIT code for Marat's core from Marcel's and looking over it, it does look a bit newer and 'better' than Marat's, so I may give it a try.

I've been using RAZE, and have been more or less pleased with it, but I've figured that there are definitely some cpu emulation bugs in it, and the main thing I've been wrestling with now is -- well, when I was working on the Open Savestate format, I suddenly ran into a bug where my savestates were crashing inexplicably when I loaded a savestate, and I found out that actually this bug is in ALL versions of CHASMS that use RAZE, if they're compiled for DEBUG mode, and after a certain unknown point of added complexity to the code, will show up in RELEASE mode as well. And of course, the problem is that just using a black-box RAZE.OBJ makes it EXTREMELY hard to debug, all I know is that when it crashes, it crashes somewhere inside the main RAZE emulation loop. I honestly don't know whether this is a bug in RAZE or not, but I sure as hell can't figure it out, so I might as well try some other emulators. I have a suspicion that it may be related to RAZE's somewhat difficult method of memory access, but again, I have no real way of figuring this out. If the bug shows up in another cpu emulator as well, at least I can debug it this time -- and then maybe I can go back to RAZE.

- vecna
 
vecna
  • Guest
Reply with quote
Report
Post Posted: Thu May 18, 2000 8:40 pm
Well, after about 15 minutes of hacking, I got Marcel De Kogel's engine tentatively in CHASMS. I'm actually fairly pleased. Like Marat's, it unfortunately does not emulate the IRQ Line, so I'm going to have to try to hack it in there somehow maybe.

Charles Mac Donald: You may be interested in this, but apparently, Zoops 'Zoop it up!' demo is another casualty of RAZE. I didn't initially chalk it up to that, because I never got that demo to work using Marat's engine either -- but at the time the rest of my emulation was too immature. Now, just switching the cpu cores and not changing ANYTHING else of the supporting emulation, the demo works. Since we have the source code to that, it may be easier to figure out what the offending instruction(s) are with the demo rather than with commercial ROMs.

Otherwise, many of the games that didn't work before, including GG Aerial Assault, for instance, work now. I haven't tried my savestate thing with Marcel's core, but so far the overall compatibility has been great. It still doesn't run Altered Beast, but so far, I've not gotten that game to run in ANY of the 3 main cpu cores I've tried in CHASMS. The only game that I've noticed so far that mostly worked before that doesnt work with Marcel's is GG Outrun. I'm hoping that's just an issue with the IRQ line and not with any instruction bug. It was a bit unstable on RAZE, even; it would occasionally reset.

Anyhow, so far it's initially looking promising.

What I wouldn't give for the perfect z80 cpu core. Sigh. ;)

- vecna
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Re: Report
Post Posted: Thu May 18, 2000 9:31 pm
Quote
> Charles Mac Donald: You may be interested in this, but apparently, Zoops 'Zoop it up!' demo is another casualty of RAZE. I didn't initially chalk it up to that, because I never got that demo to work using Marat's engine either -- but at the time the rest of my emulation was too immature. Now, just switching the cpu cores and not changing ANYTHING else of the supporting emulation, the demo works. Since we have the source code to that, it may be easier to figure out what the offending instruction(s) are with the demo rather than with commercial ROMs.

If I can give you an advice: don't get my demo technical points too seriously.
It's known to be buggy anyway, I even had to add a patch for it in latest Meka.
But if it can helps debugging RAZE it's fine :)
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Thu May 18, 2000 10:55 pm
Quote
> I think I may be about to try it out. Fortunately, I've used entirely too many CPU cores in CHASMS in the past, so it's pretty easy to drop cpu cores in there. With the notable exception of the MAME one, which, despite being highly recommended, I couldn't figure out how a) to seperate it from the rest of MAME or b) how in the world the interface is supposed to work anyway. Sigh.

If it helps, here's a de-mame-ified source archive:

http://www.wenet.net/~cgfm2/MAMEZ80.ZIP

I'd really like to know (if you get it working) if the
compatability problems you've had are fixed or not.

The CPU state loading/saving stuff is commented out, just
because it's too hard to integrate into any project outside
of MAME which supplies a bunch of needed functions. You
can still read the registers normally and save the CPU context
that way.



  View user's profile Send private message Visit poster's website
vecna
  • Guest
Reply with quote
MAMEZ80
Post Posted: Fri May 19, 2000 9:14 pm
Quote
> I'd really like to know (if you get it working) if the
> compatability problems you've had are fixed or not.

Well, after a bit more hacking, I've now got CHASMS running MAME'z Z80 core as well. I think now I've had CHASMS functionally running under all the major Z80 cores except MZ80. Unfortunately I can't get to Zophar's right now to see if there were any I missed. ^_~ It was almost be amusing to bring the last version I had using Marat's core up to the current codebase and post 4 versions of CHASMS, each identical with the sole exception of the CPU emulation core. I don't think it would terribly useful, tho. Conversely, if I was sick enough to get all 4 cores in the EXE at once and set it up so that you can switch off between the 4, and then put in a checksum database, I think I could probably get a 100% compatibility rate with the exception of games that need weird peripherals. ^_~

So, MAME. Well, it IS a *bit* slower than the other C cores. The IRQ Line emulation definetely helps: Outrun GG works (didn't in Marcel or Marat's), Choplifter's lineints are correct, etc. MUCH to my surprise and shock, Altered Beast even ran perfectly! I hadn't gotten Altered Beast to run properly in Marat, Marcel, or RAZE. However Altered Beast DOES run in SMS Plus, which also uses RAZE, so it's more likely that I'm still doing something not-quite-right.

However, MAME is not perfect-but-slow; Zoop's demo once again didn't run (the only core I've gotten it to run under is Marcel's -- it probably runs under Marat's too tho, not sure), and Shadow Dancer (SMS) and Ace of Aces (SMS) do not run, (altho Aerial Assault (GG) does run).

Ax Battler (GG) doesn't run in any of the cores, so that's obviously a bug in my emulation.

So, if I were to cheesily classify the 4 cores I've tested, I would probably do so as follows:
(esh. I just KNOW the formatting will be horrible on this.)


Marat Marcel RAZE MAME
Compatibility 4 1 3 2
Speed 3 2 1 4
IRQ Line No No Yes Yes


Additionally, RAZE's memory system makes it a bit more convulted to use, and may be the source of the savestate bugs I was having -- when ported to Marcel's, there were no problems. I may not have been setting up the memory map correctly tho. I suppose if I wanted to test this theory I could just set up the entire memory map as MAP_HANDLED and just run them through the same WrZ80/RdZ80 that I use for Marat/Marcel/MAME.

What to do, what to do. ^_~ It would be IDEAL if I could hack IRQ line support into Marcel's core, but I tried that, and apparently I don't know enough about how marcel's core works, or the irq line itself, or the z80 for that matter.

I should go ahead and do disassemblies of games in a core they work in and a core they don't, and maybe find some of the instructions that are culprits in their respective cores. If I get the games that don't work in MAME working, I would probably be happy to use it despite it's speed or lack thereof. Alternatively, I would like to get a fixed version of RAZE as well since it's so fast, but since I had the savestate problem also I'm a bit hesitant to use it.

- vecna
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: MAMEZ80
Post Posted: Fri May 19, 2000 10:34 pm

Quote
> However, MAME is not perfect-but-slow; Zoop's demo once again didn't run (the only core I've gotten it to run under is Marcel's -- it probably runs under Marat's too tho, not sure), and Shadow Dancer (SMS) and Ace of Aces (SMS) do not run, (altho Aerial Assault (GG) does run).

Alright, with my implementation of the MAME core, Zoop's demo
works, Aerial Assault, Ace of Aces, and Shadow Dancer do not.

At this point I'm fed up enough to live with 99% compatability. :)

Quote
> I should go ahead and do disassemblies of games in a core they work in and a core they don't, and maybe find some of the instructions that are culprits in their respective cores. If I get the games that don't work in MAME working, I would probably be happy to use it despite it's speed or lack thereof. Alternatively, I would like to get a fixed version of RAZE as well since it's so fast, but since I had the savestate problem also I'm a bit hesitant to use it.

I tried taking your advice about working on fixing RAZE by
checking the demo sources, and it seemed to lock up at totally
random points every time. Ugh.


  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!