Franxis
MAME 4 ALL
DaveC, not yet... we have a lot of problems
Reesy posted on Aug 31 2005 at 06:46 AM said:Franxis posted on Aug 31 2005 at 12:26 AM said:- DrZ80: Reesy don't want to release DrZ80 source code yet, because he is improving the emulator yet, it lacks documentation, and some functionalities are not ready for MAME integration
DrZ80 is getting there I finally got around to completing the interrupt code last weekend. Hopefully this weekend I can knock up some basic documentation and release the source code. I may even add it to mame myself but it really depends on how much time I get.
I've sent you what I've got so far so check your hotmail address.
Reesy
Reesy posted on Sep 14 2005 at 06:34 PM said:I'm having some issues with getting DrZ80 into Mame, the problems are to do with memory banking. Once I've figured out how Mame handles memory banking I should be able to add DrZ80 to it.
Once DrZ80 been added to MameGP I'll send it across to you.
Reesy posted on Sep 14 2005 at 07:25 PM said:Well you may well be able to help.
The problem I have is that DrZ80 uses a direct pointer to memory when emulating the Z80 PC and SP registers. This basically means that instead of holding an offset into memory they actually hold the pointer to an address in the hosts system memory where the PC or SP would be.
If you take the Z80 PC for example. Most emulators would store the 16bit value ( 0x0000 to 0xFFFF ) when they want to read the next opcode at the current pc they pass the PC to their memory handlers and then the memory handlers return the byte at that address.
Now in DrZ80 I store the actual address of the next opcode. Say the Z80 PC was 0x100 and I had the emulated Z80 memory located address 0xC0000000 on the host system, the address in DrZ80's PC register would actually hold 0xC0000100.
DrZ80 PC = PC_BASE_ADDRESS + Z80PC
So instead of having to go through a memory handler I can just read the next opcode directly from address 0xC0000100. This saves a load of cpu time.
So my problem in Mame is working out what the PC_BASE_ADDRESS is, if you can think of way of doing this then I'm all ears
Reesy
Reesy posted on Sep 14 2005 at 07:25 PM said:Well you may well be able to help.
The problem I have is that DrZ80 uses a direct pointer to memory when emulating the Z80 PC and SP registers. This basically means that instead of holding an offset into memory they actually hold the pointer to an address in the hosts system memory where the PC or SP would be.
If you take the Z80 PC for example. Most emulators would store the 16bit value ( 0x0000 to 0xFFFF ) when they want to read the next opcode at the current pc they pass the PC to their memory handlers and then the memory handlers return the byte at that address.
Now in DrZ80 I store the actual address of the next opcode. Say the Z80 PC was 0x100 and I had the emulated Z80 memory located address 0xC0000000 on the host system, the address in DrZ80's PC register would actually hold 0xC0000100.
DrZ80 PC = PC_BASE_ADDRESS + Z80PC
So instead of having to go through a memory handler I can just read the next opcode directly from address 0xC0000100. This saves a load of cpu time.
So my problem in Mame is working out what the PC_BASE_ADDRESS is, if you can think of way of doing this then I'm all ears
Reesy