About  Blog

Playpower.org

PLAYPOWER

We support affordable, effective, fun learning games. We're starting with an existing $10 TV-computer as a platform for learning games in the developing world.

Programming the NES in BASIC?

In 2004, Bob Rost taught a class about programming NES games at Carnegie Melon University.  He built a compiler that enables a person to program NES games in BASIC.   He calls the framework nBASIC, and it is available on this page.  This makes programming so much easier!

Anuj and Jesse have been using nBASIC to start programming Ghanaian content on the $12 computer.  I told Bob about their work, and he replied to me saying:

Games from Bobs class

Games from Bob's class

I’m glad that my course materials have been helpful for you, and I hope the nbasic compiler and other tools prove to be beneficial as well (aside from their occasional bugs). Don’t hesitate to email again if you have any specific questions or design problems that you think I could help to answer.

As a side note, based your previous email, I think you’ll be pleasantly surprised at the efficiency of nbasic’s output in most cases, and the complexity of the games it will allow you to create in any given time frame. You are of course welcome to use, abuse, change, and distribute the source code in any way you like.

Best of luck to you and your team.
-Bob

That is incredible! Do you think this community could help improve the efficacy of nBASIC?  If we could program games using such an accessible language, this would substantially reduce the time, effort, and cash required to write a game in assembly code.  If we want to promote local game production, there needs to be an easier way to program.

Thanks, Bob!

  • nitrofurano
    an important url about Bob Rost's nBasic: http://bobrost.com/nes/files/nbasic_manual.html
  • nitrofurano
    would be great nBASIC being gpl-license, ported to Linux, etc. ! :)
  • Bob Rost is a very nice guy--he works downtown in Pittsburgh. The code is
    open source and I'm sure he'd be thrilled to have someone port it to linux.
  • nitrofurano
    would be great contacting Bob Rost, specially if he can be part of this playpower.org project. His nBasic is awesome and very useful (Cory Arcangel did 'Super Mario Clouds' with nBasic, for example) - but it lacks in some issues:
    - there are not so many snippets available to work on (i want to contribute with my own, but it were very hard to start)
    - some 6502asm code sequences could be simplified with commands like 'poke', 'vpoke' (poke on video memory, like msx-basic), 'vpokehex' (would allow you to poke a hexdump string starting on an address, like at namespace or palette area)
  • nitrofurano
    Awesome! But anyway, we must have some care about the 'open source' term - for example, Microsoft created recently some open source licences (some related with Mono, i think) which none are software-libre like GNU-GPL.
  • Doc Van Thorp
    This basic compiler would speed cross-development of NES software useing PCs, but a worthy goal would be compilers and tools for creating games natively on the NES itself.

    What kind of storage should the $12 machine have? Low-capacity SD cards are getting pretty cheap, and are fairly easy to interface to. You don't have to pay licensing if you don't use the encrypted file mode (which hardly anyone does anyway). You can fit hundreds of NES games into a pretty small SD card, and the SD card would be extremely useful for native software development that requires compilation from source files. For a small system like an NES, this would be better than a hard drive.
  • Matthew Swank
    High level options could include FORTH-- interactive but still efficient and close to the metal, or if you want even higher level facilities, Lisp.

    See http://www.6502.org/source/ for a 6502 Forth interpreter
    See http://zwizwa.be/archive/staapl.html for an example scheme/forth compiler for an 8 bit PIC microcontroller.
blog comments powered by Disqus