[SUPPORT/REQUEST] Single-ROM Snes9x Mac [HELP NEEDED]

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

[SUPPORT/REQUEST] Single-ROM Snes9x Mac [HELP NEEDED]

Post by gygabyte666 »

Hello all!

Sorry if this is posted in the wrong place but I wasn't really sure where to put it. None of the categories really jumped out at me. Hopefully it's not much trouble to be moved if needed.

I haven't posted much on here but I do want to express my extreme thanks to those who have helped to make this project (and it's many incarnations) become as amazing and successful as they have evolved to over the years! You people have solved some of the most boring days and helped to relive many, many great and memorial days of my past. Thanks! Please continue t do so for many more successful years. :)

NOTE: I am extremely tired and probably made a ton of typos. If so, i'm sorry.


Now then, let's get to the real point of this thread. I have actually already semi-brought this up once before. However, it was a long time ago and I only talked to zones through PMs, asking for advise on how I could modify Snes9x's source so I could do it myself. Let's just say that it hasn't been going very well.

I need help guys. I feel like such a total a** (for lack of a better word) for even asking this because I know how much work is put into coding/development and even how much work is sometimes put into small modifications but I honestly don't know where else to turn. I have next to no programming/coding experience and have been actively trying my best to learn how to learn C/C++. It's been an ongoing struggle for me for roughly the past 2-4 years now. I don't know if it's the books i've been reading, or maybe the crappy YouTube videos i've been watching, or hell, maybe it's me, over thinking it all but I cannot figure out the logic behind these languages. This is yet another reason why I have such high respect for those who do understand it.

I am requesting this. I would like a modification done to the current build of the Mac source of Snes9x that will allow a single-ROM loading mechanism. I request this because although it can be done to any port of the emulator, I think the current Mac operating system would be absolutely perfect for it. The self-contained structure of the apps on the OS is just perfectly suited for something like this and I have been dying to make it myself for roughly 2-3 years now. I've honestly put it off requesting it like this for the reasons i've already stated. I feel both embarrassed that I couldn't figure it out for myself yet and ashamed because I realize how difficult some of this stuff is and I didn't want to be 'one of those guys', on a forum requesting something that could be really difficult to do.

I don't want anyone to look at me like i'm joking or i'm just a complete moron who clearly doesn't realize the work involved. I do understand and I am looking to learn this. I would love to look at the source of 9x as it currently is and compare it to someone's completed source of this mod just for the learning of it. Of course though, ultimately I would love to play many of my favorite games and essentially turn them into 'ready-made ports' through this mod. As I said though, I really don't know how much help I could be knowing no programming, but I would still like to say that if someone does take this on, I would love to try to help in some way.

If anyone is willing to take the time to help me out here by modifying the source so it does this. As I said, if I can help in anyway I would love to and you would just be a God to me because of it. I just don't want people who might be interested in such a modification (like myself) to have missed out on it because I couldn't make it myself. Like I said, I don't know how much work it would be or if I should even attempt a post of this up but I did it and while I still feel like a jerk for doing so I don't regret it. I need help and that's the bottom line. I clearly have already shown myself that I can't do it alone and I assume that who better to ask than the community that helped build it.

It doesn't have to be anything special but I would like it to be as self-contained as possible. Anyone familiar with the Mac port/OS should understand what I mean. I just would like it be as 'ready-made' as possible. Keeping all the options and stuff would be fine but I figure it would be best if it had no options/startup stuff of any kind. Also, it should have no closing options. It should act and feel as much like a 'port' of a game as possible. Basic rundown would be:

You open/run the game name (which would really be 9x.app)
It shows little to nothing until the ROM loads up
The game runs as normal (or as how ever the user sets it up to)
Using the CMD+Q is the only way to quit the game. Like any app/game.


That's it! Doesn't have to be too much different than 9x already is and to me it is simple enough. I just don't know how difficult that is t do to the source. It was a nightmare when I tried it though. Everything would be self-contained though. So it was portable mostly. It keeps your game ROM inside the normal 9x app (probably named ROM or something). It would retain all game saves, settings, etc inside the the modified 9x app too. So there is little to no user interaction minus the keyboard/gamepad for playing. I hope that sounds clear enough. If it's not though I will do my best to clear it up with anyone who may ask.

Thank you to anyone who was able to put up with reading my obnoxious post here. I didn't intend on it being so large but I wanted to try to make it absolutely clear that I don't consider this a light matter and I wanted to try to make it clear on what I was requesting to be done. Still, thank you again for your patience, for your time and for reading this post. If anyone is willing/able to try to tackle this challenge I would be more than grateful. You would be a God to me. As I said, if needed I will do whatever I can to help. I am hopeful that one day this modification will occur. I haven't been obsessing over it for no reason. The entire concept to me just sounds so cool. I hope that someone here can help me make it into a little more than just a blueprint in my head and a little more real. Thank you again for your time. I hope someone can help me. :?
Last edited by gygabyte666 on Wed Aug 17, 2011 6:17 pm, edited 2 times in total.
::.gygabyte666.::
User avatar
zones
Official Mac OSX Porter/Dev
Posts: 908
Joined: Sat May 15, 2004 11:58 pm
Location: Japan

Post by zones »

Make two open menus disable.
Ignore kAEOpenApplication, kAEReopenApplication and kAEOpenDocuments apple events.
Modify S9xGetFilename() so that it always points in 9x.app.
Just after Initialize() set "running" to TRUE and call SNES9X_OpenCart() with your ROM's FSRef in 9x.app.
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

Hello again zones.

I know you are really trying to help and VERY MUCH appreciate it but I honestly just don't understand any of that. I really NEVER have done any real programming. I'm ok at modifying code but not things I don't understand and sadly C is one of those things. Thank you but i'm sorry I just really don't get it. :(

UPDATE: I will take another look at the source tomorrow and see if I can find what you are talking about in it. I have low expectations but I will attempt it again and I'll let you know if I think I have it. As I said though, my outlook on this isn't very positive. I would feel bad not even trying it so i will do so. I'm thinking maybe some code snippet examples would really help. I just need better visual aid of what needs changing. Thanks again. :)
Last edited by gygabyte666 on Mon Aug 15, 2011 9:00 am, edited 1 time in total.
::.gygabyte666.::
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

Yeah I tried searching in the source with XCode but as I said, I just don't know what i'm doing. Couldn't ever find anything like what you were talking about. :(
::.gygabyte666.::
adventure_of_link
Hero of Hyrule | Official Port Recruiter
Posts: 2588
Joined: Mon May 24, 2004 5:06 pm
Location: 255.255.255.255

Post by adventure_of_link »

moved to tech support...
Image

Unofficial Test Monkey For:
* Snes9X GX (Wii)
* Snes9X EX (Android)
* Snes9X 64-bits (PC/Mac)

ZSNES|Ben Heck|NSRT|Bob Smiley
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

adventure_of_link wrote:moved to tech support...
Yeah...sorry about that. I assumed it was probably in the wrong place like I said, but I wasn't sure. Thanks for fixing it. :)
::.gygabyte666.::
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

Arrrrg! I can't figure this out. :evil: I've been screwing around with XCode and the source for 9x for like 4 hours with nothing to show for it except for a few compile errors.

zones, I almost hate you because you make it all seem so easy. I even tried Googling most of the stuff in your post without any help. I was really hoping the interwebs would have some information to teach me about what it was you were trying to explain to me. :( :( :(

UPDATE: Just thought of something. I would probably need to be able to have the preferences file for 9x be edited too. Otherwise, every single separate 'game' would all be reading/writing to and from the same pref file and I imagine that would probably cause a ton of potential issues. Just figured i'd jot that down real fast.

UPDATE #2: Ok, well i'm having a little success. At least I think I am. I found all three kAEOpenApplication, kAEReopenApplication and kAEOpenDocuments and deleted them from the apple event file. Now I just need to try to figure out what the rest of this means and/or where they are at in here...
Make two open menus disable.
Modify S9xGetFilename() so that it always points in 9x.app.
Just after Initialize() set "running" to TRUE and call SNES9X_OpenCart() with your ROM's FSRef in 9x.app.


UPDATE #3: Alright, well I think I found all the references you mentioned zones. Here's the issue. As I said, I have no idea WTH i'm doing in XCode so I just don't know what to add in or modify. That's honestly why I need code snippets. I really want this to work and be done but at this point i'm lost. I'm not even sure I did the kAEOpenApplication/etc parts right as I simply deleted them. There are simply too many references to some of these in all the source files. I don't know which ones to modify and which to leave alone. PLEASE HELP!!! I really can't figure this out on my own!
::.gygabyte666.::
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

So I don't really know what to update this thread with because since my last post I have been at a stand-still. I need help and that's the ultimate bottom line.

I realize people are busy and can't help all the time but a little support from time to time would be nice. I am very eager to try new things and learn new things but I simply don't know what else to do with what I have. I have been trying to adapt to the information that zones has provided me with and have had no real luck.

If ANYONE has ANY information to try to help me out please post it up. Everything and anything I can get is greatly appreciated as I just don't know what else to do. I hope someone shows a little pity for someone in my situation soon because I REALLY want to get this working but am completely in the dark about how to do it. Again, any help is appreciated. Thanks!
::.gygabyte666.::
User avatar
Camo_Yoshi
Snes9x Purple belt
Posts: 922
Joined: Thu Nov 08, 2007 7:59 pm

Post by Camo_Yoshi »

I'm sorry, but I can't help you as I know no programming whatsoever, nor do I even have a computer with Mac OSX (nor would I ever want to get one, but that's another story).

Good luck with this project. That's all I can really do to help. :/
Snes9x FAQs | Forum Rules
What operating system are you using? 32 or 64bit? Version of Snes9x? Is the text at the bottom of the window white when you load the game?
These suggestions are usually the solution to your issue!
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

Thanks. Thanks for the support. Every little bit helps. I know you mean well :wink:

I have the same hopes for this project. It would be amazing if it ever sees the light of day but that'll never happen unless i'm able to find some folks willing to try to help me.

I know you probably don't know this but the Mac community is just now getting its first tastes of serious gaming on the platform. It's had a lot of it in the past, and like many old Windows games, they weren't very well maintained over the years and many gems sadly just died out and are no longer playable because of poor support/updating on the devs side. Using this method to mod 9x (and maybe more later on) it's a decent step to 'port' some older games for the OS without all the extra pain and trouble usually associated with re-porting a game/application. The Mac platform is perfect for this because of how it handles applications. Each application is self-contained, similar to a zip archive. So modding 9x to do this would simply fit with this OS. The same can't really be said for Windows or Linux. Sure, the mod would be functional on those OSs too but it just wouldn't be logical for how their OSs function.

I'm not really a programmer yet either but i'm willing to learn and trying stuff out on my own. Problem is, as you can tell no one is willing to teach and finding resources for something like this seems impossible. This forum is the first and last ditch effort to make this happen. Unless someone more suited for this than myself steps forward, I fear this project will die off...for the second time. :(
::.gygabyte666.::
User avatar
zones
Official Mac OSX Porter/Dev
Posts: 908
Joined: Sat May 15, 2004 11:58 pm
Location: Japan

Post by zones »

Please learn the basics of the architecture of Mac OS X applications and how to use Xcode before customizing snes9x.
Note that the most parts of snes9x for mac are still "modern" Carbon-based, although some parts are written in Cocoa. I'll rewrite them when I get time.
odditude
Snes9x Green Belt
Posts: 445
Joined: Tue May 03, 2011 2:35 pm

Post by odditude »

i would recommend googling "xcode tutorial" and starting from there.
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

This has already been done. I've Googled so man Xcode tutorials over the years it's made my head hurt. All the tutorials are useless 'hello world' examples. Every moron could write one of those. They don't help in trying to actually learn the languages.

I don't get it. What is so special about Cocoa over Carbon? Also, why is it so difficult to find good resources for learning these languages? Every time I've tried asking for help on how to assist in learning these languages or minimal source modding, I get told the same thing...Learn the languages. How am I supposed to do that when no one can seem to point me in a good direction on HOW to do it? Dont say the Apple ones either. They are horrible. The tutorials suck. The books suck. Everything I have tried has sucked. Clearly you guys have better friends/resources than I do. Ones that actually teach you something rather than waste your time. I need better examples to compare and base off of. I never learned by reading, but by seeing. YouTube sucks too. Their tutorials seem made by children. Thanks for trying to help though I guess.
::.gygabyte666.::
odditude
Snes9x Green Belt
Posts: 445
Joined: Tue May 03, 2011 2:35 pm

Post by odditude »

if you can't learn from the available tutorials and can't find any books suitable for you, i recommend checking out the programming courses at your local colleges - you might find something good there.
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

Good idea but sadly I've done that too. I have tons of experience webpage coding and flash/director programming but for some reason, finding resources for this is just next to impossible. Besides all the courses offered around here are crap. Mainly for C or Windows languages. C would be useful I guess but I've always preferred trying to find dedicated Mac/Unix language courses but none are offered around me. Once more, thanks for the suggestions.
::.gygabyte666.::
SparroHawc
Official Android Porter
Posts: 303
Joined: Mon Feb 07, 2011 9:20 pm
Location: All up in your business

Post by SparroHawc »

Unless I'm mistaken, Cocoa is accessed with Objective C, which is a superset of C and C++. That means if you want to code for OSX, you'll need to learn C anyways.

It's a harsh language for beginners, but it gives you a solid understanding of how a lot of the underpinnings of programs work. I'd say you should start there.

When you start learning C, it's going to be nothing but command-line programs. Fortunately, that works on OSX just as well as it does Windows and Linux (though admittedly Linux is easier to start programming with; it comes with a compiler most of the time). Once you feel comfortable with the basics, you can pick up xcode, look at how the 'hello world' example is framed in comparison to how a standard C program is written, and eventually start making calls to the Cocoa framework from inside your new C programs to make use of all that shiny GUI stuff.

But first, you gotta slog through the basics - and that means learning C.

--edit--

I remember going through learning C myself, years ago - I wouldn't mind giving some pointers to help you get through whatever blocks you're having. If you want to, we can start a thread over in one of the off-topic areas and you can ask me questions about things you're having trouble with.

--editedit--

For that matter, I could probably make some of the changes to the code myself. Do you have a development environment already set up where you can compile SNES9x? That'll be the first step.
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

I believe that you are correct. Unfortunately, that is the problem. I did find it to be extremely overwhelming. As mentioned, I read like two books on it. Well, read one, didn't finish the second. They were both the same though. Neither really taught anything (although they were suppose to) they were really more like reference manuals. So they were no help at all. Next I tried several varied sourced tutorials (ebooks, youtube, etc.) and all of them proved to be just as useless and un-new user-friendly.

I think the biggest turn-off to all of them was that they always start out with nothing but a 'hello-world' example. Even if I were planning to design applications, they just don't provide enough instruction for creating your own code to actually be able to make anything with what they provide using 'hello-world' as the example. I have no real plans on creating my own applications, at least not until I have a firm grasp of the language but rather for now, modifying source code from other projects, like 9x sounds like a decent start to me. Sadly, like you mentioned it proved to be too confusing and overwhelming to do alone.

I would love any pointers I could get and honestly thats what i've been interested in trying to obtain from other knowledgable users for a VERY long time now. So that is very welcome and very appreciated.

For the second edit you made, That would be effin GREAT! :D
I have everything setup correctly I think. I have the source, I slightly modified it already (stupid GUI changes mostly) and I am able to compile it and have actually been playing a few games using the newly compiled app. So I can confirm that the compiling is successful. I'm using the standard Xcode 3.2.5. Please let me know what else I can do. I'd love some help, no matter what it's for (programming or this little project). Thanks for the reply!!! :)
::.gygabyte666.::
SparroHawc
Official Android Porter
Posts: 303
Joined: Mon Feb 07, 2011 9:20 pm
Location: All up in your business

Post by SparroHawc »

gygabyte666 wrote:I think the biggest turn-off to all of them was that they always start out with nothing but a 'hello-world' example.
I think you're missing the purpose of 'hello world' tutorials. They aren't meant to teach you how to program - they're meant to ensure that you have the development environment set up correctly, and to show you how to compile and run a program.

They're also something of a tradition - the first program you write in -any- programming language should be one that does nothing more than output 'hello world!' simply because That's How It's Done.

As for the SNES9x modifications, I don't have a Mac myself, so I can't compile OSX binaries. I'm going to be dependent on you to make the changes and compile them, et cetera. My free time is also somewhat limited, so I can't guarantee that it'll happen quickly (I still want to put together a DirectInput hack for the Windows SNES9x) but I'll be around the forums at least for you to kick my ass and tell me to get to work. ;]
User avatar
gygabyte666
Snes9x White Belt
Posts: 13
Joined: Thu Apr 16, 2009 10:23 am

Post by gygabyte666 »

I suppose that makes sense. Thanks for that it does help to put it into perspective now. Never really looked at it like that.

Not having a Mac is understandable and shouldnt be an issue. Luckily, you can still examine the macos source of 9x yourself at anything even without a Mac. The only downside is you can't use the fantastic Xcode enviroment. As I said, I'm pretty sure it's all setup correctly. I'm not a stranger to the environment and I'm pretty comfortable using it. So I look at that as one positive in my situation of negatives.

I admit I really like this idea. I just wish I could be more helpful. I honestly don't know what to even start out with editing. If you're able to tell what what files to edit, what to edit them with and where in a file these changes need to be made I think this will be rather painless. I'm curious now, why do you need to hack the Windows version for? Once again, I have to remind you of how appreciative I am for the possible help on this. It's been almost like a dream of mine for several years now and I think it would be great it we could figure it out! Oh and btw, I wouldn't mind kickin your ass to get working but I don't know you well enough to feel comfortable with such an insult and also, you're doing me a HUGE favor and I'd feel like an ass trying to rush you. Thanks for the thought though and feel free to kick mine if needed at any point. ;p
::.gygabyte666.::
SparroHawc
Official Android Porter
Posts: 303
Joined: Mon Feb 07, 2011 9:20 pm
Location: All up in your business

Post by SparroHawc »

By the way - if you are looking for a better book to give you the basics of C/C++, this is the book I used when I started out, all there in HTML for your perusal:

http://newdata.box.sk/bx/c/

I actually started with the C version of that book instead of C++, but it's pretty much the same structure and it's paced decently. Since Objective C is a superset of C++, everything there should work with Xcode with a minimum of fuss.

And if you do decide to go that route and get stuck on anything, feel free to ask me questions. I can't guarantee that I'll answer them quickly - I do go on vacations from time to time - but I do check every new post on the forum here, eventually.

As for why I want to add DirectInput to SNES9x - there are a few people who've had trouble getting their controllers to work with SNES9x. It's possible adding DirectInput will fix that, and I've used it before so it shouldn't be all that difficult for me to cobble it in. Of course, I've been saying that for the past month and haven't gotten around to it yet, so we'll see. :P

Don't worry too much about insulting me - I'm pretty thick-skinned. Just PM me a friendly reminder that I said I'd work on your project every week or so until I get my tailfeathers in gear. :]
Post Reply