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
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  PLUGIN_RAM full and NES emu
« previous next »
  • Print
Pages: [1]

Author Topic: PLUGIN_RAM full and NES emu  (Read 4299 times)

Offline MikeT

  • Member
  • *
  • Posts: 5
PLUGIN_RAM full and NES emu
« on: September 08, 2007, 07:01:43 AM »
I'm startting to port InfoNES (an NES emulator) to Rockbox ( http://www.geocities.com/tm_lockheart/ ).  however I get an error [region PLUGIN_RAM is full] when I try to increase my memory usage. Is there an easy way to overcome this limit?

Also, is there anyone else working on an NES emulator for Rockbox?
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: PLUGIN_RAM full and NES emu
« Reply #1 on: September 08, 2007, 07:47:39 AM »
Try increasing PLUGIN_BUFFER_SIZE in you targets' config-*.h file in firmware/export
This hould only be done while developing though and the emu shouldn't require a buffer increase. If you really need more ram you can steal the music buffer.
Logged

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: PLUGIN_RAM full and NES emu
« Reply #2 on: September 08, 2007, 09:29:37 AM »
As nls said, increasing PLUGIN_BUFFER_SIZE would only be a temporary solution - it's unlikely that this value will be increased in the official Rockbox builds.

Rockbox has a 512KB (on swcodec targets, only 32KB on hwcodec) plugin buffer, where the plugin.rock file loaded and executed.  So your main binary (and constant/initialised data) can not exceed this size.

If your plugin needs more than 512KB to run, then the plugin needs to grab the main audio buffer (around 28MB on most targets) and manage that memory itself.

Another issue to be aware of is stack size - plugins run in the main thread, which has an 8KB stack.  So you can't declare large buffers locally inside functions - they need to be global (or marked static).  This is a problem you will only experience on an actual device - the UI sim has much larger stacks.

The other large plugins (rockboy, doom, mpegplayer) all do this, so you may find their source helpful.  Or come to IRC if you have questions.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: PLUGIN_RAM full and NES emu
« Reply #3 on: September 08, 2007, 09:40:46 AM »
Quote from: MikeT on September 08, 2007, 07:01:43 AM
Also, is there anyone else working on an NES emulator for Rockbox?

Yes, I was helping research one at this forum thread:

http://forums.rockbox.org/index.php?topic=11843.0

The plugin progress will be slow, since this is being written by two guys who are learning C, and are students.

Our base is TuxNES, which is also open source and under the GPL. Research is already completed and some very preliminary work was started with coding. The TuxNES plugin borrows code from FCE Ultra (some mapper and sound support) and TuxNES itself (6502 emulation and control code).

Have you made sure that InfoNES is GPL'd before starting this work? If you want a reason why this is so, ask any of the developers or admins here why we're very strict on GPL code.
Logged
Former Rockbox dev. Rising from the ashes...

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

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: PLUGIN_RAM full and NES emu
« Reply #4 on: September 08, 2007, 10:22:16 AM »
Well the source archive contains a copy of the GPL v2, but the front page says this:

Quote
   Please mail me, when you redistribute this software
   Please mail me, when you introduce this software on your magazine, etc
   If you do not agree with these terms do not use this software
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: PLUGIN_RAM full and NES emu
« Reply #5 on: September 08, 2007, 12:44:26 PM »
Sounds like he's not fully complying with the GPL v2. I wouldn't take the risk.
Logged
Former Rockbox dev. Rising from the ashes...

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

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: PLUGIN_RAM full and NES emu
« Reply #6 on: September 08, 2007, 04:59:17 PM »
You could just email them and ask for confirmation that the source is under the GPLv2.  If they consent to GPL licensing, then that doesn't really matter.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  PLUGIN_RAM full and NES emu
 

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

Page created in 0.098 seconds with 14 queries.