Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack (1) Thread Tools
Old 07-26-2008, 04:26 PM   #161 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by ZGamer View Post
So, Netrix, can we download the one you're working one? or not?
No. I am not "working" on it. I wanted to see how well it worked and give suggestions about it if I could. I am not going to be trying to make it playable, so there is no use for users to get the one that I have. I will only give it to other programmers if they do not want to go through the trouble of fixing the things that I did.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 07-26-2008, 09:39 PM   #162 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 808
Tiptup300 has disabled reputation
Default

Quote:
Originally Posted by Netrix View Post
After fixing several problems, I have it (Tiptup300's version) working (kind of). I only get 4-5 frames per second (with the VideoProcessor.cs modification), but it does load ROMs, and it seems to display them correctly. I have not actually waited long enough for it to go through all of the screens and get to the title, so I do not know if the controls work or not.

Unfortunately, I can not really be of much help because I do not have any experience with creating emulators. I did try to port SharpNES (as did several other people), and the only real problem was the frame rate, because the emulator's engine is taking up all of the CPU power. Some people were saying that the drawing methods needed to be redone to fix the frame rate, but from what I saw, the drawing itself had little impact on the frame rate. When I commented out the drawing entirely, the frame rate increased less than 2 frames per second. The emulator engine itself is what needs to be optimized.

The same thing should theoretically apply to this emulator. You both might already be aware of what I have just said, but I figured I would try to help a little anyways.
The only real problem with this emulator and the zune is the Timer class which I'm not sure how I could make such an exact timer... I'll see what I can do.



Tiptup300 is offline   Reply With Quote
Old 07-27-2008, 04:07 AM   #163 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Tiptup300 View Post
The only real problem with this emulator and the zune is the Timer class which I'm not sure how I could make such an exact timer... I'll see what I can do.
Can you tell me what exactly is the problem with the timer, or are you not sure? I might be able to help with that.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-27-2008, 08:20 AM   #164 (permalink)
Squirt
 
scottmc29's Avatar
 
Join Date: Jul 2008
Posts: 17
scottmc29 is on a distinguished road
Default

I've been testing the following code for the PC version:

Code:
public void Update( double TimePassed )
{
	Time += TimePassed;// Timer.GetInterval( this );
	TMR.Update();
	while( Time >= 0.0001 )
	{
		VideoProcessor.Run( 0.0001 );
		Processor.Run( 0.0001 );
		Time -= 0.0001;
	}
	return;
}
This is to help with synchronization between both processors(especially for large TimePassed values), and it has helped eliminate flickering. Unfortunately it might be too slow for the Zune, but I plan on making it optional.

I've also been doing some profiling and the Tile.Draw function is a major bottleneck. I think it should be about two times faster now. I've also added a frame skipping option to the VideoProcessor so only some frames are processed, but the system runs at normal speed.

There should be an update within the next few days. Some new changes are(other then the above):

- Different timer model
- IConfigFile is now IOptions, plus it can now be null if you don't fell like implementing it.
- Console object is now only created once, each cartridge load only creates a Cartridge object and not an entirely new system.

Oh and I've split/renamed some parts of the project. Now all the executables should be able to coexist in the same folder. Before my XNA and DirectX versions overwrote eachother.

So Tiptup300 you might want to hold off working on anything until the next update.



scottmc29 is offline   Reply With Quote
Old 07-27-2008, 10:30 AM   #165 (permalink)
Squirt
 
Jamit's Avatar
 
Join Date: Jul 2008
Location: Elora, Ontario
Posts: 18
Jamit is on a distinguished road
Default

I'm really excited about the what you guys are working on. Keep up the good work and I have my fingers and toes crossed for you guys!




Jamit is offline   Reply With Quote
Old 07-28-2008, 06:57 PM   #166 (permalink)
Squirt
 
scottmc29's Avatar
 
Join Date: Jul 2008
Posts: 17
scottmc29 is on a distinguished road
Default

Has anyone created a Zune program using the C# 3.0 compiler? Having automatic properties would really help clean up some of the code. I assume it would work since I'd still be targetting .NET 2.0 and the bytecode is the same, but I want to make sure before I spend any time on it.

Also after seeing what you guys have to go through just to open files, I'm going to remove all the System.IO stuff from the emulator, though I'm still trying to figure out how.



scottmc29 is offline   Reply With Quote
Old 07-29-2008, 06:02 AM   #167 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by scottmc29 View Post
Has anyone created a Zune program using the C# 3.0 compiler? Having automatic properties would really help clean up some of the code. I assume it would work since I'd still be targetting .NET 2.0 and the bytecode is the same, but I want to make sure before I spend any time on it.

Also after seeing what you guys have to go through just to open files, I'm going to remove all the System.IO stuff from the emulator, though I'm still trying to figure out how.
Do you mean the .NET Framework 3.0? I always make Zune programs with .NET Framework 3.5... I was not aware that you could use previous versions of the framework.

Using System.IO to open files is incredibly easy. All you need to do is: System.IO.FileInfo file = new FileInfo("path"); How much easier could it get? If you suggest using the Content Pipeline, you have to go through a lot more for that.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-29-2008, 05:02 PM   #168 (permalink)
Squirt
 
scottmc29's Avatar
 
Join Date: Jul 2008
Posts: 17
scottmc29 is on a distinguished road
Default

No I meant C# 3.0, automatic properties are a language feature. I think you need the C# 3.0 compiler to use .NET 3.5, so I guess it'll work. Actually SharpDevelop has the option to target the compact framework, I'll have to try that.

About System.IO, there's another thread on this board where they say you have access a bunch of functions before using a file. Plus using System.IO limits any possible use of the content pipeline. I'd like to keep anything platform-specific out of the emulation code.



scottmc29 is offline   Reply With Quote
Old 07-29-2008, 05:54 PM   #169 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by scottmc29 View Post
No I meant C# 3.0, automatic properties are a language feature. I think you need the C# 3.0 compiler to use .NET 3.5, so I guess it'll work. Actually SharpDevelop has the option to target the compact framework, I'll have to try that.

About System.IO, there's another thread on this board where they say you have access a bunch of functions before using a file. Plus using System.IO limits any possible use of the content pipeline. I'd like to keep anything platform-specific out of the emulation code.
I have no idea what the difference is between C# 2.0 and C# 3.0.

You do not have to access a bunch of functions. The only other one would be Directory.GetFiles("path"); to get the files in the Rom folder. An optional one would be one that makes sure that the directory exists so the program does not crash.

System.IO is not platform-specific. You would just need to put in one #if ZUNE and #endif. I do not see any advantage of using the content pipeline. It is actually worse to use it, since it limits any use of the file system. What if someone wants to open a specific ROM in Windows? The only way you could really do that is to use System.IO. I would rather have a few lines of code added instead of having a rather inconvenient limitation.

Do it however you want. It seems like you have experience with the content pipeline and have not used System.IO before. It does not really matter to me personally, because I can just put System.IO back in whenever I download it. I was thinking about other people that do not know to do such.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-29-2008, 08:38 PM   #170 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 808
Tiptup300 has disabled reputation
Default

Quote:
public int num { public get; private set; }
as opposed to

Quote:
private int num;

public int Num
{
get { return num; }
}



Tiptup300 is offline   Reply With Quote
Old 07-29-2008, 10:10 PM   #171 (permalink)
Super Zuner²
 
mr.handsomeman's Avatar
 
Join Date: Nov 2007
Location: San Antonio, TX
Posts: 3,509
mr.handsomeman is on a distinguished road
Default

wow guys, I feel like we're on the verge of something big happening. I saw the screenshot of the original Pokemon game being played and I got so excited. Let's keep this thing going! Good job guys!
__________________
No. Just...no. Don't do it....don't do it...DON'T ****ING DO IT!!!

Yes kids, referral link spam abuse is a terrifying thing. Come here to learn how you can get help.





mr.handsomeman is offline   Reply With Quote
Old 07-30-2008, 01:24 AM   #172 (permalink)
Zuner
 
Darkside's Avatar
 
Join Date: Jul 2008
Posts: 67
Darkside is on a distinguished road
Default

is this fairly close to being finished?




Darkside is offline   Reply With Quote
Old 07-30-2008, 04:56 AM   #173 (permalink)
Jr. Zuner
 
p0p3's Avatar
 
Join Date: Feb 2008
Posts: 48
p0p3 is on a distinguished road
Default

i don't think so, i guess right now it's like super alpha lol
__________________




p0p3 is offline   Reply With Quote
Old 07-30-2008, 05:14 AM   #174 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Do you mean:
Quote:
public int num { get; private set; }
?

The way you said caused errors, but when I tried it this way, it worked like it should.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-30-2008, 05:40 AM   #175 (permalink)
Experienced Zuner
 
gohstface's Avatar
 
Join Date: Jul 2008
Posts: 102
gohstface is on a distinguished road
Default

can't wait for the final release!




gohstface is offline   Reply With Quote
Old 07-30-2008, 03:46 PM   #176 (permalink)
Squirt
 
scottmc29's Avatar
 
Join Date: Jul 2008
Posts: 17
scottmc29 is on a distinguished road
Default

Quote:
Originally Posted by Netrix View Post
What if someone wants to open a specific ROM in Windows?
What if someone wants to load ROM files from ZIP files or other compressed files? What if someone wants to use the content pipeline? What if someone wants to store save states and battery files other than the way I do?

I haven't replaced System.IO with the content pipeline. The emulator has two interfaces, one for input and the other for input. They're rather easy to implement, here is my current implementation for the Win32 interface:

Code:
	public sealed class InputStream : IO.BinaryReader, IInputStream
	{
		
		public long Length
		{
			get
			{
				return BaseStream.Length;
			}
		}
		
		public long Position
		{
			get
			{
				return BaseStream.Position;
			}
			set
			{
				BaseStream.Position = value;
			}
		}
		
		public InputStream( string Path ) : base( IO.File.OpenRead( Path ) )
		{
			return;
		}
		
	}
Quote:
Originally Posted by Netrix View Post
I would rather have a few lines of code added instead of having a rather inconvenient limitation.
Me too

Quote:
Originally Posted by Netrix View Post
It does not really matter to me personally, because I can just put System.IO back in whenever I download it.
Well you shouldn't have to go in and add System.IO, it kind of defeats the point of the project.

Quote:
Originally Posted by Netrix View Post
I was thinking about other people that do not know to do such.
This is the point of the project. Anyone can write there own interface/port without having to deal with any emulation code.

Quote:
Originally Posted by Darkside View Post
is this fairly close to being finished?
The emulator portion needs battery files and sound. Save-states also need to be re-implemented as the current implementation is crap.

As for the Zune interface, that's Tiptup300's job. There's also no guarantee that it'll run fast enough on the Zune.



scottmc29 is offline   Reply With Quote
Old 07-30-2008, 06:57 PM   #177 (permalink)
Purger of Ignorance
zB Programmer
Retired Staff
Expert Zuner
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 2,805
Netrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to allNetrix is a name known to all
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by scottmc29 View Post
What if someone wants to load ROM files from ZIP files or other compressed files? What if someone wants to use the content pipeline? What if someone wants to store save states and battery files other than the way I do?
Would it not be difficult to write a ZIP importer that decompresses ZIP files?

Quote:
I haven't replaced System.IO with the content pipeline. The emulator has two interfaces, one for input and the other for input.
I thought you said that you were going to "remove all of the System.IO stuff from the emulator". If you are putting both in, that would be great.
__________________
"Against logic there is no armor like ignorance." - Laurence J. Peter

Solitaire for your Zune! http://www.zuneboards.com/forums/dow...ne-v2-0-a.html

Zune Book Reader! http://www.zuneboards.com/forums/app...ew-thread.html




Netrix is offline   Reply With Quote
Old 07-30-2008, 10:04 PM   #178 (permalink)
Super Zuner²
 
mr.handsomeman's Avatar
 
Join Date: Nov 2007
Location: San Antonio, TX
Posts: 3,509
mr.handsomeman is on a distinguished road
Default

So, can we get an update from Tiptup maybe? I mean, I don't want to sound mean and demanding but, I just want an update from the Zune man.
__________________
No. Just...no. Don't do it....don't do it...DON'T ****ING DO IT!!!

Yes kids, referral link spam abuse is a terrifying thing. Come here to learn how you can get help.





mr.handsomeman is offline   Reply With Quote
Old 07-31-2008, 06:34 PM   #179 (permalink)
Squirt
 
scottmc29's Avatar
 
Join Date: Jul 2008
Posts: 17
scottmc29 is on a distinguished road
Default

New release can be found at the CodePlex page .

There's a small XNA version I made in there to help speed up porting. If you want to change the frame skip value just edit it in Options.cs, change the "0" to something between 1 and 9. 0 is full speed and anything above 9 is pretty much pointless.

Hopefully this version is faster, although I still need to optimize the memory and processor code. If you want to see the number of VBlanks the system is getting, use Console.VideoProcessor.FPS, 59 or 60 is ideal.



scottmc29 is offline   Reply With Quote
Old 07-31-2008, 07:21 PM   #180 (permalink)
Zuner
 
Darkside's Avatar
 
Join Date: Jul 2008
Posts: 67
Darkside is on a distinguished road
Default

Quote:
Originally Posted by scottmc29 View Post
New release can be found at the CodePlex page .

There's a small XNA version I made in there to help speed up porting. If you want to change the frame skip value just edit it in Options.cs, change the "0" to something between 1 and 9. 0 is full speed and anything above 9 is pretty much pointless.

Hopefully this version is faster, although I still need to optimize the memory and processor code. If you want to see the number of VBlanks the system is getting, use Console.VideoProcessor.FPS, 59 or 60 is ideal.
is this playable on the zune yet or just for computers?




Darkside is offline   Reply With Quote
Reply

Bookmarks

Thread Tools