My emu ^^

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Since the emulator's job is to emulate hardware -- then yeah, it only makes sense to support mappers which actually existed in a hard copy form. Emu authors shouldn't have to keep up with every half baked mapper invention some hacker comes up with.

But this is all moot -- since there is a completely legit, working FF2 translation available which uses MMC1. There's no reason for the stupid UNROM hack -- there's no reason to figure out a way to make it work -- just use the ROM that works and to hell with the one that doesn't.


edit -- sorry if I sound short or bitter or mean. I don't mean to sound like I'm mad or anything ^^. It's just I really don't agree with illegitimate hacks, and I feel that tweaking emus to support them is not only troublesome, but completely counter-productive in every imaginable way. Hackers should just do things right, rather than do things however they feel like and expect emu authors to bend all the rules for them.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

Putting this hack into UNIF format would be really stupid, just change it to SNROM, and replace the bit $xxxx for sta $xxxx like it would be in the original game and it's done. Another way to do it would be to emulate the real MMC1 insted if the SRAM bit of any mapper 2 rom is set, and any bit >$8000 would write to the mapper as if it was an sta, in order to get proper emulation. So, for example, Hanjuku Hero (J) [hM02] would swap mirroring as well than the real Hanjuku Here (J), etc.... But the best way would be to clean all thoose roms from all the databases.
[hMxx] does definitely mean Hacked Mapper xx, I also tried The Goonies (J) [hM03] and it works fine, and it also avoid bus conflicts (I think the original Konami mapper also has bus conflicts). This game does just uses a mapper to swap 2 8kb banks, and I don't know much the difference between this Konami mapper and the CNROM mapper (anyone has more info ?).
Some other, like Fire Emblem (J) [hM04] is a hack of Fire Emblem to run on a MMC3. Scince the game uses MMC4 latches when a text-box is open, there is not enough CHR tiles on the MMC3 to display it, so the hack allows it to render all the background glitchy, but the text is readable. This is pretty glitchy, but the game is still "playable" (it's the only way to run Fire Emblem, under Nesticle, for example). This could have been needed in the early emulation ages, but now the majority of emus have MMC4 support so this hack is no longer needed and should be removed of the net.

By the way another question asked a while ago in another thread "is the maintainer of GoodNES actually maintaining it ?" didn't have any anwers, and I'd also like an answer to it.
Useless, lumbering half-wits don't scare us.
Zach
Posts: 10
Joined: Thu Jun 02, 2005 11:44 pm
Location: Wisconsin, USA
Contact:

Post by Zach »

Disch wrote:some PSX adaptors have weirdness with the Z-axis when you push a button. Someone on IRC was having a similar problem. I've been meaning to redo the input config anyway... maybe make it so you can have several buttons mapped to one controller button.
Well I don't want to point the finger or anything, but I should like to note that I don't tend to have this problem in other emulators for the most part. I do use a lot of different ones for a lot of systems as well. I know I've had the problem before, but I can't recall with which emulator and if I fixed it myself or not, so thats bugging me too. Looking forward to testing any config changes you make though
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

What exactly happens when you try and config the input? The person I mentioned earlier had a problem where it would set two buttons -- the first would be the button he pressed, and the second would be like up on the Z axis or something crazy, so he couldn't set every button. Is that what's happening with yours?
Zach
Posts: 10
Joined: Thu Jun 02, 2005 11:44 pm
Location: Wisconsin, USA
Contact:

Post by Zach »

Yea that sounds like whats happening to me. I've litterally tried everything I can think of. Plugging it in different ports included.. I'm not sure what the deal is. I actually have the problem in some PC games too.

I suppose it could be some kind of hardware fault, but at the same time there must be something other people are accounting for when they write their input code, because I only seem to have the problem on a few isolated games and emulators every once in a blue moon
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Odds are the adaptor is sending false signals. Try checking Start | Settings | Control Panel | Gaming Options, select your PSX pad from the list and hit properties.

A screen not unlike the following should show (yours may be different but hopefully the general idea is the same).

http://www.geocities.com/disch_/joypad.png

When you press a button on your controller, the appropriate button should light up [good], but also, the Z axis or Z rotation might change [bad] (in the case of that other guy, his Z axis would drop completely). My emu (and any other program that polls joypad button/stick state) gets both those signals, and due to the way I have the input config window working, it will just look for newly pressed buttons (or newly moved sticks). Having both these signals sent will confuse my emu -- it'll think you're just pressing up a stick and pushing a button at the same time, so it'll treat both as new button presses and assign both of them to keys.

This actually seems to be a fairly common problem with PSX adaptors. Unfortunately (or fortunatly), mine doesn't have this problem, so it's not easy for me to tinker around to get a working solution. However the problem seems to always be with the Z axis -- maybe a simple solution would just be to have an option to disable the Z axis?

--- so that's what I did:

http://www.geocities.com/disch_/SchpuneBeta2.zip

Just for fun, I included my config file (mainly to show off my preferred sound options which I feel sound very nice ^^)

Anyway lemme know if that works out a bit better for ya.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

The technique used by StepMania's input configuration screen is to prefer button presses to axis presses when configuring a given button and to wait a hundred milliseconds or so after configuring a given button. It seems to support those adapters that assign each direction on the Control Pad both to a button and to more than one axis. And yes, those adapters have a reason for this behavior, as it lets them support dance pads more consistently.
Zach
Posts: 10
Joined: Thu Jun 02, 2005 11:44 pm
Location: Wisconsin, USA
Contact:

Post by Zach »

Ok using the disable Z axis option works perfectly and gets rid of the problem for sure. One thing you might want to change is having the disable option remember itself, cause it kind of threw me off at first.

Btw.. does your PSX adapter have a brand name on it or anything I could lookup ? I got mine from liksang and its a PSX/N64 combo
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Well like I said I've been meaning to redo the whole input config anyway. It was just quick and easy to add that option -- making it remember would be a bit more work than I'm willing to do right now XD.

I don't recall the name of the adaptor I got. It's PSX only -- only one controller can be plugged in. I got it through the ZD store back when it first opened (this was quite some time ago -- it has long since closed). I have yet to see the same adaptor sold anywhere else, but I've seen several which I'd rather have. Guess I should've waited a few months before buying one =P
User avatar
Anes
Posts: 702
Joined: Tue Dec 21, 2004 8:35 pm
Location: Mendoza, Argentina

Post by Anes »

what can i say, its cool :D
ANes
User avatar
kode54
Posts: 67
Joined: Mon Jun 06, 2005 12:47 pm
Contact:

Post by kode54 »

Nice to see you back in action, Disch. :)

I also had some stupid thing to post about that adapter, but more likely, it's stupid adapter sending 0 instead of center on Z-axis when analog mode is disabled. Not much you can do other than disable the Z-axis.


"Use DSound to regulate framerate"

You read my mind. How much more accurate can you get than audio samples rendered? (Well, sure there's at least two system timer functions that you can use, but they have their own problems. QueryPerformanceCounter uses rdtsc on multi-processor systems, and in the x64 edition of Windows 2003, and that means the speed can vary even when things like PowerNow are disabled. Regardless, those referenecs can jitter or drift in relation to the sound card's own timing... Whee...)


"Run in background"

I may not explicitly have a use for it, but I have a friend who likes to run his emulators on one monitor while keeping IRC as the active window on another monitor. Yay for multitasking?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

kode54 wrote:I also had some stupid thing to post about that adapter, but more likely, it's stupid adapter sending 0 instead of center on Z-axis when analog mode is disabled. Not much you can do other than disable the Z-axis.
Handling axes that are stuck to one side is easy. In button config mode, treat only transitions from center to side as presses.
User avatar
kode54
Posts: 67
Joined: Mon Jun 06, 2005 12:47 pm
Contact:

Post by kode54 »

tepples wrote:
kode54 wrote:I also had some stupid thing to post about that adapter, but more likely, it's stupid adapter sending 0 instead of center on Z-axis when analog mode is disabled. Not much you can do other than disable the Z-axis.
Handling axes that are stuck to one side is easy. In button config mode, treat only transitions from center to side as presses.
I sort of thought of "ignore jammed axis" before I posted that, but didn't include it in the post. Your idea is more complete, and makes sense for the configuration dialog. It would also spare a config overwrite of the first option if you should happen to open the dialog with your throttle control off-center. (My gamepad has a throttle slider, which I keep centered at all times to prevent things like that from happening in input configuration dialogs which don't apply this technique.)
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Thanks for the compliments and feedback everyone ^^

I'm tempted to actively work on this again (after I finish moving) -- but man I have so many other projects I want to finish ;_;. Not enough hours in the day.
Post Reply