Search found 9 matches

by Atenus
Thu Nov 23, 2006 1:54 pm
Forum: PSP Development
Topic: z80 emulator flags
Replies: 20
Views: 6064

i put the a<<0 for concept completeness ups!! i was wrong when i said "the (a << 0) can be removed ", maybe a should say that you can remove the "<< 0" shif left 0 to a and live only "a". Talking about asm/c/c++ code, you can use all c bitwise operations and you dont n...
by Atenus
Thu Nov 23, 2006 10:32 am
Forum: PSP Development
Topic: z80 emulator flags
Replies: 20
Views: 6064

will this work: byte R; // the flag register int a,b,c,d,e,f,g,h; //h being bit 7 and a as bit 0 #define MKFLAG&#40;&#41; R = &#40;h<<7|g<<6|f<<5|e<<4|d<<3|c<<2|b<<1|a<<0&#41; yep in will work, but if you take as a constant that your emulator will store in int flags always 1 or 0. th...
by Atenus
Wed Nov 22, 2006 5:25 pm
Forum: PSP Development
Topic: z80 emulator flags
Replies: 20
Views: 6064

Bah. I dont know the difference between reoply and edit. Read on ... Sorry, i writed the post on the fly and i tried to change 2 things in my first reply, so that could explain the collition. So, taking into account that i will add/correct here to myself: Correction: The lookup table generation cod...
by Atenus
Wed Nov 22, 2006 8:04 am
Forum: PSP Development
Topic: z80 emulator flags
Replies: 20
Views: 6064

C allows you to define a struct with bit fields (see http://www.google.com/search?q=struct+bit+fields ), with which you could represent all flags with one byte and set a bit with one assignment, without if's or shift's, but I have never used it and I don't know if GCC optimize it with fast MIPS ins...
by Atenus
Wed Nov 22, 2006 7:35 am
Forum: PSP Development
Topic: z80 emulator flags
Replies: 20
Views: 6064

i know nearly nothing bout the z80 (i made a 6502 emulator) and since it is a 8 bit cpu the best way i think is as you said use a plain "int" for each flag, and have a "byte" (usigned char) for the emulating the flag register itself. case 1: Only one variable (byte). Suppouse you...
by Atenus
Tue Nov 21, 2006 10:31 am
Forum: PSP Development
Topic: vram direct access and pitch
Replies: 2
Views: 1300

thanks a lot
by Atenus
Tue Nov 21, 2006 7:35 am
Forum: PSP Development
Topic: vram direct access and pitch
Replies: 2
Views: 1300

vram direct access and pitch

im accessing vram directly thrugh 0x44000000, but the problem is that i dont know the pitch, so supouse i want to make a code to fill all screen with an RGB color: sceDisplaySetMode&#40;0, 480, 272&#41;; int * p_vram = &#40;int *&#41; 0x44000000; sceDisplaySetFrameBuf&#40;&#4...
by Atenus
Sun Nov 05, 2006 8:06 pm
Forum: PSP Development
Topic: GU sceXXX() tutorial?
Replies: 3
Views: 2238

thanks for the advice, im thinking now to start with "pspgl" for simplicity, anyway there is a question: is pspgl fast for making a Ninentdo (8 Bit) emulator? i mean the rendering graphics part of course :) .
by Atenus
Sun Nov 05, 2006 7:07 pm
Forum: PSP Development
Topic: GU sceXXX() tutorial?
Replies: 3
Views: 2238

GU sceXXX() tutorial?

Hi im new and im wondering if there is a tutorial or something similar to the kernel GU calls, i need using kernel calls cos i need fast rendering, or perhaps a code/lib? I have been searching the inet for a thing like that and no answers. I only want to know if there is something so i dont spent a ...