BOUNTY: CPS1.5 games (with Q-Sound) on CPS2 multi

Doing a lot of ai assisted work on Punisher over the weekend, i have most of the prio bugs squashed.

1792961211104.png
1792961357709.png


1792961494399.png


The overlay is LUA debug showing stage, phase prio stuff, layers and x/y on the stage.
 
Thanks for giving it a try!

Try searching "vasm mirror" - there are several copies up on Github.

You shouldn't need the exact commit, it is just referenced for documentation. That said once you have cloned the MAME repo with git, you can switch to the exact commit like this:

git fetch origin <commit-sha>

Thanks for the help, just for reference, I did the following:

1. Found a mirror which seems to be up to date: https://github.com/StarWolf3000/vasm-mirror/tree/master, cloned it into the tools/build/ directory inside this project, renamed the clone directory to "vasm" and built it using your instructions. It built fine and it reports the right versions:
Code:
user@octane CPS15_to_CPS2$ ./tools/vasm -v
vasm 2.0f (c) in 2002-2026 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.8c (c) 2002-2026 Frank Wille
vasm motorola syntax module 3.19f (c) 2002-2026 Frank Wille
vasm test output module 1.0 (c) 2002 Volker Barthelmann

user@octane CPS15_to_CPS2$

2. Cloned MAME tree to "~/mame" and used "git log" to get the full hash of the commit you suggested (dated August 31). After that, ran the command you suggested:
Code:
git fetch origin 017b8670f0ad3be2f64911bf587eb137e53f08bd
The patch seems to have applied correctly and right now I'm building MAME. I hope it works fine. If not, I'll report/ask here for help.

Thanks again.

Edit: After 93 minutes, MAME compiled with no issue. Yay!

Edit 2: Now I do not understand what to do: I verified the roms with MAME, put them in mame_roms, and then tried to create the coverage traces, but got this:

Code:
user@octane CPS15_to_CPS2$ python3 -m tools.coverage dino punisher
[1/6] cov_smoke1p_dino rc=255 0.1s
[2/6] cov_smoke_dino rc=255 0.1s
[3/6] cov_service_dino rc=255 0.1s
[4/6] cov_smoke_punisher rc=255 0.1s
[5/6] cov_smoke1p_punisher rc=255 0.1s
[6/6] cov_service_punisher rc=255 0.1s
FAILED cov_smoke1p_dino: 255
FAILED cov_smoke_dino: 255
FAILED cov_service_dino: 255
FAILED cov_smoke_punisher: 255
FAILED cov_smoke1p_punisher: 255
FAILED cov_service_punisher: 255
FAILED cov_smoke_dino: no coverage written
FAILED cov_smoke1p_dino: no coverage written
FAILED cov_service_dino: no coverage written
FAILED cov_smoke_punisher: no coverage written
FAILED cov_smoke1p_punisher: no coverage written
FAILED cov_service_punisher: no coverage written
user@octane CPS15_to_CPS2$

I'm not really sure what I did wrong or how to continue here.
 
Last edited:
Thanks for the help, just for reference, I did the following:

1. Found a mirror which seems to be up to date: https://github.com/StarWolf3000/vasm-mirror/tree/master, cloned it into the tools/build/ directory inside this project, renamed the clone directory to "vasm" and built it using your instructions. It built fine and it reports the right versions:
Code:
user@octane CPS15_to_CPS2$ ./tools/vasm -v
vasm 2.0f (c) in 2002-2026 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.8c (c) 2002-2026 Frank Wille
vasm motorola syntax module 3.19f (c) 2002-2026 Frank Wille
vasm test output module 1.0 (c) 2002 Volker Barthelmann

user@octane CPS15_to_CPS2$

2. Cloned MAME tree to "~/mame" and used "git log" to get the full hash of the commit you suggested (dated August 31). After that, ran the command you suggested:
Code:
git fetch origin 017b8670f0ad3be2f64911bf587eb137e53f08bd
The patch seems to have applied correctly and right now I'm building MAME. I hope it works fine. If not, I'll report/ask here for help.

Thanks again.

Edit: After 93 minutes, MAME compiled with no issue. Yay!

Edit 2: Now I do not understand what to do: I verified the roms with MAME, put them in mame_roms, and then tried running the just-built MAME to create the coverage traces, but got this:

Code:
user@octane CPS15_to_CPS2$ python3 -m tools.coverage dino punisher
[1/6] cov_smoke1p_dino rc=255 0.1s
[2/6] cov_smoke_dino rc=255 0.1s
[3/6] cov_service_dino rc=255 0.1s
[4/6] cov_smoke_punisher rc=255 0.1s
[5/6] cov_smoke1p_punisher rc=255 0.1s
[6/6] cov_service_punisher rc=255 0.1s
FAILED cov_smoke1p_dino: 255
FAILED cov_smoke_dino: 255
FAILED cov_service_dino: 255
FAILED cov_smoke_punisher: 255
FAILED cov_smoke1p_punisher: 255
FAILED cov_service_punisher: 255
FAILED cov_smoke_dino: no coverage written
FAILED cov_smoke1p_dino: no coverage written
FAILED cov_service_dino: no coverage written
FAILED cov_smoke_punisher: no coverage written
FAILED cov_smoke1p_punisher: no coverage written
FAILED cov_service_punisher: no coverage written
user@octane CPS15_to_CPS2$

I'm not really sure what I did wrong or how to continue here.
Thanks for the update! It looks like you are very close.

Exit code 255 means MAME stopped before emulating anything: it couldn't start SDL video. SDL video is started even with -video none, which the runs use. This usually happens over SSH or on a machine without a desktop session. Could you post work/jobs/cov_smoke_dino/stdout.txt? It has MAME's own error message. Meanwhile, try SDL_VIDEODRIVER=dummy python3 -m tools.coverage dino punisher. Also check that ~/mame is on commit 017b8670f0a (git -C ~/mame log -1 --format=%h): git fetch alone doesn't switch to it, you need git checkout 017b8670f0a.

I'll also see about improving the build instructions/tools so that you don't have to specify this manually in the future (assuming it works).
 
Thanks for the update! It looks like you are very close.

Exit code 255 means MAME stopped before emulating anything: it couldn't start SDL video. SDL video is started even with -video none, which the runs use. This usually happens over SSH or on a machine without a desktop session. Could you post work/jobs/cov_smoke_dino/stdout.txt? It has MAME's own error message. Meanwhile, try SDL_VIDEODRIVER=dummy python3 -m tools.coverage dino punisher. Also check that ~/mame is on commit 017b8670f0a (git -C ~/mame log -1 --format=%h): git fetch alone doesn't switch to it, you need git checkout 017b8670f0a.

I'll also see about improving the build instructions/tools so that you don't have to specify this manually in the future (assuming it works).
Thanks again for the help, in fact I am running this on another machine, through SSH. Setting teh SDL_VIDEODRIVER variable to "dummy" fixed the error.

Code:
user@octane CPS15_to_CPS2$ SDL_VIDEODRIVER=dummy python3 -m tools.coverage dino punisher
[1/6] cov_service_dino rc=0 8.0s
[2/6] cov_service_punisher rc=0 11.1s
[3/6] cov_smoke_punisher rc=0 29.2s
[4/6] cov_smoke1p_punisher rc=0 32.0s
[5/6] cov_smoke1p_dino rc=0 33.3s
[6/6] cov_smoke_dino rc=0 34.3s

user@octane CPS15_to_CPS2$

Then generated the output files:

Code:
user@octane CPS15_to_CPS2$ SDL_VIDEODRIVER=dummy python3 -m cps15to2.convert dino punisher
dinoc2: cave 0x382e, 165 sites, 27996 overlay tiles
punisherc2: cave 0x3778, 270 sites, 18664 overlay tiles

user@octane CPS15_to_CPS2$

All of this seems to work fine, however I am getting different hashes on all directories :(

Code:
user@octane CPS15_to_CPS2$ export LC_ALL=C
for d in out/mame/*c2/ out/darksoft/*c2/; do
  echo "$(cd "$d" && sha1sum * | sha1sum | cut -c1-40)  $d"
done
b2899b9eed6608834dd7266ddfa37360e30025e7  out/mame/dinoc2/
28626132ab9b5fb8e34dedf269a7074db953f7ff  out/mame/punisherc2/
4754527b13958b6beeccd6840c0383c2e39efa21  out/darksoft/dinoc2/
277e910df83dd0c29af3ffbd61e56a32b63ff8e7  out/darksoft/punisherc2/

user@octane CPS15_to_CPS2$
 
Thanks again for the help, in fact I am running this on another machine, through SSH. Setting teh SDL_VIDEODRIVER variable to "dummy" fixed the error.

Code:
user@octane CPS15_to_CPS2$ SDL_VIDEODRIVER=dummy python3 -m tools.coverage dino punisher
[1/6] cov_service_dino rc=0 8.0s
[2/6] cov_service_punisher rc=0 11.1s
[3/6] cov_smoke_punisher rc=0 29.2s
[4/6] cov_smoke1p_punisher rc=0 32.0s
[5/6] cov_smoke1p_dino rc=0 33.3s
[6/6] cov_smoke_dino rc=0 34.3s

user@octane CPS15_to_CPS2$

Then generated the output files:

Code:
user@octane CPS15_to_CPS2$ SDL_VIDEODRIVER=dummy python3 -m cps15to2.convert dino punisher
dinoc2: cave 0x382e, 165 sites, 27996 overlay tiles
punisherc2: cave 0x3778, 270 sites, 18664 overlay tiles

user@octane CPS15_to_CPS2$

All of this seems to work fine, however I am getting different hashes on all directories :(

Code:
user@octane CPS15_to_CPS2$ export LC_ALL=C
for d in out/mame/*c2/ out/darksoft/*c2/; do
  echo "$(cd "$d" && sha1sum * | sha1sum | cut -c1-40)  $d"
done
b2899b9eed6608834dd7266ddfa37360e30025e7  out/mame/dinoc2/
28626132ab9b5fb8e34dedf269a7074db953f7ff  out/mame/punisherc2/
4754527b13958b6beeccd6840c0383c2e39efa21  out/darksoft/dinoc2/
277e910df83dd0c29af3ffbd61e56a32b63ff8e7  out/darksoft/punisherc2/

user@octane CPS15_to_CPS2$
Nice! Those hashes are valid but just match an earlier commit of the repo (commit 3aac11e from a few days ago).

I'd suggest pulling down the latest changes (git pull origin master), then re-run the coverage traces (may not be needed but just to be sure), and re-run the last convert step.

In any case if you try out the builds from your output they should work, there's just been a few bugs squashed since.
 
Nice! Those hashes are valid but just match an earlier commit of the repo (commit 3aac11e from a few days ago).

I'd suggest pulling down the latest changes (git pull origin master), then re-run the coverage traces (may not be needed but just to be sure), and re-run the last convert step.

In any case if you try out the builds from your output they should work, there's just been a few bugs squashed since.

So I should just download latest MAME revision (October 27th?), apply the patch to it, build it again and recreate the output files, correct?
 
So I should just download latest MAME revision (October 27th?), apply the patch to it, build it again and recreate the output files, correct?
No you should be good with MAME as-is (no need to update or rebuild). You just need to update your local copy of the CPS15_to_CPS2 repository, then run the conversion script and your output files should match the current hashes.
 
No you should be good with MAME as-is (no need to update or rebuild). You just need to update your local copy of the CPS15_to_CPS2 repository, then run the conversion script and your output files should match the current hashes.
Success! the hashes now match the repo ones. I will try the games and post here any findings. Thanks @kuze !
 
Moving along to Dinos, and using some tricks inspired by Kuze i now have this working:

Those who have worked on this before, @kuze (and me) are basically cheating here.
The tree and bushes, on cps1 these are done as part of the background with some pen/mask trick that instructs the cps1 to draw them 'above' the objects.
On CPS2 this trick is not supported. Why? It's not needed. The CPS2 supports a lot more and bigger sprites.

So what do we do? We draw them again, as sprites, with transparant pixels so you can look thru certain areas and the edges look nice.
The original tree and bushes are still present but they are drawn below them.
AI bakes the obj tiles and uses some unused cps2 gfx rom, we have plenty of space there.

@kuze:
The only problem we had left is free pal slots, and speed. I let AI optimize the routines, and for Punisher (it doesn't do pen tricks a lot) the layer draw order helps us out a lot. Punisher fixes combine the 'if stage=value, and scrollX = >0100 and <0250' it flips the draw order, and so on.
I don't think i used a lot of baked tiles in Punisher, it was almost not needed.

This still needs testing on real hw. Punisher is 100% done. I need to clean up my work still.

Dinos still needs work to find proper free pal slots/dynamic fixes, but i'm getting there.

1793134500714.png
 
I don't know that it's cheating, but rather just working with the differences in the two sets of hardware. Ultimately it's pretty much the same way the existing Punisher conversion worked, but neocps1 was doing all the fixes by hand.

With advancements in tech/AI, we can now automate that and apply the workaround every time it comes up on a given game. It's kind of like with the Kabuki discussion though, it needs lots of testing on hardware to make sure everything has been found.
 
Yeah i'm still tweaking a lot by hand to not have the object overlay active all the time and eat slots/cpu, even in its current fast implementation.
Dinos is a real 'offender' with its lush forest and the 'near cps1 limit' of the dang car driving scene.
 
Yeah i'm still tweaking a lot by hand to not have the object overlay active all the time and eat slots/cpu, even in its current fast implementation.
Dinos is a real 'offender' with its lush forest and the 'near cps1 limit' of the dang car driving scene.
The original CPS 1.5 games (not talking about the conversions) do have some slowdown in spots occasionally. CPS2 has a higher 68000 clock (16 mhz versus 12 mhz) which gives some more wiggle room for the overlay engine and look up tables.

I agree though, the more things can be streamlined the better. :)
 
Back
Top