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 March 13th, 2009   #81 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,842
Quote:
Originally Posted by runawayprisoner View Post
Looking good. Do Super Chip games work?
Nope, too lazy
I hadn't touched my chip8 emu in like 6 months... and decided to fix these last week. Probably gonna be like that with SChip8 too XD

I have no way of doing proper input emulation with the platform im using... (at least so far i cant, theres no specific ways of catching keydowns and keyups seperatly)
Chrono Archangel is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old March 13th, 2009   #82 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Ah... there's a problem. Maybe you can try an on-screen keypad that works with a mouse... or make a toggle down/toggle up keypad instead of a down then up keypad. Well, just to test if the games work right or not.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old March 13th, 2009   #83 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,842
Quote:
Originally Posted by runawayprisoner View Post
Ah... there's a problem. Maybe you can try an on-screen keypad that works with a mouse... or make a toggle down/toggle up keypad instead of a down then up keypad. Well, just to test if the games work right or not.
Yeah, for testing purposes i did so that when a key is pressed it just stays "pressed"... so i can toggle up/down constantly for the paddle in pong for example. I might be able to use WinAPI instead... ill take a look eventually.
Chrono Archangel is offline   Reply With Quote
Old March 13th, 2009   #84 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
*chant Java 1000 times* It's nice when you have everything built-in and uniform across platforms, ei?

That reminds me. I wonder if I should move my arse to complete that Chip-8/Super Chip documentation I'd been working on. Thing is... I don't think it offers more than what other documents do. If anything, maybe I'll go more into the technique and the actual implementation of the pseudo ideas rather than providing a table.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old March 19th, 2009   #85 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Quick update: I've got 13 instructions so far: JP, CALL, RET, and the 10 LD functions. HUGE thanks to Hatori for guiding me quite a bit through this process. Also thanks to Shendo, RunawayPrisoner, and anyone else who I missed.

Edit: I have everything except DRW now, as well as correct input[no input in a DOS window]. Just gotta hook it up to a SDL/OGL window to see if it works.

Last edited by Dax; March 19th, 2009 at 03:29..
Dax is offline   Reply With Quote
Old March 26th, 2009   #86 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
I need some help with fetching opcodes. For some reason, my emulator reads the first 4 opcodes of Pong fine, but the fifth is seen as FFEA, when it should be A2EA.

Here's how I fetch opcodes:
Code:
regs.OP = (unsigned short)( (RAM[regs.PC] << 8) | RAM[regs.PC + 1] );
Here's how I do the classic case/switch statement:
Code:
switch( ((regs.OP & 0xF000) >> 12) )
The emu loads the ROM fine, and in RAM, the contents are correct. So it's not a loading issue.
Dax is offline   Reply With Quote
Old March 26th, 2009   #87 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Well I figured out the opcode bug. I had to switch to unsigned chars, from regular chars. Now my emu has graphics(I also had to check for != 0 in the DRW function)!!! Glitched, but I don't care at the moment!!

First pic: Pong
Second: Blitz

Compatibility list:
Pong: "Title", never crashes. No input yet, so can't play.
Blitz: "Title", crashes a few seconds after emulation begins.
Attached Images
File Type: png WOOOOOOOT.png (40.7 KB, 14 views)
File Type: png blitz.png (35.7 KB, 12 views)

Last edited by Dax; March 26th, 2009 at 09:39..
Dax is offline   Reply With Quote
Old March 26th, 2009   #88 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,842
w00t w00t. first bits of graphics are always fun to see
Chrono Archangel is offline   Reply With Quote
Old March 26th, 2009   #89 (permalink)
Regular User ;)
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Naples Florida
Posts: 9,964
I bet when the first Sony sign showed up on PCSX2, CK and Ref, Saquib, Zerofrog and the rest all held hands together and cried lol
__________________

A Mac is like an escort, you pay a ton and get nothing.
A PC is like a hooker, it's a lot cheaper and gives you what you're after.. and if unlucky some diseases as well, that's why you gotta use protection. -CC
Phil is offline   Reply With Quote
Old March 26th, 2009   #90 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Quote:
Originally Posted by Chrono Archangel View Post
w00t w00t. first bits of graphics are always fun to see
Indeed. You had no idea how happy I was. I've been working on this like a week straight, at the least.

Quote:
Originally Posted by Phil View Post
I bet when the first Sony sign showed up on PCSX2, CK and Ref, Saquib, Zerofrog and the rest all held hands together and cried lol
Probably.
Dax is offline   Reply With Quote
Old March 26th, 2009   #91 (permalink)
Bruce Willis as Ichigo...
 
strike105x's Avatar
 
Join Date: Apr 2007
Location: ...means Bleach ends after episode 1
Posts: 3,557
Keep it up
GL with the rest of the project
strike105x is offline   Reply With Quote
Old March 26th, 2009   #92 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Thanks. I hope to finish it maybe this weekend, assuming there are no huge problems left in the code..
Dax is offline   Reply With Quote
Old March 26th, 2009   #93 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Updated the first post with useful docs/sites/forum threads. Hopefully that'll help anyone else who decides to start their own emu.
Dax is offline   Reply With Quote
Old March 27th, 2009   #94 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,902
Quote:
Originally Posted by Dax View Post
Well I figured out the opcode bug. I had to switch to unsigned chars, from regular chars. Now my emu has graphics(I also had to check for != 0 in the DRW function)!!! Glitched, but I don't care at the moment!!
on my nes emu I have this code in a header called 'types.h':
Code:
#pragma once

typedef unsigned char  u8,	byte;
typedef unsigned short u16,	ushort;
typedef unsigned int   u32,	uint, uptr;

typedef signed char  s8;
typedef signed short s16;
typedef signed int   s32, sptr;

typedef void*	HANDLE;
its alot nicer doing something like
Code:
a = (u8)(b - c);
instead of
Code:
a = (unsigned char)(b - c);

Quote:
Originally Posted by Phil View Post
I bet when the first Sony sign showed up on PCSX2, CK and Ref, Saqib, Zerofrog and the rest all held hands together and cried lol
i think they all joined the team after that (except for Saqib)
i think ref and zerofrog joined sometime in 2005~2006, and pcsx2 was started like in ~2002 or something.
most-likely they got 'something' to show up in those 3 years, it was probably just really slow xD
__________________

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, 2009   #95 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
I did something similar in my c8 header by defining bytes and words as unsigned chars and unsigned shorts, but thanks. :3
Dax is offline   Reply With Quote
Old March 28th, 2009   #96 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Blitz now shows B, and never crashes, and pong occasionally shows a zero[in addition to the balls and the paddle, drawn in the wrong spots], which then disappears quickly. I'm still trying to figure out why.
Attached Images
File Type: png blitz2.png (47.1 KB, 14 views)
Dax is offline   Reply With Quote
Old March 29th, 2009   #97 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Quote:
Originally Posted by Dax View Post
Blitz now shows B, and never crashes, and pong occasionally shows a zero[in addition to the balls and the paddle, drawn in the wrong spots], which then disappears quickly. I'm still trying to figure out why.
Amen... if you trace out the right coordinates for those, then you should start choppin' the draw opcode. It's the culprit for 110% of any kind of weird output.

Oh, and more important than that: check your flag!
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old March 31st, 2009   #98 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
I've been taking a short break, as I was burnt out on debugging pong line by line for hours.

Today I think I'll audit the code to make sure each opcode matches the docs.

Last edited by Dax; March 31st, 2009 at 13:18.. Reason: Stupid double post, even though I only hit it ONCE.
Dax is offline   Reply With Quote
Old April 1st, 2009   #99 (permalink)
Registered User
 
Join Date: Mar 2009
Location: United States
Posts: 9
Okay, since I finished my chip8 emulator in flash I got a little bored and curious. So I decided to make a program that will decompile chip8 games (not all) and convert it into pure action script. So, if you have adobe flash, you can test this if you like.

The link is http://babbage.cs.missouri.edu/~jask...p8/convert.php

There is instructions on the page on how to use it, it should be self-explanatory.

Tell me what you think of it.

~justin
jaskt7 is offline   Reply With Quote
Old April 2nd, 2009   #100 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Pong now has perfect ingame graphics[chip8 flickers, so the right paddle was gone at the time of the screen]:
Attached Images
File Type: png omfg.png (50.1 KB, 9 views)
Dax 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 01:44.

© 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