Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Emulator Programming - Chip8 OPCODE help
#1
Okay so, besides being told to go read basic programming again (C and C++), I have finally coded about 30 opcodes, not all. Can someone help me with the rest of the code and help find any bugs. I know this is not perfect. But I have learned alot since I started and hey, I am learning. Rolleyes Oh yeah, and please tell me how I get output. File is in attachment. Thanks alot.


Attached Files
.rar   Chip8.rar (Size: 39,2 KB / Downloads: 88)
Reply

Sponsored links

#2
If we help you with the code that defeats the object in you learning to do it. Do it then if you have problems, come back.
[Image: ref_sig_anim.gif]
Like our Facebook Page and visit our Facebook Group!
Reply
#3
(04-20-2012, 08:46 PM)refraction Wrote: If we help you with the code that defeats the object in you learning to do it. Do it then if you have problems, come back.

I think You're right. But... Hey I reached this point by using various tutorials. Codeslinger, Goldroad and mainly the Multigesture.net, is that wrong? I'll finish the opcodes I can. And how hard is it to do graphics with SDL. I want to do that. And anyways, how bad is it till now? I am trying to learn SDL. My brain might explode.
Reply
#4
why? this the third thread on your lil chip8 lesson. how about merge and chatbox.

and about that topic... what we gonna say? learn it. simple math is clear i guess. now what you need to know howto use and implement as opcodes are bitwise operations. hope that wiki helps ya to understand how this works. Wink
Reply
#5
(04-21-2012, 12:56 AM)xstyla Wrote: why? this the third thread on your lil chip8 lesson. how about merge and chatbox.

and about that topic... what we gonna say? learn it. simple math is clear i guess. now what you need to know howto use and implement as opcodes are bitwise operations. hope that wiki helps ya to understand how this works. Wink

Sorry I am not an expert in forums and discussions. I do understand a bit about it, I want to do graphics now. I plan to use SDl, is that alone okay or I need to learn OpenGL as well?
Reply
#6
if you want this emulator to really work in a reasonable matter of time YOU DON'T WANNA DO GRAPHICS NOW!!!

first of all you want to code a console application that printf()s the full tetris game code on screen. this means a kind of pseudo assembly text where you can see what your interpreter is decoding. it's up to yours to design that debugger. the specs are virtual... so let it output however the f*ck you want nd can read it. as a good thought example it could be some generic output language. a simple "instruction, parameter1, parameter2, parameter3" would do. you have to be able to read it, but most of all you need to understand the code and at this very early stage see that you have a lot of unknown opcodes you need to understand and implement first.

you'll never see anything on screen if the interpreter doesn't know howto write to the screen cause you forgot to implement the opcode to let the machine add the pixel offset - for example.

got this? if not... go away and write the game in native code for windows.
Reply
#7
(04-21-2012, 11:29 AM)xstyla Wrote: if you want this emulator to really work in a reasonable matter of time YOU DON'T WANNA DO GRAPHICS NOW!!!

first of all you want to code a console application that printf()s the full tetris game code on screen. this means a kind of pseudo assembly text where you can see what your interpreter is decoding. it's up to yours to design that debugger. the specs are virtual... so let it output however the f*ck you want nd can read it. as a good thought example it could be some generic output language. a simple "instruction, parameter1, parameter2, parameter3" would do. you have to be able to read it, but most of all you need to understand the code and at this very early stage see that you have a lot of unknown opcodes you need to understand and implement first.

you'll never see anything on screen if the interpreter doesn't know howto write to the screen cause you forgot to implement the opcode to let the machine add the pixel offset - for example.

got this? if not... go away and write the game in native code for windows.

Well I don't get it, and have you even seen the code, I ain't no noob and I already have it to output, un(know)implemented codes. Seriously do you 'get' the question?
Reply
#8
Hey im sure you are learning this stuff fast, kudos for trying. Just dont expect too much faith here, it`s not that people dont want to encourage you i feel, it`s more like hey, this isnt easy, start at the bottom and work slowly. Remember, Pcsx2 is being worked on by lots of talented programmers for many many years. More than 20 programmers for over 10 years or more, and Pcsx2 is far from perfect. So take there advise on learning the most simple of stuff, and slowly expand your knowledge. just my friendly advise Happy
ROG Asus G74S laptop
Intel core i7 2670QM @2.2(3.1ghz turbo) Nvidia 3gig GTX560m 8 gigs DDr5 Blue-Ray Burner windows7 64 bit
[Image: r1gyld.jpg]
Reply
#9
(04-21-2012, 03:37 PM)omnikam Wrote: Hey im sure you are learning this stuff fast, kudos for trying. Just dont expect too much faith here, it`s not that people dont want to encourage you i feel, it`s more like hey, this isnt easy, start at the bottom and work slowly. Remember, Pcsx2 is being worked on by lots of talented programmers for many many years. More than 20 programmers for over 10 years or more, and Pcsx2 is far from perfect. So take there advise on learning the most simple of stuff, and slowly expand your knowledge. just my friendly advise Happy

Thanks and I am going at a slow steady pace, It's just that I have reached a roadblock and want help with graphics output. And there are many bugs in my code I know, gotta iron 'em first.
Reply
#10
I need help with implementing DXYN, please. Is there an easy way to do graphics, or can someone give me a tutorial.
Reply




Users browsing this thread: 1 Guest(s)