Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
git-svn-id: http://psp.jim.sh/svn/ps2/trunk@931 bf8e388e-adfb-0310-9433-acdc3088d20d
  • Loading branch information
lukaszdk committed Mar 27, 2005
0 parents commit 490ce0b
Show file tree
Hide file tree
Showing 97 changed files with 14,166 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

LIBITO_VERSION = 1.0.0

all: build-ito build-tools build-samples

clean:
$(MAKE) -C tools clean
$(MAKE) -C samples clean
$(MAKE) -C source clean
rm -f -r docs/libref/

build-ito:
@echo Building libito $(LIBITO_VERSION)
$(MAKE) -C source

build-samples:
$(MAKE) -C samples

build-tools:
@echo Building tools
$(MAKE) -C tools

build-docs:
@echo Building docs
doxygen doxygen/libito.doxygen
cp -f doxygen/itologo.gif docs/libref/itologo.gif
cp -f doxygen/ito_manual.css docs/libref/ito_manual.css

bin-release: clean build-ito build-tools build-docs
rm -f -r release/include/
mkdir release/include
for file in `ls include/*.h`; do \
sed -e s/"%VERSION%"/"$(LIBITO_VERSION)"/ -e s/"%DATE%"/"`date "+%d %B %Y"`"/ release/header > release/$$file; \
cat $$file>>release/$$file; \
done;
echo Creating libito-$(LIBITO_VERSION)-bin.tar.gz
tar -zcf libito-$(LIBITO_VERSION)-bin.tar.gz docs/ lib/ samples/ tools/iit/iit* tools/iit/readme.txt Makefile.global Makefile.prefab -C release/ Makefile include/
rm -f -r release/include/

src-release: clean
rm -f -r release/include/
echo Creating libito-$(LIBITO_VERSION)-src.tar.gz
tar -zcf libito-$(LIBITO_VERSION)-src.tar.gz docs/ doxygen/ include/ lib/ release/ samples/ source/ tools/ Makefile Makefile.global MakeFile.prefab
22 changes: 22 additions & 0 deletions Makefile.global
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
####################################################
# Change the settings, so they match yours #
####################################################

EE_PREFIX = ee-
EE_CC = $(EE_PREFIX)gcc
EE_CPP = $(EE_PREFIX)g++
EE_AS = $(EE_PREFIX)as
EE_LD = $(EE_PREFIX)ld
EE_AR = $(EE_PREFIX)ar
EE_OBJCOPY = $(EE_PREFIX)objcopy
EE_STRIP = $(EE_PREFIX)strip

VU_PATH = ee-dvp-
VU_AS = $(VU_PATH)as

# Tools
IIT = $(LIBITO)/tools/iit/iit
BIN2S = $(PS2SDK)/bin/bin2s
BIN2C = $(PS2SDK)/bin/bin2c

# PS2PACKER = $(LIBITO)/tools/ps2-packer/ps2-packer-lite
63 changes: 63 additions & 0 deletions Makefile.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.SUFFIXES: # Delete the default suffixes
.SUFFIXES: .c .o .s .elf

include $(LIBITO)/Makefile.global

# Include directories
EE_INCS += -I$(LIBITO)/include -I$(LIBITO)/samples/common -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include

# C compiler flags
EE_CFLAGS += -D_EE -O2 -c -Wall -fno-builtin -ffreestanding -fsingle-precision-constant -ansi -pedantic -Wno-long-long $(EE_INCS)

# C++ Compiler flats
EE_CXXFLAGS += -D_EE -O2 -c -Wall -fno-rtti -fno-builtin -ffreestanding -fno-exceptions -fsingle-precision-constant -ansi -pedantic -Wno-long-long $(EE_INCS) $(USER_EE_CFLAGS)

# Linker flags
EE_LDFLAGS += -mno-crt0 -T$(PS2SDK)/ee/startup/linkfile

# Assembler flags
EE_ASFLAGS += -mips3 -EL

# Link with libs
EE_LIBS += -L$(LIBITO)/lib -L$(PS2SDK)/ee/lib -lgcc -lito -lc -lkernel -lsyscall -lc -lgcc -lpad -lkernel

# EE_BIN_PACKED = packed_$(EE_BIN)

# packed: $(EE_BIN_PACKED)
# PS2_IP = 192.168.0.10

run: $(EE_BIN)
ps2client -h $(PS2_IP) reset
ps2client -h $(PS2_IP) execee host:$(EE_BIN)

# run-packed: $(EE_BIN_PACKED)
# ps2client -h $(PS2_IP) reset
# ps2client -h $(PS2_IP) -t 3 execee host:packed_$(EE_BIN)

clean:
rm -f -r $(EE_BIN) $(EE_BIN_PACKED) $(CLEAN_FILES) $(EE_OBJS) $(EE_OBJS_DIR)

$(EE_OBJS_DIR)%.o : %.c
$(EE_CC) $(EE_CFLAGS) $< -o $@

$(EE_OBJS_DIR)%.o : %.cpp
$(EE_CPP) $(EE_CXXFLAGS) $< -o $@

$(EE_OBJS_DIR)%.o : %.s
$(EE_AS) $(EE_ASFLAGS) $< -o $@

$(EE_OBJS_DIR)%.o : %.S
$(EE_CC) $(EE_CFLAGS) $< -o $@

$(EE_OBJS_DIR):
mkdir $(EE_OBJS_DIR)

$(EE_LIB): $(EE_OBJS)
$(EE_AR) rcs $(EE_LIB) $(EE_OBJS)

# $(EE_BIN_PACKED) : $(EE_BIN)
# $(PS2PACKER) $(EE_BIN) $(EE_BIN_PACKED)
$(EE_BIN) : $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
$(EE_CPP) $(EE_LDFLAGS) -o $(EE_BIN) $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o $(EE_LIBS)
6 changes: 6 additions & 0 deletions cvs-changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Please list the changes you have made

libito 1.0.0
=============================================================
- Commited source to cvs - Lukasz

30 changes: 30 additions & 0 deletions cvs-readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

In order to keep things organized a little, there are a few things those who contribute should do
besides from changing/adding code, so others also have a clue about what has been changed.
So Ive listed a small checklist to follow.

- Shortly document your changes in cvs-changelog.txt
- If you have added features, please document these in the headers in doxygen fashion.
- If you have done one of the tasks listed in cvs-todo.tx, please update this file.
- Add yourself to release/header, if you have not done so already.

In cvs-todo.txt I will add features which will be added to libito in the feature, if anyone
wants to complete one of these tasks, please feel free to do so.

The difference between cvs-changelog.txt and docs/changelog.txt is that cvs-changelog.txt is
for contributers in cvs and docs/changelog.txt is for the users, so only main changes should
be listed in docs/changelog.txt. For instance it wouldn't be necessary to write about something
which doesn't affect the end user in docs/changelog.txt, like "Switched from x to y, works the same,
just a little better", this would be only contributer related.

Unlike other projects, libito binary and source version have the exact same directory structure,
so there is only one enviroment variable LIBITO.

In order make a release use the make target bin-release or src-release respectively.

I will personally build all releases and post them on my website, so the problem of several
variants of the same version does not arise.

Please use the lastest version of doxygen, the 1.2.x version which comes with cygwin is outdated.

Written by Lukasz Bruun
16 changes: 16 additions & 0 deletions cvs-todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Todo list for libito, for cvs only.

- Not done
+ Done
| Work in progress

Todo for libito 1.0.0 release
===============================================================================
- Add png, jpeg and tiff support to iit
- BitmapFont, Fontm classes. BitmapFont loads font created by bitmap font builder
- All functions return true or false instead of u32, unless they are wrapper functions
- Write docs and finish/cleanup libref
- Code all samples listed in samples/samples.txt
- Add cleanup and add remaining functions to Vu0Math.cpp. Only use registers
$vfX to $vfX+n
- Add primitives of type -Strip and -Fan to GifPipe.cpp
5 changes: 5 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Libito changelog - www.lukasz.dk

1.0.0
===========================================================
- Initial release
10 changes: 10 additions & 0 deletions docs/install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


Create a LIBITO enviroment variable which points at the root of the
directory into which you have instaled libito.

If you which to use the make target 'run' which uses ps2client to execute
the ELF on the PS2. You need to installed ps2client and create a enviroment
variable named PS2_IP, note the underscore, which holds the IP address of your
PS2.

166 changes: 166 additions & 0 deletions docs/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@

The Academic Free License
v. 2.0

This Academic Free License (the "License") applies to any original work
of authorship (the "Original Work") whose owner (the "Licensor") has
placed the following notice immediately following the copyright notice
for the Original Work:

*Licensed under the Academic Free License version 2.0*

1) *Grant of Copyright License.* Licensor hereby grants You a
world-wide, royalty-free, non-exclusive, perpetual, sublicenseable
license to do the following:

a) to reproduce the Original Work in copies;

b) to prepare derivative works ("Derivative Works") based upon the
Original Work;

c) to distribute copies of the Original Work and Derivative Works to
the public;

d) to perform the Original Work publicly; and

e) to display the Original Work publicly.

2) *Grant of Patent License.* Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under
patent claims owned or controlled by the Licensor that are embodied in
the Original Work as furnished by the Licensor, to make, use, sell and
offer for sale the Original Work and Derivative Works.

3) *Grant of Source Code License.* The term "Source Code" means the
preferred form of the Original Work for making modifications to it and
all available documentation describing how to modify the Original Work.
Licensor hereby agrees to provide a machine-readable copy of the Source
Code of the Original Work along with each copy of the Original Work that
Licensor distributes. Licensor reserves the right to satisfy this
obligation by placing a machine-readable copy of the Source Code in an
information repository reasonably calculated to permit inexpensive and
convenient access by You for as long as Licensor continues to distribute
the Original Work, and by publishing the address of that information
repository in a notice immediately following the copyright notice that
applies to the Original Work.

4) *Exclusions From License Grant. *Neither the names of Licensor, nor
the names of any contributors to the Original Work, nor any of their
trademarks or service marks, may be used to endorse or promote products
derived from this Original Work without express prior written permission
of the Licensor. Nothing in this License shall be deemed to grant any
rights to trademarks, copyrights, patents, trade secrets or any other
intellectual property of Licensor except as expressly stated herein. No
patent license is granted to make, use, sell or offer to sell
embodiments of any patent claims other than the licensed claims defined
in Section 2. No right is granted to the trademarks of Licensor even if
such marks are included in the Original Work. Nothing in this License
shall be interpreted to prohibit Licensor from licensing under different
terms from this License any Original Work that Licensor otherwise would
have a right to license.

5) This section intentionally omitted.

6) *Attribution Rights.* You must retain, in the Source Code of any
Derivative Works that You create, all copyright, patent or trademark
notices from the Source Code of the Original Work, as well as any
notices of licensing and any descriptive text identified therein as an
"Attribution Notice." You must cause the Source Code for any Derivative
Works that You create to carry a prominent Attribution Notice reasonably
calculated to inform recipients that You have modified the Original Work.

7) *Warranty of Provenance and Disclaimer of Warranty.* Licensor
warrants that the copyright in and to the Original Work and the patent
rights granted herein by Licensor are owned by the Licensor or are
sublicensed to You under the terms of this License with the permission
of the contributor(s) of those copyrights and patent rights. Except as
expressly stated in the immediately proceeding sentence, the Original
Work is provided under this License on an "AS IS" BASIS and WITHOUT
WARRANTY, either express or implied, including, without limitation, the
warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
part of this License. No license to Original Work is granted hereunder
except under this disclaimer.

8) *Limitation of Liability.* Under no circumstances and under no legal
theory, whether in tort (including negligence), contract, or otherwise,
shall the Licensor be liable to any person for any direct, indirect,
special, incidental, or consequential damages of any character arising
as a result of this License or the use of the Original Work including,
without limitation, damages for loss of goodwill, work stoppage,
computer failure or malfunction, or any and all other commercial damages
or losses. This limitation of liability shall not apply to liability for
death or personal injury resulting from Licensor's negligence to the
extent applicable law prohibits such limitation. Some jurisdictions do
not allow the exclusion or limitation of incidental or consequential
damages, so this exclusion and limitation may not apply to You.

9) *Acceptance and Termination.* If You distribute copies of the
Original Work or a Derivative Work, You must make a reasonable effort
under the circumstances to obtain the express assent of recipients to
the terms of this License. Nothing else but this License (or another
written agreement between Licensor and You) grants You permission to
create Derivative Works based upon the Original Work or to exercise any
of the rights granted in Section 1 herein, and any attempt to do so
except under the terms of this License (or another written agreement
between Licensor and You) is expressly prohibited by U.S. copyright law,
the equivalent laws of other countries, and by international treaty.
Therefore, by exercising any of the rights granted to You in Section 1
herein, You indicate Your acceptance of this License and all of its
terms and conditions.

10) *Termination for Patent Action.* This License shall terminate
automatically and You may no longer exercise any of the rights granted
to You by this License as of the date You commence an action, including
a cross-claim or counterclaim, for patent infringement (i) against
Licensor with respect to a patent applicable to software or (ii) against
any entity with respect to a patent applicable to the Original Work (but
excluding combinations of the Original Work with other software or
hardware).

11) *Jurisdiction, Venue and Governing Law.* Any action or suit relating
to this License may be brought only in the courts of a jurisdiction
wherein the Licensor resides or in which Licensor conducts its primary
business, and under the laws of that jurisdiction excluding its
conflict-of-law provisions. The application of the United Nations
Convention on Contracts for the International Sale of Goods is expressly
excluded. Any use of the Original Work outside the scope of this License
or after its termination shall be subject to the requirements and
penalties of the U.S. Copyright Act, 17 U.S.C. � 101 et seq., the
equivalent laws of other countries, and international treaty. This
section shall survive the termination of this License.

12) *Attorneys Fees.* In any action to enforce the terms of this License
or seeking damages relating thereto, the prevailing party shall be
entitled to recover its costs and expenses, including, without
limitation, reasonable attorneys' fees and costs incurred in connection
with such action, including any appeal of such action. This section
shall survive the termination of this License.

13) *Miscellaneous.* This License represents the complete agreement
concerning the subject matter hereof. If any provision of this License
is held to be unenforceable, such provision shall be reformed only to
the extent necessary to make it enforceable.

14) *Definition of "You" in This License.* "You" throughout this
License, whether in upper or lower case, means an individual or a legal
entity exercising rights under, and complying with all of the terms of,
this License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with you. For
purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or
more of the outstanding shares, or (iii) beneficial ownership of such
entity.

15) *Right to Use.* You may use the Original Work in all ways not
otherwise restricted or conditioned by this License or by law, and
Licensor promises not to interfere with or be responsible for such uses
by You.

This license is Copyright (C) 2003 Lawrence E. Rosen. All rights
reserved. Permission is hereby granted to copy and distribute this
license without modification. This license may not be modified without
the express written permission of its copyright owner.

Empty file added docs/readme.txt
Empty file.
Loading

0 comments on commit 490ce0b

Please sign in to comment.