Jump to content


Photo

Booting N64 Roms Within Xbmc


  • Please log in to reply
16 replies to this topic

#1 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 15 August 2007 - 02:54 PM

XBMC supports shortcuts, and with the "custom" tag in these we can boot ROMs directly - bypassing the menu systems in the Xport emulators that run them.

This works fine for most of the popular systems, but Surreal isn't an Xport release and hence you can't boot its ROMs in this manner. A solution is still tantalisingly close though, because the main Surreal executable is itself a front end (for 1964, Project64, and UltraHLE).

I've crafted up the beginnings of a script to allow XBMC to boot these emulators directly but while testing I ran into a bit of a roadblock. The aim is to integrate the ROMs directly into the Programs menu like a normal ROM shortcut (hence allowing users their choice of view modes etc) but I can't find a way to boot scripts there.

I've tried using shortcuts to link to them or the XBMC.RunScript command (the later being ideal, as it allows me to pass arguements), and while XBMC will list these and allow me to select them it boots the targets as XBE files (ei. Unloads itself from memory and runs them as seperate programs (ei. Doesn't work)).

Well, fair enough, they aren't exactly programs - But how can I boot custom code from the Programs menu without writing XBE files? Is there some sort of "batch file" system I'm missing here, or is it really just XBEs and scripts (with no way to merge the two views)?

#2 shorty

shorty

    X-S Expert

  • Members
  • PipPipPip
  • 581 posts
  • Location:UK

Posted 15 August 2007 - 04:00 PM

Yay!

Just a few more systems and all will have the "boot rom from XBMC" functionality, i've often wandered about surreal, it'd be great if it could work like this.

As for your question, have you seen the retro-x and emulauncher scripts?

More specificaly to your question, what you need seems to be coming soon, search XBMC forums for Python Folders.

Shorty

Also in the meantime if you wanted, couldn't you make a script that creats shortcuts in a user defined folder. The user could then just create a source in my programs to that folder.

Shorty

#3 SC10-E

SC10-E

    X-S Senior Member

  • Members
  • PipPip
  • 264 posts
  • Location:Fredericksburg, VA
  • Interests:PC Building, Xbox and wii, movies, music, other media
  • Xbox Version:v1.1
  • 360 version:v3.0 (falcon)

Posted 15 August 2007 - 04:13 PM

Thanks for trying this Bomb Bloke. I might finally be able to complete that library of mine. smile.gif

#4 shorty

shorty

    X-S Expert

  • Members
  • PipPipPip
  • 581 posts
  • Location:UK

Posted 16 August 2007 - 03:44 AM

Yah, here is a clickable to what i was goinmg on about, sounds interesting right?

Shorty

Edit, forgot link... http://www.xboxmedia...ead.php?t=27760

Edited by shorty, 16 August 2007 - 03:45 AM.


#5 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 16 August 2007 - 06:19 AM

QUOTE(shorty @ Aug 16 2007, 01:36 AM) View Post
As for your question, have you seen the retro-x and emulauncher scripts?

Yes, but I'm looking for transparent integration.

QUOTE(shorty @ Aug 16 2007, 01:36 AM) View Post
More specificaly to your question, what you need seems to be coming soon, search XBMC forums for Python Folders.

Excellent! It isn't so much aimed at launching things as it is at getting directory listings, but I see no reason why it can't be used for either. I've grabbed the PC patch so I'll mess about with it this afternoon and see what I can do with it. There's no talk that I can see about enabling this in the Programs view, but if I can make this work I doubt it'll be hard to make a convincing request.

QUOTE(shorty @ Aug 16 2007, 01:36 AM) View Post
Also in the meantime if you wanted, couldn't you make a script that creats shortcuts in a user defined folder. The user could then just create a source in my programs to that folder.

No sorry. When Surreal launches one of its emulators, it writes a couple of INI files that point to the ROM to be loaded (not by ROM name, but by index - and those change whenever you add to your collection). Hence XBMC must write the INI files every time you start a game, and the only way I can think of to do that is via scripts - unless there's a way to make a shortcut perform multiple tasks and copy/write files.

#6 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 16 August 2007 - 07:42 AM

Nah, I'm afraid that's no good. There's no way to display a list of python folders next to normal content (when XBMC is looking for python folders, it ignores all other media, and vice versa).

The only real solutions are booting scripts either directly or via shortcuts. If XBMC can't (or should I say won't) do this, then the only way I can see is via an external XBE.

#7 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 21 August 2007 - 06:31 AM

Right, so here we have a script that'll boot a given N64 ROM directly. Along with EGazzz I've worked out how it all runs.

Surreal works by unzipping a ROM to X: (I think it's always X:) and running one of it's emulators. That then runs whatever's on the swap drive.

Hence this script does more or less the same thing (skipping the unzipping step if it isn't required).

The good, the bad, and the ugly:

There are four parameters near the top of the script to set, depending on which ROM it should be loaded.

"ZipName" and "Emulator" speak for themselves.

You'll need to work out what the other two values ("RomName" and "RomCRC") should be by playing the game in the usual way (via Surreal's frontend), then reading "Temp.ini" from the Surreal folder.

The script needs to go in the same directory as Surreal (you can boot it via the File Manager), and the ROMs need to be stored in "<SurrealPath>\Roms".

The ROMs must be in N64 format (little endian). As a quick explanation, all those different extensions you see on your games (Z64, V64, etc) mean they're in different formats: Different emulators load (and/or in rare cases such as Surreal, run) certain formats faster, and some older ones only run certain formats.

Surreal converts ROMs to N64 when you load them (if it has to), but this script can't do that. A converter such as Tool64 can convert your files in bulk permanently.

Furthermore, you need to be using the latest version of Surreal (currently XXX beta 4.95).

That's about it for now: A working script. More or less useless until I work out how to run it from the Programs menu.

Edited by Bomb Bloke, 21 August 2007 - 06:45 AM.


#8 Nick8888

Nick8888

    X-S Enthusiast

  • Members
  • 26 posts

Posted 21 August 2007 - 11:37 AM

Nice! Although it looks like a lot of setting up im glad you have found a solution to this!

#9 blittan

blittan

    X-S X-perience

  • Members
  • PipPip
  • 373 posts
  • Location:Sweden
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 21 August 2007 - 06:50 PM

Bomb Bloke: great findings, looked into it some myself, but not that hands on with C so i gave up. You know the sourcecode for Surreal XXX 4,95 is available for download?



http://surreal64.sourceforge.net/



#10 mtsaint

mtsaint

    X-S Senior Member

  • Members
  • PipPip
  • 205 posts

Posted 22 August 2007 - 01:51 AM

thanks you get an A+ for effort ill try this out later i am very surprised

#11 shorty

shorty

    X-S Expert

  • Members
  • PipPipPip
  • 581 posts
  • Location:UK

Posted 22 August 2007 - 03:42 AM

All hail Bomb Bloke! pop.gif

I know you say it's not much use yet (i have not had a look yet, no time untill the weekend) but it sounds like you've opened a door to something very promising.

Shorty

#12 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 22 August 2007 - 03:53 AM

@blittan: No, I did not know that. It may come in handy later. smile.gif

Ok, so I've had a report of Surreal caching to Z: instead of X:, so there's the first bug to fix.

#13 SC10-E

SC10-E

    X-S Senior Member

  • Members
  • PipPip
  • 264 posts
  • Location:Fredericksburg, VA
  • Interests:PC Building, Xbox and wii, movies, music, other media
  • Xbox Version:v1.1
  • 360 version:v3.0 (falcon)

Posted 22 August 2007 - 04:30 PM

I hope someone makes a version of surreal with custom launch parameters so all this stuff doesn't have to be done then since the source code is out.

#14 Bomb Bloke

Bomb Bloke

    X-S Transcendental

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 6,568 posts
  • Gender:Male
  • Location:Tasmania (AU)
  • Xbox Version:v1.0
  • 360 version:none

Posted 27 August 2007 - 04:03 AM

Heh, call me blind, but I don't see any source at that link...

#15 Nick8888

Nick8888

    X-S Enthusiast

  • Members
  • 26 posts

Posted 27 August 2007 - 06:04 AM

http://sourceforge.n...ects/surreal64/

Not sure if this helps. The other link just went to a coming soon page didnt it?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users