/contrib/sdk/sources/SDL-1.2.2_newlib/src/SDL_kos.h |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/Makefile.tcc |
---|
File deleted |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/Tupfile.lua |
---|
2,7 → 2,7 |
tup.include("../../../../../programs/use_gcc.lua") |
tup.include("../../../../../programs/use_newlib.lua") |
tup.include("../../../../../programs/use_sound.lua") |
INCLUDES = INCLUDES .. " -I. -I../include -Ihermes -Iaudio -Ivideo -Ievents -Ijoystick -Icdrom -Ithread -Itimer -Iendian -Ifile -Isyscall/include" |
INCLUDES = INCLUDES .. " -I. -I../include -Ihermes -Iaudio -Ivideo -Ievents -Ijoystick -Icdrom -Ithread -Itimer -Iendian -Ifile -ISYSCALL/include" |
CFLAGS = CFLAGS .. ' -D_REENTRANT -DPACKAGE=\"SDL\" -DVERSION=\"1.2.2\"' |
CFLAGS = CFLAGS .. ' -DENABLE_AUDIO -UDISABLE_AUDIO -DDISABLE_JOYSTICK' |
CFLAGS = CFLAGS .. ' -DDISABLE_CDROM -DDISABLE_THREADS -DENABLE_TIMERS' |
21,6 → 21,7 |
"timer/dummy/", |
"video/", |
"video/menuetos/", |
"SYSCALL/src/" |
} |
for i,v in ipairs(FOLDERS) do |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/hermes/mmx_main.asm |
---|
12,7 → 12,6 |
%include "common.inc" |
SDL_FUNC _ConvertMMX |
SDL_FUNC ConvertMMX |
SECTION .text |
31,7 → 30,6 |
;; 32: void (*converter_function)() |
;; 36: int32 *lookup |
ConvertMMX |
_ConvertMMX: |
push ebp |
mov ebp,esp |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/hermes/mmxp2_32.asm |
---|
28,13 → 28,6 |
SDL_FUNC _ConvertMMXpII32_16RGB555 |
SDL_FUNC _ConvertMMXpII32_16BGR555 |
SDL_FUNC ConvertMMXpII32_24RGB888 |
SDL_FUNC ConvertMMXpII32_16RGB565 |
SDL_FUNC ConvertMMXpII32_16BGR565 |
SDL_FUNC ConvertMMXpII32_16RGB555 |
SDL_FUNC ConvertMMXpII32_16BGR555 |
;; Macros for conversion routines |
%macro _push_immq_mask 1 |
67,7 → 60,6 |
SECTION .text |
ConvertMMXpII32_24RGB888: |
_ConvertMMXpII32_24RGB888: |
; set up mm6 as the mask, mm7 as zero |
130,7 → 122,7 |
retn |
ConvertMMXpII32_16RGB565: |
_ConvertMMXpII32_16RGB565: |
; set up masks |
198,7 → 190,7 |
.L4: |
retn |
ConvertMMXpII32_16BGR565: |
_ConvertMMXpII32_16BGR565: |
load_immq mm5, mmx32_rgb565_r |
268,7 → 260,6 |
.L4: |
retn |
ConvertMMXpII32_16BGR555: |
_ConvertMMXpII32_16BGR555: |
; the 16BGR555 converter is identical to the RGB555 one, |
283,8 → 274,6 |
; would almost certainly be faster, even if only a little. |
; I did rename 'mmx32_rgb555_add' to 'mmx32_rgb555_mul', which is |
; (I think) a more accurate name.. |
ConvertMMXpII32_16RGB555: |
_ConvertMMXpII32_16RGB555: |
load_immq mm7, mmx32_rgb555_mul |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/hermes/x86_main.asm |
---|
16,9 → 16,6 |
SDL_FUNC _ConvertX86 |
SDL_FUNC _Hermes_X86_CPU |
SDL_FUNC ConvertX86 |
SDL_FUNC Hermes_X86_CPU |
SECTION .data |
cpu_flags dd 0 |
39,7 → 36,6 |
;; 32: void (*converter_function)() |
;; 36: int32 *lookup |
ConvertX86: |
_ConvertX86: |
push ebp |
mov ebp,esp |
76,7 → 72,7 |
endconvert: |
ret |
Hermes_X86_CPU: |
_Hermes_X86_CPU: |
pushfd |
pop eax |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/hermes/x86p_16.asm |
---|
19,18 → 19,10 |
SDL_FUNC _ConvertX86p16_16BGR555 |
SDL_FUNC _ConvertX86p16_8RGB332 |
SDL_FUNC ConvertX86p16_16BGR565 |
SDL_FUNC ConvertX86p16_16RGB555 |
SDL_FUNC ConvertX86p16_16BGR555 |
SDL_FUNC ConvertX86p16_8RGB332 |
EXTERN _ConvertX86 |
EXTERN ConvertX86 |
SECTION .text |
ConvertX86p16_16BGR565: |
_ConvertX86p16_16BGR565: |
; check short |
136,7 → 128,11 |
.L7: |
retn |
ConvertX86p16_16RGB555: |
_ConvertX86p16_16RGB555: |
; check short |
240,7 → 236,11 |
.L7: pop ebp |
retn |
ConvertX86p16_16BGR555: |
_ConvertX86p16_16BGR555: |
; check short |
358,7 → 358,7 |
ConvertX86p16_8RGB332: |
_ConvertX86p16_8RGB332: |
; check short |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/hermes/x86p_32.asm |
---|
24,18 → 24,6 |
SDL_FUNC _ConvertX86p32_16BGR555 |
SDL_FUNC _ConvertX86p32_8RGB332 |
SDL_FUNC ConvertX86p32_32BGR888 |
SDL_FUNC ConvertX86p32_32RGBA888 |
SDL_FUNC ConvertX86p32_32BGRA888 |
SDL_FUNC ConvertX86p32_24RGB888 |
SDL_FUNC ConvertX86p32_24BGR888 |
SDL_FUNC ConvertX86p32_16RGB565 |
SDL_FUNC ConvertX86p32_16BGR565 |
SDL_FUNC ConvertX86p32_16RGB555 |
SDL_FUNC ConvertX86p32_16BGR555 |
SDL_FUNC ConvertX86p32_8RGB332 |
SECTION .text |
;; _Convert_* |
47,7 → 35,6 |
;; EAX, EBX, EDX |
ConvertX86p32_32BGR888: |
_ConvertX86p32_32BGR888: |
; check short |
128,7 → 115,7 |
ConvertX86p32_32RGBA888: |
_ConvertX86p32_32RGBA888: |
; check short |
199,7 → 186,7 |
ConvertX86p32_32BGRA888: |
_ConvertX86p32_32BGRA888: |
; check short |
275,7 → 262,6 |
;; 32 bit RGB 888 to 24 BIT RGB 888 |
ConvertX86p32_24RGB888: |
_ConvertX86p32_24RGB888: |
; check short |
373,7 → 359,6 |
;; 32 bit RGB 888 to 24 bit BGR 888 |
ConvertX86p32_24BGR888: |
_ConvertX86p32_24BGR888: |
; check short |
473,7 → 458,7 |
;; 32 bit RGB 888 to 16 BIT RGB 565 |
ConvertX86p32_16RGB565: |
_ConvertX86p32_16RGB565: |
; check short |
cmp ecx,BYTE 16 |
589,7 → 574,6 |
;; 32 bit RGB 888 to 16 BIT BGR 565 |
ConvertX86p32_16BGR565: |
_ConvertX86p32_16BGR565: |
; check short |
703,7 → 687,7 |
;; 32 BIT RGB TO 16 BIT RGB 555 |
ConvertX86p32_16RGB555: |
_ConvertX86p32_16RGB555: |
; check short |
814,7 → 798,7 |
;; 32 BIT RGB TO 16 BIT BGR 555 |
ConvertX86p32_16BGR555: |
_ConvertX86p32_16BGR555: |
; check short |
932,10 → 916,9 |
;; FROM 32 BIT RGB to 8 BIT RGB (rrrgggbbb) |
;; This routine writes FOUR pixels at once (dword) and then, if they exist |
;; the trailing three pixels |
ConvertX86p32_8RGB332: |
_ConvertX86p32_8RGB332: |
.L_ALIGNED: |
push ecx |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/video/menuetos/SDL_menuetevents.c |
---|
1,5 → 1,5 |
#include <SDL_kos.h> |
//#include <kos32sys.h> |
#include <menuet/os.h> |
#include <kos32sys.h> |
#include <stdlib.h> |
#include <stdio.h> |
#include "SDL.h" |
164,7 → 164,7 |
static int ext_code=0; |
static __u8 old_mode=0; |
for (;;) { |
i=__kos__check_for_event(); |
i=__menuet__check_for_event(); |
switch(i) |
{ |
case 0: |
173,7 → 173,7 |
MenuetOS_SDL_RepaintWnd(); |
break; |
case 2: |
key.scancode = __kos__getkey(); |
key.scancode = __menuet__getkey(); |
if (key.scancode == 0xE0 || key.scancode == 0xE1) |
{ext_code=key.scancode;break;} |
if (ext_code == 0xE1 && (key.scancode & 0x7F) == 0x1D) break; |
200,7 → 200,7 |
SDL_PrivateKeyboard(code,&key); |
break; |
case 3: |
if(__kos__get_button_id()==1) exit(0); |
if(get_os_button()==1) exit(0); |
break; |
case 6: { |
int __tmp,mx,my; |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/video/menuetos/SDL_menuetvideo.c |
---|
1,6 → 1,7 |
#include <stdlib.h> |
#include <stdio.h> |
#include <SDL_kos.h> |
#include <menuet/os.h> |
#include <kos32sys.h> |
#include "SDL.h" |
#include "SDL_error.h" |
#include "SDL_video.h" |
30,10 → 31,20 |
static int IsStyle4Available=0; |
#endif |
void kol_define_window(unsigned short x1,unsigned short y1,unsigned short xsize,unsigned short ysize, |
unsigned long body_color,unsigned long grab_color,unsigned long frame_color) |
{ |
unsigned long a,b; |
a=(x1<<16)|xsize; |
b=(y1<<16)|ysize; |
__asm__ __volatile__("int $0x40"::"a"(0),"b"(a),"c"(b),"d"(body_color),"S"(grab_color), |
"D"(frame_color)); |
} |
void MenuetOS_SDL_RepaintWnd(void) |
{ |
__kos__window_redraw(1); |
__kos__define_window(1,1,vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+get_skinh()+4, |
begin_draw(); |
kol_define_window(1,1,vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+get_skinh()+4, |
#ifdef KEEP_OBSOLETE_STYLE3 |
IsStyle4Available?0x34000000:0x33000000 |
#else |
44,9 → 55,9 |
// __asm__ __volatile__("int3"); |
if(vm_suf && vm_suf->hidden->__video_buffer) |
__kos__draw_bitmap(vm_suf->hidden->__video_buffer, 0,0, |
draw_bitmap(vm_suf->hidden->__video_buffer, 0,0, |
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y); |
__kos__window_redraw(2); |
end_draw(); |
} |
static int MenuetOS_AllocHWSurface(_THIS,SDL_Surface * surface) |
71,7 → 82,7 |
{ |
if(numrects) |
{ |
__kos__draw_bitmap(this->hidden->__video_buffer, 0,0, |
draw_bitmap(this->hidden->__video_buffer, 0,0, |
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y); |
} |
} |
100,17 → 111,6 |
if(was_initialized) __asm__("int $0x40"::"a"(71),"b"(1),"c"(title)); |
} |
void debug_board_write_byte(const char ch){ |
__asm__ __volatile__( |
"int $0x40" |
::"a"(63), "b"(1), "c"(ch)); |
} |
void debug_board_write_str(const char* str){ |
while(*str) |
debug_board_write_byte(*str++); |
} |
SDL_Surface * MenuetOS_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags) |
{ |
int ly; |
123,6 → 123,19 |
char info[100]; |
sprintf(info, "width = %d, height = %d, pitch = %d, bpp = %d\n", current->w, current->h, current->pitch, bpp); |
void debug_board_write_byte(const char ch){ |
__asm__ __volatile__( |
"int $0x40" |
: |
:"a"(63), "b"(1), "c"(ch)); |
} |
void debug_board_write_str(const char* str){ |
while(*str) |
debug_board_write_byte(*str++); |
} |
debug_board_write_str(info); |
// __asm__ __volatile__("int3"); |
146,7 → 159,7 |
} |
else |
{ |
__kos__set_events_mask(0x27); |
set_wanted_events_mask(0x27); |
was_initialized=1; |
MenuetOS_SDL_RepaintWnd(); |
} |
214,7 → 227,7 |
static int MenuetOS_FlipHWSurface(_THIS,SDL_Surface * surface) |
{ |
__kos__draw_bitmap(surface->pixels, 0,0,surface->w,surface->h); |
draw_bitmap(surface->pixels, 0,0,surface->w,surface->h); |
return 0; |
} |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/Makefile |
---|
51,15 → 51,16 |
mv -f $(LIBNAME) $(SDK_DIR)/lib |
$(LIBNAME).a: $(OBJS) |
$(AR) -crs $(LIBNAME).a $(OBJS) |
$(MAKE) -C SYSCALL/src |
$(AR) -crs $(LIBNAME).a $(OBJS) SYSCALL/src/os.o |
$(LIBNAME).dll: libSDL.def $(OBJS) |
$(LD) $(LDFLAGS) -o $@ libSDL.def $(OBJS) $(LIBS) -ldll -lsound -lc.dll |
$(LD) $(LDFLAGS) -o $@ libSDL.def $(OBJS) SYSCALL/src/os.o $(LIBS) -ldll -lsound -lc.dll |
$(STRIP) $@ |
%.o : %.asm Makefile |
nasm -Ihermes -f coff $< |
nasm -f coff $< |
%.o : %.c Makefile |
$(CC) $(CFLAGS) -o $@ $< |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/SYSCALL/src/os.c |
---|
0,0 → 1,39 |
#include <menuet/os.h> |
void __menuet__define_window(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize, |
__u32 body_color,__u32 grab_color,__u32 frame_color) |
{ |
__u32 a,b; |
a=(x1<<16)|xsize; |
b=(y1<<16)|ysize; |
__asm__ __volatile__("int $0x40"::"a"(0),"b"(a),"c"(b),"d"(body_color),"S"(grab_color), |
"D"(frame_color)); |
} |
void __menuet__window_redraw(int status) |
{ |
__asm__ __volatile__("int $0x40"::"a"(12),"b"(status)); |
} |
void __menuet__putimage(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,char * image) |
{ |
__u32 a,b; |
a=(xsize<<16)|ysize; |
b=(x1<<16)|y1; |
__asm__ __volatile__("int $0x40"::"a"(7),"b"(image),"c"(a),"d"(b)); |
} |
int __menuet__getkey(void) |
{ |
__u16 __ret; |
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(2)); |
if(!(__ret & 0xFF)) return (__ret>>8)&0xFF; else return 0; |
} |
int __menuet__check_for_event(void) |
{ |
__u32 __ret; |
__asm__ __volatile__("int $0x40":"=a"(__ret):"0"(11)); |
return __ret; |
} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/SYSCALL/src/Makefile |
---|
0,0 → 1,19 |
CC = kos32-gcc |
LD = kos32-ld |
SDK_DIR = $(abspath ../../../../../) |
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 |
INCLUDES = -I ../include -I $(SDK_DIR)/sources/newlib/libc/include |
SYSCALL_SRC := $(notdir $(wildcard *.c)) |
OBJECTS = $(patsubst %.c, %.o, $(SYSCALL_SRC)) |
default: $(patsubst %.c,%.o,$(SYSCALL_SRC)) |
%.o : %.c Makefile $(SYSCALL_SRC) |
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $< |
clean: |
rm *.o |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/SYSCALL/include/menuet/os.h |
---|
0,0 → 1,218 |
#ifndef __GLIBC__MENUET_OS_H |
#define __GLIBC__MENUET_OS_H |
#ifdef __cplusplus |
extern "C" { |
#endif |
typedef unsigned char __u8; |
typedef unsigned short __u16; |
typedef unsigned long __u32; |
#pragma pack(push,1) |
void __menuet__define_window(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize, |
__u32 body_color,__u32 grab_color,__u32 frame_color); |
void __menuet__window_redraw(int status); |
void __menuet__putpixel(__u32 x,__u32 y,__u32 color); |
int __menuet__getkey(void); |
__u32 __menuet__getsystemclock(void); |
void __menuet__write_text(__u16 x,__u16 y,__u32 color,char * text,int len); |
void __menuet__delay100(int m); |
__u32 __menuet__open(char * name,char * data); |
void __menuet__save(char * name,char * data,__u32 count); |
void __menuet__putimage(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,char * image); |
void __menuet__make_button(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize, |
int id,__u32 color); |
int __menuet__get_button_id(void); |
int __menuet__wait_for_event(void); |
int __menuet__check_for_event(void); |
void __menuet__bar(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,__u32 color); |
void __menuet__sys_exit(void); |
void * __menuet__exec_thread(void (* func_ptr)(void),__u32 stack_size,int * retp); |
void __menuet__idle(void); |
void __menuet__exec_ramdisk(char * filename,char * args,...); |
void __menuet__exec_hd(char * filename,char * args,...); |
struct process_table_entry |
{ |
__u32 cpu_usage; |
__u16 pos_in_windowing_stack; |
__u16 win_stack_val_at_ecx; |
__u16 reserved1; |
char name[12]; |
__u32 memstart; |
__u32 memused; |
__u32 pid; |
__u32 winx_start,winy_start; |
__u32 winx_size,winy_size; |
__u16 thread_state; |
__u16 reserved2; |
__u32 client_left,client_top,client_width,client_height; |
__u8 window_state; |
__u8 reserved3[1024-71]; |
}; |
#define PID_WHOAMI (-1) |
int __menuet__get_process_table(struct process_table_entry * proctab,int pid); |
void __menuet__get_screen_max(__u16 * x,__u16 * y); |
#define BTYPE_TILE 1 |
#define BTYPE_STRETCH 2 |
void __menuet__set_background_size(__u32 xsz,__u32 ysz); |
void __menuet__write_background_mem(__u32 pos,__u32 color); |
void __menuet__draw_background(void); |
void __menuet__set_background_draw_type(int type); |
void __menuet__background_blockmove(char * src_ptr,__u32 bgr_dst,__u32 count); |
void __menuet__reset_mpu401(void); |
void __menuet__write_mpu401(__u8 d); |
__u32 __menuet__get_date(void); |
void __menuet__line(__u16 x1,__u16 y1,__u16 x2,__u16 y2,__u32 color); |
void __menuet__set_bitfield_for_wanted_events(__u32 ev); |
#define EVENT_REDRAW 0x00000001 |
#define EVENT_KEY 0x00000002 |
#define EVENT_BUTTON 0x00000004 |
#define EVENT_END_REQUEST 0x00000008 |
#define EVENT_DESKTOP_BACK_DRAW 0x00000010 |
#define EVENT_MOUSE_CHANGE 0x00000020 |
#define EVENT_IPC 0x00000040 |
#define EVENT_MOUSE_CURSOR_MASK 0x40000000 // the window does not receive mouse events if cursor outside window |
#define EVENT_MOUSE_WINDOW_MASK 0x80000000 // inactive window does not receive mouse events |
__u32 __menuet__get_irq_owner(__u32 irq); |
int __menuet__get_data_read_by_irq(__u32 irq,__u32 * num_bytes_in_buf,__u8 * data); |
int __menuet__send_data_to_device(__u16 port,__u8 val); |
void __menuet__program_irq(void * intr_table,__u32 irq_num); |
int __menuet__reserve_irq(int irqno); |
int __menuet__free_irq(int irqno); |
int __menuet__reserve_port_area(__u32 start,__u32 end); |
int __menuet__free_port_area(__u32 start,__u32 end); |
#define NAME_LEN 512 |
#define STC_READ 0 |
#define STC_WRITE 1 |
#define STC_APPEND 2 |
struct systree_info |
{ |
__u32 command; |
__u32 file_offset_low; |
__u32 file_offset_high; |
__u32 size; |
__u32 data_pointer; |
char _zero; |
const char* nameptr; |
}; |
struct systree_info2 |
{ |
__u32 command; |
__u32 file_offset_low; |
__u32 file_offset_high; |
__u32 size; |
__u32 data_pointer; |
char name[NAME_LEN]; |
}; |
struct bdfe_time |
{ |
__u8 seconds; |
__u8 minutes; |
__u8 hours; |
__u8 reserved; |
}; |
struct bdfe_date |
{ |
__u8 day; |
__u8 month; |
__u16 year; |
}; |
struct bdfe_item |
{ |
__u32 attr; |
__u8 nametype; |
__u8 reserved[3]; |
struct bdfe_time ctime; |
struct bdfe_date cdate; |
struct bdfe_time atime; |
struct bdfe_date adate; |
struct bdfe_time mtime; |
struct bdfe_date mdate; |
__u32 filesize_low; |
__u32 filesize_high; |
}; |
int __kolibri__system_tree_access(struct systree_info * info); |
int __kolibri__system_tree_access2(struct systree_info2 * info); |
int __fslayer_open(char * name,int flags); |
int __fslayer_close(int fd); |
int __fslayer_lseek(int fd,int pos,int seek_type); |
int __fslayer_tell(int fd); |
int __fslayer_read(int fd,void * buffer,__u32 count); |
int __fslayer_write(int fd,void * buffer,__u32 count); |
typedef struct |
{ |
__u8 lock; |
__u8 resvd[3]; |
__u32 ptr_to_fmsg_pos; |
/* Below is for message */ |
__u32 sender_pid; |
__u32 msg_length; |
} msgrcva_t /*__attribute__((packed))*/; |
void send_message(int pid,void * msg_ptr,int message_size); |
void define_receive_area(msgrcva_t * rcva_ptr,int size); |
void __menuet__sound_load_block(char * blockptr); |
void __menuet__sound_play_block(void); |
void __menuet__dga_get_caps(int * xres,int * yres,int * bpp,int * bpscan); |
void get_pci_version(__u8 * major,__u8 * minor); |
void pci_get_last_bus(__u8 * last_bus); |
void get_pci_access_mechanism(__u8 * mechanism); |
void pci_write_config_byte(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u8 val); |
void pci_write_config_word(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u16 val); |
void pci_write_config_dword(__u8 bus,__u8 dev,__u8 fn,__u8 reg,__u32 val); |
__u8 pci_read_config_byte(__u8 bus,__u8 dev,__u8 fn,__u8 reg); |
__u16 pci_read_config_word(__u8 bus,__u8 dev,__u8 fn,__u8 reg); |
__u32 pci_read_config_dword(__u8 bus,__u8 dev,__u8 fn,__u8 reg); |
typedef struct{ |
char* name; |
void* pointer; |
} IMP_ENTRY; |
typedef const IMP_ENTRY* IMP_TABLE; |
IMP_TABLE __kolibri__cofflib_load(const char*); |
__u32 __kolibri__cofflib_getproc(IMP_TABLE, const char*); |
//int __kolibri__cofflib_link(FUNC*, IMP_TABLE); |
static __inline__ void __menuet__debug_out_byte(const char ch){ |
__asm__ __volatile__ ("int $0x40"::"a"(63L),"b"(1L),"c"((__u8)ch)); |
} |
void __menuet__debug_out(const char* str); |
#define TIME_GETH(x) ((x)&0x000000FF) |
#define TIME_GETM(x) ((((x)&0x00FF00)>>8)&0xFF) |
#define TIME_GETS(x) ((((x)&0xFF0000)>>16)&0xFF) |
#pragma pack(pop) |
#ifdef __cplusplus |
} |
#endif |
#endif |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/audio/SDL_kolibri_audio.c |
---|
1,12 → 1,11 |
#include "SDL_audio.h" |
#include <SDL_kos.h> |
#include <kos32sys.h> |
#include <menuet/os.h> |
#include <stdlib.h> |
#include <string.h> |
#include <sound.h> |
#include <stdio.h> |
extern void SDL_printf(const char * fmt,...); |
static void GetNotify(__u32* event) |
{ |
__asm__("int $0x40" :: "a"(68),"b"(14),"c"(event)); |
144,7 → 143,7 |
} |
} |
if (bPaused) |
__kos__delay100(5); |
delay(5); |
else |
{ |
GetNotify(event); |
/contrib/sdk/sources/SDL-1.2.2_newlib/src/timer/dummy/SDL_systimer.c |
---|
26,14 → 26,16 |
#endif |
#include <stdio.h> |
#include <time.h> |
#include <sys/time.h> |
#include <signal.h> |
#include <unistd.h> |
#include <string.h> |
#include <errno.h> |
#include <kos32sys.h> |
#include "SDL_error.h" |
#include "SDL_timer.h" |
#include "SDL_timer_c.h" |
#include "SDL_kos.h" |
#if _POSIX_THREAD_SYSCALL_SOFT |
#include <pthread.h> |
87,7 → 89,7 |
void SDL_Delay (Uint32 ms) |
{ |
__kos__delay100(ms); |
delay(ms); |
/* Uint32 start = SDL_GetTicks(); |
do |
__asm__("int $0x40" :: "a"(68),"b"(1)); |