What's new

CHIP8 DrawSprite

OP
K

Kevin19

New member
I do not know how that is relating to anything but i just increased the size of the stack to 40 and it seems to work much better now
The weird thing is that when i positioned the stack array somewhere else in the program as under all the other variables for example the stack started to act weirdly and gave very improbable numbers I think it is something with the compiler I use borland 5.2
 

zenogais

New member
I might recommend familiarizing yourself more with C/C++ and then reading through the Chip8 documentation again, because alot of these problems seem to stem from lack of familiarity with the language or the system you're emulating.
 
Last edited:
OP
K

Kevin19

New member
I have an experience of 3.5 years in the field of C programming which was upgraded from JAVA
and also as i have already said an experience of 2 years in the field of assembly
I think that is enough of familiarity with the language

I have read enough of the chip8 documentation

And I do not know if you took note of my antecedental post but i already finished coding it and everything seems to be working beautifully except for the slow input part and The array problem probably originated from wrong option settings
Which this primitive Borland 5.2 does not let me revise now
But my project has already come to its end
And I thank you all for being helpful
Haha
 

refraction

PCSX2 Coder
For the input system on Neochip8 the way i worked it was to have the keys mapped as a boolean Array of 15 slots, and when you press the key on the keyboard, it sets the corresponding slot (in terms of the chip8 key) in the array to true, then when you take your finger off it, it sets it to false again.

it seems to work pretty well anyway, having it as a single variable i found you couldnt jump forward or anything like that in ant, so it made it kinda impossible to play.

also its best to make the delay registers much slower than the opcode loop cycle, this makes games like invaders much more playable, you can get passed level 1 then :evil:
 
OP
K

Kevin19

New member
I just used port 60h to get a more accurate input
And your method just does not seem to work very well
Or at least on my emulator
I set the array and all and It seems like it will not accept true alone
It must have a condition which verifies Its value

Anyway STill thank you for your help

I think i will move on to the next emulator

Gameboy or SNES
I am not sure which one i am going to choose at the moment
Hopefully neither one of them will be this 8chip like primitive

I also considered to use Visual C++ But I think i would rather make everything
from scratch

so Anyway Goodnight everyone and once again thank you for your help
 

Doomulation

?????????????????????????
By leaving a work unfinished and moving on, truly you will learn nothing.
But, really now, if you are as experienced as you say you are, then write a debugger for your emulator and you'll probably be able to solve MANY problems on your own.
 

zenogais

New member
I don't mean to be rude. But if you can't finish a Chip8 emulator, than a Gameboy/SNES emulator will leave you completely confused. Personally, I think you should stick with Chip8, because Gameboy and SNES are I would say 5x more complex than the Chip8.
 

refraction

PCSX2 Coder
I also considered to use Visual C++ But I think i would rather make everything from scratch


id consider that harder if i was you, doing stuff in asm (if you are) your making your life extremely difficult, use something of a higher level like Visual C++ to get to grips with how it all works and how to emulate it before diving in with stuff like that. When you master Chip8 in that try something like GameBoy which is about the next step up in emulation, unless you can emulate a machine like the Commadore 64 or ZX Spectrum which are kind of on a par, but the system is a bit more complicated as they were computers and not consoles.

So do a chip8 emu in Visual C++, get it totally working, then try a GB one when and ONLY when your chip8 one is finished, else your gonna just get stuck not knowing what to do.
 
OP
K

Kevin19

New member
I truly thank you all for helping me but i have already finished The input system and I just got on and forgot to inform you

So I am sorry for troubling you

and zenogais I am sorry for being rude to you and thinking of you as a nuisance But you really were being very impolite to me at first and jumped to conclusions which really did irk me based on such small knowledge of me

I do not know which one of us was wrong but i am truly sorry for anything offensive which i said to you

I really should thank you for even bothering to take a few seconds of your life to answer any of my posts

And refraction you have been tremendously helpful
Which I would like to thank you for it
Your methods could not really be of any use for me because we are both programming on different environments I am a bit obsessive because i like doing things from scratch without consulting with other people And Visual c++ really everything comes on a golden platter so to speak

I am sorry if i sound a bit pompous

and doomulation yes at some point i wanted to leave it unfinished and move on to the next project because it really looked very insignificant

I mean come on it is only chip8 ARE WE A BUNCH OF newbies working with such primitive hardware

But i really gave a lot of thought about this issue and decided to try again till i successfully managed to complete it and i just got to get online and inform you of this

I am also sorry if my sentences may be blessed with the run-on-sentence feature and totally lacking punctuation


ONCE AGAIN THANK YOU ALL FOR BEING SUCH GREAT HELP
 

Doomulation

?????????????????????????
Kevin19 said:
and doomulation yes at some point i wanted to leave it unfinished and move on to the next project because it really looked very insignificant

I mean come on it is only chip8 ARE WE A BUNCH OF newbies working with such primitive hardware
You're missing the point. We do this because it's FUN. It does not matter WHAT system it is. It does not matter how HARD it is to emulate. We do it because it's fun. And even though chip8 is very primitive, it is a system nevertheless, and a good start to introduction of emulator programming.

Believe it or not, we had a lot of troubles to get perfect emulation on the games. Now, it was good training to solve these problems and make it work correctly.
This is truly something you need for bigger emulation projects.

Now believe me, because I'm working on a GB emulator, and even though it's "primitive," it got over 100 opcodes and is damn complex rather than a chip8 system.
 
OP
K

Kevin19

New member
Yes the is true it is good introduction to the fascinating mysterious world of emulation programming

I just myself started to work on the 6502

THE Z80 is a killer too
But I do not know the gameboy is not all that

I wanted to choose the commodore for my next project because unlike what we are dealing with here this is the real deal a real computer but i chose the 6502 the nes is far more interesting

I am sure you probably are almost done coding it but even thought if you still have not and to all the other people out there who are interesting in learning more about the gameboy

here is an informative reference

http://www.enliten.force9.co.uk/
 
OP
K

Kevin19

New member
Yes it does but i already decided to try the 6502 for my next project

It was more popular and known in the 80s than the z80
 

Doomulation

?????????????????????????
Nice site. Unfortunaly, the tutorials are not in C code. I could see asm, and some other but none really helps. Remember: a lot of people don't even know assembly.
It would be very nice if you could provide C code sample. And even better, a walkthrough in the tutorials describing how to do in step-by-step.
 
OP
K

Kevin19

New member
You are talking about actual tutorials that describe how to emulate a system

I am sorry But i do not have any
I posted that link so maybe you could find some useful information in case you needed any for your gameboy emulator
 

refraction

PCSX2 Coder
wel the site had opcode hex's and system information, the rest you should be able to work out on your own :) remember icarus developers didnt even have the opcodes when they started
 
OP
K

Kevin19

New member
refraction said:
wel the site had opcode hex's and system information, the rest you should be able to work out on your own :) remember icarus developers didnt even have the opcodes when they started

That is exactly the way i work by

Gathering all the information on the system myself and then i start putting it all together

So what systems have you emulated yet If you do not mind i ask
 

Top