Page 1 of 1
Pac-Man Core
Posted: Mon Sep 19, 2022 8:57 pm
by wdelaar
I have the Mister FPGA using an I-PAC for my input via USB. Everything works correctly; however, I am a hard core player trying to make it to the Kill Screen (Level 256) and it seems that this core does not match the Arcade. I thought by investing in the Mister that this would not be an issue. Am I doing something wrong? The Ghosts are not moving in the same pattern as the Arcade.
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 5:46 am
by thorr
I have no idea, but maybe dip switch settings could affect this, or the ROM version, or there may be a different issue. I suggest to check the issues on github and create one with more details so someone can look into it:
https://github.com/MiSTer-devel/Arcade- ... Ter/issues
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 5:50 am
by Lightwave
wdelaar wrote: ↑Mon Sep 19, 2022 8:57 pm
I have the Mister FPGA using an I-PAC for my input via USB. Everything works correctly; however, I am a hard core player trying to make it to the Kill Screen (Level 256) and it seems that this core does not match the Arcade. I thought by investing in the Mister that this would not be an issue. Am I doing something wrong? The Ghosts are not moving in the same pattern as the Arcade.
If you look in "Arcade/Alternates" you can find more Pac-Man ROM variants. Perhaps one of those has what you are expecting.
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 6:35 am
by Minpin
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 12:45 pm
by goldenage
The video linked above shows the difference between difficulty settings. On the original hardware there is a jumper that can be bridged that sets the difficulty and if I remember is read via the DIP switches.
You should be able to change the difficulty using the DIP settings in the Mister menu. Checking MAME, it looks like it should be switch #7 on DIP bank 1.
I would toggle that DIP switch, then try your patterns again. Looks like ON = Normal, and OFF = Hard. Not sure if I ever encountered Hard mode in the wild. From the differences in the attract mode pointed out in the video, it looks like ghost behavior is a little different.
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 1:20 pm
by mhartman
How far off is it? I've played mine using the traditional arcade patterns up to about 200k and I didn't have any problems.
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 2:49 pm
by SpoonyUK
Hi, just checked and if you change dip switch difficulty to hard it comes up with the same pattern shown in the video for v2 of pacman
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 8:10 pm
by wdelaar
I play on a real machine and the pink ghost behaves differently on the Apple to 2nd Key levels. In an Arcade machine I can get the pink ghost to cross in the Middle of the board which causes it to be in the upper right hand córner as I make my move to clear all the remaining dots. In the Mister it is Very hard to ges the pink ghost to cross which causes it to be at the Lower right córner where I have to do the kiss move instead.
Re: Pac-Man Core
Posted: Tue Sep 20, 2022 8:15 pm
by wdelaar
The dip switches aren't the issue. I have them set correctly. I'm going to try the Puck-Man (Japaneese Set I) core. It seems to be the closest. I tried the Japaneese Set 2 and got 350K; however, the ninth key patean was different from the Arcade at times.
Re: Pac-Man Core
Posted: Wed Sep 21, 2022 8:21 pm
by Zeosstud
When I was fighting this, for me, it came down to my monitor refresh rate and the joystick I used.. I have the ability to test out a fair amount of things in the basement, for me, my Mister, with my monitor set vertically, the input lag hack and a dedicated 4 way stick using the Midway version of pacman I have managed just under 650k, so it is not to off, if I recall correctly I just got tired that particular game. I have messed with Mame, 60-1 board, Bitkit, Leaf sticks, vga out, hdmi out, Mistercade to a VGA monitor, several things. When I get some time I want to test it on my one true CRT monitor and see if that makes a difference.
Re: Pac-Man Core
Posted: Wed Sep 21, 2022 9:30 pm
by dazzer69
I noticed before that at some point in the cores history it gained a refresh rate of exactly 60Hz rather than the 60.60606 reported by MAME. Could this account for any inaccuracies?
Re: Pac-Man Core
Posted: Fri Sep 23, 2022 9:27 pm
by wdelaar
I'm pretty sure I figured out my issue. I had to Edit the MISTer.ini file and change this Setting: vsync_adjust=2 by default this is set to zero which has the most lag and 2 is the best Setting if your display supports it. I changed this Setting and played a game and scored over 500K and only Lost due to my own mistakes. EVERYTHING worked just like the ARCADE! AWESOME! Now I can try to get to level 256!
Re: Pac-Man Core
Posted: Sat Sep 24, 2022 12:00 pm
by fierman
wdelaar wrote: ↑Fri Sep 23, 2022 9:27 pm
I'm pretty sure I figured out my issue. I had to Edit the MISTer.ini file and change this Setting: vsync_adjust=2 by default this is set to zero which has the most lag and 2 is the best Setting if your display supports it. I changed this Setting and played a game and scored over 500K and only Lost due to my own mistakes. EVERYTHING worked just like the ARCADE! AWESOME! Now I can try to get to level 256!
Kind of unexpected, but worth investigating for developers perhaps.
Re: Pac-Man Core
Posted: Sat Sep 24, 2022 2:53 pm
by rhester72
The thing that surprises me most is that vsync has nothing to do with lag, latency, or programmed behavior. The same clock cycles executing the same instructions in the same amount of time will occur regardless of the setting.
Re: Pac-Man Core
Posted: Sun Sep 25, 2022 8:47 am
by LamerDeluxe
That depends on how the game was programmed. A lot of old games are timed on the vertical blank interrupt. IIRC I ran Outrun 2006(?) on my PC, without vertical blank enabled and the whole game became really fast.
Though you'd just expect the whole game to run faster, not affecting the ghost AI. Maybe they are using a random generator seeding on a timer, but that is unlikely. Or maybe they are using a timer for only some of the timing.
It is an odd bug though, something to keep in mind with other cores.
Re: Pac-Man Core
Posted: Sun Sep 25, 2022 1:38 pm
by pgimeno
That's one possibility. The other is that display lag is causing muscle memory to work differently to the case with no display lag. I was fascinated by this video that tests Battletoads in an emulator vs. a NES and a MiSTer:
https://www.youtube.com/watch?v=5ZTS04rVOn0
Re: Pac-Man Core
Posted: Mon Sep 26, 2022 1:47 pm
by goldenage
Pac-man definitely uses the vblank to trigger an IRQ. However, I'm not sure with the vsync ini setting if that changes the vertical blanking interval, or just the length of the vsync pulse?
Re: Pac-Man Core
Posted: Mon Sep 26, 2022 10:26 pm
by pgimeno
My question is whether the setting changes either. I would guess that there's an "emulated display" and a "real display" that are separate, and that the real display's vsync is not the one that generates the interrupt, but the emulated display's, which would run at the frequency of the emulated core regardless of the refresh frequency of the real monitor; if that's the case, changing the core's behaviour depending on the setting would not be possible. That's why I considered display lag as a factor. But I'm not sure if that description corresponds to the real situation.
Re: Pac-Man Core
Posted: Tue Sep 27, 2022 2:26 am
by goldenage
That's a good point, and I guess it would depend on if analog video output was used. I would assume with analog video (no frame buffer) that the output would be the 'emulated display', or 1:1 with the original hardware? If the output was upscaled (frame buffer) then there would be a measurable offset between the 'emulated' and 'real' display, which in that case would be better described as display 'lag'.
Re: Pac-Man Core
Posted: Wed Oct 05, 2022 12:41 pm
by wdelaar
It Took a few days. I thought the issue was solved because I can score 500K consistantly; however, the Problem showed up yesterday again. Any help would be greatly appreciated.
Re: Pac-Man Core
Posted: Wed Oct 05, 2022 5:22 pm
by mhartman
I would try to load some of the early core versions from GitHub and see if it still shows up. Someone mentioned a clock change at sone point in time.
Re: Pac-Man Core
Posted: Thu Oct 06, 2022 3:59 pm
by dazzer69
I would suggest trying to get the attention of macro on this forum. He seems very knowledgable about early arcade stuff.
Re: Pac-Man Core
Posted: Thu Oct 06, 2022 10:08 pm
by macro
I'm not an expert on pacman, never really liked the game
however, the ghost AI is based on targeting particular locations on screen, for some ghosts (in chase mode - see later) it is the square that pacman is on, for others it is a square relative to pacmans position.
the ghosts switch between 3 modes, chase, scatter and frightened (blue!) and the first two are based on the current level and timers, so I guess changing the refresh rate would change the timings of the changes. To add to it, the AI for ghosts is modified based on the number of dots left!
In mame, the CPU clock is 18.432 / 3 (6.144 Mhz)
In the pacman core, it is 24.324 / 4 which is different (6.081 mhz)
so timings of changes between chase and scatter will be different, and if mame is identical to the real thing, then MiSTer wil be different.
Re: Pac-Man Core
Posted: Fri Oct 07, 2022 3:12 am
by shertz
macro wrote: ↑Thu Oct 06, 2022 10:08 pm
I'm not an expert on pacman, never really liked the game
however, the ghost AI is based on targeting particular locations on screen, for some ghosts (in chase mode - see later) it is the square that pacman is on, for others it is a square relative to pacmans position.
the ghosts switch between 3 modes, chase, scatter and frightened (blue!) and the first two are based on the current level and timers, so I guess changing the refresh rate would change the timings of the changes. To add to it, the AI for ghosts is modified based on the number of dots left!
In mame, the CPU clock is 18.432 / 3 (6.144 Mhz)
In the pacman core, it is 24.324 / 4 which is different (6.081 mhz)
so timings of changes between chase and scatter will be different, and if mame is identical to the real thing, then MiSTer wil be different.
Well thats disappointing
Re: Pac-Man Core
Posted: Fri Oct 07, 2022 8:55 am
by dazzer69
Thanks, Macro. I had a hunch you would be able to shed some light.
Looking back through the core releases the video refresh rate jumped from 59.2Hz to 60Hz on release 20200106. MAME has it at 60.60606Hz. I also noticed that Galaxian has the same discrepancy, 59.2 versus 60.60606. I know you like that game.
Is this something you would be willing to take a look at at some point?
Re: Pac-Man Core
Posted: Fri Oct 07, 2022 10:01 am
by LamerDeluxe
So it would indeed be a discrepancy between the refresh rate and other timing used by the game. I hope this isn't very difficult to fix.
Re: Pac-Man Core
Posted: Fri Oct 07, 2022 1:50 pm
by macro
If you changed the clocks to 49139348 Hz and 24569674 Hz then it should give you nearly 60.60606 Hz screen refresh.
Re: Pac-Man Core
Posted: Fri Oct 07, 2022 5:17 pm
by shertz
macro wrote: ↑Fri Oct 07, 2022 1:50 pm
If you changed the clocks to 49139348 Hz and 24569674 Hz then it should give you nearly 60.60606 Hz screen refresh.
How do you do that?
Re: Pac-Man Core
Posted: Wed Oct 19, 2022 8:31 pm
by Zeosstud
I can not speak to any clock cycles or screen refresh stuff but I can share this..
CRT monitor, True 4-way Dominux8 Joystick, new Switching Power Supply wired into a arcadeshop Dig Dug to Jamma Adapter and ran through the Mistercade, last night I was able to run thru 15 screens of the 9th key pattern and the ghosts behaved perfectly, not one issue, things not only looked perfect they acted perfect. I have waited a longtime to have the setup I have now, I feel like going for a kill screen finally and confident I can get there.