libretro / mame2003-plus-libretro

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

Batsugun Bootleg #1618

Closed arcadez2003 closed 1 year ago

arcadez2003 commented 1 year ago

While i was waiting for the new Dogyuun romset i decided to go ahead and add the Batsugun bootleg which unlike the sets we support has full sound and music although not 100% in that dept but still way better than what we have now

I've set it to use the older batsugun video code minus the hacks as it doesn't like those it's nearly there just one small problem remains which without rabbiting on i'll quickly explain...

Check this out the bootleggers due to using different hardware or chips most likely added some gfx offsets here is the Fixeight bootleg as an example...... https://github.com/libretro/mame2003-plus-libretro/commit/e7284d357913f74221441c34dbb9309f2959018d

One layer on the vdp here is how the code looks in current MAME after several rewrites of the toaplan2 gfx

VIDEO_START_MEMBER(toaplan2_state,fixeightbl) { VIDEO_START_CALL_MEMBER(toaplan2);

/* Create the Text tilemap for this game */
create_tx_tilemap();

/* This bootleg has additional layer offsets on the VDP */
m_vdp[0]->set_tm_extra_offsets(0, -0x1d6 - 26, -0x1ef - 15, 0, 0);
m_vdp[0]->set_tm_extra_offsets(1, -0x1d8 - 22, -0x1ef - 15, 0, 0);
m_vdp[0]->set_tm_extra_offsets(2, -0x1da - 18, -0x1ef - 15, 0, 0);
m_vdp[0]->set_sp_extra_offsets(8/*-0x1cc - 64*/, 8/*-0x1ef - 128*/, 0, 0);

m_vdp[0]->init_scroll_regs();

}

Here are the offsets for the Batsugun bootleg notice it's drawing these for two layers

VIDEO_START_MEMBER(toaplan2_state, batsugunbl) { VIDEO_START_CALL_MEMBER(toaplan2);

// This bootleg has additional layer offsets. TODO: further refinement needed
m_vdp[0]->set_tm_extra_offsets(0, 0, 0, 0, 0);
m_vdp[0]->set_tm_extra_offsets(1, 0, 0, 0, 0);
m_vdp[0]->set_tm_extra_offsets(2, 0, 0, 0, 0);
m_vdp[0]->set_sp_extra_offsets(0x37, 0x07, 0, 0);

m_vdp[1]->set_tm_extra_offsets(0, -0x05, 0x07, 0, 0);
m_vdp[1]->set_tm_extra_offsets(1, -0x05, 0x07, 0, 0);
m_vdp[1]->set_tm_extra_offsets(2, 0, 0, 0, 0);
m_vdp[1]->set_sp_extra_offsets(0x39, 0x12, 0, 0);

m_vdp[0]->init_scroll_regs();
m_vdp[1]->init_scroll_regs();

}

So @MistyDreams @mahoneyt944 is it possible to adapt the above offsets using our ole code which was created for Fixeight or do we need to modify said code to handle these on double the amount of layers.?? and regardless of the answer do you have any advice around this as im stuck currently :)

Here is my current WIP the game is playable however with the offsets the gfx are a bit messed up it's close though. batsugunbl.zip

MistyDreams commented 1 year ago

I cant remember the tilemap limitations on this core think its five. You would need to check if your the new code isnt using more tilemap scrolling layers than the max for this core, else youll have to use the old code.

arcadez2003 commented 1 year ago

Well i was hoping to stick with the ole video code and rework the offsets to fit within it

MistyDreams commented 1 year ago

maybe see what @mahoneyt944 thinks I get the gut feeling its probably going to be a rabbit hole!

arcadez2003 commented 1 year ago

Yeah i agree i attempted to double the offsets but i see no way of setting em as per layers like they have in the newer drawing, im sure there is a way in which we can create some code to handle those offsets but at the moment i cant suss it

MistyDreams commented 1 year ago

@mahoneyt944 loves tinkering with old gfx code see what he thinks. I checked this core has 5 scroll layers have you updated this video code in the past?

arcadez2003 commented 1 year ago

Just to add the offsets for the Fixeight Bootleg and some gfx fixes for the original Batsugun sets other than that the video code is MAME78, certainly i dont wanna be updating the toaplan2 video as that would require too much graft and it'll likely affect the game performance knowing later MAME code.

Sometimes ya gotta be happy with what ya got Having a version of Dogyuun with sound is good enough maybe we just need to forget about this one as it's not gonna play with our current setup.

mahoneyt944 commented 1 year ago

I'll have a look tomorrow, chainsawing trees up today.

mahoneyt944 commented 1 year ago

Well I'm not sure if the double layers will have any issues or not. Though we might be able to test that each layer works independently first and if so, then we try to blend them.

grant2258 commented 1 year ago

The only other option is to update the cpu for the sound fix if I read the wip properly.

arcadez2003 commented 1 year ago

The only other option is to update the cpu for the sound fix if I read the wip properly.

Hello again grant good to see ya it's been a while :)

BTW the ram sharing code you added for Ghox came in handy for Dogyuun so thanks again for that, with regards to the V25 i looked at that several years back there is alotta graft and much of the code would need to be reworked for use in MAME78 and that is before you even get to the changes on the toaplan2 side.

There might be another way however the I86 CPU is more or less the same as the V20 some games are interchangable im not sure if they all are.?? example im using the V20 for Born To Fight in MAME84 and for ease of porting the I86 for that game in this core.

There are some V25 hooks in there by looks and with the V25 sound code not being encrypted for Batsugun maybe we can use the I86.?? but again it's a fair amount of graft with no guarantee it'll work

arcadez2003 commented 1 year ago

Well I'm not sure if the double layers will have any issues or not. Though we might be able to test that each layer works independently first and if so, then we try to blend them.

Yeah im still dabbling with the offsets but as yet no joy thanks for taking a look but dont knock yourself out over this as although the game has music where the other sets dont it's not the full music tracks from the original versions it's likely gonna be the same one just repeated across all the levels certainly it didn't change on level 2 at anyrate.

grant2258 commented 1 year ago

I did nae even know a v20 was compatible with the i86. I wish i could say yes or no but im not sure. Yea Ive away for a bit been a while, had loads going on. Nice too see this core is going! Ive just been fixing the mame current core builds, ill be doing the something for this one if you left any drivers for anyone else to do ya greedy bas ya :)

arcadez2003 commented 1 year ago

I did nae even know a v20 was compatible with the i86. I wish i could say yes or no but im not sure. Yea Ive away for a bit been a while, had loads going on. Nice too see this core is going! Ive just been fixing the mame current core builds, ill be doing the something for this one if you left any drivers for anyone else to do ya greedy bas ya :)

Aye i dinnae know that either until dink used it to get Q-Bert to work in FBA as at that time they dinnae huv a V20 and aye i'll make sure to leave sumpin for yae ta dae :)

arcadez2003 commented 1 year ago

Well amateur hour i know but im dabbling with the offsets ATM using how they're set for Fixeight Bootleg as a guide this sorts some of the placements but not all but the fact i can toggle the screen left or right or up and down makes me sure with the right offset values the game can look good i just haven't found em yet :)

VIDEO_START( toaplan2_1 ) { int error_level = 0; error_level |= toaplan2_vh_start(0); error_level |= toaplan2_vh_start(1); if(!strcmp(Machine->gamedrv->name,"batsugunbl")) { xoffset[0]=0; xoffset[1]=0; xoffset[2]=0; xoffset[3]=0x07;

    yoffset[0]=0;
    yoffset[1]=0;
    yoffset[2]=0;
    yoffset[3]=0;

    xoffset[0]=-0x05;
    xoffset[1]=-0x05;
    xoffset[2]=0;
    xoffset[3]=0x12;

    yoffset[0]=0x07;
    yoffset[1]=0x07;
    yoffset[2]=0;
    yoffset[3]=0;
}
else
{
    defaultOffsets();
}

// defaultOffsets(); return error_level; }

grant2258 commented 1 year ago

So any 8087/8088 might work that's interesting! It might be worth asking Dink as he probably will just know the answer! Speaking of which I Updated my romset cant find some nba game anywhere tried mame and fbneo. Ill get the name of it later. Annoys me having 1 missing rom, ten or a 100 wid be fine but one in the name of the wee man!

mahoneyt944 commented 1 year ago

@grant2258 I have it I believe, was a rom hack @KMFDManic added

KMFDManic commented 1 year ago

@grant2258 you referring to NBA jam hack with jordan?

Nice to see you back, by the way. I truly hope life has been good to you!

By the way, there was something else I've been meaning to ask you about. You previously added Daphne Badlands control fix to your fork, awhile back. But, I see that Repo seems to now be gone. I'd love to be able to run that with controls, if you can shed some light on the fix you implemented for that.

Also, interestingly enough, there is a way to get sound working in Daphne libretro port. But, it breaks video (confirmed this in a test build and actually had sound functioning). The issue relates to running in multi or single thread. This may be something we can potentially fix at some point. Libretro daphne with sound would be beautiful, rather than not necessarily having to rely on standalones.

grant2258 commented 1 year ago

Nice to see your still about as well @KMFDManic hope is is well for you as well. Life could be worse, had a few family things to deal with like all have to do at times. The weather is good here for a change not really much to grumble about apart from the price food and petrol! I actually deleted my account so all my repos are gone it was added to retropie though at some point as far as I can remember. Ill check the retropie for and see if it was there. The analog joystick needed fixed as well as the button parsing. The main problem with Daphne in libretro is the threading and its a big undertaking to remove it all.

@KMFDManic https://github.com/RetroPie/daphne-emu/pull/15/files I believe this was the fix. I did add more buttons at some point but dont think I done a pull req for that. Just checkout the retropie branch in the source.

wget https://patch-diff.githubusercontent.com/raw/RetroPie/daphne-emu/pull/15.diff
git apply 15.diff

hopefullty it still patches ok if it doesnt let me know and ill fix it up for you if clone the repo. Ill should find the rom now I know its a hack. Cheers @mahoneyt944 and @KMFDManic

Wilstorm commented 1 year ago

♫ Whoooh, ooooh, oh, who's that guy? ♫ ♫ He came out of the darkness in the middle of the night, ♫ ♫ blazing like a mother with a fist of dynamite! ...BOOM... ♫ ♫ Who's that guy? ♫ ♫ He's just amazin', from headlight to tailpipe, his burners are blazin' ♫ ♫ He wears a pair of goggles like a man from outer space.

Ok, so you got the conglomerate version of that song because...well... I don't know all the lyrics in order and it just popped into my head. As they say, it's been a minute. Good to see ya mate - @grant2258! ;)

KMFDManic commented 1 year ago

@grant2258 Thanks so much for the link. I will play around with things when I get a chance. Let me know if you are still trying to get NBA Jam with Jordan up and running.

grant2258 commented 1 year ago

hello there mr @Wilstorm !!!! Your wasting your talents you should me making money selling bumper car sticker creations! Nice to see the the core is still in use I had a feeling it would be a barren land that time forgot. @KMFDManic I found the patch files hope they are the right ones will patch the roms and see! I ll let you know if goes pear shaped!

Wilstorm commented 1 year ago

Hey @grant2258 it's real good to see ya! Bump stickers, now that's an idea! Sorry, just roll with my quirky sense of humor and occasional random song. It came from my late father without a doubt. Yeah it's a great core but equally great is talking with the guys that put the elbow grease into it! ;)

I keep a Pi with the core loaded near my switch which my wife and daughter love due to Mario Kart 8. The wife sounds like a serious trash talking sailor when she plays and my daughter is starting waver into other games a bit lately though. I did dabble with Launchbox as you had suggested a few times and it's pretty slick. That allowed me to dabble with a newer MAME version which was fun for a bit but honestly this core covers probably 95% of those games I play the most. The Pi is small enough to tuck into just about any small space next to the console.

One thing is I couldn't get vector games looking as nice with newer MAME settings (as compared to this core) but I think it might have been due to the integrated graphics vs. a dedicated GPU. It was a mid-level AIO which has quite a bit more power than a Pi. Anyway I know you're working on something here but I just wanted to say hello real quick and say it's good to see you still kicking the can down the road! Also have a great weekend!!

grant2258 commented 1 year ago

@Wilstorm is good to hear everyone is doing well. Women will take over the house its just the way things are. We know we are right at times only a fool that wants a miserable life, would question the status quo when it comes to women as they can argue until you just cant be bothered any more debating!

Im am looking at the mame core at the moment. Ill look into the vector stuff and get back to you. The thing is mame on libretro is using the lowest res possible so toggling the alt renderer and choosing higher than 640 res if its still bad at 640. Restart mame when changing these settings not sure if its on the fly or not. I get a better answer when i have time to test myself my good man.

arcadez2003 commented 1 year ago

Ok long story short i managed to fix the gfx offsets for the Batsugun bootleg by hooking up a 2nd layer for the offsets but this broke the text writing in the game and all the others which is not good i suppose with dedicated trial and error i could sort this.

But since both the video draws we have for Batsugun will not be correct for the bootleg and will need reworked also im kinda thinking i cant be assed due to the workload and i seriously recommend none of ya's jump down this rabbithole unless your feeling brave.

I'll close this down now it did go seriously off topic in the end plus we have Dogyuun with full on sound this ole bootleg was only ever gonna be a small bonus, right onward and upward there are plenty more things to work on :)