Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  NES plugin - a proposal
« previous next »
  • Print
Pages: 1 2 3 [4] 5 6 ... 10

Author Topic: NES plugin - a proposal  (Read 62469 times)

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: NES plugin - a proposal
« Reply #45 on: August 03, 2007, 03:45:07 PM »
ComposerDude said he was taking care of that. But I'm going to contact them anyway just to make sure.

What I'm going to do for the plugin is gather mapper support to see if we can build on the somewhat lacking mapper support in TuxNES.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: NES plugin - a proposal
« Reply #46 on: August 03, 2007, 04:39:23 PM »
Developer contact hasn't been established with TuxNES. Thankfully, it is a sourceforge project, so it should minimize any confusion involved in getting in touch with the original dev.
Logged
Ipod Nano 1G 1GB, iRiver H320
Never trust a four-color window without a frame. You'll only see a penguin on the other side; trust the penguin any day!
Plugin Progress at the TuxNES Port Development page

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: NES plugin - a proposal
« Reply #47 on: August 03, 2007, 04:45:31 PM »
Another possibility is to look for an open source emulator for an embedded target (an NES emulator for PocketPC or Palm for example). Even if it's not from the same codebase, it's possible you could get some tips from the people who've worked on them in regards to what parts of NES emulation provided the greatest difficulty in limited environments.
Logged

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: NES plugin - a proposal
« Reply #48 on: August 03, 2007, 05:56:28 PM »
Okay... So has anyone told Llorean that he has a view of himself that's way too low? His suggestion to get in touch with the Devs at TuxNES brought me to Mike Melanson, one of the devs at FFMpeg. TuxNES was his back in 2001.

He replied very quickly and helpfully (response time: 9 min.!) with this:
Quote
You may wish to check into the FCEUltra emulator or other open source
options as their CPU cores tend to be a bit more portable.

Good luck. And don't hesitate to consult me further on this project. I
still love NES hacking.

I'm replying to him right now. ;D
Logged
Ipod Nano 1G 1GB, iRiver H320
Never trust a four-color window without a frame. You'll only see a penguin on the other side; trust the penguin any day!
Plugin Progress at the TuxNES Port Development page

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: NES plugin - a proposal
« Reply #49 on: August 03, 2007, 06:04:38 PM »
Conclusive proof that my sole job here isn't simply to discourage people. :)

Maybe you can adopt code from both projects, anything you can make portable out of TuxNES, then deal with the more complicated code only when it's actually the easier solution?
Logged

Offline Multimedia Mike

  • Member
  • *
  • Posts: 13
  • Multimedia Gangster
    • Breaking Eggs And Making Omelettes Blog
Re: NES plugin - a proposal
« Reply #50 on: August 03, 2007, 06:27:18 PM »
Hi!

Multimedia Mike here. I used to be the maintainer of the TuxNES project that has been discussed here. I haven't actively worked on it since 2001, having moved onto open source multimedia hacking (including a little project you may have heard of called FFmpeg). However, I am still interested in NES emulation on every system that ever will exist.

Plus, I just got my first iPod (video/5.5gen/80GB) 2 weeks ago.

I'm flattered for my little old project that you all are interested in porting TuxNES. However, I should warn you that it is designed to run on x86 machines by dynamically translating NES 6502 CPU instructions -> x86 instructions. Porting to another arch is non-trivial for this reason. There was some experimental work on getting a more general-purpose C core into the program (primary impetus was to make it work on a Sega Dreamcast). I think some of that work may have made it into the SF CVS tree, but I'm not sure of its state.

FCE Ultra is what I use these days if I'm not using my actual top-loading model NES. As you have observed, it's quite large. But hey, any codebase is. I'm not sure how it's being maintained these days. AFAIK, the original author abandoned it and development has splintered into a few factions.

Another option that flies under the radar, but you are encouraged to investigate (because it was written by a NES hacker who really knows his stuff): nofrendo ( http://www.baisoku.org/ ). All C. All GPL. Disregard the adjective on his page about the emulator's quality; he's quite the perfectionist. He also has shatbox on his site, but that has a ton of x86 assember.
Logged

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: NES plugin - a proposal
« Reply #51 on: August 03, 2007, 06:52:12 PM »
Thanks, Mike. I'll have a look at nofrendo over the weekend (kind of like what I did last weekend with TuxNES  :D) and see what it holds.

Llorean: As for that suggestion, that could be something we could do. I'm guessing that it may take more of going back to my book of C. :) As for rad skills, most of what I did was back in 2000 with my dad teaching me perl and then C... considering that it was my dad doing the teaching, it's taking time to unrust. But I'll get there.
Logged
Ipod Nano 1G 1GB, iRiver H320
Never trust a four-color window without a frame. You'll only see a penguin on the other side; trust the penguin any day!
Plugin Progress at the TuxNES Port Development page

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: NES plugin - a proposal
« Reply #52 on: August 03, 2007, 06:56:06 PM »
Well, my suggestion is more "take the route that turns out easiest for you, but don't overlook mixing and matching code when doing so." Of course people can follow up and improve the code later. :)
Logged

Offline Multimedia Mike

  • Member
  • *
  • Posts: 13
  • Multimedia Gangster
    • Breaking Eggs And Making Omelettes Blog
Re: NES plugin - a proposal
« Reply #53 on: August 03, 2007, 07:08:46 PM »
So you want to port a NES emulator? Here are some things to think about:

What do you envision for the control scheme? How will the user input up, down, left, right, select, start, B, and of course, A?

Your first goal should be to get a simple game up and running with just graphics; leave sound for later. When I say 'simple', I mean "Super Mario Bros." Technically, it's the simplest type of NES game because it has no special mapper hardware.

NES Emulation 101: Load the .nes file into the appropriate (emulated) memory areas (main memory and video memory). Initialize the CPU state. Load the 6502 CPU reset vector into the program counter. Emulate the CPU for a number of machine cycles equivalent to the time it takes to draw a scanline. Draw one scanline based on the state of the PPU registers and memory. When you have drawn 240 scanlines, draw the completed image on the screen. Repeat the process 60 times per second. There are more details, but this is the basic idea.

When all of that is working, hook up more memory mappers modules to support more complex games. Start with mapper #1. Then #3. Then #2 (Mike Tyson's Punch-Out!!). Then, as many more as you can.

Then get the sound working.

I hope this provides a basic roadmap.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: NES plugin - a proposal
« Reply #54 on: August 03, 2007, 07:10:56 PM »
For a reference, we do have a Gameboy emulator up and running on most of our hardware, so in terms of controls they can simply be treated as equivalent.
Logged

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: NES plugin - a proposal
« Reply #55 on: August 03, 2007, 07:37:03 PM »
My guess is that along the road somewhere (such as at the time that the emulator is down to barebones!) we can actually adapt some of rockboy's code to suit our needs.
Logged
Ipod Nano 1G 1GB, iRiver H320
Never trust a four-color window without a frame. You'll only see a penguin on the other side; trust the penguin any day!
Plugin Progress at the TuxNES Port Development page

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: NES plugin - a proposal
« Reply #56 on: August 03, 2007, 07:57:24 PM »
The control code may be the best adaptation, for one. Since the NES and the Game Boy have the same control scheme, we can adjust it to fit the NES plugin, and use the same schemes that Rockboy uses now.

I won't be able to get to my PC for much more of the evening, but to ComposerDude, Llorean, and Multimedia Mike: keep me up to speed with what's going on. I'm going to do some research on the NES mapper sets and start reading my C books again.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: NES plugin - a proposal
« Reply #57 on: August 03, 2007, 08:04:11 PM »
LambdaCalculus379: TWiki page is up and ready for input. I'm going to gather what I've got so far and get it on the page tomorrow.

As for all of the help I've seen come together in less than a week...

Thanks,
ComposerDude
Logged
Ipod Nano 1G 1GB, iRiver H320
Never trust a four-color window without a frame. You'll only see a penguin on the other side; trust the penguin any day!
Plugin Progress at the TuxNES Port Development page

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: NES plugin - a proposal
« Reply #58 on: August 03, 2007, 08:10:10 PM »
ComposerDude: Added my name to the wiki page. I'll put my findings up as I find them as well.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: NES plugin - a proposal
« Reply #59 on: August 03, 2007, 08:14:56 PM »
While I'm not getting directly involved (I never do ;)) I'll be watching and I'm around to help direct you to resources we've got here at Rockbox.
Logged

  • Print
Pages: 1 2 3 [4] 5 6 ... 10
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  NES plugin - a proposal
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.087 seconds with 14 queries.