diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-04-24 19:01:28 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2020-04-24 19:01:28 +0800 |
| commit | 1aa0e17df7c325a41de8cf8a57f52ed853f08bf3 (patch) | |
| tree | 5ec7f69ca0104f2b0a41e2ee7d3cb0cf0c9c54c5 /examples/rgb24 | |
| parent | e82da2abe4c264d4b48a48d79cf9b8e4c4fb8ab6 (diff) | |
| download | psn00bsdk-1aa0e17df7c325a41de8cf8a57f52ed853f08bf3.tar.gz | |
Refined toolchain instructions, organized examples, added automatic retry for CdRead(), added FIOCSCAN ioctl in psxsio TTY driver, added tty and console examples.
Diffstat (limited to 'examples/rgb24')
| -rw-r--r-- | examples/rgb24/bunpattern.tim | bin | 921620 -> 0 bytes | |||
| -rw-r--r-- | examples/rgb24/main.c | 52 | ||||
| -rw-r--r-- | examples/rgb24/makefile | 41 | ||||
| -rw-r--r-- | examples/rgb24/tim.s | 7 |
4 files changed, 0 insertions, 100 deletions
diff --git a/examples/rgb24/bunpattern.tim b/examples/rgb24/bunpattern.tim Binary files differdeleted file mode 100644 index f233453..0000000 --- a/examples/rgb24/bunpattern.tim +++ /dev/null diff --git a/examples/rgb24/main.c b/examples/rgb24/main.c deleted file mode 100644 index 9f1a647..0000000 --- a/examples/rgb24/main.c +++ /dev/null @@ -1,52 +0,0 @@ -/* LibPSn00b Example Programs - * Part of the PSn00bSDK Project - * - * RGB24 Example by Lameguy64 - * - * - * This example demonstrates the 24-bit color mode of the PS1. This mode is - * not practical for gameplay as the GPU can only draw graphics primitives - * in 16-bit color depth so this feature would normally be used only for - * fullscreen graphic illustrations or FMV sequences. - * - * - * Changelog: - * - * 05-03-2019 - Initial version. - * - */ - -#include <stdio.h> -#include <psxgte.h> -#include <psxgpu.h> - -// So data from tim.s can be accessed -extern unsigned int tim_image[]; - -int main() { - - DISPENV disp; - TIM_IMAGE tim; - - // Reset GPU - ResetGraph(0); - - // Setup 640x480 24-bit video mode - SetDefDispEnv(&disp, 0, 0, 640, 480); - disp.isrgb24 = 1; - disp.isinter = 1; - - // Apply and enable display - PutDispEnv(&disp); - SetDispMask(1); - - // Upload image to VRAM - GetTimInfo(tim_image, &tim); - LoadImage(tim.prect, tim.paddr); - DrawSync(0); - - while(1) { - } - - return 0; -}
\ No newline at end of file diff --git a/examples/rgb24/makefile b/examples/rgb24/makefile deleted file mode 100644 index eea866d..0000000 --- a/examples/rgb24/makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../sdk-common.mk - -TARGET = rgb24.elf - -CFILES = $(notdir $(wildcard *.c)) -CPPFILES = $(notdir $(wildcard *.cpp)) -AFILES = $(notdir $(wildcard *.s)) - -OFILES = $(addprefix build/,$(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(AFILES:.s=.o)) - -INCLUDE += -LIBDIRS += - -LIBS = -lpsxgpu -lpsxapi -lc - -CFLAGS = -g -O2 -fno-builtin -fdata-sections -ffunction-sections -CPPFLAGS = $(CFLAGS) -fno-exceptions -AFLAGS = -g -msoft-float -LDFLAGS = -g -Ttext=0x80010000 -gc-sections -T $(GCC_BASE)/mipsel-unknown-elf/lib/ldscripts/elf32elmip.x - -CC = $(PREFIX)gcc -CXX = $(PREFIX)g++ -AS = $(PREFIX)as -LD = $(PREFIX)ld - -all: $(OFILES) - $(LD) $(LDFLAGS) $(LIBDIRS) $(OFILES) $(LIBS) -o $(TARGET) - elf2x -q $(TARGET) - -build/%.o: %.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ - -build/%.o: %.s - @mkdir -p $(dir $@) - $(CC) $(AFLAGS) $(INCLUDE) -c $< -o $@ - -build/%.o: %.tim - -clean: - rm -rf build $(TARGET) $(TARGET:.elf=.exe) diff --git a/examples/rgb24/tim.s b/examples/rgb24/tim.s deleted file mode 100644 index a4432d9..0000000 --- a/examples/rgb24/tim.s +++ /dev/null @@ -1,7 +0,0 @@ -.section .data - -.global tim_image -.type tim_image, @object -tim_image: - .incbin "bunpattern.tim" -
\ No newline at end of file |
