Main > Software Forum
Sega Model 2 Emulator Full Screen Shooter fix - RamjetM2Borderless - App
<< < (51/78) > >>
RamjetR:

--- Quote from: Howard_Casto on February 12, 2013, 08:46:11 pm ---Ok I'm starting to understand why vcop is a special case now.  It seems that all the lightgun games have an extra bit for reload. 

For vcop it's at +18F7BC and values are ADDED to a buffer for the reload signal... in other words it's 0 when nobody is reloading, 1 for p1 reload , 2 for p2 and 3 for both. 

For hotd it's at +18F7DC and the values are SUBTRACTED to a buffer for reload...  3 for no reload, 2 for p1, 1 for P2 and 0 for both. 


So yeah I figured out HOTD at least, and maybe the others work this way as well.  One thing is certain... the reload procedure is so complex for these m2 games (on top of this I have to freeze the keyboard input and simulate a trigger press to reload) that I'm going to have to hard-code some functions for them... which sucks because I wanted to keep things as generic as possible. 


**update**

I remembered that hotd and vcop2 have more similar hardware than the original vcop, so I looked and sure enough, the addresses for hotd work for vcop2 as well! 

So now all that's left is the annoying Behind Enemy Lines...  AGAIN
I'm actually busy this week so I'm not sure how much I'll get done.  I just worked on it a little tonight to make sure my original idea for reload wasn't a dead end.

--- End quote ---

Dude, I don't know how to find so much time to get this far? I come off call tomorrow, so maybe I'll have some time to look at whats left over the weekend.
Howard_Casto:
That'd be helpful, thanks. 

I looked at the original vcop and although it does use a different byte to actually write to the game, that first inverted byte is what gets passed to THAT byte.   So I can use the same code for all three lightgun games, which is awesome. 

Also I tried the keypress simulation method that is used for the pc games on model 2.... originally it hadn't worked, so I abandoned that idea but apparently it DOES work.  Maybe some bad code on my part initially?  It could have been a focus issue as well.  Unlike joystick input, m2 doesn't respond to keyboard input unless the window has focus. 

Well this simplifies things dramatically.  On all lightgun and analog gun games, P1 Button 1 is P1's fire button and P1 Button 2 is P2's fire button.  They are Z and X by default in M2 so I can probably remove most of my NOPs, which would have made it mandatory for me to handle all other keyboard input.  I just need to block the mouse, which I'm pretty sure I can do. 

Unfortunately BEL won't be effected by this as it's keyboard inputs aren't hooked up. 

So aside from it, which I'm pretty sure I'm going to have to write a convoluted custom function for, that should hopefully take care of the rest. 
Howard_Casto:
Oh, one more thing before I forget. 

Can anyone confirm this for me.

I was playing around the other day and figured out a rather round-about way to block mouse input.  If I turn on raw input and have two mice hooked up I have to configure the mice to id #0 and id#2  id#1 doesn't do anything as as a consequence if I assign both players to id#1, I get two blocked mice. 

Now if I assign them to a crazy high number (I tried 8 and 9) it doesn't work, it blocks keyboard input as well.  I actually had to restart my pc on that little adventure. 


So I'm thinking the cleanest route might be to assign the mouse to an empty space and only use the reload code I found before. 
vandale:

--- Quote from: Howard_Casto on February 12, 2013, 10:36:04 pm ---Oh, one more thing before I forget. 

Can anyone confirm this for me.

I was playing around the other day and figured out a rather round-about way to block mouse input.  If I turn on raw input and have two mice hooked up I have to configure the mice to id #0 and id#2  id#1 doesn't do anything as as a consequence if I assign both players to id#1, I get two blocked mice. 

Now if I assign them to a crazy high number (I tried 8 and 9) it doesn't work, it blocks keyboard input as well.  I actually had to restart my pc on that little adventure. 


So I'm thinking the cleanest route might be to assign the mouse to an empty space and only use the reload code I found before.

--- End quote ---

Doesnt it depend on what ID has been assigned to each device in windows meaning it can vary from PC to PC, ie my mac is 1 and 4 but my pc is 1 and 3.

isamu:
Howard just to clarify, is this El Semi's Model 2 Emulator you guys are referring to? If so, do you have the source code for it? If so does that mean we could possibly see further improvements to the emu?

One bug in particular I'd like to point out is the emu crashing when you have more than 3 USB devices connected to your PC and you enter the controls config menu. As soon as you click on any of the analog settings the emu crashes.
Navigation
Message Index
Next page
Previous page

Go to full version