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
Asteroids missing cocktail implementation #1669
Comments
Here's the relevant commit mamedev/mame@7a0645c I'm not familiar with PORT_CONFNAME, I assume this might be a physical jumper on the board (Inverter circuit) and not necessarily a dip switch. We could probably set this up with a fake dip though and install a write handler. |
Found this info as well.
Source: |
Yeah i've not bumped into code such as this before either "just as well likely" as you said fake ports Easier said than done though eh maybe another driver with a similar scheme might point you in EDIT Sometimes FBN can help give some pointers if this fix has been added there.?? as like us |
Made a little progress on this. It seems we need to setup flipping for dvg. Avg already has flipping so I hung off of some of that code.... It's hotwired as of now for testing that is. I installed a write handler to catch the player selection bit and read a fake dip switch to enable the flip. As a concept, this is working but the flip from top to bottom is off, cutting off the score header. Just need to figure why it's getting offset then hook up the controller ports and this should be good. Any help on the flip alignment issue would be appreciated. |
fix is here https://github.com/grant2258/mame2003-plus-libretro/tree/ast The reason for the offset was here just wasn't calculating the visible area properly. mame2003-plus-libretro/src/drivers/asteroid.c Line 670 in aed76b2
|
Thanks I'll give it a go, do you think we should change the avg code like you have for all games or just this one case? Not sure if it will impact any other games |
wont break anything just cuts off the invisible area was just done wrong. |
Sounds like a win win then 👍 |
Btw does current mame even have cocktail controls or are they still sharing the p1 set? |
no sure youll probably need to tie in with @rdagger for the details |
Added screen flipping for asteroids, not deluxe cab though..haven't found the player selection bit for that one yet. Still sharing one input set, though I think current mame shares too. d850ce5 |
@rdagger can you confirm if current mame has separate controls for cocktail mode? Or did they just enable screen flipping? |
@mahoneyt944 as far as I know mame currently doesn't implement separate controls, but it should because the cocktail cabinets had separate controls. |
@mahoneyt944 there is a lot of information on this thread: |
Interesting read, yeah it appears that they are sharing a port and using grounding tricks to get the extra buttons or something to that effect. I'll look into hooking up a p2 set. |
I hooked up cocktail controls for asteroids. Let me know how it works for you. ee4c135 Deluxe still not implemented though. |
@mahoneyt944 it works, great job! The screen flips. The player 2 controls work as expected and don't interfere with the other player's ship. There is 1 very small bug. The start button LEDs no longer function properly. Before when you insert a coin the player 1 LED would blink and if you inserted a second coin the player 2 LED would also blink. Now both LEDs are constantly illuminated. |
Interesting, that might be the bit I'm hooked onto...though I'm not sure what the actual machine does in this odd configuration. I think once i get deluxe working I might have a better method for hooking . Edit: yes my hook is essentially unhooking the original write after init which is what handles the LEDs. I'll fix that soon. |
c7bcc47 this should fix the leds |
@mahoneyt944 you fixed the LED bug! 🚀 Your contribution made my day. Thanks a ton! |
No problem, I will try to get the deluxe working as well. Still need to figure out the bits for that cab though to hook properly. |
For asteroids, I simply found a bit that seems to follow which players turns it is, then used a little logic to read our fake dip switch. For astroids deluxe, it should follow this same method and all the code should pretty much drop in. Problem is I haven't been able to find a bit that toggles with the players turn, there's probably an easy way to find such a bit...maybe in debug, hex editor or cheat engine. @grant2258 , @arcadez2003 do either of you have any ideas to find this bit for deluxe? Maybe we can dump the memory before and after a player turn changes or something? |
looking at the latest mame source its offset 4 bit 7 so address 0x3c04 bit 7 so data & 128 at that address should get you what your looking for. |
Thanks I'll try it out |
On a second look I think I tried 0x80 already, it's the LED light which flashes when coins go in. I'll plug in everything and retest though since I may not have been in the right port. |
@grant2258 yup that did the trick, deluxe is now working too 😄 25f3e82 |
Asteroids is "data&0x04" correct? I found this bit without using documentation. I was just looking at deluxe in current mame and I see this: The <4> is the offset, but how did you get bit 7? Asteroids would be this: So 3202? But again how did you verify the bit? I guess 4 since it works. |
@mahoneyt944 Asteroids Deluxe works, thanks again! |
I only looked what deluxe is doing bit seven is set here https://github.com/mamedev/mame/blob/d750435f57639e6e5ed314793595853c2d975b86/src/mame/atari/asteroid.cpp#L457. |
Well I think it's safe to close this, as both games are now fully supported in cocktail mode 👍 |
@mahoneyt944 i've been back working with the advanceMAME core again of late and whatya know...... |
@arcadez2003 lol thanks. Yeah many ways to get there. But if it works it works . It was fun to figure it out anyhow. |
Asteroids and Asteroids Deluxe are missing the cabinet dip switch for cocktail mode and the player 2 controls.
I believe this was fixed in mame v0.198.
The text was updated successfully, but these errors were encountered: