You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Port libultra and yay0 (shindou is broken currently)
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -70,3 +70,9 @@ build/*
|
||||
!/sound/**/*custom*/**/*.aiff
|
||||
!/assets/**/*custom*.bin
|
||||
!/assets/**/*custom*/**/*.bin
|
||||
# libultra
|
||||
|
||||
!/lib/*.a
|
||||
|
||||
!/lib/PR/hvqm/*.o
|
||||
|
||||
|
||||
52
Makefile
52
Makefile
@@ -38,22 +38,22 @@ $(eval $(call validate-option,VERSION,jp us eu sh))
|
||||
ifeq ($(VERSION),jp)
|
||||
DEFINES += VERSION_JP=1
|
||||
OPT_FLAGS := -g
|
||||
GRUCODE ?= f3d_old
|
||||
GRUCODE ?= f3dzex
|
||||
VERSION_JP_US ?= true
|
||||
else ifeq ($(VERSION),us)
|
||||
DEFINES += VERSION_US=1
|
||||
OPT_FLAGS := -g
|
||||
GRUCODE ?= f3d_old
|
||||
GRUCODE ?= f3dzex
|
||||
VERSION_JP_US ?= true
|
||||
else ifeq ($(VERSION),eu)
|
||||
DEFINES += VERSION_EU=1
|
||||
OPT_FLAGS := -O2
|
||||
GRUCODE ?= f3d_new
|
||||
GRUCODE ?= f3dzex
|
||||
VERSION_JP_US ?= false
|
||||
else ifeq ($(VERSION),sh)
|
||||
DEFINES += VERSION_SH=1
|
||||
OPT_FLAGS := -O2
|
||||
GRUCODE ?= f3d_new
|
||||
GRUCODE ?= f3dzex
|
||||
VERSION_JP_US ?= false
|
||||
endif
|
||||
|
||||
@@ -66,6 +66,7 @@ TARGET := sm64.$(VERSION)
|
||||
# f3dex -
|
||||
# f3dex2 -
|
||||
# f3dzex - newer, experimental microcode used in Animal Crossing
|
||||
# super3d - extremely experimental version of Fast3D lacking many features for speed
|
||||
$(eval $(call validate-option,GRUCODE,f3d_old f3dex f3dex2 f3d_new f3dzex))
|
||||
|
||||
ifeq ($(GRUCODE),f3d_old)
|
||||
@@ -74,11 +75,13 @@ else ifeq ($(GRUCODE),f3d_new) # Fast3D 2.0H
|
||||
DEFINES += F3D_NEW=1
|
||||
else ifeq ($(GRUCODE),f3dex) # Fast3DEX
|
||||
DEFINES += F3DEX_GBI=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE), f3dex2) # Fast3DEX2
|
||||
else ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
|
||||
DEFINES += F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mori)
|
||||
$(warning Fast3DZEX is experimental. Try at your own risk.)
|
||||
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.08J / Animal Forest - Dōbutsu no Mori)
|
||||
DEFINES += F3DZEX_GBI_2=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),super3d) # Super3D
|
||||
$(warning Super3D is experimental. Try at your own risk.)
|
||||
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
|
||||
endif
|
||||
|
||||
|
||||
@@ -108,7 +111,7 @@ endif
|
||||
# NON_MATCHING - whether to build a matching, identical copy of the ROM
|
||||
# 1 - enable some alternate, more portable code that does not produce a matching ROM
|
||||
# 0 - build a matching ROM
|
||||
NON_MATCHING ?= 0
|
||||
NON_MATCHING ?= 1
|
||||
$(eval $(call validate-option,NON_MATCHING,0 1))
|
||||
|
||||
ifeq ($(TARGET_N64),0)
|
||||
@@ -168,6 +171,9 @@ endif
|
||||
|
||||
TOOLS_DIR := tools
|
||||
|
||||
# Location of official N64 libraries
|
||||
N64_LIBS_DIR ?= lib
|
||||
|
||||
# (This is a bit hacky, but a lot of rules implicitly depend
|
||||
# on tools and assets, and we use directory globs further down
|
||||
# in the makefile that we want should cover assets.)
|
||||
@@ -205,9 +211,8 @@ BUILD_DIR_BASE := build
|
||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)
|
||||
ROM := $(BUILD_DIR)/$(TARGET).z64
|
||||
ELF := $(BUILD_DIR)/$(TARGET).elf
|
||||
LIBULTRA := $(BUILD_DIR)/libultra.a
|
||||
LD_SCRIPT := sm64.ld
|
||||
MIO0_DIR := $(BUILD_DIR)/bin
|
||||
YAY0_DIR := $(BUILD_DIR)/bin
|
||||
SOUND_BIN_DIR := $(BUILD_DIR)/sound
|
||||
TEXTURE_DIR := textures
|
||||
ACTOR_DIR := actors
|
||||
@@ -217,9 +222,6 @@ LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
|
||||
SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels bin data assets asm lib sound
|
||||
BIN_DIRS := bin bin/$(VERSION)
|
||||
|
||||
ULTRA_SRC_DIRS := lib/src lib/src/math lib/asm lib/data
|
||||
ULTRA_BIN_DIRS := lib/bin
|
||||
|
||||
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
||||
|
||||
# File dependencies and variables for specific files
|
||||
@@ -288,6 +290,8 @@ else
|
||||
$(error Unable to detect a suitable MIPS toolchain installed)
|
||||
endif
|
||||
|
||||
export LD_LIBRARY_PATH=./tools
|
||||
|
||||
AS := $(CROSS)as
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CC := $(CROSS)gcc
|
||||
@@ -310,7 +314,7 @@ ifneq (,$(call find-command,cpp-10))
|
||||
else
|
||||
CPP := cpp
|
||||
endif
|
||||
LD := $(CROSS)ld
|
||||
LD := tools/mips64-elf-ld
|
||||
AR := $(CROSS)ar
|
||||
OBJDUMP := $(CROSS)objdump
|
||||
OBJCOPY := $(CROSS)objcopy
|
||||
@@ -362,7 +366,7 @@ export LANG := C
|
||||
#==============================================================================#
|
||||
|
||||
# N64 tools
|
||||
MIO0TOOL := $(TOOLS_DIR)/mio0
|
||||
YAY0TOOL := $(TOOLS_DIR)/slienc
|
||||
N64CKSUM := $(TOOLS_DIR)/n64cksum
|
||||
N64GRAPHICS := $(TOOLS_DIR)/n64graphics
|
||||
N64GRAPHICS_CI := $(TOOLS_DIR)/n64graphics_ci
|
||||
@@ -469,7 +473,7 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
||||
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
||||
|
||||
# Make sure build directory exists before compiling anything
|
||||
DUMMY != mkdir -p $(ALL_DIRS)
|
||||
@@ -529,13 +533,13 @@ $(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
|
||||
|
||||
# Compress binary file
|
||||
$(BUILD_DIR)/%.mio0: $(BUILD_DIR)/%.bin
|
||||
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
|
||||
$(call print,Compressing:,$<,$@)
|
||||
$(V)$(MIO0TOOL) $< $@
|
||||
$(V)$(YAY0TOOL) $< $@
|
||||
|
||||
# convert binary mio0 to object file
|
||||
$(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0
|
||||
$(call print,Converting MIO0 to ELF:,$<,$@)
|
||||
# convert binary szp to object file
|
||||
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
|
||||
$(call print,Converting YAY0 to ELF:,$<,$@)
|
||||
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
|
||||
@@ -744,9 +748,9 @@ $(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
|
||||
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
|
||||
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(O_FILES) $(MIO0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libultra.a $(BUILD_DIR)/libgoddard.a
|
||||
$(ELF): $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libultra.a $(BUILD_DIR)/libgoddard.a
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -lultra -lgoddard
|
||||
$(V)$(LD) -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L $(N64_LIBS_DIR) -lultra_rom -lgoddard
|
||||
|
||||
# Build ROM
|
||||
$(ROM): $(ELF)
|
||||
@@ -759,7 +763,7 @@ $(BUILD_DIR)/$(TARGET).objdump: $(ELF)
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean distclean default diff test load libultra
|
||||
.PHONY: all clean distclean default diff test load
|
||||
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
|
||||
.SECONDARY:
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ SEG_FILES := \
|
||||
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.elf) \
|
||||
$(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.elf)
|
||||
|
||||
MIO0_FILES := \
|
||||
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.mio0) \
|
||||
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.mio0) \
|
||||
$(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.mio0)
|
||||
YAY0_FILES := \
|
||||
$(SEGMENTS:%=$(BUILD_DIR)/bin/%.szp) \
|
||||
$(ACTOR_GROUPS:%=$(BUILD_DIR)/actors/%.szp) \
|
||||
$(LEVEL_FILES:%=$(BUILD_DIR)/levels/%.szp)
|
||||
|
||||
MIO0_OBJ_FILES := $(MIO0_FILES:.mio0=.mio0.o)
|
||||
YAY0_OBJ_FILES := $(YAY0_FILES:.szp=.szp.o)
|
||||
|
||||
|
||||
# --------------------------------------
|
||||
|
||||
149
asm/decompress.s
149
asm/decompress.s
@@ -1,149 +0,0 @@
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
# This file is handwritten.
|
||||
|
||||
glabel decompress
|
||||
.if VERSION_SH == 1
|
||||
lw $a3, 8($a0)
|
||||
lw $t9, 0xc($a0)
|
||||
lw $t8, 4($a0)
|
||||
add $a3, $a3, $a0
|
||||
add $t9, $t9, $a0
|
||||
move $a2, $zero
|
||||
addi $a0, $a0, 0x10
|
||||
add $t8, $t8, $a1
|
||||
.L802772C0:
|
||||
bnel $a2, $zero, .L802772D8
|
||||
slt $t1, $t0, $zero
|
||||
lw $t0, ($a0)
|
||||
li $a2, 32
|
||||
addi $a0, $a0, 4
|
||||
slt $t1, $t0, $zero
|
||||
.L802772D8:
|
||||
beql $t1, $zero, .L802772F8
|
||||
lhu $t2, ($a3)
|
||||
lb $t2, ($t9)
|
||||
addi $t9, $t9, 1
|
||||
addi $a1, $a1, 1
|
||||
b .L80277324
|
||||
sb $t2, -1($a1)
|
||||
lhu $t2, ($a3)
|
||||
.L802772F8:
|
||||
addi $a3, $a3, 2
|
||||
srl $t3, $t2, 0xc
|
||||
andi $t2, $t2, 0xfff
|
||||
sub $t1, $a1, $t2
|
||||
addi $t3, $t3, 3
|
||||
.L8027730C:
|
||||
lb $t2, -1($t1)
|
||||
addi $t3, $t3, -1
|
||||
addi $t1, $t1, 1
|
||||
addi $a1, $a1, 1
|
||||
bnez $t3, .L8027730C
|
||||
sb $t2, -1($a1)
|
||||
.L80277324:
|
||||
sll $t0, $t0, 1
|
||||
bne $a1, $t8, .L802772C0
|
||||
addi $a2, $a2, -1
|
||||
jr $ra
|
||||
nop
|
||||
.elseif VERSION_EU == 1
|
||||
lw $a3, 8($a0)
|
||||
lw $t9, 0xc($a0)
|
||||
lw $t8, 4($a0)
|
||||
add $a3, $a3, $a0
|
||||
add $t9, $t9, $a0
|
||||
move $a2, $zero
|
||||
addi $a0, $a0, 0x10
|
||||
add $t8, $t8, $a1
|
||||
.L8026ED80:
|
||||
bnezl $a2, .L8026ED98
|
||||
slt $t1, $t0, $zero
|
||||
lw $t0, ($a0)
|
||||
li $a2, 32
|
||||
addi $a0, $a0, 4
|
||||
slt $t1, $t0, $zero
|
||||
.L8026ED98:
|
||||
beql $t1, $zero, .L8026EDB8
|
||||
lhu $t2, ($a3)
|
||||
lb $t2, ($t9)
|
||||
addi $t9, $t9, 1
|
||||
addi $a1, $a1, 1
|
||||
b .L8026EDE4
|
||||
sb $t2, -1($a1)
|
||||
lhu $t2, ($a3)
|
||||
.L8026EDB8:
|
||||
addi $a3, $a3, 2
|
||||
srl $t3, $t2, 0xc
|
||||
andi $t2, $t2, 0xfff
|
||||
sub $t1, $a1, $t2
|
||||
addi $t3, $t3, 3
|
||||
.L8026EDCC:
|
||||
lb $t2, -1($t1)
|
||||
addi $t3, $t3, -1
|
||||
addi $t1, $t1, 1
|
||||
addi $a1, $a1, 1
|
||||
bnez $t3, .L8026EDCC
|
||||
sb $t2, -1($a1)
|
||||
.L8026EDE4:
|
||||
sll $t0, $t0, 1
|
||||
bne $a1, $t8, .L8026ED80
|
||||
addi $a2, $a2, -1
|
||||
jr $ra
|
||||
nop
|
||||
.else
|
||||
lw $t8, 4($a0)
|
||||
lw $a3, 8($a0)
|
||||
lw $t9, 0xc($a0)
|
||||
move $a2, $zero
|
||||
add $t8, $t8, $a1
|
||||
add $a3, $a3, $a0
|
||||
add $t9, $t9, $a0
|
||||
addi $a0, $a0, 0x10
|
||||
.L8027EF50:
|
||||
bnez $a2, .L8027EF64
|
||||
nop
|
||||
lw $t0, ($a0)
|
||||
li $a2, 32
|
||||
addi $a0, $a0, 4
|
||||
.L8027EF64:
|
||||
slt $t1, $t0, $zero
|
||||
beqz $t1, .L8027EF88
|
||||
nop
|
||||
lb $t2, ($t9)
|
||||
addi $t9, $t9, 1
|
||||
sb $t2, ($a1)
|
||||
addi $a1, $a1, 1
|
||||
b .L8027EFBC
|
||||
nop
|
||||
.L8027EF88:
|
||||
lhu $t2, ($a3)
|
||||
addi $a3, $a3, 2
|
||||
srl $t3, $t2, 0xc
|
||||
andi $t2, $t2, 0xfff
|
||||
sub $t1, $a1, $t2
|
||||
addi $t3, $t3, 3
|
||||
.L8027EFA0:
|
||||
lb $t2, -1($t1)
|
||||
addi $t3, $t3, -1
|
||||
addi $t1, $t1, 1
|
||||
sb $t2, ($a1)
|
||||
addi $a1, $a1, 1
|
||||
bnez $t3, .L8027EFA0
|
||||
nop
|
||||
.L8027EFBC:
|
||||
sll $t0, $t0, 1
|
||||
addi $a2, $a2, -1
|
||||
bne $a1, $t8, .L8027EF50
|
||||
nop
|
||||
jr $ra
|
||||
nop
|
||||
.endif
|
||||
59
asm/slidec.s
Normal file
59
asm/slidec.s
Normal file
@@ -0,0 +1,59 @@
|
||||
/******************************
|
||||
* Data Decompress Ver1.10 *
|
||||
* Programmed By Melody-Yoshi *
|
||||
******************************/
|
||||
/* How to use this function.
|
||||
void slidstart(unsigned char *,unsigned char *);
|
||||
first argument is top address of compress data.(align 4)
|
||||
next argument is top address of decompress.
|
||||
*/
|
||||
|
||||
.align 4
|
||||
|
||||
.text
|
||||
.globl slidstart
|
||||
.ent slidstart
|
||||
.set reorder
|
||||
/* ===== START! ===== */
|
||||
slidstart: lw $24,4($4) ## R24=Output size
|
||||
lw $7,8($4)
|
||||
lw $25,12($4)
|
||||
move $6,$0 ## flags=0
|
||||
add $24,$5
|
||||
add $7,$4
|
||||
add $25,$4
|
||||
add $4,16
|
||||
/* ===== MAIN LOOP ===== */
|
||||
slidemain2: bne $6,$0,codecheck2
|
||||
lw $8,($4)
|
||||
li $6,32
|
||||
add $4,4
|
||||
codecheck2: slt $9,$8,$0 ## Check MSB
|
||||
beq $9,$0,pressdata2
|
||||
lb $10,($25)
|
||||
add $25,1
|
||||
sb $10,($5)
|
||||
add $5,1
|
||||
b loopend2
|
||||
pressdata2: lhu $10,($7)
|
||||
add $7,2
|
||||
srl $11,$10,12
|
||||
and $10,0xfff
|
||||
sub $9,$5,$10 ## R9=DIST
|
||||
beq $11,$0,pressloop3
|
||||
add $11,2
|
||||
pressloop2: lb $10,-1($9)
|
||||
sub $11,1
|
||||
add $9,1
|
||||
sb $10,($5)
|
||||
add $5,1
|
||||
bne $11,$0,pressloop2
|
||||
loopend2: sll $8,1
|
||||
sub $6,1
|
||||
bne $5,$24,slidemain2
|
||||
jr $31
|
||||
pressloop3: lbu $11,($25)
|
||||
add $25,1
|
||||
add $11,18
|
||||
b pressloop2
|
||||
.end
|
||||
@@ -110,7 +110,7 @@ index a130cc04..926c0d09 100644
|
||||
+const LevelScript level_intro_entry_error_screen[] = {
|
||||
+ INIT_LEVEL(),
|
||||
+ FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
|
||||
+ LOAD_MIO0(/*seg*/ 0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd),
|
||||
+ LOAD_YAY0(/*seg*/ 0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd),
|
||||
+ ALLOC_LEVEL_POOL(),
|
||||
+
|
||||
+ AREA(/*index*/ 1, intro_geo_error_screen),
|
||||
|
||||
126
include/PR/PRimage.h
Normal file
126
include/PR/PRimage.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 1997/11/26 00:30:50 $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/PRimage.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __GL_IMAGE_H__
|
||||
#define __GL_IMAGE_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Defines for image files . . . .
|
||||
*
|
||||
* Paul Haeberli - 1984
|
||||
* Look in /usr/people/4Dgifts/iristools/imgtools for example code!
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define IMAGIC 0732
|
||||
|
||||
/* colormap of images */
|
||||
#define CM_NORMAL 0 /* file contains rows of values which
|
||||
* are either RGB values (zsize == 3)
|
||||
* or greyramp values (zsize == 1) */
|
||||
#define CM_DITHERED 1
|
||||
#define CM_SCREEN 2 /* file contains data which is a screen
|
||||
* image; getrow returns buffer which
|
||||
* can be displayed directly with
|
||||
* writepixels */
|
||||
#define CM_COLORMAP 3 /* a colormap file */
|
||||
|
||||
#define TYPEMASK 0xff00
|
||||
#define BPPMASK 0x00ff
|
||||
#define ITYPE_VERBATIM 0x0000
|
||||
#define ITYPE_RLE 0x0100
|
||||
#define ISRLE(type) (((type) & 0xff00) == ITYPE_RLE)
|
||||
#define ISVERBATIM(type) (((type) & 0xff00) == ITYPE_VERBATIM)
|
||||
#define BPP(type) ((type) & BPPMASK)
|
||||
#define RLE(bpp) (ITYPE_RLE | (bpp))
|
||||
#define VERBATIM(bpp) (ITYPE_VERBATIM | (bpp))
|
||||
#define IBUFSIZE(pixels) (((pixels)+((pixels)>>6))<<2)
|
||||
#define RLE_NOP 0x00
|
||||
|
||||
#define ierror(p) (((p)->flags&_IOERR)!=0)
|
||||
#define ifileno(p) ((p)->file)
|
||||
#define getpix(p) (--(p)->cnt>=0 ? *(p)->ptr++ : ifilbuf(p))
|
||||
#define putpix(p,x) (--(p)->cnt>=0 \
|
||||
? ((int)(*(p)->ptr++=(unsigned)(x))) \
|
||||
: iflsbuf(p,(unsigned)(x)))
|
||||
|
||||
typedef struct {
|
||||
unsigned short imagic; /* stuff saved on disk . . */
|
||||
unsigned short type;
|
||||
unsigned short dim;
|
||||
unsigned short xsize;
|
||||
unsigned short ysize;
|
||||
unsigned short zsize;
|
||||
unsigned long min;
|
||||
unsigned long max;
|
||||
unsigned long wastebytes;
|
||||
char name[80];
|
||||
unsigned long colormap;
|
||||
|
||||
long file; /* stuff used in core only */
|
||||
unsigned short flags;
|
||||
short dorev;
|
||||
short x;
|
||||
short y;
|
||||
short z;
|
||||
short cnt;
|
||||
unsigned short *ptr;
|
||||
unsigned short *base;
|
||||
unsigned short *tmpbuf;
|
||||
unsigned long offset;
|
||||
unsigned long rleend; /* for rle images */
|
||||
unsigned long *rowstart; /* for rle images */
|
||||
long *rowsize; /* for rle images */
|
||||
} IMAGE;
|
||||
|
||||
IMAGE *icreate();
|
||||
/*
|
||||
* IMAGE *iopen(char *file, char *mode, unsigned int type, unsigned int dim,
|
||||
* unsigned int xsize, unsigned int ysize, unsigned int zsize);
|
||||
* IMAGE *fiopen(int f, char *mode, unsigned int type, unsigned int dim,
|
||||
* unsigned int xsize, unsigned int ysize, unsigned int zsize);
|
||||
*
|
||||
* ...while iopen and fiopen can take an extended set of parameters, the
|
||||
* last five are optional, so a more correct prototype would be:
|
||||
*
|
||||
*/
|
||||
IMAGE *iopen(char *file, char *mode, ...);
|
||||
IMAGE *fiopen(int f, char *mode, ...);
|
||||
|
||||
/*
|
||||
*
|
||||
* unsigned short *ibufalloc(IMAGE *image);
|
||||
* int ifilbuf(IMAGE *image);
|
||||
* int iflush(IMAGE *image);
|
||||
* unsigned int iflsbuf(IMAGE *image, unsigned int c);
|
||||
* void isetname(IMAGE *image, char *name);
|
||||
* void isetcolormap(IMAGE *image, int colormap);
|
||||
*/
|
||||
|
||||
int iclose(IMAGE *image);
|
||||
int putrow(IMAGE *image, unsigned short *buffer, unsigned int y, unsigned int z);
|
||||
int getrow(IMAGE *image, unsigned short *buffer, unsigned int y, unsigned int z);
|
||||
|
||||
/*
|
||||
IMAGE *iopen();
|
||||
IMAGE *icreate();
|
||||
*/
|
||||
|
||||
unsigned short *ibufalloc();
|
||||
|
||||
#define IMAGEDEF /* for backwards compatibility */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !__GL_IMAGE_H__ */
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 1997/02/11 08:15:34 $
|
||||
* $Source: /disk6/Master/cvsmdev2/PR/include/R4300.h,v $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/R4300.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
899
include/PR/abi.h
899
include/PR/abi.h
File diff suppressed because it is too large
Load Diff
129
include/PR/gbi-poslight.h
Normal file
129
include/PR/gbi-poslight.h
Normal file
@@ -0,0 +1,129 @@
|
||||
#ifndef _GBI_POSLIGHT_H_
|
||||
#define _GBI_POSLIGHT_H_
|
||||
|
||||
/* version 990705 */
|
||||
#define G_LIGHTING_POSITIONAL 0x00400000
|
||||
#ifdef _LANGUAGE_ASSEMBLY
|
||||
#define G_LIGHTING_POSITIONAL_H (G_LIGHTING_POSITIONAL/0x10000)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
unsigned char col[3]; /* diffuse light value (rgba) */
|
||||
unsigned char kc; /* positional lighting enable flag & constant attenuation Kc */
|
||||
unsigned char colc[3]; /* copy of diffuse light value (rgba) */
|
||||
unsigned char kl; /* linear attenuation Kl */
|
||||
short pos[3]; /* light position x, y, z */
|
||||
unsigned char kq; /* quadratic attenuation Kq */
|
||||
char reserved1;
|
||||
} PosLight_t;
|
||||
|
||||
typedef union {
|
||||
PosLight_t p;
|
||||
Light_t l;
|
||||
long long int force_structure_alignment[2];
|
||||
} PosLight;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[7];
|
||||
} PosLightsn;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[1];
|
||||
} PosLights0;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[1];
|
||||
} PosLights1;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[2];
|
||||
} PosLights2;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[3];
|
||||
} PosLights3;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[4];
|
||||
} PosLights4;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[5];
|
||||
} PosLights5;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[6];
|
||||
} PosLights6;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
PosLight l[7];
|
||||
} PosLights7;
|
||||
|
||||
#define _gSPLightColor2(pkt, n, col1, col2) \
|
||||
{\
|
||||
gMoveWd(pkt, G_MW_LIGHTCOL, G_MWO_a##n, col1);\
|
||||
gMoveWd(pkt, G_MW_LIGHTCOL, G_MWO_b##n, col2);\
|
||||
}
|
||||
#define _gsSPLightColor2(n, col1, col2) \
|
||||
gsMoveWd(G_MW_LIGHTCOL, G_MWO_a##n, col1),\
|
||||
gsMoveWd(G_MW_LIGHTCOL, G_MWO_b##n, col2)
|
||||
|
||||
#define _gdSPDefAmbient(ar,ag,ab) {{ {ar,ag,ab},0,{ar,ag,ab},0}}
|
||||
#define _gdSPDefPosLight(r,g,b,x,y,z,c,l,q) {{ {r,g,b},c,{r,g,b},l,{x,y,z},q,0 }}
|
||||
#define _gdSPDefInfLight(r,g,b,x,y,z) {{ {r,g,b},0,{r,g,b},0,{((x)<<8)|((y)&0xff),(z)<<8,0},0,0}}
|
||||
#define gdSPDefPosLights0(ar,ag,ab) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(0,0,0,0,0,0,0,0,0)} }
|
||||
#define gdSPDefPosLights1(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1)} }
|
||||
#define gdSPDefPosLights2(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2)} }
|
||||
#define gdSPDefPosLights3(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \
|
||||
_gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3)} }
|
||||
#define gdSPDefPosLights4(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \
|
||||
_gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \
|
||||
_gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4)} }
|
||||
#define gdSPDefPosLights5(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \
|
||||
_gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \
|
||||
_gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \
|
||||
_gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5)} }
|
||||
#define gdSPDefPosLights6(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \
|
||||
_gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \
|
||||
_gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \
|
||||
_gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \
|
||||
_gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6)} }
|
||||
#define gdSPDefPosLights7(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6,r7,g7,b7,x7,y7,z7,c7,l7,q7) \
|
||||
{ _gdSPDefAmbient(ar,ag,ab), \
|
||||
{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \
|
||||
_gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \
|
||||
_gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \
|
||||
_gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \
|
||||
_gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \
|
||||
_gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6), \
|
||||
_gdSPDefPosLight(r7,g7,b7,x7,y7,z7,c7,l7,q7)} }
|
||||
|
||||
#endif /* _GBI_POSLIGHT_H_ */
|
||||
@@ -2477,11 +2477,11 @@ typedef union {
|
||||
gsSPLoadUcodeEx((uc_start), (uc_dstart), SP_UCODE_DATA_SIZE)
|
||||
|
||||
#define gSPLoadUcodeL(pkt, ucode) \
|
||||
gSPLoadUcode((pkt), OS_K0_TO_PHYSICAL(&##ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&##ucode##DataStart))
|
||||
gSPLoadUcode((pkt), OS_K0_TO_PHYSICAL(&ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&ucode##DataStart))
|
||||
#define gsSPLoadUcodeL(ucode) \
|
||||
gsSPLoadUcode(OS_K0_TO_PHYSICAL(&##ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&##ucode##DataStart))
|
||||
gsSPLoadUcode(OS_K0_TO_PHYSICAL(&ucode##TextStart), \
|
||||
OS_K0_TO_PHYSICAL(&ucode##DataStart))
|
||||
#endif
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
@@ -4795,6 +4795,10 @@ typedef union {
|
||||
#define gDPNoOpTag(pkt, tag) gDPParam(pkt, G_NOOP, tag)
|
||||
#define gsDPNoOpTag(tag) gsDPParam(G_NOOP, tag)
|
||||
|
||||
#if defined(F3DZEX_GBI_2) || defined(F3DZEX_NON_GBI_2) || defined(L3DZEX_GBI)
|
||||
#include "gbi-poslight.h"
|
||||
#endif
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
|
||||
|
||||
365
include/PR/gt.h
Normal file
365
include/PR/gt.h
Normal file
@@ -0,0 +1,365 @@
|
||||
|
||||
/*
|
||||
* Copyright 1995, Silicon Graphics, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
|
||||
* States. Use of a copyright notice is precautionary only and does not
|
||||
* imply publication or disclosure.
|
||||
*
|
||||
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
|
||||
* Use, duplication or disclosure by the Government is subject to restrictions
|
||||
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
|
||||
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
|
||||
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
|
||||
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
|
||||
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
|
||||
*
|
||||
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
|
||||
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
|
||||
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
|
||||
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
|
||||
* GRAPHICS, INC.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* File: gt.h
|
||||
* Creator: hsa@sgi.com
|
||||
* Create Date: Thu Oct 12 15:48:14 PDT 1995
|
||||
*
|
||||
* This file defines the GBI for the TURBO 3D graphics microcode.
|
||||
* The turbo microcode is a special FEATURE-LIMITED microcode designed
|
||||
* for specific applications. It is not for general use.
|
||||
*
|
||||
* (see XXX for more information)
|
||||
*
|
||||
*/
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 1998/05/28 00:14:50 $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/gt.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _GT_H_
|
||||
#define _GT_H_
|
||||
|
||||
/* this file should be #included AFTER gbi.h */
|
||||
|
||||
#include "sptask.h"
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
/* the following #defines seem out of order, but we need them
|
||||
* for the microcode.
|
||||
*/
|
||||
|
||||
/*
|
||||
* object state field: rendState
|
||||
*
|
||||
* This flag word is built up out of the bits from a
|
||||
* subset of the G_SETGEOMETRYMODE flags from gbi.h.
|
||||
*
|
||||
* When each of these bits is '1', the comments below explain
|
||||
* the effect on the triangles.
|
||||
*/
|
||||
#define GT_ZBUFFER G_ZBUFFER
|
||||
#define GT_TEXTURE G_TEXTURE_ENABLE /* texture ON */
|
||||
#define GT_CULL_BACK G_CULL_BACK /* reject backfaces */
|
||||
#define GT_SHADING_SMOOTH G_SHADING_SMOOTH /* smooth shade ON */
|
||||
|
||||
/*
|
||||
* object state field: textureState
|
||||
*
|
||||
* The lower 3 bits of this flag word contain the texture tile number
|
||||
* to be used. All triangles of an object are rendered with the same
|
||||
* texture tile.
|
||||
*/
|
||||
|
||||
/*
|
||||
* object state field: flag
|
||||
*
|
||||
* This is a group of what would be pad bits. We use them for some
|
||||
* flag bits.
|
||||
*/
|
||||
#define GT_FLAG_NOMTX 0x01 /* don't load the matrix */
|
||||
#define GT_FLAG_NO_XFM 0x02 /* load vtx, use verbatim */
|
||||
#define GT_FLAG_XFM_ONLY 0x04 /* xform vtx, write to *TriN */
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* turbo 3D ucode: */
|
||||
extern long long int gspTurbo3DTextStart[], gspTurbo3DTextEnd[];
|
||||
extern long long int gspTurbo3DDataStart[], gspTurbo3DDataEnd[];
|
||||
extern long long int gspTurbo3D_dramTextStart[], gspTurbo3D_dramTextEnd[];
|
||||
extern long long int gspTurbo3D_dramDataStart[], gspTurbo3D_dramDataEnd[];
|
||||
extern long long int gspTurbo3D_fifoTextStart[], gspTurbo3D_fifoTextEnd[];
|
||||
extern long long int gspTurbo3D_fifoDataStart[], gspTurbo3D_fifoDataEnd[];
|
||||
|
||||
/*
|
||||
* This is the global state structure. It's definition carefully
|
||||
* matches the ucode, so if this structure changes, you must also change
|
||||
* the ucode.
|
||||
*/
|
||||
typedef struct {
|
||||
u16 perspNorm; /* persp normalization */
|
||||
u16 pad0;
|
||||
u32 flag;
|
||||
Gfx rdpOthermode;
|
||||
u32 segBases[16]; /* table of segment base addrs (SEE NOTE!) */
|
||||
Vp viewport; /* the viewport to use */
|
||||
Gfx *rdpCmds; /* block of RDP data, process if !NULL
|
||||
* block terminated by gDPEndDisplayList()
|
||||
* (This is a segment address)
|
||||
*/
|
||||
} gtGlobState_t;
|
||||
|
||||
/* NOTE:
|
||||
* Although there are 16 segment table entries, the first one (segment 0)
|
||||
* is reserved for physical memory mapping. You should not segment 0
|
||||
* to anything other than 0x0.
|
||||
*/
|
||||
|
||||
typedef union {
|
||||
gtGlobState_t sp;
|
||||
long long int force_structure_alignment;
|
||||
} gtGlobState;
|
||||
|
||||
|
||||
/*
|
||||
* This is the 'state' structure associated with each object
|
||||
* to be rendered. It's definition carefully matches the
|
||||
* ucode, so if this structure changes, you must also change
|
||||
* the gtoff.c tool and the ucode.
|
||||
*/
|
||||
typedef struct {
|
||||
u32 renderState; /* render state */
|
||||
u32 textureState; /* texture state */
|
||||
u8 vtxCount; /* how many verts? */
|
||||
u8 vtxV0; /* where to load verts? */
|
||||
u8 triCount; /* how many tris? */
|
||||
u8 flag;
|
||||
Gfx *rdpCmds; /* ptr (segment address) to RDP DL */
|
||||
Gfx rdpOthermode;
|
||||
Mtx transform; /* the transform matrix to use */
|
||||
} gtState_t;
|
||||
|
||||
typedef union {
|
||||
gtState_t sp;
|
||||
long long int force_structure_alignment;
|
||||
} gtState;
|
||||
|
||||
/* gtStateLite : same as gtState, but no matrix (see flags below) */
|
||||
/* this structure must be identical to gtState! (bad) */
|
||||
typedef struct {
|
||||
u32 renderState; /* render state */
|
||||
u32 textureState; /* texture state */
|
||||
u8 vtxCount; /* how many verts? */
|
||||
u8 vtxV0; /* where to load verts? */
|
||||
u8 triCount; /* how many tris? */
|
||||
u8 flag;
|
||||
Gfx *rdpCmds; /* ptr (segment address) to RDP DL */
|
||||
Gfx rdpOthermode;
|
||||
} gtStateL_t;
|
||||
|
||||
typedef union {
|
||||
gtStateL_t sp;
|
||||
long long int force_structure_alignment;
|
||||
} gtStateL;
|
||||
|
||||
/*
|
||||
* The vertex list for the turbo display list uses the
|
||||
* Vtx struct in gbi.h
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This structure represents a single triangle, part of the
|
||||
* triangle list of the object to be rendered.
|
||||
*
|
||||
* NOTE: The triangle list MUST be aligned to an 8-byte boundary.
|
||||
* Since this structure is only 4 bytes, we are REQUIRING that
|
||||
* this structure only be used as an array of triangles, and we
|
||||
* depend on the MIPS C compiler (which always aligns arrays to
|
||||
* 8-byte boundaries). THIS IS DANGEROUS!!!!
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
u8 v0, v1, v2, flag; /* flag is which one for flat shade */
|
||||
} gtTriN;
|
||||
|
||||
|
||||
/*
|
||||
* This structure represents the transformed points. It is the format
|
||||
* of the points written out when GT_FLAG_XFM_ONLY is set, as well as
|
||||
* the format expected when GT_FLAG_NO_XFM is used.
|
||||
*
|
||||
* NOTE: The size and layout of these points is very similar to Vtx,
|
||||
* except the screen coordinates overwrite the x,y,z,pad fields.
|
||||
* (we could consider adding to the Vtx union, but we want to keep
|
||||
* turbo stuff out of gbi.h)
|
||||
*
|
||||
* NOTE: The z is a special format. It can be used to compare vertices
|
||||
* for sorting, but it should not be used for other purposes. If modified,
|
||||
* the z-buffer hardware might not understand the data.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
short int xscrn; /* x,y screen coordinates are SSSS10.2 */
|
||||
short int yscrn;
|
||||
int zscrn; /* z screen is S15.16 */
|
||||
|
||||
short int s; /* transformed texture coord, S10.5 */
|
||||
short int t;
|
||||
|
||||
u8 r; /* color (or normal) */
|
||||
u8 g;
|
||||
u8 b;
|
||||
u8 a;
|
||||
} gtVtxOut_t;
|
||||
|
||||
/* see "Data Structure" comment in gbi.h for information about why
|
||||
* we use this union.
|
||||
*/
|
||||
typedef union {
|
||||
gtVtxOut_t v;
|
||||
long long int force_structure_alignment;
|
||||
} gtVtxOut;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* state field: rdpOthermode
|
||||
*
|
||||
* This is one of the trickier state fields. The turbo interface
|
||||
* requires the RDP othermode command to be cached by the host,
|
||||
* therefore we provide a different interface in libultra to help cache
|
||||
* this in the gt state (this word is just bits, you could pack them
|
||||
* on your own).
|
||||
*
|
||||
* gtStateSetOthermode() accomplishs this, taking as arguments
|
||||
* the state, one of the following mode enums, and a piece of data
|
||||
* (othermode parameters from gbi.h).
|
||||
*
|
||||
* By definition, the othermode word from the gt state structure is sent
|
||||
* to the RDP *before* any RDP commands from the rdpCmds[] field. The
|
||||
* othermode is *always* sent.
|
||||
*
|
||||
* Stated another way, NONE of the gbi RDP othermode commands equivalent
|
||||
* to those listed here are allowed in the rdpCmd[] field of the
|
||||
* gt state structure.
|
||||
*
|
||||
* Notice also that many of these commands do not make sense for
|
||||
* the turbo ucode (they control features not supported, like mip-mapping).
|
||||
* They are only included here for completeness.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
GT_CLEAR, /* special gt mode, clears othermode state */
|
||||
GT_ALPHACOMPARE,
|
||||
GT_ZSRCSEL,
|
||||
GT_RENDERMODE,
|
||||
GT_ALPHADITHER,
|
||||
GT_RGBDITHER,
|
||||
GT_COMBKEY,
|
||||
GT_TEXTCONV,
|
||||
GT_TEXTFILT,
|
||||
GT_TEXTLUT,
|
||||
GT_TEXTLOD,
|
||||
GT_TEXTDETAIL,
|
||||
GT_TEXTPERSP,
|
||||
GT_CYCLETYPE,
|
||||
GT_PIPELINE
|
||||
} gtStateOthermode_t;
|
||||
|
||||
/*
|
||||
* This call builds up an othermode command word. The 'mode' is one of
|
||||
* the above modes, the 'data' field comes from gbi.h, it is the data
|
||||
* field for the equivalent gbi setothermode macro.
|
||||
*/
|
||||
extern void gtStateSetOthermode(Gfx *om, gtStateOthermode_t mode, int data);
|
||||
|
||||
/*
|
||||
* This call dumps a turbo display list for use with gbi2mem and RSPSIM
|
||||
*/
|
||||
#define GT_DUMPTURBO_HANGAFTER 64
|
||||
#define GT_DUMPTURBO_NOTEXTURES 128
|
||||
extern void gtDumpTurbo(OSTask *tp,u8 flags);
|
||||
|
||||
/*
|
||||
* Special macros to init othermode words to all 0's, a good default
|
||||
* value.
|
||||
*/
|
||||
#define gDPClearOtherMode(pkt) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = _SHIFTL(G_RDPSETOTHERMODE, 24, 8); \
|
||||
_g->words.w1 = 0x0; \
|
||||
}
|
||||
|
||||
#define gsDPClearOtherMode() \
|
||||
{ \
|
||||
_SHIFTL(G_RDPSETOTHERMODE, 24, 8), 0x0 \
|
||||
}
|
||||
|
||||
/*
|
||||
* Special macros to end DP blocks (see above). These commands
|
||||
* generate all 0's, which the turbo ucode looks for. They *aren't*
|
||||
* real DP commands!
|
||||
*/
|
||||
#define gDPEndDisplayList(pkt) gSPNoOp(pkt)
|
||||
#define gsDPEndDisplayList() gsSPNoOp()
|
||||
|
||||
/*
|
||||
* This structure is a turbo 'object', the turbo display list is
|
||||
* simply a list of these.
|
||||
*
|
||||
* NOTE: All pointers are segment addresses
|
||||
*
|
||||
* NOTE: If (statep->flag & GT_FLAG_XFM_ONLY), the trip field is
|
||||
* interpreted as a pointer to gtVtxOut[] that can be used to store
|
||||
* the transformed points. (statep->triCount should be 0, else bad
|
||||
* things could happen...)
|
||||
*
|
||||
* NOTE: If (statep->flag & GT_FLAG_NO_XFM), the vtxp field is
|
||||
* interpreted as a pointer to gtVtxOut[] that can be used to load
|
||||
* pre-transformed points.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
gtGlobState *gstatep; /* global state, usually NULL */
|
||||
gtState *statep; /* if this is NULL, end object processing */
|
||||
Vtx *vtxp; /* if this is NULL, use points in buffer */
|
||||
gtTriN *trip; /* if this is NULL, use tris in buffer */
|
||||
} gtGfx_t;
|
||||
|
||||
typedef union {
|
||||
gtGfx_t obj;
|
||||
long long int force_structure_alignment;
|
||||
} gtGfx;
|
||||
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#ifdef _LANGUAGE_ASSEMBLY
|
||||
#include <PR/gtoff.h>
|
||||
#endif /* _LANGUAGE_ASSEMBLY */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif /* _LANGUAGE_C_PLUS_PLUS */
|
||||
|
||||
#ifdef _LANGUAGE_MAKEROM
|
||||
#endif /* _LANGUAGE_MAKEROM */
|
||||
|
||||
#endif /* _GT_H_ */
|
||||
12
include/PR/gtoff.h
Normal file
12
include/PR/gtoff.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/* GENERATED FILE, DO NOT EDIT! */
|
||||
|
||||
/* gtState_t structure offsets for assembly language: */
|
||||
#define GT_STATE_SIZE 176
|
||||
#define GT_STATE_OFF_RENDSTATE 0x00
|
||||
#define GT_STATE_OFF_TEXSTATE 0x08
|
||||
#define GT_STATE_OFF_VTXCOUNT 0x10
|
||||
#define GT_STATE_OFF_VTXV0 0x11
|
||||
#define GT_STATE_OFF_TRICOUNT 0x12
|
||||
#define GT_STATE_OFF_RDPCMDS 0x18
|
||||
#define GT_STATE_OFF_OTHERMODE 0x20
|
||||
#define GT_STATE_OFF_TRANSFORM 0x30
|
||||
288
include/PR/gu.h
288
include/PR/gu.h
@@ -1,29 +1,269 @@
|
||||
#ifndef _ULTRA64_GU_H_
|
||||
#define _ULTRA64_GU_H_
|
||||
#ifndef _GU_H_
|
||||
#define _GU_H_
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1994, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.48 $
|
||||
* $Date: 1999/07/13 08:00:20 $
|
||||
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/gu.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#include <PR/mbi.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/sptask.h>
|
||||
|
||||
#define GU_PI 3.1415926
|
||||
/* Functions */
|
||||
|
||||
void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect,
|
||||
float near, float far, float scale);
|
||||
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near,
|
||||
float far, float scale);
|
||||
void guOrtho(Mtx *m, float left, float right, float bottom, float top,
|
||||
float near, float far, float scale);
|
||||
void guTranslate(Mtx *m, float x, float y, float z);
|
||||
void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
void guScale(Mtx *m, float x, float y, float z);
|
||||
void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
void guMtxIdent(Mtx *m);
|
||||
void guMtxIdentF(float mf[4][4]);
|
||||
void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
void guNormalize(float *, float *, float *);
|
||||
|
||||
/* Used only in Fast3DEX2 */
|
||||
void guLookAtReflect (Mtx *m, LookAt *l, float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#define M_PI 3.14159265358979323846
|
||||
#define M_DTOR (3.14159265358979323846/180.0)
|
||||
|
||||
#define FTOFIX32(x) (long)((x) * (float)0x00010000)
|
||||
#define FIX32TOF(x) ((float)(x) * (1.0f / (float)0x00010000))
|
||||
#define FTOFRAC8(x) ((int) MIN(((x) * (128.0f)), 127.0f) & 0xff)
|
||||
|
||||
#define FILTER_WRAP 0
|
||||
#define FILTER_CLAMP 1
|
||||
|
||||
#define RAND(x) (guRandom()%x) /* random number between 0 to x */
|
||||
|
||||
/*
|
||||
* Data Structures
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned char *base;
|
||||
int fmt, siz;
|
||||
int xsize, ysize;
|
||||
int lsize;
|
||||
/* current tile info */
|
||||
int addr;
|
||||
int w, h;
|
||||
int s, t;
|
||||
} Image;
|
||||
|
||||
typedef struct {
|
||||
float col[3];
|
||||
float pos[3];
|
||||
float a1, a2; /* actual color = col/(a1*dist + a2) */
|
||||
} PositionalLight;
|
||||
|
||||
|
||||
/*
|
||||
* Function Prototypes
|
||||
*/
|
||||
|
||||
extern int guLoadTextureBlockMipMap(Gfx **glist, unsigned char *tbuf, Image *im,
|
||||
unsigned char startTile, unsigned char pal, unsigned char cms,
|
||||
unsigned char cmt, unsigned char masks, unsigned char maskt,
|
||||
unsigned char shifts, unsigned char shiftt, unsigned char cfs,
|
||||
unsigned char cft);
|
||||
|
||||
extern int guGetDPLoadTextureTileSz (int ult, int lrt);
|
||||
extern void guDPLoadTextureTile (Gfx *glistp, void *timg,
|
||||
int texl_fmt, int texl_size,
|
||||
int img_width, int img_height,
|
||||
int uls, int ult, int lrs, int lrt,
|
||||
int palette,
|
||||
int cms, int cmt,
|
||||
int masks, int maskt,
|
||||
int shifts, int shiftt);
|
||||
|
||||
|
||||
/*
|
||||
* matrix operations:
|
||||
*
|
||||
* The 'F' version is floating point, in case the application wants
|
||||
* to do matrix manipulations and convert to fixed-point at the last
|
||||
* minute.
|
||||
*/
|
||||
extern void guMtxIdent(Mtx *m);
|
||||
extern void guMtxIdentF(float mf[4][4]);
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustum(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustumF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guLookAt(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtF(float mf[4][4], float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtReflect(Mtx *m, LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtHilite(Mtx *m, LookAt *l, Hilite *h,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtHiliteF(float mf[4][4], LookAt *l, Hilite *h,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtStereo(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guLookAtStereoF(float mf[4][4],
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
extern void guRotateF(float mf[4][4], float a, float x, float y, float z);
|
||||
extern void guRotateRPY(Mtx *m, float r, float p, float y);
|
||||
extern void guRotateRPYF(float mf[4][4], float r, float p, float h);
|
||||
extern void guAlign(Mtx *m, float a, float x, float y, float z);
|
||||
extern void guAlignF(float mf[4][4], float a, float x, float y, float z);
|
||||
extern void guScale(Mtx *m, float x, float y, float z);
|
||||
extern void guScaleF(float mf[4][4], float x, float y, float z);
|
||||
extern void guTranslate(Mtx *m, float x, float y, float z);
|
||||
extern void guTranslateF(float mf[4][4], float x, float y, float z);
|
||||
extern void guPosition(Mtx *m, float r, float p, float h, float s,
|
||||
float x, float y, float z);
|
||||
extern void guPositionF(float mf[4][4], float r, float p, float h, float s,
|
||||
float x, float y, float z);
|
||||
extern void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
extern void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
extern void guMtxCatF(float m[4][4], float n[4][4], float r[4][4]);
|
||||
extern void guMtxCatL(Mtx *m, Mtx *n, Mtx *res);
|
||||
extern void guMtxXFMF(float mf[4][4], float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
extern void guMtxXFML(Mtx *m, float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
|
||||
/* vector utility: */
|
||||
extern void guNormalize(float *x, float *y, float *z);
|
||||
|
||||
/* light utilities: */
|
||||
void guPosLight(PositionalLight *pl, Light *l,
|
||||
float xOb, float yOb, float zOb);
|
||||
void guPosLightHilite(PositionalLight *pl1, PositionalLight *pl2,
|
||||
Light *l1, Light *l2,
|
||||
LookAt *l, Hilite *h,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xOb, float yOb, float zOb,
|
||||
float xUp, float yUp, float zUp,
|
||||
int twidth, int theight);
|
||||
extern int guRandom(void);
|
||||
|
||||
/*
|
||||
* Math functions
|
||||
*/
|
||||
extern float sinf(float angle);
|
||||
extern float cosf(float angle);
|
||||
extern signed short sins (unsigned short angle);
|
||||
extern signed short coss (unsigned short angle);
|
||||
extern float sqrtf(float value);
|
||||
#ifdef __sgi
|
||||
#pragma intrinsic(sqrtf);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dump routines for low-level display lists
|
||||
*/
|
||||
/* flag values for guParseRdpDL() */
|
||||
#define GU_PARSERDP_VERBOSE 1
|
||||
#define GU_PARSERDP_PRAREA 2
|
||||
#define GU_PARSERDP_PRHISTO 4
|
||||
#define GU_PARSERDP_DUMPONLY 32 /* doesn't need to be same as */
|
||||
/* GU_PARSEGBI_DUMPOLNY, but this */
|
||||
/* allows app to use interchangeably */
|
||||
|
||||
extern void guParseRdpDL(u64 *rdp_dl, u64 nbytes, u8 flags);
|
||||
extern void guParseString(char *StringPointer, u64 nbytes);
|
||||
|
||||
/*
|
||||
* NO LONGER SUPPORTED,
|
||||
* use guParseRdpDL with GU_PARSERDP_DUMPONLY flags
|
||||
*/
|
||||
/* extern void guDumpRawRdpDL(u64 *rdp_dl, u64 nbytes); */
|
||||
|
||||
/* flag values for guBlinkRdpDL() */
|
||||
#define GU_BLINKRDP_HILITE 1
|
||||
#define GU_BLINKRDP_EXTRACT 2
|
||||
|
||||
extern void
|
||||
guBlinkRdpDL(u64 *rdp_dl_in, u64 nbytes_in,
|
||||
u64 *rdp_dl_out, u64 *nbytes_out,
|
||||
u32 x, u32 y, u32 radius,
|
||||
u8 red, u8 green, u8 blue,
|
||||
u8 flags);
|
||||
|
||||
/* flag values for guParseGbiDL() */
|
||||
#define GU_PARSEGBI_ROWMAJOR 1
|
||||
#define GU_PARSEGBI_NONEST 2
|
||||
#define GU_PARSEGBI_FLTMTX 4
|
||||
#define GU_PARSEGBI_SHOWDMA 8
|
||||
#define GU_PARSEGBI_ALLMTX 16
|
||||
#define GU_PARSEGBI_DUMPONLY 32
|
||||
/*
|
||||
#define GU_PARSEGBI_HANGAFTER 64
|
||||
#define GU_PARSEGBI_NOTEXTURES 128
|
||||
*/
|
||||
extern void guParseGbiDL(u64 *gbi_dl, u32 nbytes, u8 flags);
|
||||
extern void guDumpGbiDL(OSTask *tp,u8 flags);
|
||||
|
||||
#define GU_PARSE_GBI_TYPE 1
|
||||
#define GU_PARSE_RDP_TYPE 2
|
||||
#define GU_PARSE_READY 3
|
||||
#define GU_PARSE_MEM_BLOCK 4
|
||||
#define GU_PARSE_ABI_TYPE 5
|
||||
#define GU_PARSE_STRING_TYPE 6
|
||||
|
||||
typedef struct {
|
||||
int dataSize;
|
||||
int dlType;
|
||||
int flags;
|
||||
u32 paddr;
|
||||
} guDLPrintCB;
|
||||
|
||||
void guSprite2DInit(uSprite *SpritePointer,
|
||||
void *SourceImagePointer,
|
||||
void *TlutPointer,
|
||||
int Stride,
|
||||
int SubImageWidth,
|
||||
int SubImageHeight,
|
||||
int SourceImageType,
|
||||
int SourceImageBitSize,
|
||||
int SourceImageOffsetS,
|
||||
int SourceImageOffsetT);
|
||||
|
||||
#endif /* !_GU_H_ */
|
||||
|
||||
631
include/PR/gzsort.h
Normal file
631
include/PR/gzsort.h
Normal file
File diff suppressed because it is too large
Load Diff
280
include/PR/leo.h
Normal file
280
include/PR/leo.h
Normal file
@@ -0,0 +1,280 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
$RCSfile: leo.h,v $
|
||||
$Revision: 1.29 $
|
||||
$Date: 1998/12/21 07:30:15 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _LEO_H_
|
||||
#define _LEO_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/os.h>
|
||||
#include <PR/leoappli.h>
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type definitions
|
||||
*
|
||||
*/
|
||||
typedef u32 LEOError;
|
||||
|
||||
typedef u8 LEOSpdlMode;
|
||||
|
||||
typedef u8 LEOStatus;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 drive; /* version of hw */
|
||||
u8 driver; /* version of sw */
|
||||
u8 deviceType; /* dev type, always 00 */
|
||||
u8 ndevices; /* # of devices, always 01 */
|
||||
} LEOVersion;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 startLBA;
|
||||
u32 endLBA;
|
||||
u32 nbytes;
|
||||
} LEOCapacity;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 pad;
|
||||
u8 yearhi;
|
||||
u8 yearlo;
|
||||
u8 month;
|
||||
u8 day;
|
||||
u8 hour;
|
||||
u8 minute;
|
||||
u8 second;
|
||||
} LEODiskTime;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u64 lineNumber;
|
||||
LEODiskTime time;
|
||||
} LEOSerialNum;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 gameName[4];
|
||||
u8 gameVersion;
|
||||
u8 diskNumber;
|
||||
u8 ramUsage;
|
||||
u8 diskUsage;
|
||||
LEOSerialNum serialNumber;
|
||||
u8 company[2];
|
||||
u8 freeArea[6];
|
||||
} LEODiskID;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LEOCmdHeader header;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 lba;
|
||||
u32 xfer_blks;
|
||||
void *buff_ptr;
|
||||
u32 rw_bytes;
|
||||
#ifdef _LONGCMD
|
||||
u32 size;
|
||||
#endif
|
||||
} readwrite;
|
||||
struct
|
||||
{
|
||||
u32 lba;
|
||||
} seek;
|
||||
struct
|
||||
{
|
||||
void *buffer_pointer;
|
||||
} readdiskid;
|
||||
LEODiskTime time;
|
||||
struct
|
||||
{
|
||||
u8 reserve1;
|
||||
u8 reserve2;
|
||||
u8 standby_time;
|
||||
u8 sleep_time;
|
||||
u32 reserve3;
|
||||
} modeselect;
|
||||
|
||||
} data;
|
||||
|
||||
} LEOCmd;
|
||||
|
||||
|
||||
#define _nbytes readwrite.rw_bytes
|
||||
#define _result header.status
|
||||
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
#define LEO_SW_VERSION 6 /* This will be returned by */
|
||||
/* LeoInquiry command */
|
||||
|
||||
#define OS_PRIORITY_LEOMGR OS_PRIORITY_PIMGR
|
||||
|
||||
/*
|
||||
* Drive Rom offset address
|
||||
*/
|
||||
#define DDROM_FONT_START 0x000a0000
|
||||
#define DDROM_WAVEDATA_START 0x00140000
|
||||
|
||||
/*
|
||||
* Definition for osLeoSpdlMotor()
|
||||
*/
|
||||
#define ACTIVE 0
|
||||
#define STANDBY 1
|
||||
#define SLEEP 2
|
||||
#define BRAKE 4
|
||||
|
||||
#define LEO_MOTOR_ACTIVE 0
|
||||
#define LEO_MOTOR_STANDBY 1
|
||||
#define LEO_MOTOR_SLEEP 2
|
||||
#define LEO_MOTOR_BRAKE 4
|
||||
|
||||
#define NUM_LBAS 4292 /* total number of LBAs */
|
||||
|
||||
#define BLK_SIZE_ZONE0 19720
|
||||
#define BLK_SIZE_ZONE1 18360
|
||||
#define BLK_SIZE_ZONE2 17680
|
||||
#define BLK_SIZE_ZONE3 16320
|
||||
#define BLK_SIZE_ZONE4 14960
|
||||
#define BLK_SIZE_ZONE5 13600
|
||||
#define BLK_SIZE_ZONE6 12240
|
||||
#define BLK_SIZE_ZONE7 10880
|
||||
#define BLK_SIZE_ZONE8 9520
|
||||
|
||||
#define MAX_BLK_SIZE BLK_SIZE_ZONE0
|
||||
#define MIN_BLK_SIZE BLK_SIZE_ZONE8
|
||||
|
||||
/*
|
||||
* Error codes
|
||||
*/
|
||||
#define LEO_ERROR_GOOD 0
|
||||
#define LEO_ERROR_DRIVE_NOT_READY 1
|
||||
#define LEO_ERROR_DIAGNOSTIC_FAILURE 2
|
||||
#define LEO_ERROR_COMMAND_PHASE_ERROR 3
|
||||
#define LEO_ERROR_DATA_PHASE_ERROR 4
|
||||
#define LEO_ERROR_REAL_TIME_CLOCK_FAILURE 5
|
||||
#define LEO_ERROR_BUSY 8
|
||||
#define LEO_ERROR_INCOMPATIBLE_MEDIUM_INSTALLED 11
|
||||
#define LEO_ERROR_UNKNOWN_FORMAT 11
|
||||
#define LEO_ERROR_NO_SEEK_COMPLETE 21
|
||||
#define LEO_ERROR_WRITE_FAULT 22
|
||||
#define LEO_ERROR_UNRECOVERED_READ_ERROR 23
|
||||
#define LEO_ERROR_NO_REFERENCE_POSITION_FOUND 24
|
||||
#define LEO_ERROR_TRACK_FOLLOWING_ERROR 25
|
||||
#define LEO_ERROR_TRACKING_OR_SPDL_SERVO_FAILURE 25
|
||||
#define LEO_ERROR_INVALID_COMMAND_OPERATION_CODE 31
|
||||
#define LEO_ERROR_LBA_OUT_OF_RANGE 32
|
||||
#define LEO_ERROR_WRITE_PROTECT_ERROR 33
|
||||
#define LEO_ERROR_COMMAND_CLEARED_BY_HOST 34
|
||||
#define LEO_ERROR_COMMAND_TERMINATED 34
|
||||
#define LEO_ERROR_QUEUE_FULL 35
|
||||
#define LEO_ERROR_ILLEGAL_TIMER_VALUE 36
|
||||
#define LEO_ERROR_WAITING_NMI 37
|
||||
#define LEO_ERROR_DEVICE_COMMUNICATION_FAILURE 41
|
||||
#define LEO_ERROR_MEDIUM_NOT_PRESENT 42
|
||||
#define LEO_ERROR_POWERONRESET_DEVICERESET_OCCURED 43
|
||||
#define LEO_ERROR_RAMPACK_NOT_CONNECTED 44
|
||||
#define LEO_ERROR_MEDIUM_MAY_HAVE_CHANGED 47
|
||||
#define LEO_ERROR_EJECTED_ILLEGALLY_RESUME 49
|
||||
|
||||
/*
|
||||
* Reserved
|
||||
*/
|
||||
#define LEO_ERROR_NOT_BOOTED_DISK 45
|
||||
#define LEO_ERROR_DIDNOT_CHANGED_DISK_AS_EXPECTED 46
|
||||
|
||||
/*
|
||||
* Error codes only used in IPL
|
||||
*/
|
||||
#define LEO_ERROR_RTC_NOT_SET_CORRECTLY 48
|
||||
#define LEO_ERROR_DIAGNOSTIC_FAILURE_RESET 50
|
||||
#define LEO_ERROR_EJECTED_ILLEGALLY_RESET 51
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Macro definitions
|
||||
*
|
||||
*/
|
||||
#define GET_ERROR(x) ((x).header.sense)
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Extern variables
|
||||
*
|
||||
*/
|
||||
extern LEODiskID leoBootID;
|
||||
extern OSPiHandle *__osDiskHandle; /* For exceptasm to get disk info*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Function prototypes
|
||||
*
|
||||
*/
|
||||
/* Initialize routine */
|
||||
extern s32 LeoCreateLeoManager(OSPri comPri, OSPri intPri,
|
||||
OSMesg *cmdBuf, s32 cmdMsgCnt);
|
||||
extern s32 LeoCJCreateLeoManager(OSPri comPri, OSPri intPri,
|
||||
OSMesg *cmdBuf, s32 cmdMsgCnt);
|
||||
extern s32 LeoCACreateLeoManager(OSPri comPri, OSPri intPri,
|
||||
OSMesg *cmdBuf, s32 cmdMsgCnt);
|
||||
extern u32 LeoDriveExist(void);
|
||||
|
||||
/* Synchronous functions */
|
||||
extern s32 LeoClearQueue(void);
|
||||
extern s32 LeoByteToLBA(s32 startLBA, u32 nbytes, s32 *lbas);
|
||||
extern s32 LeoLBAToByte(s32 startLBA, u32 nLBAs, s32 *bytes);
|
||||
extern s32 LeoReadCapacity(LEOCapacity *cap, s32 dir);
|
||||
extern s32 LeoInquiry(LEOVersion *ver);
|
||||
extern s32 LeoTestUnitReady(LEOStatus *status);
|
||||
|
||||
/* Asynchronous functions */
|
||||
extern s32 LeoSpdlMotor(LEOCmd *cmdBlock, LEOSpdlMode mode, OSMesgQueue *mq);
|
||||
extern s32 LeoSeek(LEOCmd *cmdBlock, u32 lba, OSMesgQueue *mq);
|
||||
extern s32 LeoRezero(LEOCmd *cmdBlock, OSMesgQueue *mq);
|
||||
extern s32 LeoReadWrite(LEOCmd *cmdBlock, s32 direction,
|
||||
u32 LBA, void *vAddr, u32 nLBAs, OSMesgQueue *mq);
|
||||
extern s32 LeoReadDiskID(LEOCmd *cmdBlock, LEODiskID *vaddr, OSMesgQueue *mq);
|
||||
extern s32 LeoSetRTC(LEOCmd *cmdBlock, LEODiskTime *RTCdata, OSMesgQueue *mq);
|
||||
extern s32 LeoReadRTC(LEOCmd *cmdBlock, OSMesgQueue *mq);
|
||||
extern s32 LeoModeSelectAsync(LEOCmd *cmdBlock, u32 standby,
|
||||
u32 sleep, OSMesgQueue *mq);
|
||||
|
||||
/* Font routines */
|
||||
extern int LeoGetKAdr(int sjis);
|
||||
extern int LeoGetAAdr(int code,int *dx,int *dy, int *cy);
|
||||
extern int LeoGetAAdr2(u32 ccode,int *dx,int *dy, int *cy);
|
||||
|
||||
/* Boot function */
|
||||
extern void LeoBootGame(void *entry);
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_LEO_H */
|
||||
274
include/PR/leoappli.h
Normal file
274
include/PR/leoappli.h
Normal file
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
* F i l e N a m e : l e o a p p l i . h
|
||||
*
|
||||
****************************************************************************
|
||||
* (C) Copyright ALPS Electric Co., Ltd. 1995-1997
|
||||
****************************************************************************
|
||||
* Version
|
||||
*
|
||||
* ver Date
|
||||
* ---- --------
|
||||
* 1.01 '97-11-18 Add MOTOR BRAKE definition for control bit.
|
||||
****************************************************************************
|
||||
*/
|
||||
/*-----------------------------------*/
|
||||
/* DRIVE PARAMETER */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_DISK_TYPE_MIN 0
|
||||
#define LEO_DISK_TYPE_MAX 6
|
||||
|
||||
#define LEO_LBA_MIN 0
|
||||
#define LEO_LBA_MAX 4291
|
||||
|
||||
#define LEO_LBA_ROM_TOP LEO_LBA_MIN
|
||||
#define LEO_LBA_ROM_END0 1417
|
||||
#define LEO_LBA_ROM_END1 1965
|
||||
#define LEO_LBA_ROM_END2 2513
|
||||
#define LEO_LBA_ROM_END3 3061
|
||||
#define LEO_LBA_ROM_END4 3609
|
||||
#define LEO_LBA_ROM_END5 4087
|
||||
#define LEO_LBA_ROM_END6 LEO_LBA_MAX
|
||||
#define LEO_LBA_RAM_TOP0 (LEO_LBA_ROM_END0+1)
|
||||
#define LEO_LBA_RAM_TOP1 (LEO_LBA_ROM_END1+1)
|
||||
#define LEO_LBA_RAM_TOP2 (LEO_LBA_ROM_END2+1)
|
||||
#define LEO_LBA_RAM_TOP3 (LEO_LBA_ROM_END3+1)
|
||||
#define LEO_LBA_RAM_TOP4 (LEO_LBA_ROM_END4+1)
|
||||
#define LEO_LBA_RAM_TOP5 (LEO_LBA_ROM_END5+1)
|
||||
#define LEO_LBA_RAM_TOP6 (LEO_LBA_ROM_END6+1)
|
||||
#define LEO_LBA_RAM_END6 LEO_LBA_MAX
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* LEO FUNCTION DEFINITIONS */
|
||||
/*-----------------------------------*/
|
||||
extern void leoInitialize(OSPri PRI_WRK, OSPri PRI_INT, OSMesg *command_que_buf, u32 cmd_buff_size);
|
||||
extern void leoCommand(void *CDB);
|
||||
extern void LeoReset(void);
|
||||
extern s32 LeoResetClear(void);
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* THREAD PRIORITY */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_PRIORITY_WRK (OS_PRIORITY_PIMGR-1)
|
||||
#define LEO_PRIORITY_INT OS_PRIORITY_PIMGR
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* COMMAND CODE */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_COMMAND_CLEAR_QUE 0x01
|
||||
#define LEO_COMMAND_INQUIRY 0x02
|
||||
#define LEO_COMMAND_TEST_UNIT_READY 0x03
|
||||
#define LEO_COMMAND_REZERO 0x04
|
||||
#define LEO_COMMAND_READ 0x05
|
||||
#define LEO_COMMAND_WRITE 0x06
|
||||
#define LEO_COMMAND_SEEK 0x07
|
||||
#define LEO_COMMAND_START_STOP 0x08
|
||||
#define LEO_COMMAND_READ_CAPACITY 0x09
|
||||
#define LEO_COMMAND_TRANSLATE 0x0a
|
||||
#define LEO_COMMAND_MODE_SELECT 0x0b
|
||||
#define LEO_COMMAND_READ_DISK_ID 0x0c
|
||||
#define LEO_COMMAND_READ_TIMER 0x0d
|
||||
#define LEO_COMMAND_SET_TIMER 0x0e
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* CONTROL BIT */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_CONTROL_POST 0x80 /* ENABLE POST QUEUE */
|
||||
#define LEO_CONTROL_START 0x01 /* START COMMAND */
|
||||
#define LEO_CONTROL_STBY 0x02 /* STAND-BY MODE(NOT SLEEP MODE) */
|
||||
#define LEO_CONTROL_WRT 0x01 /* READ RE-WRITE-ABLE CAPACITY */
|
||||
#define LEO_CONTROL_TBL 0x01 /* TRANSLATE BYTE TO LBA */
|
||||
#define LEO_CONTROL_BRAKE 0x04 /* SLEEP MODE(BRAKE ON) */
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* BIT FIELD PARAMETER */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_TEST_UNIT_MR 0x01 /* MEDIUM REMOVED */
|
||||
#define LEO_TEST_UNIT_RE 0x02 /* HEAD RETRACTED */
|
||||
#define LEO_TEST_UNIT_SS 0x04 /* SPINDLE STOPPED */
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* STATUS */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_STATUS_GOOD 0x00
|
||||
#define LEO_STATUS_CHECK_CONDITION 0x02
|
||||
#define LEO_STATUS_BUSY 0x08
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* SENSE CODE */
|
||||
/*-----------------------------------*/
|
||||
#define LEO_SENSE_NO_ADDITIONAL_SENSE_INFOMATION 00
|
||||
#define LEO_SENSE_DRIVE_NOT_READY 01
|
||||
#define LEO_SENSE_DIAGNOSTIC_FAILURE 02
|
||||
#define LEO_SENSE_COMMAND_PHASE_ERROR 03
|
||||
#define LEO_SENSE_DATA_PHASE_ERROR 04
|
||||
#define LEO_SENSE_REAL_TIME_CLOCK_FAILURE 05
|
||||
#define LEO_SENSE_INCOMPATIBLE_MEDIUM_INSTALLED 11
|
||||
#define LEO_SENSE_UNKNOWN_FORMAT 11
|
||||
#define LEO_SENSE_NO_SEEK_COMPLETE 21
|
||||
#define LEO_SENSE_WRITE_FAULT 22
|
||||
#define LEO_SENSE_UNRECOVERED_READ_ERROR 23
|
||||
#define LEO_SENSE_NO_REFERENCE_POSITION_FOUND 24
|
||||
#define LEO_SENSE_TRACK_FOLLOWING_ERROR 25
|
||||
#define LEO_SENSE_TRACKING_OR_SPDL_SERVO_FAILURE 25
|
||||
#define LEO_SENSE_INVALID_COMMAND_OPERATION_CODE 31
|
||||
#define LEO_SENSE_LBA_OUT_OF_RANGE 32
|
||||
#define LEO_SENSE_WRITE_PROTECT_ERROR 33
|
||||
#define LEO_SENSE_COMMAND_TERMINATED 34
|
||||
#define LEO_SENSE_QUEUE_FULL 35
|
||||
#define LEO_SENSE_ILLEGAL_TIMER_VALUE 36
|
||||
#define LEO_SENSE_WAITING_NMI 37
|
||||
#define LEO_SENSE_DEVICE_COMMUNICATION_FAILURE 41
|
||||
#define LEO_SENSE_MEDIUM_NOT_PRESENT 42
|
||||
#define LEO_SENSE_POWERONRESET_DEVICERESET_OCCURED 43
|
||||
#define LEO_SENSE_MEDIUM_MAY_HAVE_CHANGED 47
|
||||
#define LEO_SENSE_EJECTED_ILLEGALLY_RESUME 49
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* Command Block Header */
|
||||
/*-----------------------------------*/
|
||||
typedef struct{
|
||||
u8 command;
|
||||
u8 reserve1;
|
||||
u8 control;
|
||||
u8 reserve3;
|
||||
u8 status;
|
||||
u8 sense;
|
||||
u8 reserve6;
|
||||
u8 reserve7;
|
||||
OSMesgQueue *post;
|
||||
} LEOCmdHeader;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* CLEAR QUEUE(01H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
} LEOCmdClearQue;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* INQUIRY(02H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u8 dev_type;
|
||||
u8 version;
|
||||
u8 dev_num;
|
||||
u8 leo_bios_ver;
|
||||
u32 reserve5;
|
||||
} LEOCmdInquiry;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* TEST UNIT READY(03H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u8 test;
|
||||
u8 reserve2;
|
||||
u8 reserve3;
|
||||
u8 reserve4;
|
||||
} LEOCmdTestUnitReady;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* REZERO(04H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
} LEOCmdRezero;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* READ(05H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u32 lba;
|
||||
u32 xfer_blks;
|
||||
void *buff_ptr;
|
||||
u32 rw_bytes;
|
||||
} LEOCmdRead;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* WRITE(06H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef LEOCmdRead LEOCmdWrite;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* SEEK(07H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u32 lba;
|
||||
} LEOCmdSeek;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* START/STOP(08H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
} LEOCmdStartStop;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* READ CAPACITY(09H) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u32 start_lba;
|
||||
u32 end_lba;
|
||||
u32 capa_bytes;
|
||||
} LEOCmdReadCapacity;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* TRANSLATE(0AH) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u32 start_lba;
|
||||
u32 in_param;
|
||||
u32 out_param;
|
||||
} LEOCmdTranslate;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* MODE SELECT(0BH) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u8 page_code;
|
||||
u8 reserve1;
|
||||
u8 standby_time;
|
||||
u8 sleep_time;
|
||||
u8 led_on_time;
|
||||
u8 led_off_time;
|
||||
u8 reserve18;
|
||||
u8 reserve19;
|
||||
} LEOCmdModeSelect;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* READ DISK ID(0CH) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
void *buffer_pointer;
|
||||
} LEOCmdReadDiskId;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* READ TIMER(0DH) command */
|
||||
/*-----------------------------------*/
|
||||
typedef struct {
|
||||
LEOCmdHeader header;
|
||||
u8 reserve12;
|
||||
u8 reserve13;
|
||||
u8 year;
|
||||
u8 month;
|
||||
u8 day;
|
||||
u8 hour;
|
||||
u8 minute;
|
||||
u8 second;
|
||||
} LEOCmdReadTimer;
|
||||
|
||||
/*-----------------------------------*/
|
||||
/* SET TIMER(0EH) command */
|
||||
/*-----------------------------------*/
|
||||
typedef LEOCmdReadTimer LEOCmdSetTimer;
|
||||
|
||||
/*-------end of leoappli.h--------------------------*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
#ifndef _LIBULTRA_H
|
||||
#define _LIBULTRA_H
|
||||
|
||||
#define TV_TYPE_NTSC 1
|
||||
#define TV_TYPE_PAL 0
|
||||
#define TV_TYPE_MPAL 2
|
||||
|
||||
#define RESET_TYPE_COLD_RESET 0
|
||||
#define RESET_TYPE_NMI 1
|
||||
#define RESET_TYPE_BOOT_DISK 2
|
||||
|
||||
extern u32 osTvType;
|
||||
extern u32 osRomBase;
|
||||
extern u32 osResetType;
|
||||
extern u32 osMemSize;
|
||||
extern u8 osAppNmiBuffer[64];
|
||||
|
||||
#endif /* _LIBULTRA_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user