Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Who wants to make an NES emu with me? | |
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Dish

Spiny
Level: 38

Posts: 218/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 12-31-04 05:49 AM Link | Quote
I really want to... the NES fascinates me and I really enjoy working with it. I have made crude emus in the past, but I always grow tired of the project when working with the user interface.

So pretty much... I want someone to make a sort of frontend for the emu. The basic idea is... you're half of the program would give my half a pointer to a buffer for video and audio... then you'd call a 'DoFrame' function (which would fill those buffers with data), and then you'd output the video/audio to the user. Basically... I'm looking for someone to do all the stuff that isn't directly related to emulation


Your half of the emu would involve:

1) Providing everything related to a user interface. Like the main menu, any option screens you want to add, ROM file selection, etc.

2) Regulating a framerate (typially ~60 fps when emulating NTSC, ~50 when emulating PAL)

3) Actually outputting the generated image to the user (my half will actually generate the image... your half would be in charge of actually displaying it -- as well as stretching and/or applying neat-o filters if you want)

4) Actually outputting the generated sound to the user (again, my half will actually generate it... your half would be in charge of streaming it)

5) Actually getting input from the user and sending it to my half (so you'd need to actually read joypad/keyboard status).


That's it really. You don't need to know any technical NES stuff... I'd be taking care of all that. The project is a C++ deal... I'm typically more of a C/C++ hybrid coder, but I'll be using some C++ stuff (classes), so a C++ compiler would be necessary. Use of a cross-platform library or something to achieve platform independence would be awesome... but since I'm running WIndows, that's really the only thing I really care about.

Anyway... as well all know, NES emulators are a dime a dozen. I'm not suggesting we go and make the most super-best-revolutionary NES emu to date. There are already lots of great options when it comes to NES emus... I'm just proposing this because it's a fun thing to do. I know it's a longshot... but if anyone out there is at all interested, I'd like to hear about it ^^
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 2734/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 12-31-04 07:54 AM Link | Quote
I could do it in VB easily, including the whole pointer thing, but I don't know how you would work that into your program. (Compile it as a DLL, perhaps?)

Though really, if I'm going to be writing any emulators, I'd rather do it for GB. (I started one but couldn't get enough speed in VB and don't know enough C. )
Dish

Spiny
Level: 38

Posts: 219/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 12-31-04 08:50 AM Link | Quote
Originally posted by HyperHacker
I could do it in VB easily, including the whole pointer thing, but I don't know how you would work that into your program. (Compile it as a DLL, perhaps?)


I suppose that could work. I'd prefer to avoid the wretch that is VB... but beggers can't be choosers. I haven't had the best of luck in my prior experiences getting DLLs running in VB (I attempted to make a DLL to play back NES sound for a music editor made in VB a long while back, but we couldn't get it working for some reason).



Though really, if I'm going to be writing any emulators, I'd rather do it for GB. (I started one but couldn't get enough speed in VB and don't know enough C. )


Bleh... I hate GB/GBC. Can't get on board with you on that one.

All the API stuff you do in VB (which I've seen you talk about in other posts) works exactly the same way in C... so I don't see why you'd have a harder time doing stuff in C than you would VB (in fact... I'd figure it'd be just the opposite).

Anyway... If you're really interested... I'll work on getting a setup...erm... set up ^^. Like what functions you'd use to communicate with my half of the emu, and how you'd work with it. I'll have something tomorrow... and hopefully... something you can actually use in 2 or 3 days.

If you're not interested, or aren't really sure or whatever... it's cool. I want this to be a totally fun thing, no pressure. If you wouldn't have fun, then don't go for it.
Gavin

Fuzzy
Rhinoceruses don't play games. They fucking charge your ass.
Level: 43

Posts: 367/799
EXP: 551711
For next: 13335

Since: 03-15-04
From: IL, USA

Since last post: 13 hours
Last activity: 13 hours
Posted on 12-31-04 03:13 PM Link | Quote
Originally posted by HyperHacker
I could do it in VB easily, including the whole pointer thing, but I don't know how you would work that into your program. (Compile it as a DLL, perhaps?)

Though really, if I'm going to be writing any emulators, I'd rather do it for GB. (I started one but couldn't get enough speed in VB and don't know enough C. )


HAHAHA, i assume your joking. otherwise you're just an asshole.

Originally posted by Disch
Originally posted by HyperHacker
I could do it in VB easily, including the whole pointer thing, but I don't know how you would work that into your program. (Compile it as a DLL, perhaps?)


I suppose that could work. I'd prefer to avoid the wretch that is VB... but beggers can't be choosers. I haven't had the best of luck in my prior experiences getting DLLs running in VB (I attempted to make a DLL to play back NES sound for a music editor made in VB a long while back, but we couldn't get it working for some reason).


hey Disch dude, that DLL you gave me was actually entirely functional and technically correct by all means. It was just shitty VB standards that had prevented normal working code from functioning properly. I have since been able to make it work

All the same, I, who am a proficient VB coder, strongly discourage any and all VB collaberations on this project. I really don't need to list the reasons for not including any VB in this project, as you already know them yourself

I'm taking my first ever set of formal computer trainnig classes starting Jan. 3. C++ is among them, and I would, as soon as i get started, love to participate using a real language


(edited by Gavin on 12-31-04 06:22 AM)
sloat

Level: 16

Posts: 27/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 12-31-04 10:44 PM Link | Quote
I would like to help, but I think I have too much on my plate already. I have like 2 or 3 projects at work and 2 personal projects which I barely feel like working on sometimes. Plus San Andreas, which is now cutting in to my sleeping time.

I almost started working on an NES emu a couple of weeks ago because I want to see if a multithreaded core with the cpu and ppu running in pseudo-parallel would perform better than traditional emulators. But I talked myself out of it for some reason.

Anyway, it sounds cool. If it's as good as NotSoFatso, I'll definitely check it out. And don't use VB.
dan

Snap Dragon
Level: 43

Posts: 311/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 12-31-04 11:45 PM Link | Quote
Coupling VB with C++ on this project would be like sticking a Ferrari engine in a Lada.

If I knew C++, I would definitely want to join this project, but all I know is bare bones console app programming.
Dish

Spiny
Level: 38

Posts: 220/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-01-05 04:11 AM Link | Quote
http://hypher.net/disch/InitialEmuLayout.txt

Just finished the preliminary layout. This is more or less how I'm planning to have it set up. I'm a little unsure about the function pointer deal for joypad data. Perhaps I could just have you call a function every frame to supply new joypad data? The of course would limit the number of joypad refreshes to one a frame... but that's probably all you'd need anyway.

The rest seems good to me. Still need to do sound stuff, but I'll worry about that later. Other options still need to be added... but for now this is good.

It's not carved in stone. If anyone out there who wants to jump on board has ideas to make it easier to use / better, I'm all ears. I have yet to do any actual work on it (i've written nothing apart from that txt file)... so it wouldn't be a bother at all ^^

Anyway... I'm seeing mostly a lot of "I'd like to, but...." except for HH's "I could, but...." ;P I'd be more than willing to help someone along if they're interested in learning (I could do the other end... I just don't want to - it's not fun for me... but I know how to do it... so I could answer Qs and stuff)

As far as the VB thing goes. The bottom line is: I don't really care. Yeah I'd prefer a single C/C++ executable... but a VB app and a C++ DLL is fine. And it's not like a person doing it in VB would stop someone else from doing it in C.

Anyway... I'm going to go ahead and get working on the emu. I'll probably have something in a few days (don't know how much I'll get done tonight )... maybe it'll be easier/more tempting for people to try out when it's actually there, ready to use rather than "I'm planning on doing this". I'll make it out like the above txt file.. so if anyone wants to start working on the other end for shits and giggles, that doc's got you covered.

And remember... no obligation. If you want to try it, go ahead... and if you get bored... don't hesitate to quit. This is a no pressure thing which is just for fun. You don't have to feel like there's a responsibility to get things done.
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 1176/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 01-01-05 04:14 AM Link | Quote
If you made it in Blitz Basic 1.68 instead of C/C++, I would sign up.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 2741/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 01-01-05 05:14 AM Link | Quote
Hmm, depending on how much of the work your emulator actually does, this could end up being one of those cool core-only ones that you can just add into anything, like those ones that can be used as Winamp/IRC plugins.

Originally posted by Disch
All the API stuff you do in VB (which I've seen you talk about in other posts) works exactly the same way in C... so I don't see why you'd have a harder time doing stuff in C than you would VB (in fact... I'd figure it'd be just the opposite).

Because 'all the API stuff' is all I can do. It doesn't have any of the built-in stuff or any real way to do debug output, and I have no idea how to create the window itself. (I know how to make them through code, but not how to put anything on them, and there must be some better way to do it.)

Don't bother setting it up specially for me, I can work with whatever. (I use Windows' API after all. )

Originally posted by Gavin
Originally posted by HyperHacker
I could do it in VB easily, including the whole pointer thing, but I don't know how you would work that into your program. (Compile it as a DLL, perhaps?)

Though really, if I'm going to be writing any emulators, I'd rather do it for GB. (I started one but couldn't get enough speed in VB and don't know enough C. )


HAHAHA, i assume your joking. otherwise you're just an asshole.

Care to explain?
Dish

Spiny
Level: 38

Posts: 223/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-05-05 11:43 PM Link | Quote
Well I got it somewhat ready:

Source
Binary

The Binary is a demo exe which has a very shoddy UI slapped together for the purpose of testing the emu. There's still some bugs I haven't fully worked out (DQ4 doesn't like to run), and my timing isn't quite perfect (Rad Racer messes up sometimes), so I'll have to touch up / rewrite the PPU. But for the most part, it's good... it just needs a little more work. I figured it's better to get something out here so that anyone interested can actually work with something that is test-able.

Be sure to read the readme(s) if you download. Lemme know if you're still interested / may be interested in the future ^^

HH (or anyone else): if you need this DLL-ifiied, I can do that for you... although I'm not sure if the function pointer thing I have going for the joypad input is very VB-friendly. I can do an alternate method if you need one.

Feedback welcome/appreciated.
paradox

Spike
Level: 41

Posts: 667/703
EXP: 455239
For next: 24906

Since: 03-16-04
From: usa

Since last post: 40 days
Last activity: 25 days
Posted on 01-09-05 07:39 AM Link | Quote
Just a small Addition i think would make your emulator much better then others.. Have a section with all known NES games (and a section to add new ones ourselves) With a screen shot and box art. (we would have to add them ourselves) I think it would be a quicker and easier way (much less room) to manage oue nes roms and hacks.
Synneth Relmn

Paratroopa
Level: 20

Posts: 39/144
EXP: 36477
For next: 5962

Since: 08-13-04

Since last post: 16 days
Last activity: 7 days
Posted on 01-09-05 09:31 AM Link | Quote
hmmm, screen shots and box arts for every game in the 700+ NES library? i see two big problems.

1. finding or creating screenshots and box art shots for over 700 games would be one helluva task

2. good images for all those would easily add several megabytes to the download size

for something that would only minorly improve it, it ain't worth it


(edited by Synneth Relmn on 01-09-05 12:31 AM)
(edited by Synneth Relmn on 01-09-05 12:32 AM)
(edited by Synneth Relmn on 01-09-05 12:34 AM)
Chickenlump

Level: 41

Posts: 460/722
EXP: 474192
For next: 5953

Since: 03-15-04
From: Columbia City Indiana

Since last post: 3 hours
Last activity: 4 min.
Posted on 01-09-05 07:56 PM Link | Quote
There are several front-end utilities for NES emulators that do all that and more, so building it into the emulator would be kind of counter productive for him, unless he decides that the front-ends aren't good enough.

Here is an example front end that is small and simple:
http://fec.emulationworld.com/nestea/

And here is one that is large and complex:
http://www.bu22.com/

More can be found:
http://www.zophar.net/frontends/nes.html
http://www.zophar.net/frontends/universal.html


Looking through all these now has me wanting to compile a complete NES snapshot archive...


(edited by Chickenlump on 01-09-05 11:07 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 2868/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 01-09-05 08:39 PM Link | Quote
That's really the frontend's job, not the emulator's. It would be kinda neat but mostly just wasteful.
Now, what would be useful is the ability, if it doesn't exist already, to specify paths for everything. I like to keep my ROMs in one folder, SRAM in another, save states in another and so on, but a lot of emus insist on bundling them all together.
paradox

Spike
Level: 41

Posts: 670/703
EXP: 455239
For next: 24906

Since: 03-16-04
From: usa

Since last post: 40 days
Last activity: 25 days
Posted on 01-10-05 12:23 AM Link | Quote
Originally posted by Synneth Relmn
hmmm, screen shots and box arts for every game in the 700+ NES library? i see two big problems.

1. finding or creating screenshots and box art shots for over 700 games would be one helluva task

2. good images for all those would easily add several megabytes to the download size

for something that would only minorly improve it, it ain't worth it



Well, Thats why i asked for this feature... so you can add them yourselves... like any other rom manager... just on the emulator.
Dish

Spiny
Level: 38

Posts: 267/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 02-07-05 07:44 AM Link | Quote
I don't know if anyone is still interested in this (or if anyone ever was)... but I figured I'd update just in case... or just for the hell of it

Binary:
http://hypher.net/disch/NES.zip (READ THE README)

No source yet (see below)

Most obvious change is sound =P. I sort of half-assed the output (just wanted to get it working). So amplitudes and stuff aren't right... and other areas can use tweaking. DMC IRQs don't work yet... nor does the DMC steal cycles like it should... plus I haven't tested APU Frame IRQs (not sure of any games that use them... Hyde told me one but I lost that list!)

Corrected a few other things... added some mappers. Quick list:

0 - (SMB, Ice Climber, Excitebike, Balloon Fight, etc)
1 - (Final Fantasy, Blaster Master, Dragon Quest 4, Megaman 2, etc)
2 - (Castlevania, Megaman, etc)
3 - (Solomon's Key.... etc?)
4 - (Megaman 3-6, SMB2-3, Kirby's Adventure, a million other freaking games)
7 - (Battletoads, Marble Madness)
9 - (Mike Tyson's Punch Out)
24 - (Akumajou Densetsu)
66 - (Dragon Power)

it will also try to run mapper 10 (Fire Emblem) and mapper 26 (Madara), but I haven't had success with those yet.

Mapper 4 emulation isn't perfect... some games still have some issues (Wolverine flickers a bit, Mother (J) runs but has slight flicker when you open the menu, some others have problems)


Gonna fix up the sound issues, work on the backend->frontend communication, and try to weed out some of the other problems before I upload the source. If you're interested lemme know and I'll get it to you ahead of time.


This is turning out pretty well... so I'll probably eventually make a real Windows front for it... but I'd still rather have someone else field that end ;D. Anyway yeah... further comments/feedback/criticism welcome.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 2037/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 02-07-05 08:28 AM Link | Quote
I wouldn't mind making a GUI for it. I'd like to learn how to program a windows interface using either the API or MFC. So, yeah not bad. Runs pretty well. Very minor graphics errors for the level selected part of Megaman 3 (could be the ROM). Looks promising
Dish

Spiny
Level: 38

Posts: 268/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 02-07-05 08:42 AM Link | Quote
Originally posted by neotransotaku
I wouldn't mind making a GUI for it. I'd like to learn how to program a windows interface using either the API or MFC.


I'd welcome any effort you'd be willing to give. And remember there's no pressure -- if you don't want to do it or you don't feel like working on it -- don't sweat it. I want a stictly "for-fun" stress free deal =)

I can help out with problems when working with the API. I'd recommend avoiding MFC. It's easier to start out, but down the line it becomes a big pain in the ass... especially for something of this nature.

I'll whip up a "blueprint" doc not unlike that "InitialEmuLayout.txt" file I linked to earlier which describes how the front end will communicate with the back end. I can't guarantee I'll have it done tonight, but I'll try. Definatly will have it by this time tomorrow (possibly some source by then too)


So, yeah not bad. Runs pretty well. Looks promising


Thank you ^^. This is the "best" full emu I've constructed so far. I'm really happy with how it's turning out.


Very minor graphics errors for the level selected part of Megaman 3 (could be the ROM).


My sources tell me that's how the game runs on the real deal (so it's a problem with the game itself, not the emulation)... but I haven't played that cart in ages so I couldn't tell you first hand. To my knowledge... emus that play it "correctly" either have bad MMC3 code or do some sort of CRC check and hackish tweak to correct the problem.


------- EDIT -----------

http://hypher.net/disch/EmuBackEnd.txt

Promised txt file (took a little longer than I thought). Should explain things pretty well. I might add a few more options and crap when I release the next chunk of source. Still some things I want to do before I do that though.


(edited by Disch on 02-08-05 07:27 AM)
Lenophis

Super Koopa
Level: 44

Posts: 364/830
EXP: 584360
For next: 26925

Since: 03-15-04
From: Duluth, MN

Since last post: 4 hours
Last activity: 3 hours
Posted on 02-08-05 01:44 PM Link | Quote
Originally posted by Disch
------- EDIT -----------

http://hypher.net/disch/EmuBackEnd.txt

Promised txt file (took a little longer than I thought). Should explain things pretty well. I might add a few more options and crap when I release the next chunk of source. Still some things I want to do before I do that though.

Bumping for Disch because of new info. Man I REALLY wish I could code as well as I wanted to.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 2071/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 02-08-05 06:19 PM Link | Quote
I'm getting 404 when trying to access the .txt file
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Who wants to make an NES emu with me? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.