What's new

Chip 8

refraction

PCSX2 Coder
well then you have some problems somewhere, im sure UFO ran on mine without modulating, back on my text graphics chip8 emu every game ran fine except field without modulating the co-ordinates.

but apart from that problem your drawsprite looks fine.

Edit: UFO works fine here without it, heres the code for your drawsprite as i have it.

Code:
void DrawSprite()
{
	int j;
	int i;
	int plotX, plotY;
	char data;

	// If no collision, default VF to 0.
	V[0xF] = 0;
	plotX = V[opcode2];
	plotY = V[opcode3];
	for(j = 0; j < opcode4; j++)
	{
		data = romBuffer[Index + j];

		for (i = 0; i < 8; i++)
		{
			if ((data & (0x80 >> i)) != 0)
			{
				if (screenData[(((plotY + j) * 64) + ((plotX + i))] == 1)
					V[0xF] = 1;

				screenData[(((plotY + j) * 64) + ((plotX + i))] ^= 1;
			}
		}
	}
}

if that doesnt work, try modulating Y by 33 and X by 64. quite odd i know.. but for some reason i had that in the code o_O
 
Last edited:

bcrew1375

New member
Um, are you sure UFO works okay? How long did you play it? I let it run for a bit and eventually the lower sprite collided with the upper one and I got 225 points :p. The modulating by 33 seems to work except the paddles in PONG don't wrap correctly, and it also feels sort of like a 'quickfix'. :/ It just doesn't feel right if you make hacks for specific games :(. Thanks for those suggestions though. If you think of any others, please tell me. I'll see what else I can get it to do.
 

refraction

PCSX2 Coder
well i havent got some games (like field) to work any other way, like on field the bird flies to the top of the screen then it crashes, only other way i can think of doing it is say if the sprite goes out of the array range, dont draw it.
 

Doomulation

?????????????????????????
Why modulate them in the first place? Every game besides field seems to work fine without it. In field, the bird goes outside screen; but then you simply don't draw it.
There's also at least two fully working chip8 emus which source are posted at the forum.
 

vma

New member
Hi,

After reading this thread, I did my own VB6 Chip-8 Emu.

For that I used a C-Source from an ankown author, do understand how a Chip-8 virtual machine works.

In case anyone is interested in it, let me know.

The emu still has a few bugs, because of which a few games won't run properly.

When the emu is ready, I will make a small website and release it together with source code.

Cheers,
vma
 

Doomulation

?????????????????????????
Meh. I was hoping more n00bs would come asking "what did I do wrong?!" :p
Oh well, nice to see some new chip8 emulators, though.
 

extro

New member
Doomulation said:
Meh. I was hoping more n00bs would come asking "what did I do wrong?!" :p
Oh well, nice to see some new chip8 emulators, though.

Does somebody have an idea how to realize the sprite stuff in Java? thx.
 

glVertex3f

Crap Cracker
Doomulation said:
Meh. I was hoping more n00bs would come asking "what did I do wrong?!" :p
Oh well, nice to see some new chip8 emulators, though.

Lol they probably just went to my thread.. I asked mor questions than any noob ever would
:p
 

bcrew1375

New member
Congratulations on your emulators guys :happy:. Now why don't you upgrade to Gameboy? I'd love to help people write them(As long as you don't ask obvious, stupid questions :p). There is already a Gameboy thread on the list if you guys need some help.
 

zenogais

New member
Doomulation said:
Get J++ and write it as you normally would?

Horrible idea, J++ is outdated and non-standard. Have you even tried googling it? Because there are plenty of resources there, like this one.
 

Doomulation

?????????????????????????
Well, java sucks anyway.
Btw, has anyone encountered any game that actually uses the chip8->schip8 and back technique? According to the manual, when going from chip8 to schip8, all chip8 pixels will be doubled.
And scrolling using schip8 opcodes will be counted in half. So scrolling 3 pixels, will make it 1½ in chip8! Does anyone (have found?) have such a game? I wish to test it.
 

aprentice

Moderator
Dooomulation, what ever happened to the gameboy emu you and a team were working on it? Everyone in your team is pretending it never existed.
Just wondering hows the status, if its even alive..


Edit:

also, i havent worked on my chip8 emu for many months. But the last thing i did (about a few months ago) was a decompiler that decompiled chip8 roms to C code. I never did finish it, just decided to throw it out there for you guys as an idea :p
 
Last edited:

extro

New member
Doomulation said:
Well, java sucks anyway.

Well, it would say it depends on what you are going to do. I don't want to discuss about the programming language itself. But if you are going to do an emulator which runs on linux as well, java should be fine even for emulating the chip8. Anyway I'm not sure how to deal with the sprite stuff, should be possible in java as well. I will do some more research on it, but if someone did already something similiar, help will be appreciated.
 

aprentice

Moderator
extro said:
Well, it would say it depends on what you are going to do. I don't want to discuss about the programming language itself. But if you are going to do an emulator which runs on linux as well, java should be fine even for emulating the chip8. Anyway I'm not sure how to deal with the sprite stuff, should be possible in java as well. I will do some more research on it, but if someone did already something similiar, help will be appreciated.

its just a matter of figuring out how to plot pixels to the screen in java
 

Doomulation

?????????????????????????
aprentice said:
Dooomulation, what ever happened to the gameboy emu you and a team were working on it? Everyone in your team is pretending it never existed.
Just wondering hows the status, if its even alive..


Edit:

also, i havent worked on my chip8 emu for many months. But the last thing i did (about a few months ago) was a decompiler that decompiled chip8 roms to C code. I never did finish it, just decided to throw it out there for you guys as an idea :p
Ahh well, the rest of my crew just kinda died. Heh, I've been to lazy to work on it myself as well... I need ta get contact with them before anything can really be done about it :p
 

vma

New member
Hi guys,

After two busy weeks, I am back and I have the following questions:

My Visual Basic Chip-8 emu does also support Super Chip-8. However, comparing it with other emu's, I notice that some games act slightly different on my emu and I don't know why:

- Dragon 1 game, which looks like a fighting game: on my emu you can only kick, but not move the caracter - no idea why, as other games have no major controller problem

- Dragon 2 game, which looks like scramble but with an helicopter: when you crash, the game just goes on, while on an other emu a windows messagebox pops up saying "Game Over". How does one know that the game is over??? Is that an instruction or why is it not supported by the game itself?

For others: the source code is in my modest opinion very readable, so if you plan to program a Chip-8 emu in whatever language - just take a look at the code! If it runs in VB6, it must run properly in any other modern language.

Cheers,
vma
 

Doomulation

?????????????????????????
Vma, I have NO idea! :p
The game itself knows that it's game over and prints data on the screen to show it. Something is wrong in your ops (probably) and I don't know where. Maybe if you posted them.
 

vma

New member
Not with Dragon2! The Game does NOT show Game Over. This other Chip-8 Emu I have (can't remeber the name) will pop up a Windows Messagebox. I wonder how the autor knew that the game was over?

Cheers,
vma
 

Top