libretro / mame2003-plus-libretro

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

fix rabbit #729

Closed meowthed closed 2 months ago

meowthed commented 5 years ago

underappreciated fighting game.

- 0.146u1: Healthbar color in Rabbit looks correct now. Small update [hap]. Removed 'Unknown' dipswitches.

- 0.145u7: hap added sound to Rabbit. Added I5000 (40MHz) sound.

- 0.143u1: Angelo Salese removed deprecat.h usage in Rabbit.

- 0.137: David Haywood implemented default EEPROMs to Rabbit. Changed description to 'Rabbit (Japan)'.

- 0.131u1: Angelo Salese merged memory maps in Rabbit.

- 0.86u5: Deadscreem improved inputs in Rabbit. Added 2nd coin slot and 'Service Mode' dipswitch. Removed 4x 'Unknown' dipswitches.

- 0.86u4: R. Belmont hooked up EEPROM in Rabbit driver.

- 0.84u5: David Haywood fixed Rabbit - Game now playable. Significant improvements to the Rabbit driver [David Haywood]. Changed 68020 CPU1 to 68EC020 and fixed user1/2 rom loading.

- 20th July 2004: David Haywood fixed the background scrolling and priority in the Rabbit driver and added zooming to it.

- 19th July 2004: David Haywood added the background tilemaps to the Rabbit driver but they are not handled correctly yet.

- 18th July 2004: David Haywood made some more progress with the Rabbit driver, though a lot is still missing.

- 17th July 2004: David Haywood - Present first pictures of Rabbit. The backgrounds are the real pain... sprites are pretty simple, but missing some global offsets etc.

- 17th July 2004: David Haywood made some progress with the Rabbit driver and R. Belmont included some preliminary notes about its sound in the driver.

- 0.77u2: Added Rabbit (Electronic Arts 1997).
arcadez2003 commented 5 years ago

Getting it playable would be easy enough, the I5000 CPU which drives the sound not so much as we dont have that in this core nor can we we backport it from later builds.

meowthed commented 5 years ago

it's okay if we don't have any sound on this game, a huge compromise, but we're working on the limitations here.

arcadez2003 commented 5 years ago

Talking of limitations this game runs like a dog on the xbox 5fps unplayable more or less it'll be the same deal on 90% of the systems that use MAME2003+ so for that reason and the fact for most people no sound is a deal breaker im not interested in working on adding Rabbit to this core.

arcadez2003 commented 8 months ago

@meowthed it only took 5 years but here ya go https://github.com/libretro/mame2003-plus-libretro/commit/9270cf48278dc8290ad912aae3feb3b9f26f9978

arcadez2003 commented 8 months ago

So @mahoneyt944 @grant2258 can one of ya's boot up Rabbit and lemmie know if it works there is no hurry TBH

Like here this was requested on the xbox it was a simple driver update no real graft required but we only got 2fps due to the limitations of that platform so i never bothered with it after that so i cant mind if it has sound or not.

It's listed as having NO_SOUND but in the driver i also seen this text above rabbit_audio_w... "the game seems to "play music" fine with just the VBL".

There is debugging code attached to rabbit_audio_w

define VERBOSE_AUDIO_LOG (0) / enable to show audio writes (very noisy when music is playing) /

maybe this has to be enabled for sound to kick in if there isn't any by default as per the driver setup

Ofcourse there was a soundcore added in later MAME for this one but i dont fancy attempting to backport it as to pardon the pun it might be a big ole rabbithole :)

mahoneyt944 commented 8 months ago

Crashes right after rom load for me.

arcadez2003 commented 8 months ago

Alright thanks for trying it i'll review the code again later

grant2258 commented 8 months ago

The problem is in void rabbit_clearspritebitmap fwiw.

mahoneyt944 commented 8 months ago

See if this fixes it, https://github.com/libretro/mame2003-plus-libretro/commit/5ccce74b4330bcb1057269436cd144ec90da71a0

mahoneyt944 commented 8 months ago

Game now loads but there's some odd input issues seems like they stick or something.

Edit: on reboot it seems ok. Maybe nvram issue on first boot?

mahoneyt944 commented 8 months ago

Yeah seems to need a bootstrap and it will be fine.

Later mame includes one, I can bootstrap it later unless someone else wants to https://github.com/libretro/mame2010-libretro/blob/5f524dd5fca63ec1dcf5cca63885286109937587/src/mame/drivers/rabbit.c#L1012

Here's a clean nv from our core nv.zip

grant2258 commented 8 months ago

just tell people to reset the game or add the nvram its up to you if you want to add a nvram. It would probably be better to add proper nvram support than adding bootstraps all the time though.

arcadez2003 commented 8 months ago

https://github.com/libretro/mame2003-plus-libretro/commit/eaaf94a351ee5cf5ad56983edc10dc529a34b79f

Made it USER4 i assume that will be fine.

arcadez2003 commented 8 months ago

Any music in ths game.?? the driver makes mention of it but warns against logging the sound writes as it'll get louder

define VERBOSE_AUDIO_LOG (0) / enable to show audio writes (very noisy when music is playing) /

Yet the game is tagged as having no sound.

mahoneyt944 commented 8 months ago

eaaf94a

Made it USER4 i assume that will be fine.

Doesn't fix the issue for first load. Not sure if loading this way will work or not. May not even be a compatible nv. Idk

And no sound

arcadez2003 commented 8 months ago

Hmm it does mention the Eeprom is flakey in the driver maybe roll back on these commits...

Basically remove the eeprom saving which in turn might sort the issue

mahoneyt944 commented 8 months ago

The bootstrap will fix it since it preloads it. I'll do it in a little

arcadez2003 commented 8 months ago

Aye ok thanks man as for sound music is twice mentioned in the driver.......

define VERBOSE_AUDIO_LOG (0) // enable to show audio writes (very noisy when music is playing)

/* Audio notes:

There are 16 PCM voices.  Each voice has 4 16-bit wide registers.
Voice 0 uses registers 0-3, 1 uses registers 4-7, etc.

The first 2 registers for each voice are the LSW and MSW of the sample
starting address.  The remaining 2 haven't been figured out yet.

Registers 64 and up are "global", they don't belong to any specific voice.

Register 66 is key-on (bitmapped so bit 0 = voice 0, bit 15 = voice 15).
Register 67 is key-off (bitmapped identically to the key-on register).

There are a few other "global" registers, their purpose is unknown at this
time (timer?  the game seems to "play music" fine with just the VBL).

*/

static WRITE32_HANDLER( rabbit_audio_w ) {

Maybe it only comes on if the sound debug logger is turned on i dunno.

mahoneyt944 commented 8 months ago

Is it hooked up? Don't see anything here rabbit-240227-150658

arcadez2003 commented 8 months ago

Sure i get what you mean the soundcore was added years after this game was first made playable, there are no sound hookups that i can see other than for logging purposes and yet there is mention of music playing unless that is in the other game which is supported in the driver.

EDIT Nice pic it confirms the code i backported and tweaked which fixes the colour in the player health bars actually works :)

mahoneyt944 commented 8 months ago

Maybe it means the writes are plentiful. wonder if we can patch it to a different chip

arcadez2003 commented 8 months ago

Imagetek 15000 is very close to Capcom's Q-Sound from what i've read......

The I5000 is a 16-channel ADPCM player, similar to Q-Sound in many ways, manufactured by Imagetek. It is used in two Arcade games.

mahoneyt944 commented 8 months ago

https://github.com/libretro/mame2003-plus-libretro/commit/3bfa9f89ab1ff4ac73a94e8ed1a9a7dbeb18d564 should fix the startup issue.

We'll have to experiment with the sound hookup.

mahoneyt944 commented 8 months ago

Sound commits https://github.com/mamedev/mame/commit/3d552624a5774eb041b1bf645ad22420ef60ef54 https://github.com/mamedev/mame/commit/907c85cc600e17eaaf132712ee017774317d38e8

These are relatively small might not be bad to backport.

arcadez2003 commented 2 months ago

Might as well close this down with a view to opening it back up should someone want to tackle the sound core