From harshavsn at gmail.com Mon Jul 2 17:40:32 2007 From: harshavsn at gmail.com (Harsha Sri Narayana) Date: Mon, 2 Jul 2007 22:40:32 +0100 Subject: [quake3] [PATCH] x86_64 vm without gas In-Reply-To: <200706291756.06926.arny@ats.s.bawue.de> References: <200706291612.07131.ludwig.nussel@suse.de> <200706291756.06926.arny@ats.s.bawue.de> Message-ID: <7784416f0707021440v4909f1a9p32832c503b246761@mail.gmail.com> What does this mean to the lay man? Sounds odd, but what is Gas? Harsha On 29/06/07, Thilo Schulz wrote: > > On Friday 29 June 2007 16:12, Ludwig Nussel wrote: > > So I decided to write an x86_64 > > assembler for use in ioquake3. Surely I would have been faster by > > just replacing all those assembler instructions in vm_x86_64.c with > > their literal opcodes like vm_x86.c does it but that would have been > > no fun :-) The code lacks design (ie q&d) as I took an *cough* > > iterative approach to write the assembler. > > This is awesome! > > -- > Thilo Schulz > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From defsyn at gmail.com Mon Jul 2 17:49:24 2007 From: defsyn at gmail.com (Henry Garcia) Date: Mon, 2 Jul 2007 17:49:24 -0400 Subject: [quake3] [PATCH] x86_64 vm without gas In-Reply-To: <7784416f0707021440v4909f1a9p32832c503b246761@mail.gmail.com> References: <200706291612.07131.ludwig.nussel@suse.de> <200706291756.06926.arny@ats.s.bawue.de> <7784416f0707021440v4909f1a9p32832c503b246761@mail.gmail.com> Message-ID: On 7/2/07, Harsha Sri Narayana wrote: > > What does this mean to the lay man? Sounds odd, but what is Gas? > Harsha Gnu assembler? On 29/06/07, Thilo Schulz wrote: > > > > On Friday 29 June 2007 16:12, Ludwig Nussel wrote: > > > So I decided to write an x86_64 > > > assembler for use in ioquake3. Surely I would have been faster by > > > just replacing all those assembler instructions in vm_x86_64.c with > > > their literal opcodes like vm_x86.c does it but that would have been > > > no fun :-) The code lacks design (ie q&d) as I took an *cough* > > > iterative approach to write the assembler. > > > > This is awesome! > > > > -- > > Thilo Schulz > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noisyb at gmx.net Mon Jul 2 18:40:40 2007 From: noisyb at gmx.net (Dirk) Date: Tue, 03 Jul 2007 00:40:40 +0200 Subject: [quake3] changing the default value for cl_allowDownload to make people play other/newer maps Message-ID: <46897EE8.4@gmx.net> Hi, most OA (and Q3) players don't even know what downloading is. Don't dispute that. I had a server with new maps running for quite some time now and ppl press faster ESC when they start to download than they shoot or they don't have download enabled at all. Also telling ppl to download and install the maps themselves is in 99.9% a waste of time. So, that we can have sufficient noobs on new maps I'd like to recommend, no, DEMAND(!) that the default bitmask value *) for cl_allowDownload may be set to 9 or 13. Thank you (in the name of everyone who spend time creating a new map). Dirk *) 1 - ENABLE 2 - do not use HTTP/FTP downloads 4 - do not use UDP downloads 8 - do not ask the client to disconnect when using HTTP/FTP From linuxmanmikec at gmail.com Mon Jul 2 19:34:30 2007 From: linuxmanmikec at gmail.com (LinuxManMikeC) Date: Mon, 2 Jul 2007 19:34:30 -0400 Subject: [quake3] changing the default value for cl_allowDownload to make people play other/newer maps In-Reply-To: <46897EE8.4@gmx.net> References: <46897EE8.4@gmx.net> Message-ID: <4561ec380707021634r27dfd274g719bcf3ad88816e7@mail.gmail.com> I would not have it ignore UDP downloads by default. An admin might not have an HTTP/FTP server available, so then no one would be able to connect unless they already had the map. At least when the client accepts the UDP download it leaves the user a choice to download or go elsewhere. Other than that, I agree with you. The client should accept downloads by default and default to trying HTTP/FTP downloads first. Now we must plead with admins to get nice fast HTTP/FTP servers. :-) Not really that hard to get one really, even a free one. On 7/2/07, Dirk wrote: > Hi, > most OA (and Q3) players don't even know what downloading is. Don't > dispute that. > > I had a server with new maps running for quite some time now and ppl > press faster ESC when they start to download than they shoot or they > don't have download enabled at all. > > Also telling ppl to download and install the maps themselves is in 99.9% > a waste of time. > > So, that we can have sufficient noobs on new maps I'd like to recommend, > no, DEMAND(!) that the default bitmask value *) for cl_allowDownload may > be set to 9 or 13. > > Thank you (in the name of everyone who spend time creating a new map). > > Dirk > > > > > > *) > 1 - ENABLE > 2 - do not use HTTP/FTP downloads > 4 - do not use UDP downloads > 8 - do not ask the client to disconnect when using HTTP/FTP > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > From noisyb at gmx.net Mon Jul 2 20:49:08 2007 From: noisyb at gmx.net (Dirk) Date: Tue, 03 Jul 2007 02:49:08 +0200 Subject: [quake3] changing the default value for cl_allowDownload to make people play other/newer maps In-Reply-To: <4561ec380707021634r27dfd274g719bcf3ad88816e7@mail.gmail.com> References: <46897EE8.4@gmx.net> <4561ec380707021634r27dfd274g719bcf3ad88816e7@mail.gmail.com> Message-ID: <46899D04.6020904@gmx.net> If UDP is also activated admins are not encouraged to use TCP instead. And users/clients who don't distinguish between UDP or TCP _will_ make the effort to find out howto disable downloading after they've seen that it transfers a 2-14mb map with only 5-25k or so. Then UDP and TCP will be disabled. If only TCP is enabled it will download fast or not at all and users won't bother to find out howto disable download. Admins who use UDP for downloading will have to switch to TCP. It's utter crap to have the game server uploading maps to the clients. Best thing would be to give developers for total conversions like OpenArena the option to remove UDP support at compile time with a flag or something. Dirk LinuxManMikeC wrote: > I would not have it ignore UDP downloads by default. An admin might > not have an HTTP/FTP server available, so then no one would be able to > connect unless they already had the map. At least when the client > accepts the UDP download it leaves the user a choice to download or go > elsewhere. Other than that, I agree with you. The client should > accept downloads by default and default to trying HTTP/FTP downloads > first. Now we must plead with admins to get nice fast HTTP/FTP > servers. :-) Not really that hard to get one really, even a free one. > > On 7/2/07, Dirk wrote: >> Hi, >> most OA (and Q3) players don't even know what downloading is. Don't >> dispute that. >> >> I had a server with new maps running for quite some time now and ppl >> press faster ESC when they start to download than they shoot or they >> don't have download enabled at all. >> >> Also telling ppl to download and install the maps themselves is in 99.9% >> a waste of time. >> >> So, that we can have sufficient noobs on new maps I'd like to recommend, >> no, DEMAND(!) that the default bitmask value *) for cl_allowDownload may >> be set to 9 or 13. >> >> Thank you (in the name of everyone who spend time creating a new map). >> >> Dirk >> >> >> >> >> >> *) >> 1 - ENABLE >> 2 - do not use HTTP/FTP downloads >> 4 - do not use UDP downloads >> 8 - do not ask the client to disconnect when using HTTP/FTP >> >> --- >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > From ludwig.nussel at suse.de Thu Jul 5 12:00:05 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Thu, 5 Jul 2007 18:00:05 +0200 Subject: [quake3] Re: x86_64 vm without gas In-Reply-To: <46851904.6090700@ngus.net> References: <200706291612.07131.ludwig.nussel@suse.de> <200706291626.04640.ludwig.nussel@suse.de> <46851904.6090700@ngus.net> Message-ID: <200707051800.05639.ludwig.nussel@suse.de> Tim Angus wrote: > Ludwig Nussel wrote: > > I don't expect any performance benefit in terms of fps in the game. > > Is it not a bit faster at the JIT compiling stage now though? Since it > doesn't have to spawn gas etc... Here's an updated version of the patch. It's somewhat faster than gas and doesn't crash anymore AFAICT. There's still room for speed improvement though. If noone complains I'd commit it this way. There are also binary RPM packages at http://software.opensuse.org/download/games:/action/openSUSE_Factory/x86_64/ cu Ludwig Index: code/qcommon/vm_x86_64.c =================================================================== --- code/qcommon/vm_x86_64.c (Revision 1106) +++ code/qcommon/vm_x86_64.c (Arbeitskopie) @@ -28,10 +28,16 @@ #include #include #include +#include +#include #include #include #include +#include +//#define USE_GAS +//#define DEBUG_VM + #ifdef DEBUG_VM #define Dfprintf(fd, args...) fprintf(fd, ##args) static FILE* qdasmout; @@ -39,6 +45,19 @@ #define Dfprintf(args...) #endif +#define VM_X86_64_MMAP + +#ifndef USE_GAS +void assembler_set_output(char* buf); +size_t assembler_get_code_size(void); +void assembler_init(int pass); +void assemble_line(const char* input, size_t len); +#ifdef Dfprintf +#undef Dfprintf +#define Dfprintf(args...) +#endif +#endif // USE_GAS + static void VM_Destroy_Compiled(vm_t* self); /* @@ -206,8 +225,29 @@ [OP_BLOCK_COPY] = 4, }; +#ifdef USE_GAS #define emit(x...) \ do { fprintf(fh_s, ##x); fputc('\n', fh_s); } while(0) +#else +void emit(const char* fmt, ...) +{ + va_list ap; + char line[4096]; + va_start(ap, fmt); + vsnprintf(line, sizeof(line), fmt, ap); + va_end(ap); + assemble_line(line, strlen(line)); +} +#endif // USE_GAS + +#ifdef USE_GAS +#define JMPIARG \ + emit("jmp i_%08x", iarg); +#else +#define JMPIARG \ + emit("movq $%lu, %%rax", vm->codeBase+vm->instructionPointers[iarg]); \ + emit("jmpq *%rax"); +#endif // integer compare and jump #define IJ(op) \ @@ -215,7 +255,8 @@ emit("movl 4(%%rsi), %%eax"); \ emit("cmpl 8(%%rsi), %%eax"); \ emit(op " i_%08x", instruction+1); \ - emit("jmp i_%08x", iarg); + JMPIARG \ + neednilabel = 1; #ifdef USE_X87 #define FJ(bits, op) \ @@ -225,7 +266,8 @@ emit("fnstsw %%ax");\ emit("testb $" #bits ", %%ah");\ emit(op " i_%08x", instruction+1);\ - emit("jmp i_%08x", iarg); + JMPIARG \ + neednilabel = 1; #define XJ(x) #else #define FJ(x, y) @@ -235,7 +277,8 @@ emit("ucomiss 8(%%rsi), %%xmm0");\ emit("jp i_%08x", instruction+1);\ emit(op " i_%08x", instruction+1);\ - emit("jmp i_%08x", iarg); + JMPIARG \ + neednilabel = 1; #endif #define SIMPLE(op) \ @@ -292,9 +335,14 @@ static void* getentrypoint(vm_t* vm) { +#ifdef USE_GAS return vm->codeBase+64; // skip ELF header +#else + return vm->codeBase; +#endif // USE_GAS } +#ifdef USE_GAS char* mmapfile(const char* fn, size_t* size) { int fd = -1; @@ -382,6 +430,7 @@ return size; } +#endif // USE_GAS static void block_copy_vm(unsigned dest, unsigned src, unsigned count) { @@ -410,8 +459,13 @@ char* code; unsigned iarg = 0; unsigned char barg = 0; + int neednilabel; + struct timeval tvstart = {0, 0}; + +#ifdef USE_GAS + byte* compiledcode; + int compiledsize; void* entryPoint; - char fn_s[2*MAX_QPATH]; // output file for assembler code char fn_o[2*MAX_QPATH]; // file written by as #ifdef DEBUG_VM @@ -419,16 +473,16 @@ #endif FILE* fh_s; int fd_s, fd_o; - byte* compiledcode; - int compiledsize; + gettimeofday(&tvstart, NULL); + Com_Printf("compiling %s\n", vm->name); #ifdef DEBUG_VM snprintf(fn_s, sizeof(fn_s), "%.63s.s", vm->name); snprintf(fn_o, sizeof(fn_o), "%.63s.o", vm->name); - fd_s = open(fn_s, O_CREAT|O_WRONLY, 0644); - fd_o = open(fn_o, O_CREAT|O_WRONLY, 0644); + fd_s = open(fn_s, O_CREAT|O_WRONLY|O_TRUNC, 0644); + fd_o = open(fn_o, O_CREAT|O_WRONLY|O_TRUNC, 0644); #else snprintf(fn_s, sizeof(fn_s), "/tmp/%.63s.s_XXXXXX", vm->name); snprintf(fn_o, sizeof(fn_o), "/tmp/%.63s.o_XXXXXX", vm->name); @@ -462,25 +516,50 @@ return; } - // translate all instructions - pc = 0; - code = (char *)header + header->codeOffset; - emit("start:"); emit("or %%r8, %%r8"); // check whether to set up instruction pointers emit("jnz main"); emit("jmp setupinstructionpointers"); emit("main:"); +#else // USE_GAS + int pass; + size_t compiledOfs = 0; + gettimeofday(&tvstart, NULL); + + for (pass = 0; pass < 2; ++pass) { + + if(pass) + { + compiledOfs = assembler_get_code_size(); + vm->codeLength = compiledOfs; + vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0); + if(vm->codeBase == (void*)-1) + Com_Error(ERR_DROP, "VM_CompileX86: can't mmap memory"); + + assembler_set_output((char*)vm->codeBase); + } + + assembler_init(pass); + +#endif // USE_GAS + + // translate all instructions + pc = 0; + code = (char *)header + header->codeOffset; + for ( instruction = 0; instruction < header->instructionCount; ++instruction ) { op = code[ pc ]; ++pc; - vm->instructionPointers[instruction] = pc; +#ifndef USE_GAS + vm->instructionPointers[instruction] = assembler_get_code_size(); +#endif -#if 0 + /* store current instruction number in r15 for debugging */ +#if 1 emit("nop"); emit("movq $%d, %%r15", instruction); emit("nop"); @@ -501,7 +580,17 @@ { Dfprintf(qdasmout, "%s\n", opnames[op]); } + +#ifdef USE_GAS emit("i_%08x:", instruction); +#else + if(neednilabel) + { + emit("i_%08x:", instruction); + neednilabel = 0; + } +#endif + switch ( op ) { case OP_UNDEF: @@ -560,6 +649,7 @@ // emit("frstor 4(%%rsi)"); emit("addq $4, %%rsi"); emit("movl %%eax, (%%rsi)"); // store return value + neednilabel = 1; break; case OP_PUSH: emit("addq $4, %%rsi"); @@ -628,7 +718,8 @@ emit("jp dojump_i_%08x", instruction); emit("jz i_%08x", instruction+1); emit("dojump_i_%08x:", instruction); - emit("jmp i_%08x", iarg); + JMPIARG + neednilabel = 1; #endif break; case OP_LTF: @@ -855,7 +946,7 @@ } } - +#ifdef USE_GAS emit("setupinstructionpointers:"); emit("movq $%lu, %%rax", (unsigned long)vm->instructionPointers); for ( instruction = 0; instruction < header->instructionCount; ++instruction ) @@ -888,8 +979,17 @@ vm->codeBase = compiledcode; // remember to skip ELF header! vm->codeLength = compiledsize; +#else // USE_GAS + } + assembler_init(0); + + if(mprotect(vm->codeBase, compiledOfs, PROT_READ|PROT_EXEC)) + Com_Error(ERR_DROP, "VM_CompileX86: mprotect failed"); +#endif // USE_GAS + vm->destroy = VM_Destroy_Compiled; +#ifdef USE_GAS entryPoint = getentrypoint(vm); // __asm__ __volatile__ ("int3"); @@ -910,8 +1010,6 @@ fclose(qdasmout); #endif - Com_Printf( "VM file %s compiled to %i bytes of code (%p - %p)\n", vm->name, vm->codeLength, vm->codeBase, vm->codeBase+vm->codeLength ); - out: close(fd_o); @@ -922,12 +1020,30 @@ unlink(fn_s); } #endif +#endif // USE_GAS + + if(vm->compiled) + { + struct timeval tvdone = {0, 0}; + struct timeval dur = {0, 0}; + Com_Printf( "VM file %s compiled to %i bytes of code (%p - %p)\n", vm->name, vm->codeLength, vm->codeBase, vm->codeBase+vm->codeLength ); + + gettimeofday(&tvdone, NULL); + timersub(&tvdone, &tvstart, &dur); + Com_Printf( "compilation took %lu.%06lu seconds\n", dur.tv_sec, dur.tv_usec ); + } } void VM_Destroy_Compiled(vm_t* self) { +#ifdef USE_GAS munmap(self->codeBase, self->codeLength); +#elif _WIN32 + VirtualFree(self->codeBase, self->codeLength, MEM_RELEASE); +#else + munmap(self->codeBase, self->codeLength); +#endif } /* Index: code/qcommon/vm_x86_64_assembler.c =================================================================== --- code/qcommon/vm_x86_64_assembler.c (Revision 0) +++ code/qcommon/vm_x86_64_assembler.c (Revision 0) @@ -0,0 +1,1419 @@ +/* +=========================================================================== +vm_x86_64_assembler.c -- assembler for x86-64 + +Copyright (C) 2007 Ludwig Nussel , Novell inc. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ + +#include +#include +#include +#include + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long u64; + +static char* out; +static unsigned compiledOfs; +static unsigned assembler_pass; + +static const char* cur_line; + +static FILE* fout; + +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#define MAX(a,b) ((a) > (b) ? (a) : (b)) + +#define crap(fmt, args...) do { \ + _crap(__FUNCTION__, fmt, ##args); \ +} while(0) + +#define CRAP_INVALID_ARGS crap("invalid arguments %s, %s", argtype2str(arg1.type),argtype2str(arg2.type)); + +#ifdef DEBUG +#define debug(fmt, args...) printf(fmt, ##args) +#else +#define debug(fmt, args...) +#endif + +static void _crap(const char* func, const char* fmt, ...) +{ + va_list ap; + fprintf(stderr, "%s() - ", func); + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + fputc('\n', stderr); + if(cur_line && cur_line[0]) + fprintf(stderr, "-> %s\n", cur_line); + exit(1); +} + +static void emit1(unsigned char v) +{ + if(assembler_pass) + { + out[compiledOfs++] = v; + if(fout) fwrite(&v, 1, 1, fout); + debug("%02hhx ", v); + } + else + { + ++compiledOfs; + } +} + +static inline void emit2(u16 v) +{ + emit1(v&0xFF); + emit1((v>>8)&0xFF); +} + +static inline void emit4(u32 v) +{ + emit1(v&0xFF); + emit1((v>>8)&0xFF); + emit1((v>>16)&0xFF); + emit1((v>>24)&0xFF); +} + +static inline void emit8(u64 v) +{ + emit4(v&0xFFFFFFFF); + emit4((v>>32)&0xFFFFFFFF); +} + +enum { + REX_W = 0x08, + REX_R = 0x04, + REX_X = 0x02, + REX_B = 0x01, +}; + +enum { + MODRM_MOD_00 = 0x00, + MODRM_MOD_01 = 0x01 << 6, + MODRM_MOD_10 = 0x02 << 6, + MODRM_MOD_11 = 0x03 << 6, + MODRM_RM_SIB = 0x04, +}; + +typedef enum +{ + T_NONE = 0x00, + T_REGISTER = 0x01, + T_IMMEDIATE = 0x02, + T_MEMORY = 0x04, + T_LABEL = 0x08, + T_ABSOLUTE = 0x80 +} argtype_t; + +typedef enum { + R_8 = 0x100, + R_16 = 0x200, + R_64 = 0x800, + R_MSZ = 0xF00, // size mask + R_XMM = 0x2000, // xmm register. year, sucks + R_EAX = 0x00, + R_EBX = 0x03, + R_ECX = 0x01, + R_EDX = 0x02, + R_ESI = 0x06, + R_EDI = 0x07, + R_ESP = 0x04, + R_RAX = R_EAX | R_64, + R_RBX = R_EBX | R_64, + R_RCX = R_ECX | R_64, + R_RDX = R_EDX | R_64, + R_RSI = R_ESI | R_64, + R_RDI = R_EDI | R_64, + R_RSP = R_ESP | R_64, + R_R8 = 0x08 | R_64, + R_R9 = 0x09 | R_64, + R_R10 = 0x0A | R_64, + R_R15 = 0x0F | R_64, + R_AL = R_EAX | R_8, + R_AX = R_EAX | R_16, + R_CL = R_ECX | R_8, + R_XMM0 = 0x00 | R_XMM, + R_MGP = 0x0F, // mask for general purpose registers +} reg_t; + +typedef enum { + MODRM_SIB = 0, + MODRM_NOSIB = 0x3, +} modrm_sib_t; + +typedef struct { + unsigned disp; + argtype_t basetype; + union { + u64 imm; + reg_t reg; + } base; + argtype_t indextype; + union { + u64 imm; + reg_t reg; + } index; + unsigned scale; +} memref_t; + +#define LABELLEN 32 + +typedef struct { + argtype_t type; + union { + u64 imm; + reg_t reg; + memref_t mem; + char label[LABELLEN]; + } v; + int absolute:1; +} arg_t; + +typedef void (*emitfunc)(const char* op, arg_t arg1, arg_t arg2, void* data); + +typedef struct { + char* mnemonic; + emitfunc func; + void* data; +} op_t; + +typedef struct { + u8 xmmprefix; + u8 subcode; // in modrm + u8 rmcode; // opcode for reg/mem, reg + u8 mrcode; // opcode for reg, reg/mem + u8 rcode8; // opcode for reg8/mem8 + u8 rcode; // opcode for reg/mem +} opparam_t; + +/* ************************* */ + +static unsigned hashkey(const char *string, unsigned len) { + unsigned register hash, i; + + hash = 0; + for (i = 0; i < len && string[i] != '\0'; ++i) { + hash += string[i] * (119 + i); + } + hash = (hash ^ (hash >> 10) ^ (hash >> 20)); + return hash; +} + +struct hashentry { + char* label; + unsigned address; + struct hashentry* next; +}; +static struct hashentry* labelhash[1021]; + +// no dup check! +static void hash_add_label(const char* label, unsigned address) +{ + struct hashentry* h; + unsigned i = hashkey(label, -1U); + i %= sizeof(labelhash)/sizeof(labelhash[0]); + h = malloc(sizeof(struct hashentry)); + h->label = strdup(label); + h->address = address; + h->next = labelhash[i]; + labelhash[i] = h; +} + +static unsigned lookup_label(const char* label) +{ + struct hashentry* h; + unsigned i = hashkey(label, -1U); + i %= sizeof(labelhash)/sizeof(labelhash[0]); + for(h = labelhash[i]; h; h = h->next ) + { + if(!strcmp(h->label, label)) + return h->address; + } + if(assembler_pass) + crap("label %s undefined", label); + return 0; +} + +static void labelhash_free() +{ + struct hashentry* h; + unsigned i; + unsigned z = 0, min = -1U, max = 0, t = 0; + for ( i = 0; i < sizeof(labelhash)/sizeof(labelhash[0]); ++i) + { + unsigned n = 0; + h = labelhash[i]; + while(h) + { + struct hashentry* next = h->next; + free(h->label); + free(h); + h = next; + ++n; + } + t+=n; + if(!n) ++z; + //else printf("%u\n", n); + min = MIN(min, n); + max = MAX(max, n); + } + printf("total %u, hsize %lu, zero %u, min %u, max %u\n", t, sizeof(labelhash)/sizeof(labelhash[0]), z, min, max); + memset(labelhash, 0, sizeof(labelhash)); +} + +/* ************************* */ + + +static const char* argtype2str(argtype_t t) +{ + switch(t) + { + case T_NONE: return "none"; + case T_REGISTER: return "register"; + case T_IMMEDIATE: return "immediate"; + case T_MEMORY: return "memory"; + case T_LABEL: return "label"; + default: crap("invalid type"); + } + /* not reached */ + return T_NONE; +} + +/* ************************* */ + +static inline int iss8(u64 v) +{ + return (labs(v) <= 0x80); +} + +static inline int isu8(u64 v) +{ + return (v <= 0xff); +} + +static inline int iss16(u64 v) +{ + return (labs(v) <= 0x8000); +} + +static inline int isu16(u64 v) +{ + return (v <= 0xffff); +} + +static inline int iss32(u64 v) +{ + return (labs(v) <= 0x80000000); +} + +static inline int isu32(u64 v) +{ + return (v <= 0xffffffff); +} + +static void emit_opsingle(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 op = (u8)((unsigned long) data); + + if(arg1.type != T_NONE || arg2.type != T_NONE) + CRAP_INVALID_ARGS; + + emit1(op); +} + +static void emit_opsingle16(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + emit1(0x66); + emit_opsingle(mnemonic, arg1, arg2, data); +} + +static void compute_rexmodrmsib(u8* rex_r, u8* modrm_r, u8* sib_r, arg_t* arg1, arg_t* arg2) +{ + u8 rex = 0; + u8 modrm = 0; + u8 sib = 0; + + if((arg1->type == T_REGISTER && arg2->type == T_REGISTER) + && ((arg1->v.reg & R_MSZ) != (arg2->v.reg & R_MSZ)) + && !((arg1->v.reg & R_XMM) || (arg2->v.reg & R_XMM))) + crap("both registers must be of same width"); + + if((arg1->type == T_REGISTER && arg1->v.reg & R_64) + || (arg2->type == T_REGISTER && arg2->v.reg & R_64)) + { + rex |= REX_W; + } + + if(arg1->type == T_REGISTER) + { + if((arg1->v.reg & R_MGP) > 0x07) + rex |= REX_R; + + modrm |= (arg1->v.reg & 0x07) << 3; + } + + if(arg2->type == T_REGISTER) + { + if((arg2->v.reg & R_MGP) > 0x07) + rex |= REX_B; + + modrm |= (arg2->v.reg & 0x07); + } + + if(arg2->type == T_MEMORY) + { + if((arg2->v.mem.basetype == T_REGISTER && !(arg2->v.mem.base.reg & R_64)) + || (arg2->v.mem.indextype == T_REGISTER && !(arg2->v.mem.index.reg & R_64))) + { + crap("only 64bit base/index registers are %x %x", arg2->v.mem.base.reg, arg2->v.mem.index.reg); + } + + if(arg2->v.mem.indextype == T_REGISTER) + { + modrm |= MODRM_RM_SIB; + if(!arg2->v.mem.disp) + { + modrm |= MODRM_MOD_00; + } + else if(iss8(arg2->v.mem.disp)) + { + modrm |= MODRM_MOD_01; + } + else if(isu32(arg2->v.mem.disp)) + { + modrm |= MODRM_MOD_10; + } + else + { + crap("invalid displacement"); + } + + if((arg2->v.mem.index.reg & R_MGP) > 0x07) + rex |= REX_X; + + if((arg2->v.mem.base.reg & R_MGP) > 0x07) + rex |= REX_B; + + if(arg2->v.mem.basetype != T_REGISTER) + crap("base must be register"); + switch(arg2->v.mem.scale) + { + case 1: break; + case 2: sib |= 1 << 6; break; + case 4: sib |= 2 << 6; break; + case 8: sib |= 3 << 6; break; + } + sib |= (arg2->v.mem.index.reg & 0x07) << 3; + sib |= (arg2->v.mem.base.reg & 0x07); + } + else if(arg2->v.mem.indextype == T_NONE) + { + if(!arg2->v.mem.disp) + { + modrm |= MODRM_MOD_00; + } + else if(iss8(arg2->v.mem.disp)) + { + modrm |= MODRM_MOD_01; + } + else if(isu32(arg2->v.mem.disp)) + { + modrm |= MODRM_MOD_10; + } + else + { + crap("invalid displacement"); + } + + if(arg2->v.mem.basetype != T_REGISTER) + crap("todo: base != register"); + + if((arg2->v.mem.base.reg & R_MGP) > 0x07) + rex |= REX_B; + + modrm |= arg2->v.mem.base.reg & 0x07; + } + else + { + crap("invalid indextype"); + } + } + else + { + modrm |= MODRM_MOD_11; + } + + if(rex) + rex |= 0x40; // XXX + + *rex_r = rex; + *modrm_r = modrm; + *sib_r = sib; +} + +static void maybe_emit_displacement(arg_t* arg) +{ + if(arg->type != T_MEMORY) + return; + + if(arg->v.mem.disp) + { + if(iss8(arg->v.mem.disp)) + { + emit1((u8)arg->v.mem.disp); + } + else if(isu32(arg->v.mem.disp)) + { + emit4(arg->v.mem.disp); + } + else + { + crap("invalid displacement"); + } + } +} + +/* one byte operator with register added to operator */ +static void emit_opreg(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 op = (u8)((unsigned long) data); + + if(arg1.type != T_REGISTER || arg2.type != T_NONE) + CRAP_INVALID_ARGS; + + if((arg1.v.reg & R_MGP) > 0x07) + emit1(0x40 | REX_B); + + op |= (arg1.v.reg & 0x07); + + emit1(op); +} + +/* operator which operates on reg/mem */ +static void emit_op_rm(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex, modrm, sib; + opparam_t* params = data; + + if((arg1.type != T_REGISTER && arg1.type != T_MEMORY) || arg2.type != T_NONE) + CRAP_INVALID_ARGS; + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + modrm |= params->subcode << 3; + + if(arg1.v.reg & R_16) + emit1(0x66); + + if(rex) emit1(rex); + if(arg1.v.reg & R_8) + emit1(params->rcode8); // op reg8/mem8, + else + emit1(params->rcode); // op reg/mem, + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg1); +} + +/* operator which operates on reg/mem with cl */ +static void emit_op_rm_cl(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex, modrm, sib; + opparam_t* params = data; + + if(arg2.type != T_REGISTER || arg1.type != T_REGISTER) + CRAP_INVALID_ARGS; + + if((arg1.v.reg & R_MGP) != R_ECX && !(arg1.v.reg & R_8)) + crap("only cl register is valid"); + + arg1.type = T_NONE; // don't complain, we know it's cl anyways + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + modrm |= params->subcode << 3; + + if(arg2.v.reg & R_16) + emit1(0x66); + + if(rex) emit1(rex); + if(arg2.v.reg & R_8) + emit1(params->rcode8); // op reg8/mem8, + else + emit1(params->rcode); // op reg/mem, + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg2); +} + +static void emit_mov(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex = 0; + u8 modrm = 0; + u8 sib = 0; + + if(arg1.type == T_IMMEDIATE && arg2.type == T_REGISTER) + { + u8 op = 0xb8; + + if(arg2.v.reg & R_8) + { + if(!isu8(arg1.v.imm)) + crap("value too large for 8bit register"); + + op = 0xb0; + } + else if(arg2.v.reg & R_16) + { + if(!isu16(arg1.v.imm)) + crap("value too large for 16bit register"); + emit1(0x66); + } + else if(!arg2.v.reg & R_64) + { + if(!isu32(arg1.v.imm)) + crap("value too large for 32bit register"); + } + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + if(rex) emit1(rex); + + op |= (arg2.v.reg & 0x07); + + emit1(op); + + if(arg2.v.reg & R_8) emit1(arg1.v.imm); + else if(arg2.v.reg & R_16) emit2(arg1.v.imm); + else if(arg2.v.reg & R_64) emit8(arg1.v.imm); + else emit4(arg1.v.imm); + } + else if(arg1.type == T_IMMEDIATE && arg2.type == T_MEMORY) + { + if(!iss32(arg1.v.imm)) + { + crap("only 32bit immediates supported"); + } + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + if(rex) emit1(rex); + emit1(0xc7); // mov reg/mem, imm + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + emit4(arg1.v.imm); + } + else if(arg1.type == T_REGISTER && arg2.type == T_REGISTER) // XXX: same as next + { + if(arg1.type != T_REGISTER || arg2.type != T_REGISTER) + crap("both args must be registers"); + + if((arg1.v.reg & R_MSZ) != (arg2.v.reg & R_MSZ)) + crap("both registers must be same width"); + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + if(rex) emit1(rex); + emit1(0x89); // mov reg reg/mem, + emit1(modrm); + } + else if(arg1.type == T_REGISTER && arg2.type == T_MEMORY) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + if(arg1.v.reg & R_16) + emit1(0x66); + + if(rex) emit1(rex); + if(arg1.v.reg & R_8) + emit1(0x88); // mov reg reg/mem, + else + emit1(0x89); // mov reg reg/mem, + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg2); + } + else if(arg1.type == T_MEMORY && arg2.type == T_REGISTER) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + if(arg2.v.reg & R_16) + emit1(0x66); + + if(rex) emit1(rex); + if(arg2.v.reg & R_8) + emit1(0x8a); // mov reg/mem, reg + else + emit1(0x8b); // mov reg/mem, reg + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg1); + } + else + CRAP_INVALID_ARGS; +} + +static void emit_subaddand(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex = 0; + u8 modrm = 0; + u8 sib = 0; + + opparam_t* params = data; + + if(arg1.type == T_IMMEDIATE && arg2.type == T_REGISTER) + { + if(!iss32(arg1.v.imm)) + { + crap("only 8 and 32 bit immediates supported"); + } + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + modrm |= params->subcode << 3; + + if(rex) emit1(rex); +#if 0 + if(isu8(arg1.v.imm)) + { + emit1(0x83); // sub reg/mem, imm8 + emit1(modrm); + emit1(arg1.v.imm&0xFF); + } + else +#endif + { + emit1(0x81); // sub reg/mem, imm32 + emit1(modrm); + emit4(arg1.v.imm); + } + } + else if(arg1.type == T_REGISTER && (arg2.type == T_MEMORY || arg2.type == T_REGISTER)) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + if(rex) emit1(rex); + emit1(params->rmcode); // sub reg/mem, reg + emit1(modrm); + if(arg2.type == T_MEMORY && (modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg2); + } + else if(arg1.type == T_MEMORY && arg2.type == T_REGISTER && params->mrcode) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + if(rex) emit1(rex); + emit1(params->mrcode); // sub reg, reg/mem + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg1); + } + else + CRAP_INVALID_ARGS; +} + +static void emit_condjump(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + unsigned off; + int disp; + unsigned char opcode = (unsigned char)(((unsigned long)data)&0xFF); + + if(arg1.type != T_LABEL || arg2.type != T_NONE) + crap("%s: argument must be label", mnemonic); + + emit1(opcode); + + off = lookup_label(arg1.v.label); + disp = off-(compiledOfs+1); + if(assembler_pass && abs(disp) > 127) + crap("cannot jump that far (%x -> %x = %x)", compiledOfs, off, disp); + + emit1(disp); +} + +static void emit_jmp(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + if((arg1.type != T_LABEL && arg1.type != T_REGISTER && arg1.type != T_MEMORY) || arg2.type != T_NONE) + CRAP_INVALID_ARGS; + + if(arg1.type == T_LABEL) + { + unsigned off; + int disp; + + off = lookup_label(arg1.v.label); + disp = off-(compiledOfs+5); + emit1(0xe9); + emit4(disp); + } + else + { + u8 rex, modrm, sib; + + if(arg1.type == T_REGISTER) + { + if(!arg1.absolute) + crap("jmp must be absolute"); + + if((arg1.v.reg & R_64) != R_64) + crap("register must be 64bit"); + + arg1.v.reg ^= R_64; // no rex required for call + } + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + modrm |= 0x4 << 3; + + if(rex) emit1(rex); + emit1(0xff); + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + maybe_emit_displacement(&arg1); + } +} + +static void emit_call(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex, modrm, sib; + + if(arg1.type != T_REGISTER || arg2.type != T_NONE) + CRAP_INVALID_ARGS; + + if(!arg1.absolute) + crap("call must be absolute"); + + if((arg1.v.reg & R_64) != R_64) + crap("register must be 64bit"); + + arg1.v.reg ^= R_64; // no rex required for call + + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + modrm |= 0x2 << 3; + + if(rex) emit1(rex); + emit1(0xff); + emit1(modrm); +} + + +static void emit_twobyte(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) +{ + u8 rex, modrm, sib; + + opparam_t* params = data; + + if(arg1.type == T_REGISTER && (arg2.type == T_MEMORY || arg2.type == T_REGISTER)) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg1, &arg2); + + if(params->xmmprefix) emit1(params->xmmprefix); + if(rex) emit1(rex); + emit1(0x0f); + emit1(params->rmcode); // sub reg/mem, reg + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg2); + } + else if(arg1.type == T_MEMORY && arg2.type == T_REGISTER && params->mrcode) + { + compute_rexmodrmsib(&rex, &modrm, &sib, &arg2, &arg1); + + if(params->xmmprefix) emit1(params->xmmprefix); + if(rex) emit1(rex); + emit1(0x0f); + emit1(params->mrcode); // sub reg, reg/mem + emit1(modrm); + if((modrm & 0x07) == MODRM_RM_SIB) + emit1(sib); + + maybe_emit_displacement(&arg1); + } + else + CRAP_INVALID_ARGS; +} + +static opparam_t params_add = { subcode: 0, rmcode: 0x01, }; +static opparam_t params_or = { subcode: 1, rmcode: 0x09, }; +static opparam_t params_and = { subcode: 4, rmcode: 0x21, }; +static opparam_t params_sub = { subcode: 5, rmcode: 0x29, }; +static opparam_t params_xor = { subcode: 6, rmcode: 0x31, }; +static opparam_t params_cmp = { subcode: 6, rmcode: 0x39, mrcode: 0x3b, }; +static opparam_t params_dec = { subcode: 1, rcode: 0xff, rcode8: 0xfe, }; +static opparam_t params_sar = { subcode: 7, rcode: 0xd3, rcode8: 0xd2, }; +static opparam_t params_shl = { subcode: 4, rcode: 0xd3, rcode8: 0xd2, }; +static opparam_t params_shr = { subcode: 5, rcode: 0xd3, rcode8: 0xd2, }; +static opparam_t params_idiv = { subcode: 7, rcode: 0xf7, rcode8: 0xf6, }; +static opparam_t params_div = { subcode: 6, rcode: 0xf7, rcode8: 0xf6, }; +static opparam_t params_imul = { subcode: 5, rcode: 0xf7, rcode8: 0xf6, }; +static opparam_t params_mul = { subcode: 4, rcode: 0xf7, rcode8: 0xf6, }; +static opparam_t params_neg = { subcode: 3, rcode: 0xf7, rcode8: 0xf6, }; +static opparam_t params_not = { subcode: 2, rcode: 0xf7, rcode8: 0xf6, }; + +static opparam_t params_cvtsi2ss = { xmmprefix: 0xf3, rmcode: 0x2a }; +static opparam_t params_cvttss2si = { xmmprefix: 0xf3, rmcode: 0x2c }; +static opparam_t params_addss = { xmmprefix: 0xf3, mrcode: 0x58 }; +static opparam_t params_divss = { xmmprefix: 0xf3, mrcode: 0x5e }; +static opparam_t params_movss = { xmmprefix: 0xf3, mrcode: 0x10, rmcode: 0x11 }; +static opparam_t params_mulss = { xmmprefix: 0xf3, mrcode: 0x59 }; +static opparam_t params_subss = { xmmprefix: 0xf3, mrcode: 0x5c }; +static opparam_t params_ucomiss = { mrcode: 0x2e }; + +static int ops_sorted = 0; +static op_t ops[] = { + { "addl", emit_subaddand, ¶ms_add }, + { "addq", emit_subaddand, ¶ms_add }, + { "addss", emit_twobyte, ¶ms_addss }, + { "andl", emit_subaddand, ¶ms_and }, + { "andq", emit_subaddand, ¶ms_and }, + { "callq", emit_call, NULL }, + { "cbw", emit_opsingle16, (void*)0x98 }, + { "cdq", emit_opsingle, (void*)0x99 }, + { "cmpl", emit_subaddand, ¶ms_cmp }, + { "cmpq", emit_subaddand, ¶ms_cmp }, + { "cvtsi2ss", emit_twobyte, ¶ms_cvtsi2ss }, + { "cvttss2si", emit_twobyte, ¶ms_cvttss2si }, + { "cwde", emit_opsingle, (void*)0x98 }, + { "decl", emit_op_rm, ¶ms_dec }, + { "decq", emit_op_rm, ¶ms_dec }, + { "divl", emit_op_rm, ¶ms_div }, + { "divq", emit_op_rm, ¶ms_div }, + { "divss", emit_twobyte, ¶ms_divss }, + { "idivl", emit_op_rm, ¶ms_idiv }, + { "imull", emit_op_rm, ¶ms_imul }, + { "int3", emit_opsingle, (void*)0xcc }, + { "ja", emit_condjump, (void*)0x77 }, + { "jbe", emit_condjump, (void*)0x76 }, + { "jb", emit_condjump, (void*)0x72 }, + { "je", emit_condjump, (void*)0x74 }, + { "jl", emit_condjump, (void*)0x7c }, + { "jmp", emit_jmp, NULL }, + { "jmpq", emit_jmp, NULL }, + { "jnae", emit_condjump, (void*)0x72 }, + { "jna", emit_condjump, (void*)0x76 }, + { "jnbe", emit_condjump, (void*)0x77 }, + { "jnb", emit_condjump, (void*)0x73 }, + { "jnc", emit_condjump, (void*)0x73 }, + { "jne", emit_condjump, (void*)0x75 }, + { "jnge", emit_condjump, (void*)0x7c }, + { "jng", emit_condjump, (void*)0x7e }, + { "jnle", emit_condjump, (void*)0x7f }, + { "jnl", emit_condjump, (void*)0x7d }, + { "jnz", emit_condjump, (void*)0x75 }, + { "jp", emit_condjump, (void*)0x7a }, + { "jz", emit_condjump, (void*)0x74 }, + { "movb", emit_mov, NULL }, + { "movl", emit_mov, NULL }, + { "movq", emit_mov, NULL }, + { "movss", emit_twobyte, ¶ms_movss }, + { "movw", emit_mov, NULL }, + { "mull", emit_op_rm, ¶ms_mul }, + { "mulss", emit_twobyte, ¶ms_mulss }, + { "negl", emit_op_rm, ¶ms_neg }, + { "negq", emit_op_rm, ¶ms_neg }, + { "nop", emit_opsingle, (void*)0x90 }, + { "notl", emit_op_rm, ¶ms_not }, + { "notq", emit_op_rm, ¶ms_not }, + { "or", emit_subaddand, ¶ms_or }, + { "orl", emit_subaddand, ¶ms_or }, + { "pop", emit_opreg, (void*)0x58 }, + { "push", emit_opreg, (void*)0x50 }, + { "ret", emit_opsingle, (void*)0xc3 }, + { "sarl", emit_op_rm_cl, ¶ms_sar }, + { "shl", emit_op_rm_cl, ¶ms_shl }, + { "shrl", emit_op_rm_cl, ¶ms_shr }, + { "subl", emit_subaddand, ¶ms_sub }, + { "subq", emit_subaddand, ¶ms_sub }, + { "subss", emit_twobyte, ¶ms_subss }, + { "ucomiss", emit_twobyte, ¶ms_ucomiss }, + { "xorl", emit_subaddand, ¶ms_xor }, + { "xorq", emit_subaddand, ¶ms_xor }, + { NULL, NULL, NULL } +}; + +static int opsort(const void* A, const void* B) +{ + const op_t* a = A; + const op_t* b = B; + return strcmp(a->mnemonic, b->mnemonic); +} + +static op_t* getop(const char* n) +{ +#if 0 + op_t* o = ops; + while(o->mnemonic) + { + if(!strcmp(o->mnemonic, n)) + return o; + ++o; + } + +#else + unsigned m, t, b; + int r; + t = sizeof(ops)/sizeof(ops[0])-1; + b = 0; + + while(b <= t) + { + m = ((t-b)>>1) + b; + if((r = strcmp(ops[m].mnemonic, n)) == 0) + { + return &ops[m]; + } + else if(r < 0) + { + b = m + 1; + } + else + { + t = m - 1; + } + } +#endif + + return NULL; +} + +static reg_t parsereg(const char* str) +{ + const char* s = str; + if(*s == 'a' && s[1] == 'l' && !s[2]) + { + return R_AL; + } + else if(*s == 'a' && s[1] == 'x' && !s[2]) + { + return R_AX; + } + if(*s == 'c' && s[1] == 'l' && !s[2]) + { + return R_CL; + } + if(*s == 'x') + { + if(!strcmp(s, "xmm0")) + return R_XMM0; + } + else if(*s == 'r' && s[1]) + { + ++s; + if(s[1] == 'x') + { + switch(*s++) + { + case 'a': return R_RAX; + case 'b': return R_RBX; + case 'c': return R_RCX; + case 'd': return R_RDX; + } + } + else if(s[1] == 'i') + { + switch(*s++) + { + case 's': return R_RSI; + case 'd': return R_RDI; + } + } + else if(s[0] == 's' && s[1] == 'p' && !s[2]) + { + return R_RSP; + } + else if(*s == '8' && !s[1]) + return R_R8; + else if(*s == '9' && !s[1]) + return R_R9; + else if(*s == '1' && s[1] == '0') + return R_R10; + else if(*s == '1' && s[1] == '5') + return R_R15; + } + else if(*s == 'e' && s[1]) + { + ++s; + if(s[1] == 'x') + { + switch(*s++) + { + case 'a': return R_EAX; + case 'b': return R_EBX; + case 'c': return R_ECX; + case 'd': return R_EDX; + } + } + else if(s[1] == 'i') + { + switch(*s++) + { + case 's': return R_ESI; + case 'd': return R_EDI; + } + } + } + + crap("invalid register %s", str); + + return 0; +} + +typedef enum { + TOK_LABEL = 0x80, + TOK_INT = 0x81, + TOK_END = 0x82, + TOK_INVALID = 0x83, +} token_t; + +static unsigned char nexttok(const char** str, char* label, u64* val) +{ + const char* s = *str; + + if(label) *label = 0; + if(val) *val = 0; + + while(*s && *s == ' ') ++s; + + if(!*s) + { + return TOK_END; + } + else if(*s == '$' || *s == '*' || *s == '%' || *s == '-' || *s == ')' || *s == '(' || *s == ',') + { + *str = s+1; + return *s; + } + else if(*s >= 'a' && *s <= 'z') + { + size_t a = strspn(s+1, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"); + if(a+1 >= LABELLEN) + crap("label %s too long", s); + if(label) + { + strncpy(label, s, a+1); + label[a+1] = 0; + } + *str = s+a+1; + return TOK_LABEL; + } + else if(*s >= '0' && *s <= '9') + { + char* endptr = NULL; + u64 v = strtol(s, &endptr, 0); + if(endptr && (endptr-s == 0)) + crap("invalid integer %s", s); + if(val) *val = v; + *str = endptr; + return TOK_INT; + } + crap("can't parse '%s'", *str); + return TOK_INVALID; +} + +static arg_t parsearg(const char** str) +{ + arg_t arg; + const char* s = *str; + char label[20]; + u64 val; + int negative = 1; + unsigned ttype; + + arg.type = T_NONE; + arg.absolute = 0; + + while(*s && *s == ' ') ++s; + + switch(nexttok(&s, label, &val)) + { + case '$' : + ttype = nexttok(&s, NULL, &val); + if(ttype == '-') + { + negative = -1; + ttype = nexttok(&s, NULL, &val); + } + if(ttype != TOK_INT) + crap("expected integer"); + arg.type = T_IMMEDIATE; + arg.v.imm = negative * val; + break; + case '*' : + if((ttype = nexttok(&s, NULL, NULL)) != '%') + { + if(ttype == '(') + goto tok_memory; + crap("expected '%%'"); + } + arg.absolute = 1; + /* fall through */ + case '%' : + if(nexttok(&s, label, &val) != TOK_LABEL) + crap("expected label"); + arg.type = T_REGISTER; + arg.v.reg = parsereg(label); + break; + case TOK_LABEL: + arg.type = T_LABEL; + strncpy(arg.v.label, label, LABELLEN); + break; + case '-': + negative = -1; + if(nexttok(&s, NULL, &val) != TOK_INT) + crap("expected integer"); + /* fall through */ + case TOK_INT: + if(nexttok(&s, label, NULL) != '(') + crap("expected '('"); // mov to/from fixed address not supported + /* fall through */ + case '(': +tok_memory: + arg.type = T_MEMORY; + arg.v.mem.indextype = T_NONE; + arg.v.mem.disp = negative * val; + ttype = nexttok(&s, label, &val); + if(ttype == '%' && nexttok(&s, label, &val) != TOK_LABEL) + { + crap("expected register"); + } + if (ttype == '%') + { + arg.v.mem.basetype = T_REGISTER; + arg.v.mem.base.reg = parsereg(label); + } + else if (ttype == TOK_INT) + { + arg.v.mem.basetype = T_IMMEDIATE; + arg.v.mem.base.imm = val; + } + if((ttype = nexttok(&s, NULL, NULL)) == ',') + { + ttype = nexttok(&s, label, &val); + if(ttype == '%' && nexttok(&s, label, &val) != TOK_LABEL) + { + crap("expected register"); + } + if (ttype == '%') + { + arg.v.mem.indextype = T_REGISTER; + arg.v.mem.index.reg = parsereg(label); + } + else if (ttype == TOK_INT) + { + crap("index must be register"); + arg.v.mem.indextype = T_IMMEDIATE; + arg.v.mem.index.imm = val; + } + if(nexttok(&s, NULL, NULL) != ',') + crap("expected ','"); + if(nexttok(&s, NULL, &val) != TOK_INT) + crap("expected integer"); + if(val != 1 && val != 2 && val != 4 && val != 8) + crap("scale must 1, 2, 4 or 8"); + arg.v.mem.scale = val; + + ttype = nexttok(&s, NULL, NULL); + } + if(ttype != ')') + { + crap("expected ')' or ','"); + } + break; + default: + crap("invalid token %hhu in %s", *(unsigned char*)s, *str); + break; + } + + *str = s; + + return arg; +} + +/* ************************* */ + +void assembler_init(int pass) +{ + compiledOfs = 0; + assembler_pass = pass; + if(!pass) + { + labelhash_free(); + cur_line = NULL; + } + if(!ops_sorted) + { + ops_sorted = 1; + qsort(ops, sizeof(ops)/sizeof(ops[0])-1, sizeof(ops[0]), opsort); + } +} + +size_t assembler_get_code_size() +{ + return compiledOfs; +} + +void assembler_set_output(char* buf) +{ + out = buf; +} + +void assemble_line(const char* input, size_t len) +{ + char line[4096]; + char* s; + op_t* o; + char* opn; + arg_t arg1, arg2; + + arg1.type = T_NONE; + arg2.type = T_NONE; + opn = NULL; + o = NULL; + + if(len < 1) + return; + + if(len >= sizeof(line)) + crap("line too long"); + + memcpy(line, input, sizeof(line)); + cur_line = input; + + if(line[len-1] == '\n') line[--len] = 0; + if(line[len-1] == ':') + { + line[--len] = 0; + if(assembler_pass) + debug("%s: 0x%x\n", line, compiledOfs); + else + hash_add_label(line, compiledOfs); + } + else + { + opn = line; + s = strchr(line, ' '); + if(s) + { + *s++ = 0; + arg1 = parsearg(&s); + if(*s) + { + if(*s != ',') + crap("expected ',', got '%c'", *s); + ++s; + arg2 = parsearg(&s); + } + } + + if(!opn) + { + crap("no operator in %s", line); + } + + o = getop(opn); + if(!o) + { + crap("cannot handle op %s", opn); + } + o->func(opn, arg1, arg2, o->data); + if(assembler_pass) + debug(" - %s%s", cur_line, cur_line[strlen(cur_line)-1]=='\n'?"":"\n"); + } +} + +#ifdef SA_STANDALONE +int main(int argc, char* argv[]) +{ + char line[4096]; + size_t len; + int pass; + FILE* file = NULL; + + if(argc < 2) + { + crap("specify file"); + } + + file = fopen(argv[1], "r"); + if(!file) + { + crap("can't open file"); + } + + if(argc > 2) + { + fout = fopen(argv[2], "w"); + if(!fout) + { + crap("can't open %s for writing", argv[2]); + } + } + + for(pass = 0; pass < 2; ++pass) + { + if(fseek(file, 0, SEEK_SET)) + crap("can't rewind file"); + + if(pass) + { + char* b = malloc(assembler_get_code_size()); + if(!b) + crap("cannot allocate memory"); + assembler_set_output(b); + } + + assembler_init(pass); + + while(fgets(line, sizeof(line), file)) + { + len = strlen(line); + if(!len) continue; + + assemble_line(line, len); + } + } + + assembler_init(0); + + fclose(file); + + return 0; +} +#endif Index: Makefile =================================================================== --- Makefile (Revision 1106) +++ Makefile (Arbeitskopie) @@ -1014,7 +1014,7 @@ Q3OBJ += $(B)/client/vm_x86.o endif ifeq ($(ARCH),x86_64) - Q3OBJ += $(B)/client/vm_x86_64.o + Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o endif ifeq ($(ARCH),ppc) Q3OBJ += $(B)/client/$(VM_PPC).o @@ -1266,6 +1266,7 @@ $(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC) $(B)/client/vm_x86_64.o : $(CMDIR)/vm_x86_64.c; $(DO_CC) +$(B)/client/vm_x86_64_assembler.o : $(CMDIR)/vm_x86_64_assembler.c; $(DO_CC) ifneq ($(VM_PPC),) $(B)/client/$(VM_PPC).o : $(CMDIR)/$(VM_PPC).c; $(DO_CC) endif @@ -1369,7 +1370,7 @@ Q3DOBJ += $(B)/ded/vm_x86.o endif ifeq ($(ARCH),x86_64) - Q3DOBJ += $(B)/ded/vm_x86_64.o + Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o endif ifeq ($(ARCH),ppc) Q3DOBJ += $(B)/ded/$(VM_PPC).o @@ -1454,6 +1455,7 @@ $(B)/ded/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_DED_CC) $(B)/ded/vm_x86_64.o : $(CMDIR)/vm_x86_64.c; $(DO_DED_CC) +$(B)/ded/vm_x86_64_assembler.o : $(CMDIR)/vm_x86_64_assembler.c; $(DO_DED_CC) ifneq ($(VM_PPC),) $(B)/ded/$(VM_PPC).o : $(CMDIR)/$(VM_PPC).c; $(DO_DED_CC) endif -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From zakk at timedoctor.org Sun Jul 8 21:32:12 2007 From: zakk at timedoctor.org (Zachary Slater) Date: Sun, 08 Jul 2007 18:32:12 -0700 Subject: mac os x mouse acceleration fix Message-ID: <4691901C.6030703@timedoctor.org> Thanks to Kevin McMakefile, we have a temporary band-aid for the problem with mac os x mouse acceleration. What problem you say? Apparently there was never a way in OS X to shut off mouse acceleration if you're using an external mouse. WHAATT THAT SHOULD BE FIXED IN SDL NOT IOQUAKE3!!?!?!??! I agree, http://bugzilla.libsdl.org/show_bug.cgi?id=445 WTF IT ISN'T DONE YET?!?! I know, that is why this is in here at the moment. Please verify that YOUR EXTERNAL MOUSE WORKS WITH LATEST SVN ON OS X, and if you don't like the effect (authors please detail this in your readme), set in_disablemacosxmouseaccel to 0. WTF MY TRACKPAD STILL FEELS LIKE SHIT, JERK. It should fail without issue on trackpads, but maybe the mouse acceleration is weird there still. Get an external mouse. YEAH KEVIN MCMAKEFILE IS A JERK, LETS KICK HIM IN THE NUTS! Hopefully the SDL fix arrives soon, lets thank him for providing the fix. -- - Zachary J. Slater zakk at timedoctor.org zacharyslater at gmail.com From sciogoon at gmail.com Thu Jul 12 09:38:47 2007 From: sciogoon at gmail.com (sciogoon at gmail.com) Date: Thu, 12 Jul 2007 15:38:47 +0200 Subject: AngleVectors() improvement Message-ID: <4ebea2ee0707120638j63dd2bedx86a9423b26c39b5@mail.gmail.com> I've optimized the AngleVectors() function (it takes the view angles, and generates 3 normal(ized) perpendicular vectors: forward, right, up). Many routines use only the forward vector output, and ignore the right and up. The sin(roll) and cos(roll) are not needed in this case. In my modified function, these two values are only calculated if they are needed. I've also made it look a bit better :P Comparing to the sin() or cos(), a simple if check is unnoticable. On my machine, the old function runs 1.45 times longer (without error), if only the forward output is required. Basically the new one needs approx 2/3 computing power, because of 4 of 6 sin/cos functions. (If all 3 outputs are required, the new function has unnoticable speed loss.) If the new version is used even only once per game frame, the change is beneficial. Commit. It's such a small change. Or should I send my name for credits? :D Can someone tell me about the so called MS compiler fp bugs? From noisyb at gmx.net Sat Jul 14 00:48:43 2007 From: noisyb at gmx.net (Dirk) Date: Sat, 14 Jul 2007 06:48:43 +0200 Subject: [BUG?!] Server list sometimes incomplete Message-ID: <469855AB.9050304@gmx.net> Hello, I have show empty&full enabled. But qstat still shows more servers (Open Arena) than the client. When I update the list in the client it changes but there are other servers missing then. And in windowed mode the client crashes sometimes. Both problems occured with the windows client of Open Arena (0.6.0 and 0.7.0) the windowed mode crash also with the ioq3 client playing official Q3. Dirk From linuxmanmikec at gmail.com Sat Jul 14 10:53:30 2007 From: linuxmanmikec at gmail.com (LinuxManMikeC) Date: Sat, 14 Jul 2007 10:53:30 -0400 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <469855AB.9050304@gmx.net> References: <469855AB.9050304@gmx.net> Message-ID: <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> There is a variable cl_maxping. The client filters out servers in the list that have pings higher than that value. It also filters out non-responsive servers. Maybe this is the case. On 7/14/07, Dirk wrote: > Hello, > I have show empty&full enabled. But qstat still shows more servers (Open > Arena) than the client. When I update the list in the client it changes > but there are other servers missing then. > > And in windowed mode the client crashes sometimes. > > Both problems occured with the windows client of Open Arena (0.6.0 and > 0.7.0) the windowed mode crash also with the ioq3 client playing > official Q3. > > > > Dirk > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > From sciogoon at gmail.com Sun Jul 15 19:49:52 2007 From: sciogoon at gmail.com (sciogoon at gmail.com) Date: Mon, 16 Jul 2007 01:49:52 +0200 Subject: Addition to DLL loading code? Message-ID: <4ebea2ee0707151649q68bc432cu370d8151aafed703@mail.gmail.com> There is a bug when searching for a loadable DLL. When looking for a DLL, Sys_LoadDll searches the current game folders of basepath and cdpath for it, and if not found, it loads the QVM. But that is basically how it supposed to work, isn't it? Yes, but consider what happens, when a mod doesn't have it's own cgame.qvm. The client connects to the server, and sets fs_game from 'baseq3' to what mod it has to, let's say 'myMod'. There is no pk3 to download, because myMod is a server-side mod. OK, time to load. Start with loading the DLL (sv_pure is off). Can a DLL be found for the mod called myMod? Searching cgamex86.dll in [ basepath | cdpath ]/myMod/ ... not found. Proceeding to load a QVM. Searching cgamex86.dll in [ basepath | cdpath ]/myMod/ ... not found, just as with the DLL. The QVM search continues, this time not with myMod, but with baseq3. QVM found, loading. In this scenario, the QVM that has been loaded should have been replaced by the DLL for the same mod, baseq3. So even when we have native code for a give mod, the interpreter will be loaded in the presence of a server side mod. So to fix this I would search all paths for the DLL and the QVM, and if a DLL could be loaded for the same mod, go ahead and try to load it. I would also search the homepath for DLLs. What's wrong with that? Can files with a .DLL extension be downloaded, and that posseses threats? From noisyb at gmx.net Sun Jul 15 21:54:52 2007 From: noisyb at gmx.net (Dirk) Date: Mon, 16 Jul 2007 03:54:52 +0200 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> Message-ID: <469ACFEC.2010300@gmx.net> Nope, it isn't. Also servers that are perfectly fine get filtered. If you sort the view alphabetically you can reproduce the bug with almost every click on refresh. LinuxManMikeC wrote: > There is a variable cl_maxping. The client filters out servers in the > list that have pings higher than that value. It also filters out > non-responsive servers. Maybe this is the case. > > On 7/14/07, Dirk wrote: >> Hello, >> I have show empty&full enabled. But qstat still shows more servers (Open >> Arena) than the client. When I update the list in the client it changes >> but there are other servers missing then. >> >> And in windowed mode the client crashes sometimes. >> >> Both problems occured with the windows client of Open Arena (0.6.0 and >> 0.7.0) the windowed mode crash also with the ioq3 client playing >> official Q3. >> >> >> >> Dirk >> >> --- >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > From justdoug at socal.rr.com Mon Jul 16 03:12:22 2007 From: justdoug at socal.rr.com (Doug Winger) Date: Mon, 16 Jul 2007 00:12:22 -0700 Subject: [quake3] Addition to DLL loading code? In-Reply-To: <4ebea2ee0707151649q68bc432cu370d8151aafed703@mail.gmail.com> References: <4ebea2ee0707151649q68bc432cu370d8151aafed703@mail.gmail.com> Message-ID: >So to fix this I would search all paths for the DLL and the QVM, and >if a DLL could be loaded for the same mod, go ahead and try to load >it. > >I would also search the homepath for DLLs. What's wrong with that? Can >files with a .DLL extension be downloaded, and that posseses threats? I won't touch much of the balance except to say some of it sounds rather system specific and that mods, by their nature, should not suddenly carry the player from their expected base game and into a Brave New World that they might not have been expecting. Having them obtain resources from the base game is one thing; forcing the base game into a mod's territory is another. Let the client decide if they're hankering to play a mod on their own and not have the server determine it for them. I might be misreading the intent behind your idea, though. But as to the above... Let's see: a binary download chock full of executable code being automagically downloaded, plugged into a trusted application and then run within it and all behind the player's back... Much mischief would follow, I think. - Doug From arny at ats.s.bawue.de Mon Jul 16 04:42:38 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Mon, 16 Jul 2007 10:42:38 +0200 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <469ACFEC.2010300@gmx.net> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> Message-ID: <200707161042.41583.arny@ats.s.bawue.de> On Monday 16 July 2007 03:54, Dirk wrote: > Nope, it isn't. Also servers that are perfectly fine get filtered. If > you sort the view alphabetically you can reproduce the bug with almost > every click on refresh. I have had this bug too. I already tried to debug it as well. As soon as you refresh the server list, the engine sends a ping request to all servers reported by the master server. I tcpdumped this and noticed that all servers get pinged, but not all servers actually reply. I tested this with xqf as well, but all servers responded there. Nevertheless, I didn't follow this further as I had not heard reports of the same problem back then and thought this might be a connection tracking issue of the Linux kernel, as I use the internet over another Linux router. Reading these reports here I am not that sure anymore. I might look again into this problem when I get the time. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From ludwig.nussel at suse.de Mon Jul 16 05:11:56 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Mon, 16 Jul 2007 11:11:56 +0200 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <200707161042.41583.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> Message-ID: <200707161111.56414.ludwig.nussel@suse.de> Thilo Schulz wrote: > On Monday 16 July 2007 03:54, Dirk wrote: > > Nope, it isn't. Also servers that are perfectly fine get filtered. If > > you sort the view alphabetically you can reproduce the bug with almost > > every click on refresh. > > I have had this bug too. I already tried to debug it as well. As soon as you > refresh the server list, the engine sends a ping request to all servers > reported by the master server. I tcpdumped this and noticed that all servers > get pinged, but not all servers actually reply. I tested this with xqf as > well, but all servers responded there. Nevertheless, I didn't follow this Does q3 throttle the send rate or does it send all packets at once? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From arny at ats.s.bawue.de Mon Jul 16 08:04:08 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Mon, 16 Jul 2007 14:04:08 +0200 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <200707161111.56414.ludwig.nussel@suse.de> References: <469855AB.9050304@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <200707161111.56414.ludwig.nussel@suse.de> Message-ID: <200707161404.12037.arny@ats.s.bawue.de> On Monday 16 July 2007 11:11, Ludwig Nussel wrote: > Does q3 throttle the send rate or does it send all packets at once? It sends all packets at once. This is why I thought this might be some connection tracking issue in Linux, and maybe it still is. I tried fiddling with a few parameters in the proc file system but to no avail. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From sciogoon at gmail.com Mon Jul 16 08:20:35 2007 From: sciogoon at gmail.com (sciogoon at gmail.com) Date: Mon, 16 Jul 2007 14:20:35 +0200 Subject: [quake3] Addition to DLL loading code? In-Reply-To: References: <4ebea2ee0707151649q68bc432cu370d8151aafed703@mail.gmail.com> Message-ID: <4ebea2ee0707160520j6fc54d38w14c7e8a772dc6a61@mail.gmail.com> On 7/16/07, Doug Winger wrote: > >So to fix this I would search all paths for the DLL and the QVM, and > >if a DLL could be loaded for the same mod, go ahead and try to load > >it. > > I won't touch much of the balance except to say some of it sounds > rather system specific and that mods, by their nature, should not > suddenly carry the player from their expected base game and into a > Brave New World that they might not > have been expecting. Having them obtain resources from the base game > is one thing; forcing the base game into a mod's territory is > another. Let the client decide if they're hankering to play a mod on > their own and not have the server determine it for them. > > I might be misreading the intent behind your idea, though. Let me explain. There is no option. The serverinfo has fs_game set to myMod, and that's what the client has to set too, in order to sync the data (even if there is no difference between baseq3 and myMod). Wether server or client download are enabled or not, it doesn't matter. If there are no client side pk3s to download from the server, and the server doesn't auto-kick (that is, it's a server mod, for example it changes the damages of weapons), all the client does is it creates a folder called myMod next to baseq3, all config saves will go there. Nothing else. I have two things in my baseq3 folder: the Q3A non-modded QVM and DLL. The difference between the QVM and DLL are, that the DLL executes ~25% faster (and can contain "my own personal modifications", like a change in the hud color) BUT: the game what the client and the server are playing is not baseq3, but myMod. myMod has no qvms, which means the client has to load the baseq3 code. AND THE PROBLEM HERE IS THAT THE QVMs LOAD INSTEAD OF THE DLLs! From sciogoon at gmail.com Mon Jul 16 08:25:16 2007 From: sciogoon at gmail.com (sciogoon at gmail.com) Date: Mon, 16 Jul 2007 14:25:16 +0200 Subject: multi color code stripping from strings Message-ID: <4ebea2ee0707160525o70052b4ewf680c8874ce85e86@mail.gmail.com> It is possible to input such strings, that when stripped from color code escape squences in one pass, would result in a color coded string (which actually is expected to have no color codes). For example ^^14n3vv|3 prints as ^[RED->]4n3vv|3 stripping ^1, because it's a color sequence: ^^14n3vv|3 one pass results in ^4n3vv|3, which prints as [BLUE->]n3vv|3 I recommend a function that processes the string until there is nothing to strip. At the end of execution, the function guarantees no remaining color codes. void strip( char *str ) { qboolean wasColored; do { wasColored = qfalse; char *dst = str; char *src = str; while( *src ) { if( *src == Q_COLOR_ESCAPE && *( src + 1 ) && *( src + 1 ) != Q_COLOR_ESCAPE ) { wasColored = qtrue; src += 2; while( *src ) { if( *src == Q_COLOR_ESCAPE && *( src + 1 ) && *( src + 1 ) != Q_COLOR_ESCAPE ) { src += 2; continue; } *dst++ = *src++; } *dst = '\0'; break; } dst++; src++; } } while( wasColored ); } From monk at rq3.com Mon Jul 16 10:26:23 2007 From: monk at rq3.com (monk at rq3.com) Date: Mon, 16 Jul 2007 08:26:23 -0600 (MDT) Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <200707161404.12037.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <200707161111.56414.ludwig.nussel@suse.de> <200707161404.12037.arny@ats.s.bawue.de> Message-ID: <2126.64.81.110.230.1184595983.squirrel@mail.rq3.com> I thought the in-game browser was just... always hosed. I know with RQ3 we'd always get complaints about it not showing servers that gamespy and other servers (ASE?) would. Most of our players are on the Windows platform. We tweaked things a bit by showing only the servers for our mod, but I don't think we delved into the problem and I think it still exists. But yeah, we recommend people use external server browsers over the in-game one all the time. Monk. > On Monday 16 July 2007 11:11, Ludwig Nussel wrote: >> Does q3 throttle the send rate or does it send all packets at once? > > It sends all packets at once. This is why I thought this might be some > connection tracking issue in Linux, and maybe it still is. I tried > fiddling > with a few parameters in the proc file system but to no avail. > > -- > Thilo Schulz From zakk at timedoctor.org Thu Jul 19 17:41:54 2007 From: zakk at timedoctor.org (Zachary Slater) Date: Thu, 19 Jul 2007 14:41:54 -0700 Subject: PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. Message-ID: <469FDAA2.1050203@timedoctor.org> <+icculus> zakk: recommend you tell people on the ioquake3 list to test with SDL svn RIGHT NOW. So, please do what the ryan says, this is all related to: http://icculus.org/cgi-bin/finger/finger.pl?user=icculus -- - Zachary J. Slater zakk at timedoctor.org zacharyslater at gmail.com From daniellord at mac.com Thu Jul 19 18:58:58 2007 From: daniellord at mac.com (Daniel Lord) Date: Thu, 19 Jul 2007 15:58:58 -0700 Subject: [quake3] PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. In-Reply-To: <469FDAA2.1050203@timedoctor.org> References: <469FDAA2.1050203@timedoctor.org> Message-ID: <5318FB86-0DDD-4F9C-A303-68E6E951EDB6@mac.com> FYI, I used SVN to pull out the latest and it is unbuildable on my Macbook Pro-: $svn co http://svn.libsdl.org/branches/SDL-1.2 A SDL-1.2/README.NanoX A SDL-1.2/README.NDS A SDL-1.2/SDL.spec.in A SDL-1.2/Borland.zip **** A SDL-1.2/VisualCE.zip U SDL-1.2 Checked out revision 3335. $sh build-scripts/fatbuild.sh ../../configure: ../../configure: No such file or directory So perhaps the svn command is incomplete since svn didn't get me everything... Or their repositiory is faulty... Or I am doing something silly... I'll drop Sam a line on this, this is just an FYI to the group. Daniel On Jul 19, 2007, at 14:41, Zachary Slater wrote: > <+icculus> zakk: recommend you tell people on the ioquake3 list to > test with SDL svn RIGHT NOW. > > So, please do what the ryan says, this is all related to: > http://icculus.org/cgi-bin/finger/finger.pl?user=icculus > -- > - Zachary J. Slater > zakk at timedoctor.org > zacharyslater at gmail.com > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > From defsyn at gmail.com Thu Jul 19 19:06:16 2007 From: defsyn at gmail.com (Henry Garcia) Date: Thu, 19 Jul 2007 19:06:16 -0400 Subject: mingw32 build report: SVN 1117M report on Win2k-sp4 Message-ID: Reporting on the latest SVN and using the SDL.dll as requested. copied the SDL.dll into the same directory as the ioquake3.x86.exe: i.e. c:\Program Files\Quake III Arena\SDL.dll. And I have the the SDL.dll file copied into the /mingw/bin directory Used the prebuilt SDL.dll file and set the USE_SDL = 1 in the makefile. Open_AL is also enabled and working. Everything seems to work fine. Sound sounds better than what I had been hearing. Or maybe it's my imagination. But would somebody confirm that I have everything set up right. I don't see any messages in the console saying that SDL is being used. OPEN_AL, yes. But no messages for SDL Thanks, Hank -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: qconsole.log.bz2 Type: application/x-bzip2 Size: 2006 bytes Desc: not available URL: From mattst88 at gmail.com Thu Jul 19 19:18:52 2007 From: mattst88 at gmail.com (Matt Turner) Date: Thu, 19 Jul 2007 19:18:52 -0400 Subject: [quake3] PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. In-Reply-To: <5318FB86-0DDD-4F9C-A303-68E6E951EDB6@mac.com> References: <469FDAA2.1050203@timedoctor.org> <5318FB86-0DDD-4F9C-A303-68E6E951EDB6@mac.com> Message-ID: ./autogen.sh generates configure et al. Matt Turner On 7/19/07, Daniel Lord wrote: > FYI, > > I used SVN to pull out the latest and it is unbuildable on my > Macbook Pro-: > > $svn co http://svn.libsdl.org/branches/SDL-1.2 > A SDL-1.2/README.NanoX > A SDL-1.2/README.NDS > A SDL-1.2/SDL.spec.in > A SDL-1.2/Borland.zip > **** > A SDL-1.2/VisualCE.zip > U SDL-1.2 > Checked out revision 3335. > > $sh build-scripts/fatbuild.sh > ../../configure: ../../configure: No such file or directory > > So perhaps the svn command is incomplete since svn didn't get me > everything... > Or their repositiory is faulty... > Or I am doing something silly... > > I'll drop Sam a line on this, this is just an FYI to the group. > > Daniel > > On Jul 19, 2007, at 14:41, Zachary Slater wrote: > > > <+icculus> zakk: recommend you tell people on the ioquake3 list to > > test with SDL svn RIGHT NOW. > > > > So, please do what the ryan says, this is all related to: > > http://icculus.org/cgi-bin/finger/finger.pl?user=icculus > > -- > > - Zachary J. Slater > > zakk at timedoctor.org > > zacharyslater at gmail.com > > > > --- > > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > > > > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > From zakk at timedoctor.org Thu Jul 19 20:01:08 2007 From: zakk at timedoctor.org (Zachary Slater) Date: Thu, 19 Jul 2007 17:01:08 -0700 Subject: [quake3] mingw32 build report: SVN 1117M report on Win2k-sp4 In-Reply-To: References: Message-ID: <469FFB44.5000902@timedoctor.org> Windows doesn't use SDL. -- - Zachary J. Slater zakk at timedoctor.org zacharyslater at gmail.com From daniellord at mac.com Thu Jul 19 22:16:00 2007 From: daniellord at mac.com (Daniel Lord) Date: Thu, 19 Jul 2007 19:16:00 -0700 Subject: [quake3] PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. In-Reply-To: References: <469FDAA2.1050203@timedoctor.org> <5318FB86-0DDD-4F9C-A303-68E6E951EDB6@mac.com> Message-ID: <98476210-FD7C-4FC5-BE2D-A99DB121A24F@mac.com> Thanks. Sent from my iPhone On Jul 19, 2007, at 4:18 PM, Matt Turner wrote: > ./autogen.sh generates configure et al. > > Matt Turner > > On 7/19/07, Daniel Lord wrote: >> FYI, >> >> I used SVN to pull out the latest and it is unbuildable on my >> Macbook Pro-: >> >> $svn co http://svn.libsdl.org/branches/SDL-1.2 >> A SDL-1.2/README.NanoX >> A SDL-1.2/README.NDS >> A SDL-1.2/SDL.spec.in >> A SDL-1.2/Borland.zip >> **** >> A SDL-1.2/VisualCE.zip >> U SDL-1.2 >> Checked out revision 3335. >> >> $sh build-scripts/fatbuild.sh >> ../../configure: ../../configure: No such file or directory >> >> So perhaps the svn command is incomplete since svn didn't get me >> everything... >> Or their repositiory is faulty... >> Or I am doing something silly... >> >> I'll drop Sam a line on this, this is just an FYI to the group. >> >> Daniel >> >> On Jul 19, 2007, at 14:41, Zachary Slater wrote: >> >> > <+icculus> zakk: recommend you tell people on the ioquake3 list to >> > test with SDL svn RIGHT NOW. >> > >> > So, please do what the ryan says, this is all related to: >> > http://icculus.org/cgi-bin/finger/finger.pl?user=icculus >> > -- >> > - Zachary J. Slater >> > zakk at timedoctor.org >> > zacharyslater at gmail.com >> > >> > --- >> > To unsubscribe, send a blank email to quake3- >> unsubscribe at icculus.org >> > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi? >> 50 >> > >> > >> >> >> --- >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > From noisyb at gmx.net Fri Jul 20 02:17:53 2007 From: noisyb at gmx.net (Dirk) Date: Fri, 20 Jul 2007 08:17:53 +0200 Subject: [quake3] mingw32 build report: SVN 1117M report on Win2k-sp4 In-Reply-To: <469FFB44.5000902@timedoctor.org> References: <469FFB44.5000902@timedoctor.org> Message-ID: <46A05391.9040709@gmx.net> Zachary Slater wrote: > Windows doesn't use SDL. > n1 :D From vincent at cojot.name Fri Jul 20 03:03:46 2007 From: vincent at cojot.name (vincent at cojot.name) Date: Fri, 20 Jul 2007 09:03:46 +0200 (CEST) Subject: [quake3] PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. In-Reply-To: <469FDAA2.1050203@timedoctor.org> References: <469FDAA2.1050203@timedoctor.org> Message-ID: On Thu, 19 Jul 2007, Zachary Slater wrote: > <+icculus> zakk: recommend you tell people on the ioquake3 list to test with > SDL svn RIGHT NOW. What SDL? SDL graphics, SDL sound or both? Just a Q... Vincent From vincent at cojot.name Fri Jul 20 03:14:36 2007 From: vincent at cojot.name (vincent at cojot.name) Date: Fri, 20 Jul 2007 09:14:36 +0200 (CEST) Subject: [quake3] PLEASE TEST IOQUAKE3 WITH SDL SVN RIGHT NOW. In-Reply-To: <469FDAA2.1050203@timedoctor.org> References: <469FDAA2.1050203@timedoctor.org> Message-ID: On Thu, 19 Jul 2007, Zachary Slater wrote: > <+icculus> zakk: recommend you tell people on the ioquake3 list to test with > SDL svn RIGHT NOW. > Not all that relevant but rev1117 builds and runs fine here: nonreg:[~/SVN/icculus/quake3-Solaris/trunk][506]$ uname -a SunOS flotsam 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Blade-100 nonreg:[~/SVN/icculus/quake3-Solaris/trunk][507]$ gcc --version gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Started with: ioquake3.sparc +set fs_cdpath /usr/local/share/games/quake3 +set vm_game 1 \ +set vm_cgame 1 +set vm_ui 1 +set sv_pure 1 +set ttycon 0 Thanks for not breaking things for minor platforms.. ;) :) :) -- ,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-, Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~ Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,. Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~' http://step.polymtl.ca/~coyote _.,-*~'`^`'~*-,._ coyote at NOSPAM4cojot.name They cannot scare me with their empty spaces Between stars - on stars where no human race is I have it in me so much nearer home To scare myself with my own desert places. - Robert Frost From dpesciot at mail.rochester.edu Fri Jul 20 10:03:04 2007 From: dpesciot at mail.rochester.edu (dpesciot) Date: Fri, 20 Jul 2007 10:03:04 -0400 Subject: take me off this mailing list Message-ID: <46a0c098.8e.1b76.1180@mail.rochester.edu> Could someone please remove me from this mailing list? From linuxmanmikec at gmail.com Fri Jul 20 10:09:39 2007 From: linuxmanmikec at gmail.com (LinuxManMikeC) Date: Fri, 20 Jul 2007 10:09:39 -0400 Subject: [quake3] take me off this mailing list In-Reply-To: <46a0c098.8e.1b76.1180@mail.rochester.edu> References: <46a0c098.8e.1b76.1180@mail.rochester.edu> Message-ID: <4561ec380707200709l7ea4522fr3c094eba5a68288a@mail.gmail.com> Um... look at the bottom of any list email for instructions on how to unsubscribe. On 7/20/07, dpesciot wrote: > Could someone please remove me from this mailing list? > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > From noisyb at gmx.net Sun Jul 22 06:56:31 2007 From: noisyb at gmx.net (Dirk) Date: Sun, 22 Jul 2007 12:56:31 +0200 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <200707161042.41583.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> Message-ID: <46A337DF.3010503@gmx.net> Thilo Schulz wrote: > On Monday 16 July 2007 03:54, Dirk wrote: >> Nope, it isn't. Also servers that are perfectly fine get filtered. If >> you sort the view alphabetically you can reproduce the bug with almost >> every click on refresh. > > I have had this bug too. I already tried to debug it as well. As soon as you > refresh the server list, the engine sends a ping request to all servers > reported by the master server. I tcpdumped this and noticed that all servers > get pinged, but not all servers actually reply. I tested this with xqf as > well, but all servers responded there. Nevertheless, I didn't follow this > further as I had not heard reports of the same problem back then and thought > this might be a connection tracking issue of the Linux kernel, as I use the > internet over another Linux router. Reading these reports here I am not that > sure anymore. I might look again into this problem when I get the time. > and PLEASE!!!!... make allowdownloads enabled by default (in the client)... I have seen too many people connect and disconnect... Thank you! From zakk at timedoctor.org Sun Jul 22 14:55:59 2007 From: zakk at timedoctor.org (Zachary Slater) Date: Sun, 22 Jul 2007 11:55:59 -0700 Subject: [quake3] [BUG?!] Server list sometimes incomplete In-Reply-To: <46A337DF.3010503@gmx.net> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> Message-ID: <46A3A83F.9000407@timedoctor.org> Dirk wrote: > and PLEASE!!!!... make allowdownloads enabled by default (in the > client)... I have seen too many people connect and disconnect... The goal of IOQUAKE3 is not to drastically change the behavior of things like this. Authors like leilei of openarena can change whatever they want. -- - Zachary J. Slater zakk at timedoctor.org zacharyslater at gmail.com From rlaurie at binarycult.com Mon Jul 23 15:12:25 2007 From: rlaurie at binarycult.com (rlaurie at binarycult.com) Date: Mon, 23 Jul 2007 14:12:25 -0500 Subject: Auto Downloads In-Reply-To: <46A3A83F.9000407@timedoctor.org> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> Message-ID: <20070723141225.2u3p4c7dkws08skk@66.228.121.116> Well, I understand Dirk's point from a mod developer's point of view. It's a hassle to propagate even small paks. Many users are ignorant and many don't know how to turn on auto-downloading or even know what it means to so. Furthermore, some Q3A-literate users still may wish to keep autodl off for other reasons. What if there was functionality that prompted the user if he wanted to enable one-time downloading from a server connect, if his autodl is disabled? I don't think this would stray from the original concept. Just further facilitate user-friendliness with downloads. It would curb illiterate user frustration and help literate and cautious users to be more selective with what is downloaded. Quoting Zachary Slater : > Dirk wrote: > >> and PLEASE!!!!... make allowdownloads enabled by default (in the >> client)... I have seen too many people connect and disconnect... > > > The goal of IOQUAKE3 is not to drastically change the behavior of > things like this. Authors like leilei of openarena can change whatever > they want. From f0rqu3 at gmail.com Mon Jul 23 22:36:15 2007 From: f0rqu3 at gmail.com (mister fork) Date: Tue, 24 Jul 2007 05:36:15 +0300 Subject: [quake3] Re: Auto Downloads In-Reply-To: <20070723141225.2u3p4c7dkws08skk@66.228.121.116> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> Message-ID: <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> if people are good enough to find ioquake3, they will also read some help files.( Maybe someone can add the info to enable auto downloads to http://ioquake3.org/?page=help ) and mod devs can do what they want On 7/23/07, rlaurie at binarycult.com wrote: > > Well, I understand Dirk's point from a mod developer's point of view. > It's a hassle to propagate even small paks. Many users are ignorant > and many don't know how to turn on auto-downloading or even know what > it means to so. Furthermore, some Q3A-literate users still may wish to > keep autodl off for other reasons. > > What if there was functionality that prompted the user if he wanted to > enable one-time downloading from a server connect, if his autodl is > disabled? I don't think this would stray from the original concept. > Just further facilitate user-friendliness with downloads. It would > curb illiterate user frustration and help literate and cautious users > to be more selective with what is downloaded. > > Quoting Zachary Slater : > > > Dirk wrote: > > > >> and PLEASE!!!!... make allowdownloads enabled by default (in the > >> client)... I have seen too many people connect and disconnect... > > > > > > The goal of IOQUAKE3 is not to drastically change the behavior of > > things like this. Authors like leilei of openarena can change whatever > > they want. > > > > > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From baztheallmighty at hotmail.com Mon Jul 23 23:51:32 2007 From: baztheallmighty at hotmail.com (baz theallmighty) Date: Tue, 24 Jul 2007 03:51:32 +0000 Subject: [quake3] Re: Auto Downloads Menu Idea In-Reply-To: <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> Message-ID: This would be a good feature to have. I think also users get a bit bored waiting for a download considering they have no idea how many pk3 files that are going to be download. A small list of files that are going to be downloaded would be good, to display to the user. Am i going to be downloading 300 mb worth of mod or am i just downloading one map that's 4mb in size? You don't really know. Of course you can turn on developer mod and see the pk3 files to be downloaded, but that is only really for dev's. My Idea: File Size % complete Download pak2.pk3 5 mb 100% yes/no pak3.pk3 5 mb 100% yes/no pak4.pk3 5 mb 100% yes/no pak5.pk3 5 mb 30% yes/no speed 20 KB/s The yes/no is a check box or something like that, that the user can select weather they want to download the file or not. Automatically have them all check to start with. Well something like that anyways. I think this would encourage users to download mod and maps a bit more. There my 2 cents worth anyways. Enjoy. \connect baz.chickenkiller.com <--remember to turn auto downloads on so you get the mod. :D >From: "mister fork" >Reply-To: quake3 at icculus.org >To: quake3 at icculus.org >Subject: Re: [quake3] Re: Auto Downloads >Date: Tue, 24 Jul 2007 05:36:15 +0300 >MIME-Version: 1.0 >Received: from icculus.org ([67.106.77.212]) by >bay0-mc4-f16.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Mon, >23 Jul 2007 19:36:30 -0700 >Received: (qmail 14853 invoked by alias); 23 Jul 2007 22:32:37 -0400 >Received: (qmail 14845 invoked by uid 305); 23 Jul 2007 22:32:36 -0400 >X-Message-Info: >txF49lGdW41u+GVCgUzIh5HLb1Aiijn4S4lN2w/FxF3B9HP1ojMdIMf1xumKNsC+ >Mailing-List: contact quake3-help at icculus.org; run by ezmlm >Precedence: bulk >X-No-Archive: yes >List-Post: >List-Help: >List-Unsubscribe: >List-Subscribe: >Delivered-To: mailing list quake3 at icculus.org >DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; > >h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; > >b=KamGU0rKekK97tT35qTXSLLcSRB4SKkLT3rauu8TqIyCASMgKB6CLhzJqPCy2+WpVpHZ8XdZZVlLM7te9TpNkMzwyaWt0Zy1qGqZXVt8kRcTfiORSI8WeQK4rOfYYCxsjQ6jOK36R4ZAOiSY1OG8lp76bSiFen6ejghNtU3pA8A= >DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; > >h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; > >b=kjK7DM3pBJ6Mxw6gDjZW4YCOlOT69bb0QEesSOqbh0n+CzUwAqAcPYHoB9HIicDOyt8U+oOJgjansqzZWi1umjzHkEprk7WUT0ViEhD/oL5dcwvyItom2ZXZ24VLIiw3CdPCeruzWRh1YRxMtgho/FJLja+GKvVBQ34Ypz9tXr4= >References: <469855AB.9050304 at gmx.net> ><4561ec380707140753v5da4d095k947f6fd9611705cd at mail.gmail.com> ><469ACFEC.2010300 at gmx.net> <200707161042.41583.arny at ats.s.bawue.de> ><46A337DF.3010503 at gmx.net> <46A3A83F.9000407 at timedoctor.org> ><20070723141225.2u3p4c7dkws08skk at 66.228.121.116> >Return-Path: quake3-return-1828-baztheallmighty=hotmail.com at icculus.org >X-OriginalArrivalTime: 24 Jul 2007 02:36:30.0545 (UTC) >FILETIME=[71287410:01C7CD9B] > >if people are good enough to find ioquake3, they will also read some help >files.( Maybe someone can add the info to enable auto downloads to >http://ioquake3.org/?page=help ) and mod devs can do what they want > >On 7/23/07, rlaurie at binarycult.com wrote: >> >>Well, I understand Dirk's point from a mod developer's point of view. >>It's a hassle to propagate even small paks. Many users are ignorant >>and many don't know how to turn on auto-downloading or even know what >>it means to so. Furthermore, some Q3A-literate users still may wish to >>keep autodl off for other reasons. >> >>What if there was functionality that prompted the user if he wanted to >>enable one-time downloading from a server connect, if his autodl is >>disabled? I don't think this would stray from the original concept. >>Just further facilitate user-friendliness with downloads. It would >>curb illiterate user frustration and help literate and cautious users >>to be more selective with what is downloaded. >> >>Quoting Zachary Slater : >> >> > Dirk wrote: >> > >> >> and PLEASE!!!!... make allowdownloads enabled by default (in the >> >> client)... I have seen too many people connect and disconnect... >> > >> > >> > The goal of IOQUAKE3 is not to drastically change the behavior of >> > things like this. Authors like leilei of openarena can change whatever >> > they want. >> >> >> >> >> >>--- >>To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >>Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> _________________________________________________________________ Advertisement: Are you paid what you're worth? Find out: SEEK Salary Centre http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=july07_endtext_salary&_m=EXT From kloppenburg at snt.utwente.nl Tue Jul 24 00:45:07 2007 From: kloppenburg at snt.utwente.nl (Erik Kloppenburg) Date: Tue, 24 Jul 2007 06:45:07 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> Message-ID: <46A583D3.3080105@snt.utwente.nl> mister fork wrote: > if people are good enough to find ioquake3, they will also read some help > files. #ioquake3 proves you wrong. From noisyb at gmx.net Tue Jul 24 04:26:35 2007 From: noisyb at gmx.net (Dirk) Date: Tue, 24 Jul 2007 10:26:35 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> Message-ID: <46A5B7BB.6030406@gmx.net> mister fork wrote: > if people are good enough to find ioquake3, but 08/15 users are also people(!)... and they still use dual boot to play quake3 because they failed to put ioquake3 and the content of their original together... let alone download mods or maps... i recommend you try Open Arena.. go to the two or three excessive plus servers there and spectate how many people fail to get stuff downloaded... > they will also read some help > files. 08/15 users don't read help files... they rather click on buttons until something works or they leave it... >( Maybe someone can add the info to enable auto downloads to > http://ioquake3.org/?page=help ) and mod devs can do what they want yeah right... the url could be shown in the client with a remark to catch pen and paper instead of a small dialog that asks "Should this be downloaded?" ... :) > On 7/23/07, rlaurie at binarycult.com wrote: >> >> Well, I understand Dirk's point from a mod developer's point of view. >> It's a hassle to propagate even small paks. Many users are ignorant >> and many don't know how to turn on auto-downloading or even know what >> it means to so. Furthermore, some Q3A-literate users still may wish to >> keep autodl off for other reasons. >> >> What if there was functionality that prompted the user if he wanted to >> enable one-time downloading from a server connect, if his autodl is >> disabled? I don't think this would stray from the original concept. >> Just further facilitate user-friendliness with downloads. It would >> curb illiterate user frustration and help literate and cautious users >> to be more selective with what is downloaded. >> >> Quoting Zachary Slater : >> >> > Dirk wrote: >> > >> >> and PLEASE!!!!... make allowdownloads enabled by default (in the >> >> client)... I have seen too many people connect and disconnect... >> > >> > >> > The goal of IOQUAKE3 is not to drastically change the behavior of >> > things like this. Authors like leilei of openarena can change whatever >> > they want. >> >> >> >> >> >> --- >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> > From f0rqu3 at gmail.com Tue Jul 24 09:04:35 2007 From: f0rqu3 at gmail.com (mister fork) Date: Tue, 24 Jul 2007 16:04:35 +0300 Subject: [quake3] Re: Auto Downloads In-Reply-To: <46A5B7BB.6030406@gmx.net> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> <46A5B7BB.6030406@gmx.net> Message-ID: <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> this is not openarena discussion. openarena can enable it in their distribution and for the users that dont read help files : it is their problem. but they really should they must read http://ioquake3.org/?page=help after downloading ioquake3 binary from the ioquake3.org anyways I dont think auto downloads will be on by default in future releases of ioquake3. Zakk said the last word. Go bug whatever mod you want it to be enabled. This is not the right place imho On 7/24/07, Dirk wrote: > > mister fork wrote: > > if people are good enough to find ioquake3, > > but 08/15 users are also people(!)... and they still use dual boot to > play quake3 because they failed to put ioquake3 and the content of their > original together... let alone download mods or maps... > > i recommend you try Open Arena.. go to the two or three excessive plus > servers there and spectate how many people fail to get stuff downloaded... > > > they will also read some help > > files. > > 08/15 users don't read help files... they rather click on buttons until > something works or they leave it... > > >( Maybe someone can add the info to enable auto downloads to > > http://ioquake3.org/?page=help ) and mod devs can do what they want > > yeah right... the url could be shown in the client with a remark to > catch pen and paper instead of a small dialog that asks "Should this be > downloaded?" ... :) > > > On 7/23/07, rlaurie at binarycult.com wrote: > >> > >> Well, I understand Dirk's point from a mod developer's point of view. > >> It's a hassle to propagate even small paks. Many users are ignorant > >> and many don't know how to turn on auto-downloading or even know what > >> it means to so. Furthermore, some Q3A-literate users still may wish to > >> keep autodl off for other reasons. > >> > >> What if there was functionality that prompted the user if he wanted to > >> enable one-time downloading from a server connect, if his autodl is > >> disabled? I don't think this would stray from the original concept. > >> Just further facilitate user-friendliness with downloads. It would > >> curb illiterate user frustration and help literate and cautious users > >> to be more selective with what is downloaded. > >> > >> Quoting Zachary Slater : > >> > >> > Dirk wrote: > >> > > >> >> and PLEASE!!!!... make allowdownloads enabled by default (in the > >> >> client)... I have seen too many people connect and disconnect... > >> > > >> > > >> > The goal of IOQUAKE3 is not to drastically change the behavior of > >> > things like this. Authors like leilei of openarena can change > whatever > >> > they want. > >> > >> > >> > >> > >> > >> --- > >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > >> > >> > >> > > > > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noisyb at gmx.net Tue Jul 24 11:17:25 2007 From: noisyb at gmx.net (Dirk) Date: Tue, 24 Jul 2007 17:17:25 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> <46A5B7BB.6030406@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> Message-ID: <46A61805.5060105@gmx.net> mister fork wrote: > this is not openarena discussion. openarena can enable it in their > distribution i used open arena as an example > and for the users that dont read help files : it is their problem. but they > really should > they must read http://ioquake3.org/?page=help after downloading ioquake3 > binary from the ioquake3.org > > anyways I dont think auto downloads will be on by default in future > releases > of ioquake3. Zakk said the last word. Go bug whatever mod you want it to be > enabled. This is not the right place imho fine... but there won't be much of a future without auto downloads anyways... > On 7/24/07, Dirk wrote: >> >> mister fork wrote: >> > if people are good enough to find ioquake3, >> >> but 08/15 users are also people(!)... and they still use dual boot to >> play quake3 because they failed to put ioquake3 and the content of their >> original together... let alone download mods or maps... >> >> i recommend you try Open Arena.. go to the two or three excessive plus >> servers there and spectate how many people fail to get stuff >> downloaded... >> >> > they will also read some help >> > files. >> >> 08/15 users don't read help files... they rather click on buttons until >> something works or they leave it... >> >> >( Maybe someone can add the info to enable auto downloads to >> > http://ioquake3.org/?page=help ) and mod devs can do what they want >> >> yeah right... the url could be shown in the client with a remark to >> catch pen and paper instead of a small dialog that asks "Should this be >> downloaded?" ... :) >> >> > On 7/23/07, rlaurie at binarycult.com wrote: >> >> >> >> Well, I understand Dirk's point from a mod developer's point of view. >> >> It's a hassle to propagate even small paks. Many users are ignorant >> >> and many don't know how to turn on auto-downloading or even know what >> >> it means to so. Furthermore, some Q3A-literate users still may wish to >> >> keep autodl off for other reasons. >> >> >> >> What if there was functionality that prompted the user if he wanted to >> >> enable one-time downloading from a server connect, if his autodl is >> >> disabled? I don't think this would stray from the original concept. >> >> Just further facilitate user-friendliness with downloads. It would >> >> curb illiterate user frustration and help literate and cautious users >> >> to be more selective with what is downloaded. >> >> >> >> Quoting Zachary Slater : >> >> >> >> > Dirk wrote: >> >> > >> >> >> and PLEASE!!!!... make allowdownloads enabled by default (in the >> >> >> client)... I have seen too many people connect and disconnect... >> >> > >> >> > >> >> > The goal of IOQUAKE3 is not to drastically change the behavior of >> >> > things like this. Authors like leilei of openarena can change >> whatever >> >> > they want. >> >> >> >> >> >> >> >> >> >> >> >> --- >> >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> >> >> >> >> > >> >> >> --- >> To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org >> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 >> >> >> > From kloppenburg at snt.utwente.nl Tue Jul 24 11:35:56 2007 From: kloppenburg at snt.utwente.nl (Erik Kloppenburg) Date: Tue, 24 Jul 2007 17:35:56 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> <46A5B7BB.6030406@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> Message-ID: <46A61C5C.3060500@snt.utwente.nl> mister fork wrote: > and for the users that dont read help files : it is their problem. but they > really should > they must read http://ioquake3.org/?page=help after downloading ioquake3 > binary from the ioquake3.org This is not a realistic expectation imho :) From noisyb at gmx.net Tue Jul 24 12:10:28 2007 From: noisyb at gmx.net (Dirk) Date: Tue, 24 Jul 2007 18:10:28 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <46A61C5C.3060500@snt.utwente.nl> References: <469855AB.9050304@gmx.net> <4561ec380707140753v5da4d095k947f6fd9611705cd@mail.gmail.com> <469ACFEC.2010300@gmx.net> <200707161042.41583.arny@ats.s.bawue.de> <46A337DF.3010503@gmx.net> <46A3A83F.9000407@timedoctor.org> <20070723141225.2u3p4c7dkws08skk@66.228.121.116> <7cd2d9980707231936s1f4e98e1gd8b154b1398993f2@mail.gmail.com> <46A5B7BB.6030406@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> <46A61C5C.3060500@snt.utwente.nl> Message-ID: <46A62474.1070500@gmx.net> Erik Kloppenburg wrote: > mister fork wrote: >> and for the users that dont read help files : it is their problem. but >> they >> really should >> they must read http://ioquake3.org/?page=help after downloading ioquake3 >> binary from the ioquake3.org > > This is not a realistic expectation imho :) > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > ***************************************************************** EVERYONE wants NEW content WITHOUT having to read some BS docs!!! ***************************************************************** Why are we the only ones who believe that... ******************************************** USING IOQUAKE3 SHOULD BE LIKE PLAYING A GAME ******************************************** ...? I learn while I play! All I ask for is to set the default value of g_allowdownloads from 0 to 13 (http, not udp). Values: 1 - ENABLE 2 - do not use HTTP/FTP downloads 4 - do not use UDP downloads 8 - do not ask the client to disconnect when using HTTP/FTP That is such a small change. It wouldn't break A N Y T H I N G!!!!!! Everyone who doesn't realize that this is the most needed change in the client has never played new maps or the great mods out there. The ignorance not to agree that g_allowdownloads is the key to ioq3 (and all depending on it) real potential is unbeliveable. Saying "They could change that!" is like asking for a fork. I really see myself forced to ask you (who doesn't agree) if you ever played that game with maps and mods that are not included in the original version. I have 3G of 800+ new maps!!!!! And I can practically delete them because after 7 years the Quake3 is open source but the developers STILL refuse to * * R E W A R D * * mappers and mod developers by changing the default of g_allowdownloads??????? R E T A R D E D !!!!!!!! (sorry) Really, give in and change that frickin' value. And when the userbase of ioquake3 (and the others) increases nobody will show up and tell you "See I told you so! You were not smart enough to do the change without having people beg you!!! hahaha..."... NO! Instead they'll be happy with the MOST IMPORTANT NEW FEATURE: **** User friendly and fast (http) downloads of NEW content. **** Dirk From arny at ats.s.bawue.de Tue Jul 24 11:46:14 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Tue, 24 Jul 2007 17:46:14 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <46A61805.5060105@gmx.net> References: <469855AB.9050304@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> <46A61805.5060105@gmx.net> Message-ID: <200707241746.17005.arny@ats.s.bawue.de> On Tuesday 24 July 2007 17:17, Dirk wrote: > fine... but there won't be much of a future without auto downloads > anyways... The download feature in quake3 is a gaping security hole as there is no protection whatsoever against malicious data files. As a matter of fact, I know *right now* which kind of malicious data files could be used to trigger an exploitable buffer overflow in any clients unfortunate enough to download such a file. We don't bother to fix this condition, as there has never been any effort to make the client secure when it comes to interpreting maps/models etc. and it would pretty much be a Sisyphean task to clear it all up. What we don't need now is an autodownload feature set to "1" per default. If a mod wants to set it to 1 per default, then it should at least leave the user the choice whether he trusts that server to proceed downloading the data. But that really is up to the developers of those mods, and not to ioquake3 as we want to stay compatible with id's original mod and they simply don't have that check. So there's simply no point in bothering us about this. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From kloppenburg at snt.utwente.nl Tue Jul 24 12:56:18 2007 From: kloppenburg at snt.utwente.nl (Erik Kloppenburg) Date: Tue, 24 Jul 2007 18:56:18 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707241746.17005.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> <46A61805.5060105@gmx.net> <200707241746.17005.arny@ats.s.bawue.de> Message-ID: <46A62F32.8030401@snt.utwente.nl> Thilo Schulz wrote: > Stuff about security But wouldn't it be nice to at least have a button to enable/disable it at install, or when a map is missing. And when someone clicks it, do a pop-up which clearly states the risks etc. ? From monk at rq3.com Tue Jul 24 14:00:20 2007 From: monk at rq3.com (monk at rq3.com) Date: Tue, 24 Jul 2007 12:00:20 -0600 (MDT) Subject: [quake3] Re: Auto Downloads In-Reply-To: <46A62F32.8030401@snt.utwente.nl> References: <469855AB.9050304@gmx.net> <7cd2d9980707240604p51dc902die5c91461cfd9acfb@mail.gmail.com> <46A61805.5060105@gmx.net> <200707241746.17005.arny@ats.s.bawue.de> <46A62F32.8030401@snt.utwente.nl> Message-ID: <49605.63.150.173.150.1185300020.squirrel@mail.rq3.com> > Thilo Schulz wrote: >> Stuff about security > > But wouldn't it be nice to at least have a button to enable/disable it > at install, or when a map is missing. And when someone clicks it, do a > pop-up which clearly states the risks etc. ? I wholeheartedly agree with your sentiments in regards to user experience. But you'll get no interested parties from ioq3 developers. Think of ioq3 as an engine developer. They want a static, bugfixed base that other people can use as a launch point for other projects. Yes, some of the devs here use it for their own projects as well, but the really neat stuff will never make it into ioq3. ioq3 is not really an end-user release. Once you realize that, you'll be more content with the universe. If you want features newer than 5 years old, you'll need to look at some of the derivative projects like Evolution Q3 or XreaL or some of the standalone games made from it like Urban Terror and that star trek thing Thilo wrote, Elite Forces I think it is. ioq3 is a framework for other people to use. It'll add stuff like ipv6 support and support for some esoteric media formats, but not so much modern formats and graphical goodies. If you want a Q3-based free game that just "works" with autodownloaded content, look at Enemy Territory. I guess that's not a huge security problem for them. Or looking at UT2K4, pretty much every server I connect to I can get custom content without batting an eye and I don't recall having to explicitly set that up, though I may have long ago. But ioq3? Naw, it's a security risk that's non-trivial to fix and make safe enough for being enabled by default. ioq3 is solid and good at what it provides. Just don't expect the core developers to want to extend it too far. Heck, even stuff from some of the core developers is listed as optional modules. They just don't want to break anything. Q3 still is the 10th-most-played online game according to Gamespy's stats: http://archive.gamespy.com/stats/ http://archive.gamespy.com/stats/mods.asp?id=22&s=1 1790 servers, 2947 players http://www.serverspy.net/site/stats/ http://www.serverspy.net/site/stats/mods.html?g=2 11th by ServerSpy, that's 1.4% of all online play! Now how many people still use the old Q3 client because it supports PunkBuster? Looking in ServerSpy, the top 4 mods account for the majority of Q3 play. I'm not too deep into Q3, but do OSP, CPMA, and UrT players tend to want to have PunkBuster ability over ioq3? For competitive online play? Or does no one use PB anymore? In that context, just how many baseq3 players DO end up using ioq3? I don't know the answer. But that line of thought is why it makes sense to me that ioq3 is positioned as a "game engine" project rather than an end-user project. And that's why I don't really expect anything besides the occasional bugfix--though if downloading content could lead to exploits, I'd have thought that'd have been mitigated by now regardless of the default cvar value. Eh, security through obsecurity/disabling default value works too, I guess. Anyway, I'm done ramblin'. And again, while I completely agree with your sentiment about things that (in one's opinion) help the players and overall community, I think it's a waste of time to address this here and all it does is get people needlessly worked up. Monk. From ludwig.nussel at suse.de Wed Jul 25 02:57:20 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Wed, 25 Jul 2007 08:57:20 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <49605.63.150.173.150.1185300020.squirrel@mail.rq3.com> References: <469855AB.9050304@gmx.net> <46A62F32.8030401@snt.utwente.nl> <49605.63.150.173.150.1185300020.squirrel@mail.rq3.com> Message-ID: <200707250857.21077.ludwig.nussel@suse.de> monk at rq3.com wrote: > If you want a Q3-based free game that just "works" with autodownloaded > content, look at Enemy Territory. I guess that's not a huge security > problem for them. Or looking at UT2K4, pretty much every server I connect > to I can get custom content without batting an eye and I don't recall ET is probably even worse as it's able to use shared libs contained in pk3 files IIRC. Ie you don't have to exploit some buffer overflow or vm deficiency but can conveniently write malicious code in C and put it in a shared library. Games in general are not designed for security, it's advisable to run them as a user different from the one you do your daily work with. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From ludwig.nussel at suse.de Wed Jul 25 03:03:14 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Wed, 25 Jul 2007 09:03:14 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707241746.17005.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <46A61805.5060105@gmx.net> <200707241746.17005.arny@ats.s.bawue.de> Message-ID: <200707250903.14691.ludwig.nussel@suse.de> Thilo Schulz wrote: > What we don't need now is an autodownload feature set to "1" per default. If a > mod wants to set it to 1 per default, then it should at least leave the user > the choice whether he trusts that server to proceed downloading the data. Is the download code in the mod code? If it's in the engine I'd vote for prompting the user before downloading stuff. Personally I never liked that binary on/off either, I'd rather like to decide in each individual case. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From arny at ats.s.bawue.de Wed Jul 25 06:58:38 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Wed, 25 Jul 2007 12:58:38 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707250903.14691.ludwig.nussel@suse.de> References: <469855AB.9050304@gmx.net> <200707241746.17005.arny@ats.s.bawue.de> <200707250903.14691.ludwig.nussel@suse.de> Message-ID: <200707251258.41066.arny@ats.s.bawue.de> On Wednesday 25 July 2007 09:03, Ludwig Nussel wrote: > Is the download code in the mod code? If it's in the engine I'd vote > for prompting the user before downloading stuff. Personally I never > liked that binary on/off either, I'd rather like to decide in each > individual case. Hmm.. I was under the impression that simple menus would be controlled by the UI, not the engine. On the other hand, I can imagine it would be possible to write out a simple text asking whether downloading should be allowed from that server or not and having the user hit F1/F2 to accept/decline. This should definitely be looked into. In this case, we could ship with autodownload disabled by default but still leaving the user the case-by-case decision. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From arny at ats.s.bawue.de Wed Jul 25 07:00:49 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Wed, 25 Jul 2007 13:00:49 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <46A62474.1070500@gmx.net> References: <469855AB.9050304@gmx.net> <46A61C5C.3060500@snt.utwente.nl> <46A62474.1070500@gmx.net> Message-ID: <200707251300.53102.arny@ats.s.bawue.de> On Tuesday 24 July 2007 18:10, Dirk wrote: > All I ask for is to set the default value of g_allowdownloads from 0 to > 13 (http, not udp). Have you read my email about the security issues at all? Besides from the point that we're only supplying a basis for other mod developers and they can put the default value to whatever the want, the rest of your email ist just pointless rant. So please calm down or just go away. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From arny at ats.s.bawue.de Wed Jul 25 07:13:26 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Wed, 25 Jul 2007 13:13:26 +0200 Subject: [quake3] Re: x86_64 vm without gas In-Reply-To: <200707051800.05639.ludwig.nussel@suse.de> References: <200706291612.07131.ludwig.nussel@suse.de> <46851904.6090700@ngus.net> <200707051800.05639.ludwig.nussel@suse.de> Message-ID: <200707251313.29505.arny@ats.s.bawue.de> On Thursday 05 July 2007 18:00, Ludwig Nussel wrote: > Here's an updated version of the patch. It's somewhat faster than > gas and doesn't crash anymore AFAICT. There's still room for speed > improvement though. If noone complains I'd commit it this way. Can you resend that patch for the latest source and as an attachment? Copy&pasting out of the email is a bit problematic as applying the patch fails. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From ludwig.nussel at suse.de Wed Jul 25 07:17:46 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Wed, 25 Jul 2007 13:17:46 +0200 Subject: [quake3] Re: x86_64 vm without gas In-Reply-To: <200707251313.29505.arny@ats.s.bawue.de> References: <200706291612.07131.ludwig.nussel@suse.de> <200707051800.05639.ludwig.nussel@suse.de> <200707251313.29505.arny@ats.s.bawue.de> Message-ID: <200707251317.47091.ludwig.nussel@suse.de> Thilo Schulz wrote: > On Thursday 05 July 2007 18:00, Ludwig Nussel wrote: > > Here's an updated version of the patch. It's somewhat faster than > > gas and doesn't crash anymore AFAICT. There's still room for speed > > improvement though. If noone complains I'd commit it this way. > > Can you resend that patch for the latest source and as an attachment? > Copy&pasting out of the email is a bit problematic as applying the patch > fails. Just save the whole mail as file, patch ignores garbage. Anyways, the patch is also at http://www.suse.de/~lnussel/ioq3_vm_x86_64_assembler.diff cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From noisyb at gmx.net Wed Jul 25 10:33:50 2007 From: noisyb at gmx.net (Dirk) Date: Wed, 25 Jul 2007 16:33:50 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707251300.53102.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <46A61C5C.3060500@snt.utwente.nl> <46A62474.1070500@gmx.net> <200707251300.53102.arny@ats.s.bawue.de> Message-ID: <46A75F4E.8060403@gmx.net> Thilo Schulz wrote: > On Tuesday 24 July 2007 18:10, Dirk wrote: >> All I ask for is to set the default value of g_allowdownloads from 0 to >> 13 (http, not udp). > > Have you read my email about the security issues at all? Besides from the > point that we're only supplying a basis for other mod developers and they can > put the default value to whatever the want, the rest of your email ist just > pointless rant. So please calm down or just go away. > i posted at the same time... and i was in the mood for ranting.. but i'll shut up now after i've seen that there might be a vote like f1/f2 feature possible in your other mail... From monk at rq3.com Wed Jul 25 13:25:38 2007 From: monk at rq3.com (monk at rq3.com) Date: Wed, 25 Jul 2007 11:25:38 -0600 (MDT) Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707250857.21077.ludwig.nussel@suse.de> References: <469855AB.9050304@gmx.net> <46A62F32.8030401@snt.utwente.nl> <49605.63.150.173.150.1185300020.squirrel@mail.rq3.com> <200707250857.21077.ludwig.nussel@suse.de> Message-ID: <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> > ET is probably even worse as it's able to use shared libs contained in pk3 > files IIRC. Ie you don't have to exploit some buffer overflow or vm > deficiency > but can conveniently write malicious code in C and put it in a shared > library. > Games in general are not designed for security, it's advisable to run them > as a > user different from the one you do your daily work with. It's just a different mindset. How many gamers, millions of gamers, know or care about different user account access? How many just find it easier to set everyone as admin/root so they don't have to deal with programs whining that they can't install or update themselves with a new patch? Vista's UAC is only worsening the trend of training users to just click through any warning messages and disregard them as annoyances to ignore. I think only programmers and IT professionals care about proper security. You can do what you can to inform users and try to force them to decide if they are dealing with a trusted source or not, but ultimately they are the weakest, most horrible link in the whole chain of trust. From zakk at timedoctor.org Wed Jul 25 21:37:37 2007 From: zakk at timedoctor.org (Zachary Slater) Date: Wed, 25 Jul 2007 18:37:37 -0700 Subject: [quake3] Re: Auto Downloads In-Reply-To: <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> References: <469855AB.9050304@gmx.net> <46A62F32.8030401@snt.utwente.nl> <49605.63.150.173.150.1185300020.squirrel@mail.rq3.com> <200707250857.21077.ludwig.nussel@suse.de> <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> Message-ID: <46A7FAE1.6030408@timedoctor.org> Security holes: Yes. Fixes are taken seriously, but not discussed on this list until they're fixed in the distributed code. It isn't something I want people to have to worry about, and dealing with it in a professional manner is required with open source projects. As in, it isn't up for debate if we'll fix holes, especially when patches are provided. Verbosity: Please speak your mind as eloquently as you do, I think everyone enjoys reading The Monks Mental Dump, we don't get enough real discussion. Usually it is just: HERE IS MY POINT **********OMFG BUNNIES!!!!!!!111111********* WTF DON'T YOU IMPLNANT NUDE MYNX SKINZ??! -- - Zachary J. Slater zakk at timedoctor.org zacharyslater at gmail.com From arny at ats.s.bawue.de Thu Jul 26 06:31:53 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Thu, 26 Jul 2007 12:31:53 +0200 Subject: [quake3] Re: Auto Downloads In-Reply-To: <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> References: <469855AB.9050304@gmx.net> <200707250857.21077.ludwig.nussel@suse.de> <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> Message-ID: <200707261232.00298.arny@ats.s.bawue.de> On Wednesday 25 July 2007 19:25, monk at rq3.com wrote: > Anyway, I am sorry for being so off-topic and verbose. I find the whole > programmer versus end user mindset thing interesting as it crops up in UI > design, program implementation, technical documentation, etc. I'll stop > yammering on the subject so the list can get back to more down-to-earth > business! It's not programmer vs. end user. It is just a matter of users with a bit of brain having the ability to do a case-by-case decision whether to download this weird looking "zzzznew.pk3" from that server noone is playing on for some reason but that he wants to try out. Basically, what you're saying is like "Because most users don't know how to enable firewalls properly, we don't really need to go to the hassle and ship our OS with a firewall, now do we?" We're not here to make this thing fool proof. It is just a compromise. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From diego1609 at gmail.com Thu Jul 26 14:10:10 2007 From: diego1609 at gmail.com (Diego de Estrada) Date: Thu, 26 Jul 2007 15:10:10 -0300 Subject: [quake3] Re: Auto Downloads In-Reply-To: <200707261232.00298.arny@ats.s.bawue.de> References: <469855AB.9050304@gmx.net> <200707250857.21077.ludwig.nussel@suse.de> <32459.63.150.173.150.1185384338.squirrel@mail.rq3.com> <200707261232.00298.arny@ats.s.bawue.de> Message-ID: <5dc44ec70707261110q7ad0a137hc07c6fa3a8caa454@mail.gmail.com> Mmmh, it's so difficult to parse correctly a file? I think the PhysicsFS library is exactly for that. On 7/26/07, Thilo Schulz wrote: > On Wednesday 25 July 2007 19:25, monk at rq3.com wrote: > > Anyway, I am sorry for being so off-topic and verbose. I find the whole > > programmer versus end user mindset thing interesting as it crops up in UI > > design, program implementation, technical documentation, etc. I'll stop > > yammering on the subject so the list can get back to more down-to-earth > > business! > > It's not programmer vs. end user. It is just a matter of users with a bit of > brain having the ability to do a case-by-case decision whether to download > this weird looking "zzzznew.pk3" from that server noone is playing on for > some reason but that he wants to try out. > Basically, what you're saying is like "Because most users don't know how to > enable firewalls properly, we don't really need to go to the hassle and ship > our OS with a firewall, now do we?" > We're not here to make this thing fool proof. It is just a compromise. > > -- > Thilo Schulz > > From arny at ats.s.bawue.de Thu Jul 26 17:29:29 2007 From: arny at ats.s.bawue.de (Thilo Schulz) Date: Thu, 26 Jul 2007 23:29:29 +0200 Subject: [quake3] Re: x86_64 vm without gas In-Reply-To: <200707251317.47091.ludwig.nussel@suse.de> References: <200706291612.07131.ludwig.nussel@suse.de> <200707251313.29505.arny@ats.s.bawue.de> <200707251317.47091.ludwig.nussel@suse.de> Message-ID: <200707262329.34464.arny@ats.s.bawue.de> On Wednesday 25 July 2007 13:17, Ludwig Nussel wrote: > http://www.suse.de/~lnussel/ioq3_vm_x86_64_assembler.diff The patch seems to work fine, I checked it with EliteForce. However - it still has similar loading times to the version with gas. -- Thilo Schulz -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From shivakumar.gn at gmail.com Thu Jul 26 22:55:49 2007 From: shivakumar.gn at gmail.com (S h i v ) Date: Fri, 27 Jul 2007 08:25:49 +0530 Subject: Problem with invoking Q3 Message-ID: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> Hi All, I have built ioquake3 from the source on Solaris Express (OpenSolaris based) and then copied the pk3 files from the OpenArena 0.7 download. Now on invoking the executable ioquake3.i386 I get an error say checksum for pak0.pk3 failed. I have reproduced the text below. How do I solve this problem? (the OpenArena download itself is fine, I verified this on windows side by actually playing a game) ------------------------------------------------------------------------------------------------------------------------------------------------ 1.33_SVN1120M solaris-i386 Jul 27 2007 ----- FS_Startup ----- Current search path: /export/home/pkguser/.q3a/baseq3 ./baseq3/pak6-misc.pk3 (191 files) ./baseq3/pak5-TA.pk3 (11 files) ./baseq3/pak4-textures.pk3 (1496 files) ./baseq3/pak3-music.pk3 (9 files) ./baseq3/pak2-players.pk3 (620 files) ./baseq3/pak2-players-mature.pk3 (171 files) ./baseq3/pak1-maps.pk3 (73 files) ./baseq3/pak0.pk3 (926 files) ./baseq3 ---------------------- 3497 files in pk3 files ************************************************** WARNING: pak0.pk3 is present but its checksum (1954366289) is not correct. Please re-install the point release ************************************************** Point Release files are missing. Please re-install the 1.32 point release. Also check that your Q3 executable is in the correct place and that every file in the baseq3 directory is present and readable. Sys_Error: *** you need to install Quake III Arena in order to play *** ------------------------------------------------------------------------------------------------------------------------------------------------ regards Shiv -------------- next part -------------- An HTML attachment was scrubbed... URL: From noisyb at gmx.net Fri Jul 27 05:34:39 2007 From: noisyb at gmx.net (Dirk) Date: Fri, 27 Jul 2007 11:34:39 +0200 Subject: [quake3] Problem with invoking Q3 In-Reply-To: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> References: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> Message-ID: <46A9BC2F.7020700@gmx.net> Get the Open Arena source code. They have made some small changes like a different master server and a different name for the base dir (baseoa instead of baseq3). They also removed the CD-key check. I've attached the patch from their 0.6.0 release. It should still work with current ioq3 and the 0.7.0 release of OA. Their changes are very brief. You'll see. And make sure you annoy them until they add your Solaris binary to their download section. Dirk S h i v wrote: > Hi All, > > I have built ioquake3 from the source on Solaris Express (OpenSolaris based) > and then copied the pk3 files from the OpenArena 0.7 download. > Now on invoking the executable ioquake3.i386 I get an error say checksum for > pak0.pk3 failed. I have reproduced the text below. > > How do I solve this problem? (the OpenArena download itself is fine, I > verified this on windows side by actually playing a game) > > ------------------------------------------------------------------------------------------------------------------------------------------------ > > 1.33_SVN1120M solaris-i386 Jul 27 2007 > ----- FS_Startup ----- > Current search path: > /export/home/pkguser/.q3a/baseq3 > ./baseq3/pak6-misc.pk3 (191 files) > ./baseq3/pak5-TA.pk3 (11 files) > ./baseq3/pak4-textures.pk3 (1496 files) > ./baseq3/pak3-music.pk3 (9 files) > ./baseq3/pak2-players.pk3 (620 files) > ./baseq3/pak2-players-mature.pk3 (171 files) > ./baseq3/pak1-maps.pk3 (73 files) > ./baseq3/pak0.pk3 (926 files) > ./baseq3 > > ---------------------- > 3497 files in pk3 files > > ************************************************** > WARNING: pak0.pk3 is present but its checksum (1954366289) > is not correct. Please re-install the point release > ************************************************** > > Point Release files are missing. Please > re-install the 1.32 point release. > > Also check that your Q3 executable is in > the correct place and that every file > in the baseq3 directory is present and readable. > Sys_Error: > *** you need to install Quake III Arena in order to play *** > > > ------------------------------------------------------------------------------------------------------------------------------------------------ > > regards > Shiv > -------------- next part -------------- A non-text attachment was scrubbed... Name: 060-oachanges.diff Type: text/x-diff Size: 6834 bytes Desc: not available URL: From ludwig.nussel at suse.de Fri Jul 27 05:40:24 2007 From: ludwig.nussel at suse.de (Ludwig Nussel) Date: Fri, 27 Jul 2007 11:40:24 +0200 Subject: [quake3] Problem with invoking Q3 In-Reply-To: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> References: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> Message-ID: <200707271140.25298.ludwig.nussel@suse.de> S h i v wrote: > I have built ioquake3 from the source on Solaris Express (OpenSolaris based) > and then copied the pk3 files from the OpenArena 0.7 download. > Now on invoking the executable ioquake3.i386 I get an error say checksum for > pak0.pk3 failed. I have reproduced the text below. The baseq3 directory is reserved for the actual Quake3: Arena. Put openarena in the baseoa directory where it belongs and start ioquake3 with +set fs_game baseoa. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) From shivakumar.gn at gmail.com Sat Jul 28 02:29:42 2007 From: shivakumar.gn at gmail.com (S h i v ) Date: Sat, 28 Jul 2007 11:59:42 +0530 Subject: [quake3] Problem with invoking Q3 In-Reply-To: <46A9BC2F.7020700@gmx.net> References: <319ee2b10707261955p3dea3edeyf4b3ded712a2195c@mail.gmail.com> <46A9BC2F.7020700@gmx.net> Message-ID: <319ee2b10707272329ye4f046ej5d6c27c830741fe0@mail.gmail.com> Hi Dirk,Ludwig, Thanks for your inputs. I managed to build openarena. The openarena source download had a sub-dir missing that I picked from ioquake3 based on the diff provided and the build work. Now there is problem with OpenGL when I try running it(with ioquake3 as well). It seems that hardware acceleration for the graphics is required for Q3. I am using Solaris Express on VMware and the virtualization environments (VMware,Xen,etc) currently do not support hardware acceleration. Currently I am running Solaris Express on VMware. Will verify it on another box where it is natively installed. thanks & best regards Shiv On 7/27/07, Dirk wrote: > > Get the Open Arena source code. They have made some small changes like a > different master server and a different name for the base dir (baseoa > instead of baseq3). They also removed the CD-key check. > > I've attached the patch from their 0.6.0 release. It should still work > with current ioq3 and the 0.7.0 release of OA. Their changes are very > brief. You'll see. > > And make sure you annoy them until they add your Solaris binary to their > download section. > > Dirk > > > S h i v wrote: > > Hi All, > > > > I have built ioquake3 from the source on Solaris Express (OpenSolaris > based) > > and then copied the pk3 files from the OpenArena 0.7 download. > > Now on invoking the executable ioquake3.i386 I get an error say checksum > for > > pak0.pk3 failed. I have reproduced the text below. > > > > How do I solve this problem? (the OpenArena download itself is fine, I > > verified this on windows side by actually playing a game) > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------ > > > > 1.33_SVN1120M solaris-i386 Jul 27 2007 > > ----- FS_Startup ----- > > Current search path: > > /export/home/pkguser/.q3a/baseq3 > > ./baseq3/pak6-misc.pk3 (191 files) > > ./baseq3/pak5-TA.pk3 (11 files) > > ./baseq3/pak4-textures.pk3 (1496 files) > > ./baseq3/pak3- music.pk3 (9 files) > > ./baseq3/pak2-players.pk3 (620 files) > > ./baseq3/pak2-players-mature.pk3 (171 files) > > ./baseq3/pak1-maps.pk3 (73 files) > > ./baseq3/pak0.pk3 (926 files) > > ./baseq3 > > > > ---------------------- > > 3497 files in pk3 files > > > > ************************************************** > > WARNING: pak0.pk3 is present but its checksum (1954366289) > > is not correct. Please re-install the point release > > ************************************************** > > > > Point Release files are missing. Please > > re-install the 1.32 point release. > > > > Also check that your Q3 executable is in > > the correct place and that every file > > in the baseq3 directory is present and readable. > > Sys_Error: > > *** you need to install Quake III Arena in order to play *** > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------ > > > > > regards > > Shiv > > > > > > --- > To unsubscribe, send a blank email to quake3-unsubscribe at icculus.org > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: