Family BASIC Lessons

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Family BASIC Lessons

Post by lancuster »

Hi there. I'm looking for video tutorials for this program. Is there anyone who can help me with this?
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

I haven't seen any video tutorials, but the manual does a pretty good job in teaching how to use it from page 16.
The manual is fully translated by me and another person. I've also translated the most important parts of the V3 manual.

http://www.famicomworld.com/forum/index ... pic=8876.0 Family BASIC manual
The most important part of the manual (not translated by me) is page 16 to 114, and has been compiled to a PDF. The rest can be found in the text file in the attachment, but unfortunately it hasn't been inserted yet.
The translated manual is from the V2 version. If you have V1, some things like the T+RESET trick will not work (it displays a RAM test instead of quick booting into BASIC mode).


http://www.famicomworld.com/forum/index ... ic=10276.0 Family BASIC V3 manual
This also is only a text file in the attachment, and it's not yet complete. All the new command explanations are translated though.
Attachments
fambasv3_t.txt
Family BASIC V3 manual (incomplete)
(41.06 KiB) Downloaded 373 times
fabaman-t_v1.0.txt
Family BASIC manual up to page 15 (and page 69) (complete)
(43.32 KiB) Downloaded 307 times
lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Re: Family BASIC Lessons

Post by lancuster »

This is not enough. Lessons involve explanation, but I have the manual only "hello world" understood.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

A "Hello World" isn't explained in the manual, but it would just be:

Code: Select all

10 CLS
20 PRINT "HELLO WORLD!"
What is it that you don't understand? Have you been able to enter the first program in the manual that displays a Mario sprite?
lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Re: Family BASIC Lessons

Post by lancuster »

Pokun wrote:A "Hello World" isn't explained in the manual, but it would just be:

Code: Select all

10 CLS
20 PRINT "HELLO WORLD!"
What is it that you don't understand? Have you been able to enter the first program in the manual that displays a Mario sprite?
I know this
10 CLS - CLear Screen
20 LOCATE 4, 10 - position of text on x & y
30 PRINT "HELLO, WORLD!" - print the text
RUN - run program.
I also know how to display Mario sprite, but it's not enough.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

OK so you got the basics. The manual explains how to do more advanced stuff, as well as explains in detail how every command works. Read it and give it some time to sink in. It might not explain exactly how to make a game though. You might want to look at the example games.

Also you might find something interesting here:
Famicom World Family BASIC Super Thread
lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Re: Family BASIC Lessons

Post by lancuster »

Pokun wrote:OK so you got the basics. The manual explains how to do more advanced stuff, as well as explains in detail how every command works. Read it and give it some time to sink in. It might not explain exactly how to make a game though. You might want to look at the example games.

Also you might find something interesting here:
Famicom World Family BASIC Super Thread
Half of these links is broken. :(
Besides, I have some questions.
1) If I can compile my projects into ROM only with VirtuaNES - how I have to make this sign ":"? He displays on other emulators, but not on VirtuaNES. But only this sign gives an optimized code.
2) How can I copy and paste code to emulator? I tried, but no banana. :(
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

All links works for me except FAMILY BASIC ROOM, but I've saved the programs from that site (working link is further down in that thread). Famicom World seems to had some problems with their server lately though. Try the links again later.

1) Not sure who "he" is, or what code you are referring to? The colon ":" character is used for having multiple statements on the same line (mentioned on page 53 in the manual).

2) Nestopia uses F12 for this. I think VirtuaNES also supports pasting but I'm not sure.
lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Re: Family BASIC Lessons

Post by lancuster »

Pokun wrote:All links works for me except FAMILY BASIC ROOM, but I've saved the programs from that site (working link is further down in that thread). Famicom World seems to had some problems with their server lately though. Try the links again later.

1) Not sure who "he" is, or what code you are referring to? The colon ":" character is used for having multiple statements on the same line (mentioned on page 53 in the manual).

2) Nestopia uses F12 for this. I think VirtuaNES also supports pasting but I'm not sure.
I'm not sure that you tested Family BASIC somewhere else, in addition to Nestopia.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

I have the real cartridge and mostly use that, but I also often use Nestopia for quick testing because of the easy F12 pasting.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Family BASIC Lessons

Post by lidnariq »

Tangenting a bit, does Family BASIC let you jump to native 6502 code?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Family BASIC Lessons

Post by tepples »

Applesoft BASIC on the Apple II has the CALL statement for running a native subroutine. Apparently it's in Family BASIC as well, just not mentioned in some revisions of the manual.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Family BASIC Lessons

Post by Pokun »

Yes you just POKE your 6502 subroutine (written in machine code, not assembly) somewhere in the WRAM and use CLEAR on the address before it (this sets the upper limit for what WRAM memory the BASIC code can use). CALL is basically a JSR so the subroutine must end with an RTS instruction.

The CALL command works in all versions of NS-HuBASIC but for some reason it's missing from the V2 manual scans that Sebastien used for his scanlation. He said that his personal copy (also V2) did include it though. I scanned and translated the CALL part of page 69 from my manual (which is also V2 but has some changes and seems older than the scanlation), but I never scanned page 50 (index) and 110 (appendix) so the PDF is missing the CALL command on those pages. Not a big deal if you know about it but it could be confusing for people that are trying to look it up I guess.
Last edited by Pokun on Tue May 16, 2017 1:56 am, edited 1 time in total.
lancuster
Posts: 235
Joined: Thu Feb 18, 2016 3:20 am
Contact:

Re: Family BASIC Lessons

Post by lancuster »

The other day I tried to adapt the program for Russian users. After replacing the Japanese font into Russian, the program now is only work on VirtuaNES. And after replacing some unused characters of signs, which does not define VirtuaNES, the program stopped to work on this emulator. :(
Here is what it gives: Image
More like some sort of protection or something like that. Who could fix this?
Link to the patch: http://www.fayloobmennik.net/6989500
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Family BASIC Lessons

Post by lidnariq »

That message, when translated, implies to me it's no longer detecting the keyboard. VirtuaNES may be only enabling the keyboard based on the hash of the file.
Post Reply