libretro / mame2003-plus-libretro

Updated 2018 version of MAME (0.78) for libretro. with added game support plus many fixes and improvements
Other
196 stars 110 forks source link

Mk comic book offer missing #1456

Closed mahoneyt944 closed 2 years ago

mahoneyt944 commented 2 years ago

Works in mame2003 but missing here. Seems to be related to tunits only mk-221002-023434

mahoneyt944 commented 2 years ago

@MistyDreams hey just looked into this and this is caused from fast dma being disabled.

mahoneyt944 commented 2 years ago

Pushed #1457 to fix issue

MistyDreams commented 2 years ago

now mk2 shadows are broke with this on if you enable globally, The first displays for me without fast dma not sure whtas going on, the second time in attract mode it doesnt. Might be worth checking the defines for the others. was handy as an option to be toggled.

arcadez2003 commented 2 years ago

From memory FAST_DMA does provide a decent performance boost for MK2 MK3 UMK3 and Rampage World Tour on lesser hardware but at the expense of broken sound in some other Midway games,

I've forgotten which ones were affected so not kinda helpfull i know :)

As per the broken shadows in MK2 i thought it a price worth paying on the xbox due to the amount of slowdown we'd get in that game due to the hardware, so i created some new video code with the DMA active kept it seperate from the rest of the Midway core and only used it for the above games to prevent the sound issues on the others.

It would be easier to just disable the DMA once again as the comic offer screen "which funnily enough still seems to work with the DMA active in my core but the longest win streak screen might be broken as it's empty of results" is better to be broken than the shadows i'd suggest :)

MistyDreams commented 2 years ago

We dont have any broken sound with it on or off thankfully. Is only enabled on the unit_t so mk2 is all good(i think havent tested but will be a live with either way). I think the real speed came from the dcs hacks you added to be honest when i tested it anyway.

The problem is we had a core option toggle and bolted them together made sense for a speed boost. Since you cant toggle it anymore the unit_t needed it enabled again since it was decoupled from the option been taken away. The dcs is always active that makes sense dont see any issues with it at all.

mahoneyt944 commented 2 years ago

Odd issue indeed maybe we should make a config table when to use fast dma?

MistyDreams commented 2 years ago

Well deal with any issue as they come up. Seems the cores behave differently as well.

just tested mk2 shadows are gone live with case scenario :)

mahoneyt944 commented 2 years ago

@MistyDreams I think I found the issue, merged #1462 to correct. There was some documentation in issue #326. Seems to have fixed the issues for me. Does this work on your platform as well?

mahoneyt944 commented 2 years ago

Just kidding, still happening. Seems to work and then not work at random.

MistyDreams commented 2 years ago

I dont know about mk doubt it will fix the shadows on mk2 the fastdma made them disappear. Pretty much would use mame or fbneo. I havent tried on fbneo know it had issues as well when it got added might have been fixed since.

mahoneyt944 commented 2 years ago

I'm getting mixed testing results. I'm trying to get the glitch to happen when OST samples are disabled (boot the game with the core option disabled). I'm wondering if this is a memory issue.

MistyDreams commented 2 years ago

run the game under valgrind or a sanatizer if you think these if memory leaks they will let you know for sure.ru

mahoneyt944 commented 2 years ago

Well I just got the issue to happen without the samples. So not sure really. Just guessing.

mahoneyt944 commented 2 years ago

Update, tested rom mkla4 which runs on the yunit board and this issue doesn't happen. So it must be related to the tunit board specificly

MistyDreams commented 2 years ago

did you try with fastdma off with the changes

mahoneyt944 commented 2 years ago

Not yet.

mahoneyt944 commented 2 years ago

Seems to be dma related. I tried toggling it off, didn't help with the change should probably just revert the change since it's not it.

mahoneyt944 commented 2 years ago

Little update here. It seems mame2003 also has this bug when the DCS speedup option is disabled. One of the conditions for the dcs speedup or fast dma must be inverted or something.

MistyDreams commented 2 years ago

well ive lost what your trying do apart from make mk look better regardless rest of the games expense. this only became an issue whe the toggle was removed ask whoever removed it. mame2003 only touches unity plus touches t any y

mahoneyt944 commented 2 years ago

Ideally I'd like to get the comic book offer to work without shadow issues in mk2. There's an underlying issue somewhere regarding the dma, or so I believe anyway, just haven't pin pointed it. The toggle was removed by mark, not sure what his reasoning was https://github.com/libretro/mame2003-plus-libretro/pull/1014/files .... Being that mk is one of our few OST games, I figured it warranted a good look into this issue to create the best experience for the user.

markwkidd commented 2 years ago

As I recall that approach started as a user request, and the rationale was about usability and user experience. I think this core is in a much more evolved state now under your leadership, so please feel free to revisit the decision! :)

On Fri, Oct 21, 2022 at 12:27 AM mahoneyt944 @.***> wrote:

Ideally I'd like to get the comic book offer to work without shadow issues in mk2. There's an underlying issue somewhere regarding the dma, or so I believe anyway, just haven't pin pointed it. The toggle was removed by mark, not sure what his reasoning was https://github.com/libretro/mame2003-plus-libretro/pull/1014/files .... Being that mk is one of our few OST games, I figured it warranted a good look into this issue to create the best experience for the user.

— Reply to this email directly, view it on GitHub https://github.com/libretro/mame2003-plus-libretro/issues/1456#issuecomment-1286443406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVGC5QLOXMO3IV64ZOFIILWEILTVANCNFSM6AAAAAAQ2YS5VI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Mark W. Kidd (he/him/his) http://facebook.com/markwkidd (606)536-0115

mahoneyt944 commented 2 years ago

It seems like the dcs speedups are fairly stable, in which I don't have an issue with or without a toggle. It seems like the issue is with fast dma. Mame2003 with dcs toggled on behaves the same as our core here with fast dma active, being that it's still entangled in that core. So I wonder if there's a compromise for fast dma to allow it to work properly for mk and mk2 ....ideally without having to filter through game driver names. Right now it seems we can only have one or the other.

I will note on another issue I've found, with mk tunit, if you fight a few rounds and lose then hold one of the action buttons to speedup the kontinue count down. Sometimes it will drop the last entry of the high score screen and crash the comic book offer screen, then it will have flashing text for one of the demo screens. Once the game cycles through again the issue is gone. It seems like fast dma is actually too fast in this instance which I assuming is why mk2 is so sensitive.

MistyDreams commented 2 years ago

well dcs and fast dma are speed hacks have you tested with both off? dcs can be undone with a toggle though

arcadez2003 commented 2 years ago

just for the record when they fixed the shadows for MK2 the DMA calls were disabled so maybe there is not a halfway house that can be found.??

mahoneyt944 commented 2 years ago

I found a solution, although not a proper fix per say. If we pulse fast dma, it allows the shadows of mk2 to work while also allowing the comic book offer to work in mk. It seems like we just have a timing issue somewhere. But this seems good enough as a workaround, if only a temporary one. Can either of you help test this out? https://github.com/libretro/mame2003-plus-libretro/compare/Test

MistyDreams commented 2 years ago

I just tried with dcs off and fast dma off mk was fine. Might be the dcs triggering it @mahoneyt944 if you mean the high scores not showing that is

MistyDreams commented 2 years ago

/ compile-time options / -#define FAST_DMA 1 / DMAs complete immediately; reduces number of CPU switches / +#define FAST_DMA 0 / DMAs complete immediately; reduces number of CPU switches /

define LOG_DMA 0 / DMAs are logged if the 'L' key is pressed /

@@ -833,13 +833,13 @@ skipdma:
                else
                {
                        TMS_SET_IRQ_LINE(CLEAR_LINE);
-                       timer_set(TIME_IN_NSEC(41 * pixels), 0, dma_callback);
+                       timer_set(TIME_IN_NSEC(42 * pixels), 0, dma_callback);
                }
        }
        else
        {
                TMS_SET_IRQ_LINE(CLEAR_LINE);
-               timer_set(TIME_IN_NSEC(41 * pixels), 0, dma_callback);
+               timer_set(TIME_IN_NSEC(42 * pixels), 0, dma_callback);
        }

will fix the comic book where it fails at displaying merchandise with fast_dma off not sure where your failure is to be honest.

mahoneyt944 commented 2 years ago

Sorry let me clarify. I think there are 2 separate issues here.

  1. Fast dma has a conflict with mk2 shadows and mk comic book offer showing.
  2. with mk, the game allows you to speedup the kontinue count down by holding low kick. If you do so, sometimes the game will fail to display the 15th entry on the hiscore screen then it only draws a small portion of the comic book offer and will flicker the text of a fighters background info screen for one cycle. This one's a little harder to trigger since it doesn't always fail, sometimes you have to play a few games to get it to happen. Here's some screen shots when this issue happens though. mk-221021-094310 mk-221021-094321 mk-221021-094410

I think the workaround I suggested seems like a fair compromise though. It allows fast dma to be enabled while allowing mk2 and mk to work properly. It basically just pulses the fast dma hack so we still get a speed perk.

mahoneyt944 commented 2 years ago

Try this out, seems to be a nice compromise so everything works while still getting the speedup #1466

MistyDreams commented 2 years ago

do as you wish I think thats a bad move can be unpredictable behavior. the fix for dma i posted above for dma off fixes the comic book not showing. You should expect issues with speed hacks. leave it on or off so people can edit the code and recompile if the dont want the hacks applied imho. The fix i posted applies to your picture in the first post.

mahoneyt944 commented 2 years ago

True, but won't that also make it slower since you're adding another timer? Just trying to keep it as fast as possible without any noticable issues. Both solutions seem a little hacky, but if it works, it works.

MistyDreams commented 2 years ago

im not adding another timer the timer was too quick for the dma changed a 41 to a 42.

mahoneyt944 commented 2 years ago

Oh ok. Misread that

MistyDreams commented 2 years ago

just close it if your happy people on low end like pi2 ect really do need the boost this would only effect them.

mahoneyt944 commented 2 years ago

Did you try changing it to 42 while fast_dma is on?

Also noticed yunits use this, and don't have the comic book offer issue with fast dma on.

timer_set(TIME_IN_NSEC(41 * dma_state.width * dma_state.height), 0, dma_callback);
MistyDreams commented 2 years ago

yes its fine on or off obviously its taking the

if (command != 0x8000) dma_callback(1);

path else fast dma wouldnt have fixed it.

mahoneyt944 commented 2 years ago

Alright, well I'll close this. Honestly a bit sick of playing this game 😂.

MistyDreams commented 2 years ago

the other fix possibly could have fixed your issues with dma off jdreddp runs slowmo with this setup just so you know

mahoneyt944 commented 2 years ago

fast dma makes jdreddp slow?

mahoneyt944 commented 2 years ago

I'll just disable fast dma then. @arcadez2003 would you be able to test mk2 on Xbox to see if there's a noticable difference in speed without fast dma?

arcadez2003 commented 2 years ago

@mahoneyt944 unfortunately i dont have the time at the moment from memory the boost on the xbox was significant the slowdown mostly occurs in MK 2 if you start the multiple hit combo or when enemies trigger some special moves eg the guy that throws the hat.

For MK 3 the above and also on certain stages where the uppercut can send you up or through a wall into a previously hidden part of the play area, as i said i left the DMA on for a reason knowing it caused some gfx issues as we really needed the boost on the xbox bt if the RPi2 can get by without needing it for the most part then it might not be a problem.

For the non DCS sound games eg MK 1 NARC NBA Jam we use the Williams sound speedups but that is another story :)

mahoneyt944 commented 2 years ago

That's ok. I want to try to get some real comparisons eventually on something. The lowest device I have is rpi3b+ which already handles mk with decent speed. I wish I could try it on a later gen psp. I have a model 1000 and I can't even run the binary due to memory constraints. I think later models have a bit more memory but idk.

MistyDreams commented 2 years ago

psp is pretty weak will struggle with snes and genesis you would need split the build like the wii does as well to test.