This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Burn: making .nes rom file from Ruby

Burn: making .nes rom file from Ruby
by on (#127378)
Let me please introduce my hobby project, which make .nes application from Ruby.

Burn is a toolkit to create .nes executables. Internally Burn translate Ruby DSL into C source code to make use of cc65.

Kindly visit project page for more detail: https://github.com/remore/burn

Burn is now version 0.1.3 which means still under development, so you might find some bugs or potential problem. Any feedbacks including minor bug report from homebrewers like you is highly appreciated.

Note that burn is designed for entry level 8-bit application developer as well. I'm quite not sure if you like it or not.
Re: Burn: making .nes rom file from Ruby
by on (#127379)
A few things you might like to know:

The 6502 is particularly poorly designed for pointer arithmetic, beyond the very specific cases that look like char * const thing; thing[byte] and char ** const thing; thing[byte][0]. As a result, parameter passing on the stack is kinda problematic. CC65 does, at least, provide the optimization flag to not allocate local variables on the stack (and instead allocate them permanently).

A few people around here on the forum have specifically written languages or language extensions that attempt to play to the 6502's strengths, while discouraging programming patterns that don't compile efficiently: qbradq's uc65 and Movax12's ca65hl.

I would be skeptical that any arbitrary new emulator would be particularly accurate: I pulled the jsnes repository and ran it against cpow's very useful archive of NES test roms: it fails most of them. Developing against inaccurate emulators produces programs that won't run on the actual hardware. Some of the tests even cause both firefox and chromium to lock up.

I recommend nestopia, nintendulator, punes, and/or bizhawk for accuracy.
Re: Burn: making .nes rom file from Ruby
by on (#127381)
I scanned over some examples that seemed really cool, but I wouldn't expect the machine code to be very well optimized. Maybe good enough for some simple tasks, but a complex game would be difficult. This idea reminded me of: http://ahefner.livejournal.com/20528.html especially the music code/data.
Re: Burn: making .nes rom file from Ruby
by on (#127415)
lidnariq wrote:
Developing against inaccurate emulators produces programs that won't run on the actual hardware. Some of the tests even cause both firefox and chromium to lock up.

I recommend nestopia, nintendulator, punes, and/or bizhawk for accuracy.


I was not aware of this at all, thank you so much for kind advice. Totally agreed, sounds like better to choose much accurate one.

Movax12 wrote:
I scanned over some examples that seemed really cool, but I wouldn't expect the machine code to be very well optimized. Maybe good enough for some simple tasks, but a complex game would be difficult.


So true as of now, I'm also not content with those incapability. Thanks for your feedback, I will try to improve them in near future.
Re: Burn: making .nes rom file from Ruby
by on (#127764)
I'm definitely interested in "higher level" languages for NES development. I got as far as installing Ruby 1.9.3 and compiling the main.nes (which failed to run properly in the emulator.)

I'll keep an eye out for new releases and try again. As a side your audience is probably going to be mostly using Windows.