What's new

Reverse engineering 161 in 1 cartridge to change Rom games

As requested I have forked the repo from @zardam with the changes I made to get PickNMix up and running on the @leonk cart.

https://github.com/kuzearcade/ub_vortex_multicart/

**** DISCLAIMER ****
I had an issue with PICKnMIX occasionally freezing on a game during attract mode and usually just switching to the next game would fix the problem. I tried to fix it with the latest code, but I'm not sure if it is fully resolved or not. In general though, it "works" but may still have a bug. Maybe don't leave it running unattended on a cab without further testing or if it freezes you may end up with some burn in on your CRT! Then again the problem may be fixed.

Consider this a YMMV warning and use at your own risk! I'm not responsible if your CRT is destroyed or your cab/MVS catches fire.
**** DISCLAIMER ****

Ultimately it was a lot more work than simply updating the game list. If you take a look at the files in the 'src' folder you'll see that all files required changes except the two soft dips related ASM files.

The long and short of it is there's not much space in the Unibios for additional code and the original @zardam repo hardcodes everything to overwrite certain sections of the Unibios and expects all patches to be a certain size. This can make it tricky to make further edits.

For those with an @leonk cart you can simply download the xdelta from the main directory of the repo and apply it against a stock Unibios v4 ROM. See the repo for example syntax. You will likely need a version of xdelta (or xdelta UI) based on the newer v3.x xdelta code.

Enjoy!
 
As requested I have forked the repo from @zardam with the changes I made to get PickNMix up and running on the @leonk cart.

https://github.com/kuzearcade/ub_vortex_multicart/
Thanks for sharing! I'm looking over your code changes and wondering a couple of things:

- How did you calculate the address where to patch switch_game.bin? (0x043f0)
- Why did you inline the "Samurai Shodown 5 Perfect" title instead including it in find_names.py which generates the list of games to insert?
- 240p test suite is not in the CSV file nor find_names.py. That should mess up the game index. Is this why you add 1 to the index in switch_game?
 
Thanks for sharing! I'm looking over your code changes and wondering a couple of things:

- How did you calculate the address where to patch switch_game.bin? (0x043f0)
- Why did you inline the "Samurai Shodown 5 Perfect" title instead including it in find_names.py which generates the list of games to insert?
- 240p test suite is not in the CSV file nor find_names.py. That should mess up the game index. Is this why you add 1 to the index in switch_game?
My memory may be a bit fuzzy as it’s been like six months but I’ll do my best to answer these questions.

The switch game hex address change was calculated by using a hex editor to analyze the Unibios / PickNMix patch in tandem with the MAME debugger. Basically I had to find somewhere where there was enough space for my modified code to be inserted where it wouldn’t overlap with anything important. Unused game titles from bootlegs/hacks are one such way to find a modicum of space.

I believe that’s why the Sam Sho title is directly in the build file, so it wouldn’t cause the output size of the other titles to get too large and cause crashes.

That’s correct re: 240p test suite, it’s not something you want to get triggered in automatic game cycling and space is extremely tight in the game list. For me personally I will just use a MVS with a stock bios if I want to access that entry. Also with it as-is I believe the max number of titles I could get it to display without crashing was reached.
 
The switch game hex address change was calculated by using a hex editor to analyze the Unibios / PickNMix patch in tandem with the MAME debugger. Basically I had to find somewhere where there was enough space for my modified code to be inserted where it wouldn’t overlap with anything important. Unused game titles from bootlegs/hacks are one such way to find a modicum of space.

I believe that’s why the Sam Sho title is directly in the build file, so it wouldn’t cause the output size of the other titles to get too large and cause crashes.

Yeah. That's some 68K magic going on there. I moved some games around for fun to see if I can calculate the new offset and falling on my face trying that. Keep getting illegal instruction and of course that address has text of games and not executable code.
 
Yeah. That's some 68K magic going on there. I moved some games around for fun to see if I can calculate the new offset and falling on my face trying that. Keep getting illegal instruction and of course that address has text of games and not executable code.
Right, it’s basically maxed out already and coded to fit a precise amount of space so takes some hacking about if hex lengths from assembly output change anywhere.
 
I had an issue with PICKnMIX occasionally freezing on a game during attract mode and usually just switching to the next game would fix the problem.

Random games or specific titles? Does freezing mean actual freezing or just that it doesn't advance to the next title on the list and keeps playing the same game attract loop?

Because there are some original games that have issues with game cycling on a multislot. For instance King of Monsters apparently just sits forever on a static screen when set to free play:

https://www.arcade-projects.com/thr...mode-during-free-play.9073/page-2#post-177638
 
Random games or specific titles? Does freezing mean actual freezing or just that it doesn't advance to the next title on the list and keeps playing the same game attract loop?

Because there are some original games that have issues with game cycling on a multislot. For instance King of Monsters apparently just sits forever on a static screen when set to free play:

https://www.arcade-projects.com/thr...mode-during-free-play.9073/page-2#post-177638
The game froze during attract mode instead of cycling to the next game, I recall it happened with Slug 5 and Puzzle Bobble before. This was after leaving it running in attract mode for hours at a time testing. I would just hit A and it would advance to the next game. One time I had to do a Unibios reset with the Start + ABC combo.
 
I prefer the look of the new menu that I put on the carts vs the Pick-N-Mix look
I am curious what does the menu looks like in your build?
I just hate the ugly times new roman font and the cheap looking Chibi Athena logo... not so much in my liking at all
 
and falling on my face trying that. Keep getting illegal instruction and of course that address has text of games and not executable code.
The instructions aren't that hard. Maybe check the file called build. :)
 
I started assembling my cartridge. There were no special problems with the technical part - if you add a low-temperature Rose alloy, then the daughter boards are removed without problems in 20 seconds. And it's easier to clean the legs after that if you use old boards. There was a question about neogeo-menu - where to copy files from the copy_to_vortex_repo folder, replace the already compiled roms in VTXCart or in the Menu\MVS folder before compilation?
 
Something doesn't seem right. I copied the files from the copy_to_vortex_repo folder to VTXCart-main\Compiler\Menu\MVS. This is what the folder looks like after that. Снимок экрана 2024-12-21 222022.png
The roms were compiled with these parameters
VTXCart.exe games.txt MVS c3g GenIX GenMAME GenROM
I flashed it, soldered it - instead of the menu, there is a white screen and the menu looks like it's from Vortex, because the games are launched by pressing D, which should not be in the menu from ArcadeTV.
The games seem to start normally, they respond to the keys and there is sound with music, but the graphics are either artefacts or practically non-existent.
This is what the 240p suite looks like1734808241786.jpg
And here's some kind of game from the last page1734808241771.jpg
 
I'm not sure if the S rom flashed properly at all - I have a JS28F256 chip and I divided the srom into srom1 and srom2, and then connected it in reverse order srom=srom2+srom1 according to the advice from this forum. As I understand it, the memory chip is 64mb, and the rom is 128mb, and only half is flashed during the firmware process, and accordingly neither dump nor verification can converge with a full-fledged 128mb rom, that is, it is impossible to check whether everything is properly flashed.
And for understanding the process and step-by-step debugging, what is stored in S,M, P, V and C roms? To make only the menu work, which roms do I need to flash and solder - S and M?
 
I'm not sure if the S rom flashed properly at all - I have a JS28F256 chip and I divided the srom into srom1 and srom2, and then connected it in reverse order srom=srom2+srom1 according to the advice from this forum. As I understand it, the memory chip is 64mb, and the rom is 128mb, and only half is flashed during the firmware process, and accordingly neither dump nor verification can converge with a full-fledged 128mb rom, that is, it is impossible to check whether everything is properly flashed.
And for understanding the process and step-by-step debugging, what is stored in S,M, P, V and C roms? To make only the menu work, which roms do I need to flash and solder - S and M?
Hi @MaRC!

You have to take the original 64MB (megabytes) SROM file, split it in half (two 32 megabytes file), discard the second one (it's full of 0xFF), an concatenate the first part with itself (srom = srom1 + srom1), so the first half and the second half of the resulting file are the same.

For testing it after flashing, redump it and compare only the first half of the file (the second half should be a mirror of the first, but it's irrelevant anyway).

For the information stored in the different memories:
  • P: M68K main CPU instructions and data. This is absolutely mandatory, otherwise you will get the hatch screen
  • M: Z80 secondary CPU instructions and data. This CPU does the audio processing
  • V: digital ADPCM sound samples
  • C: graphical sprites and backgrounds
  • S: fixed graphical tiles (texts, indicators...)
For the menu to work fine, you only need P and S. If S is missing or wrong, the menu will work but with no graphics.
 
Last edited:
Thank you for explaining.
Now it remains to figure out how to install the neogeo-menu correctly.
Vortex has 3 files in the Menu folder:
  • menu-m1.bin
  • menu-p1.bin
  • menu-s1.bin
As I understand it, these are patches for M, P,S roms directly with the menu itself and running _run.bat with the PatchMenu parameter, we patch the roms with these .bin files.
The neogeo-menu PDF file says that the generated files:
  • crom0
  • vroma0
  • prom
  • m1rom
  • srom
needs to be copied to the Menu - but there are already 5 files and they don't have the .bin extension.
At the same time, run _run.bat without the PatchMenu parameter, then how do these changes get into the final roms?
 
Thank you for explaining.
Now it remains to figure out how to install the neogeo-menu correctly.
Vortex has 3 files in the Menu folder:
  • menu-m1.bin
  • menu-p1.bin
  • menu-s1.bin
As I understand it, these are patches for M, P,S roms directly with the menu itself and running _run.bat with the PatchMenu parameter, we patch the roms with these .bin files.
The neogeo-menu PDF file says that the generated files:
  • crom0
  • vroma0
  • prom
  • m1rom
  • srom
needs to be copied to the Menu - but there are already 5 files and they don't have the .bin extension.
At the same time, run _run.bat without the PatchMenu parameter, then how do these changes get into the final roms?
I think you have to rename the menu files and overwrite the original ones, then run the bat without the patchmenu parameter. I used the original vortex menu, so I'm not 100% sure, test it on MAME before flashing.
 
No one uses neogeo-menu because no one has figured out how to replace the standard one. rewrite uses the standard menu in its cartridges too. And ArcadeTV and ManCloud haven't been here for a long time to ask them for details. Unfortunately, the neogeo-menu seemed more concise to me.
 
Back
Top