+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  using NBasic?
Pages: [1]
Author Topic: using NBasic?  (Read 2 times)
frantik
Guest
« on: October 09, 2008, 09:51:58 pm »

Has anyone used nbasic, the basic interpreter which creates NES asm code?  i tried to run it but there was a problem with the included DLL

link: http://bobrost.com/nes/files/nbasic_2004_03_14.zip

edit: nevermind you have to download this DLL from his site http://bobrost.com/nes/files/cygwin1.dll

edit2:  i put the new dll, the docs and the bin files into this zip: http://www.savefile.com/files/1830762   there's also bin files for OSX and linux, as well as the source.  i uploaded it to the utils here on rhdn too Smiley

edit3:  have people used nbasic?  is it useful? i was thinking about writing my own version of a NES basic but there's this one already so i'm not sure if it's smart to reinvent the wheel...

edit4: holy shit there's a whole semester's course for learning how to program the NES on that site http://bobrost.com/nes/ including notes, slides and assignments.  niiiiice
« Last Edit: October 10, 2008, 04:28:24 am by frantik »
Disch
Guest
« Reply #1 on: October 10, 2008, 07:42:18 pm »

I haven't used Nbasic or looked at it at all.  But I don't really like the idea of applying a HLL to the NES for the simple reason that the NES is dreadfully slow, and seemingly simple tasks can burn up tons of CPU time if they're not compiled just so.  Not to mention the added difficulty involved in debugging -- since you have to look at the 6502 in a debugger to see what's going on, and it's no fun having to decipher a compiled version of your own code.

Also, a HLL pretty much makes any timing work impossble.

I can understand wanting to use a HLL to cut down on the boring repetitive stuff that you have to do repeatedly -- but that's what macros are for -- and any assembler worth using has them.


Using a HLL for a quick test program or something is fine I guess... but if you want to code something that needs to have decent performance (ie:  a game), I just can't see a HLL being the way to go -- the NES just isn't fast enough to absorb the compiler overhead.  And being familiar with the subtle things the NES does makes all the difference not only in terms of tricks you can do, but also debugging capabilities (hard to track down bugs like spilling out of VBlank, or framerate slowdown when you don't have any idea how much time your code is taking).  You lose a lot of performance and potential when you move to an HLL.

But take that for what it's worth.  In the end I guess it only matters what you find useful.  So if you like nbasic -- then use it!  :thumbsup:
frantik
Guest
« Reply #2 on: October 10, 2008, 10:52:36 pm »

yeah of course you lose the "fine control" sometimes needed whenever you move up from machine code.  this language is pretty simple and is almost more of a complex set of asm macros itself, except for maybe the operators and if commands.  it's kinda like pseudo code or something

I mostly started the thread wondering how to get it to work, but now that i've gotten it to work, checking out some of the source code programs have really helped me understand the basics of the nes. most of the example code is stripped down to what basically amounts to test cases.  
Hamtaro126
Guest
« Reply #3 on: October 11, 2008, 01:33:29 pm »

Quote from: frantik on October 09, 2008, 09:51:58 pm
Has anyone used nbasic, the basic interpreter which creates NES asm code?  i tried to run it but there was a problem with the included DLL

link: http://bobrost.com/nes/files/nbasic_2004_03_14.zip

edit: nevermind you have to download this DLL from his site http://bobrost.com/nes/files/cygwin1.dll

edit2:  i put the new dll, the docs and the bin files into this zip: http://www.savefile.com/files/1830762   there's also bin files for OSX and linux, as well as the source.  i uploaded it to the utils here on rhdn too Smiley

edit3:  have people used nbasic?  is it useful? i was thinking about writing my own version of a NES basic but there's this one already so i'm not sure if it's smart to reinvent the wheel...

edit4: holy shit there's a whole semester's course for learning how to program the NES on that site http://bobrost.com/nes/ including notes, slides and assignments.  niiiiice

I really do not like it at all. and NESDEV.COM's BBS says it is not good at all, especially the incompatibility with the REAL NES console. I already wrote a review for that utility.

If you want a new, but better NES basic: modify the source code from Batari Basic instead. Although it is used for ''Atari 2600 VCS'' ASM code, It can be recoded to output NES code using DASM.

Here is Batari Basic (with source code included): http://bataribasic.com/batari_Basic_version_1.0.zip

And you can find DASM here: http://dasm-dillon.sourceforge.net/ (This can be used to create NES games. Although it is primarily configured to Atari 2600 VCS and FairChild Channel F ROM files.)
Yauch
Guest
« Reply #4 on: October 11, 2008, 05:31:05 pm »

This might be slightly off topic but what do you guys think of neshla?
 http://neshla.sourceforge.net/
Disch
Guest
« Reply #5 on: October 11, 2008, 09:30:52 pm »

I actually meant to mention NESHLA in my previous post but it slipped my mind.

I'm not all that familiar with it, but I know it was developed and used by that guy who was working on that Grand Theftendo game (that never actually came about).  From what I understand, it's not really a full HLL, but just an assembler with several additions (similar to what frantik described NBasic to be).  But again I haven't actually used it -- that's just my impression of it.

Something like that is probably very usable.  I'd probably still personally prefer to stick to the lowest level possible... but I'm insane like that.  I'm just mainly against something that completely seperates you from the 6502 (like the cc65 C compiler -- but it's bundled ca65 assembler is great).
frantik
Guest
« Reply #6 on: October 13, 2008, 01:08:54 am »

cool i'll check out neshla Smiley

i mostly want something that will make it easier as far as if statements cause i always forget about which branch opcode is use for which (cept for like beq and bne lol)  or i dunno i just hate writing psuedo code and then hand doing the asm.. would rather write pseudo code with a structured language and then have a script convert it Cheesy
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC