#PsxDev FAQ


Gentilmente preso dal sito di Napalm

What's this document? (ver 1 rev 11; Last updated: )

It was originally made by Simon Barratt ( Barog / napalm ^ nothing ^ tesko ), but as of now, I'm maintaining it (and I've written it almost completely from scratch, if I may say so myself). However, you can still harass Barog about this FAQ and the mailing list (which he moderates) at: [email protected].

Who am I? That's mr. Loop for you! (Adriaan Moors aka antiloop-, [email protected])

 

History of Playstation Development.

(by Barog)

Thanks to the Hitmen for this part, it is an altered version of their webpage.

In the middle of 1996 the Hitmen started using the Playstation. It wasn't
believed that you could upload and execute your own programs on a standard
Playstation using only a Datel Action Replay and Comms Link.

Jihad and Curlin figured out how to upload things to the Action Replay and
that they could make their own version of the ROM to execute their uploaded
code.

They then contacted Snake / McBain (Makers of EZ-O-RAY) and also Blackbag.
Ez-o-ray released a ROM which allowed people to upload and execute things
even easier. Blackbag where publishing detailed information on the internals
of the Playstation.

Once eco2exe had been produced, people could grab the yaroze compiler and
convert the yaroze executables to normal playstation executables and run them
on a plain grey playstation.

Today, there are many other groups in the scene and a lot of people (There are
over 180 people on the psxdev mailing list).
Lets not let the scene fade, get releasing people!
And remember, you can announce your releases on the mailing list!

Requirements

a pc with some M$ OS or (preferably of course) Linux (or other unix os, check out the unix psx development mailing list) or an amiga  (I don't have one, mail me if you want to write something about it, so I can include it here)
a PSX.. hmm or PSEmu Pro
an Action Replay, Game Shark, or import (although some claim they can be hard to flash)
a comms link
optionally a mod chip
(a lot of) coding experience (in c and preferably also in asm)
a brain (or compatible device)!
curiosity, persistence and patience!



A quick introduction to the PSX

The CPU for this console is a modified r3000 (see www.sgi.com and www.idt.com for more details) which runs at 33Mhz, it has a stripped down MMU which (among other things) means that the memory addresses are hard wired: the logical addresses 0x00xxxxxx, 0xA0xxxxxx, 0x80xxxxxx all point to the same physical memory (the difference lies in caching etc.). The RAM, which is quite slow, is 2 megs big. The ROM (512K) is located at 0xBFC00000. Have a look at the memory layout I made for the DTLH-3000.

The 2D graphics engine is called the GPU, it can do sprites, 2D polies etc. There is one meg of VRAM (which can't be accessed directly like on the pc). So a quick calc tells us that in 16-bit mode, you have a maximum 'surface' of 1024x512 (so that should be enough for storing your textures too).

For transforming your 3D points into 2D points, shading, matrix calcs + a lot more, you have the GTE at your disposition. See the hacking (Low Level) section of Napalm for a link to a site with detailed low level GTE info.

Finally, there's the SPU for sound, and of course the CD, pads, memory cards, parallel port and serial port.

Some abbreviations (more or less) related to the psx

MMU Memory Management Unit, the first coprocessor (which is on the same chip as the cpu), also called cop0
GTE Geometry Transform Engine, also referred to as cop2, like I said it's for 3D stuffs
tri short for triangle
CLUT Colour LookUp Tables, another name for a palette (stored in VRAM)
ar, gs Action Replay, GameShark, all the same, see below for more info.
PIO Parallel Input and Output
vag a sort of wav file in psx format
seq midi for psx
prim This is the smallest packet of information you send to the GPU. There are prims for sprites, polies, tiles, etc.
They are represented by C structures which contain info like color, position etc. Have a look at Nagra's site (Blackbag) or Napalm for a low level discussion.
OT A kind of bucket sort of linked prims, you can think of it as a simple z-sort. An OT is represented by an array of pointers, the length of which is only important for how many levels of z-sort you want (a big OT has fewer prims per index, so you have a higher 'resolution' of z-sort, if you make a small OT, a lot of prims with varying z's end up in the same place so they get drawn 'at the same time') So its size is indirectly related to the amount of prims you have. I used z-sort (which is its most frequent use) as an example, but essentially, it only determines the order in which the prims are drawn. One last note: there is a DMA channel (again, see Nagra's site) that does nothing but 'reverse clear' ot's, which makes this way of clearing very fast. And a 'reversed cleared' OT is easier to access. Look for an upcoming article on this.. don't have time now :-/.
MDEC Stands for Motion DECoding, it uses mpeg-like decompression to decompress compressed data (movies).



Action Replay & Comms Link

 

where to get them

there are lots of places: Anthrox, The Rage, Gameit, Buyrite, etc

what is it?

The Action Replay (from hereon 'ar') is a piece of electronics that plugs into the back of your PSX to make psx<->pc communication possible. There that about covers it, read on for more 'low level' info. It contains an EEPROM that holds a PIO shell (parallel input output), like Caetla, ez-o-ray or the cheat roms from datel and co. EEPROM, that's right, so you can flash it using software. If you haven't caught on by now, the ar is parallel. However, you can't hook it up directly to your parallel port as it has some extra logic which your par port can't handle... There are some hacks which are supported by caetla: Freewing and another one, which is mentioned in the Caetla docs.
BTW, if you 'broke' your ar, there's still a chance that you can fix it by burning a cd with an ar-flasher, look around on the sites in the link section (Napalm, Hitmen, Loser's site.. they should all have an iso for it).

alternatives

Okay, so maybe you don't have a spare ISA card, not to fret, just buy an X-Plorer it's a new kind of ar with loads of features, but you can't flash it with Caetla (or with any other replacement ROM). There is no reason to reflash it though, as it has everything you need, and we hear full dev support is coming soon... You connect this little marvel to your parallel port. Do NOT try to do this with a normal ar, as it will basically fry your peecee.. (see above)

The last option is to make Skywalker's serial cable (or see Hitmen). You can then upload your stuff to the psx with the yaroze kit, or with Jihad's uploader utility. See below for more info on this.

Mod Chips

These are little PICs that you install in your PSX to bypass the territory lock out code, so you can play imports and home brew stuff (see how to make my own psx CD for more info).
Check www.modchip.com to buy one, or for a guide to install it (there are plenty of other sites, so look around)
Check REI's Site for more info about ModChips, wiring diagrams, and sources for various PIC chips... (thx Crazy Bee)
Check ProPIC2 if you are a do-it-yourself kinda person, heres a cool PIC programmer... (thx Crazy Bee)

Dev Kit

psyq

This is the official kit, for professional developers. It comes with all sorts of equipment (among others 'the Blue PSX'). The compiler is made by SN Systems, the libraries and documentation are by Sony (I don't need to tell you their URL, do I?). Basically, this is the kit, it allows you to use the psx to the full extent (contrary to the yaroze). It makes things a lot easier (coding wise), but a crappy coder with a (fairly) good compiler is still a crappy coder.

yaroze

A rip-off, you get a grey psx that's painted black for the occasion, a serial cable, a cd, a dongle memory card, documentation and a compiler (that produces ecoffs) with all the libraries compiled into one, nice, big, clumsy libps.exe. (which eats a lot of memory). The only thing you get for your money is legality. If (when) you use it, you have to convert the ecoff the yaroze compiler generates to 'real' psx-exe's using eco2exe. And combine comes in handy for combining your exe with libps.exe.

gcc cross compile/not yaroze(site)

First let me remind you that the psx's cpu is not in Intel's ball park (in fact, not even gameday ;-) ), it's a mips cpu (like I said, a modified r3000). Therefore you cannot just use any compiler, you need one that outputs r3000 ecoffs (or some compilers even include the psx as a target). If you have a compiler that produces ecoffs, you need eco2exe to convert the ecoff to a regular psx-exe.

So your best bet is cross compiling a gnu compiler so that it outputs (once again) r3 ecoffs.

Now this is (I think) the only 'easy' legal way, you can still use c (although some weirdo's prefer asm.. ;-) ) and you're in the clear on the legal area: Check the Not Yaroze site (which has a link to the compiler kit targeted win32). And if we're lucky, there will be libraries -- developed independently from Sony -- that offer the same functionallity, only better ;-). But for now, just start cracking ;-)

Note: because psyq uses a proprietary format (not ecoff, it's similar, but not entirely) which hasn't been hacked yet (afaik), you can't use the official libraries with a cross compiled gnu kit.

about r3 asm, reverse engineering the bios and other executables

As you already know.. the cpu in the psx is a modified r3000 (see www.idt.com) and mips asm is simple as fook. You can download a nice reference from ftp.idt.com/docs/3467.pdf. For now, I'm not including a tutorial on programming in asm, as it's easy(see hitmen and napalm sites) and there are lots of examples.. erm I mean exe's to disassemble. I know, it's the hard way, but by doing it a couple of times on simple examples (maybe a c source you compiled yourself with, for example psyq), you learn a lot about C, the psx and how compilers 'optimize'. And as an added bonus, you can use the symbol tables generated by psyq with my disassembler. This makes things quite a bit easier.
It's called AdisasM and you can find it on Hitmen&Napalm.. version 0.3b is the latest, it's just a couple of buxfixes, and I added the -x switch, which enables 'higher level disassembly'.. it's no big deal for now, but I'm thinking about coding something specifically for compiled c code, like re-ordering instructions, maybe even some sort of pseudo language resourcing with simple flow control and memory references... If you have any ideas or if you want to invest some time, thinking and coding in it, please let me know, I just don't have time to implement my ideas.


How to make a PSX cd

You can burn a mode 2/CD-ROMXA CD, put a system.cnf file on it (just have a look at one on any psx cd) which specifies the name of the exe (if you call your proggy psx.exe, and you don't feel special, you can leave out the system.cnf file). You then make an iso with all your data and license it (see hitmen, hitlice should do the trick). Then you've got to make sure the exe is a multiple of 2048 bytes (exefixup works nicely) because of the reading mechanism of the psx cd, which reads a full sector at the time. Oh, one more thing, the last 3 minutes of a cd are unreliable..

Note: You must use EZ CD PRO 95 or another cd writer proggy that's able to do "ISO 9660 Level 1 filenames WITH VERSION NUMBER". (See the file names tab in ez cd pro)
The Version Number it's referring to is the ;1 at the end of filenames. (thanks to Barubary for this)

The following code should work for loading an psx proggy from disc, now go and make those menu's.

StopCallback();
printf("Stopped callback\n");
_96_init();
printf("_96_Init\n");
printf("Loading Exec file\n");
LoadExec("cdrom:\\SLES_012.28;1",0x801ffff0,0);

Or you could also use buildcd, if you happen to find it.. hint: it hates dogs and eats little birdies. Ugh.. I know it's lame.. hehe ;-)

Caetla

what?

This is what you flash into your ar to download your code (and data) into the psx. It has loads of nice features:
a fileserver, printf redirecting to the pc (great for debugging), converting ecoffs to psx exes to make it easy to load yaroze code to the psx.

PS: there is a little problem though: because a lame company pirated the Caetla ROM, which was spread for free and for coders only, K-Comms has decided to protect their software. They are supposed to have par port support (through a hack that you can make yourself), but I can't get through to the leech department ;-)

So we have to respect K-Comms's wish, but on the other hand, how are coders that are new to the psx scene gonna upload their stuff to the psx? Right, well no comment.

There is, or better was, one other ar replacement rom: ez-o-ray (mmh.. read this backwards). It had some cool features like support for the psyq dos debugger (using a TSR to emulate the psx plugin ISA boards). But as per wish of the authors, it's no longer spreaded. A lot of l33t coderz :) still use ez, for old time's sake I guess. (that reminds me.. once upon a time.. a looong time ago, when the #psxdev scene was being born, they didn't even have a replacement ROM, so the cool d00ds of Hitmen and co. had to do all sorts of tricky things, which required good timing, to simply upload their code byte by byte.. my point is, we're lucky to have Caetla or Ez-o-ray, so don't whine about it being too difficult or summit)

setting it up

Well, Madman has made a nice faq on this already, so no point in reinventing the wheel, here's the Caetla FAQ (with additions by Danzig)

using da fileserver

Again, I found an example on the mailing list (and I'll save you the trouble from browsing it..)

This is very easy, just use code like the following:

void main()
{
 char c[80]; 
 struct DIRENTRY res;
 strcpy(c, "pcdrv:*.*");
 printf("\n** Loading files...\n");

 // Generate list from dir entrys...
 if (firstfile(c,&res)==0)
 {
  printf("Failed to read directory entry, does directory pcdata exist?\n");
  exit(1);
 }

 processFile(rec.name)
 while (nextfile(&res)!=0)
 {
  processFile(rec.name)
 }
}
void processfile(char *name)
{
 int fd;
 char fullName[80];
 strcat(fullName, name);
 fd = open(fullName, O_RDONLY);
 if (fd==-1)
 {
  printf("Failed to open file %s\n",rec->filename);
  exit(1);
 }

// Load file here...
 numRead = read(fd, (char *)rec->ptr, rec->length);
 if (numRead != rec->length)
 {
  close(fd);
  printf("Failed to read from file %s\n",rec->filename);
  exit(1);
 }

 printf("ok.\n");
 close(fd);
 rec = rec->next;
}

This will read the directory from the PC and load all files into PSX ram,

hope that helps

FuSIONMan


Alternatives to Caetla

Besides Ez-o-ray (which is of course a complete replacement with rom and tools), there are several pc-side tools which offer the same or better functionality as psexe. Have a look in the links section. IMHO, the coolest replacement, which offers some additional goodies (such as compatibility with Windows NT), is CatFlap. You can find it in Napalm's Utilities section. Also, for the linux addicts among us, there's piocons (originally made by DBalster and Nagra, and improved by AndrewK --> see the links section).

 

Programming with the serial cable

(Contributed by Gadget, thank you!)

Additional requirements

(besides PSX etc.)

PSX Yaroze compiler
Siocons or Serial by Jihad (just download it from Hitmen, it's as easy as cool :-) )

Configuring Siocons

 

By default, siocons is set at 9600baud. This is usually too slow to get any sort of programming accomplished. The speed of the serial connection will have to be increased to 115kbps. These are the steps required to do so.

  1. Place a memory card in slot2 of the psx.
  2. start siocons.
  3. within siocons, type >> BAUD 115200
  4. quit siocons with F10,F2
  5. restart siocons with the command line siocons -B115200
  6. A message will appear asking if you would like to save this baud rate to the memory card.
  7. select 'yes'
  8. The new baud rate will then be saved on the memory card. Whenever siocons is started, it will need to be started with the -B115200 parameter to use the new baud rate.


Using siocons to load a psx exe


The yaroze boot disc must be in the playstation at this point and loaded.
To load a single yaroze exe follow the below directions

  1. within siocons, hit the F4 key.
  2. A load prompt will appear
  3. type in the name of the exe to run. (ie main)
  4. The file will then execute on the playstation


If you need to load an exe with data files following the below directions

  1. Within siocons, hit the F9 key followed by the F4 key.
  2. A dload prompt will appear
  3. Type in the name of the datafile to load followed by the address to load the data to.
  4. example: dload[2]: test.tim 80150000
  5. Repeat steps 1 through 3 for all data files
  6. hit the F4 key to load the exe
  7. type in the name of the exe to run.

To end and close siocons
Hit the F10 key followed by the F2 key.

To load datafiles and run exes from a batch file

  1. create a file called 'auto'
  2. to load a datafile use the commmand 'local dload test.tim 80150000'
  3. to load an exe use the commadn 'local load main'
  4. put 'go' on the final line of the batch file to execute the program
  5. save the file
  6. to run the batch file start 'siocons auto'


This should give all the details for using siocons with the serial link
cable and the yaroze boot disc.
Remember, you cannot load exes at 80100000, the libps.exe file (library
file) is loaded there.


Various Utilities

There are a lot of nice utilities out there, I don't have time to list them all here. So if you feel like your util should be in here, mail me its name and a short description (+usage?) and I'll add it to the list. (for now, just check out the Napalm and Hitmen sites).

Miscellaneous code + Explanations

Looping vags

I was browsing the mailing list for stuff to put here, and I came across a mail of Silpheed:

The vagpack tool from bITmASTER doesn't have an option to create
looping samples, but the vag-file i used to experiment with was a
looping one...
So the next question is: where is the loop information stored in the vag-file ?


OK, take a look at a vag file in a hex editor. You will see the data
(after the 48 byte header) is arranged into 16 byte sections. There are
2 header bytes, followed by 14 compressed bytes of sound data. The
second header byte is the interesting one as far as looping is
concerned. In a non looping sample, the sections will be like this:

XX 00 XX XX XX XX XX XX XX XX XX XX XX XX XX XX

The second header byte is always set to 0. (except for the very last two
16 byte blocks of a non-looping sample (see below).)

For a looping sample, you can really only set the loop starting point -
the end of the loop can only be at the end of the sample. You set the
two points by setting the appropriate bits in the second header byte of
the 16 byte section you want them to be in. Like this:

Start of loop:
XX 06 XX XX XX XX XX XX XX XX XX XX XX XX XX XX

End of loop (also the last 16 bytes of the sample):
XX 03 XX XX XX XX XX XX XX XX XX XX XX XX XX XX

(BTW, the second header byte of the second last 16 byte section of a
non-looping sample will be set to 01 instead of 03. This is then
followed by a 16 byte SPU irq clear block, which looks like this:

00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I hope all that makes sense :)

As you can see, you can only set loop points at the 16 byte block level,
you cannot be more accurate than that. (Actually its worse than that,
because each 16 byte block corresponds to 28 bytes of the original
uncompressed sample data).
This is a problem with my mod player, as quite a few mods use very short
looped samples. As an extreme example of the problem, suppose one of the
samples in a mod is only 16 bytes long. This will be compressed into one
16 byte block of psx sample data. Since the original sample is so short,
it will probably only take up just over half the 16 byte block. This
leaves a large portion of the block left as zero bytes, and when played
back on the psx it will sound quite bad as the psx plays the original 16
byte sample plus the extra zero bytes which make up a significant
percentage of the total. For a long sample, an extra few zero bytes at
the end wont be noticable, but it has quite a bad effect on a sample
where the zero bytes make up a larger percentage of the total sample.

Anyway, I hope all that helps you... (it turned out quite a bit longer
than I intended :) ).

Later,
Silpheed.

Automatic PAL/NTSC mode select

You can use this little piece of code to automatically switch to PAL or NTSC
(although it may not work on all bioses, if you have any problems with it,
just mail me with the bios ver and fix(?) so I can post a correcter version here)

if (*(char *)0xbfc7ff52=='E') // E(urope) --> PAL; A(merica) and J(apan) both use NTSC
 SetVideoMode(1);     // PAL
else
 SetVideoMode(0);     // NTSC

This only works if (*(char*)0xbfc00102==95)
(stands for 1995, the bios date, if it's 94, you're running on a SCPH1000)
Just get out your favourite hex editor, and have a look at a bios dump


Making an MP3 player

No code here of course, it hasn't been done yet.. YET, it's not impossible, but very complex.
The psx's cpu-power isn't sufficient for doing high-quality mp3 decoding&playing like on your Pentium MMX (which is basically the bare minimum).. it's like that.
There are other problems that arise too: think of the size of a normal mp3, then remember that the psx's ram is only 2megs big.. (and it's quite slow). The fact that the SPU uses ADPCM isn't going to make it easier either.

BUT, at a lower sampling rate (read: quality), it COULD be possible. So stop discussing whether it's possible, prove the critics wrong and make a player! Again, if I decide, you will be kicked for discussing the possibility, of course I would be happy to see someone discussing how to do it.

PS: the same considerations apply to making an emulator, especially the memory constraints.

Moral: focus on things that are possible like pushing the psx to its limits (which is quite far), instead of dreaming and accomplishing nothing. I'm not saying 'stop dreaming', I'm saying 'Start CODING'! Moralist Loop signing off... ;-)

Putting your demo in one file

(contributed by Gabriel_K, thanks)

The basic idea behind this is compiling your binary files (tims, vabs,tmds, maps, etc.) to object files that can then be compiled into the final executable. If you download Rob Withey's psx libraries, he has already written the tool, bin2src, to get your binary files into C files. Rob Withey's psx libraries are available for download on Napalm.

Use of bin2src:
bin2src.exe -L<labelname> -A/-C -Fi<filename> -Fo<filename>

labelname determines the label to output in src
-A/-C determines if you would like a C file or an assembly file [-C is default]
-Fi determines the input file
-Fo determines the output file

Once you've got your binary in C format, you then compile it to an object file using the compiler
GCC/Yaroze: gcc -c
PSY-Q: ccpsx -c


Accessing object files from your code:

first you must declare it like so:
extern char arrayname[];

then you can access it like this: (example is for a tim file)
u_long *ptr;

ptr=((u_long*)arrayname);
ptr++;
GsGetTimInfo(ptr,&A_GsIMAGE);


Final Compilation: (simplified)

ccpsx image.obj main.c -o main.cpe


Hope this helps...you can check out brainwalker's remembering amiga
source if you want some more examples.

-Gabriel Knight/NAPALM



I'd like to add one commonly used way, namely using the assembler's incbin statement. Instead of making a c file which includes your data, you make an asm file, like so:

section .object
global pic

pic: incbin "pic.bin"

If you name it data.s, your makefile would look like this (psyq):

#  Makefile for MyK1ck4zzTro
CC   = CCPSX
ASM  = ASMPSX
LINK = PSYLINK

CCOPTS   = -c -g -comments-c++
ASMOPTS  = /l /o c+,h+,n+
LINKOPTS = /m

OBJS = main.obj data.obj

tro.cpe: $(OBJS)
        del tro
        $(LINK) $(LINKOPTS) /p @tro.lnc,tro,tro.sym,tro.map
        $(LINK) $(LINKOPTS) @tro.lnc,tro.cpe
        ren tro.bin tro
        cpe2x /CE tro.cpe

main.obj : main.c
        $(CC) $(CCOPTS) main.c

data.obj : data.s
        $(ASM) $(ASMOPTS) data,data

If you've been paying attention, you noticed tro.lnc, (supposed to be tro.lnk, but windoze fucks up, treats it as a shortcut) which you need to make yourself too, or you could use this template (zip with makefile, lnk file etc.).

The rest is the same as Gabriel_K's method.


And on the mailing list, I found yet another (fast) way for adding data to your exe. It's for psyq only, but anyway, here goes:

You might find these useful:

cpebin adds a binary file to a .cpe file, which is probably THE easiest way
to include a MOD or graphics in your demo. For example, just do

bincpe mydemo.cpe great.mod 80080000

and great.mod has been added to your .cpe! You can then convert the .cpe as
normal to a PSX exe.

pxe2cpe converts a PSX exe to a .cpe file. The two programs combined can
then be used to convert old multifile demos to a single file!

You can grab Win32 versions w/C source right here from 
Napalm,or visit http://hjem.get2net.dk/surfsmurf


SurfSmurf . >(oo)<

Setting up PSYQ

Gabriel_K has taken the time to help all y0 newbies out there to get psyq set up.. (quite frankly.. if you can't install it yourself how the fuck are you gonna code sth? ). Anyways, read his nice explanation.

Lowlevel code/info/hacking

Okay, this is (going to be) the most interesting section imho... the first contribution is from LOOP, who has promised me a lot more.. hope he finds time to write those articles =o)

anyway, here's his initial post to the mailing list:

GPU Lowlevel info - primer

The GPU contains a 2K texture cache, and all texture reading takes place viathis cache. It can speed up rendering when the same texture or sprite is used a lot. The maximal size of textures that fit in the cache are:

4-bit 64x64 pixels
8-bit 64x32 pixels
16-bit 32x32 pixels

Alignment is not necessary, if it is not aligned, it rolls over to the other side of the cache.

The GPU has a command port. It's a 64 byte (16-longs) FIFO, it can store up to 3 commands. Normally it only contains one command. It also has 3 data ports:

1 DMA channel for Slice and Source Chain DMA types
1 special DMA channel for Ordering Table Clear
and 1 32 bit data port for CPU copy

Sliced mode DMA is used for LoadImage/StoreImage. It moves data from a contigous address with fixed sized chunks. It uses 64 byte blocks, the rest is i/o copied (via the i/o data port), so make sure that LoadImage sizes are a multiple of 64 bytes, 'cos i/o copy is much more slower!

The Source Channel DMA is used for transferring the OT to the GPU command FIFO.Since the two types of DMA share the same chanel, they can't be used at the same time! When the DMA processes a null packet (the code member of the tag is zero), it just sets up the next address, and finish DMA without transferring anything.

The Ordering Table Clear DMA links the OT, without data transfer, and sets the codes to zero. In the Sony libraries it can be initated with the ClearOTagR() function. The GsClearOT() function probably calls ClearOTagR(), but I'm not sure.

Here are the some "theoretical" GPU draw timings:

POLY_F3, POLY_F4, SPRTx, TILE primitives: 2 pixel/cycle - 66 Megapixels/second.

POLY_G3, POLY_GT3 (texture is on cache!) 1 pixel/cycle - 33 Megapixel/second.

When semitransparency is used, the raw speed is halved, for example a POLY_G3 abr id 0.5 pixel/cycle - 16 Megapixels/second.

LoadImage transfers with 33 Mhz*4 bytes per sec, so it can attain speeds up to 132 MBytes/sec. However, when the CPU accesses the main bus, it stops the LoadImage!. (So stay on I and D cache!).

OK now I have to go, so I have to finish this "article". I don't know is the libps functions work in the same way, but the libgpu and libgs functions from the oficial sony libraries work like this. (DrawOTag(),ClearOTagR(), GsDrawOt(), GsClearOt())... if I have some free time I gonna contribute some other infos.

LOOP

BIOS disasm

There are several coders who have reversed (parts of) the bios, the first one to do this was of course Nagra (check blackbag). I did some reversing too.. maybe I'll release it someday.. it's no big deal anyway.

If someone is interested in reversing the bios, libs or whatever, or if you have written a great reversing tool, or even if you have completely converted the Bios to c (hehe.. right :-) ), LET ME KNOW! please? ;-)
It's better to bundle our forces than to reinvent the wheel over and over again I think...

What's next?

This section covers what I'm planning to release sometime soon (not a promise, just what I'm thinking about).
Also, I want to use this to ask you to contribute something to the faq, no matter how small it is, it may help lots of others.. don't hesitate to mail me! (don't mail me tutorials on how to tie your shoes in 21 steps though :-) )

something lowlevelly on the interrupts
the rootcounters are also screaming for attention
maybe a little bit on the psx2 *drool*

as you can see, it's kind of a wishlist (well.. it's really just a dump of my todo list ;-))...

EMUS

There are basically two free emulators:

PSEmu Pro: a GREAT emulator which runs on win32.. it kicks ass :-) (if you have a pII 350 and 3D card ;-) )
Sope: I haven't checked this one out, it's the only (promising) emulator which runs on Linux!
And third (yes and I said there were only two): Psyke, I just wanted to name it because it is (was) such a cool emu.. a real competitor for PSEmu Pro, but last thing I heard they joined up with the PSemu Pro team, which is - of course - a great thing!
And then there was Bleem, a commercial emu. Connectix has also made a (controversial) psx emu for the mac, they're also working on a windows version... Virtualgamestation


Mailing List

main psxdev

Check out www.egroups.com (the mailing list's name is psxdev, you can subscribe to, browse and search the list on that site)

Like I said, Barog moderates the list, so don't waste your time nor his and think about what you write. Lame stuff won't get past him anyways ;-)

unix psxdev

This list's name is psxdev-unix

DO's & DON'Ts

Well, there's one EXTREMELY IMPORTANT rule, use your FUCKING brain before asking. To you it may be just one question, but to them who have been doing this for quite some time, these questions have been answered (a little too) frequently.. why do you think I bother to make this FAQ? (besides of my good character ;-) ).

Oh and, do you see this section below? Links.. yeah that's right.. so check them out if something's not here!

Now, if you've tried everything (btw, readme.txt is not the same as whocares.txt), even browsing through the mailing list, just come to #psxdev and ask nicely (and clearly). This also applies to the mailing list: there's no use in a subject like this: 'I NEED HELP' (sure you do... but not the kind we can offer you..), this also makes it a lot easier when you are browsing the mailing list for reference. I did this while making the faq, and you can't believe how much crap I had to read because of an unclear subject. No offence, because the mailing list is very useful, but there are a bunch of whinig lamers in there.. (and I don't mean anyone particular).

So, if you haven't read the FAQ and browsed all the links and you come to #psxdev asking a question that's answered in here or on those sites, be prepared to be booted.

And one more thing, we don't discuss warez in #psxdev, of course this may sound a bit hypocrite, because (imho), without pirating, there is no real scene.. hrm.. I know a lot of you guys are going to disagree on this, but that's how I feel. So just don't barge in and go asking (some even think they're in a position to demand) for PsyQ when you don't even have the slightest idea how to code. First prove you're worth it! But I (and I'm sure I'm not the only one) would very much like to see this scene alive and kicking some bunghole!

LINKS

(in no particular order..)

Napalm A cool site of a cool psx group
Hitmen They're basically the godfathers of psx development. Most likely, there wouldn't have been a psx coding scene without them.
AndrewK's linux psx site Nice utils here for on linux, also has a source for his replacement for psexe and exefixup. His improved version of piocons can be found here too.
PSX dev with BSD Well.. hum.. check it out.. you might want to learn Japanese first, though. Has source for a psexe replacement, with more features than AndrewK's.
Not Yaroze Great page on coding for the psx without using 'the libraries'
Blackbag Also a great, albeit slightly outdated, site with low level info.. Must read if you're really into psx hacking.
K-Comms The makers of caetla
Trickmeister Promising page with all the tools you need to start coding on your linux box, although don't hold your breath for a release..
PSEmu Pro The best psx emulator (also check out #psemu on EFNet)
Sope's homepage A linux PSX emulator.
Ganga Cracktion Replay and other utilities.
www.palevich.com/,
www.neocor.com/,
translingo.com/tldl.htm
  ^^^ (25 fkn megs evaluation copy!)
Japanese translators
BitMaster
Cool psx hacking site
Creature Another cool psx hacking site
Dudley Soft This guy has cool plans, check them out.
irc://EFNet/#psxdev
The hangout for all the sad bastards who don't have anything else to do with their time besides wasting it on IRC ;-)
www.argonet.co.uk/users/sps/psxfaq/ Another psx faq, aimed at the general public, but nonetheless interesting.
Cat House Cool site, with lots of interesting tools!
Codeworks Mobius Codeworks, very cool dudes.. with a cool site and cool intro.
Psx Heaven Segmond's site, quite interesting
Psyke An excellent PSX emulator by Moonshadow and Rasky.
Freewing Par port hack
Nonstd Another par port hack
Loser's page Great source for info, example source etc.
Blackthunder Check it out!
GNU Psx Another nice GNU site!
Mark Heath's PSX page Has lots of linux based stuff such as gnu for psx, exefixup etc.
GNU Psx GNU for psx, nice explanations too
Barog's PSX site Must visit! ( When it's up ;-) )
Nice graphics site Not for PSX though
Van Helsing's PSX page Well, what more to say, check it out.
K-Comms password page It seems it works, not sure. Try if you're looking for the latest version of Caetla (0.33).
A psxdev site I didn't say 'yet another blabla..' I haven't checked it out, but you (and I) really should! ;-)
A psxdev site Has info on burning your STR files to cd, LOOK HERE FOR BURNING YER OWN CEEDEEZ! If I ever get another question on this, I can't be held responsible for my actions
Bambam... ...bam - check it out
PSX-Vision Danish
Surfsmurf's Smurfsmurf's cool site.. need I tell you to check it out? =o)



Revision history (since rev 11.. heh)

1999-03-21 1rev11 I started this revision history, cause.. well.. it might be useful as I frequently update the faq *cough*
I added Smurfsmurf's trick on cpebin, added the link to BamBam, PSX-Vision and SmurfSmurf's, and I started the lowlevel section... Lots more to come there thanks to LOOP
Oh and, rejoyce all thou who hast failed to install PSYQ, Gabriel_K comes to the rescue!
One last thing, I also started the What's next section, where you can see what might come next, or where I ask *you* to contribute sth I'd like to see here...
tomorrow 1rev12 where do you wanna go next? tell me.. I'll be happy to add it when I have time



Credits (again, not really in a special order (!), I think I better spend my time writing the faq instead of thinking of the peeps I wanna greet, dontcha fink?)

I'd like to thank: Twin (whoop!), Jihad, Silpheed, Nagra and Danz! (and everyone else who's helped me).

And greetz fly out to: Xerox, FoxFire, Nik, Amerrykan, Brainwalker, Skywalker, Madman, Irka (thx!), AshH, Gadget, Knight, Barog (great job with the ml+site), Bufferman, FusionMan, F0rier, Barubary, Cat, N3xus, Test64, Scorpion, Matt, Tratax, Duddie, Groepaz, Tranziie (monkey!), Burny, Crash0r, SmartAzz, Phazey, Dach (cool site), Wuselfuzz, Fony :o) and everyone else I'd like to greet in #psxdev and #psemu.

So sorry if your name isn't in here.. it's just that me ol' brain isn't very good with names...

If you disagree, if I made a mistake, if I forgot you in the thanks/greetings, or better yet, if you'd like to contribute (oh goody! =o) ), you can always mail me at [email protected].