Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System32 improvements #1587

Open
mahoneyt944 opened this issue May 19, 2023 · 143 comments
Open

System32 improvements #1587

mahoneyt944 opened this issue May 19, 2023 · 143 comments

Comments

@mahoneyt944
Copy link
Collaborator

I've been messing with our old video code the last few days, and managed to fix the flickery jeep in jpark. This makes playing the game a little more enjoyable. However I noticed when the jeep is hit or bounces, it shudders down the screen instead of up like it should. I believe it's even wrapping to the top of the screen, which is why we see the tailgate graphics flash at the top. Seems to me that we need to change the direction this is moving and it might fix most of the remaining issues in jpark, but I'm not sure where the "shake" of the screen is in the video code? It must be shifting the graphics a certain amount somewhere for this effect.

@mahoneyt944
Copy link
Collaborator Author

Also just pushed an update to fix the sprites in alien3. If we hooked up zooming, as far as I can tell, this would get it looking pretty good on the old video code.

@arcadez2003
Copy link
Collaborator

Nice work the system 32 video code is complex stuff, fancy taking a peek at SlipStream some time down the road.??
the colour mixing is wrong for that one i looked in to it a while back but could not advance it any.

@mahoneyt944
Copy link
Collaborator Author

Yeah I'll look. Still need to refine alien3, thought I had it but it still has some issues at the end of the game. So now I need to reel in to the exact bit we need to mix like I did for jpark

@mahoneyt944
Copy link
Collaborator Author

Well alien3 is a bust, the fix I had breaks later levels. reverted

@mahoneyt944
Copy link
Collaborator Author

Slip stream is completely jacked in this core, does it play better in your Xbox core?

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 20, 2023

As you may or may not recall i have two of these drivers the same ole one we have here plus i have a seperate segas32 driver
and video so that Golden Axe RODA is 100% in the gfx dept i also use that for Dark Edge and SlipStream so yeah it's fine on the xbox.

If only we could port my Segas32 across to here it would solve all the problems Jpark included :)

This is what stands in the way "ofcourse there might be some other hurdles" but this is the big one input tagging......

static WRITE16_HANDLER( analog_custom_io_w )
{
static const char names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" };
switch (offset)
{
case 0x10/2:
case 0x12/2:
case 0x14/2:
case 0x16/2:
analog_value[offset & 3] = readinputportbytag(names[offset & 3], 0);
return;
}
logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset
2, data, mem_mask ^ 0xffff);
}

@mahoneyt944
Copy link
Collaborator Author

Im guessing each one of those cases are the individual inputs, so we'd have to set each one individually, not as neat but should be the same. Not sure what ports we use here but should just need matched up

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 21, 2023

Yip combined inputs into a single define it's splitting them i was never sure about how to handle that even after looking
at the ole system32 driver input handling, but there are other nasties for us to deal with should we try to backport this....

ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) )
ADDRESS_MAP_FLAGS( AMEF_UNMAP(1) | AMEF_ABITS(8) )
    AM_MIRROR's all over the place
AM_RANGE(0xf00000, 0xffffff) AM_ROM AM_REGION(REGION_CPU1, 0) a couple of these by looks
    and my ole faves some mem and rom banking

@arcadez2003
Copy link
Collaborator

dd704f4

Fixed the sprite decryption the color mixing is still wrong and no sound as yet

@mahoneyt944
Copy link
Collaborator Author

Nice, I'll poke around with the colors

@mahoneyt944
Copy link
Collaborator Author

I'm wondering if there's a magic value needing set for system32_mixerShift. Haven't found one though. Seems like the sprites are inverting the colors or something.

@mahoneyt944
Copy link
Collaborator Author

This seems to fix the bounce on the jeep 7782651

Need to test more games though for regression with this

@mahoneyt944
Copy link
Collaborator Author

That last commit also fixes the background for ga2, happy accident :) though still some color issues on the shadows to figure out, maybe related to slipstrm color issue?
ga2-230523-170055
ga2-230523-170355

@mahoneyt944
Copy link
Collaborator Author

Also fixes the windshield logo and sonic toy lean on the banks in radm
radm-230523-173320
radm-230523-173427

@mahoneyt944
Copy link
Collaborator Author

Picking up the color issues of #407 here now.

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 23, 2023

Your on a roll im wanting to see what you fix next :)

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented May 24, 2023

Seems like the color issues are all related. I notice black, such as the shadow of the slipstrm cars turn white, and the lighter characters in ga2 turn black. Reminds me of the black shadows you noted in darkedge. Wonder if we could log the palette ram from a newer mame and test it in this core, might help roll that out anyway.

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 24, 2023

Yeah those are noticable on Air Rescue with the bg's being blacked out on some levels, i guess with our video code the
mixing and merging of certain shadow and colour effects are displaying incorrectly hence it's either the sprite layer or
the background which is incorrect on the games.

I dont these games are 100% even with current MAME.?? certainly i know the bg's were totally blanked out with
Title Fight but maybe that has been sorted now.

@arcadez2003
Copy link
Collaborator

756ccb7

Last code changes in system32 video before the big rewrite might as well have these fixes for the Rad Mobile / Rally
games which from memory are circa MAME81 or so and not mentioned on the WIP.

@mahoneyt944
Copy link
Collaborator Author

Seems to be buggy, the colors wig out then correct after a second or so each time it's loaded.
radr-230524-114811
radr-230524-114822

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented May 24, 2023

Maybe it needs something tweaked in the condition? Or a delay

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented May 24, 2023

Idk it causes issues in other games too, might need to comment it out until we can figure out what's wrong. I get the feeling it was experimental work.

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 24, 2023

Yeah might as well revert it then i'll do it tomorrow unless you beat me too it :)

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented May 25, 2023

@arcadez2003 good news, I ended up copying the videoram and palette from what I think is a "ready state" and apply that to radr to fix the issues, this allows radr and radm to work without effecting other games as well :) looks good now. 👍
b9966de

@wn2000
Copy link

wn2000 commented May 25, 2023

That last commit also fixes the background for ga2, happy accident :) though still some color issues on the shadows to figure out, maybe related to slipstrm color issue? ga2-230523-170055 ga2-230523-170355

Finally a breakthrough in fixing ga2! This is awesome!

@mahoneyt944
Copy link
Collaborator Author

@arcadez2003 do you have any insight on the networking issue radr has when the game first starts up? You can skip it with a service button press but I believe we need a read/ write handler on a comm port or something to bypass it automatically?

@arcadez2003
Copy link
Collaborator

arcadez2003 commented May 27, 2023

Im not sure TBH for F1 Superlap there was a dip switch option which if defaulted to off skipped the comms check
so that's how i set it up to make sure the game didn't get locked into this check upon bootup, maybe we could
do something similar for Rad Mobile.??

@mahoneyt944
Copy link
Collaborator Author

There has to be something like that, since newer mame and fbneo skips this screen. Just haven't found how this works. Wonder what dink has in fbneo for this?

@arcadez2003
Copy link
Collaborator

arcadez2003 commented Jun 23, 2023

Ok ported across the V60 changes dbzvrvs is still crashing so i think we can rule out it being the CPU, without rabbiting on
here i still think it's connected to the protection cpu memory reads/writes something about these are not correct for this
core we've seen this before with other games right enough as for how to sort it im not sure.

To my mind an error is triggering with the video gfx hence the game crashes, it's likely as i said connected to the prot calls
i've been tweaking the address values and or switching to port or other memory calls the V60 uses and depending on the
ones used this results in the gfx layers disappearing with only the text layer left.

So defo in my opinion some sneaky prot code linked to the gfx the code workaround for that is not being called correctly
by this core hence why the game doesn't work

@mahoneyt944
Copy link
Collaborator Author

Thanks for looking into it. Seems this one will remain broken for the time being.

@MistyDreams
Copy link
Contributor

MistyDreams commented Jun 23, 2023

@arcadez2003
Copy link
Collaborator

was fixed in mame 10ou1 officially mamedev/historic-mame@f7cd5a5#diff-d2bb749bb62e7c43bb5f5ea92df05ce8bffb48e0df4df0cad5aefcb20aabb35e

Aye i know bigman that is the code i attempted to port across a rom swap and some prot changes basically

@MistyDreams
Copy link
Contributor

@arcadez2003 was for @mahoneyt944 to compare he was asking about it. Considering youve aready done it all already was just for his comparisons.

@arcadez2003
Copy link
Collaborator

arcadez2003 commented Jun 23, 2023

Aye you make a good point there ha ha ha

@mahoneyt944
Copy link
Collaborator Author

I can't find the broken chain link here, fair to say this one beats me.

@MistyDreams
Copy link
Contributor

the driver itself looks fine but cant compare the machine as i lost the zip file arcadez gave me with his xbox mame source.

@mahoneyt944
Copy link
Collaborator Author

Little update, 63d624c

Went ahead and separated rowscroll and zoom. Hopefully we can implement zoom in the near future.

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Oct 3, 2023

And another update. c76d6ea Fixed rowscroll and implemented new flipping. Seems to work with all the games I found that had issues. This fixes jpark continue countdown, game over, and the rain during the trex chase into the cave. Also big improvements for title fight backgrounds, which is now better than what current mame and fbneo has, so that's interesting 😃. Probably more too.

jpark-231003-091705
jpark-231003-091722
jpark-231003-120725
titlef-231003-102919

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Oct 5, 2023

One of the biggest improvements we could probably do here, is to add zoom support for backgrounds. I already separated rowscroll and zoom and went ahead and added logging to the zoom factors, which is working. However, we have to reverse engineer if not completely rewrite how these zoom factors are applied to the bitmap. I'm not entirely sure the best approach to this, but I welcome any help or ideas. Here's a screenshot of alien3 with the zoom logging, most noticable during this opening scene where you approach the first gate.

alien3-231005-110012

This glitchy background at the end of the tunnel level in alien3 is also due to the missing zoom effect. Zoom should center this background off the left of the screen. Notice the high center position for x
alien3-231006-003424

@arcadez2003
Copy link
Collaborator

arcadez2003 commented Oct 6, 2023

I've been reading your WIP with some interest but.......

TBH im not ashamed to say this is above my level i spent a couple weeks trying to fix the gfx offsets
for the Batsugun bootleg and had to give up in the end as i wasn't getting anywhere, the complexity
of the system 32 gfx is a step up again over toaplan 2.

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Oct 6, 2023

Fixed background scroll
alien3-231006-112211

@mahoneyt944
Copy link
Collaborator Author

Seems like zooming this tilemap might be more difficult than I expected. I don't have a solution for this as of now.

@mahoneyt944
Copy link
Collaborator Author

@grant2258 hi, I saw you took an interest in fixing up dbzvrvs, good work. I noticed for this game that we get a bad ram check in the service menu, I suspect we might need to fix our mem maps. Our maps have comments for "unknown dbzvrvs" read writes which look suspect. Any thoughts on this?

@grant2258
Copy link
Contributor

grant2258 commented Nov 2, 2023

Not sure what tests you are doing I went to the service and done a memory check and it all passed. Where is the test failing for you in the service menu? Im assuming your on android if you are make sure the -fsigned-char is being passed.

Screenshot from 2023-11-02 22-40-40

@mahoneyt944
Copy link
Collaborator Author

Whoops, my apologies I must have mixed up this with darkedge. That's the one with the memory issue.

@grant2258
Copy link
Contributor

Darkedge does have a failure but mame0259 also has this error, so its not something unique to this core in that sense. I only looked at the v60 interaction we needed to get the game working as arcadez already fixed it. It just needed proper reads and writes applied for the older version of mame. Its not a driver ive looked into much in all honesty.

@mahoneyt944
Copy link
Collaborator Author

I didn't realize this was still an issue there too. Most of this driver is pretty good, obviously some priority issues to look into but most games play well enough. Tilemap zooming is a decent hurtle to get working though. Any solution I've seen is to blit the screen or we could possibly create a new tilemap_draw function to account for scaling the image. But either way likely not an easy road.

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Nov 10, 2023

@grant2258 hey I don't want to bother you if this isn't something you'd be interested in but I figured I'd get your input on this. I've been working on title fight and besides our minor priority issues, mame2003-plus has the best working version of this game where you can actually see the backgrounds over current mame and fbneo. I'd like to take this one step further and find the background or sprite used for the ring floor, it seems there maybe a bitmap or something used for the floor and I haven't been able to find it. This is a unique case where we actually have, IMHO, better emulation so if we could find this floor it would be the bees knees.

mame2003-plus
titlef-231003-102919

Here's a video of real hardware
https://youtu.be/q1Y7W-hayFQ?si=4o_CYvh7BHkvSKcM

@grant2258
Copy link
Contributor

grant2258 commented Nov 11, 2023

I haven't looked at this driver at all changes are you know more than me about it, from what I can see many mame devs have become stuck with this particular system in the past. I haven't played any games in the system at all I really don't know how I missed them all. It might be wothr committing the changes to mame for the background and some other devs might pick up working from that progress.

I didnt realise you dont extra work on this driver well done for that one. Things are pretty hectic at the moment with work at this time of year. I might be able to look at some point but dont know if I can do anything useful to begin with.

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Dec 29, 2023

@KMFDManic This bug you noted in your video of jpark (When in the raptor cave) also seems to be fixed now...at least for player 2. This effect is suppose to be a flashlight in the dark of sorts. I think it would be fixed for player 1 as well but there's likely a priority issue concealing the effect for player 1 still. Never the less progress 😄
jpark-231229-015800

@KMFDManic
Copy link
Contributor

@mahoneyt944 very nice. Will update and test accordingly:) I had a blast playing the Jurassic Park games in the arcade several years back, complete with mockup jeep and vibration.

@StormedBubbles
Copy link

Thanks, all, for doing all of this. It has been an interesting read looking through all of the progress. I have a couple of observations and wanted to point them out in hopes that maybe they help somehow:

In current MAME, the gray void that fills most of the background in Title Fight appears to actually be the ring floor's color. Are the recently fixed crowd graphics perhaps just extending too far and covering up a ring floor that is already there?

Also in current MAME, both players have the flashlight effect in Jurassic Park. P1's flashlight is just the wrong shape. It's a rectangle that extends to each side of the screen horizontally regardless of position (maybe an error somewhere causing an unintentionally huge result for the horizontal component?).

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Jan 12, 2024

just extending too far and covering up a ring floor that is already there?

I think the ring might be using the indirect palette but that's only a guess, lots of our indirect palette shows as black, if not it could just be a priority issue in the drawing, though it's possible we are just missing a layer.

P1's flashlight is just the wrong shape

Yes current mame has this effect messed up too. There should be a flashlight for each player which tracks with the crosshairs. Not sure why we are missing this for player 1 but player 2 does work as intended for us. Hopefully we can figure out where the player1 flashlight is eventually. Lol.

@StormedBubbles
Copy link

StormedBubbles commented Jan 18, 2024

Thanks. I played through Title Fight a bit, and this definitely looks better than what current MAME offers. Well done!

There is a priority issue during attract mode. You'll see a screen with fighter stats (record, height, weight, etc.). The character model is standing in front of his name when it should be the other way around. The name should be fully visible.

@mahoneyt944
Copy link
Collaborator Author

@KMFDManic This bug you noted in your video of jpark (When in the raptor cave) also seems to be fixed now...at least for player 2. This effect is suppose to be a flashlight in the dark of sorts. I think it would be fixed for player 1 as well but there's likely a priority issue concealing the effect for player 1 still. Never the less progress 😄 jpark-231229-015800

So now that show gfx works, you can see for player 1 the highlight in the cave isn't showing, but it is for player 2. I'll have to investigate further.
jpark-240521-010540
jpark-240521-010601

@KMFDManic
Copy link
Contributor

@mahoneyt944 system 32 is always beautiful to see fix ups to. I also have a tentative showcase of the shifter addition to post within next couple days. I decided I wanted to get JAVA games up and running on the Mini Classics, and succeeded on that front. So, back to MAME 2003 again:) Where it really counts most!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants