forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OtherOS demo 1.1 (with RSX visuals)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development
View previous topic :: View next topic  
Author Message
rapso



Joined: 28 Mar 2005
Posts: 147

PostPosted: Thu May 22, 2008 8:10 am    Post subject: Reply with quote

hi,

i'm trying to get 720p instead of 480i, is there any known setting for that?

i've tried
Code:

static const unsigned char avb_param_720p_cmd[] = {
  2, 5, /* av command version */
  0, 148, /* Length following this length field */
  4, 0, 0, 1, /* command id:  AVB_PARAM */
  0, 2, /* number of video packets */
  0, 0, /* number of audio packets */
  0, 2, /* number of av video packets */
  0, 0, /* number of av audio packets */
  /* pkt_video_mode x 2 */
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 0, /* head A */
  0, 0, 0, 0,
  0, 0, 0, 5, /* 720p */
  0, 0, 0x5, 0x00, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14,0x00, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 1, /* head B */
  0, 0, 0, 0,
  0, 0, 0, 3, /* 576I */
  0, 0, 0x5, 0x00, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14,0x00, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  /* pkt_av_video_cs x 2 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 0, /* avport HDMI 0 */
  0, 5, /* av_vid 576I */
  0, 0, /* av_cs_out RGB-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 16, /* avport AVMULTI 0 */
  0, 8, /* av_vid 720p */
  0, 0, /* av_cs_out RGB-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
};
but it keeps the ps3 just crashing :(

thx in advance.
Back to top
View user's profile Send private message
mc



Joined: 12 Jan 2005
Posts: 212
Location: Linköping

PostPosted: Sat May 24, 2008 6:21 am    Post subject: Reply with quote

If you want the second PPU hardware thread to do something, just change the loop at
"secondary_hold" in start.S to go somewhere useful. Note that you'll need to set
up MSR, SLB etc separately for the second thread.
_________________
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
Back to top
View user's profile Send private message
rapso



Joined: 28 Mar 2005
Posts: 147

PostPosted: Sat May 24, 2008 10:43 am    Post subject: Reply with quote

mc wrote:
If you want the second PPU hardware thread to do something, just change the loop at
"secondary_hold" in start.S to go somewhere useful. Note that you'll need to set
up MSR, SLB etc separately for the second thread.

oh, that's awesome, thx. I will check that.
I was also seekin through the kernel source and found some pthread stuff, which was a way to highlevell for my needs to reimplement it, ur solution is probably best :).

regarding this 720p request, i found the 1080i thread for other os, which has some 720p setup, but on my 1050p TFT it seems still to flicker like interlacing (while games dont), I wonder if that setup was correct.
but maybe someone else seeks for that as well, so
Code:

/* 720p 60 hz*/
static const unsigned char avb_param_pal_cmd2[] = {
  2, 5, /* av command version */
  0, 148, /* Length following this length field */
  4, 0, 0, 1, /* command id:  AVB_PARAM */
  0, 2, /* number of video packets */
  0, 0, /* number of audio packets */
  0, 2, /* number of av video packets */
  0, 0, /* number of av audio packets */
  /* pkt_video_mode x 2 */
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 0, /* head A */
  0, 0, 0, 0,
  0, 0, 0, 9, /* 720p */
  0, 0, 0x5, 0x0, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14, 0x0, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 1, /* head B */
  0, 0, 0, 0,
  0, 0, 0, 9, /* 720p */
  0, 0, 0x5, 0x0, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14, 0x0, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  /* pkt_av_video_cs x 2 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 0, /* avport HDMI 0 */
  0, 2, /* av_vid 720p */
  0, 1, /* av_cs_out YUV444-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 16, /* avport AVMULTI 0 */
  0, 2, /* av_vid 720p */
  0, 1, /* av_cs_out YUV444-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
};


next stuff i was lookin in is
Code:

LV1_CALL(enable_logical_spu,               2, 0, 207 )

comparing to libspu from sourceforge, it seems they're not 1to1 mapped, as creating a context with libspu calls some hv-function that expects a way more parameters. i wonder what parameters this function needs or where some source for reference is.


(thx once again mc)
Back to top
View user's profile Send private message
rapso



Joined: 28 Mar 2005
Posts: 147

PostPosted: Mon May 26, 2008 10:04 am    Post subject: Reply with quote

i got some time to test the threading, it was quite easy to setup, not sure if it's 100% correct tho. but maybe someone needs some performance?

the whole modified start.S:
Code:

#define LOAD_REG_IMMEDIATE(reg,expr)      \
   lis     reg,(expr)@highest;      \
   ori     reg,reg,(expr)@higher;      \
   rldicr  reg,reg,32,31;         \
   oris    reg,reg,(expr)@h;      \
   ori     reg,reg,(expr)@l;

#define STACK_FRAME_OVERHEAD 112 /* minimum ppc64 stack frame */

/* MSR bits */
#define MSR_SF    (1<<63)        /* Enable 64 bit mode */
#define MSR_ISF    (1<<61)        /* Interrupt 64b mode valid on 630 */
#define MSR_HV     (1<<60)        /* Hypervisor state */
#define MSR_VEC    (1<<25)   /* Enable AltiVec */
#define MSR_POW    (1<<18)   /* Enable Power Management */
#define MSR_WE    (1<<18)   /* Wait State Enable */
#define MSR_TGPR (1<<17)   /* TLB Update registers in use */
#define MSR_CE    (1<<17)   /* Critical Interrupt Enable */
#define MSR_ILE    (1<<16)   /* Interrupt Little Endian */
#define MSR_EE    (1<<15)   /* External Interrupt Enable */
#define MSR_PR    (1<<14)   /* Problem State / Privilege Level */
#define MSR_FP    (1<<13)   /* Floating Point enable */
#define MSR_ME    (1<<12)   /* Machine Check Enable */
#define MSR_FE0    (1<<11)   /* Floating Exception mode 0 */
#define MSR_SE    (1<<10)   /* Single Step */
#define MSR_BE    (1<<9)      /* Branch Trace */
#define MSR_DE    (1<<9)    /* Debug Exception Enable */
#define MSR_FE1    (1<<8)      /* Floating Exception mode 1 */
#define MSR_IP    (1<<6)      /* Exception prefix 0x000/0xFFF */
#define MSR_IR    (1<<5)    /* Instruction Relocate */
#define MSR_DR    (1<<4)    /* Data Relocate */
#define MSR_PE    (1<<3)      /* Protection Enable */
#define MSR_PX    (1<<2)      /* Protection Exclusive Mode */
#define MSR_PMM    (1<<2)      /* Performance monitor */
#define MSR_RI    (1<<1)      /* Recoverable Exception */
#define MSR_LE    (1<<0)    /* Little Endian */

/* SPRs */
#define SRR0    0x01A   /* Save/Restore Register 0 */
#define SRR1    0x01B   /* Save/Restore Register 1 */
#define CTRLF    0x088
#define SPRG0    0x110
#define SPRG1    0x111
#define SPRG2    0x112
#define SPRG3    0x113
   
      
   .global _start, ._mmu_off, __mmu_off

   
   /* This is the entry point of the main PPE thread
      when we're started from kboot.

      r3 contains a pointer to the "device tree"
      r4 contains the address to which the program was loaded
         (When started from kboot, the program isn't loaded to
          address 0, but to an arbitrary address.  The first
          256 bytes are copied to 0, but the rest needs to be
          moved by the program itself)
      r5 contains 0
   */
_start:   
   b relocate_and_start_master
   trap




   /* This is the entry point of the PPE slaves (of which
      there is exactly one in the case of the PS3) when
      we're started from kboot.

      r3 holds the number of the CPU (= 1)   */
   
   . = 0x60





   /* This is the entry point of both the main and slave
      PPE threads when we're started from GameOS.

      r3 appears to hold the CPU number, but we'll check nevertheless */

   . = 0x100

   mfspr   r3, CTRLF
   cntlzw.   r3, r3   /* r3 is now CPU number  0=master, 1=slave */
   bne   start_slave

   b start_master


   /* Exception and interrupt vectors */

   . = 0x200 /* Machine check */
   mtspr   SPRG1, r3
   li r3,0x200
   b general_exception

   . = 0x300 /* DSI */
   mtspr   SPRG1, r3
   li r3,0x300
   b general_exception

   . = 0x380 /* Data segment */
   mtspr   SPRG1, r3
   li r3,0x380
   b general_exception

   . = 0x400 /* ISI */
   mtspr   SPRG1, r3
   li r3,0x400
   b general_exception

   . = 0x480 /* Instruction segment */
   mtspr   SPRG1, r3
   li r3,0x480
   b general_exception

   . = 0x500 /* External interrupt */
   mtspr   SPRG1, r3
   li r3,0x500
   b general_exception

   . = 0x600 /* Alignment */
   mtspr   SPRG1, r3
   li r3,0x600
   b general_exception

   . = 0x700 /* Program */
   mtspr   SPRG1, r3
   li r3,0x700
   b general_exception

   . = 0x800 /* Floating point unavailable */
   mtspr   SPRG1, r3
   li r3,0x800
   b general_exception

   . = 0x900 /* Decrementer */
   mtspr   SPRG1, r3
   li r3,0x900
   b general_exception

   . = 0xa00 /* Reserved 1 */
   mtspr   SPRG1, r3
   li r3,0xa00
   b general_exception

   . = 0xb00 /* Reserved 2 */
   mtspr   SPRG1, r3
   li r3,0xb00
   b general_exception

   . = 0xc00 /* System call */
   mtspr   SPRG1, r3
   li r3,0xc00
   b general_exception

   . = 0xd00 /* Trace */
   mtspr   SPRG1, r3
   li r3,0xd00
   b general_exception

   . = 0xf00 /* Performance monitor */
   mtspr   SPRG1, r3
   li r3,0xf00
   b general_exception


general_exception:
   /* This handler does not return, so trashing registers is ok */
   mfspr r4, SRR0
   mfspr r5, SRR1
   LOAD_REG_IMMEDIATE(r1,__stack_end)
   li   r0,0
   stdu   r0,-STACK_FRAME_OVERHEAD(r1)
   LOAD_REG_IMMEDIATE(r2,__toc_start)
   addi   r2,r2,0x4000
   addi   r2,r2,0x4000
   bl   .__mmu_on
   bl   .exception_handler
1:   b 1b


relocate_and_start_master:
   /* This is the code which moves us to address 0 if
      we're started from kboot */
   /* This code needs to be position independent */   

   bl   .__mmu_off  /* just in case */

   li   r3,0  /* Target address */
   /* The source address is already in r4 */

   li      r5,copy_to_here@l       /* # bytes of memory to copy */
   li   r6,0x100      /* Start offset, the first 0x100 */
               /* bytes were copied earlier.    */

   bl   .copy_and_flush      /* copy the first n bytes    */
               /* this includes the code being    */
               /* executed here.       */

   ba 4f            /* Jump to the copy of this code */
4:               /* that we just made/relocated    */

   LOAD_REG_IMMEDIATE(r5,_edata)
   bl   .copy_and_flush      /* copy the rest */

   b  start_master


.__mmu_off:
   mfmsr   r3
   andi.   r0,r3,MSR_IR|MSR_DR
   beqlr
   mflr   r4
   andc   r3,r3,r0
   mtspr   SRR0,r4
   mtspr   SRR1,r3
   sync
   rfid
   b   .   /* prevent speculative execution */


.copy_and_flush:
   addi   r5,r5,-8
   addi   r6,r6,-8
4:   li   r0,16         /* Use the least common      */
               /* denominator cache line   */
               /* size.  This results in   */
               /* extra cache line flushes   */
               /* but operation is correct.   */

   mtctr   r0         /* put # words/line in ctr   */
3:   addi   r6,r6,8         /* copy a cache line      */
   ldx   r0,r6,r4
   stdx   r0,r6,r3
   bdnz   3b
   dcbst   r6,r3         /* write it to memory      */
   sync
   icbi   r6,r3         /* flush the icache line   */
   cmpld   0,r6,r5
   blt   4b
   sync
   addi   r5,r5,8
   addi   r6,r6,8
   blr

   .align 8
copy_to_here:

start_slave:
   /* NOP out the kboot entry vector */
   li   r3,_start@l
   lis   r0,0x60000000@h   /* nop */
   stw   r0,0(r3)
   dcbst   0,r3
   sync
   icbi   0,r3
   isync
      
   /* Clear out the BSS */
   LOAD_REG_IMMEDIATE(r11,__bss_stop)
   LOAD_REG_IMMEDIATE(r8,__bss_start)
   sub   r11,r11,r8      /* bss size         */
   addi   r11,r11,7      /* round up to an even double word */
   rldicl. r11,r11,61,3      /* shift right by 3      */
   beq   4f
   addi   r8,r8,-8
   li   r0,0
   mtctr   r11         /* zero this many doublewords   */
3:   stdu   r0,8(r8)
   bdnz   3b
4:

   /* Setup stack */
   LOAD_REG_IMMEDIATE(r1,__stack_slave_end)
   li   r0,0
   stdu   r0,-STACK_FRAME_OVERHEAD(r1)

   /* Setup TOC */
   LOAD_REG_IMMEDIATE(r2,__toc_start)
   addi   r2,r2,0x4000
   addi   r2,r2,0x4000

   /* Create and activate address space */
   ;bl   .mmu_init
   ;bl   .__mmu_on

   /* And we're off... */
   bl   .main2

1:
   b 1b

   
start_master:
   /* NOP out the kboot entry vector */
   li   r3,_start@l
   lis   r0,0x60000000@h   /* nop */
   stw   r0,0(r3)
   dcbst   0,r3
   sync
   icbi   0,r3
   isync
      
   /* Clear out the BSS */
   LOAD_REG_IMMEDIATE(r11,__bss_stop)
   LOAD_REG_IMMEDIATE(r8,__bss_start)
   sub   r11,r11,r8      /* bss size         */
   addi   r11,r11,7      /* round up to an even double word */
   rldicl. r11,r11,61,3      /* shift right by 3      */
   beq   4f
   addi   r8,r8,-8
   li   r0,0
   mtctr   r11         /* zero this many doublewords   */
3:   stdu   r0,8(r8)
   bdnz   3b
4:

   /* Setup stack */
   LOAD_REG_IMMEDIATE(r1,__stack_end)
   li   r0,0
   stdu   r0,-STACK_FRAME_OVERHEAD(r1)

   /* Setup TOC */
   LOAD_REG_IMMEDIATE(r2,__toc_start)
   addi   r2,r2,0x4000
   addi   r2,r2,0x4000

   /* Create and activate address space */
   bl   .mmu_init
   bl   .__mmu_on

   /* And we're off... */
   bl   .main

1:
   b 1b


.__mmu_on:
   LOAD_REG_IMMEDIATE(r0, MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF | MSR_SF)
   mtspr   SRR1,r0
   mflr   r0
   mtspr   SRR0,r0
   sync
   rfid
   b   .   /* prevent speculative execution */


   .section ".opd","aw"

__mmu_off:
   .llong .__mmu_off
   .llong .TOC.@tocbase
   .llong 0


   .section ".bss"

   .align 3

__stack:
   .space 65536
__stack_end:

__stack_slave:
   .space 65536
__stack_slave_end:


add this above main() in demo.c
Code:


void main2()
{
   unsigned int a;
   while(1)
   {
      for(a=0;a<sizeof(scrolltext)-1;a++)
      {
         if(scrolltext[a]>='a' && scrolltext[a]<='z')
            scrolltext[a]+='A'-'a';
      }
      sleep(1);
      for(a=0;a<sizeof(scrolltext)-1;a++)
      {
         if(scrolltext[a]>='A' && scrolltext[a]<='Z')
            scrolltext[a]+='a'-'A';
      }
      sleep(1);
   }
}

and remove the const from 'scrolltext'.
Back to top
View user's profile Send private message
mc



Joined: 12 Jan 2005
Posts: 212
Location: Linköping

PostPosted: Wed May 28, 2008 8:22 pm    Post subject: Reply with quote

Here you haven't set up the SLB or enabled the MMU for the second
thread. This means you will not be able to access DDR ram, and
probably not all of the XDR ram either.

Also, clearing the BSS from both threads is probably not a good idea.
What you should do is leave global setup like clearing the BSS and
setting up the PTEGs to the main thread, and create a synchronization
point so that the secondary thread doesn't enter main2() until the main
thread has entered main(). Just make the secondary thread check a
global variable and wait for main() to change it.
_________________
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Oct 03, 2008 8:28 am    Post subject: Reply with quote

Well, it's been a while since anyone posted here, but I wanted to ask a question related to 2.10+... if you look at the demo source, you find

Code:
#define GPU_CMD_BUF_SIZE         (1024 * 1024)


The issue is that a post by Geert Uytterhoeven to the linux kernel archive tells us that starting with 2.10, the GPU command buffer must be at least 2 MB. I've successfully run this demo in 2.1, but I wonder if someone who couldn't run it in 2.10+ might try bumping the command buffer to 2 MB and try it again. I'd do it myself, but I'm scared to update past 2.1 until something is found about 3D in 2.10+. :)
Back to top
View user's profile Send private message AIM Address
carlosn



Joined: 10 Mar 2005
Posts: 38
Location: Orlando, Florida, US

PostPosted: Tue Oct 07, 2008 11:16 am    Post subject: Reply with quote

I changed the line of code to
#define GPU_CMD_BUF_SIZE (2 * 1024 * 1024)
and run the demo, but all I get is a blank screen.

I am running firmware 2.42

Demo 1.0 works without a glitch.
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Oct 07, 2008 1:44 pm    Post subject: Reply with quote

Well, that's good to know. I didn't think it was something so easy. :) Especially after finally making it through all 16 pages of the thread on the RSX fifo pushbuffer. That took a while to go through.
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Sat Oct 11, 2008 11:35 pm    Post subject: Reply with quote

I have system software version 2.43 on a european CECHC04 model ps3.

version 1.0 of the demo works fine but version 1.1 gives just a black screen and does not exit after a minute like the 1.0 version.
Back to top
View user's profile Send private message
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Sun Oct 12, 2008 1:40 am    Post subject: Reply with quote

Sony has closed RSX access in fw 2.10, remain UNDER that fw version if you dream about programming RSX yourself (if you have luck there should still be some ps3's with fw 2.01 out of the box on shelves in europe for example the 40Gb+uncharted drake fortune+prostreet bundle)

At 2.10 or above, you should just use your ps3 for online stuff and stay up to date with fw. RSX or hacks won't be for you. Also downgrading won't be possible (there is just a trick to go down from under 2.17 but that's all. At 2.17 and above it's completely out of question, at least for now, and it may be very well hardware enforced).


Last edited by ps2devman on Fri Oct 17, 2008 4:31 am; edited 2 times in total
Back to top
View user's profile Send private message
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Sun Oct 12, 2008 2:15 am    Post subject: Reply with quote

Too bad. If anyone still has the <2.10 fw version pup files there aint no trick to fool the ps3 into installing those?
Back to top
View user's profile Send private message
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Sun Oct 12, 2008 5:26 pm    Post subject: Reply with quote

To have the 2.01 pup files may help those between 2.10 and under 2.17 but requires soldering skills to damage a specific area of fw to force it accept the pup files and actually downgrade.

At 2.17 and above pup files won't help you. Hardware KNOWS what you will attempt to do and SONY disagrees with it! Only things that may happen now will happen UNDER 2.10.

Anyway, if PS4 spawns in 2011, you will get another chance. Don't upgrade its fw this time... and be very very patient as always...
Back to top
View user's profile Send private message
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Sun Oct 12, 2008 9:13 pm    Post subject: Reply with quote

What do I need to compile the 1.0 source?

I took openSUSE 10.2, installed everyting gcc from yast. installed the libgmp3-dev and another libxxx-dev,

Installed:
autoconf, automake, bison, flex, gcc, make, ncurses, patch, subversion, terminfo, wget


Executed and added to startup script:
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin

after that I ran ./toolchain.sh for the ps3 toolchain and it failed on:
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [standards.info] Error 1
make[3]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu/etc'
make[2]: *** [info] Error 1
make[2]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu/etc'
make[1]: *** [all-etc] Error 2
make[1]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu'
make: *** [all] Error 2
../scripts/003-newlib-1.15.0-ppu.sh: Failed.


Running make demo.bin gives this error:

linux-ksrq:/usr/otheros_demo_1.0/source # make demo.elf
gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -c -o start.o start.S
gcc: unrecognized option '-G0'
cc1: error: unrecognized command line option "-mregnames"
cc1: error: unrecognized command line option "-mfull-toc"
start.S:0: sorry, unimplemented: 64-bit mode not compiled in
make: *** [start.o] Error 1

What am I doing wrong, what do I need to do to fix this?

- Jaap
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Oct 13, 2008 5:25 am    Post subject: Reply with quote

Both the PPU and SPU fail on the makeinfo - you can get around that by altering the newlib makefile during the error and then continuing. Look at what I did in the toolchain thread, specifically this

http://forums.ps2dev.org/viewtopic.php?p=73988#73988
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Mon Oct 13, 2008 9:13 am    Post subject: Reply with quote

Thanks, I am trying that right now. Too bad the buildscript takes so long to build.
Back to top
View user's profile Send private message
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Mon Oct 13, 2008 9:58 am    Post subject: Reply with quote

And I got a new error:

--01:49:38-- ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz
=> `newlib-1.15.0.tar.gz'
Resolving sources.redhat.com... 209.132.176.174
Connecting to sources.redhat.com|209.132.176.174|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/newlib ... done.
==> SIZE newlib-1.15.0.tar.gz ... done.
==> PASV ... done. ==> REST 10943595 ... done.
==> RETR newlib-1.15.0.tar.gz ...
No such file `newlib-1.15.0.tar.gz'.

../scripts/003-newlib-1.15.0-ppu.sh: Failed.


But the file is definitly there in the build folder with all the other .tar.gz files.

What is wrong this time?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Oct 13, 2008 10:57 am    Post subject: Reply with quote

Is the file complete? Maybe it's not, and maybe redhat just happened to be down then.
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Mon Oct 13, 2008 5:04 pm    Post subject: Reply with quote

I can check if I can open the file in ARK. Or is there something else I could do?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Oct 13, 2008 6:26 pm    Post subject: Reply with quote

The MD5SUM should be 4020004b1b7a56ca4cf7f6d35b40a4cb.

Remember that after editing the makefile for newlib, you don't rerun the script, you cd into the buildppu/buildspu directory and make/make install newlib directly. Then you run the remaining steps in the toolchain skipping the steps already done.

If you can't get it to work, I could put an arc of my toolchain on RabidSwear... it 82MB 7zipped. You'd have to chown it to use it, but if there's no other choice, it's better than nothing. :)

I do know that my toolchain compiles demo 1.1 fine. I'm starting to work on some basic libs for doing stuff in OTHEROS mode.


Last edited by J.F. on Mon Oct 13, 2008 8:52 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Mon Oct 13, 2008 8:44 pm    Post subject: Reply with quote

Thanks, I'll try to get it working by myself first.
Back to top
View user's profile Send private message
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Tue Oct 14, 2008 4:37 am    Post subject: Reply with quote

Great a new batch of errors:

checking for a BSD-compatible install... /usr/bin/install -c
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
make[2]: Entering directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
for f in standards.info configure.info; do \
if test -f ../../etc/`echo $f | sed -e 's/.info$/.texi/'`; then \
if make "MAKEINFO=/root/ps3toolchain/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000" $f; then \
true; \
else \
exit 1; \
fi; \
fi; \
done
make[3]: Entering directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
/root/ps3toolchain/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000 --no-split -I../../etc -o standards.info ../../etc/standards.texi
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [standards.info] Error 1
make[3]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
make[2]: *** [info] Error 1
make[2]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
make[1]: *** [all-etc] Error 2
make[1]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu'
make: *** [all] Error 2
linux-ksrq:~/ps3toolchain #


Could you please send me your toolchain? I don't think I'll get this one working within the next weeks.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Oct 14, 2008 7:55 am    Post subject: Reply with quote

You can get the archive here:
http://rapidshare.com/files/153732494/ps3dev.7z.html

That's the full ps3dev directory. You'll need to chown it once you've unarc'd it.

Code:
sudo chown -R user:group /usr/local/ps3dev


where user:group is usually just your username. For me this would be

Code:
sudo chown -R jlfenton:jlfenton /usr/local/ps3dev


Naturally, if you put the directory somewhere else, be sure to use the proper path. I've run my toolchains for the user directory before. That works fine. Just change your envvars for the path.
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Tue Oct 21, 2008 5:09 am    Post subject: Reply with quote

Thanks, I finally got it compiling and running.

But I have a new question, what do I need to do to beable to get the square root of a number?

Can I include a file or do I have to write my own function?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Oct 21, 2008 6:48 am    Post subject: Reply with quote

Libm should be working with the toolchain just fine. If you look at the demo, libm is used. I don't think you can use libc, or at least, not all of it as it's not patched for the PS3. So functions like open/close/read/write DEFINITELY won't work, but things like strlen might.
Back to top
View user's profile Send private message AIM Address
Jaapio



Joined: 31 Jul 2007
Posts: 12

PostPosted: Tue Oct 21, 2008 8:07 am    Post subject: Reply with quote

Nevermind... I forgot to enable floatingpoint..... X_x
Back to top
View user's profile Send private message
wiigamecube



Joined: 08 Oct 2009
Posts: 5

PostPosted: Thu Oct 08, 2009 9:10 am    Post subject: Reply with quote

i thanks for this demo

i have black screen in my PAL 80 Gb Frimware 3.0 do you have an idee ?
Back to top
View user's profile Send private message Visit poster's website
Ameen



Joined: 14 Jun 2009
Posts: 12
Location: Bahrain

PostPosted: Thu Oct 08, 2009 10:57 am    Post subject: Reply with quote

wiigamecube wrote:
i thanks for this demo

i have black screen in my PAL 80 Gb Frimware 3.0 do you have an idee ?


That demo was released long time ago, and I believe that Sony had blocked it long ago too.
Back to top
View user's profile Send private message Visit poster's website
wiigamecube



Joined: 08 Oct 2009
Posts: 5

PostPosted: Fri Oct 09, 2009 6:49 am    Post subject: Reply with quote

hi the versions 1.0 works for me and 1.1 versions don't work thanks ameen for your reponse
Back to top
View user's profile Send private message Visit poster's website
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Fri Oct 09, 2009 5:34 pm    Post subject: Reply with quote

If I remember well 1.1 is only for ps3's with fw<=2.01
(takes advantage of acceleration by harnessing RSX)
Back to top
View user's profile Send private message
wiigamecube



Joined: 08 Oct 2009
Posts: 5

PostPosted: Tue Oct 13, 2009 5:15 am    Post subject: Reply with quote

ok thanks see you for a futur demo ^^
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development All times are GMT + 10 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group