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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Discuss Mikhail Tkach's InfoNES port
« previous next »
  • Print
Pages: 1 [2] 3 4

Author Topic: Discuss Mikhail Tkach's InfoNES port  (Read 26165 times)

Offline criznach

  • Member
  • *
  • Posts: 17
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #15 on: October 14, 2007, 11:41:35 PM »
MikeT - what version of InfoNes is this built on?  I thought I'd do some profiling in visual studio to see where the inner loops spend most of their time.
Logged

Offline cool_walking_

  • Rockbox Expert
  • Member
  • *
  • Posts: 695
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #16 on: October 15, 2007, 04:00:14 AM »
Quote from: doc/readme.html
InfoNES v0.97J RC1

Yes, I do have a habit of answering questions addressed to other people.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #17 on: October 15, 2007, 04:06:47 AM »
It's not the worst habit ever!   :)
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline criznach

  • Member
  • *
  • Posts: 17
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #18 on: October 15, 2007, 01:26:57 PM »
Quote from: cool_walking_ on October 15, 2007, 04:00:14 AM
Quote from: doc/readme.html
InfoNES v0.97J RC1

Yes, I do have a habit of answering questions addressed to other people.

Thanks!  I guess I couldn't see past all the japanese in the readme...

Funny though, when I build the windows version of .97JRC1 in visual studio, it uses the cpp files.  The rockbox version uses the .c files.  I haven't checked to see if there are differences yet.

I was able to profile the windows version in VC6 and learned a few things.  The sound code eats a lot of processor time.  So I suspect that adding sound for rockbox is going to be a challenge.  Also, the K6502_Read function eats around 25-30% of the cpu just reading opcodes and parameter bytes from ROM.  The windows version runs the emulator in a separate thread.  I'm not sure how or if that would benefit rockbox, but I'll continue to look at it.
Logged

Offline ComposerDude

  • Member
  • *
  • Posts: 53
  • ComposerDude - Go Kubuntu!
    • RainfallWare - The home of ComposerDude
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #19 on: October 15, 2007, 02:42:39 PM »
Rockboy uses one thread for both sound and graphics emulation; this is because of resource eating. On some targets, the sound is pretty good, on others it's unbearable. This is also the reason why there's an option to turn the sound off in Rockboy, and why disabling sound speeds up the game so dramatically.

I don't know what it would take to write this into InfoNES, but it would certainly make it more compatible with other supported DAPS, if my logic serves correctly.

Enjoy the day, fellow travelers,
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 criznach

  • Member
  • *
  • Posts: 17
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #20 on: October 16, 2007, 02:00:49 AM »
Quote from: MikeT on October 09, 2007, 08:45:32 PM
No, no working sound unfortunately.

I downloaded your broken sound files and discovered a few clues...

First, the performance hit from sound isn't as big as I thought, because if I turn on the mute flag to prevent InfoNES_pAPUVsync from being called, the framerate doesn't increase by much.  I guess profiling a windows build of InfoNES isn't going to give me very useful data.

It looks like rockbox's pcm_play_data function is expecting stereo samples, while infones is feeding it mono samples.  So I tried doubling the final buffer and writing each byte twice.  I then pass pcm_play_data samples*2 as it's length parameter.  This makes the sound almost tolerable.  It's still very chunky and not pleasant.  But it sounds a bit more like what I expect :)  I thought changing the pAPU_QUALITY define and the sample rate would improve the performance, but something isn't right when I do that.
Logged

Offline criznach

  • Member
  • *
  • Posts: 17
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #21 on: October 16, 2007, 02:00:18 PM »
I just noticed that the InfoNES_Wait function is empty in the system_rockbox code.  That normally regulates the frame skipping and times the sound buffers to prevent skipping.  I think implementing that using another platform as a model will even things out.  Look at the windows src for a good example.  On windows the timer runs in the UI thread and the emu thread checks a flag.  On rockbox, we could put the timer in a thread or if there are other benefits, put the emu in another thread.  Looks like multi-core firmware is just about ready to tinker with :)

MikeT: have you been able to work on the InfoNes lately?
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #22 on: October 16, 2007, 02:05:33 PM »
criznach, please "modify" your posts instead of double posting.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline MikeT

  • Member
  • *
  • Posts: 5
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #23 on: October 16, 2007, 03:39:54 PM »
Quote from: criznach on October 16, 2007, 02:00:18 PM

MikeT: have you been able to work on the InfoNes lately?

I've been wrecking my brains out trying to understand why sim build was acting so strangely. Turns out I forgot rb->yield(). So I've been working on it but haven't got much done.
Logged

Offline criznach

  • Member
  • *
  • Posts: 17
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #24 on: October 16, 2007, 07:37:22 PM »
Quote from: Chronon on October 16, 2007, 02:05:33 PM
criznach, please "modify" your posts instead of double posting.

Oops - what did I double post?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #25 on: October 16, 2007, 08:29:45 PM »
Double posting means not only "posting the same thing twice" but "creating a second post in the thread immediately after another post of your own" and can be avoided by using "Edit" to add new information when nobody else has posted.

Your post will still show up with the (New) tag next to it, and the rule is primarily as part of the rule against bumping posts, but it's easier all around if it's enforced evenly.
Logged

Offline fugot

  • Member
  • *
  • Posts: 69
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #26 on: November 11, 2007, 07:06:26 PM »
could someone make a build for a 30gb 5g ipod so i can test it out?
Logged
http://ankenyschools.000space.com/

Offline cool_walking_

  • Rockbox Expert
  • Member
  • *
  • Posts: 695
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #27 on: November 12, 2007, 08:42:47 AM »
Quote from: fugot on November 11, 2007, 07:06:26 PM
could someone make a build for a 30gb 5g ipod so i can test it out?

This has a couple of other patches in there because I'm too lazy to remove them. I don't have a 30GB to actually test this on.  I'm an idiot, I'm not responsible when your iPod explodes.. blah blah blah.

[Link removed by Admin: Unsupported builds do not belong here]
« Last Edit: November 12, 2007, 10:54:26 AM by Llorean »
Logged

Offline fugot

  • Member
  • *
  • Posts: 69
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #28 on: November 17, 2007, 09:56:51 PM »
im trying to patch my self. i downloaded the source files and in the readme it says "2: add "ines" to $ROCKBOX/apps/plugins/Subdirs" what does that mean?
Logged
http://ankenyschools.000space.com/

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: Discuss Mikhail Tkach's InfoNES port
« Reply #29 on: November 18, 2007, 06:26:09 PM »
Quote from: criznach on October 16, 2007, 02:00:49 AM

It looks like rockbox's pcm_play_data function is expecting stereo samples, while infones is feeding it mono samples.  So I tried doubling the final buffer and writing each byte twice.  I then pass pcm_play_data samples*2 as it's length parameter.  This makes the sound almost tolerable.  It's still very chunky and not pleasant.  But it sounds a bit more like what I expect :)

pcm_play_data expects interleaved 16 bit samples so writing each 16 bit word twice should work better.
Logged

  • Print
Pages: 1 [2] 3 4
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Discuss Mikhail Tkach's InfoNES port
 

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

Page created in 0.123 seconds with 14 queries.