I'm writing a CHIP-8 emulator, and have a lot of questions.
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
Quote:
What's the best method for doing the graphics and sound?
SDL or switch to MS-DOS.
Quote:
What's the "sub-routine" and how do I implement it
you put the value of PC+sizeof(procedure-opcode) on the stack then incrment the stack pointer.
when you return, you deincrment the stack pointer and jump to the address at STACK + SP.
Quote:
How do I load a ROM file from the commandline like this:
main (int argc, char **argv){}
argv is a list of strings passed on the command line.
case 0xd:
/* Some sprite drawing! */
for (n = (opcode& 0x000f); n > 0; n--) {
len = 0;
PC = memory[I];
while (len <= 8) {
putpixel(screen, V[opcode& 0x0f00] + len, V[opcode& 0x00f0] + n, color1);
len++;
}
}
break;
How can I test if a color1 (white) pixel has replaced another white pixel? How can I wrap a sprite around to the other side of the screen if it's too long?
Fx33 - LD B, Vx
Store BCD representation of Vx in memory locations I, I+1, and I+2.
The interpreter takes the decimal value of Vx, and places the hundreds digit in memory at location in I, the tens digit at location I+1, and the ones digit at location I+2.
And I need to scale the entire surface (screen) by 10.
HeLLo
SoRRy for my post
I want to programming CHIP8 but I want someone explain to me how do that with c++ and sdl i tried before but i can't
please I want someone start and Explain it Line by line
I know CHIP8 instructions
I wait for your answer smeezekitty and Anikom15
thank you for your reply
what i want is how I write a CHIP8 Emulator like what are you doing now I want you tou explain to me each line for your program.i know how chip8 work and its component
I hope that does not hinder smeezekitty to help you
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
Quote:
Ok how do I implement this opcode:
Quote:
Fx33 - LD B, Vx
Store BCD representation of Vx in memory locations I, I+1, and I+2.
The interpreter takes the decimal value of Vx, and places the hundreds digit in memory at location in I, the tens digit at location I+1, and the ones digit at location I+2.
thank you for your reply
what i want is how I write a CHIP8 Emulator like what are you doing now I want you tou explain to me each line for your program.i know how chip8 work and its component
I hope that does not hinder smeezekitty to help you
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.