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 November 22nd, 2008   #21 (permalink)
 
P_RePTiLe's Avatar
 
Join Date: Sep 2006
Location: Sweden
Posts: 509
Quote:
Originally Posted by Squall-Leonhart View Post
Simple Directmedia Layer, can connect with any available API in the system, most commonly video implementation connects to OpenGL.
Good work with google
__________________


( #1 Core2Duo E8400 @ 3.61 Ghz, 3072 MB DDR2-RAM @ 802mhz, XFX Geforce GTX260 XT - N-Lited WinXP SP3 and Arch Linux 64-bit).

<- http://www.myspace.com/preptile ->
|
/P. Rep.
P_RePTiLe is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old November 22nd, 2008   #22 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
Update: I've got opcodes 0x1[JP addr], 0x2[CALL], 0x6[LD], 0x7[ADD], and 0xB[JP addr + v0] working, more or less, as far as I can tell, so I'm pleased. Still no graphics obviously[I have the emulator in a console app for now, so I can easily see the output without having to mess with SDL text rendering].
Dax is offline   Reply With Quote
Old November 22nd, 2008   #23 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Just a note for the graphics work: it's done using XOR, which means... the ^ operation in C++ and some other languages.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old November 22nd, 2008   #24 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
I doubt I'll get to graphics anytime soon. I want to have most of the other opcodes written first.
Dax is offline   Reply With Quote
Old November 22nd, 2008   #25 (permalink)
Emu author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Unidentified
Posts: 2,508
TBH, I think we need threads like this stikied like at emultak.net so we can have one large discussion on the subject of emulating certain systems. This way it will reduce the need to search forums for specific threads and the one thread can link to any specific thread if it poses any relevance.

@daxtsu, there's no such thing as a dumb question when you're trying to learn how to write an emulator and you don't know any better, no matter what!
__________________

[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 November 22nd, 2008   #26 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Indeed... I agree with that idea. There should be a stickied thread.

And a thread that has links to documents.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old November 23rd, 2008   #27 (permalink)
Behind ur girlfriend :D
 
Squall-Leonhart's Avatar
 
Join Date: Feb 2006
Location: Sydney, Australia
Posts: 18,832
Quote:
Originally Posted by P_RePTiLe View Post
Good work with google
I've worked with SDL before,... the Nherve input plugin for ideas.
__________________


VBA-M | Xtemu | NGOHQ | Post Impact Productions | TNHW | XBCD 0.2.6 | Satanic666's Emulator Compiles
Don't be a NOOB, READ THE NGEmu/EmuForums Rules of Conduct
Need Help with ePSXe? This is your first stop!.

If you don't post all the required information, you don't get help.
Everytime someone posts a romsite, God kills a beautiful woman.
Squall-Leonhart is offline   Reply With Quote
Old November 23rd, 2008   #28 (permalink)
 
P_RePTiLe's Avatar
 
Join Date: Sep 2006
Location: Sweden
Posts: 509
Quote:
Originally Posted by Squall-Leonhart View Post
I've worked with SDL before,... the Nherve input plugin for ideas.
Ah, very well then. Then i just good the wrong idea from your "Do Open-Gl!!!"-post.
__________________


( #1 Core2Duo E8400 @ 3.61 Ghz, 3072 MB DDR2-RAM @ 802mhz, XFX Geforce GTX260 XT - N-Lited WinXP SP3 and Arch Linux 64-bit).

<- http://www.myspace.com/preptile ->
|
/P. Rep.
P_RePTiLe is offline   Reply With Quote
Old November 23rd, 2008   #29 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Just an FYI, this might be helpful to you. My debugger log when running Pong. ;p

Code:
// 02A6: 22D4
CALL 02D4 // Call sub-routine at address 02D4 (724) in memory.

// 02D4: A2F2
LD I, 02F2 // Load 02F2 (754 in decimal) into I.

// 02D6: FE33
BCD V[0E] // Load into memory at address I the BCD value of V[0E].

// Value of V[0E]: 00 (0)
// Hundreds: 0
// Tens    : 0
// Units   : 0

// I: 02F2 (754)
// mem[02F2]: 00 (0)
// mem[02F3]: 00 (0)
// mem[02F4]: 00 (0)

// 02D8: F265
LDA 02, I // Load from memory at address I into V[00] to V[02].

// V[00]: 00 (0)
// V[01]: 00 (0)
// V[02]: 00 (0)

// 02DA: F129
LDF I, V[01] // Load into I the address of the 8x5 font with index as value of V[01].

// 02DC: 6414
LD V[04], 0014 // Load 0014 (20) into V[04].

// 02DE: 6500
LD V[05], 0000 // Load 0000 (0) into V[05].

// 02E0: D455
DRW V[04], V[05], 05 // Draw a 8x5 sprite at x=14 (20) and y=00 (0).

// 02E2: 7415
ADD V[04], 0015 // Add 0015 (21) into V[04].

// 02E4: F229
LDF I, V[02] // Load into I the address of the 8x5 font with index as value of V[02].

// 02E6: D455
DRW V[04], V[05], 05 // Draw a 8x5 sprite at x=29 (41) and y=00 (0).

// 02E8: 00EE
RET // Return from sub-routine.

// 02A8: 8E34
ADD V[0E], V[03] // Add V[03] into V[0E].

// 02AA: 22D4
CALL 02D4 // Call sub-routine at address 02D4 (724) in memory.

// 02D4: A2F2
LD I, 02F2 // Load 02F2 (754 in decimal) into I.

// 02D6: FE33
BCD V[0E] // Load into memory at address I the BCD value of V[0E].

// Value of V[0E]: 0A (10)
// Hundreds: 0
// Tens    : 1
// Units   : 0

// I: 02F2 (754)
// mem[02F2]: 00 (0)
// mem[02F3]: 01 (1)
// mem[02F4]: 00 (0)

// 02D8: F265
LDA 02, I // Load from memory at address I into V[00] to V[02].

// V[00]: 00 (0)
// V[01]: 01 (1)
// V[02]: 00 (0)

// 02DA: F129
LDF I, V[01] // Load into I the address of the 8x5 font with index as value of V[01].

// 02DC: 6414
LD V[04], 0014 // Load 0014 (20) into V[04].

// 02DE: 6500
LD V[05], 0000 // Load 0000 (0) into V[05].

// 02E0: D455
DRW V[04], V[05], 05 // Draw a 8x5 sprite at x=14 (20) and y=00 (0).

// 02E2: 7415
ADD V[04], 0015 // Add 0015 (21) into V[04].

// 02E4: F229
LDF I, V[02] // Load into I the address of the 8x5 font with index as value of V[02].

// 02E6: D455
DRW V[04], V[05], 05 // Draw a 8x5 sprite at x=29 (41) and y=00 (0).

// 02E8: 00EE
RET // Return from sub-routine.
Anyway, pay attention to the way BCD works in Pong so you won't run into troubles there. Even Ref ran into troubles with that about 2-3 years ago.

Edit: removed the X's because they were useless.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10

Last edited by runawayprisoner; November 23rd, 2008 at 22:45..
runawayprisoner is offline   Reply With Quote
Old November 27th, 2008   #30 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
New list of opcodes programmed in[I still don't really have much of a debugger working, so no clue how well they're working]:

Regular C8:

0nnn - SYS addr: Yes(Ignored)
00E0 - CLS: Yes
00EE - RET: Yes
1nnn - JP: Yes
2nnn - CALL: Yes
3xkk - SE: Yes
4xkk - SNE: Yes
5xy0 - SE: Yes
6xkk - LD: Yes
7xkk - ADD: Yes
8xy0 - LD: Yes
8xy1 - OR: Yes
8xy2 - AND: Yes
8xy3 - XOR: Yes
8xy4 - ADD: No
8xy5 - SUB: No
8xy6 - SHR: No
8xy7 - SUBN: No
8xyE - SHL: No
9xy0 - SNE: Yes
Annn - LD: No
Bnnn - JP: Yes
Cxkk - RND: No
Dxyn - DRW: No
Ex9E - SKP: No
ExA1 - SKNP: No
Fx07 - LD: Yes
Fx0A - LD: No
Fx15 - LD: Yes
Fx18 - LD: Yes
Fx1E - ADD: No
Fx29 - LD: No
Fx33 - LD: No
Fx55 - LD: No
Fx65 - LD: No

Total: 18/35

Super C8:
00Cn - SCD: No
00FB - SCR: No
00FC - SCL: No
00FD - EXIT: No
00FE - LOW: No
00FF - HIGH: No
Dxy0 - DRW: No
Fx30 - LD: No
Fx75 - LD: No
Fx85 - LD: No

Total: 0/10

Grand Total: 18/45

Not bad progress if I do say so myself. :3
Dax is offline   Reply With Quote
Old November 28th, 2008   #31 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Why is CLS implemented... but DRW (or SPRITE in some other docs) not? ;p
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old November 28th, 2008   #32 (permalink)
Regular User ;)
 
Phil's Avatar
 
Join Date: Oct 2007
Location: Naples Florida
Posts: 9,964
becuase he made it on a computer, and not an Eee. Rap, where have you been hiding??
__________________

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 November 28th, 2008   #33 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
RAP: It's not really implemented per se, it's just a printf/cout that says, "OMG CLEAR THE SCREEN", which is about all you can do with a console window[unless of course you DO really clear the screen..], so nyah.

Last edited by Dax; November 28th, 2008 at 11:28..
Dax is offline   Reply With Quote
Old November 28th, 2008   #34 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
Quote:
Originally Posted by Phil View Post
becuase he made it on a computer, and not an Eee. Rap, where have you been hiding??
Under a ton of Gameboy documents. Now I have the opcode table sorted... (damn, that was a mess)

Quote:
Originally Posted by daxtsu View Post
RAP: It's not really implemented per se, it's just a printf/cout that says, "OMG CLEAR THE SCREEN", which is about all you can do with a console window[unless of course you DO really clear the screen..], so nyah.
Knew it. Make a debugger that prints out the specific commands and what it does... for every byte in the rom first. A loop detector (something that jumps to itself is an endless loop that indicates it's the end of the software) might be nice.
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old December 7th, 2008   #35 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
:o My thread got stickied! I'll update the first post with links to useful CHIP8 stuff when I get a chance. As far as progress on the emu goes, I haven't touched it with a 99999 foot/metre pole lately, so no updates yet.
Dax is offline   Reply With Quote
Old December 7th, 2008   #36 (permalink)
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Post-Apocalyptic Earth
Posts: 3,902
Quote:
Originally Posted by daxtsu View Post
:o My thread got stickied! I'll update the first post with links to useful CHIP8 stuff when I get a chance. As far as progress on the emu goes, I haven't touched it with a 99999 foot/metre pole lately, so no updates yet.

well maybe now that its stickied it'll give you the motivation you need to finish it?
__________________

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 December 7th, 2008   #37 (permalink)
Dax
ライチュウ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,289
xD We'll see. I've been busy with real life. :<
Dax is offline   Reply With Quote
Old December 7th, 2008   #38 (permalink)
Mobile Fanatic
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Santa Cruz, CA
Posts: 6,205
You should try to finish this project. You would learn a lot from it, I think. Maybe I'll start contributing some technical data as well, as soon as I'm finished with my other project (Gameboy).
__________________
cChip interpreter WIP - current status: Release Candidate
LRx Filter RC - current performance rating: 9/10
runawayprisoner is offline   Reply With Quote
Old December 28th, 2008   #39 (permalink)
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 45
I've decided to get back to mine after playing nothing but emulated games for a few days (I'm at my mom's, computer is at home)

The biggest problem I had with mine was graphics. everything I tried was ridiculously slow or just didn't work.

I'm going to attempt again using C++ and SDL (as soon as microsoft approves another visual studio download).

I'm just wondering if anyone has some good resources for graphics? I used NeHe's opengl tutorials, is that the best for this or is there an easier way?
serge2k is offline   Reply With Quote
Old December 30th, 2008   #40 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
Talking

Quote:
Originally Posted by serge2k View Post
The biggest problem I had with mine was graphics. everything I tried was ridiculously slow or just didn't work.
I used the Graphics.drawLine from Java 2D API and it ran very fast... ( I didn't find the one setPixel on Graphics then I coded with drawLine. )

However if the things stay hard... made this abstract as Refraction firstly just draw * to background and # to objects.

**#*****
*##*****
**#*****
**#*****
*###****

Or another one that you wish.


My main screen ...

The debugger step by step with pong
__________________
The Empyrean

Last edited by dreampeppers99; December 30th, 2008 at 19:13..
dreampeppers99 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:37.

© 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