What's new

NRage Input Plugin V2.00 BETA (an overhaul)

squall_leonhart

The Great Gunblade Wielder
Poobah said:
If RTC is real-time clock, then the Pokemon games would all use it. (I think.)

nup, only gold silver and crystal use RTC
;) you can check yourself by viewing the rom info in Visual boy advance

also, afai' seen all the carts except for Pokeyellow are mbc3

Bravo! Pokeyellow now working :)
 
Last edited by a moderator:
OP
R

rabiddeity

Plugin Hacker
squall_leonhart said:
um.. actually, afaik thats a limitation in the API.

Well, ManyMouse is designed to overcome those limitations. But there are a couple major problems with it. From the README (emphasis mine):

On Windows, ManyMouse requires Windows XP or later to function, since it relies on APIs that are new to XP...it uses LoadLibrary() on User32.dll and GetProcAddress() to get all the Windows entry points it uses, so on pre-XP systems, it will run, but fail to find any mice in ManyMouse_Init(). ... Please note that using DirectInput at the same time as ManyMouse can cause problems; ManyMouse does not use DirectInput, due to DI8's limitations, but its parallel use seems to prevent ManyMouse from getting mouse input anyhow.

While the requirement for WinXP is not an impossible issue, it would require me to add in checks in several places and execute different code depending on what version of Windows is detected. Ugly. As for the second part, I can't avoid using DirectInput. I use it to read from the keyboard and from the gamepads, and to drive the force feedback motors.

Might have to drop the multi-mice thing. It sounded like a good idea on paper, but the implementation is gonna be just too damn hard.

OK, I think TPak emulation is almost done. I'll give you guys a week to find any bugs while I finish optimizations on address checks, and add in that extra MBC1 mode. Can one of you check something: while I was looking for documentation, I stumbled across someone complaining that trying to import pokemon games without a full team of 6 (I think?) would cause things to screw up. It's the edge cases like these that are most important to test right now.

Sorry for the delay. I had to tweak the dialogs to make sure everything fit. As it turns out, "Aenderungen uebernehmen" takes up a lot more space than "Apply changes". heh.

You should grab the latest version of the plugin before you try out the language plugins. I fixed quite a few little bugs with language detection.

Download one or both of these files, and place them in the same directory as your emulator exe. So if you're using Project64, put it in the same directory as Project64.exe if that makes sense. Open the config dialog, select your language, and then click "Save".

German
Simplified Chinese (Harlay: I have it listed as Chinese (PRC). Is this right?? Also I used the system font... I'll post in a bit with the other font if you want to see it.)

Thanks to aTomIC (en24) and Harlay for their great work! If you guys see anything you want changed, let me know.
 
Last edited by a moderator:

squall_leonhart

The Great Gunblade Wielder
i dont think mbc1 is even required,.. none of the pokemon games use it.
mbc3
red
bkue
gold
silver
crystal

mbc5 yellow

...errr unless your trying to load japanese pokemon red or green... thats mbc1 or 2.. but i don't think its compatible with stadium...
 
OP
R

rabiddeity

Plugin Hacker
squall_leonhart said:
i dont think mbc1 is even required,.. none of the pokemon games use it.
mbc3
red
bkue
gold
silver
crystal

mbc5 yellow

...errr unless your trying to load japanese pokemon red or green... thats mbc1 or 2.. but i don't think its compatible with stadium...

It never worked before, but that doesn't mean it won't work if we fix it.

I'll take a look.
 

Harlay

New member
rabiddeity said:
Sorry for the delay. I had to tweak the dialogs to make sure everything fit. As it turns out, "Aenderungen uebernehmen" takes up a lot more space than "Apply changes". heh.

You should grab the latest version of the plugin before you try out the language plugins. I fixed quite a few little bugs with language detection.

Download one or both of these files, and place them in the same directory as your emulator exe. So if you're using Project64, put it in the same directory as Project64.exe if that makes sense. Open the config dialog, select your language, and then click "Save".

German
Simplified Chinese (Harlay: I have it listed as Chinese (PRC). Is this right?? Also I used the system font... I'll post in a bit with the other font if you want to see it.)

Thanks to aTomIC (en24) and Harlay for their great work! If you guys see anything you want changed, let me know.
Great job! Chinese (PRC) is right and what's the "system font"? the font looks great. see the screenshot.
in the screenshot, the button is a litter low and the string is too long. About the string, I can cut the space in the string. or you can just adjust the string's long and position.
Why don't you place the language file in the plugins folder?
 
Last edited:

en24

Emunews 24
rabiddeity said:
Sorry for the delay. I had to tweak the dialogs to make sure everything fit. As it turns out, "Aenderungen uebernehmen" takes up a lot more space than "Apply changes". heh.
Super, it works well. Your plugin set automatically the language on german. Some words really long, i'll make it shorter and send the new file to you... :sorcerer:
 
OP
R

rabiddeity

Plugin Hacker
Cool. Don't make any mods to it until I send you the revised .rc files (the rc files have all the information for size and position of buttons and text).

Harlay said:
Great job! Chinese (PRC) is right and what's the "system font"? the font looks great. see the screenshot.
in the screenshot, the button is a litter low and the string is too long. About the string, I can cut the space in the string. or you can just adjust the string's long and position.
Why don't you place the language file in the plugins folder?

I'll see if I can make the space longer to fit on the first one, and I'll make the button taller for the other. If it doesn't work out, I'll tab it to look right. edit: FIXED. Download the latest version of the Chinese plugin.

I don't want to put things into the Plugins folder, because I don't know if all emulators put their plugins in a folder called "Plugins". I thought I could do it easily, but if I check in the Plugins folder as well as the emulator folder, I have to check for duplicates. So to keep it simple I'm just going to scan the same directory as the emulator.

OK, a few things. First, I've gone through and confirmed that Worms - Armageddon (U) (M3) [!] is NOT getting rumble commands from Project64, or controllerpak commands of any kind. In other words, IF it's supposed to rumble, then it's not the fault of the plugin but a bug in the emulator. If it doesn't work in either 1964 or Project64, then hey, I'm still in the clear.

I've posted updated versions of all the plugin files, plus we have a new translation up from NaSeR:

Spanish!

I'm updating the front page to add the extra files that have accumulated.
 
Last edited by a moderator:

Legend

New member
rabiddeity said:
OK, a few things. First, I've gone through and confirmed that Worms - Armageddon (U) (M3) [!] is NOT getting rumble commands from Project64, or controllerpak commands of any kind. In other words, IF it's supposed to rumble, then it's not the fault of the plugin but a bug in the emulator. If it doesn't work in either 1964 or Project64, then hey, I'm still in the clear.

It doesn't rumble in Mupen or 1964 or PJ64. Which means the emulators aren't doing their job I guess, all 3!!! That sucks. Should I bother to report that? I was hoping it would be something quick and easy, but, oh well. Thanks for trying. :sombrero:
 

squall_leonhart

The Great Gunblade Wielder
btw, rapiddiety, i can confirm that Pokemon Red and Green 1.0 (original japanese release builds) are MBC1

Pokemon Red 1.1 (updated with changes from pokemon blue 1.0, North American release)

i found some info on it... err i'l find the link

here http://en.wikipedia.org/wiki/Pok%C3%A9mon

This first generation started with Pokémon Red and Blue. The first generation introduced the original 151 Pokémon (Bulbasaur to Mew), as well as the basic concepts of trading and battling Pokémon. In Japan, the first generation included Pokémon Red, Green, and later Blue (with changes to the artwork and dungeon layout), while other regions started with Red and Blue (both featuring the updated elements), but never got a Green.
 

Poobah

New member
Here's a list of errors and/or warnings produced when trying to build the latest sources with GCC. Most of them are trivial:
Code:
:: === NRage, Release|Win32 ===
:: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
:: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
DirectInput.cpp:246: warning: statement has no effect
DirectInput.cpp:252: warning: statement has no effect
DirectInput.cpp:505: warning: comparison is always false due to limited range of data type
DirectInput.cpp:630: error: name lookup of `i' changed for new ISO `for' scoping
DirectInput.cpp:624: error:   using obsolete binding at `i'
DirectInput.cpp:775: warning: left-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:827: warning: statement has no effect
DirectInput.cpp:841: warning: statement has no effect
DirectInput.cpp:845: warning: statement has no effect
DirectInput.cpp:1052: warning: left-hand operand of comma has no effect
DirectInput.cpp:1052: warning: right-hand operand of comma has no effect
DirectInput.cpp:1060: warning: left-hand operand of comma has no effect
DirectInput.cpp:1060: warning: right-hand operand of comma has no effect
DirectInput.cpp:1065: warning: left-hand operand of comma has no effect
DirectInput.cpp:1065: warning: right-hand operand of comma has no effect
FileAccess.cpp:451: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:466: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:474: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:482: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:490: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:747: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:794: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:803: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:807: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:811: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:832: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'

According to this page, wchar.h and wctype.h have "library issues". If this is what's causing the errors, then I guess you might aswell not worry about it.

Might I ask how you learnt all this complicated Unicode stuff? I would like to learn it myself.
 
Last edited:

Legend

New member
NO Rumble!!!

Rumble appears to be broken for me.

1. Looks like Direct Rumble has a dot: and whenever I check constant or ramp, that selection is gone next time I open the settings.

2. When I test Rumble on controller 1 or 2 (when either 1 or 2 controllers are plugged in) PJ64 crashes every time.

3.No rumble at all in games for either controller.

I hope that this is an easy, quick fix. :unsure:


*EDIT* To get around this, for the force-feedback device I selected NONE then back to my controller; and it went from Direct to allowing me to select Ramp again. All better!!! I wonder how Direct got locked on???
 
Last edited:

Poobah

New member
squall_leonhart said:
its not that hard, alot of websites are written in unicode to allow for the users to view it in different languages :p
I know, but writing Unicode websites is completely different to Unicode programming, since the browsers do it all. Could you give me a brief summary? Perhaps a couple of test programs you've written that use Unicode?
 

squall_leonhart

The Great Gunblade Wielder
Poobah said:
I know, but writing Unicode websites is completely different to Unicode programming, since the browsers do it all. Could you give me a brief summary? Perhaps a couple of test programs you've written that use Unicode?

well actually its not all that different

PHP is basically uncompiled C++, as i was told by the creator of MyBB, and i've made a few templates using php code, its not all that different from normal code, you just need to make sure your using a unicode format when encoding, so that special characters and stuff show up properly.

im not really a programmer, but still... the same guidelines apply i guess
 
OP
R

rabiddeity

Plugin Hacker
Poobah said:
Might I ask how you learnt all this complicated Unicode stuff? I would like to learn it myself.

Same as anyone else, I just dove into it headfirst. I can get you started, if you want.

First thing to know is that Unicode programming is different in POSIX and in Windows. Windows switched to internal 16-bit Unicode representation back with NT. POSIX decided that compatibility was more important, and switched to UTF-8 internally. It's complicated, but what it boils down to is that characters in Windows internally take up 2 bytes each, and characters in POSIX can take 1, 2, or 3 bytes each, depending on encodings. POSIX UTF-8 is ASCII backwards compatible, so you can still use char * for strings. The Windows representation is NOT backwards compatible, so you have to specify when you compile your program whether you want to use Unicode or MBCS (Multibyte Character Set, MS's internal representation prior to using Unicode). You also have to remember that a character is not necessarily one byte.

Since the size of a character can change between compile versions, instead of using char or wchar_t (the two-byte representation), use TCHAR. When you set a flag in the compiler, it defines _UNICODE and TCHAR gets replaced with wchar_t.

What this means in practice is that you can't tell the length in characters of a string by doing strlen(szFoo). Windows gets around it by having a compile-time macro for most of the string functions, like strchr, strcpy, etc. In this case, you'd use _tcslen(szFoo) (and make szFoo of type TCHAR * not char *). Also, instead of using string literals like "Hello World!" you have to use a macro expansion. The wchar_t representation of "Hello World!" is L"Hello World!" and the TCHAR macro is _T("Hello World!") .

Interestingly, if you compile with Unicode support instead of MBCS support, your code will run faster under NT/2000/XP because native NT kernel has to translate most strings to Unicode. The ASCII versions of functions like RegQueryValueEx are simply wrappers for the Unicode versions. For apps that use a lot of text the speed boost is noticeable.

Anyway, if you're really serious about it, read a couple articles about it. Here's a good place to start:
http://www.jorendorff.com/articles/unicode/windows.html
http://www.i18nguy.com/unicode/c-unicode.html

Legend said:
It doesn't rumble in Mupen or 1964 or PJ64. Which means the emulators aren't doing their job I guess, all 3!!! That sucks. Should I bother to report that? I was hoping it would be something quick and easy, but, oh well. Thanks for trying. :sombrero:

If you're absolutely sure the original cart rumbles, go ahead and report it. Tell them places it should rumble, preferably easy to test (i.e. it should rumble when I get hit by my own bazooka shot). Make sure you tell them which version (US or European; one has 3 languages and the other has 6). Most likely it's using some undocumented (read screwed up) way of accessing the PIF ram.

Poobah said:
Here's a list of errors and/or warnings produced when trying to build the latest sources with GCC. Most of them are trivial:
Code:
:: === NRage, Release|Win32 ===
:: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
:: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
DirectInput.cpp:246: warning: statement has no effect
DirectInput.cpp:252: warning: statement has no effect
DirectInput.cpp:505: warning: comparison is always false due to limited range of data type
DirectInput.cpp:630: error: name lookup of `i' changed for new ISO `for' scoping
DirectInput.cpp:624: error:   using obsolete binding at `i'
DirectInput.cpp:775: warning: left-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:775: warning: right-hand operand of comma has no effect
DirectInput.cpp:827: warning: statement has no effect
DirectInput.cpp:841: warning: statement has no effect
DirectInput.cpp:845: warning: statement has no effect
DirectInput.cpp:1052: warning: left-hand operand of comma has no effect
DirectInput.cpp:1052: warning: right-hand operand of comma has no effect
DirectInput.cpp:1060: warning: left-hand operand of comma has no effect
DirectInput.cpp:1060: warning: right-hand operand of comma has no effect
DirectInput.cpp:1065: warning: left-hand operand of comma has no effect
DirectInput.cpp:1065: warning: right-hand operand of comma has no effect
FileAccess.cpp:451: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:466: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:474: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:482: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:490: error: cannot convert `TCHAR*' to `wchar_t*' for argument `1' to `size_t mbstowcs(wchar_t*, const char*, size_t)'
FileAccess.cpp:747: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:794: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:803: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:807: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:811: error: cannot convert `const TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'
FileAccess.cpp:832: error: cannot convert `TCHAR*' to `const wchar_t*' for argument `2' to `size_t wcstombs(char*, const wchar_t*, size_t)'

According to this page, wchar.h and wctype.h have "library issues". If this is what's causing the errors, then I guess you might aswell not worry about it.

When you compile, define UNICODE and _UNICODE via switches. TCHAR should be defined as wchar_t by one or more of the header files. The code itself is c even though it has cpp extension; force compile as C and see if that works.

If you get it to compile and run, please send me the MAKEFILE and I'll include it in the source. It's OK if it has lots of warnings with /Wall, as long as it compiles.

OK, sorry about the post mania, guys. I was out for the weekend.

Language DLL files all updated. You guys all got the links to the .rc files, right? Those are in sync with the version I have.

I'm going to ask you to translate two more things:
1. the text "Show Messages" used on a checkbox; it will toggle whether or not the Shortcut popup window messages appear or not (for example, when you hit Tab it says "Mouse Locked"). I made it a toggle option because it screws up the Glide64 plugin if a window appears over the rendered display.
2. Please check the message for IDS_DLG_TPAK_READONLY. Original: "SRAM opened with read-only access.\nAfter exiting the game, the SRAM will NOT be saved." This message didn't appear before. I copied and changed the text from IDS_DLG_MEM_READONLY so it should be pretty close.

If you're editing and compiling yourself, you will need the new resource.h file from the Language SDK.

FOR THE REST OF YOU FOLKS OUT THERE...

I've put in a checkbox for turning off the message windows. Also, I ported over the mempak code to the transfer pak. So now, it will save to disk when it writes to SRAM... but beware, the RTC data doesn't update until you actually close the TPak. Could this be exploited? Yeah, probably. ALSO, I'm using mappings for the GBROM as well, which has the added benefit of only using up as much memory as the ROM file is big. Before, the plugin allocated 8MB to store the GBROM, even if you were loading up a smaller ROM. This way should be much faster, and also swap file friendly for those of you with less RAM. Assuming I didn't break it, of course. Which right now, running on little sleep, it's likely I did break something.

I'm gonna go hunt for this mystical magical Stadium game and a coupla GBROMs to make sure it works. Meanwhile, if you're feeling brave, go ahead and d/l the latest.

Harlay said:
Check the itemlist.

Thanks. Fixed.
 
Last edited by a moderator:

Top