Browse Source

First reorganization

master
Thomas Touhey 3 years ago
parent
commit
a708870ec5

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
/obj
/Sound4Calc.sublime-workspace

+ 51
- 35
Makefile View File

@@ -1,48 +1,64 @@
.PHONY: all mrproper send
#!/usr/bin/make -f
# INCLUDE CONFIGURATION
include $(CURDIR)/Makefile.cfg

PREFIX = sh3eb-elf-
AS = $(PREFIX)as
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
OBJCOPY = $(PREFIX)objcopy
WRAPPER = g1a-wrapper
SEND = UsbConnector
# DEDUCED VARS
ALLOBJ = $(SRC:%=$(OBJDIR)/%.o)

FLAGS = -m3 -mb -Os -nostdlib
CFLAGS = -W -Wall -Wno-main -pedantic -std=c11
INCLUDE = -I. -Iinclude -isystem stdinc
LIBS = -Llib -lgcc -lfx
NAME = sound
# RULES
## Make it all (default rule)
all: $(NAME).g1a

OBJ = build/Sound4Calc.o build/crt0.o build/syscall.o
ICON = icon.bmp
## Make the object directory
$(OBJDIR):
mkdir -p $(OBJDIR)

## Make an object file out of an ASM source file
$(OBJDIR)/%.o: $(SRCDIR)/%.s
$(AS) -c -o $@ $<

all: build/$(NAME).bin
@ $(WRAPPER) build/$(NAME).bin -o bin/$(NAME).g1a
@ echo "Build finished."
@ stat -c "Output size is %s bytes." bin/$(NAME).g1a
## Make an object file out of a C source file
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) -c -o $@ $< $(CFLAGS)

build/$(NAME).bin: build/$(NAME).elf
@ $(OBJCOPY) -R .comment -R .bss -O binary build/$(NAME).elf build/$(NAME).bin
## Make the ELF file
$(NAME).elf: $(OBJDIR) $(ALLOBJ)
$(LD) -o $@ $(ALLOBJ) $(LFLAGS)

build/$(NAME).elf: bin/addin.ld $(OBJ)
@ $(CC) $(FLAGS) $(OBJ) -T"bin/addin.ld" -o build/$(NAME).elf $(LIBS)
## Make the BIN file
$(NAME).bin: $(NAME).elf
$(OBJCOPY) -R .comment -R .bss -R '$$iop' -O binary $< $@

build/%.o: %.c
@ $(CC) $(FLAGS) -c $^ -o $@ $(INCLUDE) $(CFLAGS)
## Make the G1A file
$(NAME).g1a: $(NAME).bin
$(WRAPR) $< -o $(NAME).g1a
@stat -c "Build finished -- output size is %s bytes." $(NAME).g1a

build/%.o: %.s
@ $(AS) -c $^ -o $@
## Clean up your mess
clean:
$(RM) $(ALLOBJ)
$(RM) $(NAME).elf
$(RM) $(NAME).bin

send:
@ cp bin/$(NAME).g1a $(NAME).g1a
@ $(SEND) SEND $(NAME).g1a $(NAME).g1a fls0
@ rm -f $(NAME).g1a
## Clean up everything
mrproper: clean
$(RM) $(NAME).g1a
fclean: mrproper

mrproper:
rm -f build/*.o
rm -f build/$(NAME).elf
rm -f build/$(NAME).bin
## Remake
re: fclean all

## Send to calc
send:
@if [ ! -f $(NAME).g1a ]; then \
echo "Please make before sending." >&2; false; \
fi
@if $(SENDR) SEND $(NAME).g1a $(NAME).g1a fls0 1>/dev/null; \
then true; \
else echo "UsbConnector: calculator not plugged-in/in receive mode" >&2; \
false; \
fi

## Phuneral phuture ?
.PHONY: all clean fclean mrproper re send
# END OF FILE

+ 41
- 0
Makefile.cfg View File

@@ -0,0 +1,41 @@
#!/usr/bin/make -f
# PROJECT INFORMATION
NAME = Sound4Calc
ICON = ./icon.bmp
LIB = gcc fx

## DIRECTORIES
SRCDIR = ./src
INCDIR = ./include
OBJDIR = ./obj
LIBDIR = ./lib
SCPTDIR = ./scripts

# TOOLCHAIN
## Directory maker
MD = mkdir -p
## File remover
RM = rm -f
## Assembler
AS = sh3eb-elf-as
## C compiler
CC = sh3eb-elf-gcc
CFLAGS = -m3 -mb -Os -nostdlib -Wall -Wextra -Wno-main -pedantic -std=c11 -I $(INCDIR)
## Linker
LD = sh3eb-elf-ld
LFLAGS = -T $(SCPTDIR)/addin.ld -L $(LIBDIR) $(addprefix -l,$(LIB))
## Object copier
OBJCPY = sh3eb-elf-objcopy
## G1A Wrapper
WRAPR = g1a-wrapper
## Sender
SENDR = UsbConnector

# SOURCES
SRC = crt0 Sound4Calc syscall

# INCLUDES
INC = dispbios endian filebios fxlib keybios syscall timer \
Sound4Calc

# END OF FILE

+ 0
- 576
Sound4Calc.sublime-workspace View File

@@ -1,576 +0,0 @@
{
"auto_complete":
{
"selected_items":
[
[
"a",
"a"
],
[
"ma",
"math"
],
[
"ml",
"ML_display_vram"
],
[
"boat_",
"boat_r"
],
[
"bot_",
"boat_r"
],
[
"bot",
"boat_r"
],
[
"l",
"l"
],
[
"hl",
"hl"
],
[
"c",
"c"
],
[
"d",
"d"
],
[
"L",
"Load_polygone_loop2"
],
[
"proprié",
"propriété"
],
[
"Del",
"Delta_Y"
],
[
"D",
"Delta_X"
],
[
"__",
"__base_printf"
],
[
"be",
"before"
]
]
},
"buffers":
[
{
"file": "Sound4Calc.c",
"settings":
{
"buffer_size": 5121,
"line_ending": "Unix"
}
},
{
"file": "addresses.h",
"settings":
{
"buffer_size": 40864,
"line_ending": "Unix"
}
},
{
"file": "Makefile",
"settings":
{
"buffer_size": 1104,
"line_ending": "Unix"
}
},
{
"file": "Sound4Calc.h",
"settings":
{
"buffer_size": 215,
"line_ending": "Unix"
}
}
],
"build_system": "",
"build_system_choices":
[
],
"build_varint": "",
"command_palette":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"console":
{
"height": 153.0,
"history":
[
]
},
"distraction_free":
{
"menu_visible": true,
"show_minimap": false,
"show_open_files": false,
"show_tabs": false,
"side_bar_visible": false,
"status_bar_visible": false
},
"file_history":
[
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.sublime-workspace",
"/home/ulimit/.config/sublime-text-3/Packages/User/C++.sublime-settings",
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.h",
"/home/ulimit/Bureau/Sound4Calc/crt0.s",
"/home/ulimit/Bureau/CasioUsb-Files-14276/CasioUsb-Sources/Makefile",
"/home/ulimit/Bureau/Sound4Calc/Sound4Calc.c",
"/home/ulimit/Bureau/Sound4Calc/.git/refs/remotes/origin/master",
"/home/ulimit/Bureau/Sound4Calc/.git/refs/heads/master",
"/home/ulimit/.cache/.fr-hsDhJT/Sound4Calc-master-ea3869585beb9d01cd849a1ec4ee6a9f1551e9c4/Sound4Calc.c",
"/home/ulimit/Bureau/Git_depot/.git/config",
"/home/ulimit/.cache/.fr-HaPj72/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/Menu.cpp",
"/home/ulimit/.cache/.fr-2XLUx2/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/Menu.hpp",
"/home/ulimit/.cache/.fr-jL6Cxs/GeometryDash-master-2de6dc00c6d375594eed64bc489aa43c44d0b05f/README.md",
"/media/ulimit/Chang/Comté/.~lock.comté ecrit.odt#",
"/home/ulimit/.cache/.fr-8aSPsA/SCIFTEST.c",
"/home/ulimit/Bureau/Sound4Calc/autre/syscall.s",
"/home/ulimit/Bureau/Sound4Calc/syscall.h",
"/home/ulimit/Bureau/Sound4Calc/syscall.s",
"/media/ulimit/Chang/Sound4Calc/New/Sound4Calc.c",
"/home/ulimit/Bureau/key_test/Makefile",
"/home/ulimit/Bureau/key_test/syscall.h",
"/home/ulimit/Bureau/key_test/syscall.s",
"/home/ulimit/Bureau/key_test/key.c",
"/home/ulimit/Bureau/key_test/syscall.c",
"/home/ulimit/.cache/.fr-evMloG/RTC.c",
"/home/ulimit/Bureau/Nouveau dossier 3/Nouveau",
"/home/ulimit/Bureau/Nouveau dossier 3/Nouveau document",
"/home/ulimit/Bureau/RPi 3",
"/home/ulimit/Sound4Calc/.git/config",
"/home/ulimit/Bureau/Caisse Régionale Loire Haute Loire_files/infosbulle.js",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/campaigns/natives/scripting.lua",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/campaigns/natives/startpos.esf",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/anim.pack",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/all_scripted.lua",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/checksum",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/battle_scripted.lua",
"/home/ulimit/Bureau/mon_script.sh",
"/home/ulimit/Bureau/Nouveau dossier/xinput-decoder.py",
"/home/ulimit/Bureau/Nouveau dossier/xinputtest",
"/media/ulimit/My U3 Drive/ZbThumbnail.info",
"/media/ulimit/OS/Program Files (x86)/Steam/steamapps/common/Empire Total War/data/language.txt",
"/media/ulimit/e6e7f776-11a4-4cd7-b4fd-c44ecdbfcf90/etc/resolv.conf",
"/home/ulimit/.cache/.fr-v6y6TO/minetest.conf.example",
"/home/ulimit/.cache/.fr-tH2FKG/Jetpack Joyride Casio - LastIndev/fonctions.c",
"/home/ulimit/.cache/.fr-LkbQfI/Jetpack Joyride Casio - LastIndev/._fonctions.c",
"/home/ulimit/Bureau/test",
"/media/ulimit/FREEDOM/ ",
"/home/ulimit/.cache/.fr-tLHu3g/mods/mods_here.txt",
"/home/ulimit/.cache/.fr-pL7Ev9/misc/minetest.desktop",
"/home/ulimit/.cache/.fr-mugyGQ/CMakeLists.txt",
"/home/ulimit/.cache/.fr-KtLxHU/minetest.conf.example",
"/home/ulimit/.cache/.fr-LB61pY/po/minetest.pot",
"/home/ulimit/.cache/.fr-MaDHoM/C-Engine-master-88e60a9aea1f9f68623519f87ae25763c15d8add/CHeader.hpp",
"/home/ulimit/.cache/.fr-LwMtxQ/Jetpack Joyride Casio - LastIndev/include.h",
"/home/ulimit/.cache/.fr-bQC73D/Jetpack Joyride Casio - LastIndev/Jetpack.c",
"/home/ulimit/.cache/.fr-UQheAl/Jetpack Joyride Casio - LastIndev/Elements.c",
"/home/ulimit/Bureau/projet agrobot/logiciel agrobot/agrobot/main.c",
"/home/ulimit/Bureau/5001_1_43132081.pdf",
"/home/ulimit/.minetest/worlds/sylvaintest/world.mt",
"/home/ulimit/.minetest/worlds/sylvaintest/auth.txt",
"/home/ulimit/.minetest/worlds/sylvaintest/ipban.txt",
"/home/ulimit/.minetest/worlds/valentin/env_meta.txt",
"/home/ulimit/.minetest/worlds/valentin/map_meta.txt",
"/home/ulimit/.minetest/worlds/valentin/world.mt",
"/home/ulimit/.minetest/worlds/valentin/auth.txt",
"/home/ulimit/.minetest/worlds/valentin/players/singleplayer",
"/home/ulimit/Bureau/con-addin/bin/test_l.g1a",
"/home/ulimit/Bureau/con-addin/Makefile",
"/home/ulimit/Bureau/con-addin/test.c",
"/home/ulimit/Bureau/con-addin/crt0.s",
"/home/ulimit/Bureau/con-addin/test_l_si.g1a",
"/home/ulimit/.minetest/client/serverlist/favoriteservers.txt",
"/home/ulimit/Bureau/projet agrobot/logiciel agrobot/agrobot/agrobot.depend",
"/media/ulimit/2821-0000/System Volume Information/IndexerVolumeGuid",
"/home/ulimit/Bureau/fréquen.g1m",
"/home/ulimit/Bureau/con-addin/test_l.g1a",
"/home/ulimit/Bureau/Nouveau document",
"/home/ulimit/Bureau/Nouveau dossier/tampon",
"/home/ulimit/Bureau/worms/SH4Comp.c",
"/home/ulimit/Bureau/Atomas/atomas.c",
"/home/ulimit/Bureau/mon script.sh",
"/home/ulimit/Bureau/worms/bateau.c",
"/home/ulimit/Bureau/testbash",
"/home/ulimit/Bureau/chr_giant.info",
"/home/ulimit/Bureau/building_barbarian_hut_tex.sc",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/arena_training.info",
"/home/ulimit/Bureau/arena_training.info",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/building_barbarian_hut_tex.sc",
"/home/ulimit/Bureau/Atomas/maths.c",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C006%5D/Card/Android/data/com.supercell.clashroyale/cache/swfcache/sc/building_elixir_collector.info",
"/home/ulimit/Bureau/1",
"/home/ulimit/Bureau/execute",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/maths_add.asm",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/transformations et quaternions/transformation.asm",
"/home/ulimit/Bureau/moteur 3D sylvain/bin2/classe_vecteur",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/classe_polygone",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/classes/classe_octree",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/tables_align.inc",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/ram_area.inc",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/todolist",
"/home/ulimit/Bureau/moteur 3D sylvain/bin/transformations et quaternions/quaternions.asm",
"/home/ulimit/Bureau/Sound4Calc/Makefile",
"/home/ulimit/Bureau/Sound4Calc/addresses.h",
"/media/ulimit/LEXAR/tpe final/readme.txt",
"/media/ulimit/LEXAR/tpe final/readme",
"/home/ulimit/Bureau/jahshaka/INSTALL",
"/home/ulimit/.cache/.fr-1OmWIK/jahshaka/INSTALL",
"/home/ulimit/Bureau/TS3.run",
"/media/ulimit/LEXAR/fact",
"/media/ulimit/LEXAR/Nouveau document texte.txt",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/Library",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/uk.co.aifactory.chessfree/files/B.current",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/savegame.bin.bkp",
"/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C028%5D/Phone/Android/data/com.fungames.sniper3d/files/savegame.bin",
"/home/ulimit/Bureau/2_05_0000_sh4.fls",
"/home/ulimit/Bureau/worms/bateau.h",
"/home/ulimit/Bureau/worms/MonochromeLib.c",
"/home/ulimit/Bureau/worms/sprite.c",
"/home/ulimit/Bureau/worms/Makefile",
"/home/ulimit/.cache/.fr-ZkiGuQ/worms/bateau.c",
"/home/ulimit/Bureau/webcalc/examples/old/suites.htm",
"/home/ulimit/Bureau/webcalc/tex-0.9.c",
"/home/ulimit/Bureau/webcalc/examples/old/lim asym.htm",
"/usr/share/magicrescue/recipes/png",
"/home/ulimit/Bureau/INTEGR.htm",
"/home/ulimit/Bureau/webcalc/libfont-3.1.c",
"/usr/share/magicrescue/recipes/jpeg-jfif",
"/home/ulimit/Sound4Calc/Sound4Calc.c.save"
],
"find":
{
"height": 27.0
},
"find_in_files":
{
"height": 0.0,
"where_history":
[
]
},
"find_state":
{
"case_sensitive": false,
"find_history":
[
"SH7305_PUDR",
"SH7305_PUCR",
"SH7305_PJCR",
"SH7305_PUCR",
"SH7305_PJDR",
"appart",
"math",
"j",
"itoa",
"strcat",
"sgn",
"ML_display_vram();",
"tbl64Div",
"RTC2Time",
"BCD2int",
"memory_user_select",
"strcmp",
"Sin",
"_Sin",
"sub_Sin",
"Key",
"IsKeyDown"
],
"highlight": true,
"in_selection": false,
"preserve_case": false,
"regex": false,
"replace_history":
[
""
],
"reverse": false,
"show_context": true,
"use_buffer2": true,
"whole_word": false,
"wrap": true
},
"groups":
[
{
"selected": 0,
"sheets":
[
{
"buffer": 0,
"file": "Sound4Calc.c",
"semi_transient": false,
"settings":
{
"buffer_size": 5121,
"regions":
{
},
"selection":
[
[
109,
109
]
],
"settings":
{
"syntax": "Packages/C++/C++.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 3,
"type": "text"
}
]
},
{
"selected": 1,
"sheets":
[
{
"buffer": 1,
"file": "addresses.h",
"semi_transient": false,
"settings":
{
"buffer_size": 40864,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/C++/C++.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 1,
"type": "text"
},
{
"buffer": 2,
"file": "Makefile",
"semi_transient": false,
"settings":
{
"buffer_size": 1104,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/Makefile/Makefile.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
}
]
},
{
"selected": 0,
"sheets":
[
{
"buffer": 3,
"file": "Sound4Calc.h",
"semi_transient": false,
"settings":
{
"buffer_size": 215,
"regions":
{
},
"selection":
[
[
215,
215
]
],
"settings":
{
"syntax": "Packages/C++/C++.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 2,
"type": "text"
}
]
}
],
"incremental_find":
{
"height": 27.0
},
"input":
{
"height": 0.0
},
"layout":
{
"cells":
[
[
0,
0,
1,
2
],
[
1,
0,
2,
1
],
[
1,
1,
2,
2
]
],
"cols":
[
0.0,
0.7328125,
1.0
],
"rows":
[
0.0,
0.716904276986,
1.0
]
},
"menu_visible": true,
"output.find_results":
{
"height": 0.0
},
"pinned_build_system": "",
"project": "",
"replace":
{
"height": 50.0
},
"save_all_on_build": true,
"select_file":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_project":
{
"height": 500.0,
"last_filter": "",
"selected_items":
[
[
"",
"~/Bureau/Sound4Calc/Sound4Calc.sublime-workspace"
]
],
"width": 380.0
},
"select_symbol":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"selected_group": 1,
"settings":
{
"last_automatic_layout":
[
[
0,
0,
1,
2
],
[
1,
0,
2,
1
],
[
1,
1,
2,
2
]
]
},
"show_minimap": true,
"show_open_files": false,
"show_tabs": true,
"side_bar_visible": true,
"side_bar_width": 150.0,
"status_bar_visible": true,
"template_settings":
{
"max_columns": 2
}
}

+ 0
- 51
autre/OldFunctions.c View File

@@ -1,51 +0,0 @@
void SetPin()
{
if(is_SH4)
{
*(unsigned char*)SH7305_PJDR |= 0x04;
*(unsigned char*)SH7305_PJDR &= ~0x08;
//set pin to 0x4B
}
else
{
*(unsigned char*)SH7337_SCPDR |= 0x01;
}
}

void ResetPin()
{
if(is_SH4)
{
*(unsigned char*)SH7305_PJDR &= ~0x04;
*(unsigned char*)SH7305_PJDR |= 0x08;
// set the pin to 0x47
}
else
{

*(unsigned char*)SH7337_SCPDR &= ~0x01;
}
}


char getMPU(void)
{
// Port L control register.
volatile unsigned short *plcr = (unsigned short *)0xa4000114;
// Saved value for PLCR.
unsigned short saved_plcr;
unsigned int tested_plcr;

saved_plcr = *plcr;
*plcr = 0xffff;

tested_plcr = *plcr;
*plcr = saved_plcr;

if(tested_plcr == 0x00ff || tested_plcr == 0x0fff)
{
return 0; // MPU_SH3
}

return 1; // MPU_SH4
}

BIN
autre/SCIFTEST.zip View File


BIN
autre/sprintf.zip View File


+ 0
- 12
autre/syscall.h View File

@@ -1,12 +0,0 @@
#ifndef _SYSCALL_H
#define _SYSCALL_H
int IsKeyDown(short* matrixcode);
#define KEY_CTRL_EXE 0x0201
#define KEY_CTRL_SHIFT 0x0608
#endif

+ 0
- 11
autre/syscall.s View File

@@ -1,11 +0,0 @@
.global_IsKeyDown

_IsKeyDown:
mov.l sc_addr, r2
mov.l 1f, r0
jmp @r2
nop
1: .long 0x24B

sc_addr:
.long 0x80010070

BIN
bin/sound.g1a View File


BIN
build/Sound4Calc.o View File


BIN
build/crt0.o View File


BIN
build/sound.bin View File


BIN
build/sound.elf View File


BIN
build/syscall.o View File


bin/icon.bmp → icon.bmp View File


Sound4Calc.h → include/Sound4Calc.h View File


+ 0
- 29
include/_h_c_lib.h View File

@@ -1,29 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C/C++ Compiler Ver. 6.0 */
/* Copyright (c) 1992,2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = _h_c_lib.h : */
/* */
/* FUNC = Include file for SH SERIES C/C++ Compiler environment */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _H_C_LIB
#define _H_C_LIB
#ifdef __cplusplus
extern "C"{
#endif
extern void _CALL_INIT(void); /* for global class object initial processing */
extern void _CALL_END(void); /* for global class object post-processing */
#ifdef __cplusplus
}
#endif /* #ifdef __cplusplus */
#endif /* #ifndef _H_C_LIB */

addresses.h → include/addresses.h View File


+ 0
- 39
include/assert.h View File

@@ -1,39 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = assert.h : debug macro define ; */
/* */
/* FUNC = this module do the following functions; */
/* (1) if NDEBUG defined assert(x) = (void)0; */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _ASSERT
#define _ASSERT
#include <stdio.h>
#ifdef NDEBUG
#ifdef assert
#undef assert
#endif
#define assert(x) ((void)0)
#else
#ifdef assert
#undef assert
#endif
#define assert(x) ( x ? (void) 0 : (fprintf(stderr,\
"ASSERTION FAILED: "#x" FILE %s,LINE %d \n", \
__FILE__,__LINE__),abort(),(void)0))
#endif
#ifdef __cplusplus
extern "C" {
void abort(void);
}
#endif
#endif

+ 0
- 84
include/builtin.h View File

@@ -1,84 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 6.0 */
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = builtin : */
/* */
/* FUNC = this header file do the following functions; */
/* (1)builtin function prototype define; */
/* */
/* CLAS = UNIT ; */
/* */
/* END ; */
/*****************************************************************/
#ifndef _BUILTIN
#define _BUILTIN
#ifdef __cplusplus
extern "C" {
/* follow math.h & mathf.h */
extern float _builtin_fabsf(float);
extern double _builtin_fabs(double);
extern float _builtin_sqrtf(float);
extern double _builtin_sqrt(double);
/* follow private.h */
extern void _builtin_fsca(long ,float *,float *);
extern float _builtin_fsrra(float);
/* follow smachine.h */
extern void _builtin_set_imask(int);
extern int _builtin_get_imask(void);
extern void _builtin_set_cr(int);
extern int _builtin_get_cr(void);
extern void _builtin_set_vbr(void *);
extern void *_builtin_get_vbr(void);
extern void _builtin_sleep(void);
/* follow string.h */
extern char *_builtin_strcpy(char *, const char *);
extern int _builtin_strcmp(const char *, const char *);
/* follow umachine.h */
extern void _builtin_set_gbr(void *);
extern void *_builtin_get_gbr(void);
extern unsigned char _builtin_gbr_read_byte(int);
extern unsigned short _builtin_gbr_read_word(int);
extern unsigned long _builtin_gbr_read_long(int);
extern void _builtin_gbr_write_byte(int, unsigned char);
extern void _builtin_gbr_write_word(int, unsigned short);
extern void _builtin_gbr_write_long(int, unsigned long);
extern void _builtin_gbr_and_byte(int, unsigned char);
extern void _builtin_gbr_or_byte(int, unsigned char);
extern void _builtin_gbr_xor_byte(int, unsigned char);
extern int _builtin_gbr_tst_byte(int, unsigned char);
extern int _builtin_tas(char *);
extern int _builtin_trapa(int);
extern int _builtin_macw(short *, short *, unsigned int);
extern int _builtin_macwl(short *, short *, unsigned int, unsigned int);
extern int _builtin_macl(int *, int *, unsigned int);
extern int _builtin_macll(int *, int *, unsigned int, unsigned int);
extern int _builtin_trapa_svc(...);
extern void _builtin_prefetch(void *);
extern void _builtin_set_fpscr(int);
extern int _builtin_get_fpscr(void);
extern float _builtin_fipr(float a1[], float b1[]);
extern void _builtin_ftrv(float a1[], float b1[]);
extern void _builtin_ftrvadd(float a1[], float b1[], float c1[]);
extern void _builtin_ftrvsub(float a1[], float b1[], float c1[]);
extern void _builtin_mtrx4mul(float [][4], float [][4]);
extern void _builtin_mtrx4muladd(float [][4], float [][4], float [][4]);
extern void _builtin_mtrx4mulsub(float [][4], float [][4], float [][4]);
extern void _builtin_ld_ext(float [][4]);
extern void _builtin_st_ext(float [][4]);
extern void _builtin_add4(float a1[], float b1[], float c1[]);
extern void _builtin_sub4(float a1[], float b1[], float c1[]);
extern void _builtin_trace(int);
}
#endif /* #ifdef __cplusplus */
#endif /* #ifndef _BUILTIN */

+ 0
- 189
include/complex View File

@@ -1,189 +0,0 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//====================================================================
// File: complex
// Purpose: Numerics library / Complex numbers
// Header <complex>
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _COMPLEX_
#define _COMPLEX_
#include <istream>
#include <ostream>
class float_complex; // based on float
class double_complex; // based on double
// complex specialization
class float_complex {
public:
typedef float value_type;
float_complex(float re = 0.0f, float im = 0.0f){
_re = re; _im = im; return; }
float_complex(const double_complex&);
float real() const{ return (_re);}
float imag() const{ return (_im);}
float_complex& operator= (float rhs){
_re = rhs; _im = 0.0; return *this; }
float_complex& operator+=(float rhs){ _re += rhs; return *this; }
float_complex& operator-=(float rhs){ _re -= rhs; return *this; }
float_complex& operator*=(float rhs){
_re *= rhs; _im *= rhs; return *this; }
float_complex& operator/=(float rhs){
_re /= rhs; _im /= rhs; return *this; }
float_complex& operator=(const float_complex&rhs){
_re = rhs.real(); _im = rhs.imag(); return *this; }
float_complex& operator+=(const float_complex&rhs){
_re += rhs.real(); _im += rhs.imag(); return *this; }
float_complex& operator-=(const float_complex&rhs){
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
float_complex& operator*=(const float_complex&);
float_complex& operator/=(const float_complex&);
private:
float _re, _im;
};
class double_complex {
public:
typedef double value_type;
double_complex(double re = 0.0, double im = 0.0){
_re = re; _im = im; return; }
double_complex(const float_complex&rhs){
_re = (double)rhs.real(); _im = (double)rhs.imag(); return; }
double real() const{ return (_re);}
double imag() const{ return (_im);}
double_complex& operator= (double rhs){
_re = rhs; _im = 0.0; return *this; }
double_complex& operator+=(double rhs){ _re += rhs; return *this; }
double_complex& operator-=(double rhs){ _re -= rhs; return *this; }
double_complex& operator*=(double rhs){
_re *= rhs; _im *= rhs; return *this; }
double_complex& operator/=(double rhs){
_re /= rhs; _im /= rhs; return *this; }
double_complex& operator=(const double_complex&rhs){
_re = rhs.real(); _im = rhs.imag(); return *this; }
double_complex& operator+=(const double_complex&rhs){
_re += rhs.real(); _im += rhs.imag(); return *this; }
double_complex& operator-=(const double_complex&rhs){
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
double_complex& operator*=(const double_complex&);
double_complex& operator/=(const double_complex&);
private:
double _re, _im;
};
// complex non-member functions
float_complex operator+(const float_complex&);
float_complex operator-(const float_complex&);
float_complex operator+(const float_complex&, const float_complex&);
float_complex operator+(const float_complex&, const float&);
float_complex operator+(const float&, const float_complex&);
float_complex operator-(const float_complex&, const float_complex&);
float_complex operator-(const float_complex&, const float&);
float_complex operator-(const float&, const float_complex&);
float_complex operator*(const float_complex&, const float_complex&);
float_complex operator*(const float_complex&, const float&);
float_complex operator*(const float&, const float_complex&);
float_complex operator/(const float_complex&, const float_complex&);
float_complex operator/(const float_complex&, const float&);
float_complex operator/(const float&, const float_complex&);
bool operator==(const float_complex&, const float_complex&);
bool operator==(const float_complex&, const float&);
bool operator==(const float&, const float_complex&);
bool operator!=(const float_complex&, const float_complex&);
bool operator!=(const float_complex&, const float&);
bool operator!=(const float&, const float_complex&);
istream& operator>>(istream&, float_complex&);
ostream& operator<<(ostream&, const float_complex&);
double_complex operator+(const double_complex&);
double_complex operator-(const double_complex&);
double_complex operator+(const double_complex&, const double_complex&);
double_complex operator+(const double_complex&, const double&);
double_complex operator+(const double&, const double_complex&);
double_complex operator-(const double_complex&, const double_complex&);
double_complex operator-(const double_complex&, const double&);
double_complex operator-(const double&, const double_complex&);
double_complex operator*(const double_complex&, const double_complex&);
double_complex operator*(const double_complex&, const double&);
double_complex operator*(const double&, const double_complex&);
double_complex operator/(const double_complex&, const double_complex&);
double_complex operator/(const double_complex&, const double&);
double_complex operator/(const double&, const double_complex&);
bool operator==(const double_complex&, const double_complex&);
bool operator==(const double_complex&, const double&);
bool operator==(const double&, const double_complex&);
bool operator!=(const double_complex&, const double_complex&);
bool operator!=(const double_complex&, const double&);
bool operator!=(const double&, const double_complex&);
istream& operator>>(istream&, double_complex&);
ostream& operator<<(ostream&, const double_complex&);
// complex value operations
float real(const float_complex&);
float imag(const float_complex&);
float abs(const float_complex&);
float arg(const float_complex&);
float norm(const float_complex&);
float_complex conj(const float_complex&);
float_complex polar(const float&, const float&);
double real(const double_complex&);
double imag(const double_complex&);
double abs(const double_complex&);
double arg(const double_complex&);
double norm(const double_complex&);
double_complex conj(const double_complex&);
double_complex polar(const double&, const double&);
// complex transcendentals
#ifdef sqrt
#undef sqrt
extern "C" double sqrt(double);
#endif
float_complex cos (const float_complex&);
float_complex cosh (const float_complex&);
float_complex exp (const float_complex&);
float_complex log (const float_complex&);
float_complex log10(const float_complex&);
float_complex pow(const float_complex&, int);
float_complex pow(const float_complex&, const float&);
float_complex pow(const float_complex&, const float_complex&);
float_complex pow(const float&, const float_complex&);
float_complex sin (const float_complex&);
float_complex sinh (const float_complex&);
float_complex sqrt (const float_complex&);
float_complex tan (const float_complex&);
float_complex tanh (const float_complex&);
double_complex cos (const double_complex&);
double_complex cosh (const double_complex&);
double_complex exp (const double_complex&);
double_complex log (const double_complex&);
double_complex log10(const double_complex&);
double_complex pow(const double_complex&, int);
double_complex pow(const double_complex&, const double&);
double_complex pow(const double_complex&, const double_complex&);
double_complex pow(const double&, const double_complex&);
double_complex sin (const double_complex&);
double_complex sinh (const double_complex&);
double_complex sqrt (const double_complex&);
double_complex tan (const double_complex&);
double_complex tanh (const double_complex&);
#endif

+ 0
- 66
include/ctype.h View File

@@ -1,66 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = ctype : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _CTYPE
#define _CTYPE
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned char _ctype[];
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int isupper(int);
extern int isxdigit(int);
extern int tolower(int);
extern int toupper(int);
#ifdef __cplusplus
}
#endif
#define _UPPER 0x01
#define _LOWER 0x02
#define _DIGIT 0x04
#define _SPACE 0x08
#define _PUNCT 0x10
#define _CNTRL 0x20
#define _WHITE 0x40
#define _HEX 0x80
#define isalnum(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT))
#define isalpha(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER))
#define iscntrl(c) (_ctype[(c) & 0xff] & _CNTRL)
#define isdigit(c) (_ctype[(c) & 0xff] & _DIGIT)
#define isgraph(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT | _PUNCT))
#define islower(c) (_ctype[(c) & 0xff] & _LOWER)
#define isprint(c) (_ctype[(c) & 0xff] & (_UPPER|_LOWER|_DIGIT|_PUNCT|_SPACE))
#define ispunct(c) (_ctype[(c) & 0xff] & _PUNCT)
#define isspace(c) (_ctype[(c) & 0xff] & _WHITE)
#define isupper(c) (_ctype[(c) & 0xff] & _UPPER)
#define isxdigit(c) (_ctype[(c) & 0xff] & _HEX)
#define tolower(c) (isupper(c) ? ((c)-'A'+'a') : (c))
#define toupper(c) (islower(c) ? ((c)-'a'+'A') : (c))
#endif

+ 0
- 257
include/ensigdsp.h View File

@@ -1,257 +0,0 @@
/*
*SHDSP Library
*Copyright (c) Hitachi,Ltd. 1998
*Licensed material of Hitachi,Ltd
*/
/***********************************************************
* File: ensigdsp.h
* Purpose: Common
* Create: 1998.03.20 Rev. 1.0
***********************************************************/
/*
** Copyright Ensigma Ltd. 1995
**
** Unauthorised copying or distribution of this software is prohibited.
**
** Version 1.0.
**
*/
/*
** ENSIGMA DSP Library
*/
/* Constants */
#ifndef _ENSIGDSP
#define _ENSIGDSP
#define BIQUAD_SIZE 6 /* no. coefficients in an IIR biquad */
#define EDSP_OK 0
#define EDSP_BAD_ARG 1
#define EDSP_NO_HEAP 2
#define EFFTALLSCALE (-1L)
#define EFFTMIDSCALE 0x55555555L
#define EFFTNOSCALE 0x00000000L
#ifdef __cplusplus /*A-10-014-01*/
extern"C"{ /*A-10-014-01*/
#endif /*A-10-014-01*/
/*
** Fourier transforms
*/
int FftComplex(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale);
int FftInComplex(short data_x[],
short data_y[],
long size,
long scale);
int FftReal(short op_x[],
short op_y[],
const short ip[],
long size,
long scale);
/* int ip_is_x);*/
int FftInReal(short data_x[],
short data_y[],
long size,
long scale,
int not_sure_about_ip_format);
int IfftComplex(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale);
int IfftInComplex(short data_x[],
short data_y[],
long size,
long scale);
int IfftReal(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale,
int op_is_x_scratch_is_y);
int IfftInReal(short data_x[],
short data_y[],
long size,
long scale,
int not_sure_about_op_format);
int InitFft(long max_size);
void FreeFft(void); /*A-10-015-01*/
int LogMagnitude(short output[],
const short ip_x[],
const short ip_y[],
long no_elements,
float fscale);
/*
** These three variables are for the internal use of the library FFT
** functions only. They should not be accessed by user programs.
*/
extern long max_fft_size;
extern short *twtble;
/*
** Window functions
*/
int GenBlackman(short data[], long N);
int GenHamming(short data[], long N);
int GenHanning(short data[], long N);
int GenTriangle(short data[], long N);
/*
** Filters. The coefficients must be supplied in X and the workspace in Y.
** If it is straightforward we can support the opposite, ie Xworkspace and
** Ycoeff.
*/
int FreeFir(short **Yworkspace, long order);
int InitFir(short **Yworkspace, long order);
int InitIir(short **Yworkspace, long no_sections);
int FreeIir(short **Yworkspace, long no_sections); /*A-10-015-01*/
int InitDIir(long **Yworkspace, long no_sections);
int FreeDIir(long **Yworkspace, long no_sections); /*A-10-015-01*/
int InitLms(short **Yworkspace, long order);
int FreeLms(short **Yworkspace, long order); /*A-10-015-01*/
int Fir(short op[],
const short ip[],
long no_samples,
const short Xcoeff[],
long order,
int res_shift,
short *Yworkspace);
int Fir1(short *op_ptr,
short input,
const short Xcoeff[],
long order,
int res_shift,
short *Yworkspace);
int Iir(short op[],
const short ip[],
long no_samples,
const short Xcoeff[],
long no_sections,
short *Yworkspace);
int Iir1(short *op_ptr,
short input,
const short Xcoeff[],
long no_sections,
short *Yworkspace);
int DIir(short op[],
const short ip[],
long no_samples,
const long Xcoeff[],
long no_sections,
long *Yworkspace);
int DIir1(short *op_ptr,
const short input, /*98.01.09 C-10-005-01 */
/* short input, 98.01.09 D-10-005-01 */
const long Xcoeff[],
long no_sections,
long *Yworkspace);
int Lms(short op[],
const short ip[],
const short ref[],
long no_samples,
short Xcoeff[],
long order,
int res_shift,
short mu,
short *Yworkspace);
int Lms1(short *op_ptr,
short input,
short ref_op,
short Xcoeff[],
long order,
int res_shift,
short mu,
short *Yworkspace);
/*
** Convolution and Correlation
*/
int ConvComplete(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
int res_shift);
int ConvCyclic(short op[],
const short ix[],
const short iy[],
long size,
int res_shift);
int ConvPartial(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
int res_shift);
int Correlate(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
long no_corr,
int x_is_larger,
int res_shift);
int CorrCyclic(short op[],
const short ix[],
const short iy[],
long size,
int reverse,
int res_shift);
/*
** Miscellaneous
*/
int GenGWnoise(short output[], long no_samples, float variance);
int MinI(short **min_ptr, short buffer[], long buff_len, int src_is_x);
int MaxI(short **max_ptr, short buffer[], long buff_len, int src_is_x);
int PeakI(short **peak_ptr, short buffer[], long buff_len, int src_is_x);
int Mean(short *mean_ptr, const short buffer[], long buff_len, int src_is_x);
int Variance(long *variance_ptr,
short *mean_ptr,
const short buffer[],
long buff_len, int src_is_x);
int VectorMult(short dest[],
const short matrixX[],
const short matrixY[],
long length,
int res_shift);
int MatrixMult(void *matrix3,
const void *matrixX,
const void *matrixY,
long m,
long n,
long p,
int res_shift, int dest_is_x);
int MsPower(long *pow_ptr, const short input[], long buff_size, int src_is_x);
int CopyXtoY(short y[], const short x[], long n);
int CopyYtoX(short x[], const short y[], long n);
int CopyToX(short x[], const short src[], long n);
int CopyToY(short y[], const short src[], long n);
int CopyFromX(short src[], const short x[], long n);
int CopyFromY(short src[], const short y[], long n);
int Limit(short data[], long no_elements, int data_is_x);
#ifdef __cplusplus /*A-10-014-01*/
} /*A-10-014-01*/
#endif /*A-10-014-01*/
#endif

+ 0
- 114
include/errno.h View File

@@ -1,114 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = errno : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _ERRNO
#define _ERRNO
#ifndef ERANGE
#define ERANGE 1100
#endif
#ifndef EDOM
#define EDOM 1101
#endif
#ifndef EDIV
#define EDIV 1102
#endif
#ifndef ESTRN
#define ESTRN 1104
#endif
#ifndef PTRERR
#define PTRERR 1106
#endif
#ifndef SEQERR
#define SEQERR 1108
#endif
#ifndef ECBASE
#define ECBASE 1200
#endif
#ifndef ETLN
#define ETLN 1202
#endif
#ifndef EEXP
#define EEXP 1204
#endif
#ifndef EEXPN
#define EEXPN 1206
#endif
#ifndef ENUM
#define ENUM 1208
#endif
#ifndef EFLOATO
#define EFLOATO 1210
#endif
#ifndef EFLOATU
#define EFLOATU 1220
#endif
#ifndef EDBLO
#define EDBLO 1250
#endif
#ifndef EDBLU
#define EDBLU 1260
#endif
#ifndef ELDBLO
#define ELDBLO 1270
#endif
#ifndef ELDBLU
#define ELDBLU 1280
#endif
#ifndef NOTOPN
#define NOTOPN 1300
#endif
#ifndef EBADF
#define EBADF 1302
#endif
#ifndef ECSPEC
#define ECSPEC 1304
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern volatile int _errno;
#ifdef __cplusplus
}
#endif
#ifndef errno
#define errno _errno
#endif
#endif

+ 0
- 74
include/exception.h View File

@@ -1,74 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = exception.h : */
/* */
/* FUNC = Include file for exception handling (see 18.6) */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _EXCEPTION_H
#define _EXCEPTION_H
/* This lets users disable the EDG supplied exception classes. */
#ifndef __NO_EDG_EXCEPTION_CLASSES
#include <stdexcept.h>
#ifdef __EDG_RUNTIME_USES_NAMESPACES
namespace std {
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
/*
If bool is not supported, use a typedef for bool.
*/
#ifdef _BOOL
typedef bool __bool;
#else /* ifndef _BOOL */
typedef int __bool;
#endif /* ifdef _BOOL */
class bad_exception : public exception {
public:
bad_exception() throw();
bad_exception(const bad_exception&) throw();
bad_exception& operator=(const bad_exception&) throw();
virtual ~bad_exception() throw();
virtual const char* what() const throw();
};
typedef void (*terminate_handler)();
extern terminate_handler set_terminate(terminate_handler);
typedef void (*unexpected_handler)();
extern unexpected_handler set_unexpected(unexpected_handler);
/* unexpected and terminate are in the WP definition of exception.h.
It is not clear why. */
void terminate();
void unexpected();
extern __bool uncaught_exception();
#ifdef __EDG_RUNTIME_USES_NAMESPACES
} /* namespace */
#ifdef __EDG_IMPLICIT_USING_STD
/* Implicitly include a using directive for the STD namespace when this
preprocessing flag is TRUE. */
using namespace std;
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
#endif /* _EXCEPTION_H */

+ 0
- 26
include/filt_ws.h View File

@@ -1,26 +0,0 @@
/*
*SHDSP Library
*Copyright (c) Hitachi,Ltd. 1998
*Licensed material of Hitachi,Ltd
*/
/***********************************************************
* File: filt_ws.h
* Purpose: Filter
* Create: 1998.03.20 Rev. 1.0
***********************************************************/
#ifndef FILT_WS
#define FILT_WS
#ifndef WS_SIZE
#define WS_SIZE 1024 /* Set Global workspace buffer size=1024 shorts (2048 bytes) */
#endif
#define MEMSIZE WS_SIZE*sizeof(short)
#pragma section Y /*need to equate DYRAM with link.cmd file*/
short ws_mem[WS_SIZE];
short * ws_ptr=ws_mem;
long ws_left=MEMSIZE;
#pragma section
#endif

+ 0
- 208
include/float.h View File

@@ -1,208 +0,0 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = float : */
/* FUNC = limit about float type and double type ; */
/* */
/* */
/* END ; */
/*****************************************************************/
#ifndef _FLOAT
#define _FLOAT
extern const float _FLT_MAX_VAL;
extern const float _FLT_MIN_VAL;
extern const double _DBL_MAX_VAL;
extern const double _DBL_MIN_VAL;
extern const long double _LDBL_MAX_VAL;
extern const long double _LDBL_MIN_VAL;
#ifndef _FPD
#define FLT_RADIX 2
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
#define FLT_ROUNDS 0
#define FLT_GUARD 0
#else
#define FLT_ROUNDS 1
#define FLT_GUARD 1
#endif
#define FLT_NORMALIZE 1
#define FLT_MAX _FLT_MAX_VAL
#define FLT_MIN _FLT_MIN_VAL
#define FLT_MAX_EXP 127
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
#define FLT_MIN_EXP (-126)
#else
#define FLT_MIN_EXP (-149)
#endif
#define FLT_MAX_10_EXP 38
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
#define FLT_MIN_10_EXP (-38)
#else
#define FLT_MIN_10_EXP (-44)
#endif
#define FLT_DIG 6
#define FLT_MANT_DIG 24
#define FLT_EXP_DIG 8
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
#define FLT_POS_EPS 1.1920928955078125e-7f
#if defined(_DON)
#define FLT_NEG_EPS 1.4012984643248171e-45f
#else
#define FLT_NEG_EPS 1.1754943508222876e-38f
#endif
#else
#define FLT_POS_EPS 5.9604648328104311e-8f
#define FLT_NEG_EPS 2.9802324164052156e-8f
#endif
#define FLT_POS_EPS_EXP (-23)
#if defined(_SH2E)|defined(_SH3E)|defined(_SH4)
#define FLT_NEG_EPS_EXP (-126)
#else
#define FLT_NEG_EPS_EXP (-24)
#endif
#endif
#if defined(_FLT)|defined(_FPS)
#define DBL_RADIX FLT_RADIX
#define DBL_ROUNDS FLT_ROUNDS
#define DBL_GUARD FLT_GUARD
#define DBL_NORMALIZE FLT_NORMALIZE
#define DBL_MAX _FLT_MAX_VAL
#define DBL_MIN _FLT_MIN_VAL
#define DBL_MAX_EXP FLT_MAX_EXP
#define DBL_MIN_EXP FLT_MIN_EXP
#define DBL_MAX_10_EXP FLT_MAX_10_EXP
#define DBL_MIN_10_EXP FLT_MIN_10_EXP
#define DBL_DIG FLT_DIG
#define DBL_MANT_DIG FLT_MANT_DIG
#define DBL_EXP_DIG FLT_EXP_DIG
#define DBL_POS_EPS FLT_POS_EPS
#define DBL_NEG_EPS FLT_NEG_EPS
#define DBL_POS_EPS_EXP FLT_POS_EPS_EXP
#define DBL_NEG_EPS_EXP FLT_NEG_EPS_EXP
#else
#define DBL_RADIX 2
#if defined(_SH4)&!defined(_RON)
#define DBL_ROUNDS 0
#define DBL_GUARD 0
#else
#define DBL_ROUNDS 1
#define DBL_GUARD 1
#endif
#define DBL_NORMALIZE 1
#define DBL_MAX _DBL_MAX_VAL
#define DBL_MIN _DBL_MIN_VAL
#define DBL_MAX_EXP 1023
#if defined(_SH4)&!defined(_DON)
#define DBL_MIN_EXP (-1022)
#else
#define DBL_MIN_EXP (-1074)
#endif
#define DBL_MAX_10_EXP 308
#if defined(_SH4)&!defined(_DON)
#define DBL_MIN_10_EXP (-308)
#else
#define DBL_MIN_10_EXP (-323)
#endif
#define DBL_DIG 15
#define DBL_MANT_DIG 53
#define DBL_EXP_DIG 11
#if defined(_SH4)&!defined(_RON)
#define DBL_POS_EPS 2.2204460492503131e-16
#if defined(_DON)
#define DBL_NEG_EPS 4.9406564584124655e-324
#else
#define DBL_NEG_EPS 2.2250738585072014e-308
#endif
#else
#define DBL_POS_EPS 1.1102230246251567e-16
#define DBL_NEG_EPS 5.5511151231257834e-17
#endif
#define DBL_POS_EPS_EXP (-52)
#ifdef _SH4
#ifdef _RON
#define DBL_NEG_EPS_EXP (-53)
#else
#ifdef _DON
#define DBL_NEG_EPS_EXP (-1023)
#else
#define DBL_NEG_EPS_EXP (-1022)
#endif
#endif
#else
#define DBL_NEG_EPS_EXP (-53)
#endif
#ifdef _FPD
#define FLT_RADIX DBL_RADIX
#define FLT_ROUNDS DBL_ROUNDS
#define FLT_GUARD DBL_GUARD
#define FLT_NORMALIZE DBL_NORMALIZE
#define FLT_MAX _DBL_MAX_VAL
#define FLT_MIN _DBL_MIN_VAL
#define FLT_MAX_EXP DBL_MAX_EXP
#define FLT_MIN_EXP DBL_MIN_EXP
#define FLT_MAX_10_EXP DBL_MAX_10_EXP
#define FLT_MIN_10_EXP DBL_MIN_10_EXP
#define FLT_DIG DBL_DIG
#define FLT_MANT_DIG DBL_MANT_DIG
#define FLT_EXP_DIG DBL_EXP_DIG
#define FLT_POS_EPS DBL_POS_EPS
#define FLT_NEG_EPS DBL_NEG_EPS
#define FLT_POS_EPS_EXP DBL_POS_EPS_EXP
#define FLT_NEG_EPS_EXP DBL_NEG_EPS_EXP
#endif
#endif
#ifdef _FLT
#define LDBL_RADIX 2
#define LDBL_ROUNDS 1
#define LDBL_GUARD 1
#define LDBL_NORMALIZE 1
#define LDBL_MAX _LDBL_MAX_VAL
#define LDBL_MIN _LDBL_MIN_VAL
#define LDBL_MAX_EXP 1023
#define LDBL_MIN_EXP (-1074)
#define LDBL_MAX_10_EXP 308
#define LDBL_MIN_10_EXP (-323)
#define LDBL_DIG 15
#define LDBL_MANT_DIG 53
#define LDBL_EXP_DIG 11
#define LDBL_POS_EPS 1.1102230246251567e-16
#define LDBL_NEG_EPS 5.5511151231257834e-17
#define LDBL_POS_EPS_EXP (-52)
#define LDBL_NEG_EPS_EXP (-53)
#else
#define LDBL_RADIX DBL_RADIX
#define LDBL_ROUNDS DBL_ROUNDS
#define LDBL_GUARD DBL_GUARD
#define LDBL_NORMALIZE DBL_NORMALIZE
#define LDBL_MAX DBL_MAX
#define LDBL_MIN DBL_MIN
#define LDBL_MAX_EXP DBL_MAX_EXP
#define LDBL_MIN_EXP DBL_MIN_EXP
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
#define LDBL_DIG DBL_DIG
#define LDBL_MANT_DIG DBL_MANT_DIG
#define LDBL_EXP_DIG DBL_EXP_DIG
#define LDBL_POS_EPS DBL_POS_EPS
#define LDBL_NEG_EPS DBL_NEG_EPS
#define LDBL_POS_EPS_EXP DBL_POS_EPS_EXP
#define LDBL_NEG_EPS_EXP DBL_NEG_EPS_EXP
#endif
#endif

+ 0
- 60
include/iomanip View File

@@ -1,60 +0,0 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Embeded C++ Library Header <iomanip>
//
//====================================================================
// File: iomanip
// Purpose: Definition of class iomanip
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _IOMANIP_
#define _IOMANIP_
#include <istream>
#include <ostream>
//Class
class smanip{
private:
union{
int val_i;
char val_c;
ios_base::fmtflags val_f;
};
union{
ios_base& (*pfi)(ios_base&,int);
ios_base& (*pfc)(ios_base&,char);
ios_base& (*pff)(ios_base&,ios_base::fmtflags);
};
enum _ec2p_smanip_t{
_ec2p_smanip_i,_ec2p_smanip_c ,_ec2p_smanip_f
}_ec2p_smanip_data;
public:
smanip(ios_base& (*pf)(ios_base&,int),int arg)
:pfi(pf),val_i(arg),_ec2p_smanip_data(_ec2p_smanip_i){}
smanip(ios_base& (*pf)(ios_base&,char),char arg)
:pfc(pf),val_c(arg),_ec2p_smanip_data(_ec2p_smanip_c){}
smanip(ios_base& (*pf)(ios_base&,ios_base::fmtflags),ios_base::fmtflags arg)
:pff(pf),val_f(arg),_ec2p_smanip_data(_ec2p_smanip_f){}
friend ostream& operator << (ostream&,smanip);
friend istream& operator >> (istream&,smanip);
};
//Manipulators
smanip resetiosflags(ios_base::fmtflags);
smanip setiosflags(ios_base::fmtflags);
smanip setbase(int);
smanip setfill(char);
smanip setprecision(int);
smanip setw(int);
#endif

+ 0
- 192
include/ios View File

@@ -1,192 +0,0 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Embeded C++ Class Library Header <ios>
//
//====================================================================
// File: ios
// Purpose: Definition of class ios
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _IOS_
#define _IOS_
class streambuf;
class ostream;
typedef long POS_T;
typedef long INT_T;
typedef long SZ_T;
typedef long OFF_T;
typedef OFF_T streamoff;
typedef SZ_T streamsize;
typedef INT_T int_type;
typedef POS_T pos_type;
typedef OFF_T off_type;
class ios_base {
public:
typedef long fmtflags;
static const fmtflags boolalpha;
static const fmtflags dec;
static const fmtflags fixed;
static const fmtflags hex;
static const fmtflags internal;
static const fmtflags left;
static const fmtflags oct;
static const fmtflags right;
static const fmtflags scientific;
static const fmtflags showbase;
static const fmtflags showpoint;
static const fmtflags showpos;
static const fmtflags skipws;
static const fmtflags unitbuf;
static const fmtflags uppercase;
static const fmtflags adjustfield;
static const fmtflags basefield;
static const fmtflags floatfield;
typedef int iostate;
static const iostate badbit;
static const iostate eofbit;
static const iostate failbit;
static const iostate goodbit;
typedef int openmode;
static const openmode app;
static const openmode ate;
static const openmode binary;
static const openmode in;
static const openmode out;
static const openmode trunc;
typedef int seekdir;
static const seekdir beg;
static const seekdir cur;
static const seekdir end;
class Init;
fmtflags flags() const {return (fmtflags)fmtfl;}
fmtflags flags(fmtflags);
fmtflags setf(fmtflags) ;
fmtflags setf(fmtflags, fmtflags);
void unsetf(fmtflags);
char fill() const {
return (char)fillch;
}
char fill(char);
int precision() const {
return prec;
}
streamsize precision(streamsize);
streamsize width() const {return wide;}
streamsize width(streamsize);
// static int xalloc() {return index++;} // Not implemented
// long & ipword(int); // Not implemented
// long * &pword(int); // Not implemented
~ios_base(){} // destructor
// callbacks -- exposition only
enum event {
erase_event,
imbue_event,
copyfmt_event
};
typedef void (*event_callback)(event, ios_base&, int index);
void register_callback(event_callback fn, int index);
static bool sync_with_stdio(bool sync = true){ return true; }
class Init{
public:
Init(){init_cnt++;}
~Init(){init_cnt--;}
private:
static int init_cnt;
};