GP2X Drz80 Disscusion


If you can wait a couple of days (weeks maybe?) it will be a little more complete. I will implement number of cycles executed as we have disscused. I think you can download the source to gngeo to have a good look on how it works but as I said we're right in the middle of fixing up a lot of things.
 
Thanks, FluBBa! I will wait for it, then. Please let me know when you have something new.
 
FluBBa posted on Mar 8 2006 at 07:39 AM said:
So can you tell one of those "some" drivers? :p

1) Cycles are used by some functions in cpuintrf.c (look for ICOUNT (cpunum) into this file. In example cpu_gettotalcycles():
drivers\ junofrst, locomotn, meadows, mikie, nemesis, pooyan, rocnrope, tempest, timeplt, tp84, tutankhm, bzones, circusc, cop01, ironhors, jack.
machine\ gauntlet, mhavoc, asteroid, atarisy1.
sndhrdw\ scramble, smashtv, trackfld, frogger, gyruss.

A fast way to test this is in example Amidar game. If cycles are not updated the music sounds veeeery slooooowly. If cycles are correctly update the music is ok.

2) PC is directly read by memory and interrupt handlers in example in:
cpu_getpc():
drivers\ atarisy2, bombjack, btime, fastfred, karnov, neogeo, prehisle, punchout, rastan, rthunder, scramble, seicross, system16, tehkanwc, twincobr.
machine\ asteroid, dec0, digdug, exterm, galaga, mappy, neogeo, scramble, smashtv, starwars, tp84, williams, wow.
vidhrdw\ crtc6845, dec8, gameplan, neogeo.

3) Previouspc is used in example in:
cpu_getpreviouspc():
drivers\starwars, tempest, btime, maketrax,
machine\atarisy1, gauntlet, missile, sega, segar.
But i don't know if i have understand correctly the previouspc meaning, because in the C core there are some strange things.

Regards. :rolleyes:
 
Last edited by a moderator:
cpu_getpc
drivers/
atarisy2: Doesn't use Z80
bombjack: Only used for speedhack, removed from newer versions of MAME.
btime: Doesn't use Z80
fastfred: *Used to simulate protection.
karnov: Doesn't use Z80
neogeo: Not used by the Z80, removed in newer versions.
prehisle: Not used by Z80. Only speedhack?
punchout: Removed in newer versions of MAME.
rastan: Only used for speedhack, removed in newer versions of MAME.
rthunder: Doesn't use Z80.
scramble: *Used to simulate protection.
seicross: Removed in newer versions of MAME.
system16: Not used by Z80.
tehkanwc: *Used to fix a problem
twincobr: Not used by Z80, removed in newer versiosn of MAME.

machine/
asteroid: Only used for speedhack, removed from newer versions of MAME. Uses gettotalcycles though.
dec0: Doesn't use Z80
digdug: Only used for speedhack
exterm: Doesn't use Z80, speedhack only.
galaga: Fix for high score? Seems removed in newer versiosn of MAME.
mappy: Doesn't use Z80.
neogeo: Speedhacks only. Removed in newer versions of MAME.
scramble: *Used to simulate protection.
smashtv: Doesn't use Z80.
starwars: Doesn't use Z80.
tp84: Not used by Z80.
williams: Doesn't use Z80.
wow: *Used to fix something.

vidhrdw/
crtc6845: Function not used?
dec8: Hack. Fixed in newer versions of MAME. Though might need to fix Reset command.
gameplan: Function not used?
neogeo: Only used to debug? Removed from newer versions of MAME.

So the getpc function is actually needed by 4 drivers...
fastfred, scramble, tehkanwc & wow.

I'll take a look at the other things as well.
 
Hey guys. I got to look at the DrZ80 core (and the z80 core I want to replace) a bit more last night.

It seems that I probablly don't need to know the number of cycles that elapsed. The core I'm replacing does return that information, but it really only uses it in a while loop something like this.

Code:
while(elapsed<execute)
{
     elapsed += Z80_Step();
}

After looking at DrZ80 closer, it seems that I could just do this instead.

Code:
Z80_Execute(execute);

Anyway, that doesn't mean that I have it running, yet. I'm still curious where I should get the "best" version of the DrZ80 core. I see that it's in MAME, GnGeo, and even LJP (I think).

I also might need a little consultation to get it working, so is there someone that I can bug when I actually try to implement it? Do any of you guys hang out on IRC at all?

Thanks!
 
Well, actually, I got it running in my project, now. It works rather nicely.

Please keep me in the loop of any new updates.

Thanks guys!!!
 
Reesy posted on Mar 17 2006 at 07:00 PM said:
Ok I've got to ask....what exactly are you working on Flavor?
I knew someone would have to ask, but I'd rather not say until it's further along. Let's just say that it's an emulator. :p
 
Last edited by a moderator:
Flavor posted on Mar 17 2006 at 07:06 PM said:
Reesy posted on Mar 17 2006 at 07:00 PM said:
Ok I've got to ask....what exactly are you working on Flavor?
I knew someone would have to ask, but I'd rather not say until it's further along. Let's just say that it's an emulator. :p


Hmmm which systems used Z80..

Megadrive? yeah but I doubt he would do that as we already have a perfect one.

Neo Geo, Nah we have that.

MAME, have that too, but it could be a driver to get sound on some older games, doubt that though.

Colecovision? we kind of have it in MESS.

Speccy? Flavor is in the US, so doubtful.

SMS? Maybe, but I just don't think that is it. Reesy has a killer one if he ports that.

GB/GBC maybe..

Bally Astrocade? maybe.

MSX? could be..
 
Last edited by a moderator:
DaveC posted on Mar 17 2006 at 07:16 PM said:
Hmmm which systems used Z80..
Give me a DaveC joycap, and I'll tell ya. :p

Nah, I don't want to create any expectations. I'd rather just spend my time working on it until it's playable.
 
Last edited by a moderator:
Flavor posted on Mar 18 2006 at 02:35 AM said:
DaveC posted on Mar 17 2006 at 07:16 PM said:
Hmmm which systems used Z80..
Give me a DaveC joycap, and I'll tell ya. :p

Nah, I don't want to create any expectations. I'd rather just spend my time working on it until it's playable.


Who knows, If I like your emu enough maybe I will give you a cap as a small donation. It must be very L337 though to deserve such a prize :p
 
Last edited by a moderator:
No, LJP doesn't have DrZ80 but I'm currently looking for the source to add it :p

It would benefit from it in Genesis, SMS/GG and NGP, at least.
 
Back
Top