Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read

WON'T YOU JOIN US?
You are not a registered member and
are viewing this site as a guest.
Registration is simple and FREE.
Join this CrowdGather community today.
Registration offers the following perks:

» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging

join

Reply
 
LinkBack Thread Tools Display Modes
Old March 26th, 2008   #1 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,207
Chip-8 emu

Updated November 22 2008:

All Chip8/Schip opcodes supported along with the sound.
There are still some issues which I may iron out if I decide to mess with this again.

Controls are:
1 2 3 4
Q W E R
A S D F
Z/Y X C V (Y for those who use QWERTZ keyboards).

Games are public domain so use Google to find them.
Attached Images
File Type: png blinky.png (20.3 KB, 23 views)
File Type: png blitz1.png (18.7 KB, 12 views)
File Type: png blitz2.png (18.6 KB, 12 views)
File Type: png brix.png (34.1 KB, 12 views)
File Type: png pong.png (23.6 KB, 8 views)
File Type: png debug.png (39.6 KB, 288 views)
Attached Files
File Type: zip Chip-8 emulator.zip (9.3 KB, 26 views)
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Razer DeathAdder | Logitech G15 | Windows 7 x64

Last edited by ShendoXT; November 22nd, 2008 at 14:43..
ShendoXT is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old March 26th, 2008   #2 (permalink)
Menthol Flavored
 
TheCloudOfSmoke's Avatar
 
Join Date: Mar 2005
Location: Maryland, USA.
Posts: 3,843
Best of luck with your emulation projects. It's good to see more aspiring emu authors out there. It gives me hope for the scene. I hope to see a really awesome emu from you one day Shendo. Good luck. Sorry if my post didn't help you whatsoever.
__________________
http://thecloudofsmoke.deviantart.com

Quote:
Originally Posted by BigIg View Post
If I support the game company, then I won't won't be supporting the blank DVD business.

Decisions, decisions.

TheCloudOfSmoke is offline   Reply With Quote
Old March 26th, 2008   #3 (permalink)
Emu author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,638
Okay, there's not much out there related to emulating sound and you'll soon find out the google is not your friend on this subject. I'll do my best to answer your question.

1. Before learning about sound emulation, it's highly recommended that you learn about how sound works (if you don't know already). First learn a low-level sound API such as DirectSound, OpenAL or XAudio (which is still in beta stages) and create some sound programs that can output sound by sending some raw data to a sound buffer. DirectSound is so far the most prominent while sound emulation with OpenAL is rather hard and XAudio... I don't know because I haven't seen it used for anything yet. Finding tutorials on low level sound APIs are very hard to find (except OpenAL which is more for 3D games) and once again Google might not be your friend on this subject. If you want you can either read the docs on the sound API such as the microsoft SDK documentation or MSDN. If you need tutorials on DirectSound, ask me and I will write them for you personally.

2. As far as tutorials on how to emulate sound, this is the best I can find to date: Blargg's Video Game Sound Emulation
Here's another: How to write an emulator It's an overall tutorial on emulation, but the sound emulation section is the largest and it shows some actual DirectSound code being used.

3. Be sure to have the documentation on the sound hardware you're trying to emulate!

4. I'm not sure how far indepth you want to get with sound emulation, but let me tell you this, emulating sound [usually] gets harder and harder as the console gets more advanced VERY quickly (sometimes more then the CPU itself). While GameBoy, SpaceInvaders, and NES usually aren't so bad, other old consoles such as Atari2600 and SNES have certain issues to be dealt with (for Atari usually has to deal with Pitfall II, for SNES the DSP) in order to get accurate emulation. The newer consoles and arcade hardware such as SegaSaturn/Titan Video, GC, PS2 have very advanced audio systems with either more than one core or advanced and undocumented DSPs. Instead of using basic PSG or FM based audio chips that generate simple waveforms (i.e. sin and cos for wave generation), these are APUs that create more complex audio effects and uses more complex methods (i.e. envelopes, KON/KOF, attack - sustain - decay rates, etc.). So far the most complex audio system I've seen [actual] specs on to date is Xbox1 with(at least 3 DSPs, an AC'97 Audio codec, and an NVIDIA SoundStorm APU. I know that PS3's audio system is the most advanced (where every object can have it's own sound channel!), but I don't think you'll be trying to emulate anytime soon (or even in your lifetime) Anyone can feel free to correct me if I'm wrong about any of this.

So if you need anything else, feel free to ask me anytime. Know this, I don't know everything

And about your emulator, what APIs are you using? btw, nice debugger! Looking great!
__________________

[Sagat] Windows XP x64 Pro | AMD Athlon 3000+ (~2.0GHz) | NVIDIA GeForce 6600 PCI-E | Realtek AC97 Audio | 512MB Ram | NVIDIA NForce 4-4X chipset | Seagate HDD 160GB | LG 8614 DVD-ROM | HP DVD 1040d CD/DVD -/+ RW w/ LightScribe
[Raylene] HP dv2000 | Windows Vista Home Premium | Intel Core2 Duo @2.2GHz | NVIDIA GeForce 8400 GS 128Mb (Dedicated) + 1264Mb (Shared) | 3GB Ram | 220GB HDD


GeneralEmu - December 27, 2005 and beyond!
Shogun3D Interactive (I try to update it every day now)
Shogun's Cxbx Dev Blog

Last edited by blueshogun96; March 26th, 2008 at 06:42.. Reason: Added more information that might be useful, informative, or overall educational for that matter.
blueshogun96 is offline   Reply With Quote
Old March 26th, 2008   #4 (permalink)
Registered User
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Smewhere
Posts: 10,610
well direct sound is not supported in Vista...only XP downwords..stick with OpenAL
__________________
There are only 10 types of people in the world who understand binary, the ones that do and the ones that don't.
Phil is offline   Reply With Quote
Old March 26th, 2008   #5 (permalink)
Emu author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,638
Quote:
Originally Posted by Phil View Post
well direct sound is not supported in Vista...only XP downwords..stick with OpenAL
Yes it is. DirectSound only can be used in software mode, but it still works just fine. EAX support has been resurrected but only for the Creative Audigy users. I wouldn't recommend using OpenAL for sound emulation for beginners because it's harder for beginners to grasp it.
__________________

[Sagat] Windows XP x64 Pro | AMD Athlon 3000+ (~2.0GHz) | NVIDIA GeForce 6600 PCI-E | Realtek AC97 Audio | 512MB Ram | NVIDIA NForce 4-4X chipset | Seagate HDD 160GB | LG 8614 DVD-ROM | HP DVD 1040d CD/DVD -/+ RW w/ LightScribe
[Raylene] HP dv2000 | Windows Vista Home Premium | Intel Core2 Duo @2.2GHz | NVIDIA GeForce 8400 GS 128Mb (Dedicated) + 1264Mb (Shared) | 3GB Ram | 220GB HDD


GeneralEmu - December 27, 2005 and beyond!
Shogun3D Interactive (I try to update it every day now)
Shogun's Cxbx Dev Blog
blueshogun96 is offline   Reply With Quote
Old March 26th, 2008   #6 (permalink)
Registered User
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Smewhere
Posts: 10,610
that's what i meant. A card using directsound will have to run on software mode...which sucks as i was going to get the Auzentech Prelude specifically for it's hardware mode...I still might get it....just waiting till Auzentech sorts out Creative's drivers
__________________
There are only 10 types of people in the world who understand binary, the ones that do and the ones that don't.
Phil is offline   Reply With Quote
Old March 26th, 2008   #7 (permalink)
Emu author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,638
But for emulation it's not too critical, unless the hardware you're trying to emulate uses features that can only be emulated in hardware (which so far no situation like that has come up yet afaik). Besides, using low-level DirectSound is still great for beginners to learn because the APIs and interfaces are usually self explanatory.
__________________

[Sagat] Windows XP x64 Pro | AMD Athlon 3000+ (~2.0GHz) | NVIDIA GeForce 6600 PCI-E | Realtek AC97 Audio | 512MB Ram | NVIDIA NForce 4-4X chipset | Seagate HDD 160GB | LG 8614 DVD-ROM | HP DVD 1040d CD/DVD -/+ RW w/ LightScribe
[Raylene] HP dv2000 | Windows Vista Home Premium | Intel Core2 Duo @2.2GHz | NVIDIA GeForce 8400 GS 128Mb (Dedicated) + 1264Mb (Shared) | 3GB Ram | 220GB HDD


GeneralEmu - December 27, 2005 and beyond!
Shogun3D Interactive (I try to update it every day now)
Shogun's Cxbx Dev Blog
blueshogun96 is offline   Reply With Quote
Old March 26th, 2008   #8 (permalink)
Registered User
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Smewhere
Posts: 10,610
you have a point...
__________________
There are only 10 types of people in the world who understand binary, the ones that do and the ones that don't.
Phil is offline   Reply With Quote
Old March 26th, 2008   #9 (permalink)
Crazy GFX coder
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Dominican Republic/Austria
Posts: 2,715
Looks like you progressed well since last time we talked about it

Directsound should be fine to reproduce the sounds and it works with Vista. i don´t know if you worked with directsound before.... but i think it shouldn´t be a problem for you
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6
@ruantec is offline   Reply With Quote
Old March 26th, 2008   #10 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
when i first made a chip8 emu with sound, i basically sent a load of rubbish in to the SDL buffer, but it made random buzzes, as the original system only had a buzzer, so it was no need to be impressive

altho my current (newest) one isnt quite as advanced as yours, it works pretty well, you can see it here with games and source ;p
RefChip8 - Chip8 Emulator
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 26th, 2008   #11 (permalink)
Registered User
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Smewhere
Posts: 10,610
Ref i love the deflicker system.
Nice (if basic) emu though
__________________
There are only 10 types of people in the world who understand binary, the ones that do and the ones that don't.
Phil is offline   Reply With Quote
Old March 26th, 2008   #12 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,207
@TheCloudOfSmoke: Thanks. Though it will take a lot of time before/if I even make something that can be measured with other emulators.

@blueshogun96: Thank you for the links, I'll check them out.
As for API it's GDI+. That probably is not suited for emulation but in this case I think it's ok.

@@ruantec-Man: Yeah I got rid of the most graphic glitches.

@refraction: Nice emu.
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Razer DeathAdder | Logitech G15 | Windows 7 x64
ShendoXT is offline   Reply With Quote
Old March 26th, 2008   #13 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by Phil View Post
Ref i love the deflicker system.
Nice (if basic) emu though
cheap as hell but i worked Chip8 is very simplistic, so it uses 1 frame to draw the sprites, then the next to clear them, then the next to draw them in the new location, etc.

Quote:
Originally Posted by Shendo View Post
@refraction: Nice emu.

thanks, i know its nothing special, but i literally threw it together for an australian magazine thingy, so budding authors have something to go off. But if it helps with your emu thats all that matters
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 26th, 2008   #14 (permalink)
Crazy GFX coder
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Dominican Republic/Austria
Posts: 2,715
Quote:
Originally Posted by refraction View Post
cheap as hell but i worked Chip8 is very simplistic, so it uses 1 frame to draw the sprites, then the next to clear them, then the next to draw them in the new location, etc.




thanks, i know its nothing special, but i literally threw it together for an australian magazine thingy, so budding authors have something to go off. But if it helps with your emu thats all that matters
i think we shouldn´t understimate a Chip8 emulator........ indeed is nothing special(in comparation to emulators for consoles etc) but if you think what we learn from it then you will realize is actually very special because most of us started with a chip8 emulator that help us get the idea how emulation works.
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6
@ruantec is offline   Reply With Quote
Old March 26th, 2008   #15 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by @ruantec-Man View Post
i think we shouldn´t understimate a Chip8 emulator........ indeed is nothing special(in comparation to emulators for consoles etc) but if you think what we learn from it then you will realize is actually very special because most of us started with a chip8 emulator that help us get the idea how emulation works.
that was the whole concept i worked on

i did intend on commenting it more but i couldnt be arsed lol. But the idea was keep it reasonably simple so people can work out for themselves how the emulator actually works.

can you see the copy and pasta from sdl tutorials? *hides*
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 26th, 2008   #16 (permalink)
Crazy GFX coder
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Dominican Republic/Austria
Posts: 2,715
"Copy and pasta" that was a good one anyways i think every chip8 emula8r is another step to a better emulation world

btw nice chip8 emu
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6
@ruantec is offline   Reply With Quote
Old March 27th, 2008   #17 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
thx ;p but really, i think it sucks it just does the job lol

ill appreciate it more if people learnt from it
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 27th, 2008   #18 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 4,042
cool emulators, i might try to make one for the learning experience as well. (well, thats after i become more familiar with c++ :/)


Shendo do you mind posting links to the documentation you used?
__________________

Quote:
Eccentricity is often associated with genius, giftedness, or creativity. The individual's eccentric behavior is perceived to be the outward expression of his or her unique intelligence or creative impulse. In this vein, the eccentric's habits are incomprehensible not because they are illogical or the result of madness, but because they stem from a mind so original that it cannot be conformed to societal norms.
check out my blog
cottonvibes is offline   Reply With Quote
Old March 27th, 2008   #19 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,207
Chip 8 instruction set
CHIP8 documentation by David Winter.

There is also a great thread at EmuTalk which contains a lot of information.
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Razer DeathAdder | Logitech G15 | Windows 7 x64
ShendoXT is offline   Reply With Quote
Old March 27th, 2008   #20 (permalink)
Emu author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,638
Quote:
Originally Posted by refraction View Post
thx ;p but really, i think it sucks it just does the job lol

ill appreciate it more if people learnt from it
Obviously you haven't seen my chip8 emulator. If you think yours was bad, mine was 100x worse! Remember ChipAint?
__________________

[Sagat] Windows XP x64 Pro | AMD Athlon 3000+ (~2.0GHz) | NVIDIA GeForce 6600 PCI-E | Realtek AC97 Audio | 512MB Ram | NVIDIA NForce 4-4X chipset | Seagate HDD 160GB | LG 8614 DVD-ROM | HP DVD 1040d CD/DVD -/+ RW w/ LightScribe
[Raylene] HP dv2000 | Windows Vista Home Premium | Intel Core2 Duo @2.2GHz | NVIDIA GeForce 8400 GS 128Mb (Dedicated) + 1264Mb (Shared) | 3GB Ram | 220GB HDD


GeneralEmu - December 27, 2005 and beyond!
Shogun3D Interactive (I try to update it every day now)
Shogun's Cxbx Dev Blog
blueshogun96 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 17:18.

© 2006 - 2008 Emu Forums | About Emu Forums | Advertising Opportunities | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5