Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babypacman rom does not work with VPinMAME 64 bit #80

Open
psiomicron opened this issue Nov 18, 2022 · 22 comments
Open

Babypacman rom does not work with VPinMAME 64 bit #80

psiomicron opened this issue Nov 18, 2022 · 22 comments
Labels

Comments

@psiomicron
Copy link

Babypacman rom does not work with VPinMAME 64 bit.
Images is scrambled. 32 bit works fine.

@toxieainc
Copy link
Member

Seems like 32bit also has a similar issue, but for whatever reason it works fine the 1st time started. The following times, it fails, too.
So somehow the 32bit version is more lucky with some uninitialized mem maybe?

@psiomicron
Copy link
Author

psiomicron commented Nov 21, 2022 via email

@toxieainc toxieainc added the bug label Jun 17, 2023
@wiesshund
Copy link

ROM works presently with both 32 and 64 bit builds
you just cannot reinitialize it unless you end VPM, the display will be blank.

@toxieainc
Copy link
Member

Thanks! This points once more to some instability/uninitialized memory, i guess.

@wiesshund
Copy link

@toxieainc if it is any consolation
if i run up the ROM in a current build of MAME, it does not seem to like to restart/reset while active in memory either.

@psiomicron
Copy link
Author

ROM works presently with both 32 and 64 bit builds you just cannot reinitialize it unless you end VPM, the display will be blank.

Are you sure it works for you in 64 bit? I've update and reinstalled vminmame for 64 bit on different computers and it doesn't run. Audio works but graphics are garbled.

@wiesshund
Copy link

yes, works fine far as i can tell here

@SuperFromND
Copy link

SuperFromND commented Oct 24, 2023

I'm also getting this problem, using VPinMAME/libpinmame/PinMAME version v3.6-573-5d6459d on Windows 10 Pro (64-bit). I have no clue if VPinMAME has any way to create a verbose log file of a game; if it does, I'll happily provide one.

ADDENDUM: I just tested and this still happens as of the latest commit: aaa6676.

Here's a video I recorded showing the garbled graphics, but otherwise functional game. (note how the graphics change later in the recording; I believe this to be further proof that uninitialized memory is the cause of the problem).

2023-10-24.16-31-21.mp4

Some observations:

  • The game's audio, controls, and actual code execution appear to be completely unaffected.
  • This graphical corruption doesn't seem to be at the emulation level, as I'm also not able to access the Tab menu or any other on-screen display built into MAME.
  • Clicking the window cause it to flash a black screen for one frame.
  • As far as I can tell it's only this specific game and its variants babypaca and babypacn that have this problem. Other hybrid games like Caveman work just fine.

@jsm174
Copy link
Contributor

jsm174 commented Oct 25, 2023

Since libpinmame in your post caught my eye, I decided to check to see how babypac is handled in libpinmame.

This game has a display type of CORE_VIDEO. All updates are ignored because of this line:

  `if (((ptPinMAMEvidUpdate)(layout->fptr))(bitmap,cliprect,layout) == 0) continue;`

libpinmame has a callback for each display, and this continue totally skips over it.

For the heck of it, I modified

static PINMAME_VIDEO_UPDATE(byVP_update) {
  TMS9928A_refresh((core_gameData->hw.display ? 2 : 1), bitmap, 1);
  save_screen_snapshot(bitmap);
  return 0;
}

And indeed the screen is there:

baby1888
baby1890
baby1892

I'll look into this some more to see if I can add support in libpinmame and vpx standalone.

@toxieainc
Copy link
Member

If its 'only' the 64bit display code of VPM, then hopefully this is easier to fix. Lets see how testing goes if libpinmame eventually get support. Thanks!

@SuperFromND
Copy link

I did some more digging (namely by trying to find a bisect, albeit with limited resources as I'm relying entirely on Github Actions artifacts) and determined that babypac broke at some point between Release 3.5 and this commit: v3.5-217-bd54096...v3.6-369-102e419. There's still about 300 or so commits to dig through, though I hope this at least helpful to point out!

@Mrtr32
Copy link

Mrtr32 commented Jan 30, 2024

Same for me, Babypac show garbled screen with 64 bits vPINMAME only, 32 bits work properly.

@sosim5
Copy link

sosim5 commented Jan 30, 2024

The last working version of Babypac in 32bit was 10.8.0-925. All the releases after, the drop target in front of the captive ball is up when the game begins. The drop target should be down so you can hit the captive ball and transfer it to the other side.

@Mrtr32
Copy link

Mrtr32 commented Jan 31, 2024

Ok it is a vpx issue.

sorry, my post is at the wrong place.

@volkenborn
Copy link
Contributor

Something is pretty strange with Baby Pac-Man...
If I start a game and wait until Pac-Man can move, then hit reset, the game will reboot okay.
If I reset the game during attract mode, or before I can move, reset will cause a blank screen, and starting a game isn't possible.

@Mrtr32
Copy link

Mrtr32 commented Feb 1, 2024

Pereaps it’s a rom initialisation issue.
This table have alway started with sound stutter before.
I think this kind of rom need more time to initialise?

@volkenborn
Copy link
Contributor

Steve Ellenoff owns a Baby Pac-Man, and he did the emulation back then.
The stuttering bootup sound is actually correct, the real game does it as well.
And of course you cannot really reset the game as your can in PinMAME hitting F3, you can only switch it off and on, so that error simply cannot occur with a real machine. 😉

@Mrtr32
Copy link

Mrtr32 commented Feb 1, 2024

@volkenborn
Thanks for clarification.
I never played the real pinball machine. :)

@volkenborn
Copy link
Contributor

Well. I could fix at least the reset issue; that was due to some uninitialized sound latches.
A possible explanation why the graphics issue only occurs with Baby Pac-Man: it's the only game rotated by 90 degrees by driver!?

@Mrtr32
Copy link

Mrtr32 commented Feb 2, 2024

@volkenborn
I will test your fix when coming at home
Thanks you very much for the fix
An other similar hybride table having similar strange issue is the Caveman table
The rom crash half the time when starting the table since the first release I think
I think you could find something wrong with the rom initialisation?

@Mrtr32
Copy link

Mrtr32 commented Feb 2, 2024

@volkenborn
vPinmame show garbled image at 0 Deg normal position
Tested the table and you are right about the rotation issue, rotating to 90 Deg and the screen are shown so not at the right orientation.
tested from the table init section of the table script:
.Games(cGameName).Settings.Value("rol") = 1

Capture

.Games(cGameName).Settings.Value("rol") = 0

Capture2

@toxieainc
Copy link
Member

Maybe also related to #129 ?
(as the old MAME uses a lot of 32bit x86 ASM code for blitting, which may be incomplete/outdated in the C variants??)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants