What's new

Rewriting N-Rage DirectInput8 Transfer Pak

Status
Not open for further replies.

Doomulation

?????????????????????????
I bet it isn't! It's been there since before you wrote the transfer pack I think... :icecream:
Let's race to the finish! I'm working on it as well, but still no clues, hehe. I'm also trying to get n-rage help me with this, but we've gotten nowhere so far!
There should be a test app in the source n-rage used to debug his plugin, as well, I think. So he said in the reply to my mail.

Here's a copy of the mail:

Hello,

Been some time since I worked on it. I cant reproduce the bug myself with the 1.82a Version.
Im using the Testapp that comes with the Sourcecode.
To use the Testapp you need to select "Initiate Controllers", then "Rom Open". To periodically poll data use the "Get Keys"->"Set Timer".

If you can reproduce the bug with the TestApp, send me a Mail and append your Configuration ( just Key-Bindings please, as JoyPads differ).

That said there are times when a Button wont be reconginsed as pressed, though this is not a bug, rather the way it works or is implemented. The state of the Button is determined in intervalls, Typically 50 or 60 times per seconds for a game running full speed( the Testapp is polling slower if I remember right ). If you happen to tip the button just between those intervalls, it wont be recognised. A solution to this Problem would be to used buffered input - but I cant remember if this is available through DirectX for gamepads.

Other than that It could simply be a messed up Configuration ( using a 1.80 Config in 1.82 and vice-verse counts as messy ;) ), certainly wasnt a bright idea to store the configuration in hex.

Cya

Good luck!
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Sorry, I haven't been doing anything for a couple of days, for 2 reasons: Parent's 25th aqnniversary and the inernet has been dead.

Anyway, I seem to have found another bug. On the Shortcuts tab, you try and set a key, and it automaticaly sets it to "Num 4". I'm going to try and fix this bug first, then I'll do the RapidFire bug.

EDIT: Whoops... My fault... It seemd the Num4 key on my keyboard was stuck down, but the key thingy was up... Maybe windows was just screwing around... Some keys seem to forget to send the "I've been released" signal to windows when I drop my keyboard... Sorry about that... Looks like I'm doing the Rapid Fire bug first
 
Last edited:
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
omg, guess what? It's not a bug... You're supposed to push Apply Changes on the modifiers area before you push Save... If you do that, it works... I'll have to put in a function to save the modifier when you hit Save as well... :)
 

Doomulation

?????????????????????????
Uhhh, that's not it. I've always known that, and it still causes the bug. I've been busy this weekend and have not looked into it, really. Only thing I noticed was the test app wasn't in the source I had.
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
well, it's funny, because I set the Rapid Fire thing and the Z-Trigger box, hit Apply and then Save, closed and reopened PJ64, and tit works fine, not a problem. Have you tried using a diferent key? I used the backslash key to test it. As far as I can see, there's nothing wrong with it.

Can someone tell me EXACTLY what happend, which keys you use, whick macro options you have set etc...
 

Doomulation

?????????????????????????
Funny, because I've tested the gamepad and the keyboard. Usually, as now, I use the Y button for toggle for left control stick and the X for toggle the A button. It isn't as it misses any commands, neither from the control nor the keyboard. It simply doesn't activate the macro.
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
OK. Sorry, I've been away for a few weeks, and I decided to reformat my computer. ONly thing is, I forgot to burn all my backup stuff, so I lost the plusin. I'lve just finished reinstalling everything, and I'm about to download the plugin again. I lost some stuff I did on it, but nothing I can't do again. I'm more shitty I lost 300Mb of my Visual Basic projects...
 

gandalf

Member ready to help
doh!.
The next time,make another partition in the disk and put the back up files there :p
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
I have 2 hard disks... Well, 3 if you count the non-windows-accessable Linux drive. I just never thought to put my backups on it. I completely forgot. Juist one of those days.

What actualy happened, was, I made 2 folders, Essential Backups and Other Backups. I put my stuff in them, they came to a nice round 650-700Mb each. But then I forgot to burn those folders. :(

EDIT: Ok, we're back in business. I've added all the changes I made before. Now, I just have to figure what the hell is wrong with this macro thing... I'm assuming you need an external controller for it. I'll have to rig up some wires to simulate a joystick or something, because I don't have a USB GamePad.
 
Last edited:
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Ok, this is doing my head in. I rigged up wires on teh joystick port to make it look like a 2-axis-2-button joystick was plugged. I loaded Banjo Kazooie in PJ64, set a new macro modifier as Z-trigger with rapid fire, triggered by the joy button.

I loaded a game, and shorted the joy A button to ground (simulating a button press), and it worked perfectly. Banjo kept repeating a Duck command. So, I don't know how to reproduce this bug at all. Can anyone give me a step-by-step instructions on how to reproduce this bug? I need to know what hardware you're using (Whether you're using a keyboard, USB Gamepad or a Joystick port gamepad as your input device), what software (what emulator), what game and anything else you think I should know. I don't need system specs, so don't bother with them.
 

Doomulation

?????????????????????????
It might be just me, but it happens all the time. I've tried both keyboard and gamepad. But usually I use my gamepad. I use an original gc controller hooked up with the gc adaptoid aquired at nathell.

As for step-to-step guide, I just configure it normally, a macro... for example, settings the A button, rapid fire mode and toggle. Then I apply. And it doesn't work, oddly enough.

Oh and I use pj. I've tried with Paper mario. It occoured to me that this might also have affected f-zero.
 
Last edited:
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Ahha. It seems to only do it with Paper Mario, as far as I know. I managed to reproduce the bug. I'll look into it now. It may take a few days, tho...
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Well, it seems this is not a bug in the plugin, but a bug in the game. The game is not able to handle the actual rapid fire rate the plugin produces. I'm going to have to put a slider in there to set the rapid fire rate, like with my rapid fire option. Maaah, now I gotta find where N-Rage is storing his modifier data. Gonna take a little work this, IMO. And the way N-Rage is storing his data in the registry, it a total BITCH!

EDIT: It's too hard to put a slider on, seeing he's stored the m acro as a bit mask, and there's only 32 bits I can use... So, I'll add a "Slow Rapid Fire" checkbox...
 
Last edited:
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Ok, sorry to have to tripple-post, but, well, I'm done... Again...

I've added the Slowed Rapid Fire option to the plugin and Paper Mario works beautifuly now. Check the attached source and plugin to see :)

EDIT: Attachments removed to avoid non-release version downloads. Release version is at http://www.emutalk.net/showthread.php?p=250382#post250382
 
Last edited:

Doomulation

?????????????????????????
Errmm... hmmm, HRRRRMMMM...
I knew that it was doing too fast for it to capture, although however... that's what I changed in my old build. Lemme see if paper mario still suffers the same problem.
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Next step is to fix that damned crash bug in the CloseDLL function. I hate crash bugs, because sometimes they are realy hard to find.

Edit: Ok, I've fixed it, sorta... I'm not 100% sure why it was crashing... It had something to do with calling FreeLibrary from within the CloseDll function... It didn't seem to like it, seeing the LoadLibrary was called from DllMain... I'm not sure why this is... Maybe someone can look into it?

Anyway, I moved the FreeDirectInput() call from CloseDll into the DllMain Unattach section, and this seemed to fix the problem. I don't think I've left any memory leaks anywhere by doing this.

I've also moved the heap destruction from CloseDll into DllMain. It wasn't causing any problems, but seeing it's created in DllMain, I thought it'd be better to move it there. This also means that the heap is not destroyed until the DLL is actualy told to unload by Windows. Just a little safer, I think...

I've uplaoded the new version. It it SO CLOSE to being a release version now. Just the beta-testing and possibly an (optional) change in my RapidFire code... :)


EDIT2: Attachments removed due to a potentialy serious bug.
 
Last edited:
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
Oh. I've ALWAYS had crashes with N-Rage. In PJ64, using the old plugin, not the crash-fixed one, if you hit F12 to end emualtion and go back to the roms list, it crashes. I don't know if it's just me, but it's done this on 4 diferent computers I've tried. An AMD Athlon 600, AMD Athlon XP 2000, Cyrix Instead 300 MHz and an Intel something-or-other..

Check my previous post for the "crash-fixed" plugin. (Doomulation posted while I was editing the post... ;) )

EDIT: Ok, this is doing my head in. It's stinking hot, I'm tired, and I just found out it still crashes in PJ64... I got it to crash in the test app, but I fixed that, but it's still crashing in PJ64... I don't know what's going on...

EDIT2: I don't think this is a bug I'll be able to fix... I don't know what the heck is causing it. The plugin functions properly, untill that FreeLibrary call. The function goes properly after that call, it returns correctly, I've even gone so far as to check the actual assembely to make sure VC is handling the stack correctly, which it is... It's just, after the routine that calls FreeLibrary exits, passing control back to the emulator, all hell breaks loose, and execution ends up in some obscure part of memory, executing garbage. Or more presicely, nulls.

I'm going to sleep on this, then review the MSDN to see if there's something I'm missing.
 
Last edited:

Doomulation

?????????????????????????
You do know you can hook up pj64 for debugging right? Just specify pj instead of your test app. If it doesn't crash in your test app, then it's peobably pj that crashes it.
I've hit f12 many times and none with crashes.
 
OP
MadManMarkAu

MadManMarkAu

Transfer Pak Expert
I know. I'm doing that already. Thanks anyway :)

Ok, doom, can you give me your system specs? Like, what video plugin, audio plugin, RSP plugin, CPU type+speed, chipset and RAM type? It most definately crashes all the time with me, just after it releases the plugin library, if I remember right...

I realise many people have moved away from this thread during my recent absence, but, if anyone else has this crash problem, please temm me the same specs I asked from Doomulation, thanks :)
 
Status
Not open for further replies.

Top