Doomulation
?????????????????????????
Well, as I think ector stated before, the gc is actually easier to emulate than the older systems (eg snes?). Meh, it doesn't matter.
I agree. I'm not an snes emu author, but sound on snes is hard to emulate correctly afaik. The only accurate snes emulator I know of is znes.Doomulation said:Snes, afaik, is awfully complicated.
I'd reccomend genesis first because its VERY hard to find sufficient (as well as accurate) documentation on the atari2600. I had the same idea (using OpenGL for an atari emulator) and let me tell you, it aint easy. I'm not trying to be discouraging at all because I'm sure you can do it but trying to emulate PitfallII is no walk in the park.I was thinking about Genesis or Atari2600
Yeah, I noticed that some of it's core operations were in the wrong places, emulating the wrong instructions at the wrong time. That is part of the reason why you are getting those errors.than the CrazyChip Debugger output is crap - and I've some other mistakes in the emulator (as I don't see anything on the screen).
v[0xF] = 0;
for(int row = 0; row < n; row++)
{
pixels = memory[i + row];
for(int pixel = 0; pixel < 8; pixel++)
{
if((pixels & (0x80 >> pixel)) != 0)
{
if(vid_mem[v[x] + pixel + ((v[y] + row) * 64)] == 1) v[0xF] = 1;
}
else vid_mem[v[x] + pixel + ((v[y] + row) * 64)] ^= 1;
}
}
for(int yb = 0; yb < 32; yb++)
for(int xb = 0; xb < 64; xb++)
if(vid_mem[xb + (yb * 64)] != 0)
putpixel(buffer, xb, yb, 0xFF);
else putpixel(buffer, xb, yb, 0x0);
stretch_blit(buffer, screen, 0, 0, 64, 32, 0, 0, 640, 480);
changing:
if((pixels & (0x80 >> pixel)) != 0)
{
if(vid_mem[v[x] + pixel + ((v[y] + row) * 64)] == 1) v[0xF] = 1;
}
else vid_mem[v[x] + pixel + ((v[y] + row) * 64)] ^= 1;
to:
if((pixels & (0x80 >> pixel)) != 0)
{
if(vid_mem[v[x] + pixel + ((v[y] + row) * 64)] == 1) v[0xF] = 1;
vid_mem[v[x] + pixel + ((v[y] + row) * 64)] ^= 1;
}
helps ?
memory = v[x] / 100;
memory[i + 1] = (v[x] % 100) / 10;
memory[i + 2] = v[x] % 10;
case 0x0:
v[x] = v[y];
break;
case 0x1:
v[x] |= v[y];
break;
case 0x2:
v[x] &= v[y];
break;
case 0x3:
v[x] ^= v[y];
break;
case 0x4:
v[0xF] = v[x] & 0x1;
v[x] += v[y];
break;
case 0x5:
if(v[x] >= v[y]) v[0xF] = 1;
else v[0xF] = 0;
v[x] -= v[y];
break;
case 0x6:
v[0xF] = v[x] & 0x1;
v[x] >>= 1;
break;
case 0x7:
if(v[y] >= v[x]) v[0xF] = 1;
else v[0xF] = 0;
v[x] = v[y] - v[x];
break;
case 0xE:
v[0xF] = (v[x] >> 7) & 0x1;
v[x] <<= 1;
break;
default:
break;
hap said:a carry is generated on overflow, so in this case it's something like v[0xf]=(v[x]+v[y])>0xff; or v[0xf]=(v[x]+v[y])>>8;