-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
88 lines (67 loc) · 4.2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Demo harness with skeleton code. This is to aid people in developing some little demos
for hopeful inclusion into something for Breakpoint 2004.
Demos can be submitted in binary format so you can keep your source code if that is
what you desire. In the c_skel and asm_skel there is skeleton code to build your
demos in either ee-gcc or asm5900. A brief description is probably in order.
Basic Rules for submissions:
Maximum size of demo (uncompressed) 16mb
Maximum size of demo (compressed) 2mb
Demo Rules:
You cannot:
Use the IOP or any IOP functions.
Allocate memory generally, outside of any internal alloc in the
specified 16Mb block provided.
Reset the screen resolution. i.e. playing with any PCRTC stuff.
Disable interrupts.
You can:
Utilise all of VRAM for your own nefarious purposes.
Use VU0 and VU1 for any purpose.
Use any GS path you like
The binary submission is loaded up by the harness (or loader when that comes around)
into memory at 0x01000000. From there you have 16Mb of space to do your thing.
Execution will begin at the same address so make sure any code can be started from the
front of the binary data. The stack is already configured, use the crt0 as provided in
the skeleton, not the one from ps2lib. Also note that the gp base is not set so make
sure you use the -G0 option in gcc to disable gp usage.
The main function of your code will be supplied a pointer to a demo_init_t structure.
This is defined in harness.h. Do not write to this structure, only read from it.
It contains timer values for current time in demo, time left for your demo to run,
some sync point information for later music usage and a few function pointers to printf
(:P) and a function to grab the current audio fourier transformed. Note that at this
moment in time the sync data and fourier data have not been implemented.
You demo _must_ exit after the demo timer has expired, this timer is available in a
floating point time in seconds, a corresponding 16.16 fixed point version and one based
on the frames. Using the time will work on PAL or NTSC while you will have to adjust
timing accordingly if using frames. This time could be adjusted at compilation stage so
make sure you can do what you want to within the possible time periods. If your demo
requires a certain amount of time to run (i.e. to do a few things) make sure you tell us
before hand so it can be accomodated.
The GS is preconfigured currently to use 640x224 res. This should not be changed. The
configuration of the frame buffers, z buffers etc is your responsibility. The VUs should
have been reset before your code starts so you can do with them what you like.
Finally usage of the harness.
To use the harness you will need a loader which supports passing of command line arguments.
I think pukklink and ps2link should provide this functionality, along with pksh or ps2client.
Call the harness with a list of bins to run. Each one will be run in sequence for a default
time of 5 seconds. There are also some options you can use, they are :
-pal : Sets PAL screen mode
-ntsc: Sets NTSC screen mode
-tX : Replace X with the time in seconds to run all demos. When this option is set it
will affect all demos, however it can be added in between demo entrys so that it changes
the time each one runs. e.g. harness.elf -t5 demo1.bin -t10 demo2.bin will run demo1 for
5 seconds and demo 2 for 10 secs.
-noprintf: Disables the printf function in the harness. Use this to check you havent
accidently left in normal printfs in your demo code before submission.
Well have fun and lets try and produce something
TyRaNiD : tiraniddo at hotmail.com
Credits:
Some bits off this harness come originally from the GS tutorials by Dreamtime.
Other bits come from PS2LIB.
Disclaimer:
Except where explicitly noted in the code this work is placed in the public domain to
fuck about with however which way you choose. This attributation only applies to the
non attributed code, some specific files are likely licensed under its own
terms. Please respect the copyright of any such code. If you do use it for some purpose the
group wouldn't mind a thank you greet or a wad of non-consecutive bills placed in a
dead letter box somewhere in East London, see in-store for details, no purchase necessary.
Thx for listening.