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
 
Thread Tools Display Modes
Old April 27th, 2012, 18:27   #1
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Lightbulb Need help with Chip8 emu.

Well after a bit of encouragement, I managed to start coding a chip 8 emu. Can someone help me debug this code. I don't see anything on the console window. Normally there is Illegal opcode:XXXX Help me. Also can someone help me with how I can do graphics?
Attached Files
File Type: rar Chip8.rar (39.0 KB, 3 views)
Crckr hckr is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old April 28th, 2012, 17:02   #2
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Fixed a lot of code.

See attachment
Attached Files
File Type: rar Chip8.rar (40.6 KB, 6 views)
Crckr hckr is offline   Reply With Quote
Old April 28th, 2012, 17:19   #3
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
Well, what are you expecting to see in the console window? I don't see you output anything but errors and a "BEEP!" notification.

If there is nothing wrong with the code, then it shouldn't throw any of those errors around.

As for graphics, what platform are you working on specifically? The current codes are very generic.
runawayprisoner is offline   Reply With Quote
Old April 28th, 2012, 20:13   #4
KrossX
クロッスエクス
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 3,645
Some background thread on this: http://forums.pcsx2.net/Thread-Need-...-output-openGL

And some thread for the OP to check: http://forums.ngemu.com/showthread.php?t=114578
__________________

KrossX is online now   Reply With Quote
Old April 29th, 2012, 16:31   #5
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Graphics

Well, I am on windows and using codeblocks. Can someone tell me how I can create a text based graphics output to the console. So it would then output a * for 1. How do I output my graphics array and output it?
Crckr hckr is offline   Reply With Quote
Old April 29th, 2012, 18:38   #6
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
Well, if you output text as graphics for Chip-8, trust me, it'll be very messy... and annoying to deal with.

For one, you'll need exactly 64 x 32 rows on the screen.

But if you are fixated on that, some printf functions will do. Or alternatively, you can also use C++ with cout, which has nicer readability.
runawayprisoner is offline   Reply With Quote
Old April 30th, 2012, 14:42   #7
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
See my code, Is my code right? Give me some better code for cout or printf().
Crckr hckr is offline   Reply With Quote
Old April 30th, 2012, 18:25   #8
KrossX
クロッスエクス
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 3,645
"Give me some better code" ? Code something yourself first. Since if you cannot do text output to a console...
__________________

KrossX is online now   Reply With Quote
Old April 30th, 2012, 20:29   #9
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Quote:
Originally Posted by KrossX View Post
"Give me some better code" ? Code something yourself first. Since if you cannot do text output to a console...
Ow, I know that. But my problem is how can I instead of 1s and 0s use * and blank spaces. Also can I update the screen, without it scrolling down. It's just not right~}!
Attached Images
File Type: png bnjdsa.PNG (224.0 KB, 13 views)
File Type: png chip.PNG (226.7 KB, 10 views)
File Type: png chipz.PNG (222.5 KB, 9 views)
Crckr hckr is offline   Reply With Quote
Old May 7th, 2012, 19:17   #10
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Cool Update

Well, hell yeah. I now have a working CPU core. Some screenshots attached and
source code as well.
Attached Images
File Type: png tetris.PNG (14.8 KB, 6 views)
File Type: png INVADERS.PNG (16.3 KB, 7 views)
Attached Files
File Type: rar Chip8.rar (42.1 KB, 3 views)
Crckr hckr is offline   Reply With Quote
Old May 7th, 2012, 20:04   #11
ShendoXT
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,547
Cool , nice going
Btw, any reason for switching between Win 7 and XP?
__________________
Shendo's software blog

Core i5 2400 3.1 Ghz | ASRock H67M | GTX460 768Mb | 8GB DDR3 1333 | 1500 Gb HDD
Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64

Don't PM or ask me about VMP-MCR conversions. I will ignore you if you do.
ShendoXT is offline   Reply With Quote
Old May 8th, 2012, 14:45   #12
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Quote:
Originally Posted by ShendoXT View Post
Cool , nice going
Thanks and Well yeah, taking into consideration I am still a 14 year old...
Quote:
Originally Posted by ShendoXT View Post
Btw, any reason for switching between Win 7 and XP?
I have a laptop with 7 and a desktop with xp, my laptop screen gives me headaches.
Crckr hckr is offline   Reply With Quote
Old May 9th, 2012, 03:04   #13
Bill_gates
Linux's worst nightmare..
 
Bill_gates's Avatar
 
Join Date: Feb 2004
Location: USA
Posts: 1,505
glad you managed to figure things out!
__________________
OS: WinXP Professional Service Pack 3
CPU: Intel pentium 4 3.0GHz
Video: Nvidia Geforce 8400GS
Sound: ASUS Xonar DS 7.1 Channels 24-bit 192KHz PCI Interface Audio Card
Memory: 512 MB
HD: [C:] 140.36/449.09 GB
Connection: Marvell Yukon 88E8053 PCI-E Gigabit Ethernet Controller
Bill_gates is offline   Reply With Quote
Old May 9th, 2012, 19:00   #14
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Any good and easy SDL tutorials?
Crckr hckr is offline   Reply With Quote
Old May 13th, 2012, 00:50   #15
Purkinje
Squire
 
Purkinje's Avatar
 
Join Date: Sep 2009
Location: Ivalice
Posts: 105
Quote:
Originally Posted by Crckr hckr View Post
Any good and easy SDL tutorials?
http://www.sdltutorials.com/
__________________
[CENTER]
Purkinje is offline   Reply With Quote
Old May 13th, 2012, 08:49   #16
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Well, I did the graphics and input, Thanks anyway.
Crckr hckr is offline   Reply With Quote
Old May 13th, 2012, 14:46   #17
Crckr hckr
Registered User
 
Join Date: Nov 2010
Location: Kenya
Posts: 13
Well, here if you can test it. See attachment, also see:
http://emucodeblog.blogspot.com/ and
www.youtube.com/user/CrckrHckr
Thanks, Crckr.
Attached Files
File Type: rar CrckrChip8.rar (138.7 KB, 1 views)
Crckr hckr 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

Forum Jump

All times are GMT +1. The time now is 01:00.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.