Emuforums.com

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


Reply
 
LinkBack Thread Tools Display Modes
Old June 1st, 2009   #181 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
Quote:
Originally Posted by runawayprisoner View Post
Actually, an erase happens only when a previously set bit is unset... or namely... if you had:

0001000

And later you have

0000000

Then that was an erase.

If you are looking for difference only then this is also a difference:

0000000

To

1001000

And of course that's only a normal drawing routine... things were only added.

See the issue? The games still "appear" right, but the collision flag will be iffy, and IIRC, one most obvious symptom would be that you start having afterimages or ghosts of old sprites whenever a collision occurs.
thats why I set it to look for the difference between OR and XOR

00000000 | 10010000 = 10010000
00000000 ^ 10010000 = 10010000

You could be right but I'm really not seeing a case where my way doesn't work. The only time there is a difference between OR and XOR is when XOR unsets a bit which would be an erase.

The ghosting problem was because when I calculated the result of the XOR it wasn't being written back to the gmem array properly. don't know what was wrong with the code that was writing it back but the code I'm using now is much simpler and works.
serge2k is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old June 1st, 2009   #182 (permalink)
Emu Author
 
Hatorijr's Avatar
 
Join Date: Dec 2004
Location: North Carolina
Posts: 374
your issue with blitz is a known and very crazy issue, see when you allow pixels to wrap around the screen, blitz has the game over bug because that game is known to draw below the screen for whatever strange reason, so you need to test for y being 32 i believe and if so, do not draw that line, should fix blitz and make it playable. whats happening is when it draws the level it draws part of it on the top of the screen where your play goes across and when it hits, you die.
Hatorijr is offline   Reply With Quote
Old June 1st, 2009   #183 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,207
Quote:
Originally Posted by serge2k View Post
thats why I set it to look for the difference between OR and XOR

00000000 | 10010000 = 10010000
00000000 ^ 10010000 = 10010000

You could be right but I'm really not seeing a case where my way doesn't work. The only time there is a difference between OR and XOR is when XOR unsets a bit which would be an erase.

The ghosting problem was because when I calculated the result of the XOR it wasn't being written back to the gmem array properly. don't know what was wrong with the code that was writing it back but the code I'm using now is much simpler and works.
Ah, sorry, I didn't see the OR condition.

On the other hand, I think you could just test for source == 1 and destin == 1 and you don't have to end up doing more logical operations (XOR and OR). Well, I guess that won't be such a hit to performance at this point, but just a note.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old June 1st, 2009   #184 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
Quote:
Originally Posted by runawayprisoner View Post
Ah, sorry, I didn't see the OR condition.
probably because at one point I had removed it for some reason.

Then I accidently used || isntead of |
serge2k is offline   Reply With Quote
Old June 1st, 2009   #185 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,207
Well, I think if it works then it's fine. I was just confused for a second. Sorry about that.

Anyway, sounds like you got most of everything done. Good job. I'll look forward to a release.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old June 3rd, 2009   #186 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
got my first schip8 game working, ALIEN.

The scroll down doesn't work though, problem in my drawing code (but only that particular piece of code)

I had a question for anyone who develops with C++/DirectX in VS2008. I was trying to show my emulator to a friend of mine from school (computer science ), it wouldn't start. What does he need in order to run it?

is there any way of modifying my program so it just includes everything it needs in the exe? I thought it would do this if I compiled it under the release configuration but apparently not...

edit:
found a few bugs (one of which was me overcomplicating things again)

ALIEN is now perfect I think.
CAR is too slow to be any fun but works.

I also noticed that my chip8 emulator has one problem, maze


well two actually blitz is still unplayable and it's still to slow or fast at times.

Last edited by serge2k; June 3rd, 2009 at 03:01..
serge2k is offline   Reply With Quote
Old June 3rd, 2009   #187 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,907
serge2k: most likely he needs the latest direct X runtime files:
Download details: DirectX End-User Runtime

lots of times commerical games provide the runtime installer on the cd/dvd the game comes with incase users are running older versions of DX.
after that if you don't have any other dependencies, the exe should be able to run on its own.
__________________

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 June 3rd, 2009   #188 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
yeah I thought that would be it but he said he had the latest directX

hm

is I wonder... is there a redistributable included with SDK or matched to the SDK.
serge2k is offline   Reply With Quote
Old June 3rd, 2009   #189 (permalink)
Emu Author
 
Hatorijr's Avatar
 
Join Date: Dec 2004
Location: North Carolina
Posts: 374
i am on a friend's laptop but i can put up a program that will show you the dependancies for exe files that may be able to help you with your issue. also for blitz i listed the solution in my previous post, you need to prevent blitz from drawing the 32nd line so that is does not loop around to draw on the top of the screen so it wont cause the plane to collide and cause game over at the start.
Hatorijr is offline   Reply With Quote
Old June 3rd, 2009   #190 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,907
serge2k:
the latest DX runtime files are compatible with all previous versions of DX.

and even though your friend might have maybe directX 9.0, theres different minor updates that he most likely doesn't have.
when you compiled your EXE you most likely used the latest SDK, which means your emu requires that version of DX runtimes or higher.
__________________

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 June 3rd, 2009   #191 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
yeah I figure he was just wrnog.

unfortunately, despite having a legit version of XP for free (through MSDNAA, multiple version actualyl) he decided that he was going to crack the activation so now I have to help him get the newest version.
serge2k is offline   Reply With Quote
Old June 3rd, 2009   #192 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,907
you can get the full version installer.
Download DirectX 9.0c (full package) - the latest version of Direct X
thats the first one i found on google.
hopefully its the latest version so it works with your emu.

edit:
yeah seems to be the latest
"This version of DirectX was released March 2009. "
that's the latest one AFAIK.
__________________

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 June 3rd, 2009   #193 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
heres the newest version of my emulator, will be realeasing the source but I want to clean it up some more first.
Attached Files
File Type: rar Chip 8 Emulator.rar (9.5 KB, 3 views)
serge2k is offline   Reply With Quote
Old June 3rd, 2009   #194 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,191
Quote:
Originally Posted by serge2k View Post
I also noticed that my chip8 emulator has one problem, maze
How does your RND instruction looks like?
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Logitech G5 | Logitech G15 | Windows 7 x64
ShendoXT is offline   Reply With Quote
Old June 19th, 2009   #195 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,207
No more information? Well, then I guess it's my turn to "spam" the forums with pictures of more games colored right, and another beta.

Worm 4
Sokoban

^= The two most notorious titles from my bug testing because they were the hardest to fix. And I ended up including "CMode" button to toggle between the two different coloring modes that might work better for these guys. In the end, it's still not perfect but at least it's playable. (for Sokoban moreso than for Worm 4)

Tic Tac Toe
BMP Viewer - MAME
Loopz (Yep, this one works perfectly on my emulator. You can score and do all that jazz with this)
Joust
Space Invaders
Font Test (Just to let you see the font set I embedded. Nothing much)
Brix
Alien
Blinky

Last but not least, it's Ant. I am forcing you to see this shot because I am so proud of finally getting the filter almost right. Ant looks like an "ant" now, and the arrow looks like an arrow now. Hurray!



And last but not least, I've attached the emulator. Now officially named cChip (short for colored-Chip). The filter used is now officially named LRx (short for Low Resolution Multiply), and... I'll just leave it there. Maybe I'll provide an option to turn that off in the future and to use other filters but for now, it just stays. If it makes anything ugly, then I'm sorry... and if you can provide a screenshot as well as some directives on how you want the screenshot to look, it'll be much appreciated.

Again, happy coloring! Oh yeah, next version will have a per-game ini file so that you can color a game the way you want it. For now... palettes are randomly generated every time you start the emu, so it'll be random all the time.

P.S.: If you want the source codes, I have a better idea: I'll provide a complete document on the Chip-8 and Super Chip interpreters and provide some of my own findings, as well as the technique for coloring sometime soon.

Edit: Replaced the binary with a recent update. Performance should be up to 100% faster when performing draws (in BMP viewers for instance). I've also slightly adjusted the color generating algorithms to provide better contrast and so on. The emulator should now work faster overall.
Attached Files
File Type: zip cChip.zip (46.3 KB, 7 views)
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10

Last edited by runawayprisoner; June 20th, 2009 at 18:59..
runawayprisoner is offline   Reply With Quote
Old June 21st, 2009   #196 (permalink)
Registered User
 
Join Date: Jun 2009
Location: United States
Posts: 1
i am trying to make a chip8 emulator but cant get past this stump that i have.
i don't really know how to emulate the cpu.
if you look at the source, could you tell me anything that is wrong with the source, or anyway to make it better.
the source is in objective-c/cocoa

any help would be appreciated
thanks
Attached Files
File Type: rar Emu.rar (3.30 MB, 4 views)
gergep is offline   Reply With Quote
Old June 24th, 2009   #197 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,191
Nice stuff rap.
Btw: this kinda fells like a link between Schip and Megachip (which sadly has no documentation yet...).

gergep, just read the thread from the beginning, you will find a lot of pseudo code.
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Logitech G5 | Logitech G15 | Windows 7 x64

Last edited by ShendoXT; June 25th, 2009 at 00:00..
ShendoXT is offline   Reply With Quote
Old June 28th, 2009   #198 (permalink)
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,191
oh noez double post.

Anyway, I was bored today so I decided to mess with Chip8 a bit.
I wrote a small demo which simulates a PSX boot sequence.
Attached Images
File Type: png screen1.png (27.4 KB, 15 views)
File Type: png screen2.png (21.6 KB, 10 views)
Attached Files
File Type: zip psx boot sim [Shendo].zip (364 Bytes, 5 views)
__________________
C2D E8400 3.00 Ghz | EP45-DS3 | HD4850 512MB | 4GB DDR2 800 | 640 + 250 GB HDD
SyncMaster 2233BW 22" | Logitech G5 | Logitech G15 | Windows 7 x64
ShendoXT is offline   Reply With Quote
Old July 30th, 2009   #199 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,207
Aww, nice stuff there, Shendo. I'm seeing if I can get that one colored. Should at least be worth something.

Anyway, I have here a newer version of my interpreter with some bug fixes to the coloring system, and a revised drawing routine to speed things up further. Also implemented a less confusing color mode button. Since I don't really have that much time to complete the documentation, the source code has been included, and you can poke around there... see if you can get anything out of it for your own interpreter. If you don't like the filter or anything else I'm doing in there, you can make a new Interface class to implement a different filter. There's no license attached to this thing so few free to do whatever you would like to do with it.



Oh, and feel free to implement a palette system! I've been meaning to add that but I'm just too pwned by other works to do anything about it. And then the performance of the drawing routine keeps bugging me so I keep coming back to that... Ah well, enough ranting from me.

In case you missed the wall of texts: Source code included inside!!

Edit: removed source code. An improved version of it can be found in the news subscription forum.
Attached Images
File Type: png cchip.PNG (13.1 KB, 50 views)
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10

Last edited by runawayprisoner; July 31st, 2009 at 16:59..
runawayprisoner is offline   Reply With Quote
Old July 31st, 2009   #200 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,842
good job! I should recode mine to c#/directx to get it as pwetty as all yours XD
Chrono Archangel 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 03:05.

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


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