Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
04472 Crash/Freeze Minor Always Aug 29, 2011, 03:23 Jan 17, 2013, 00:15
Tester M.A.S.H. View Status Public Platform MAME (Self-compiled)
Assigned To Kale Resolution Fixed OS
Status [?] Resolved Driver nbmj8891.cpp
Version 0.143u4 Fixed in Version 0.147u3 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 04472: mmaiko: Halt at "TEST NOTE IN..." screen
Description Maikobana [BET] starts with some test screens and then halts at "TEST NOTE IN..." (see screenshot).
Steps To Reproduce Delete first the NVRAM file mame\nvram\mmaiko.nv
Start the game and wait until screen "TEST NOTE IN...".
Now you must restart MAME.
If you not restart MAME and press F3 (Reset), the NVRAM was not correctly saved.
The game boots and you can see the girl, but after INSERT COIN the game reboots and shows the "TEST NOTE IN..." screen.
You must restart MAME to correctly save the NVRAM.

The other game in the driver is Maikobana (Japan 900802), mostly identical to [BET] and this works fine.
After checking the DRIVER_INIT for both games there is an extra outcoin_enable check in src\mame\machine\nb1413m3.c.
I removed this check (see screenshot) and the game works fine without restart MAME.
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems mmaiko
Attached Files
png file icon mmaiko.png (3,975 bytes) Aug 29, 2011, 03:23 Uploaded by M.A.S.H.
M.A.S.H.
png file icon mmaiko-nb1413m3.png (3,811 bytes) Aug 29, 2011, 03:24 Uploaded by M.A.S.H.
M.A.S.H.
Relationships
related to 04478ResolvedKale nbmj8688.c, nbmj8891.c, nbmj8900.c ( hyhoo, hyhoo2, gionbana, mjsikaku, ohpaipee, club90s etc.): The game breaks by soft resetting. Stuck at the initialization screen. 
Notes
10
User avatar
No.07752
NekoEd
Senior Tester
Aug 29, 2011, 04:51
Confirmed behavior, but did not try patch. I will leave this to the devs to determine the patch's validity, otherwise this bug is confirmed.
User avatar
No.07753
Tafoid
Administrator
Aug 29, 2011, 16:47
I can confirm that using F3 Reset will cause the issue in question though I'm not sure if this can be considered a bug. Anything that happens with the use of an F3 Reset isn't a valid reportable bug unless it crashes MAME. As you said, the game itself works fine if powered down so the NVRAM is properly saved.

As for the extra code, I'm unsure why it's there. There is or was a reason at one time to have it there for the [BET] set. Just because commenting that out lets you F3 Reset and still save a playable NVRAM does not mean it doesn't have a purpose.
User avatar
No.07754
Fujix
Administrator
Aug 30, 2011, 01:26
I think this should be covered by MAME FAQ that a soft reset doesn't work in this game.
User avatar
No.07755
NekoEd
Senior Tester
Aug 30, 2011, 11:37
edited on: Aug 30, 2011, 11:52
In my case, the soft reset worked fine; it's the initial raw boot without NVRAM that causes trouble. It will boot, hit the flashing "MEMORY RESET" screen then reset itself, after which it will proceed to the "TEST" screen frozen with "NOTE IN" displayed. Hitting the soft reset will cause the game to reboot properly, and the .nv file is indeed written correctly (it is also written correctly if you hard reset/exit MAME at the "NOTE IN" freeze, in fact.)

It would seem that this game suffers from lacking a default NVRAM (though once it writes one for itself, everything is fine.)

UPDATE: It would seem that ANY source of reset after a successful boot will cause the game to completely lose the plot; this includes the game-induced resets caused by the service keys (default 9, 0 and -) which brings the game to the TEST screen where it completely freaks out (and, in fact, actually corrupts it's NVRAM in the process....) Seems this bug may be a bit deeper than appears at the surface.

(Having a blown NVRAM seems to cause the game to go loopy, causing a corrupted "TEST" screen and occasionally, a popmessage() will appear that the game is reading past the end of it's sound ROM.) It looks at first to be a soft reset (F3) issue, but as I mentioned, ANY reset source, including those that are legitimate to the game (try pressing 0 to look at the analyzer stats, it will reset when you release the key) will corrupt the NVRAM and cause the game to vomit all over itself until you do a hard reset, at which point it recognizes the NVRAM is corrupt, forces a clear, then goes to the "TEST/NOTE IN" frozen screen. Here, you can press F3 and it will work properly, and enter the game mode. After this, however, any soft reset source, even if you quit and return, will cause the game to bungle it's NVRAM and flip out.
User avatar
No.07756
Tafoid
Administrator
Aug 30, 2011, 16:30
.. and there is a reason why the game flips out. The F3 Reset or other functions did not physically write a copy of the NVRAM to disk did before corrupting it and therefore, due to either a missing reset button on the PCB itself or missing functionality for such a thing, when the NVRAM data was finally written, it was corrupt. If the NVRAM is properly made by shutting down before using that Service 0, the game will reset and restart properly here.
If not, the same rules apply.

MAME, by function, only writes out the NVRAM file in full when you exit the game which consists of the in-memory NVRAM data contents. This is the reason that it's suggested that power down is the best way to deal with NVRAM creation. In games like this, the NVRAM essentially acts a lot like a SAVE STATE, allow you to return to the bet screen or play screen when there are credits still in play. A lot of other Mahjong/Gambling games to allow recovery after accidental powering down.

Fujix would now more about these types of games - I don't play them at all other than minimal testing.
User avatar
No.07757
NekoEd
Senior Tester
Aug 30, 2011, 18:18
edited on: Aug 30, 2011, 18:25
This is an odd bug, because the game can handle a reset, but only one of them; after the second reset, no matter what the source is (F3, Analyzer or Memory Reset,) the NVRAM is corrupted. You don't need to play the game at all, just mess around with the Service buttons (pressing "Service 1" after the second boot into the game to try to insert a bill ("NOTE IN" !!!) will give a particularly interesting effect) and eventually it will lose it's mind. This isn't a MAME reset bug; it's a bug in the game, since the game's own reset mechanisms will cause the same effect. There seems to be something to that commented block of code....

Note that the NVRAM is written out just fine, BTW; however, it's corrupted by these anomalies AT RUNTIME. Upon closing MAME, the NVRAM file is written properly (since MAME isn't crashing, it will dutifully write out the .nv as intended) but it's written with the corrupted runtime contents of the NVRAM that some part of the game's code has apparently scribbled over.

Also, take note, that the Analyzer and Memory Reset functions are both game-sourced resets; starting the game with a blank NVRAM causes the game to recognize it as corrupt and will automatically do a Memory Reset, followed by a soft reset, followed by the freeze at the "NOTE IN" "TEST". Exiting MAME here will write a perfectly good NVRAM file if you exit at this point; the game has only reset once so the NVRAM is valid. It's that second reset, no matter what causes it, that will crap on the NVRAM contents and cause the machine to lose its mind.
User avatar
No.07758
Fujix
Administrator
Aug 31, 2011, 07:13
I'll ask the original Nichibutsu programmer about this.
User avatar
No.07763
Fujix
Administrator
Sep 2, 2011, 00:16
Nogi says probably nb1413m3_outcoin_enable is not the original cause of the problem, but because the source has been largely updated since he has submit, he cannot follow the behaviour or the driver now.
He also pointed out the original Maikobana is also broken.
User avatar
No.09240
haynor666
Tester
Jan 16, 2013, 19:21
edited on: Jan 16, 2013, 23:50
Appears to be solved in 148


EDIT. No it's not. Now inserting coins works but after you hit bet button game resets itself.
User avatar
No.09241
NekoEd
Senior Tester
Jan 17, 2013, 00:15
Make sure you've deleted the nvram files, haynor. I tried out mmaiko just now and it works here.