Tool to compile Family Basic program to .NES file

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

lbarasc
Posts: 20
Joined: Sun Jun 09, 2013 12:44 am

Tool to compile Family Basic program to .NES file

Post by lbarasc »

Hi,

I discover a tool to compile Family Basic program to .NES file : STTONES

So you can easily develop small game on NES with BASIC language and compile it !

How it works ? STTONES convert VirtuaNES savestates of Family Basic to .NES ROM file.

Tutorial :

1 - Run Family Basic V3 rom on VirtuaNES

2 - Type your program on Family Basic, don't run program before convert it with STTONES

3 - Save state with VirtuaNES, it creates .st0 file on VirtuaNES state folder)

4 - exit VirtuaNES

5 - drag and drop your .st0 file to STTONES.EXE it creates .NES file !

6 - Run your .NES rom file on emulator or

download the STTONES1000.zip on skydrive :

https://skydrive.live.com/redir?resid=6 ... 06dB-h0IPg

Step by step operations (Japanese but screenshots) :

http://messatu.wordpress.com/2013/02/24 ... %E3%81%99/

I hope it we help us to easily develop on Famicom.
Pokun
Posts: 2293
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Tool to compile Family Basic program to .NES file

Post by Pokun »

It works! Thank you this is great! :D

However, I loaded a program from tape but I couldn't get it to work in SSTONES. I hope I can convert my other FB programs stored in other formats. It's still great that there's a way to do it though. :)

Now I'm curious if the generated NES-files work on real hardware. Anyone with a flash cart can check (I don't have one) , since the state files that comes with SSTONES contains five sample games ready to be converted.
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Tool to compile Family Basic program to .NES file

Post by slobu »

THIS IS AMAZING!!!!! Finally, BASIC enthusiasts can make games on the good 'ol NES ^_^

The limitation of not being able to RUN your program seems harsh. How would you debug your BASIC without running it?
zzo38
Posts: 1085
Joined: Mon Feb 07, 2011 12:46 pm

Re: Tool to compile Family Basic program to .NES file

Post by zzo38 »

Does it mean you cannot run the program at all or does it mean that the program has to be not running at the time the save state is created?
[url=gopher://zzo38computer.org/].[/url]
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Re: Tool to compile Family Basic program to .NES file

Post by B00daW »

Can you please attach it in your post?
Pokun
Posts: 2293
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Tool to compile Family Basic program to .NES file

Post by Pokun »

OK loading a game from tape works now, not sure what I did wrong before. Also running the game before or even while you make the save state doesn't seem to matter, so debuging shouldn't be a problem. I'm not sure if it matters but I typed CLS and then CLEAR before I made the save state and it worked.

Virtuanes' VTP-tape files and Nestopia's TP-tape files are the same, just a different extension. It's usefull to know since Nestopia can use code in the clip-board as a macro.
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Tool to compile Family Basic program to .NES file

Post by slobu »

The _README.TXT says something about

Base : MMC3
Mapper : 1
PRG-ROM : 32k
CHR-ROM : 32k

Does that mean if one wants to make an actual cart I'd have to find a donor cart with MMC3 chip and the same PRG/CHR specs?
User avatar
tokumaru
Posts: 12254
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Tool to compile Family Basic program to .NES file

Post by tokumaru »

slobu wrote:Does that mean if one wants to make an actual cart I'd have to find a donor cart with MMC3 chip and the same PRG/CHR specs?
You can use smaller ROMs than those in the donor cart.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Tool to compile Family Basic program to .NES file

Post by thefox »

slobu wrote:The _README.TXT says something about

Base : MMC3
Mapper : 1
PRG-ROM : 32k
CHR-ROM : 32k

Does that mean if one wants to make an actual cart I'd have to find a donor cart with MMC3 chip and the same PRG/CHR specs?
Dunno what that info is about, because the converted example games use/need MMC1 with 32KB PRG, 8KB CHR and 8KB WRAM.

On a sidenote, the example games are surprisingly good, too.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Pokun
Posts: 2293
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Tool to compile Family Basic program to .NES file

Post by Pokun »

The readme says the generated NES-files will have those listed specs though. Maybe a mistake.

It also says that you can use V2 (or V1 I guess if you have that) as long as you don't use parts of the memory that's not the same in V3, or otherwise mess with the CALL command or such in a way that's incompatible with V3.
The instructions is basically the same as on the homepage. None of them mentions that you can't run your program before making the stand-alone. Nothing else interesting in there.
thefox wrote: On a sidenote, the example games are surprisingly good, too.
Yeah they are really well made! I had no idea you could make such bosses in Family Basic.
nitrofurano
Posts: 10
Joined: Sun Mar 21, 2010 3:07 pm

Re: Tool to compile Family Basic program to .NES file

Post by nitrofurano »

lbarasc wrote: download the STTONES1000.zip on skydrive :
https://skydrive.live.com/redir?resid=6 ... 06dB-h0IPg
it looks like a broken link (from microsoft, i'm not surprised at all...)

is there any other mirror link of it, like from googledrive, dropbox, etc.?
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Tool to compile Family Basic program to .NES file

Post by slobu »

nitrofurano wrote:
lbarasc wrote: download the STTONES1000.zip on skydrive :
https://skydrive.live.com/redir?resid=6 ... 06dB-h0IPg
it looks like a broken link (from microsoft, i'm not surprised at all...)

is there any other mirror link of it, like from googledrive, dropbox, etc.?
All the rest of the links off of Google seem to be dead too. I kind of lost interest after many on hear noted that the results cannot be distributed as your own game legally. If I find a download I'll see if I can save it for you. Any chance you'll try to make a ZX Basic port for NES? :)
tepples
Posts: 22414
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Tool to compile Family Basic program to .NES file

Post by tepples »

I plan to write a BASIC interpreter for NES as soon as someone figures out how to use an MCU to adapt the PS/2 keyboard's wire protocol to the 7-pin port of the NES. Otherwise, I'd be looking at $100 for a keyboard plus more for an ENIO board.
nitrofurano
Posts: 10
Joined: Sun Mar 21, 2010 3:07 pm

Re: Tool to compile Family Basic program to .NES file

Post by nitrofurano »

slobu wrote:
nitrofurano wrote:
lbarasc wrote: download the STTONES1000.zip on skydrive :
https://skydrive.live.com/redir?resid=6 ... 06dB-h0IPg
it looks like a broken link (from microsoft, i'm not surprised at all...)

is there any other mirror link of it, like from googledrive, dropbox, etc.?
All the rest of the links off of Google seem to be dead too. I kind of lost interest after many on hear noted that the results cannot be distributed as your own game legally. If I find a download I'll see if I can save it for you.
thanks! this would allow me to try a kind of tokenizer for .nes files, as useful as zmakebas or zxtext2p

Any chance you'll try to make a ZX Basic port for NES? :)
i'm dreaming on it!!!!! - i actually talked with Boriel about this - and that is the toughest part, the actual ZX Basic is all structured on Z80, and would be great if someone could help recoding that Z80 part into 6502, so we could not only target NES, as we could Apple-I/II, Atari Lynx, some Atari 8bit hardware, PC-Engine, C64, etc.

for now, i'm in that part on how can i learn 6502 assembly from what i humbly think i know from Z80, and perhaps being able to do similar things one day - the good thing is the ZX Basic allows inline-assembly, and we can create custom libraries quite easily (via #include) - the actual source of ZX Basic is plenty of routines for calculation that i have no idea how it would look like in 6502 assembly, and for example, i'm struggling to find ready 6502 examples of code that i use all the time, like for 16bit calculations, or ldir-like stuff

so, what we really need is help from people that could help converting ZX Basic to compile to 6502 from what we have there for Z80 - i think it is not that impossible to do, but it is really something far beyond my humble knowledge and skills... :S
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Tool to compile Family Basic program to .NES file

Post by slobu »

There is already a language called Atalan that targets both the 6502 and Z80
http://atalan.kutululu.org/

Maybe you can use that to contrast and compare.
Post Reply