Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05025 Misc. Minor Always Sep 27, 2012, 06:28 Mar 14, 2014, 04:38
Tester Reyn View Status Public Platform MAME (Official Binary)
Assigned To hap Resolution Fixed OS Windows Vista/7 (64-bit)
Status [?] Resolved Driver
Version 0.147 Fixed in Version 0.153 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 05025: neogeo.c: Neo Diagnostics show Z80 issue
Description Issue is in neogeo.c, can't be selecetd from Driver menu.
The Neo Diagnostics v.018b from smkdan show that there is a problem with Z80 <-> 68K communication -> See attached image.

In neogeo.c sourcecode beginning from line 590 this is listed:
/* this is a guess */
audio_cpu_clear_nmi_w(space, 0, 0);

Maybe Neo Diagnostics can help to identify the issue.
Steps To Reproduce Go to http://smkdan.eludevisibility.org/neo/diag/ and download Neo Diagnostics v.018b.
Use set ' irrmaze ' for testing, replace ' 236-bios.sp1 ' and ' 236-m1.m1 ' with files from ' 018b.zip '
Fire up mame.
Additional Information Also the following beep error code appears: ' Z80<->68k COMM. ERROR (DATA) 001100 '
Github Commit
Flags Verified with Original, Noted in Source
Regression Version
Affected Sets / Systems neogeo.c
Attached Files
png file icon neo_error.png (59,417 bytes) Sep 27, 2012, 06:28 Uploaded by Reyn
Reyn
? file icon mt05025.diff (2,742 bytes) Nov 3, 2012, 16:59 Uploaded by Reyn
File for comment 09074
[Show Content]
Relationships
There are no relationship linked to this issue.
Notes
8
User avatar
No.08976
hap
Developer
Sep 27, 2012, 14:00
Thanks.
Do you happen to know if the sourcecode is available for this test suite?
User avatar
No.08977
Lord Nightmare
Developer
Sep 27, 2012, 14:39
http://www.neo-geo.com/forums/showthread.php?236157-Neo-Diagnostics-ROMs
as for source code, you'd probably need to ask smkdan for it privately
User avatar
No.08991
Reyn
Tester
Sep 30, 2012, 07:53
Some usefull? info:
http://wiki.neogeodev.org/index.php?title=68k/Z80_communication&t=20120814005148
User avatar
No.09024
smkdan
Tester
Oct 12, 2012, 11:49
Hi, I was shown this page and thought I'd share some issues I found with MAME driver. I only needed minor edits to neogeo.c to get my debug build of MAME working as my systems do so I'll just list the changes instead of digging up the source. This is based on tests with my own MVS/AES systems.

The cart S1 and M1 ROM are supposed to be enabled (or disabled) together. MAME has the enable code with the BIOS instead but games still work since the first thing the BIOS tells the Z80 to do is a soft reset anyway. There is also no Z80 reset on switch. Z80 switches are done by jumping to a loop in RAM on command by 68k so there's no need for the reset. Try watch/breakpoints on the last few bytes of Z80 RAM.

The BIOS overlay is an actual swap so when enabled, reading $000000-$00007f is supposed to read the BIOS and not the game P1 area.

Z80: out ($00) zeroes the input port. The pictured test just writes to port $00, then checks if $0c is actually zero to see if a certain trace is damaged.

out ($08) enables NMI and out ($18) disables it. There's a comment on this in the source but it's not hooked up to anything. It's disabled on reset with real h/w.

I think there's some other stuff I'm forgetting so I'll post it up later when I check my notes. I remember the sound test being mute in MAME when it's supposed to beep some FM channels.
User avatar
No.09054
Reyn
Tester
Oct 27, 2012, 08:01
@smkdan: Could you please take a look at this: http://mametesters.org/view.php?id=5041
Does the mentioned bug also occur in your edited neogeo.c MAME debug build?
Thanks
User avatar
No.09074
Reyn
Tester
Nov 3, 2012, 16:59
Attached a small diff which fixes the following:

S1 rom enabled on system start / reset ( M1 already was )
Removed Z80 reset on audio bank switch
Hooked up NMI $18 -> Disabled on machine reset (is this done right?)

Someone needs to figure out how to hook up NMI $08; the current function used is 'audio_cpu_assert_nmi' -> line 354
NMI $08 can be found at 'Audio CPU port handlers'

Can someone please check this -> See attached MT05025.diff
Thx
User avatar
No.10359
hap
Developer
Mar 13, 2014, 23:29
Z80 comms should be ok now if you boot the program with button D held down.
There's a remaining problem though: if i boot with A+B+C+D pressed, it will run the tests instead of bringing up a menu and will specify that the Z80 failed
User avatar
No.10360
AWJ
Developer
Mar 14, 2014, 04:38
edited on: Mar 14, 2014, 04:40
If you use irrmaze as the "donor set" to run the diagnostic ROM in MAME, then you can't press A+B+C+D because those buttons don't exist; that game has a trackball where P1's joystick and buttons are on a regular neogeo. For testing purposes, you have to modify the GAME line for irrmaze in neogeo.inc to make it use "neogeo" instead of "irrmaze" for inputs.

If you modify the irrmaze inputs, run the diagnostic ROM and hold D on startup, you get "SM1 slot switch ignored". This is as expected, since irrmaze is a modified MV1B board, which has no sm1 ("audiobios") ROM. If you hold B and D on startup like the instructions for the diagnostic ROM say to for MV1B/MV1C, you get "all tests passed". However, if you soft reset (press and hold 1+3 or just press F3) and run the test again, then you get "YM2610 unexpected IRQ" on the second and all subsequent runs.

Interestingly, if you modify neogeo.inc and add sm1.sm1 to the irrmaze set, or if you use a different game as the "donor", then you can run the Z80 test without holding B (only holding D) and it'll pass every time. So I wonder if the "YM2610 unexpected IRQ" is actually a remaining bug in our emulation, or if it's a bug in the diagnostic ROM in the codepath it executes for MV1B/MV1C...

Anyway, I'm marking this resolved because the NMI issue is definitely fixed now. We can open a new bug if smkdan proves that the failure when re-running the test on SM1-less boards isn't a bug in his code.