xboxscene.org forums

Author Topic: Development Framework  (Read 314 times)

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« on: January 08, 2010, 06:25:00 PM »

Hey.

          I was wondering if anything like this exists for Xbox? There is a download of source code on SourceForge for a PS2 Emulator Port Framework,

http://sourceforge.n...jects/ps2frame/

Also, I had a question to any programmers out there. Why is it that people say it is simple to port a SDL app to Xbox? could you give me any examples/links to examples of why that is??

I am very new to this whole topic so any help/pointers would be great!

Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #1 on: January 09, 2010, 02:19:00 PM »

QUOTE(obcd @ Jan 9 2010, 09:36 PM) View Post

SDL is a library. There are SDL versions for windows, for linux, for Mac and also for the xbox. (You even have an sdl library for the nintendo ds)

SDL aranges everything that is graphics, sound and keyboard gamepad.

So, if a game calls a sdl function to clear the video screen, it can call that same function on a different platform. SDL takes care of the hardware differences between the platforms.

Altough in theory this is perfect, there still are differences between different sdl versions for different platforms. For instance, on a pc you will probably use the keyboard for your controls, while on a game console you will prefer a gamepad.

The major functions are identical on different platforms. That's what makes it easy to port from one platform to another.

For instance, xport ported the dosbox emulator to the xbox. (A sdl based emulator) As the sdl graphics performance was bad on the xbox, he changed it to improve things.

regards.


So in theory. If you take the code of an SDL app, game, exc. and compile it into a XBE it will run on a Xbox? granted you have to change the controller/keyboard situation.
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #2 on: January 10, 2010, 04:13:00 PM »

QUOTE(obcd @ Jan 10 2010, 07:54 PM) View Post

In theory yes.
I remember I tried it once for the dosbox emulator before xport released his sources.
It worked but I was dissapointed of it's performance.
Only later I learned that xport had changed the graphic functions so that they bypassed the sdl library.

regards.



so pretty much to port to Xbox you not only have to understand the code but you have to also learn to write around problems you may or may not face in the process.... Do you think a lot of custom code is needed in most cases to get something to work with no flaws?
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #3 on: January 11, 2010, 03:33:00 AM »

QUOTE(obcd @ Jan 11 2010, 11:14 AM) View Post

This is difficult to answer and depends upon the original code.
If the original coder didn't use much os specific code, it shouldn't be that hard.

The important thing is to get things running first. After that, you can start optimising.
If you do both at the same time, you will run into problems.

regards.



Do you know of any tutorials on the actual process of using the XDK?? all the documentation is on a website that requires a password...

I want to mess around with this stuff but I really don't know the process of where to start.
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #4 on: January 12, 2010, 01:10:00 AM »

QUOTE(obcd @ Jan 12 2010, 08:12 AM) View Post

The xdk comes with a number of sample programs. Analysing those is a good way to start.
It also comes with a pretty large documentation system.
Sometimes the microsoft MSDN archive docomentation system can help as well.

If you consider using the SDL library, you might check the html help system for that library.

I don't know how good your knowledge of C and C++ is.
If you don't have experience with those languages, you will need a good book about it as well.

regards.



I have just gotten into C++ but I have grasp several concepts, I am struggling on Boolean algebra though.. I was never good at regular algebra.... but I get the basic idea of C++ and the basic structure...

Do you know where these sample programs are located? when you said that I went looking in my XDK and I couldn't find them.... I'm starting to think I have a bad copy of the XDK because I can't find the help files either... the only thing in the "docs" folder are links to xbox.com and you need a user/password to access it.

The C++ book I have teaches you how to write several text programs. Is something like that possible to write for Xbox? Like could I write a program that just asks a question and then turns the Xbox off or something like that?
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #5 on: January 12, 2010, 02:53:00 AM »

QUOTE(obcd @ Jan 12 2010, 10:30 AM) View Post

after install, I had the C:\program files\Microsoft xbox sdk\samples folder.
I also have a doc folder containing the xboxSDK.chm.

The xbox display system is not a text based one.
So, you can't simply write text to it with a printf statement.

Also, to respond to a question, you will probably use your gamepad.
You can create the on screen overlay keyboard, but that's not something that appears automatically.

I can't remember, but I don't think the xdk has a function to turn the xbox off.
Have you ever seen a game doing it?

You really need to find the help and the samples. The samples show the minimum code that is needed to get things going.
The help gives you a detailed description of the existing functions and the parameters they are expecting.

regards.



I have not seen a game turn a system off. But XBMC can so I thought maybe that was a possibility. Is there a version of the XDK I need to look for in particular? The one I got was just called "XDK LEAKED OFFICIAL" or something like that so I'm not sure what version of it I have (If there are many versions?) Im guessing whoever put it out there took out some stuff to make the file smaller or something.

Do you know what the most minimal type of program you can create for the Xbox? like how the C++ beginners books all have you do the printf deal? If its not text based, could I use the FONT system somehow to achieve my goal?

or is all of that explained in my missing help/sample files?
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #6 on: January 13, 2010, 03:39:00 AM »

QUOTE(obcd @ Jan 13 2010, 10:05 AM) View Post

You really need the help and samples.
The xdk usually came with a number like xdk 5849 or xdk 5558
I think the last one they published was the xdk 5933.


I got the right version now, along with the samples.

Is there anything in particular you would suggest I get a grasp of, or samples in particular I should study?
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #7 on: January 14, 2010, 08:28:00 AM »

QUOTE(obcd @ Jan 14 2010, 03:45 PM) View Post

The samples usually describe one specific topic of the xbox.
You might try to compile and debug them for a start.
It would prove that you have a correct setup to start with.

regards.


Alright, I will give that a try. I don't have a debug Xbox setup, by the way.
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #8 on: January 15, 2010, 08:50:00 AM »

QUOTE(obcd @ Jan 15 2010, 12:23 PM) View Post

You might consider creating a retail / debug setup.
I recently described on this Forum how it can be done.
You can simply select debug xbox from your dashboard and the debug dash shows up.

It only takes a bit of space on your xbox harddisk. It doesn't interfer with it's normal operation.
If you start coding, you will soon discover that debug possibilities are great. It's also great that a newly created xbe is transferred to the xbox directly.

regards.


I will look into that, does it require flashing at all?

also, I just wrote my first C++ program. I would like your feedback, even though its pretty simple.

http://www.megaupload.com/?d=EW1OV2WA
http://pastebin.com/m5891b492


I can't figure out why, but if your answers are too long it messes the whole program up... any tips?
Logged

Pulsemasta

  • Archived User
  • Hero Member
  • *
  • Posts: 510
Development Framework
« Reply #9 on: January 16, 2010, 04:39:00 AM »

QUOTE(obcd @ Jan 16 2010, 09:07 AM) View Post

It would be helpfull to know what you are using to compile your program.
I would check if there is a limitation on the length of a string variable.
In standard C we wrote something like char city[100];

This means that the string should not contain more than 100 chars.
If it becomes longer, you get a buffer overflow and the char's are writen to memory locations occupied by other variables. The keyword string hides the length restriction, but it probably still exists.

Maybe if you look it up in your compiler help, you will learn what it's restrictions are and how they can be changed.

regards.


I'm using Microsoft Visual Studio . NET 2003

yeah, I figured out how to write more characters to a integer and char but I can't seem to figure out how to add to a string.
Logged