Welcome!
Final Burn Neo => FBN Development => Topic started by: kev on July 16, 2008, 04:21:06 PM
-
While trying to work out what is going wrong with MAME Z80 and CZ80 in certain games, I ran into a problem with the sn76496 exit routine that was causing the megadrive driver to crash when using either core which I have fixed.
Also, the cz80 interface has been merged into the latest Zet. The make file will need to be changed to compile cz80.c, the other c files are included from there. Compiles ok with visual studio 2008 and PSP gcc but I have not tested with mingw. There are still problems with CPS1 Qsound, TNZ, vulgus, etc but I am still trying to find out whats wrong with them. Currently I suspect that the interface to Cz80 and MAME Z80 is handling interrupts incorrectly.
Finally, I have included my current wip of dec0 as I had made a few changes to the video rendering code which fixes the robocop title screen but its still quite f***ed.
http://www.kja.pwp.blueyonder.co.uk/smallfixes.rar (http://www.kja.pwp.blueyonder.co.uk/smallfixes.rar)
-
Cheers Kev. I've merged the changes in.
I had to name the anonymous struct (and amend all the macros to reflect it) to get it to compile under MinGW, and then it didn't work!
Rather than spend time debugging it I've put the code in as you sent it. I don't see the Windows build needing to use CZ80 so I haven't chased it down to make it work with MinGW (just not included it in the makefile).
-
Cool. I agree that we probably won't need CZ80 under windows anyway, esp when we have fixed the interface to the Mame z80. I'm going to take a look at merging in Oopswares sek later as well, as that seems to be faster than a68k.
-
hi Kev
i have update sources and try to compile
i have just these errors
Linking executable... FBA4PSP.elf
obj/PSP/burn/zet.o: In function `ZetSetReadHandler(unsigned char (*)(unsigned sh
ort))':
zet.cpp:(.text+0x20): undefined reference to `Doze'
zet.cpp:(.text+0x28): undefined reference to `Doze'
obj/PSP/burn/zet.o: In function `ZetSetWriteHandler(void (*)(unsigned short, uns
igned char))':
zet.cpp:(.text+0x2c): undefined reference to `Doze'
zet.cpp:(.text+0x34): undefined reference to `Doze'
obj/PSP/burn/zet.o: In function `ZetSetInHandler(unsigned char (*)(unsigned shor
t))':
zet.cpp:(.text+0x38): undefined reference to `Doze'
obj/PSP/burn/zet.o:zet.cpp:(.text+0x40): more undefined references to `Doze' fol
low
obj/PSP/burn/zet.o: In function `ZetNmi()':
zet.cpp:(.text+0x5a0): undefined reference to `DozeNmi'
zet.cpp:(.text+0x5a8): undefined reference to `Doze'
zet.cpp:(.text+0x5ac): undefined reference to `Doze'
obj/PSP/burn/zet.o: In function `ZetReset()':
zet.cpp:(.text+0x6b4): undefined reference to `DozeReset'
obj/PSP/burn/zet.o: In function `ZetRun(int)':
zet.cpp:(.text+0x7b8): undefined reference to `Doze'
zet.cpp:(.text+0x7c4): undefined reference to `Doze'
zet.cpp:(.text+0x7e0): undefined reference to `DozeRun'
collect2: ld returned 1 exit status
make[2]: *** [FBA4PSP.elf] Error 1
make[1]: *** [all] Error 2
make: *** [psp] Error 2
i try to see where i must change line in makefile but i dont find where exactly
can you help me about this ?
-
ok, i found the solution
in zet.cpp
nCycles = Doze.nCyclesSegment - Doze.nCyclesLeft;
transformed at
//nCycles = Doze.nCyclesSegment - Doze.nCyclesLeft;
result
emulation for CPS2 gigawing speed increase greatly !
same thing for metal slug first
i let the makefile for all want to compile for test and the cpp file modified
BE CAREFUL !!! => THIS FBA ACCEPT ONLY CPS AND NEOGEO
indeed, i have modified the version to make some test. I will add others systems after
bye :)
-
Undo the change you made and change
#define EMU_DOZE // Use Dave's 'Doze' Assembler Z80 emulator
//#define EMU_MAME_Z80
//#define EMU_CZ80
to
//#define EMU_DOZE // Use Dave's 'Doze' Assembler Z80 emulator
//#define EMU_MAME_Z80
#define EMU_CZ80
as there is no doze for psp. The fix you made will probably completely disable the z80, at a guess
-
ok, i will try this and i make feedback :)
thanks :)
just a thing : for CPS1 games, I can reload a new game when I want but it's not the case for CPS2 and NEOGEO, bug or maybe my fault ?
other thing, I want to activate control config but i dont find the concerned file
good evening :)
EDIT
code don't found in zet.cpp
weird !
EDIT 2
ok code found in zet.h
fine :)
EDIT 3
ok, I make the change and obtain this error :
Compiling src/burn/zet.cpp...
src/burn/zet.cpp: In function 'int ZetNmi()':
src/burn/zet.cpp:646: error: 'nCycles' was not declared in this scope
src/burn/zet.cpp: In function 'int ZetTotalCycles()':
src/burn/zet.cpp:682: warning: control reaches end of non-void function
src/burn/zet.cpp: In function 'int ZetSegmentCycles()':
src/burn/zet.cpp:671: warning: control reaches end of non-void function
src/burn/zet.cpp: In function 'int ZetHL(int)':
src/burn/zet.cpp:553: warning: control reaches end of non-void function
src/burn/zet.cpp: In function 'int ZetBc(int)':
src/burn/zet.cpp:532: warning: control reaches end of non-void function
src/burn/zet.cpp: In function 'int ZetRun(int)':
src/burn/zet.cpp:274: warning: control reaches end of non-void function
make[1]: *** [zet.o] Error 1
make: *** [psp] Error 2
i have make this change
Code :
// Z80 (Zed Eight-Ty) Interface
//#define EMU_DOZE// Use Dave's 'Doze' Assembler Z80 emulator
#define EMU_MAME_Z80
#define EMU_CZ80
compilation ok but roms slow
hum....
-
this cz80 core version is v0.9, with some fix by NJ .
i rewrite the Cz80_exec , to resolve the interrupt quite like the DOZE .
now , CPS1 QS works correctly .
-
this cz80 core version is v0.9, with some fix by NJ .
i rewrite the Cz80_exec , to resolve the interrupt quite like the DOZE .
now , CPS1 QS works correctly .
ok, I have compiled and error i have :
make[2]: Warning: File `src/cpu/cz80/cz80.c' has modification time 1.2e+04 s in
the future
Compiling src/cpu/cz80/cz80.c...
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not fo
r C
Linking executable... FBA4PSP.elf
Creating PSP EBOOT.PBP...
- 332 bytes | eboot.sfo
[1] 10642 bytes | src/psp/fbapsp.png
[2] 0 bytes | NULL
[3] 0 bytes | NULL
[4] 0 bytes | NULL
[5] 0 bytes | NULL
[6] 2172608 bytes | eboot_strip.elf
[7] 0 bytes | NULL
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[1]: warning: Clock skew detected. Your build may be incomplete.
first compilation => black screen but i can quit soft by home button
second compilation => same thing
any idea ?
for my part, i verify where is detected warning
:)
EDIT :
ok, after first verification => a cz80.o is created in
src/burn/cpu/cz80
and
obj/burn/cpu/cz80
the o file in src size 68k
the o file in obj size 62k
if I update the o file in obj, the makefile replace the file
I continue controls
-
this cz80 core version is v0.9, with some fix by NJ .
i rewrite the Cz80_exec , to resolve the interrupt quite like the DOZE .
now , CPS1 QS works correctly .
Nice work OopsWare. :) I am running some tests with this version and will upload an update to get it building with visual studio afterwards.
-
Linking executable... FBA4PSP.elf
Creating PSP EBOOT.PBP...
that sounds like it built ok to me, maybe a rom problem?
If you are having problems with any applying any of the patches I would suggest just using the code from OopsWares site as it is for now, any changes you are going to make can be merged in with the next version easily enough.
-
this cz80 core version is v0.9, with some fix by NJ .
i rewrite the Cz80_exec , to resolve the interrupt quite like the DOZE .
now , CPS1 QS works correctly .
Yeah, this is a very good fix! seems like all the problems in vulgus, etc are gone now.
Here is a version merged in with the latest zet. Treble, if you are reading this, can you please apply this patch you your source? :)
http://www.kja.pwp.blueyonder.co.uk/z80fix.rar (http://www.kja.pwp.blueyonder.co.uk/z80fix.rar)
-
hi kev , is MS VC does NOT support array of goto label ? any other changes ?
i'v repleased that inline innerRead / innerWrite functions with macros after i post the sourcecode.
now the Cz80_Get_PC() will work correctly while CZ80 is executting .
and i think it'll a bit faster .
-
hi kev , is MS VC does NOT support array of goto label ? any other changes ?
i'v repleased that inline innerRead / innerWrite functions with macros after i post the sourcecode.
now the Cz80_Get_PC() will work correctly while CZ80 is executting .
and i think it'll a bit faster .
Yeah, it seems that it doesnt like the array of gotos. Not really looked into why but it is possible to get it building with that option enabled but it won't run any Z80 code. That is the only change I have had to make to CZ80 tho. I have updated zet again so it works with the latest code from Treblewinner.
http://www.kja.pwp.blueyonder.co.uk/z80fix2.rar (http://www.kja.pwp.blueyonder.co.uk/z80fix2.rar)
I think the changes you have made have sped it up a tiny bit at least. I did a quick profile build and CZ80 seems to be about 20% faster than DOZE now and about 40% quicker on some games like bombjack.
-
Yeah, this is a very good fix! seems like all the problems in vulgus, etc are gone now.
Here is a version merged in with the latest zet. Treble, if you are reading this, can you please apply this patch you your source? :)
http://www.kja.pwp.blueyonder.co.uk/z80fix.rar (http://www.kja.pwp.blueyonder.co.uk/z80fix.rar)
ok I have make new compile for PSP and all is ok, I make test now :)
ok, your suggestion about undo the fix and change define is good, i have same speed :)
Yeah, it seems that it doesnt like the array of gotos. Not really looked into why but it is possible to get it building with that option enabled but it won't run any Z80 code. That is the only change I have had to make to CZ80 tho. I have updated zet again so it works with the latest code from Treblewinner.
http://www.kja.pwp.blueyonder.co.uk/z80fix2.rar
I think the changes you have made have sped it up a tiny bit at least. I did a quick profile build and CZ80 seems to be about 20% faster than DOZE now and about 40% quicker on some games like bombjack.
i make update now :)
EDIT
ok, for second update
make[2]: Warning: File `src/cpu/cz80/cz80_op.c' has modification time 1.5e+04 s
in the future
Compiling src/cpu/cz80/cz80.c...
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not fo
r C
Linking executable... FBA4PSP.elf
Creating PSP EBOOT.PBP...
- 332 bytes | eboot.sfo
[1] 10642 bytes | src/psp/fbapsp.png
[2] 0 bytes | NULL
[3] 0 bytes | NULL
[4] 0 bytes | NULL
[5] 0 bytes | NULL
[6] 2171936 bytes | eboot_strip.elf
[7] 0 bytes | NULL
make[2]: warning: Clock skew detected. Your build may be incomplete.
but
no black screen
games ok but slow more ingame instade of first z80 fix