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 November 22nd, 2008, 00:07   #21
P_RePTiLe
PReP - Lizard of Reason
 
P_RePTiLe's Avatar
 
Join Date: Sep 2006
Location: Sweden
Posts: 870
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 Main: Intel Core i5 2500k (Sandy Bridge) @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom), Arch Linux 64-Bit, Win7 64-Bit.

#2 Server:
C2D E8400 @ 3.6 Ghz, 4 GB DDR2-RAM @ 802mhz, XFX GF GTX260 XT -ArchLinux 64-bit.

<- Server Homepage: http://prep.mine.nu ->
P_RePTiLe is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old November 22nd, 2008, 06:16   #22
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
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, 08:30   #23
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
Just a note for the graphics work: it's done using XOR, which means... the ^ operation in C++ and some other languages.
runawayprisoner is offline   Reply With Quote
Old November 22nd, 2008, 09:00   #24
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
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, 22:10   #25
blueshogun96
Last Xbox Emu Author
 
blueshogun96's Avatar
 
Join Date: Jun 2004
Location: Seattle, WA, USA
Posts: 5,843
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!
__________________

Official Website of Shogun3D's RyuAwai!

Shogun3D Game Development Blog

Zengjük a Dalt: Manliest Song Ever!
blueshogun96 is offline   Reply With Quote
Old November 22nd, 2008, 23:50   #26
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
Indeed... I agree with that idea. There should be a stickied thread.

And a thread that has links to documents.
runawayprisoner is offline   Reply With Quote
Old November 23rd, 2008, 04:41   #27
Squall-Leonhart
Banned
 
Squall-Leonhart's Avatar
 
Join Date: Feb 2006
Location: Sydney, Australia
Posts: 23,270
Quote:
Originally Posted by P_RePTiLe View Post
Good work with google
I've worked with SDL before,... the Nherve input plugin for ideas.
Squall-Leonhart is offline   Reply With Quote
Old November 23rd, 2008, 15:06   #28
P_RePTiLe
PReP - Lizard of Reason
 
P_RePTiLe's Avatar
 
Join Date: Sep 2006
Location: Sweden
Posts: 870
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 Main: Intel Core i5 2500k (Sandy Bridge) @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom), Arch Linux 64-Bit, Win7 64-Bit.

#2 Server:
C2D E8400 @ 3.6 Ghz, 4 GB DDR2-RAM @ 802mhz, XFX GF GTX260 XT -ArchLinux 64-bit.

<- Server Homepage: http://prep.mine.nu ->
P_RePTiLe is offline   Reply With Quote
Old November 23rd, 2008, 21:57   #29
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
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.

Last edited by runawayprisoner; November 23rd, 2008 at 22:45..
runawayprisoner is offline   Reply With Quote
Old November 27th, 2008, 18:37   #30
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
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, 05:08   #31
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
Why is CLS implemented... but DRW (or SPRITE in some other docs) not? ;p
runawayprisoner is offline   Reply With Quote
Old November 28th, 2008, 05:13   #32
Phil
339.9
 
Phil's Avatar
 
Join Date: Oct 2007
Location: USA
Posts: 14,777
becuase he made it on a computer, and not an Eee. Rap, where have you been hiding??
__________________
Vision is the art of seeing what is invisible to others
Phil is offline   Reply With Quote
Old November 28th, 2008, 11:19   #33
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
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, 18:49   #34
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
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.
runawayprisoner is offline   Reply With Quote
Old December 7th, 2008, 04:11   #35
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
: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, 04:20   #36
cottonvibes
You're already dead...
 
cottonvibes's Avatar
 
Join Date: Sep 2007
Location: Planet Vegeta
Posts: 5,387
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?
__________________

"It was, of course, a lie what you read about my religious convictions, a lie which is being systematically repeated. I do not believe in a personal God and I have never denied this but have expressed it clearly. If something is in me which can be called religious then it is the unbounded admiration for the structure of the world so far as our science can reveal it." - Albert Einstein
check out my blog
cottonvibes is offline   Reply With Quote
Old December 7th, 2008, 16:10   #37
Dax
ライチュウ|タオ
 
Dax's Avatar
 
Join Date: Nov 2006
Location: USA
Posts: 3,956
xD We'll see. I've been busy with real life. :<
Dax is offline   Reply With Quote
Old December 7th, 2008, 20:11   #38
runawayprisoner
Level 9998
 
runawayprisoner's Avatar
 
Join Date: Nov 2006
Location: Java
Posts: 9,377
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).
runawayprisoner is offline   Reply With Quote
Old December 28th, 2008, 11:34   #39
serge2k
Registered User
 
Join Date: Sep 2006
Location: surrey
Posts: 111
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, 18:38   #40
dreampeppers99
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: Brazil
Posts: 618
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
__________________
Leandro Moreira
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

Forum Jump

All times are GMT +1. The time now is 10:55.

© 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.