How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

davidelkinsrice
Posts: 5
Joined: Mon Jan 02, 2023 9:27 pm
Has thanked: 4 times
Been thanked: 2 times

How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by davidelkinsrice »

Hi,

I'm new here. I have a DE-10 Nano with Mister FPGA running on it. I love all of the games. My favorite game is Pacman. I have been trying to use patterns that I learned from a book by Ken Uston called "mastering pacman". It was published in 1982. These patterns worked on Pacman consoles in the US. I used them on many arcade machines. I have been trying to find a rom that will allow me to play the game like I did when I was a kid, I think I have a rom that will let me do these patterns. I have been trying for 8 hours or so to add a rom, by adding it to the /games/mame/ directory and running the update script to no avail. I understand that everything is updated now automatically after running the update script from the web. I am connected through an ethernet cable and updated the sd card through my computer. I want to add my own rom. Is there a document that I can follow to do this? It seems I need a mra file and rbf file. How are these generated?

Also, does anyone know where high scores are stored on the SD card (or are they stored on the DE-10 Nano?). I did a search on the SD card and couldn't find where it is stored (LIT-DRICE:MiSTer_Data der6$ find . -name '*' -exec egrep -l '999990' {} \; my High score is 999990 and I want to erase it).

I would appreciate any help! Thank you.

David Rice

Flandango
Core Developer
Posts: 459
Joined: Wed May 26, 2021 9:35 pm
Has thanked: 59 times
Been thanked: 383 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Flandango »

For arcades that store/save high scores....try looking in /media/fat/config/nvram.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Malor »

It's easy to add ROMs for consoles, but I think the arcade cores all use certain fixed ROMs that you can't normally change.

If you examine the .MRA file for Pac Man ("/media/fat/_Arcade/Pac-Man (Midway).mra"), you'll see what core it uses, and what ROM filename it wants, so you could potentially replace that ZIP with a substitute. If, however, you just replace the original ROM, update_all will probably clobber that change the next time you run it. If you instead copy the MRA to a new file, use a ROM ZIP with a different name, and edit that name into the new MRA, that should preserve your changes through updates. (Construction of the ROM ZIP left as an exercise for the reader.)

I have no idea if the Pac Man core will run with any other ROM, but that's probably how you'd find out.

It appears that most of the Golden Age cores were ported from older FPGA systems, and users have been pointing out major inaccuracies in some. They weren't custom-done for the MiSTer, and don't seem to have as much care and polish as newer offerings.

davidelkinsrice
Posts: 5
Joined: Mon Jan 02, 2023 9:27 pm
Has thanked: 4 times
Been thanked: 2 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by davidelkinsrice »

Thank you for responding with information about how to possibly add the rom and update the High Scores. You are cool!

User avatar
Longtime4321
Posts: 116
Joined: Fri Aug 12, 2022 5:17 am
Has thanked: 9 times
Been thanked: 17 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Longtime4321 »

If you're going to be looking at roms and updating high scores often, I reccomend setting up an FTP application so you don't have to fiddle with the SD card every time you want to do so. This video here goes into detail on how to do that. It's very easy.
https://www.youtube.com/watch?v=-D1tga8tJJI

Dragarious
Posts: 1
Joined: Wed Jan 04, 2023 12:02 am

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Dragarious »

I hope I am not offending anyone especially since nobody is getting paid for this but I would also love to have the correct ROMS run on the cores so that it is Arcade accurate which is what I thought the point was for FPGA. When I run the normal pacman.zip on MAME it behaves correctly but the ROM files I see for MiSTer in the .mra file are not the same.

Early on I remember having to do a lot of setup to get things to run and the auto update helped a lot but it seems like it took some of the customization possibilities away at the same time. Am I wrong about that?

Again I am very grateful for all the work that has been done on the cores and I know it is just a hobby for minds far brighter than mine. Thank you to those who are smart enough to make this all work.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by jca »

The mra can use puckman.zip or pakman.zip. Mame Getter gets puckman.zip which I suppose is a merged set and used by other mras.
You can temporarily test pacman.zip to see if it works:
Rename puckman.zip to something else and place pacman.zip in games/mame and see what it gives.
If it works for you you could just edit the mra and change the line
<rom index="0" md5="ce706464631f450f385314c90876321d" zip="puckman.zip|pacman.zip">
to
<rom index="0" md5="ce706464631f450f385314c90876321d" zip="pacman.zip">
Now I am not sure if it will work due to the md5.
Do not forget to rename puckman.zip which may be used in other arcades.

I just made the test and it seems to work but I do not know if the result is what you expect.

EDIT:
THERE IS A BETTER WAY.
Leave puckman.zip as it is, copy pacman.zip to games/mame.
Copy Pac-Man (Midway).mra to Pac-Man (Whatever name you want).mra.
Edit the new mra as mentioned above and use this new mra to see if it works for you.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by jca »

I doubt the result will satisfy you. I have a suspicion that the pacman.zip you have is for a different pacman and you will get errors when starting the new mra. If you do not get errors the problem will be the rbf, not the mra.

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by LamerDeluxe »

I also have a book by Ken Uston, which contains strategies (and patterns) for a lot of classic arcade games. Bought it at the time, way back. Hadn't tried the Pac-Man patterns yet on MiSTer.

I agree that it would be great to have the Pac-Man version as it was in the arcades in the West, same for the other arcade cores, so the strategies and patterns work as expected.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by rhester72 »

I'm honestly not sure why anyone thinks it isn't already present. The Midway variant of Pac-Man is absolutely there and spoken for on MiSTer.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Malor »

We have a (claimed) subject-matter expert telling us it's using the wrong ROM, so I'm inclined to pay attention.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by rhester72 »

Malor wrote: Wed Jan 04, 2023 7:11 pm

We have a (claimed) subject-matter expert telling us it's using the wrong ROM, so I'm inclined to pay attention.

I trust that he's aware there was only one release in the US, then.

davidelkinsrice
Posts: 5
Joined: Mon Jan 02, 2023 9:27 pm
Has thanked: 4 times
Been thanked: 2 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by davidelkinsrice »

The reason I brought this is up is I have tried all of the variants of Pacman I could find on the MiSTer fpga and can't find one that I can use the patterns I used to play. I thought the MiSTer Fpga was an exact copy of the original ROMS - duplicating the same And/Or gates, etc as the original hardware. That is why I upgraded to the MiSter a $250 dollar upgrade. I assumed it was the same and it's not. It's kind of disappointing. The rom that I attached to this question seems to work but I can't figure out how to make it work. I have recreated the .mra for the new rom:

Code: Select all

    <rom index="0" md5="2c0c626b77c18c84b74ec563af0c8985" zip="pacman.zip">
            <part crc="F93872D1" name="namcopac.6e"></part>
            <part crc="1032C33B" name="namcopac.6f"></part>
            <part crc="E91FB317" name="namcopac.6h"></part>
            <part crc="2205FC5C" name="namcopac.6j"></part>
            <part crc="7359FAA1" name="pacman.5e"></part>
            <part crc="9DCFC748" name="pacman.5f"></part>
            <part crc=""3D962076 name="82s126.1m"></part>
            <part crc="4D50B804" name="82s126.4a"></part>
            <part crc="225DF0EA" name="82s126.3m"></part>
            <part crc="EB1215F0" name="82s123.7f"></part>
            </rom>

and it gives me the error: XML parse: /media/fat/_Arcade/P

Useless error! :-/.

I figured out how to determine the CRC and the MD5:

MD5

/media/fat/games/mame# md5sum pacman.zip
2c0c626b77c18c84b74ec563af0c8985 pacman.zip

CRC

media/fat/games/mame/temp/pacman# cksum pacman.5e|awk -F’ ' ‘{print $1}’ | xargs echo “obase=16; $1”|bc
7359FAA1

I wish there was a power user around that could say . . . Put the rom pacman.zip in this directory and run this magic script and it will create a .mra and it will use the existing .rbf file and everything will just work. That is my dream. I may have to use other patterns which is fine with my dream of exact play as a 80s rom dashed to bits. :-).

Lloyd2084
Posts: 70
Joined: Sat Feb 19, 2022 8:11 pm
Has thanked: 141 times
Been thanked: 14 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Lloyd2084 »

Do you have a lag free controller through SNAC or other low latency method?

Some lag would through out your patterns for sure.

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by LamerDeluxe »

It could indeed be that the core is not compatible with this version. And is also isn't unthinkable that the core has a timing or random number generation difference to the real thing. I have no idea how it was tested.

If there was only one version in the US, that would be the version that Ken Uston used for his guides.

It would be interesting to see a side-by-side video of the MAME and MiSTer patterns of the ghosts.

As this is the most well-known arcade game in history, it would be great to have accurate versions of the most common variations.

FPGA64
Top Contributor
Posts: 940
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 375 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by FPGA64 »

There were also many variants of Pacman HW. Some based on hacks of older platforms. Its not simply a case of adding a rom and magically it works.
Every HW variation will need a core that supports it. The Pacman core in the Mister supports a HW variation I am not sure which its not a universal core that supports every possible Pacman HW.

The cores are not "Rom" copies. They are a representation of the HW. The rom you mention is just the SW that runs on the HW.

Also you are probably not using a 4 way joytsick. The original Pacman only supported a 4 way stick, so 8 way sticks send inputs to the core it doesnt understand since it was impossible to send say down and left at the same time. This leads to imprecise movements. Pacman must be played with a 4 way stick to get the original behaviour

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Malor »

The Pacman core was ported, right? Is there any reasonable way to find out how accurate the original version was, and which hardware version it was re-creating?

As far as the 4-way/8-way thing goes... I haven't tried this, but you might be able to map the four buttons on most controllers to be L/R/U/D. If you were then precise about your button presses, you could conclusively rule out controller inaccuracy as the source of the problem.

davidelkinsrice
Posts: 5
Joined: Mon Jan 02, 2023 9:27 pm
Has thanked: 4 times
Been thanked: 2 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by davidelkinsrice »

@FPGA64 I have a 4 way joystick - leaf switch so smooth it's like butter (https://groovygamegear.com/webstore/ind ... cts_id=407), I would highly recommend it. @Lloyd2084 I'm using a de-10 Nano. I don't know what a lag free controller through SNAC or other low latency is. There is no lag when I'm controlling the Pacman.

BabaYaga326
Posts: 74
Joined: Sun Jul 25, 2021 8:00 pm
Has thanked: 98 times
Been thanked: 18 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by BabaYaga326 »

davidelkinsrice wrote: Mon Jan 02, 2023 9:47 pm

Hi,

I'm new here. I have a DE-10 Nano with Mister FPGA running on it. I love all of the games. My favorite game is Pacman. I have been trying to use patterns that I learned from a book by Ken Uston called "mastering pacman". It was published in 1982. These patterns worked on Pacman consoles in the US. I used them on many arcade machines. I have been trying to find a rom that will allow me to play the game like I did when I was a kid, I think I have a rom that will let me do these patterns. I have been trying for 8 hours or so to add a rom, by adding it to the /games/mame/ directory and running the update script to no avail. I understand that everything is updated now automatically after running the update script from the web. I am connected through an ethernet cable and updated the sd card through my computer. I want to add my own rom. Is there a document that I can follow to do this? It seems I need a mra file and rbf file. How are these generated?

Also, does anyone know where high scores are stored on the SD card (or are they stored on the DE-10 Nano?). I did a search on the SD card and couldn't find where it is stored (LIT-DRICE:MiSTer_Data der6$ find . -name '*' -exec egrep -l '999990' {} \; my High score is 999990 and I want to erase it).

I would appreciate any help! Thank you.

David Rice

Another thread, same issue…
https://misterfpga.org/viewtopic.php?t=5400

davidelkinsrice
Posts: 5
Joined: Mon Jan 02, 2023 9:27 pm
Has thanked: 4 times
Been thanked: 2 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by davidelkinsrice »

@babayaga326, thank you so much for your response. I will try the following from the post:

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!

callanabrown
Posts: 89
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 14 times
Been thanked: 27 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by callanabrown »

By the way, your 7th ROM in your MRA excerpt has the quotes in the wrong place, that will definitely cause an XML parsing error (it's not useless, lol).

FPGA64
Top Contributor
Posts: 940
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 375 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by FPGA64 »

callanabrown wrote: Wed Jan 11, 2023 2:02 pm

By the way, your 7th ROM in your MRA excerpt has the quotes in the wrong place, that will definitely cause an XML parsing error (it's not useless, lol).

Code: Select all

        <part crc=""3D962076 name="82s126.1m"></part>

is the line mentioned

Lloyd2084
Posts: 70
Joined: Sat Feb 19, 2022 8:11 pm
Has thanked: 141 times
Been thanked: 14 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Lloyd2084 »

davidelkinsrice wrote: Mon Jan 09, 2023 3:22 am

@FPGA64 I have a 4 way joystick - leaf switch so smooth it's like butter (https://groovygamegear.com/webstore/ind ... cts_id=407), I would highly recommend it. @Lloyd2084 I'm using a de-10 Nano. I don't know what a lag free controller through SNAC or other low latency is. There is no lag when I'm controlling the Pacman.

SNAC is a feature of the DE-10 nano MiSTer setup that allows lag free controls, but you need to use the SNAC port rather than USB. If you use your stick through a JPAC or similar you are adding lag. When I went from a JAMMAsd to a lag free MiSTercade and the difference in response time was really noticeable.

Lloyd2084
Posts: 70
Joined: Sat Feb 19, 2022 8:11 pm
Has thanked: 141 times
Been thanked: 14 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Lloyd2084 »

I should also say you can’t just plug USB into the SNAC port, you need special adapters.

FPGA64
Top Contributor
Posts: 940
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 375 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by FPGA64 »

It should be almost unnoticeable with a decent USb adaptor. The Daemonbites are < 1 ms of lag. If you are using a crap adaptor you of course may have more but a daemonbite is simple to solder or buy if you must

User avatar
Grumpy-Old-Gamer
Posts: 57
Joined: Thu Apr 29, 2021 3:22 pm
Has thanked: 6 times
Been thanked: 12 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Grumpy-Old-Gamer »

Lloyd2084 wrote: Wed Jan 11, 2023 5:00 pm
davidelkinsrice wrote: Mon Jan 09, 2023 3:22 am

@FPGA64 I have a 4 way joystick - leaf switch so smooth it's like butter (https://groovygamegear.com/webstore/ind ... cts_id=407), I would highly recommend it. @Lloyd2084 I'm using a de-10 Nano. I don't know what a lag free controller through SNAC or other low latency is. There is no lag when I'm controlling the Pacman.

SNAC is a feature of the DE-10 nano MiSTer setup that allows lag free controls, but you need to use the SNAC port rather than USB. If you use your stick through a JPAC or similar you are adding lag. When I went from a JAMMAsd to a lag free MiSTercade and the difference in response time was really noticeable.

Do Arcade cores have SNAC support ?
I know there is support for DB9 SNAC using the forked cores

MiSTercade features a sub 1ms joystick input for two players but this is no different to Daemonbite

Lloyd2084
Posts: 70
Joined: Sat Feb 19, 2022 8:11 pm
Has thanked: 141 times
Been thanked: 14 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by Lloyd2084 »

Grumpy-Old-Gamer wrote: Wed Jan 11, 2023 6:58 pm
Lloyd2084 wrote: Wed Jan 11, 2023 5:00 pm
davidelkinsrice wrote: Mon Jan 09, 2023 3:22 am

@FPGA64 I have a 4 way joystick - leaf switch so smooth it's like butter (https://groovygamegear.com/webstore/ind ... cts_id=407), I would highly recommend it. @Lloyd2084 I'm using a de-10 Nano. I don't know what a lag free controller through SNAC or other low latency is. There is no lag when I'm controlling the Pacman.

SNAC is a feature of the DE-10 nano MiSTer setup that allows lag free controls, but you need to use the SNAC port rather than USB. If you use your stick through a JPAC or similar you are adding lag. When I went from a JAMMAsd to a lag free MiSTercade and the difference in response time was really noticeable.

Do Arcade cores have SNAC support ?
I know there is support for DB9 SNAC using the forked cores

MiSTercade features a sub 1ms joystick input for two players but this is no different to Daemonbite

I don’t know much about Daemonbite but it sounds like a great solution.

You are probably right with arcade not supporting SNAC actually. The OP didn’t seem aware of it, but I may well have confused matters!

I had a hunch his issue was over lag, but presumed input rather than output.

User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: How Do I Add My Own ROM to the MiSTer FPGA? Where Are High Scores Stored?

Unread post by pgimeno »

davidelkinsrice wrote: Fri Jan 06, 2023 10:36 pm

CRC

media/fat/games/mame/temp/pacman# cksum pacman.5e|awk -F’ ' ‘{print $1}’ | xargs echo “obase=16; $1”|bc
7359FAA1

That's not the CRC32 that it expects. Try to zip it and then use unzip -v to view the CRC. There's also rhash and possibly others. This Python program also calculates it:

Code: Select all

import sys, zlib

def crc32(b):
  crc = zlib.crc32(b)
  return crc if crc >= 0 else crc + 0x100000000;

def main(argv):
  data = open(argv[1], 'rb')
  data = data.read()
  print("%08x" % crc32(data))

if __name__ == '__main__':
  sys.exit(main(sys.argv) or 0)
Post Reply