What's new

Chip 8

zenogais

New member
extro said:
looks interesting, how would that MoMtoR Method look like?


Thats an exercise best left up to the person making the dynarec, I give most of the necessary info in my tutorial. Its merely a matter of emitting the opcode and its parameters. Using the NASM or Intel documents you should be able to do that.
 

extro

New member
zenogais said:
Thats an exercise best left up to the person making the dynarec, I give most of the necessary info in my tutorial. Its merely a matter of emitting the opcode and its parameters. Using the NASM or Intel documents you should be able to do that.

I had a look a the dynarec stuff from pearpc (http://pearpc.sourceforge.net), which looks real nice. I think I got it now :)
 
Last edited:

extro

New member
@zenogais did you have a look at this pearpc stuff? It would be interesting how good the implementation of their dynarec stuff is.
 

Marce1991

Programmer
what is needed to make the 8 chip emu?e.g.
-cpu
-opcodes
And I'd need some help with directX, anyone knows a good tutorial except goldroad thx in advance
 

refraction

PCSX2 Coder
read the whole thread, everything you need is in this thread, i know theres a few pages, plus dont be lazy please, all is explained.
 

bcrew1375

New member
Good luck, Marce. Chip 8 is really easy to start with, hopefully it goes smooth. If you need help, we're here(or at least I am, I can't say for the other guys :p).
 

Falcon4ever

Plugin coder / Betatester
Marce1991 said:
what is needed to make the 8 chip emu?e.g.
-cpu
-opcodes
And I'd need some help with directX, anyone knows a good tutorial except goldroad thx in advance

I've seen several posts of you at this forum and actually i think you should do some win32 api programming first. Then if you want to learn dx try searching for "drunken hyena tutorial" which has one of the best dx/d3d tutorials.

the cpu/opcodes can easily be found here:
http://members.aol.com/autismuk/chip8/chip8def.htm
and that's all you need...

i did my chip8 in 5 days or smth...
20041204_chipv2.jpg
 

Doomulation

?????????????????????????
Directx isn't that hard especially if you cope the tutorials. I think it's actually easier than the stupid win32 api. But then again, I've never really used gdi...
 

Falcon4ever

Plugin coder / Betatester
Doomulation said:
Directx isn't that hard especially if you cope the tutorials. I think it's actually easier than the stupid win32 api. But then again, I've never really used gdi...

Drawing with win32api/GDI isn't hard at all just get a good book such as
"Charles Petzold - Programming Windows".

The only reason why i used directdraw instead of gdi is because i can draw using a back buffer (less flicker and you don't see pixels being set).
 

Doomulation

?????????????????????????
Programming with directx isn't that hard. Hell, there's even tutorials in the documentation! They work pretty good for a simple emu such as chip8 ;)
 

MarcelCe

New member
Hi

Hi.
I am trying to code an chip 8 interpreter in Java.
The probleme is that i have wrong timings in games..
I want to slow down the speed for example to just 1000 opcodes per second..
i dont get it right :( i tried gettickcount , but i dont know the right algo.

Maybe somebody has a tipp for me ? tnx.

:alien2:


P.S Is there a good way to eleminate the sprite flicker problem ?

Cya :bunny:
 

refraction

PCSX2 Coder
this is the kind of thing you need to slow it down

DWORD lt = GetTickCount();
for(;cpurunning
{
if(GetTickCount() - lt >= 1000/60)
{
lt=GetTickCount();
//execute 1 op here
}
}

(found that in another thread)

as for the flickering, the sprites are wiped every other frame, so maybe if you only drew every second frame to the screen, i spose in a way that would eliminate it...

it was an original problem for the chip8 system, so dont think its your fault :)
 

hap

New member
Did anyone have problems getting Spacefight to run correctly ?

The enemy sprites were not being properly redrawn here, and I've currently fixed that by adding a carry check in fX1e, as the game seems to expect the carry to be unset somewhere. But I don't know if this would be the correct solution. All other roms seem to work fine with or without it.
 

Doomulation

?????????????????????????
Refraction noticed that at least one game used some special algorithm to make the butterfly or whatever it was fly around the screen. Can't remember the name. Myself, I did not implemt this.
 

refraction

PCSX2 Coder
yeh i think i got it to work, goto www.zenogais.net and look at projects, the NeoChip8 emulator i worked on him with, got to probably about the stage you're at now with it before he finished it, but sources are there, check your carrys tho, they are a bit tricky
 

hap

New member
Doomulation: that would be 'Field'. it, and many other games, look nicer if you implement horizontal and vertical sprite wrapping. what i mean with this is that if you'd draw a 2 by 2 square at 127,63 (bottom right), it would show as 4 pixels; one in each corner of the screen. Blitz has problems with vertical wrapping though, so i've made wrapping optional here.

refraction: your emulator seems to have the same problem in spacefight i had: when you shoot an enemy, sometimes its sprite won't be deleted, and causes a mess on the screen, as well as gameplay problems.
 

refraction

PCSX2 Coder
hap said:
Doomulation: that would be 'Field'. it, and many other games, look nicer if you implement horizontal and vertical sprite wrapping. what i mean with this is that if you'd draw a 2 by 2 square at 127,63 (bottom right), it would show as 4 pixels; one in each corner of the screen. Blitz has problems with vertical wrapping though, so i've made wrapping optional here.

refraction: your emulator seems to have the same problem in spacefight i had: when you shoot an enemy, sometimes its sprite won't be deleted, and causes a mess on the screen, as well as gameplay problems.

hmm, lemme check my build, im sure mine worked, he must have killed it again ;p

edit: oic what you mean, when you kill them... very odd!, but ANT works, gotta be the best game on Schip8 ;p
 

Top