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 · 160 comments
Open

System32 improvements #1587

mahoneyt944 opened this issue May 19, 2023 · 160 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?

@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!

@mahoneyt944
Copy link
Collaborator Author

mahoneyt944 commented Jun 13, 2024

The issue with the black ending screen in sonic (after defeating dr. Eggman) seems to be that the palette is being set to all black. It's drawing black on black for a period of time. Need to figure out why.

@mahoneyt944
Copy link
Collaborator Author

Sonic ending (black screen) fixed.
sonic-240614-095624

@mahoneyt944
Copy link
Collaborator Author

@KMFDManic #1758 updated the video code fixing all system32 games, massive improvements. Multi32 I'm still working on so those don't work yet

@KMFDManic
Copy link
Contributor

@mahoneyt944 that's absolutely incredible and awesome:) I was actually peeking into some of the video, etc, code for taito f3, system 32, as well as Deco, and a few others, as I am hoping to get some of them properly updated into Xtreme, too.

Most of it should be pretty cut and dry for me. One thing I am curious about, however. I did an initial test, adding Virtua Racing, model 1 to Xtreme. And, the graphics didn't display properly. Is there something I may be missing related to video? Not sure if you or arcadez2003 initially had any graphic glitch issues when first adding it.

In any case, I am still loving the hi/lo shift addition and am pretty much set on doing a nice showcase video for that. Might as well do a System 32 video, too:) Thanks again, as always!

@arcadez2003
Copy link
Collaborator

@KMFDManic i didn't check the commits but apart from the model1 code you'd need to check sega's system 24
machine and video code.

@mahoneyt944 go on lemmie see how good SlipStream looks :)

@mahoneyt944
Copy link
Collaborator Author

@arcadez2003
slipstrm-240621-185126
slipstrm-240621-185137
slipstrm-240621-185207

@arcadez2003
Copy link
Collaborator

it's all fan dabby dozzy ;)

@mahoneyt944
Copy link
Collaborator Author

Still needs the sound bank figured out though, only game without sound.

@KMFDManic
Copy link
Contributor

@mahoneyt944 my first thought when you said system 32 was fixed was to make sure to test Golden Axe Death Adder and see if shadows were fixed. Low and behold, they were:) I tested prior commit and damn, what a huge difference.

Now, I have an amazing showcase video to put together for 2003 plus:) You did awesome with this

@arcadez2003 thanks for the pointer on virtua racing. I kind of had a feeling that was the route, since they seemed to be tethered code wise. Definitely been enjoying all of the latest commits you guys have all been working on.

Hopefully, @grant2258 all is well in your life, too!

@mahoneyt944
Copy link
Collaborator Author

@KMFDManic one of the best improvements I think is the tilemap zoom. You see this in ga2 when you beat the first boss, the path moves towards you. This effect is used alot in alien3 as soon as the game starts too.

@KMFDManic
Copy link
Contributor

@mahoneyt944 the scroll effect with the elves even in first stage looked floaty, prior to the fixes:) I will get things together for a before and after video, as well as the hi lo shifters. Probably a few other things of note to showcase, too:)

@arcadez2003
Copy link
Collaborator

arcadez2003 commented Jun 22, 2024

@KMFDManic one of the best improvements I think is the tilemap zoom. You see this in ga2 when you beat the first boss, the path moves towards you. This effect is used alot in alien3 as soon as the game starts too.

I agree although it's most noticeable in the caves level and the warpaint of the native enemies due to improvements
with the shadowing.

@KMFDManic how's the performance on some of the low spec consoles and devices.??

As the performance might take a bit of a hit with the new and improved sega32 video code.

@KMFDManic
Copy link
Contributor

@arcadez2003

Performance is more on par with MAME 2010/2014/2015 with the fixes (from my initial test), so, lower spec will likely need a little underclocking and or frameskip to truly not be overly sluggish. I was testing that, too. Definitely reasonable, though! Worth the massive overhaul fix ups!

@arcadez2003
Copy link
Collaborator

arcadez2003 commented Jun 22, 2024

@arcadez2003

Performance is more on par with MAME 2010/2014/2015 with the fixes (from my initial test), so, lower spec will likely need a little underclocking and or frameskip to truly not be overly sluggish. I was testing that, too. Definitely reasonable, though! Worth the massive overhaul fix ups!

Underclocking the V60 cpu speed in the driver will help in this regard try dropping it to 14 mhz.. or 12mhz but
go no lower than 12.

MDRV_CPU_ADD(V60, 14000000 )

@grant2258
Copy link
Contributor

@KMFDManic life going well here only thing I have to complain about is having a day without any rain. At least its mixed weather with sunny intervals :). The issue with VR is the video and the v60 itself is using unsigned to float which behaves differently on arm than it does on intel but its undefined behavior. Ill need to look if there is a way of dealing Floating-point to/from Integer intrinsics make it act like intel on gcc or clang. I still look at this core now and check for low hanging fruit but since I got that pi5 the games I play work fine in current mame.

@mahoneyt944 nice work on the system32 stuff raises the bar for low end its some times a hard balance to call.

@mahoneyt944
Copy link
Collaborator Author

Thanks. It was quite the work load, still more to do but I'll get to it soon.

@KMFDManic
Copy link
Contributor

@grant2258 @arcadez2003 @mahoneyt944 My skillset when it comes to this stuff tends to me more theoretical in "what" i'd like to accomplish, and the best way to pull it off. While many Cores try their best to remain "accuracy" focused. I can't do that for the lower specs. So, I remain constantly creative in new additions I put forth. For example, PPSSPP is VERY rough around the edges on the Mini Classics and RPI, etc, simply because it utilizes quite a bit of ram and overall cpu usage.

SO, then, what I opted to do to improve that particular Core for us was to convert integer values to floating points, so that I could utilize additional "clock" speeds and "resolutions". Doing such, allows "impossible" to run games, to actually work...

IE: God of War: Ghost of Sparta
https://www.youtube.com/watch?v=FgD_ddDye-Q&t=111s

Things get really tricky when it comes to trying to improve performance/speed, as you also have to account for music/sound. We don't need voices sounding like the chipmunks! While not exactly accurate, I have a fairly good sense of what I'd like to do video/audio timing wise.

MAME 2003 remains my primary focus, as NES/Arcade will always be first and foremost for me. But, it is still fun to muck about with other Cores and try to at least help lower specs run them. I definitely appreciate all you guys have done to humor me in my ventures for the lower spec. Like the drama arcadez2003 and grant2258 have unfortunately had at times...Some in "our" scene have had an unnecessary dramatic flair, as well (including, attempts to resort to contacting Libretro to request I no longer post Xtreme Cores, so ONLY their "official" stuff existed! Yes, sounds absolutely insane and stupid. I absolutely refused to give up, when "their" trolling occurred, and luckily had support of people as awesome as you on my side. So, in the end, "they" did not prevail.

Of course, it is so easy to just run on a higher powered Android/PC device. But, without challenge, where is the fun! Just always know, it is always so much appreciated to have you all on my side!

I will definitely have some fun messing around with the System 32 and other such recent additions. It is always an honor and privilege to be part of things, here. Thanks, again:)

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