xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Openxdk Patches
friedgold
post Jul 8 2006, 11:22 AM
Post #1


X-S Expert
***

Group: Moderator
Posts: 667
Joined: 28-December 04
From: Bristol, England
Member No.: 181403
Xbox Version: v1.1
360 version: none



Posting here because this seems to be the best place to get the attention of OpenXDK devs. Also other developers using OpenXDK may find this helpful. Anyway would you consider the following patches for OpenXDK. All are made with diff -u against cvs HEAD.

Improved sdlvideo driver - Still uses direct to framebuffer writes but tries to avoid any necessary conversions between different colour formats. Blitting to the screen is about 3 or 4 times quicker than before for me.
sdl_mixer patch - SDL_mixer doesn't build correctly in CVS causing the OpenXDK build to fail. Patching SDL_mixer to remove a single #include solves this.
Remove bool typedef - xboxkrnl/type.h typedefs int as bool. This isn't needed anywhere else (OpenXDK builds fine without this) and it causes errors when compiling c++ programs with OpenXDK (redeclaration of built in type).
time() and gettimeofday() syscalls

Thanks
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
friedgold
post Jul 9 2006, 12:15 AM
Post #2


X-S Expert
***

Group: Moderator
Posts: 667
Joined: 28-December 04
From: Bristol, England
Member No.: 181403
Xbox Version: v1.1
360 version: none



Also

HalReadSMCTrayState kernel export
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
mokda
post Jul 10 2006, 12:11 AM
Post #3


X-S Young Member
*

Group: Members
Posts: 31
Joined: 5-September 05
Member No.: 244754



Thanks Friedgold.

The type redef fix solved one of my compiling problems.

I'm still getting linker issues that look like this:

C:\Dev-Cpp\XboxProj\main.o(.text+0x46) In function `XBoxStartup':
[Linker error] undefined reference to `XSleep'
[Linker error] undefined reference to `XReboot'

C:\cygwin\usr\local\openxdk\i386-pc-xbox\lib\libc.a(syscalls.o)(.text+0x19d) In function `execve':
[Linker error] undefined reference to `XLaunchXBE'

And so on like that...most of the linker problems are complaining about libc.a.

Do you know how to fix this (what am I missing)? My code is same as ColdReader's short tutorial:

extern "C"{
#include <hal/xbox.h>
#include <openxdk/debug.h>
#include <xboxkrnl/xboxkrnl.h>
}

extern "C" void XBoxStartup(){
{
debugPrint("hi there\n");
debugPrint("string=%s\n", "string");
debugPrint("number=%d\n", 123);
XSleep(10000);
XReboot();
}
}

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
d0wnlab
post Jul 10 2006, 12:53 AM
Post #4


X-S Expert
***

Group: Moderator
Posts: 557
Joined: 22-November 03
Member No.: 76129
Xbox Version: unk



mokda: can you post your makefile? That will be where linker problems will be solved.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
mokda
post Jul 10 2006, 01:14 AM
Post #5


X-S Young Member
*

Group: Members
Posts: 31
Joined: 5-September 05
Member No.: 244754



I probably should have mentioned I am trying to use BSC++ (Dev C++). Here is the makefile that Dev C++ is spitting out for me:

# Project: Saja
# Makefile created by Dev-C++ 4.9.9.2

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -L"C:/cygwin/usr/local/openxdk/lib" -L"C:/cygwin/usr/local/openxdk/i386-pc-xbox/lib" -nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -lstdc++ -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl -mwindows
INCS = -I"C:/Dev-Cpp/include" -I"C:/cygwin/usr/local/openxdk/include" -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include" -I"C:/cygwin/usr/local/openxdk/include/SDL"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/cygwin/usr/local/openxdk/include" -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include" -I"C:/cygwin/usr/local/openxdk/include/SDL"
BIN = Saja.exe
CXXFLAGS = $(CXXINCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
CFLAGS = $(INCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before Saja.exe all-after


clean: clean-custom
${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Saja.exe" $(LIBS)

main.o: main.cpp
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
d0wnlab
post Jul 10 2006, 01:42 AM
Post #6


X-S Expert
***

Group: Moderator
Posts: 557
Joined: 22-November 03
Member No.: 76129
Xbox Version: unk



get that '-L"C:/Dev-Cpp/lib" ' out of there, first of all, then see what happens. There's no libraries in that directory that you want to link to, and right now it's probably using them instead of the openxdk libs. Since you're using a generated makefile I suppose you'll have to edit that in the build settings somewhere - someone familiar with dev-cpp should have a better idea than myself.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
mokda
post Jul 10 2006, 02:31 AM
Post #7


X-S Young Member
*

Group: Members
Posts: 31
Joined: 5-September 05
Member No.: 244754



d0wnlab, muchos gracias!

I removed C:\Dev-cpp\lib from my libraries in the Tools->Compiler Options section (libraries tab) and it did the trick!

I'll follow up this point of help on the forum thread that is specifically for this issue.

Thanks again!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
elupus
post Jul 17 2006, 01:05 PM
Post #8


X-S X-perience
**

Group: Members
Posts: 480
Joined: 5-January 04
Member No.: 89110



Okey, i small request from xbmc devs for the openxdk devs out there. remove the automatic video init on startup, that should be up to starting application. causes double video init in our xbe shortcut.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 25th May 2013 - 07:48 AM