Pac-Man Core
Pac-Man Core
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.
-
- Top Contributor
- Posts: 1311
- Joined: Mon Jul 06, 2020 9:37 pm
- Has thanked: 634 times
- Been thanked: 308 times
Re: Pac-Man Core
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
-
- Posts: 261
- Joined: Sun May 24, 2020 10:06 pm
- Has thanked: 136 times
- Been thanked: 78 times
Re: Pac-Man Core
If you look in "Arcade/Alternates" you can find more Pac-Man ROM variants. Perhaps one of those has what you are expecting.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.
Re: Pac-Man Core
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.
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
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
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
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
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
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
Kind of unexpected, but worth investigating for developers perhaps.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!
-
- Top Contributor
- Posts: 1321
- Joined: Thu Jun 11, 2020 2:31 am
- Has thanked: 15 times
- Been thanked: 213 times
Re: Pac-Man Core
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.
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: Pac-Man Core
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.
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.
- pgimeno
- Top Contributor
- Posts: 709
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Pac-Man Core
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
https://www.youtube.com/watch?v=5ZTS04rVOn0
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
Re: Pac-Man Core
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?
- pgimeno
- Top Contributor
- Posts: 709
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Pac-Man Core
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.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
Re: Pac-Man Core
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
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
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.
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
Well thats disappointingmacro 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.
Re: Pac-Man Core
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?
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?
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: Pac-Man Core
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
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
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.
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.